Changeset 293209 in webkit
- Timestamp:
- Apr 21, 2022 10:35:33 PM (3 months ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 edited
-
LayoutTests/imported/w3c/ChangeLog (modified) (1 diff)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-layout-021-expected.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/contain-layout-021.html (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/reference (added)
-
LayoutTests/imported/w3c/web-platform-tests/css/css-contain/reference/contain-layout-021-ref.html (added)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderBox.cpp (modified) (2 diffs)
-
Source/WebCore/rendering/svg/RenderSVGRoot.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/imported/w3c/ChangeLog
r293208 r293209 1 2022-04-21 Rob Buis <rbuis@igalia.com> 2 3 `contain: layout` on the html element should change position:fixed behavior 4 https://bugs.webkit.org/show_bug.cgi?id=238560 5 6 Reviewed by Simon Fraser. 7 8 * web-platform-tests/css/css-contain/contain-layout-021-expected.html: Added. 9 * web-platform-tests/css/css-contain/contain-layout-021.html: Added. 10 * web-platform-tests/css/css-contain/reference/contain-layout-021-ref.html: Added. 11 1 12 2022-04-21 Chris Dumez <cdumez@apple.com> 2 13 -
trunk/Source/WebCore/ChangeLog
r293208 r293209 1 2022-04-21 Rob Buis <rbuis@igalia.com> 2 3 `contain: layout` on the html element should change position:fixed behavior 4 https://bugs.webkit.org/show_bug.cgi?id=238560 5 6 Reviewed by Simon Fraser. 7 8 The mapLocalToContainer/mapAbsoluteToLocalPoint methods need to not only consider boxes 9 having transforms but need to include all checks in canContainFixedPositionObjects to 10 determine if the box acts as a fixed position containing block. 11 12 Tests: imported/w3c/web-platform-tests/css/css-contain/contain-layout-021.html 13 imported/w3c/web-platform-tests/css/css-contain/reference/contain-layout-021-ref.html 14 15 * rendering/RenderBox.cpp: 16 (WebCore::RenderBox::mapLocalToContainer const): 17 (WebCore::RenderBox::mapAbsoluteToLocalPoint const): 18 * rendering/svg/RenderSVGRoot.cpp: 19 (WebCore::RenderSVGRoot::mapLocalToContainer const): 20 1 21 2022-04-21 Chris Dumez <cdumez@apple.com> 2 22 -
trunk/Source/WebCore/rendering/RenderBox.cpp
r292706 r293209 2321 2321 // If this box has a transform, it acts as a fixed position container for fixed descendants, 2322 2322 // and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position. 2323 if (hasTransform() && !isFixedPos) 2323 if (isFixedPos) 2324 mode.add(IsFixed); 2325 else if (canContainFixedPositionObjects()) 2324 2326 mode.remove(IsFixed); 2325 else if (isFixedPos)2326 mode.add(IsFixed);2327 2327 2328 2328 if (wasFixed) … … 2395 2395 { 2396 2396 bool isFixedPos = isFixedPositioned(); 2397 if (hasTransform() && !isFixedPos) { 2397 if (isFixedPos) 2398 mode.add(IsFixed); 2399 else if (canContainFixedPositionObjects()) { 2398 2400 // If this box has a transform, it acts as a fixed position container for fixed descendants, 2399 2401 // and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position. 2400 2402 mode.remove(IsFixed); 2401 } else if (isFixedPos) 2402 mode.add(IsFixed); 2403 } 2403 2404 2404 2405 RenderBoxModelObject::mapAbsoluteToLocalPoint(mode, transformState); -
trunk/Source/WebCore/rendering/svg/RenderSVGRoot.cpp
r292706 r293209 513 513 // If this box has a transform, it acts as a fixed position container for fixed descendants, 514 514 // and may itself also be fixed position. So propagate 'fixed' up only if this box is fixed position. 515 if (hasTransform() && !isFixedPos) 515 if (isFixedPos) 516 mode.add(IsFixed); 517 else if (canContainFixedPositionObjects()) 516 518 mode.remove(IsFixed); 517 else if (isFixedPos)518 mode.add(IsFixed);519 519 520 520 if (wasFixed)
Note: See TracChangeset
for help on using the changeset viewer.