зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 7174bdf1201e (bug 857142)
This commit is contained in:
Родитель
c310036f7a
Коммит
66e22f5a1a
|
@ -423,7 +423,7 @@ void nsFont::AddFontFeaturesToStyle(gfxFontStyle *aStyle) const
|
|||
aStyle->featureSettings.AppendElements(fontFeatureSettings);
|
||||
|
||||
// enable grayscale antialiasing for text
|
||||
if (smoothing == NS_FONT_SMOOTHING_GRAYSCALE) {
|
||||
if (smoothing == NS_FONT_SMOOTHING_ANTIALIASED) {
|
||||
aStyle->useGrayscaleAntialiasing = true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#define NS_FONT_STRETCH_ULTRA_EXPANDED 4
|
||||
|
||||
#define NS_FONT_SMOOTHING_AUTO 0
|
||||
#define NS_FONT_SMOOTHING_GRAYSCALE 1
|
||||
#define NS_FONT_SMOOTHING_ANTIALIASED 1
|
||||
|
||||
#define NS_FONT_KERNING_AUTO 0
|
||||
#define NS_FONT_KERNING_NONE 1
|
||||
|
|
|
@ -169,6 +169,7 @@ CSS_KEY(alpha, alpha)
|
|||
CSS_KEY(alternate, alternate)
|
||||
CSS_KEY(alternate-reverse, alternate_reverse)
|
||||
CSS_KEY(always, always)
|
||||
CSS_KEY(antialiased, antialiased)
|
||||
CSS_KEY(annotation, annotation)
|
||||
CSS_KEY(appworkspace, appworkspace)
|
||||
CSS_KEY(armenian, armenian)
|
||||
|
|
|
@ -1761,13 +1761,13 @@ CSS_PROP_FONT(
|
|||
offsetof(nsStyleFont, mFont.sizeAdjust),
|
||||
eStyleAnimType_float)
|
||||
CSS_PROP_FONT(
|
||||
-moz-osx-font-smoothing,
|
||||
osx_font_smoothing,
|
||||
CSS_PROP_DOMPROP_PREFIXED(OSXFontSmoothing),
|
||||
-moz-font-smoothing,
|
||||
font_smoothing,
|
||||
CSS_PROP_DOMPROP_PREFIXED(FontSmoothing),
|
||||
CSS_PROPERTY_PARSE_VALUE |
|
||||
CSS_PROPERTY_APPLIES_TO_FIRST_LETTER_AND_FIRST_LINE |
|
||||
CSS_PROPERTY_APPLIES_TO_PLACEHOLDER,
|
||||
"layout.css.osx-font-smoothing.enabled",
|
||||
"",
|
||||
VARIANT_HK,
|
||||
kFontSmoothingKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
|
|
|
@ -1044,7 +1044,7 @@ const int32_t nsCSSProps::kFontSizeKTable[] = {
|
|||
|
||||
const int32_t nsCSSProps::kFontSmoothingKTable[] = {
|
||||
eCSSKeyword_auto, NS_FONT_SMOOTHING_AUTO,
|
||||
eCSSKeyword_grayscale, NS_FONT_SMOOTHING_GRAYSCALE,
|
||||
eCSSKeyword_antialiased, NS_FONT_SMOOTHING_ANTIALIASED,
|
||||
eCSSKeyword_UNKNOWN,-1
|
||||
};
|
||||
|
||||
|
|
|
@ -1277,7 +1277,7 @@ nsComputedDOMStyle::DoGetFontSizeAdjust()
|
|||
}
|
||||
|
||||
CSSValue*
|
||||
nsComputedDOMStyle::DoGetOSXFontSmoothing()
|
||||
nsComputedDOMStyle::DoGetFontSmoothing()
|
||||
{
|
||||
nsROCSSPrimitiveValue* val = new nsROCSSPrimitiveValue;
|
||||
val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleFont()->mFont.smoothing,
|
||||
|
@ -5142,11 +5142,11 @@ nsComputedDOMStyle::GetQueryablePropertyMap(uint32_t* aLength)
|
|||
COMPUTED_STYLE_MAP_ENTRY(float_edge, FloatEdge),
|
||||
COMPUTED_STYLE_MAP_ENTRY(font_feature_settings, FontFeatureSettings),
|
||||
COMPUTED_STYLE_MAP_ENTRY(font_language_override, FontLanguageOverride),
|
||||
COMPUTED_STYLE_MAP_ENTRY(font_smoothing, FontSmoothing),
|
||||
COMPUTED_STYLE_MAP_ENTRY(force_broken_image_icon, ForceBrokenImageIcon),
|
||||
COMPUTED_STYLE_MAP_ENTRY(hyphens, Hyphens),
|
||||
COMPUTED_STYLE_MAP_ENTRY(image_region, ImageRegion),
|
||||
COMPUTED_STYLE_MAP_ENTRY(orient, Orient),
|
||||
COMPUTED_STYLE_MAP_ENTRY(osx_font_smoothing, OSXFontSmoothing),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(_moz_outline_radius_bottomLeft, OutlineRadiusBottomLeft),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(_moz_outline_radius_bottomRight,OutlineRadiusBottomRight),
|
||||
COMPUTED_STYLE_MAP_ENTRY_LAYOUT(_moz_outline_radius_topLeft, OutlineRadiusTopLeft),
|
||||
|
|
|
@ -194,7 +194,7 @@ private:
|
|||
mozilla::dom::CSSValue* DoGetFontLanguageOverride();
|
||||
mozilla::dom::CSSValue* DoGetFontSize();
|
||||
mozilla::dom::CSSValue* DoGetFontSizeAdjust();
|
||||
mozilla::dom::CSSValue* DoGetOSXFontSmoothing();
|
||||
mozilla::dom::CSSValue* DoGetFontSmoothing();
|
||||
mozilla::dom::CSSValue* DoGetFontStretch();
|
||||
mozilla::dom::CSSValue* DoGetFontStyle();
|
||||
mozilla::dom::CSSValue* DoGetFontSynthesis();
|
||||
|
|
|
@ -3198,7 +3198,7 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext,
|
|||
}
|
||||
|
||||
// font-smoothing: enum, inherit, initial
|
||||
SetDiscrete(*aRuleData->ValueForOSXFontSmoothing(),
|
||||
SetDiscrete(*aRuleData->ValueForFontSmoothing(),
|
||||
aFont->mFont.smoothing, aCanStoreInRuleTree,
|
||||
SETDSC_ENUMERATED,
|
||||
aParentFont->mFont.smoothing,
|
||||
|
|
|
@ -2466,6 +2466,14 @@ var gCSSProperties = {
|
|||
other_values: [ "0.3", "0.5", "0.7" ],
|
||||
invalid_values: []
|
||||
},
|
||||
"-moz-font-smoothing": {
|
||||
domProp: "MozFontSmoothing",
|
||||
inherited: true,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: [ "auto" ],
|
||||
other_values: [ "antialiased" ],
|
||||
invalid_values: [ "none", "subpixel-antialiased" ]
|
||||
},
|
||||
"font-stretch": {
|
||||
domProp: "fontStretch",
|
||||
inherited: true,
|
||||
|
@ -4608,14 +4616,3 @@ if (SpecialPowers.getBoolPref("layout.css.filters.enabled")) {
|
|||
]
|
||||
};
|
||||
}
|
||||
|
||||
if (SpecialPowers.getBoolPref("layout.css.osx-font-smoothing.enabled")) {
|
||||
gCSSProperties["-moz-osx-font-smoothing"] = {
|
||||
domProp: "MozOSXFontSmoothing",
|
||||
inherited: true,
|
||||
type: CSS_TYPE_LONGHAND,
|
||||
initial_values: [ "auto" ],
|
||||
other_values: [ "grayscale" ],
|
||||
invalid_values: [ "none", "subpixel-antialiased", "antialiased" ]
|
||||
};
|
||||
}
|
||||
|
|
|
@ -1812,14 +1812,6 @@ pref("layout.css.scope-pseudo.enabled", true);
|
|||
// Is support for CSS vertical text enabled?
|
||||
pref("layout.css.vertical-text.enabled", false);
|
||||
|
||||
// Is -moz-osx-font-smoothing enabled?
|
||||
// Only supported in OSX builds
|
||||
#ifdef XP_MACOSX
|
||||
pref("layout.css.osx-font-smoothing.enabled", true);
|
||||
#else
|
||||
pref("layout.css.osx-font-smoothing.enabled", false);
|
||||
#endif
|
||||
|
||||
// pref for which side vertical scrollbars should be on
|
||||
// 0 = end-side in UI direction
|
||||
// 1 = end-side in document/content direction
|
||||
|
|
Загрузка…
Ссылка в новой задаче