#416: M1265568 M1305036

This commit is contained in:
Cameron Kaiser
2017-07-18 20:55:41 -07:00
parent 1bc1dd390d
commit 257cfd9290
4 changed files with 42 additions and 0 deletions
+19
View File
@@ -180,6 +180,25 @@ public:
nsLayoutUtils::GetTextShadowRectsUnion(mRect, mFrame);
return mRect.Union(shadowRect);
}
virtual nsRect GetComponentAlphaBounds(nsDisplayListBuilder* aBuilder) override
{
#ifdef XP_MACOSX
{
#else
if (gfxPlatform::GetPlatform()->RespectsFontStyleSmoothing()) {
#endif
// On OS X, web authors can turn off subpixel text rendering using the
// CSS property -moz-osx-font-smoothing. If they do that, we don't need
// to use component alpha layers for the affected text.
if (mFrame->StyleFont()->mFont.smoothing == NS_FONT_SMOOTHING_GRAYSCALE) {
return nsRect();
}
}
bool snap;
return GetBounds(aBuilder, &snap);
}
virtual void Paint(nsDisplayListBuilder* aBuilder,
nsRenderingContext* aCtx) override;