Modified: branches/safari-613-branch/LayoutTests/ChangeLog (288566 => 288567)
--- branches/safari-613-branch/LayoutTests/ChangeLog 2022-01-25 19:13:56 UTC (rev 288566)
+++ branches/safari-613-branch/LayoutTests/ChangeLog 2022-01-25 19:38:24 UTC (rev 288567)
@@ -1,3 +1,42 @@
+2022-01-25 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r287845. rdar://problem/87785288
+
+ REGRESSION(r287683): <dialog> elements inside clipped/overflowed elements are no longer shown
+ https://bugs.webkit.org/show_bug.cgi?id=234984
+
+ Reviewed by Simon Fraser.
+
+ Source/WebCore:
+
+ Paint at the right place by fixing isContainerForPositioned, also fix clip rects.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::isContainerForPositioned):
+ (WebCore::RenderLayer::enclosingAncestorForPosition const):
+ (WebCore::accumulateOffsetTowardsAncestor):
+ (WebCore::RenderLayer::calculateClipRects const):
+
+ LayoutTests:
+
+ Enable relevant tests. Set the asserting test as Crash instead of Skipping.
+
+ * TestExpectations:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-01-10 Tim Nguyen <n...@apple.com>
+
+ REGRESSION(r287683): <dialog> elements inside clipped/overflowed elements are no longer shown
+ https://bugs.webkit.org/show_bug.cgi?id=234984
+
+ Reviewed by Simon Fraser.
+
+ Enable relevant tests. Set the asserting test as Crash instead of Skipping.
+
+ * TestExpectations:
+
2022-01-25 Russell Epstein <repst...@apple.com>
Cherry-pick r288315. rdar://problem/87601762
Modified: branches/safari-613-branch/LayoutTests/TestExpectations (288566 => 288567)
--- branches/safari-613-branch/LayoutTests/TestExpectations 2022-01-25 19:13:56 UTC (rev 288566)
+++ branches/safari-613-branch/LayoutTests/TestExpectations 2022-01-25 19:38:24 UTC (rev 288567)
@@ -2361,12 +2361,8 @@
# Top layer tests
webkit.org/b/229315 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-replaced-renderer.html [ ImageOnlyFailure ]
webkit.org/b/229315 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/modal-dialog-in-table-column.html [ ImageOnlyFailure ]
-webkit.org/b/231292 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-containing-block.html [ ImageOnlyFailure ]
-webkit.org/b/231292 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-stacking.html [ ImageOnlyFailure ]
-webkit.org/b/231292 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-overflow-clip.html [ ImageOnlyFailure ]
-webkit.org/b/231292 imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-overflow-scroll.html [ ImageOnlyFailure ]
# Needs layer re-parenting
-webkit.org/b/231292 [ Debug ] imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-transform.html [ Skip ]
+webkit.org/b/234980 [ Debug ] imported/w3c/web-platform-tests/html/semantics/interactive-elements/the-dialog-element/top-layer-parent-transform.html [ Crash ]
# Assertion failure in MessagePort::contextDestroyed, usually attributed to later tests
webkit.org/b/94458 http/tests/security/MessagePort/event-listener-context.html [ Skip ]
Modified: branches/safari-613-branch/Source/WebCore/ChangeLog (288566 => 288567)
--- branches/safari-613-branch/Source/WebCore/ChangeLog 2022-01-25 19:13:56 UTC (rev 288566)
+++ branches/safari-613-branch/Source/WebCore/ChangeLog 2022-01-25 19:38:24 UTC (rev 288567)
@@ -1,3 +1,46 @@
+2022-01-25 Alan Coon <alanc...@apple.com>
+
+ Cherry-pick r287845. rdar://problem/87785288
+
+ REGRESSION(r287683): <dialog> elements inside clipped/overflowed elements are no longer shown
+ https://bugs.webkit.org/show_bug.cgi?id=234984
+
+ Reviewed by Simon Fraser.
+
+ Source/WebCore:
+
+ Paint at the right place by fixing isContainerForPositioned, also fix clip rects.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::isContainerForPositioned):
+ (WebCore::RenderLayer::enclosingAncestorForPosition const):
+ (WebCore::accumulateOffsetTowardsAncestor):
+ (WebCore::RenderLayer::calculateClipRects const):
+
+ LayoutTests:
+
+ Enable relevant tests. Set the asserting test as Crash instead of Skipping.
+
+ * TestExpectations:
+
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@287845 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2022-01-10 Tim Nguyen <n...@apple.com>
+
+ REGRESSION(r287683): <dialog> elements inside clipped/overflowed elements are no longer shown
+ https://bugs.webkit.org/show_bug.cgi?id=234984
+
+ Reviewed by Simon Fraser.
+
+ Paint at the right place by fixing isContainerForPositioned, also fix clip rects.
+
+ * rendering/RenderLayer.cpp:
+ (WebCore::isContainerForPositioned):
+ (WebCore::RenderLayer::enclosingAncestorForPosition const):
+ (WebCore::accumulateOffsetTowardsAncestor):
+ (WebCore::RenderLayer::calculateClipRects const):
+
2022-01-25 Russell Epstein <repst...@apple.com>
Cherry-pick r288315. rdar://problem/87601762
Modified: branches/safari-613-branch/Source/WebCore/rendering/RenderLayer.cpp (288566 => 288567)
--- branches/safari-613-branch/Source/WebCore/rendering/RenderLayer.cpp 2022-01-25 19:13:56 UTC (rev 288566)
+++ branches/safari-613-branch/Source/WebCore/rendering/RenderLayer.cpp 2022-01-25 19:38:24 UTC (rev 288567)
@@ -1777,8 +1777,11 @@
return floatPointForLengthPoint(renderer().style().perspectiveOrigin(), borderBox.size());
}
-static inline bool isContainerForPositioned(RenderLayer& layer, PositionType position)
+static inline bool isContainerForPositioned(RenderLayer& layer, PositionType position, bool establishesTopLayer)
{
+ if (establishesTopLayer)
+ return layer.isRenderViewLayer();
+
switch (position) {
case PositionType::Fixed:
return layer.renderer().canContainFixedPositionObjects();
@@ -1815,7 +1818,7 @@
return renderer().view().layer();
RenderLayer* curr = parent();
- while (curr && !isContainerForPositioned(*curr, position))
+ while (curr && !isContainerForPositioned(*curr, position, establishesTopLayer()))
curr = curr->parent();
return curr;
@@ -2292,7 +2295,7 @@
if (currLayer == ancestorLayer)
foundAncestor = true;
- if (isContainerForPositioned(*currLayer, PositionType::Fixed)) {
+ if (isContainerForPositioned(*currLayer, PositionType::Fixed, layer->establishesTopLayer())) {
fixedPositionContainerLayer = currLayer;
ASSERT_UNUSED(foundAncestor, foundAncestor);
break;
@@ -2331,7 +2334,7 @@
// RenderFragmentedFlow is a positioned container, child of RenderView, positioned at (0,0).
// This implies that, for out-of-flow positioned elements inside a RenderFragmentedFlow,
// we are bailing out before reaching root layer.
- if (isContainerForPositioned(*parentLayer, position))
+ if (isContainerForPositioned(*parentLayer, position, layer->establishesTopLayer()))
break;
if (parentLayer == ancestorLayer) {
@@ -4541,11 +4544,12 @@
Ref<ClipRects> RenderLayer::parentClipRects(const ClipRectsContext& clipRectsContext) const
{
- ASSERT(parent());
+ ASSERT(parent() || establishesTopLayer());
+ auto containerLayer = establishesTopLayer() ? renderer().view().layer() : parent();
auto temporaryParentClipRects = [&](const ClipRectsContext& clipContext) {
auto parentClipRects = ClipRects::create();
- parent()->calculateClipRects(clipContext, parentClipRects);
+ containerLayer->calculateClipRects(clipContext, parentClipRects);
return parentClipRects;
};
@@ -4558,7 +4562,7 @@
return temporaryParentClipRects(tempClipRectsContext);
}
- return parent()->updateClipRects(clipRectsContext);
+ return containerLayer->updateClipRects(clipRectsContext);
}
static inline ClipRect backgroundClipRectForPosition(const ClipRects& parentRects, PositionType position)