Bug 1077872 - Implement rendering of isolation CSS property. r=roc
☠☠ backed out by 46b36a35fddd ☠ ☠
authorRik Cabanier <cabanier@adobe.com>
Mon, 13 Oct 2014 14:03:00 -0400
changeset 226960 3012ee3c0083af38f0a73300a87c603c4ad8224f
parent 226959 a5108055f652d02f1d10fdb29a44d2f56b2dbf3e
child 226961 e945f3ffeb7e49b1c0f53705b957b1fe6d0b894e
push id7326
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:58:42 +0000
treeherdermozilla-aurora@d3a3b2a0f2f8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersroc
bugs1077872
milestone36.0a1
Bug 1077872 - Implement rendering of isolation CSS property. r=roc
layout/generic/nsFrame.cpp
layout/reftests/css-blending/blend-isolation-ref.html
layout/reftests/css-blending/blend-isolation.html
layout/reftests/css-blending/reftest.list
--- a/layout/generic/nsFrame.cpp
+++ b/layout/generic/nsFrame.cpp
@@ -2308,16 +2308,17 @@ nsIFrame::BuildDisplayListForChild(nsDis
     || disp->mMixBlendMode != NS_STYLE_BLEND_NORMAL
     || nsSVGIntegrationUtils::UsingEffectsForFrame(child);
 
   bool isPositioned = disp->IsPositioned(child);
   bool isStackingContext =
     (isPositioned && (disp->mPosition == NS_STYLE_POSITION_STICKY ||
                       pos->mZIndex.GetUnit() == eStyleUnit_Integer)) ||
      (disp->mWillChangeBitField & NS_STYLE_WILL_CHANGE_STACKING_CONTEXT) ||
+     disp->mIsolation != NS_STYLE_ISOLATION_AUTO ||
      isVisuallyAtomic || (aFlags & DISPLAY_CHILD_FORCE_STACKING_CONTEXT);
 
   if (isVisuallyAtomic || isPositioned || (!isSVG && disp->IsFloating(child)) ||
       ((disp->mClipFlags & NS_STYLE_CLIP_RECT) &&
        IsSVGContentWithCSSClip(child)) ||
        (disp->mWillChangeBitField & NS_STYLE_WILL_CHANGE_STACKING_CONTEXT) ||
       (aFlags & DISPLAY_CHILD_FORCE_STACKING_CONTEXT)) {
     // If you change this, also change IsPseudoStackingContextFromStyle()
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-blending/blend-isolation-ref.html
@@ -0,0 +1,15 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<style>
+#a {
+  background-color: rgb(0,255,0);
+  width: 200px;
+  height: 210px;
+}
+</style>
+<div id="a">
+</div>
+</html>
new file mode 100644
--- /dev/null
+++ b/layout/reftests/css-blending/blend-isolation.html
@@ -0,0 +1,28 @@
+<!--
+     Any copyright is dedicated to the Public Domain.
+     http://creativecommons.org/publicdomain/zero/1.0/
+-->
+<html>
+<style>
+.a {
+  background-color: rgb(0,255,0);
+}
+#b {
+  width: 200px;
+  height: 210px;
+}
+.c {
+  width: 100px;
+  height: 100px;
+  mix-blend-mode: difference;
+}
+#d {
+  isolation: isolate;
+}
+</style>
+<div id="b" class="a">
+  <div id="d">
+    <div class="a c"></div>
+  </div>
+</div>
+</html>
--- a/layout/reftests/css-blending/reftest.list
+++ b/layout/reftests/css-blending/reftest.list
@@ -79,8 +79,11 @@ pref(layout.css.background-blend-mode.en
 # Test plan 5.3.11 background-blend-mode for an element with background-attachement
 pref(layout.css.background-blend-mode.enabled,true) == background-blending-background-attachement-fixed.html background-blending-background-attachement-fixed-ref.html
 pref(layout.css.background-blend-mode.enabled,true) == background-blending-background-attachement-fixed-scroll.html background-blending-background-attachement-fixed-scroll-ref.html
 
 pref(layout.css.background-blend-mode.enabled,true) == background-blend-mode-body-image.html background-blend-mode-body-image-ref.html
 pref(layout.css.background-blend-mode.enabled,true) == background-blend-mode-body-transparent-image.html background-blend-mode-body-transparent-image-ref.html
 
 pref(layout.css.background-blend-mode.enabled,true) == background-blending-moz-element.html background-blending-moz-element-ref.html
+
+# Test plan 4.4.2 element with isolation:isolate creates an isolated group for blended children
+pref(layout.css.isolation.enabled,true) == blend-isolation.html blend-isolation-ref.html