[tbb-commits] [tor-browser/tor-browser-31.1.1esr-4.x-1] Bug 13016: Hide CSS -moz-osx-font-smoothing values.

mikeperry at torproject.org mikeperry at torproject.org
Thu Oct 9 06:54:21 UTC 2014


commit bbc88abb9221a0126668a3d1150a805418c019a7
Author: Kathy Brade <brade at pearlcrescent.com>
Date:   Wed Oct 8 17:13:11 2014 -0400

    Bug 13016: Hide CSS -moz-osx-font-smoothing values.
    
    This patch prevents non-Chrome callers from using getComputedStyle() to
    retrieve values for the -moz-osx-font-smoothing CSS property.  That property
    can be used to detect whether the preference
    layout.css.osx-font-smoothing.enabled is true of false (by default, it is
    true on Mac OS and false elsewhere).
---
 layout/style/nsComputedDOMStyle.cpp |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/layout/style/nsComputedDOMStyle.cpp b/layout/style/nsComputedDOMStyle.cpp
index 1f69934..9099113 100644
--- a/layout/style/nsComputedDOMStyle.cpp
+++ b/layout/style/nsComputedDOMStyle.cpp
@@ -1488,6 +1488,9 @@ nsComputedDOMStyle::DoGetFontSizeAdjust()
 CSSValue*
 nsComputedDOMStyle::DoGetOSXFontSmoothing()
 {
+  if (!nsContentUtils::IsCallerChrome())
+    return nullptr;
+
   nsROCSSPrimitiveValue* val = new nsROCSSPrimitiveValue;
   val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleFont()->mFont.smoothing,
                                                nsCSSProps::kFontSmoothingKTable));





More information about the tbb-commits mailing list