From f048161880da086df22a53eb70181ea3aaaa89da Mon Sep 17 00:00:00 2001 From: Hiroyuki Ikezoe Date: Sat, 13 Mar 2021 08:15:38 +0000 Subject: [PATCH] Bug 1697890 - Use IsRootContentDocumentCrossProcess in ScrollbarAreaToExcludeFromCompositionBoundsFor. r=tnikkel Differential Revision: https://phabricator.services.mozilla.com/D108143 --- layout/base/nsLayoutUtils.cpp | 2 +- layout/reftests/scrolling/reftest.list | 1 + .../scrollbars-area-in-iframe-ref-child.html | 12 ++++++++++++ .../scrolling/scrollbars-area-in-iframe-ref.html | 5 +++++ .../scrolling/scrollbars-area-in-iframe.html | 15 +++++++++++++++ 5 files changed, 34 insertions(+), 1 deletion(-) create mode 100644 layout/reftests/scrolling/scrollbars-area-in-iframe-ref-child.html create mode 100644 layout/reftests/scrolling/scrollbars-area-in-iframe-ref.html create mode 100644 layout/reftests/scrolling/scrollbars-area-in-iframe.html diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index 3eef043663e4..7812fd3f4449 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -7943,7 +7943,7 @@ nsMargin nsLayoutUtils::ScrollbarAreaToExcludeFromCompositionBoundsFor( } bool isRootScrollFrame = aScrollFrame == presShell->GetRootScrollFrame(); bool isRootContentDocRootScrollFrame = - isRootScrollFrame && presContext->IsRootContentDocument(); + isRootScrollFrame && presContext->IsRootContentDocumentCrossProcess(); if (!isRootContentDocRootScrollFrame) { return nsMargin(); } diff --git a/layout/reftests/scrolling/reftest.list b/layout/reftests/scrolling/reftest.list index afe6c68d235f..b984403d7300 100644 --- a/layout/reftests/scrolling/reftest.list +++ b/layout/reftests/scrolling/reftest.list @@ -100,3 +100,4 @@ fuzzy(0-1,0-2) fuzzy-if(asyncPan&&!layersGPUAccelerated,0-102,0-2420) fuzzy-if(g == propagated-overflow-style-2e.html propagated-overflow-style-2-ref.html fuzzy-if(Android,54-54,8-8) == xul-scrollbar-iterate.html xul-scrollbar-iterate-ref.html +== scrollbars-area-in-iframe.html scrollbars-area-in-iframe-ref.html diff --git a/layout/reftests/scrolling/scrollbars-area-in-iframe-ref-child.html b/layout/reftests/scrolling/scrollbars-area-in-iframe-ref-child.html new file mode 100644 index 000000000000..6eed6f6b09fd --- /dev/null +++ b/layout/reftests/scrolling/scrollbars-area-in-iframe-ref-child.html @@ -0,0 +1,12 @@ + + + + + diff --git a/layout/reftests/scrolling/scrollbars-area-in-iframe-ref.html b/layout/reftests/scrolling/scrollbars-area-in-iframe-ref.html new file mode 100644 index 000000000000..1360f1f017cf --- /dev/null +++ b/layout/reftests/scrolling/scrollbars-area-in-iframe-ref.html @@ -0,0 +1,5 @@ + + + +