Bug 1544895 - revert back to old bad bounds to pick lesser evil for now. r=kats
authorAlexis Beingessner <a.beingessner@gmail.com>
Thu, 18 Apr 2019 13:03:28 +0000
changeset 470165 580a7e38c60491123f3e7bba82904008ab0262d1
parent 470164 f1e0b621963c9ecae6e9b070da972d3ecd970c68
child 470166 5be51df44c5c75a8ffd199f9dccb2c614ecb7be2
push id112843
push useraiakab@mozilla.com
push dateFri, 19 Apr 2019 09:50:22 +0000
treeherdermozilla-inbound@c06f27cbfe40 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskats
bugs1544895
milestone68.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1544895 - revert back to old bad bounds to pick lesser evil for now. r=kats Differential Revision: https://phabricator.services.mozilla.com/D27965
layout/generic/nsTextFrame.cpp
layout/painting/nsDisplayList.cpp
layout/reftests/bugs/reftest.list
layout/reftests/text-shadow/reftest.list
--- a/layout/generic/nsTextFrame.cpp
+++ b/layout/generic/nsTextFrame.cpp
@@ -5857,17 +5857,17 @@ void nsTextFrame::PaintOneShadow(const P
   nscolor shadowColor =
       aShadowDetails->mColor.CalcColor(aParams.foregroundColor);
 
   if (auto* textDrawer = aParams.context->GetTextDrawer()) {
     wr::Shadow wrShadow;
 
     // Gecko already inflates the bounding rect of text shadows,
     // so tell WR not to inflate again.
-    wrShadow.should_inflate = true;
+    wrShadow.should_inflate = false;
 
     wrShadow.offset = {
         PresContext()->AppUnitsToFloatDevPixels(aShadowDetails->mXOffset),
         PresContext()->AppUnitsToFloatDevPixels(aShadowDetails->mYOffset)};
 
     wrShadow.blur_radius = PresContext()->AppUnitsToFloatDevPixels(blurRadius);
     wrShadow.color = wr::ToColorF(ToDeviceColor(shadowColor));
 
--- a/layout/painting/nsDisplayList.cpp
+++ b/layout/painting/nsDisplayList.cpp
@@ -8962,20 +8962,26 @@ void nsDisplayText::Paint(nsDisplayListB
 bool nsDisplayText::CreateWebRenderCommands(
     mozilla::wr::DisplayListBuilder& aBuilder,
     mozilla::wr::IpcResourceUpdateQueue& aResources,
     const StackingContextHelper& aSc, RenderRootStateManager* aManager,
     nsDisplayListBuilder* aDisplayListBuilder) {
   auto* f = static_cast<nsTextFrame*>(mFrame);
   auto appUnitsPerDevPixel = f->PresContext()->AppUnitsPerDevPixel();
 
-  nsRect bounds = f->WebRenderBounds() + ToReferenceFrame();
+  // FIXME: the webrender backend is having a lot of snapping issues, and
+  // having it do inflation for us is causing problems. For now, we pass
+  // down the wrong bounds. Try to turn this back on when things are in
+  // better shape.
+  //
+  // nsRect bounds = f->WebRenderBounds() + ToReferenceFrame();
   // Bug 748228
-  bounds.Inflate(appUnitsPerDevPixel);
-
+  // bounds.Inflate(appUnitsPerDevPixel);
+
+  nsRect bounds = mBounds;
   if (bounds.IsEmpty()) {
     return true;
   }
 
   gfx::Point deviceOffset =
       LayoutDevicePoint::FromAppUnits(bounds.TopLeft(), appUnitsPerDevPixel)
           .ToUnknownPoint();
 
--- a/layout/reftests/bugs/reftest.list
+++ b/layout/reftests/bugs/reftest.list
@@ -2099,12 +2099,12 @@ fuzzy(0-1,0-625) == 1466638-1.html 14666
 == 1483649-1.xul 1483649-1-ref.xul
 test-pref(layout.css.contain.enabled,true) == 1483946.html 1483946-ref.html
 test-pref(layout.css.visited_links_enabled,false) == 1488155.html 1488155-ref.html
 == 1492660-1.html 1492660-1-ref.html
 pref(layout.css.supports-selector.enabled,true) == 1499386.html 1499386-ref.html
 pref(layout.css.supports-selector.enabled,false) != 1499386.html 1499386-ref.html
 == 1509425-1.html 1509425-1-ref.html
 == 1511570.html 1511570-ref.html
-fuzzy-if(!webrender,1-5,66-547) == 1529992-1.html 1529992-1-ref.html
+fuzzy-if(!webrender,1-5,66-547) fails-if(webrender) == 1529992-1.html 1529992-1-ref.html
 fuzzy-if(!webrender,0-6,0-34) fails-if(webrender) == 1529992-2.html 1529992-2-ref.html
 == 1535040-1.html 1535040-1-ref.html
 skip-if(!asyncPan) == 1544895.html 1544895-ref.html
--- a/layout/reftests/text-shadow/reftest.list
+++ b/layout/reftests/text-shadow/reftest.list
@@ -1,16 +1,16 @@
 == 723669.html 723669-ref.html
 
 == basic.xul basic-ref.xul
 random-if(Android) == basic-negcoord.xul basic-negcoord-ref.xul
 != blur.xul blur-notref.xul
 == color-inherit.xul color-inherit-ref.xul
 == multiple-noblur.xul multiple-noblur-ref.xul
-fuzzy-if(webrender&&gtkWidget,128-128,160-160) == blur-opacity.html blur-opacity-ref.html
+== blur-opacity.html blur-opacity-ref.html
 
 == basic.html basic-ref.html
 == basic-negcoord.html basic-negcoord-ref.html
 == basic-opacity.html basic-opacity-ref.html
 != blur.html blur-notref.html
 == color-inherit.html color-inherit-ref.html
 == color-parserorder.html color-parserorder-ref.html
 == decorations-multiple-zorder.html decorations-multiple-zorder-ref.html