Changeset 287683 in webkit
- Timestamp:
- Jan 6, 2022, 6:33:25 AM (5 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
-
LayoutTests/ChangeLog (modified) (1 diff)
-
LayoutTests/TestExpectations (modified) (1 diff)
-
Source/WebCore/ChangeLog (modified) (1 diff)
-
Source/WebCore/rendering/RenderObject.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r287678 r287683 1 2022-01-06 Alan Bujtas <zalan@apple.com> 2 3 Ensure that the top layer is always anchored to the RenderView 4 https://bugs.webkit.org/show_bug.cgi?id=231292 5 <rdar://problem/83941854> 6 7 Reviewed by Simon Fraser. 8 9 * TestExpectations: offsetFromAncestorContainer expects no transformed renderer in-between the 10 dialog and the RenderView's layer. It will go away with the layer re-parenting work. 11 1 12 2022-01-05 Antoine Quint <graouts@webkit.org> 2 13 -
trunk/LayoutTests/TestExpectations
r287663 r287683 2360 2360 webkit.org/b/231292 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-overflow-clip.html [ ImageOnlyFailure ] 2361 2361 webkit.org/b/231292 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-overflow-scroll.html [ ImageOnlyFailure ] 2362 webkit.org/b/231292 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-transform.html [ ImageOnlyFailure ] 2362 # Needs layer re-parenting 2363 webkit.org/b/231292 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-transform.html [ Skip ] 2363 2364 2364 2365 # Assertion failure in MessagePort::contextDestroyed, usually attributed to later tests -
trunk/Source/WebCore/ChangeLog
r287681 r287683 1 2022-01-06 Alan Bujtas <zalan@apple.com> 2 3 Ensure that the top layer is always anchored to the RenderView 4 https://bugs.webkit.org/show_bug.cgi?id=231292 5 <rdar://problem/83941854> 6 7 Reviewed by Simon Fraser. 8 9 A fixed positioned block level box is not necessarily anchored to the RenderView (see canContainFixedPositionObjects). 10 This patch ensures that we skip those ancestors and return the RenderView as the containing block for the top layer content. 11 12 https://fullscreen.spec.whatwg.org/#new-stacking-layer 13 "If the top layer position property computes to fixed, its containing block is the viewport, and the initial containing block otherwise." 14 15 * rendering/RenderObject.cpp: 16 (WebCore::RenderObject::containingBlock const): 17 (WebCore::containerForElement): 18 1 19 2022-01-06 Jean-Yves Avenard <jya@apple.com> 2 20 -
trunk/Source/WebCore/rendering/RenderObject.cpp
r287610 r287683 659 659 RenderBlock* RenderObject::containingBlock() const 660 660 { 661 auto containingBlockForRenderer = [](const RenderElement& renderer) 662 { 661 auto containingBlockForRenderer = [](const auto& renderer) -> RenderBlock* { 662 if (isInTopLayerOrBackdrop(renderer.style(), renderer.element())) 663 return &renderer.view(); 663 664 if (renderer.isAbsolutelyPositioned()) 664 665 return renderer.containingBlockForAbsolutePosition(); … … 1475 1476 if (!is<RenderElement>(renderer)) 1476 1477 return renderer.parent(); 1478 if (isInTopLayerOrBackdrop(renderer.style(), downcast<RenderElement>(renderer).element())) { 1479 auto updateRepaintContainerSkippedFlagIfApplicable = [&] { 1480 if (!repaintContainerSkipped) 1481 return; 1482 *repaintContainerSkipped = false; 1483 if (repaintContainer == &renderer.view()) 1484 return; 1485 for (auto& ancestor : ancestorsOfType<RenderElement>(renderer)) { 1486 if (repaintContainer == &ancestor) { 1487 *repaintContainerSkipped = true; 1488 break; 1489 } 1490 } 1491 }; 1492 updateRepaintContainerSkippedFlagIfApplicable(); 1493 return &renderer.view(); 1494 } 1477 1495 auto position = renderer.style().position(); 1478 1496 if (position == PositionType::Static || position == PositionType::Relative || position == PositionType::Sticky)
Note:
See TracChangeset
for help on using the changeset viewer.