From 4125dfc655298acb6adeebe975c7a358cd40e113 Mon Sep 17 00:00:00 2001 From: Gurzau Raul Date: Sun, 26 Aug 2018 00:51:46 +0300 Subject: [PATCH] Backed out changeset 641eedc51cc0 (bug 1453953)for reftest failures on tests/layout/reftests/text-shadow/basic.xul --- layout/base/nsLayoutUtils.cpp | 2 +- layout/reftests/bugs/reftest.list | 4 ++-- layout/xul/nsTextBoxFrame.cpp | 38 ------------------------------- 3 files changed, 3 insertions(+), 41 deletions(-) diff --git a/layout/base/nsLayoutUtils.cpp b/layout/base/nsLayoutUtils.cpp index a97c113f86b9..ee9841af61aa 100644 --- a/layout/base/nsLayoutUtils.cpp +++ b/layout/base/nsLayoutUtils.cpp @@ -6143,7 +6143,7 @@ nsLayoutUtils::PaintTextShadow(const nsIFrame* aFrame, wrShadow.color = wr::ToColorF(ToDeviceColor(shadowColor)); textDrawer->AppendShadow(wrShadow); - continue; + return; } gfxContext* shadowContext = contextBoxBlur.Init(shadowRect, 0, blurRadius, diff --git a/layout/reftests/bugs/reftest.list b/layout/reftests/bugs/reftest.list index 68a49a9edf78..fe670e6452bb 100644 --- a/layout/reftests/bugs/reftest.list +++ b/layout/reftests/bugs/reftest.list @@ -412,7 +412,7 @@ fuzzy-if(Android,0-2,0-18) == 315920-17.html 315920-17-ref.html == 320979-1.html 320979-1-ref.html != 321402-1.html about:blank != 321402-2.html about:blank -== 321402-3.xul 321402-3-ref.xul +fuzzy-if(webrender&&winWidget,35-35,1-1) == 321402-3.xul 321402-3-ref.xul == 321402-4.xul 321402-4-ref.xul == 321402-5.xul 321402-5-ref.xul == 321402-6.xul 321402-6-ref.xul @@ -1002,7 +1002,7 @@ asserts(1) == 418574-2.html 418574-2-ref.html # bug 478135 == 421069-ref.html 421069-ref2.html == 421203-1.xul 421203-1-ref.html == 421203-2.xul 421203-1-ref.html -== 421203-3.xul 321402-3-ref.xul +fuzzy-if(webrender&&winWidget,35-35,1-1) == 421203-3.xul 321402-3-ref.xul == 421203-4.xul 321402-4-ref.xul == 421203-5.xul 321402-5-ref.xul == 421203-6.xul 321402-6-ref.xul diff --git a/layout/xul/nsTextBoxFrame.cpp b/layout/xul/nsTextBoxFrame.cpp index 4c6f645828d0..015e3bc3847f 100644 --- a/layout/xul/nsTextBoxFrame.cpp +++ b/layout/xul/nsTextBoxFrame.cpp @@ -35,8 +35,6 @@ #include "nsLayoutUtils.h" #include "mozilla/Attributes.h" #include "nsUnicodeProperties.h" -#include "mozilla/layers/WebRenderLayerManager.h" -#include "TextDrawTarget.h" #ifdef ACCESSIBILITY #include "nsAccessibilityService.h" @@ -310,12 +308,6 @@ public: void PaintTextToContext(gfxContext* aCtx, nsPoint aOffset, const nscolor* aColor); - - virtual bool CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder, - mozilla::wr::IpcResourceUpdateQueue& aResources, - const StackingContextHelper& aSc, - mozilla::layers::WebRenderLayerManager* aManager, - nsDisplayListBuilder* aDisplayListBuilder) override; }; static void @@ -356,36 +348,6 @@ nsDisplayXULTextBox::PaintTextToContext(gfxContext* aCtx, PaintTitle(*aCtx, GetPaintRect(), ToReferenceFrame() + aOffset, aColor); } -bool -nsDisplayXULTextBox::CreateWebRenderCommands(mozilla::wr::DisplayListBuilder& aBuilder, - mozilla::wr::IpcResourceUpdateQueue& aResources, - const StackingContextHelper& aSc, - mozilla::layers::WebRenderLayerManager* aManager, - nsDisplayListBuilder* aDisplayListBuilder) -{ - - bool snap = false; - auto bounds = GetBounds(aDisplayListBuilder, &snap); - - if (bounds.IsEmpty()) { - return true; - } - - - auto appUnitsPerDevPixel = Frame()->PresContext()->AppUnitsPerDevPixel(); - gfx::Point deviceOffset = LayoutDevicePoint::FromAppUnits( - bounds.TopLeft(), appUnitsPerDevPixel).ToUnknownPoint(); - - RefPtr textDrawer = - new mozilla::layout::TextDrawTarget(aBuilder, aResources, aSc, aManager, this, bounds); - RefPtr captureCtx = gfxContext::CreateOrNull(textDrawer, deviceOffset); - - Paint(aDisplayListBuilder, captureCtx); - textDrawer->TerminateShadows(); - - return !textDrawer->HasUnsupportedFeatures(); -} - nsRect nsDisplayXULTextBox::GetBounds(nsDisplayListBuilder* aBuilder, bool* aSnap) const