mirror of
https://github.com/classilla/tenfourfox.git
synced 2024-06-14 00:29:43 +00:00
#416: M1265568 M1305036
This commit is contained in:
parent
1bc1dd390d
commit
257cfd9290
|
@ -403,6 +403,12 @@ public:
|
|||
*/
|
||||
virtual bool RequiresLinearZoom() { return false; }
|
||||
|
||||
/**
|
||||
* Whether the frame->StyleFont().mFont.smoothing field is respected by
|
||||
* text rendering on this platform.
|
||||
*/
|
||||
virtual bool RespectsFontStyleSmoothing() const { return false; }
|
||||
|
||||
/**
|
||||
* Whether to check all font cmaps during system font fallback
|
||||
*/
|
||||
|
|
|
@ -100,6 +100,11 @@ public:
|
|||
return true;
|
||||
}
|
||||
|
||||
bool RespectsFontStyleSmoothing() const override {
|
||||
// gfxMacFont respects the font smoothing hint.
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RequiresAcceleratedGLContextForCompositorOGL() const override {
|
||||
// On OS X in a VM, unaccelerated CompositorOGL shows black flashes, so we
|
||||
// require accelerated GL for CompositorOGL but allow unaccelerated GL for
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -4680,6 +4680,18 @@ public:
|
|||
|
||||
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);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user