haikuwebkit/LayoutTests/fast/repaint/align-items-overflow-change...

9 lines
173 B
Plaintext
Raw Permalink Normal View History

[CSS Grid Layout] Relayout whenever Box Alignment properties change https://bugs.webkit.org/show_bug.cgi?id=148070 Reviewed by Darin Adler. Source/WebCore: We were Reattaching the styles to the RenderTree whenever Content Alignment properties (align-items and justify-items) changed their values, since the Self Alignment properties depend on such values to resolve 'auto' values during layout. This patch removes such restriction, since we resolve the auto values whenever we access the alignment properties. The only thing we need to do is to mark a grid item for layout whenever the Default Alignment properties change from/to stretch, since it implies a resize of the grid items using 'auto' values for the Self Alignment properties. Tests: fast/css-grid-layout/relayout-align-items-changed.html fast/css-grid-layout/relayout-align-self-changed.html fast/css-grid-layout/relayout-justify-items-changed.html fast/css-grid-layout/relayout-justify-self-changed.html fast/repaint/align-items-change.html fast/repaint/align-items-overflow-change.html fast/repaint/align-self-change.html fast/repaint/align-self-overflow-change.html fast/repaint/justify-items-change.html fast/repaint/justify-items-legacy-change.html fast/repaint/justify-items-overflow-change.html fast/repaint/justify-self-change.html fast/repaint/justify-self-overflow-change.html * rendering/RenderGrid.cpp: (WebCore::defaultAlignmentIsStretch): (WebCore::RenderGrid::styleDidChange): * rendering/RenderGrid.h: * rendering/style/RenderStyle.cpp: (WebCore::RenderStyle::resolveAlignmentOverflow): (WebCore::RenderStyle::changeRequiresLayout): * style/StyleResolveTree.cpp: (WebCore::Style::determineChange): Deleted. LayoutTests: Tests to verify we force a layout of grid container or grid items, as appropriated, whenever Box Alignment properties change their value. This patch also adds some repaint tests, so we can ensure we generate the correct repaint rects as well. * fast/css-grid-layout/relayout-align-items-changed-expected.txt: Added. * fast/css-grid-layout/relayout-align-items-changed.html: Added. * fast/css-grid-layout/relayout-align-self-changed-expected.txt: Added. * fast/css-grid-layout/relayout-align-self-changed.html: Added. * fast/css-grid-layout/relayout-justify-items-changed-expected.txt: Added. * fast/css-grid-layout/relayout-justify-items-changed.html: Added. * fast/css-grid-layout/relayout-justify-self-changed-expected.txt: Added. * fast/css-grid-layout/relayout-justify-self-changed.html: Added. * fast/repaint/align-items-change-expected.txt: Added. * fast/repaint/align-items-change.html: Added. * fast/repaint/align-items-overflow-change-expected.txt: Added. * fast/repaint/align-items-overflow-change.html: Added. * fast/repaint/align-self-change-expected.txt: Added. * fast/repaint/align-self-change.html: Added. * fast/repaint/align-self-overflow-change-expected.txt: Added. * fast/repaint/align-self-overflow-change.html: Added. * fast/repaint/justify-items-change-expected.txt: Added. * fast/repaint/justify-items-change.html: Added. * fast/repaint/justify-items-legacy-change-expected.txt: Added. * fast/repaint/justify-items-legacy-change.html: Added. * fast/repaint/justify-items-overflow-change-expected.txt: Added. * fast/repaint/justify-items-overflow-change.html: Added. * fast/repaint/justify-self-change-expected.txt: Added. * fast/repaint/justify-self-change.html: Added. * fast/repaint/justify-self-overflow-change-expected.txt: Added. * fast/repaint/justify-self-overflow-change.html: Added. Canonical link: https://commits.webkit.org/167356@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@189910 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2015-09-17 09:13:35 +00:00
Tests invalidation on align-items style change (just overflow). Passes if there is no red.
(repaint rects
(rect 0 2 200 350)
(rect 0 52 200 300)
(rect 0 2 800 14)
)