Commit cf0bf486 authored by Kathleen Brade's avatar Kathleen Brade Committed by Mike Perry
Browse files

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).
parent 74d544b5
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -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));