зеркало из https://github.com/mozilla/gecko-dev.git
Backed out changeset 31a1b6fff957 (bug 857142) for reftest failures
This commit is contained in:
Родитель
a15c073bba
Коммит
7ae47f2c55
|
@ -22,7 +22,6 @@ nsFont::nsFont(const char* aName, uint8_t aStyle, uint8_t aVariant,
|
|||
weight = aWeight;
|
||||
stretch = aStretch;
|
||||
decorations = aDecoration;
|
||||
smoothing = NS_FONT_SMOOTHING_AUTO;
|
||||
size = aSize;
|
||||
sizeAdjust = 0.0;
|
||||
kerning = NS_FONT_KERNING_AUTO;
|
||||
|
@ -47,7 +46,6 @@ nsFont::nsFont(const nsSubstring& aName, uint8_t aStyle, uint8_t aVariant,
|
|||
weight = aWeight;
|
||||
stretch = aStretch;
|
||||
decorations = aDecoration;
|
||||
smoothing = NS_FONT_SMOOTHING_AUTO;
|
||||
size = aSize;
|
||||
sizeAdjust = 0.0;
|
||||
kerning = NS_FONT_KERNING_AUTO;
|
||||
|
@ -70,7 +68,6 @@ nsFont::nsFont(const nsFont& aOther)
|
|||
weight = aOther.weight;
|
||||
stretch = aOther.stretch;
|
||||
decorations = aOther.decorations;
|
||||
smoothing = aOther.smoothing;
|
||||
size = aOther.size;
|
||||
sizeAdjust = aOther.sizeAdjust;
|
||||
kerning = aOther.kerning;
|
||||
|
@ -125,8 +122,7 @@ bool nsFont::Equals(const nsFont& aOther) const
|
|||
{
|
||||
if (BaseEquals(aOther) &&
|
||||
(variant == aOther.variant) &&
|
||||
(decorations == aOther.decorations) &&
|
||||
(smoothing == aOther.smoothing)) {
|
||||
(decorations == aOther.decorations)) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -141,7 +137,6 @@ nsFont& nsFont::operator=(const nsFont& aOther)
|
|||
weight = aOther.weight;
|
||||
stretch = aOther.stretch;
|
||||
decorations = aOther.decorations;
|
||||
smoothing = aOther.smoothing;
|
||||
size = aOther.size;
|
||||
sizeAdjust = aOther.sizeAdjust;
|
||||
kerning = aOther.kerning;
|
||||
|
@ -421,11 +416,6 @@ void nsFont::AddFontFeaturesToStyle(gfxFontStyle *aStyle) const
|
|||
|
||||
// add in features from font-feature-settings
|
||||
aStyle->featureSettings.AppendElements(fontFeatureSettings);
|
||||
|
||||
// enable grayscale antialiasing for text
|
||||
if (smoothing == NS_FONT_SMOOTHING_ANTIALIASED) {
|
||||
aStyle->useGrayscaleAntialiasing = true;
|
||||
}
|
||||
}
|
||||
|
||||
static bool FontEnumCallback(const nsString& aFamily, bool aGeneric, void *aData)
|
||||
|
|
|
@ -71,9 +71,6 @@ struct NS_GFX nsFont {
|
|||
// line-through). The decorations can be binary or'd together.
|
||||
uint8_t decorations;
|
||||
|
||||
// Smoothing - controls subpixel-antialiasing (currently OSX only)
|
||||
uint8_t smoothing;
|
||||
|
||||
// The weight of the font; see gfxFontConstants.h.
|
||||
uint16_t weight;
|
||||
|
||||
|
|
|
@ -5012,7 +5012,7 @@ gfxFontStyle::gfxFontStyle() :
|
|||
size(DEFAULT_PIXEL_FONT_SIZE), sizeAdjust(0.0f),
|
||||
languageOverride(NO_FONT_LANGUAGE_OVERRIDE),
|
||||
weight(NS_FONT_WEIGHT_NORMAL), stretch(NS_FONT_STRETCH_NORMAL),
|
||||
systemFont(true), printerFont(false), useGrayscaleAntialiasing(false),
|
||||
systemFont(true), printerFont(false),
|
||||
style(NS_FONT_STYLE_NORMAL)
|
||||
{
|
||||
}
|
||||
|
@ -5027,7 +5027,7 @@ gfxFontStyle::gfxFontStyle(uint8_t aStyle, uint16_t aWeight, int16_t aStretch,
|
|||
languageOverride(ParseFontLanguageOverride(aLanguageOverride)),
|
||||
weight(aWeight), stretch(aStretch),
|
||||
systemFont(aSystemFont), printerFont(aPrinterFont),
|
||||
useGrayscaleAntialiasing(false), style(aStyle)
|
||||
style(aStyle)
|
||||
{
|
||||
MOZ_ASSERT(!mozilla::IsNaN(size));
|
||||
MOZ_ASSERT(!mozilla::IsNaN(sizeAdjust));
|
||||
|
@ -5058,7 +5058,6 @@ gfxFontStyle::gfxFontStyle(const gfxFontStyle& aStyle) :
|
|||
languageOverride(aStyle.languageOverride),
|
||||
weight(aStyle.weight), stretch(aStyle.stretch),
|
||||
systemFont(aStyle.systemFont), printerFont(aStyle.printerFont),
|
||||
useGrayscaleAntialiasing(aStyle.useGrayscaleAntialiasing),
|
||||
style(aStyle.style)
|
||||
{
|
||||
featureSettings.AppendElements(aStyle.featureSettings);
|
||||
|
|
|
@ -127,9 +127,6 @@ struct gfxFontStyle {
|
|||
// Say that this font is used for print or print preview.
|
||||
bool printerFont : 1;
|
||||
|
||||
// Used to imitate -webkit-font-smoothing: antialiased
|
||||
bool useGrayscaleAntialiasing : 1;
|
||||
|
||||
// The style of font (normal, italic, oblique)
|
||||
uint8_t style : 2;
|
||||
|
||||
|
@ -156,7 +153,6 @@ struct gfxFontStyle {
|
|||
(style == other.style) &&
|
||||
(systemFont == other.systemFont) &&
|
||||
(printerFont == other.printerFont) &&
|
||||
(useGrayscaleAntialiasing == other.useGrayscaleAntialiasing) &&
|
||||
(weight == other.weight) &&
|
||||
(stretch == other.stretch) &&
|
||||
(language == other.language) &&
|
||||
|
|
|
@ -30,9 +30,6 @@
|
|||
#define NS_FONT_STRETCH_EXTRA_EXPANDED 3
|
||||
#define NS_FONT_STRETCH_ULTRA_EXPANDED 4
|
||||
|
||||
#define NS_FONT_SMOOTHING_AUTO 0
|
||||
#define NS_FONT_SMOOTHING_ANTIALIASED 1
|
||||
|
||||
#define NS_FONT_KERNING_AUTO 0
|
||||
#define NS_FONT_KERNING_NONE 1
|
||||
#define NS_FONT_KERNING_NORMAL 2
|
||||
|
|
|
@ -84,8 +84,6 @@ gfxMacFont::gfxMacFont(MacOSFontEntry *aFontEntry, const gfxFontStyle *aFontStyl
|
|||
if (mAdjustedSize <=
|
||||
(gfxFloat)gfxPlatformMac::GetPlatform()->GetAntiAliasingThreshold()) {
|
||||
cairo_font_options_set_antialias(fontOptions, CAIRO_ANTIALIAS_NONE);
|
||||
} else if (mStyle.useGrayscaleAntialiasing) {
|
||||
cairo_font_options_set_antialias(fontOptions, CAIRO_ANTIALIAS_GRAY);
|
||||
}
|
||||
|
||||
mScaledFont = cairo_scaled_font_create(mFontFace, &sizeMatrix, &ctm,
|
||||
|
|
|
@ -169,7 +169,6 @@ 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)
|
||||
|
|
|
@ -1760,18 +1760,6 @@ CSS_PROP_FONT(
|
|||
nullptr,
|
||||
offsetof(nsStyleFont, mFont.sizeAdjust),
|
||||
eStyleAnimType_float)
|
||||
CSS_PROP_FONT(
|
||||
-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,
|
||||
"",
|
||||
VARIANT_HK,
|
||||
kFontSmoothingKTable,
|
||||
CSS_PROP_NO_OFFSET,
|
||||
eStyleAnimType_None)
|
||||
CSS_PROP_FONT(
|
||||
font-stretch,
|
||||
font_stretch,
|
||||
|
|
|
@ -1042,12 +1042,6 @@ const int32_t nsCSSProps::kFontSizeKTable[] = {
|
|||
eCSSKeyword_UNKNOWN,-1
|
||||
};
|
||||
|
||||
const int32_t nsCSSProps::kFontSmoothingKTable[] = {
|
||||
eCSSKeyword_auto, NS_FONT_SMOOTHING_AUTO,
|
||||
eCSSKeyword_antialiased, NS_FONT_SMOOTHING_ANTIALIASED,
|
||||
eCSSKeyword_UNKNOWN,-1
|
||||
};
|
||||
|
||||
const int32_t nsCSSProps::kFontStretchKTable[] = {
|
||||
eCSSKeyword_ultra_condensed, NS_STYLE_FONT_STRETCH_ULTRA_CONDENSED,
|
||||
eCSSKeyword_extra_condensed, NS_STYLE_FONT_STRETCH_EXTRA_CONDENSED,
|
||||
|
|
|
@ -481,7 +481,6 @@ public:
|
|||
static const int32_t kFontKTable[];
|
||||
static const int32_t kFontKerningKTable[];
|
||||
static const int32_t kFontSizeKTable[];
|
||||
static const int32_t kFontSmoothingKTable[];
|
||||
static const int32_t kFontStretchKTable[];
|
||||
static const int32_t kFontStyleKTable[];
|
||||
static const int32_t kFontSynthesisKTable[];
|
||||
|
|
|
@ -1276,15 +1276,6 @@ nsComputedDOMStyle::DoGetFontSizeAdjust()
|
|||
return val;
|
||||
}
|
||||
|
||||
CSSValue*
|
||||
nsComputedDOMStyle::DoGetFontSmoothing()
|
||||
{
|
||||
nsROCSSPrimitiveValue* val = new nsROCSSPrimitiveValue;
|
||||
val->SetIdent(nsCSSProps::ValueToKeywordEnum(StyleFont()->mFont.smoothing,
|
||||
nsCSSProps::kFontSmoothingKTable));
|
||||
return val;
|
||||
}
|
||||
|
||||
CSSValue*
|
||||
nsComputedDOMStyle::DoGetFontStretch()
|
||||
{
|
||||
|
@ -5142,7 +5133,6 @@ 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),
|
||||
|
|
|
@ -194,7 +194,6 @@ private:
|
|||
mozilla::dom::CSSValue* DoGetFontLanguageOverride();
|
||||
mozilla::dom::CSSValue* DoGetFontSize();
|
||||
mozilla::dom::CSSValue* DoGetFontSizeAdjust();
|
||||
mozilla::dom::CSSValue* DoGetFontSmoothing();
|
||||
mozilla::dom::CSSValue* DoGetFontStretch();
|
||||
mozilla::dom::CSSValue* DoGetFontStyle();
|
||||
mozilla::dom::CSSValue* DoGetFontSynthesis();
|
||||
|
|
|
@ -3197,14 +3197,6 @@ nsRuleNode::SetFont(nsPresContext* aPresContext, nsStyleContext* aContext,
|
|||
aFont->mGenericID = aGenericFontID;
|
||||
}
|
||||
|
||||
// font-smoothing: enum, inherit, initial
|
||||
SetDiscrete(*aRuleData->ValueForFontSmoothing(),
|
||||
aFont->mFont.smoothing, aCanStoreInRuleTree,
|
||||
SETDSC_ENUMERATED,
|
||||
aParentFont->mFont.smoothing,
|
||||
defaultVariableFont->smoothing,
|
||||
0, 0, 0, 0);
|
||||
|
||||
// font-style: enum, inherit, initial, -moz-system-font
|
||||
SetDiscrete(*aRuleData->ValueForFontStyle(),
|
||||
aFont->mFont.style, aCanStoreInRuleTree,
|
||||
|
|
|
@ -215,7 +215,6 @@ nsChangeHint nsStyleFont::CalcFontDifference(const nsFont& aFont1, const nsFont&
|
|||
(aFont1.variant == aFont2.variant) &&
|
||||
(aFont1.weight == aFont2.weight) &&
|
||||
(aFont1.stretch == aFont2.stretch) &&
|
||||
(aFont1.smoothing == aFont2.smoothing) &&
|
||||
(aFont1.name == aFont2.name) &&
|
||||
(aFont1.kerning == aFont2.kerning) &&
|
||||
(aFont1.synthesis == aFont2.synthesis) &&
|
||||
|
|
|
@ -2466,14 +2466,6 @@ 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,
|
||||
|
|
Загрузка…
Ссылка в новой задаче