Backed out changeset 641eedc51cc0 (bug 1453953)for reftest failures on tests/layout/reftests/text-shadow/basic.xul

This commit is contained in:
Gurzau Raul 2018-08-26 00:51:46 +03:00
parent 9f211d76e3
commit 4125dfc655
3 changed files with 3 additions and 41 deletions

View file

@ -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,

View file

@ -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

View file

@ -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<mozilla::layout::TextDrawTarget> textDrawer =
new mozilla::layout::TextDrawTarget(aBuilder, aResources, aSc, aManager, this, bounds);
RefPtr<gfxContext> captureCtx = gfxContext::CreateOrNull(textDrawer, deviceOffset);
Paint(aDisplayListBuilder, captureCtx);
textDrawer->TerminateShadows();
return !textDrawer->HasUnsupportedFeatures();
}
nsRect
nsDisplayXULTextBox::GetBounds(nsDisplayListBuilder* aBuilder,
bool* aSnap) const