diff --git a/layout/generic/nsFrame.cpp b/layout/generic/nsFrame.cpp index 5e80fc1b8a3d..321a5116826b 100644 --- a/layout/generic/nsFrame.cpp +++ b/layout/generic/nsFrame.cpp @@ -10967,8 +10967,9 @@ nsIFrame::IsStackingContext(EffectSet* aEffectSet, { return HasOpacity(aEffectSet) || IsTransformed(aStyleDisplay) || - aStyleDisplay->IsContainPaint() || - aStyleDisplay->IsContainLayout() || + (IsFrameOfType(eSupportsContainLayoutAndPaint) && + (aStyleDisplay->IsContainPaint() || + aStyleDisplay->IsContainLayout())) || // strictly speaking, 'perspective' doesn't require visual atomicity, // but the spec says it acts like the rest of these ChildrenHavePerspective(aStyleDisplay) || diff --git a/layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-ib-split-001-ref.html b/layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-ib-split-001-ref.html new file mode 100644 index 000000000000..eb787424ed47 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-ib-split-001-ref.html @@ -0,0 +1,76 @@ + + + + + CSS Reftest Reference + + + + + + +
+ + + +
+
+ +
+
+
+
+
+
+ + diff --git a/layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-ib-split-001.html b/layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-ib-split-001.html new file mode 100644 index 000000000000..d9f976deb8ca --- /dev/null +++ b/layout/reftests/w3c-css/submitted/contain/contain-layout-ignored-cases-ib-split-001.html @@ -0,0 +1,77 @@ + + + + + CSS Test: 'contain: layout' should have no effect on non-atomic inline + (including its block part, if there's a block-in-inline split) + + + + + + + + +
+ + +
+
+ +
+
+
+
+
+
+ + diff --git a/layout/reftests/w3c-css/submitted/contain/contain-paint-ignored-cases-ib-split-001-ref.html b/layout/reftests/w3c-css/submitted/contain/contain-paint-ignored-cases-ib-split-001-ref.html new file mode 100644 index 000000000000..8a698b9d2ce2 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/contain/contain-paint-ignored-cases-ib-split-001-ref.html @@ -0,0 +1,76 @@ + + + + + CSS Reftest Reference + + + + + + +
+ + + +
+
+ +
+
+
+
+
+
+ + diff --git a/layout/reftests/w3c-css/submitted/contain/contain-paint-ignored-cases-ib-split-001.html b/layout/reftests/w3c-css/submitted/contain/contain-paint-ignored-cases-ib-split-001.html new file mode 100644 index 000000000000..eb21a2d46095 --- /dev/null +++ b/layout/reftests/w3c-css/submitted/contain/contain-paint-ignored-cases-ib-split-001.html @@ -0,0 +1,77 @@ + + + + + CSS Test: 'contain: paint' should have no effect on non-atomic inline + (including its block part, if there's a block-in-inline split) + + + + + + + + +
+ + +
+
+ +
+
+
+
+
+
+ + diff --git a/layout/reftests/w3c-css/submitted/contain/reftest.list b/layout/reftests/w3c-css/submitted/contain/reftest.list index c3836767cdab..069cbacd1450 100644 --- a/layout/reftests/w3c-css/submitted/contain/reftest.list +++ b/layout/reftests/w3c-css/submitted/contain/reftest.list @@ -10,6 +10,7 @@ pref(layout.css.overflow-clip-box.enabled,true) == contain-paint-clip-006.html c == contain-paint-containing-block-fixed-001.html contain-paint-containing-block-fixed-001-ref.html == contain-paint-formatting-context-float-001.html contain-paint-formatting-context-float-001-ref.html == contain-paint-formatting-context-margin-001.html contain-paint-formatting-context-margin-001-ref.html +== contain-paint-ignored-cases-ib-split-001.html contain-paint-ignored-cases-ib-split-001-ref.html == contain-paint-ignored-cases-internal-table-001a.html contain-paint-ignored-cases-internal-table-001-ref.html == contain-paint-ignored-cases-internal-table-001b.html contain-paint-ignored-cases-internal-table-001-ref.html == contain-paint-ignored-cases-no-principal-box-001.html contain-paint-ignored-cases-no-principal-box-001-ref.html @@ -36,6 +37,7 @@ fuzzy-if(webrender&&winWidget,0-3,0-2) == contain-size-inline-flex-001.html cont == contain-layout-formatting-context-margin-001.html contain-layout-formatting-context-margin-001-ref.html == contain-layout-containing-block-fixed-001.html contain-paint-containing-block-fixed-001-ref.html == contain-layout-containing-block-absolute-001.html contain-paint-containing-block-absolute-001-ref.html +== contain-layout-ignored-cases-ib-split-001.html contain-layout-ignored-cases-ib-split-001-ref.html == contain-layout-ignored-cases-no-principal-box-001.html contain-paint-ignored-cases-no-principal-box-001-ref.html == contain-layout-ignored-cases-no-principal-box-002.html contain-layout-ignored-cases-no-principal-box-002-ref.html == contain-layout-ignored-cases-no-principal-box-003.html contain-layout-ignored-cases-no-principal-box-003-ref.html diff --git a/testing/web-platform/meta/css/css-contain/contain-layout-018.html.ini b/testing/web-platform/meta/css/css-contain/contain-layout-018.html.ini deleted file mode 100644 index b83078d5cc3a..000000000000 --- a/testing/web-platform/meta/css/css-contain/contain-layout-018.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[contain-layout-018.html] - expected: FAIL diff --git a/testing/web-platform/meta/css/css-contain/contain-paint-025.html.ini b/testing/web-platform/meta/css/css-contain/contain-paint-025.html.ini deleted file mode 100644 index ec1c05d716e6..000000000000 --- a/testing/web-platform/meta/css/css-contain/contain-paint-025.html.ini +++ /dev/null @@ -1,2 +0,0 @@ -[contain-paint-025.html] - expected: FAIL