mirror of
https://github.com/classilla/tenfourfox.git
synced 2026-04-25 16:18:33 +00:00
#416: M1265568 M1305036
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user