commit bbc88abb9221a0126668a3d1150a805418c019a7 Author: Kathy Brade brade@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));
tbb-commits@lists.torproject.org