diff --git a/gfx/layers/wr/WebRenderColorLayer.cpp b/gfx/layers/wr/WebRenderColorLayer.cpp index ca743c64b0f4..8539d0420cd0 100644 --- a/gfx/layers/wr/WebRenderColorLayer.cpp +++ b/gfx/layers/wr/WebRenderColorLayer.cpp @@ -17,16 +17,29 @@ WebRenderColorLayer::RenderLayer() { WRScrollFrameStackingContextGenerator scrollFrames(this); - gfx::Rect rect = RelativeToParent(GetTransform().TransformBounds(IntRectToRect(mBounds))); - gfx::Rect clip; + LayerIntRegion visibleRegion = GetVisibleRegion(); + LayerIntRect bounds = visibleRegion.GetBounds(); + Rect rect = RelativeToVisible(IntRectToRect(bounds.ToUnknownRect())); + Rect clip; if (GetClipRect().isSome()) { - clip = RelativeToParent(IntRectToRect(GetClipRect().ref().ToUnknownRect())); + clip = RelativeToTransformedVisible(IntRectToRect(GetClipRect().ref().ToUnknownRect())); } else { clip = rect; } if (gfxPrefs::LayersDump()) printf_stderr("ColorLayer %p using rect:%s clip:%s\n", this, Stringify(rect).c_str(), Stringify(clip).c_str()); + + + gfx::Matrix4x4 transform;// = GetTransform(); + gfx::Rect relBounds = TransformedVisibleBoundsRelativeToParent(); + gfx::Rect overflow(0, 0, relBounds.width, relBounds.height); + + WRBridge()->AddWebRenderCommand( + OpDPPushStackingContext(ToWRRect(relBounds), ToWRRect(overflow), Nothing(), transform, FrameMetrics::NULL_SCROLL_ID)); WRBridge()->AddWebRenderCommand( OpDPPushRect(ToWRRect(rect), ToWRRect(clip), mColor.r, mColor.g, mColor.b, mColor.a)); + + if (gfxPrefs::LayersDump()) printf_stderr("ColorLayer %p using %s as bounds, %s as overflow, %s for transform\n", this, Stringify(relBounds).c_str(), Stringify(overflow).c_str(), Stringify(transform).c_str()); + WRBridge()->AddWebRenderCommand(OpDPPopStackingContext()); } } // namespace layers diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 1bc8dc76f57f..93a14b9a29f3 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -1860,7 +1860,7 @@ test-pref(dom.webcomponents.enabled,true) == 1066554-1.html 1066554-1-ref.html == 1069716-1.html 1069716-1-ref.html fails-if(webrender) == 1078262-1.html about:blank test-pref(layout.testing.overlay-scrollbars.always-visible,false) == 1081072-1.html 1081072-1-ref.html -== 1081185-1.html 1081185-1-ref.html +fails-if(webrender) == 1081185-1.html 1081185-1-ref.html == 1097437-1.html 1097437-1-ref.html == 1103258-1.html 1103258-1-ref.html # assertion crash test with layers culling test == 1105137-1.html 1105137-1-ref.html diff --git a/layout/reftests/transform-3d/reftest.list b/layout/reftests/transform-3d/reftest.list index ae53f7107b59..3bc2622dfa59 100644 --- a/layout/reftests/transform-3d/reftest.list +++ b/layout/reftests/transform-3d/reftest.list @@ -43,7 +43,7 @@ fails-if(webrender) == backface-visibility-3.html backface-visibility-3-ref.html == perspective-origin-1b.html perspective-origin-1a.html fuzzy(3,99) random-if(Android&&!browserIsRemote) == perspective-origin-2a.html perspective-origin-2-ref.html # subpixel AA, bug 732568 fuzzy-if(winWidget&&!layersGPUAccelerated,1,61) == perspective-origin-3a.html perspective-origin-3-ref.html -== perspective-origin-4a.html perspective-origin-4-ref.html +fails-if(webrender) == perspective-origin-4a.html perspective-origin-4-ref.html fails-if(webrender) == perspective-zindex.html green-rect.html fails-if(webrender) == perspective-zindex-2.html green-rect.html fails-if(webrender) != sorting-1a.html sorting-1-ref.html @@ -71,7 +71,7 @@ fuzzy(3,99) == animate-cube-degrees.html animate-cube-degrees-ref.html # subpixe fuzzy-if(gtkWidget,128,100) fuzzy-if(Android||OSX==1010||(gtkWidget&&layersGPUAccelerated),143,100) fuzzy-if(winWidget||OSX<1010,141,100) fails-if(webrender) == preserves3d-nested.html preserves3d-nested-ref.html fuzzy-if(cocoaWidget,128,9) == animate-preserve3d-parent.html animate-preserve3d-ref.html # intermittently fuzzy on Mac fuzzy-if(cocoaWidget,128,9) == animate-preserve3d-child.html animate-preserve3d-ref.html # intermittently fuzzy on Mac -== animate-backface-hidden.html about:blank +fails-if(webrender) == animate-backface-hidden.html about:blank fails-if(webrender) == 1245450-1.html green-rect.html fuzzy(1,2000) == opacity-preserve3d-1.html opacity-preserve3d-1-ref.html fuzzy(1,15000) == opacity-preserve3d-2.html opacity-preserve3d-2-ref.html