[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser/tor-browser-31.1.1esr-4.x-1] Bug 13016: Hide CSS -moz-osx-font-smoothing values.
commit bbc88abb9221a0126668a3d1150a805418c019a7
Author: Kathy Brade <brade@xxxxxxxxxxxxxxxxx>
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));
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits