Changeset 289527 in webkit
- Timestamp:
- Feb 10, 2022 5:02:05 AM (5 months ago)
- Location:
- trunk
- Files:
-
- 2 added
- 3 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-layout-020-expected.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-layout-020.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBlock.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r289526 r289527 1 2022-02-10 Rob Buis <rbuis@igalia.com> 2 3 Incorrect abspos layout when toggling contain 4 https://bugs.webkit.org/show_bug.cgi?id=236261 5 6 Reviewed by Simon Fraser. 7 8 * web-platform-tests/css/css-contain/contain-layout-020-expected.html: Added. 9 * web-platform-tests/css/css-contain/contain-layout-020.html: Added. 10 1 11 2022-02-10 Antti Koivisto <antti@apple.com> 2 12 -
trunk/Source/WebCore/ChangeLog
r289526 r289527 1 2022-02-10 Rob Buis <rbuis@igalia.com> 2 3 Incorrect abspos layout when toggling contain 4 https://bugs.webkit.org/show_bug.cgi?id=236261 5 6 Reviewed by Simon Fraser. 7 8 A change in layout containment for a container means either the container becomes 9 a absolute positioning containing block or ceases to be one. The method 10 removePositionedObjectsIfNeeded handles this, update it to take layout containment 11 changes into account. 12 13 Test: imported/w3c/web-platform-tests/css/css-contain/contain-layout-020.html 14 15 * rendering/RenderBlock.cpp: 16 (WebCore::RenderBlock::removePositionedObjectsIfNeeded): 17 1 18 2022-02-10 Antti Koivisto <antti@apple.com> 2 19 -
trunk/Source/WebCore/rendering/RenderBlock.cpp
r289157 r289527 377 377 bool hadTransform = oldStyle.hasTransformRelatedProperty(); 378 378 bool willHaveTransform = newStyle.hasTransformRelatedProperty(); 379 if (oldStyle.position() == newStyle.position() && hadTransform == willHaveTransform) 379 bool hadLayoutContainment = oldStyle.containsLayout(); 380 bool willHaveLayoutContainment = newStyle.containsLayout(); 381 if (oldStyle.position() == newStyle.position() && hadTransform == willHaveTransform && hadLayoutContainment == willHaveLayoutContainment) 380 382 return; 381 383 382 384 // We are no longer the containing block for out-of-flow descendants. 383 385 bool outOfFlowDescendantsHaveNewContainingBlock = (hadTransform && !willHaveTransform) || (newStyle.position() == PositionType::Static && !willHaveTransform); 386 if (hadLayoutContainment != willHaveLayoutContainment) 387 outOfFlowDescendantsHaveNewContainingBlock = hadLayoutContainment && !willHaveLayoutContainment; 384 388 if (outOfFlowDescendantsHaveNewContainingBlock) { 385 389 // Our out-of-flow descendants will be inserted into a new containing block's positioned objects list during the next layout.
Note: See TracChangeset
for help on using the changeset viewer.