diff --git a/layout/painting/RetainedDisplayListBuilder.cpp b/layout/painting/RetainedDisplayListBuilder.cpp index e917dd179394..21d3e9fe9839 100644 --- a/layout/painting/RetainedDisplayListBuilder.cpp +++ b/layout/painting/RetainedDisplayListBuilder.cpp @@ -844,10 +844,12 @@ static bool ProcessFrameInternal(nsIFrame* aFrame, : nullptr; if (placeholder) { - // The rect aOverflow is in the coordinate space of the containing block. - // Convert it to a coordinate space of the placeholder frame. - nsRect placeholderOverflow = - aOverflow + currentFrame->GetOffsetTo(placeholder); + nsRect placeholderOverflow = aOverflow; + auto rv = nsLayoutUtils::TransformRect(currentFrame, placeholder, + placeholderOverflow); + if (rv != nsLayoutUtils::TRANSFORM_SUCCEEDED) { + placeholderOverflow = nsRect(); + } CRR_LOG("Processing placeholder %p for OOF frame %p\n", placeholder, currentFrame); diff --git a/layout/reftests/display-list/reftest.list b/layout/reftests/display-list/reftest.list index 40db9e38e2b6..150590e6a80c 100644 --- a/layout/reftests/display-list/reftest.list +++ b/layout/reftests/display-list/reftest.list @@ -2,6 +2,7 @@ skip-if(!retainedDisplayList) == retained-dl-style-change-1.html retained-dl-sty skip-if(!retainedDisplayList) == retained-dl-frame-deleted-1.html retained-dl-style-change-1-ref.html skip-if(!retainedDisplayList) == retained-dl-frame-created-1.html retained-dl-style-change-1-ref.html skip-if(!retainedDisplayList) == retained-dl-style-change-stacking-context-1.html retained-dl-style-change-stacking-context-1-ref.html +skip-if(!retainedDisplayList) == retained-dl-style-change-stacking-context-2.html retained-dl-style-change-stacking-context-2-ref.html skip-if(!retainedDisplayList||!asyncPan) == retained-dl-async-scrolled-1.html retained-dl-async-scrolled-1-ref.html skip-if(!retainedDisplayList) == retained-dl-remove-for-ancestor-change-1.html retained-dl-remove-for-ancestor-change-1-ref.html skip-if(!retainedDisplayList) == retained-dl-scroll-out-of-view-1.html retained-dl-scroll-out-of-view-1-ref.html diff --git a/layout/reftests/display-list/retained-dl-style-change-stacking-context-2-ref.html b/layout/reftests/display-list/retained-dl-style-change-stacking-context-2-ref.html new file mode 100644 index 000000000000..056f0b2086e9 --- /dev/null +++ b/layout/reftests/display-list/retained-dl-style-change-stacking-context-2-ref.html @@ -0,0 +1,20 @@ + + + + + +
+ + diff --git a/layout/reftests/display-list/retained-dl-style-change-stacking-context-2.html b/layout/reftests/display-list/retained-dl-style-change-stacking-context-2.html new file mode 100644 index 000000000000..248c7e62470c --- /dev/null +++ b/layout/reftests/display-list/retained-dl-style-change-stacking-context-2.html @@ -0,0 +1,23 @@ + + + + + +
+
+
+
+ + +