Changeset 104786 in webkit
- Timestamp:
- Jan 11, 2012 8:10:01 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 added
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LayoutTests/ChangeLog
r104785 r104786 1 2012-01-11 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/10679035> Implement font-variant-ligatures: {no-}common-ligatures 4 https://bugs.webkit.org/show_bug.cgi?id=76103 5 6 Reviewed by Sam Weinig. 7 8 * fast/css/getComputedStyle/computed-style-expected.txt: 9 * fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: 10 * fast/css/parsing-font-variant-ligatures.html: Added. 11 * fast/text/font-variant-ligatures-expected.html: Added. 12 * fast/text/font-variant-ligatures.html: Added. 13 * platform/chromium-mac-snowleopard/svg/css/getComputedStyle-basic-expected.txt: 14 * platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt: 15 * platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: 16 * platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt: 17 * platform/gtk/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: 18 * platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: 19 * platform/qt/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt: 20 * svg/css/getComputedStyle-basic-expected.txt: 21 1 22 2012-01-11 Tony Chang <tony@chromium.org> 2 23 -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-expected.txt
r104678 r104786 151 151 -webkit-font-kerning: auto; 152 152 -webkit-font-smoothing: auto; 153 -webkit-font-variant-ligatures: normal; 153 154 -webkit-highlight: none; 154 155 -webkit-hyphenate-character: auto; -
trunk/LayoutTests/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r102870 r104786 147 147 -webkit-flex-flow: row nowrap 148 148 -webkit-font-smoothing: auto 149 -webkit-font-variant-ligatures: normal 149 150 -webkit-highlight: none 150 151 -webkit-hyphenate-character: auto -
trunk/LayoutTests/platform/chromium-mac-snowleopard/svg/css/getComputedStyle-basic-expected.txt
r104689 r104786 299 299 rect: style.getPropertyValue(-webkit-font-smoothing) : auto 300 300 rect: style.getPropertyCSSValue(-webkit-font-smoothing) : [object CSSPrimitiveValue] 301 rect: style.getPropertyValue(-webkit-font-variant-ligatures) : normal 302 rect: style.getPropertyCSSValue(-webkit-font-variant-ligatures) : [object CSSPrimitiveValue] 301 303 rect: style.getPropertyValue(-webkit-highlight) : none 302 304 rect: style.getPropertyCSSValue(-webkit-highlight) : [object CSSPrimitiveValue] … … 809 811 g: style.getPropertyValue(-webkit-font-smoothing) : auto 810 812 g: style.getPropertyCSSValue(-webkit-font-smoothing) : [object CSSPrimitiveValue] 813 g: style.getPropertyValue(-webkit-font-variant-ligatures) : normal 814 g: style.getPropertyCSSValue(-webkit-font-variant-ligatures) : [object CSSPrimitiveValue] 811 815 g: style.getPropertyValue(-webkit-highlight) : none 812 816 g: style.getPropertyCSSValue(-webkit-highlight) : [object CSSPrimitiveValue] -
trunk/LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-expected.txt
r104685 r104786 151 151 -webkit-font-kerning: auto; 152 152 -webkit-font-smoothing: auto; 153 -webkit-font-variant-ligatures: normal; 153 154 -webkit-highlight: none; 154 155 -webkit-hyphenate-character: auto; -
trunk/LayoutTests/platform/chromium-win/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r104678 r104786 150 150 -webkit-font-kerning: auto 151 151 -webkit-font-smoothing: auto 152 -webkit-font-variant-ligatures: normal 152 153 -webkit-highlight: none 153 154 -webkit-hyphenate-character: auto -
trunk/LayoutTests/platform/chromium-win/svg/css/getComputedStyle-basic-expected.txt
r104678 r104786 299 299 rect: style.getPropertyValue(-webkit-font-smoothing) : auto 300 300 rect: style.getPropertyCSSValue(-webkit-font-smoothing) : [object CSSPrimitiveValue] 301 rect: style.getPropertyValue(-webkit-font-variant-ligatures) : normal 302 rect: style.getPropertyCSSValue(-webkit-font-variant-ligatures) : [object CSSPrimitiveValue] 301 303 rect: style.getPropertyValue(-webkit-highlight) : none 302 304 rect: style.getPropertyCSSValue(-webkit-highlight) : [object CSSPrimitiveValue] … … 809 811 g: style.getPropertyValue(-webkit-font-smoothing) : auto 810 812 g: style.getPropertyCSSValue(-webkit-font-smoothing) : [object CSSPrimitiveValue] 813 g: style.getPropertyValue(-webkit-font-variant-ligatures) : normal 814 g: style.getPropertyCSSValue(-webkit-font-variant-ligatures) : [object CSSPrimitiveValue] 811 815 g: style.getPropertyValue(-webkit-highlight) : none 812 816 g: style.getPropertyCSSValue(-webkit-highlight) : [object CSSPrimitiveValue] -
trunk/LayoutTests/platform/gtk/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r104697 r104786 150 150 -webkit-font-kerning: auto 151 151 -webkit-font-smoothing: auto 152 -webkit-font-variant-ligatures: normal 152 153 -webkit-highlight: none 153 154 -webkit-hyphenate-character: auto -
trunk/LayoutTests/platform/mac/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r104678 r104786 150 150 -webkit-font-kerning: auto 151 151 -webkit-font-smoothing: auto 152 -webkit-font-variant-ligatures: normal 152 153 -webkit-highlight: none 153 154 -webkit-hyphenate-character: auto -
trunk/LayoutTests/platform/qt/fast/css/getComputedStyle/computed-style-without-renderer-expected.txt
r104678 r104786 150 150 -webkit-font-kerning: auto 151 151 -webkit-font-smoothing: auto 152 -webkit-font-variant-ligatures: normal 152 153 -webkit-highlight: none 153 154 -webkit-hyphenate-character: auto -
trunk/LayoutTests/svg/css/getComputedStyle-basic-expected.txt
r104696 r104786 299 299 rect: style.getPropertyValue(-webkit-font-smoothing) : auto 300 300 rect: style.getPropertyCSSValue(-webkit-font-smoothing) : [object CSSPrimitiveValue] 301 rect: style.getPropertyValue(-webkit-font-variant-ligatures) : normal 302 rect: style.getPropertyCSSValue(-webkit-font-variant-ligatures) : [object CSSPrimitiveValue] 301 303 rect: style.getPropertyValue(-webkit-highlight) : none 302 304 rect: style.getPropertyCSSValue(-webkit-highlight) : [object CSSPrimitiveValue] … … 809 811 g: style.getPropertyValue(-webkit-font-smoothing) : auto 810 812 g: style.getPropertyCSSValue(-webkit-font-smoothing) : [object CSSPrimitiveValue] 813 g: style.getPropertyValue(-webkit-font-variant-ligatures) : normal 814 g: style.getPropertyCSSValue(-webkit-font-variant-ligatures) : [object CSSPrimitiveValue] 811 815 g: style.getPropertyValue(-webkit-highlight) : none 812 816 g: style.getPropertyCSSValue(-webkit-highlight) : [object CSSPrimitiveValue] -
trunk/Source/WebCore/ChangeLog
r104782 r104786 1 2012-01-11 Dan Bernstein <mitz@apple.com> 2 3 <rdar://problem/10679035> Implement font-variant-ligatures: {no-}common-ligatures 4 https://bugs.webkit.org/show_bug.cgi?id=76103 5 6 Reviewed by Sam Weinig. 7 8 Tests: fast/css/parsing-font-variant-ligatures.html 9 fast/text/font-variant-ligatures-expected.html 10 fast/text/font-variant-ligatures.html 11 12 Added support for all font-variant-ligatures values in the style system and in 13 FontDescription, and made the {no-}common-ligatures value keywords control basic ligatures. 14 The {no-}{discretionary,historical}-ligatures keywords have no effect on rendering at this 15 time. 16 17 font-variant-ligatures was not made part of the font shorthand property. 18 19 * css/CSSComputedStyleDeclaration.cpp: 20 (WebCore::CSSComputedStyleDeclaration::getPropertyCSSValue): Added code to handle 21 font-variant-ligatures. 22 * css/CSSParser.cpp: 23 (WebCore::CSSParser::parseValue): Added code to handle font-variant-ligatures. 24 (WebCore::CSSParser::parseFontVariantLigatures): Added. Parses font-variant-ligatures. 25 * css/CSSParser.h: 26 * css/CSSProperty.cpp: 27 (WebCore::CSSProperty::isInheritedProperty): Added font-variant-ligatures to the set of 28 inherited properties. 29 * css/CSSPropertyNames.in: Added -webkit-font-variant-ligatures. 30 * css/CSSStyleApplyProperty.cpp: 31 (WebCore::ApplyPropertyFontVariantLigatures::applyInheritValue): Added. Copies 32 {common,discretionary,historical}LigaturesState from the parent style font description. 33 (WebCore::ApplyPropertyFontVariantLigatures::applyInitialValue): Added. Sets 34 {common,discretionary,historical}LigaturesState to normal. 35 (WebCore::ApplyPropertyFontVariantLigatures::applyValue): Added. 36 (WebCore::ApplyPropertyFontVariantLigatures::createHandler): Added. 37 (WebCore::CSSStyleApplyProperty::CSSStyleApplyProperty): Added a handler for 38 font-variant-ligatures. 39 * css/CSSStyleSelector.cpp: 40 (WebCore::CSSStyleSelector::applyDeclaration): Updated for the number of properties that 41 affect the font. 42 (WebCore::CSSStyleSelector::applyProperty): Added CSSPropertyWebkitFontVariantLigatures to 43 the switch statement, which needs to list all values in SVG-disabled builds. 44 * css/CSSValueKeywords.in: Added the value keywords 45 {no-}{common,discretionary,historical}-ligatures. 46 * platform/graphics/Font.h: 47 (WebCore::Font::typesettingFeatures): Changed to enable ligatures if common ligatures are 48 enabled in the font description, disable them if they are disabled, and leave them to the 49 default (determined by the text-rendering property) if they are in the normal state. 50 * platform/graphics/FontDescription.h: 51 (WebCore::FontDescription::FontDescription): Added initializers. 52 (WebCore::FontDescription::commonLigaturesState): Added this accessor. 53 (WebCore::FontDescription::discretionaryLigaturesState): Ditto. 54 (WebCore::FontDescription::historicalLigaturesState): Ditto. 55 (WebCore::FontDescription::setCommonLigaturesState): Ditto. 56 (WebCore::FontDescription::setDiscretionaryLigaturesState): Ditto. 57 (WebCore::FontDescription::setHistoricalLigaturesState): Ditto. 58 (WebCore::FontDescription::operator==): Updated to compare the ligatures state members. 59 1 60 2012-01-11 Adrienne Walker <enne@google.com> 2 61 -
trunk/Source/WebCore/css/CSSComputedStyleDeclaration.cpp
r104702 r104786 225 225 CSSPropertyWebkitFontKerning, 226 226 CSSPropertyWebkitFontSmoothing, 227 CSSPropertyWebkitFontVariantLigatures, 227 228 #if ENABLE(CSS_GRID_LAYOUT) 228 229 CSSPropertyWebkitGridColumns, … … 1876 1877 case CSSPropertyWebkitFontSmoothing: 1877 1878 return cssValuePool->createValue(style->fontDescription().fontSmoothing()); 1879 case CSSPropertyWebkitFontVariantLigatures: { 1880 FontDescription::LigaturesState commonLigaturesState = style->fontDescription().commonLigaturesState(); 1881 FontDescription::LigaturesState discretionaryLigaturesState = style->fontDescription().discretionaryLigaturesState(); 1882 FontDescription::LigaturesState historicalLigaturesState = style->fontDescription().historicalLigaturesState(); 1883 if (commonLigaturesState == FontDescription::NormalLigaturesState && discretionaryLigaturesState == FontDescription::NormalLigaturesState 1884 && historicalLigaturesState == FontDescription::NormalLigaturesState) 1885 return cssValuePool->createIdentifierValue(CSSValueNormal); 1886 1887 RefPtr<CSSValueList> valueList = CSSValueList::createSpaceSeparated(); 1888 if (commonLigaturesState != FontDescription::NormalLigaturesState) 1889 valueList->append(cssValuePool->createIdentifierValue(commonLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoCommonLigatures : CSSValueCommonLigatures)); 1890 if (discretionaryLigaturesState != FontDescription::NormalLigaturesState) 1891 valueList->append(cssValuePool->createIdentifierValue(discretionaryLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoDiscretionaryLigatures : CSSValueDiscretionaryLigatures)); 1892 if (historicalLigaturesState != FontDescription::NormalLigaturesState) 1893 valueList->append(cssValuePool->createIdentifierValue(historicalLigaturesState == FontDescription::DisabledLigaturesState ? CSSValueNoHistoricalLigatures : CSSValueHistoricalLigatures)); 1894 return valueList; 1895 } 1878 1896 case CSSPropertyZIndex: 1879 1897 if (style->hasAutoZIndex()) -
trunk/Source/WebCore/css/CSSParser.cpp
r104688 r104786 2232 2232 if (id == CSSValueAuto || id == CSSValueNormal || id == CSSValueNone) 2233 2233 validPrimitive = true; 2234 break; 2235 2236 case CSSPropertyWebkitFontVariantLigatures: 2237 if (id == CSSValueNormal) 2238 validPrimitive = true; 2239 else 2240 return parseFontVariantLigatures(important); 2234 2241 break; 2235 2242 … … 7228 7235 } 7229 7236 7237 bool CSSParser::parseFontVariantLigatures(bool important) 7238 { 7239 RefPtr<CSSValueList> ligatureValues = CSSValueList::createSpaceSeparated(); 7240 bool sawCommonLigaturesValue = false; 7241 bool sawDiscretionaryLigaturesValue = false; 7242 bool sawHistoricalLigaturesValue = false; 7243 7244 for (CSSParserValue* value = m_valueList->current(); value; value = m_valueList->next()) { 7245 if (value->unit != CSSPrimitiveValue::CSS_IDENT) 7246 return false; 7247 7248 switch (value->id) { 7249 case CSSValueNoCommonLigatures: 7250 case CSSValueCommonLigatures: 7251 if (sawCommonLigaturesValue) 7252 return false; 7253 sawCommonLigaturesValue = true; 7254 ligatureValues->append(cssValuePool()->createIdentifierValue(value->id)); 7255 break; 7256 case CSSValueNoDiscretionaryLigatures: 7257 case CSSValueDiscretionaryLigatures: 7258 if (sawDiscretionaryLigaturesValue) 7259 return false; 7260 sawDiscretionaryLigaturesValue = true; 7261 ligatureValues->append(cssValuePool()->createIdentifierValue(value->id)); 7262 break; 7263 case CSSValueNoHistoricalLigatures: 7264 case CSSValueHistoricalLigatures: 7265 if (sawHistoricalLigaturesValue) 7266 return false; 7267 sawHistoricalLigaturesValue = true; 7268 ligatureValues->append(cssValuePool()->createIdentifierValue(value->id)); 7269 break; 7270 default: 7271 return false; 7272 } 7273 } 7274 7275 if (!ligatureValues->length()) 7276 return false; 7277 7278 addProperty(CSSPropertyWebkitFontVariantLigatures, ligatureValues.release(), important); 7279 return true; 7280 } 7281 7230 7282 static inline int yyerror(const char*) { return 1; } 7231 7283 -
trunk/Source/WebCore/css/CSSParser.h
r103692 r104786 219 219 bool parseRegionThread(int propId, bool important); 220 220 221 bool parseFontVariantLigatures(bool important); 222 221 223 int yyparse(); 222 224 -
trunk/Source/WebCore/css/CSSProperty.cpp
r104678 r104786 321 321 case CSSPropertyWebkitFontKerning: 322 322 case CSSPropertyWebkitFontSmoothing: 323 case CSSPropertyWebkitFontVariantLigatures: 323 324 case CSSPropertyWebkitLocale: 324 325 case CSSPropertyWebkitHighlight: -
trunk/Source/WebCore/css/CSSPropertyNames.in
r104678 r104786 24 24 -webkit-font-kerning 25 25 -webkit-font-smoothing 26 -webkit-font-variant-ligatures 26 27 -webkit-locale 27 28 -webkit-text-orientation -
trunk/Source/WebCore/css/CSSStyleApplyProperty.cpp
r104678 r104786 722 722 PropertyHandler handler = ApplyPropertyFont<FontWeight, &FontDescription::weight, &FontDescription::setWeight, FontWeightNormal>::createHandler(); 723 723 return PropertyHandler(handler.inheritFunction(), handler.initialFunction(), &applyValue); 724 } 725 }; 726 727 class ApplyPropertyFontVariantLigatures { 728 public: 729 static void applyInheritValue(CSSStyleSelector* selector) 730 { 731 const FontDescription& parentFontDescription = selector->parentFontDescription(); 732 FontDescription fontDescription = selector->fontDescription(); 733 734 fontDescription.setCommonLigaturesState(parentFontDescription.commonLigaturesState()); 735 fontDescription.setDiscretionaryLigaturesState(parentFontDescription.discretionaryLigaturesState()); 736 fontDescription.setHistoricalLigaturesState(parentFontDescription.historicalLigaturesState()); 737 738 selector->setFontDescription(fontDescription); 739 } 740 741 static void applyInitialValue(CSSStyleSelector* selector) 742 { 743 FontDescription fontDescription = selector->fontDescription(); 744 745 fontDescription.setCommonLigaturesState(FontDescription::NormalLigaturesState); 746 fontDescription.setDiscretionaryLigaturesState(FontDescription::NormalLigaturesState); 747 fontDescription.setHistoricalLigaturesState(FontDescription::NormalLigaturesState); 748 749 selector->setFontDescription(fontDescription); 750 } 751 752 static void applyValue(CSSStyleSelector* selector, CSSValue* value) 753 { 754 FontDescription::LigaturesState commonLigaturesState = FontDescription::NormalLigaturesState; 755 FontDescription::LigaturesState discretionaryLigaturesState = FontDescription::NormalLigaturesState; 756 FontDescription::LigaturesState historicalLigaturesState = FontDescription::NormalLigaturesState; 757 758 if (value->isValueList()) { 759 CSSValueList* valueList = static_cast<CSSValueList*>(value); 760 for (size_t i = 0; i < valueList->length(); ++i) { 761 CSSValue* item = valueList->itemWithoutBoundsCheck(i); 762 ASSERT(item->isPrimitiveValue()); 763 if (item->isPrimitiveValue()) { 764 CSSPrimitiveValue* primitiveValue = static_cast<CSSPrimitiveValue*>(item); 765 switch (primitiveValue->getIdent()) { 766 case CSSValueNoCommonLigatures: 767 commonLigaturesState = FontDescription::DisabledLigaturesState; 768 break; 769 case CSSValueCommonLigatures: 770 commonLigaturesState = FontDescription::EnabledLigaturesState; 771 break; 772 case CSSValueNoDiscretionaryLigatures: 773 discretionaryLigaturesState = FontDescription::DisabledLigaturesState; 774 break; 775 case CSSValueDiscretionaryLigatures: 776 discretionaryLigaturesState = FontDescription::EnabledLigaturesState; 777 break; 778 case CSSValueNoHistoricalLigatures: 779 historicalLigaturesState = FontDescription::DisabledLigaturesState; 780 break; 781 case CSSValueHistoricalLigatures: 782 historicalLigaturesState = FontDescription::EnabledLigaturesState; 783 break; 784 default: 785 ASSERT_NOT_REACHED(); 786 break; 787 } 788 } 789 } 790 } 791 #if !ASSERT_DISABLED 792 else { 793 ASSERT(value->isPrimitiveValue()); 794 ASSERT(static_cast<CSSPrimitiveValue*>(value)->getIdent() == CSSValueNormal); 795 } 796 #endif 797 798 FontDescription fontDescription = selector->fontDescription(); 799 fontDescription.setCommonLigaturesState(commonLigaturesState); 800 fontDescription.setDiscretionaryLigaturesState(discretionaryLigaturesState); 801 fontDescription.setHistoricalLigaturesState(historicalLigaturesState); 802 selector->setFontDescription(fontDescription); 803 } 804 805 static PropertyHandler createHandler() 806 { 807 return PropertyHandler(&applyInheritValue, &applyInitialValue, &applyValue); 724 808 } 725 809 }; … … 1685 1769 setPropertyHandler(CSSPropertyWebkitFontSmoothing, ApplyPropertyFont<FontSmoothingMode, &FontDescription::fontSmoothing, &FontDescription::setFontSmoothing, AutoSmoothing>::createHandler()); 1686 1770 setPropertyHandler(CSSPropertyWebkitTextOrientation, ApplyPropertyFont<TextOrientation, &FontDescription::textOrientation, &FontDescription::setTextOrientation, TextOrientationVerticalRight>::createHandler()); 1771 setPropertyHandler(CSSPropertyWebkitFontVariantLigatures, ApplyPropertyFontVariantLigatures::createHandler()); 1687 1772 setPropertyHandler(CSSPropertyFontWeight, ApplyPropertyFontWeight::createHandler()); 1688 1773 -
trunk/Source/WebCore/css/CSSStyleSelector.cpp
r104726 r104786 2229 2229 if (applyFirst) { 2230 2230 COMPILE_ASSERT(firstCSSProperty == CSSPropertyColor, CSS_color_is_first_property); 2231 COMPILE_ASSERT(CSSPropertyZoom == CSSPropertyColor + 1 7, CSS_zoom_is_end_of_first_prop_range);2231 COMPILE_ASSERT(CSSPropertyZoom == CSSPropertyColor + 18, CSS_zoom_is_end_of_first_prop_range); 2232 2232 COMPILE_ASSERT(CSSPropertyLineHeight == CSSPropertyZoom + 1, CSS_line_height_is_after_zoom); 2233 2233 // give special priority to font-xxx, color properties, etc … … 3815 3815 case CSSPropertyWebkitFlowFrom: 3816 3816 case CSSPropertyWebkitFontKerning: 3817 case CSSPropertyWebkitFontVariantLigatures: 3817 3818 case CSSPropertyWebkitHighlight: 3818 3819 case CSSPropertyWebkitHyphenateCharacter: -
trunk/Source/WebCore/css/CSSValueKeywords.in
r102486 r104786 53 53 //normal 54 54 small-caps 55 56 // -webkit-font-variant-ligatures: 57 // 58 // normal 59 common-ligatures 60 no-common-ligatures 61 discretionary-ligatures 62 no-discretionary-ligatures 63 historical-ligatures 64 no-historical-ligatures 65 55 66 // 56 67 // CSS_PROP_FONT_WEIGHT: -
trunk/Source/WebCore/platform/graphics/Font.h
r104683 r104786 130 130 } 131 131 132 switch (m_fontDescription.commonLigaturesState()) { 133 case FontDescription::DisabledLigaturesState: 134 features &= ~Ligatures; 135 break; 136 case FontDescription::EnabledLigaturesState: 137 features |= Ligatures; 138 break; 139 case FontDescription::NormalLigaturesState: 140 break; 141 } 142 132 143 return features; 133 144 } -
trunk/Source/WebCore/platform/graphics/FontDescription.h
r104678 r104786 74 74 75 75 enum Kerning { AutoKerning, NormalKerning, NoneKerning }; 76 77 enum LigaturesState { NormalLigaturesState, DisabledLigaturesState, EnabledLigaturesState }; 76 78 77 79 FontDescription() … … 89 91 , m_renderingMode(NormalRenderingMode) 90 92 , m_kerning(AutoKerning) 93 , m_commonLigaturesState(NormalLigaturesState) 94 , m_discretionaryLigaturesState(NormalLigaturesState) 95 , m_historicalLigaturesState(NormalLigaturesState) 91 96 , m_keywordSize(0) 92 97 , m_fontSmoothing(AutoSmoothing) … … 117 122 FontRenderingMode renderingMode() const { return static_cast<FontRenderingMode>(m_renderingMode); } 118 123 Kerning kerning() const { return static_cast<Kerning>(m_kerning); } 124 LigaturesState commonLigaturesState() const { return static_cast<LigaturesState>(m_commonLigaturesState); } 125 LigaturesState discretionaryLigaturesState() const { return static_cast<LigaturesState>(m_discretionaryLigaturesState); } 126 LigaturesState historicalLigaturesState() const { return static_cast<LigaturesState>(m_historicalLigaturesState); } 119 127 unsigned keywordSize() const { return m_keywordSize; } 120 128 FontSmoothingMode fontSmoothing() const { return static_cast<FontSmoothingMode>(m_fontSmoothing); } … … 147 155 void setRenderingMode(FontRenderingMode mode) { m_renderingMode = mode; } 148 156 void setKerning(Kerning kerning) { m_kerning = kerning; } 157 void setCommonLigaturesState(LigaturesState commonLigaturesState) { m_commonLigaturesState = commonLigaturesState; } 158 void setDiscretionaryLigaturesState(LigaturesState discretionaryLigaturesState) { m_discretionaryLigaturesState = discretionaryLigaturesState; } 159 void setHistoricalLigaturesState(LigaturesState historicalLigaturesState) { m_historicalLigaturesState = historicalLigaturesState; } 149 160 void setKeywordSize(unsigned s) { m_keywordSize = s; } 150 161 void setFontSmoothing(FontSmoothingMode smoothing) { m_fontSmoothing = smoothing; } … … 180 191 unsigned m_renderingMode : 1; // Used to switch between CG and GDI text on Windows. 181 192 unsigned m_kerning : 2; // Kerning 193 194 unsigned m_commonLigaturesState : 2; 195 unsigned m_discretionaryLigaturesState : 2; 196 unsigned m_historicalLigaturesState : 2; 182 197 183 198 unsigned m_keywordSize : 4; // We cache whether or not a font is currently represented by a CSS keyword (e.g., medium). If so, … … 204 219 && m_renderingMode == other.m_renderingMode 205 220 && m_kerning == other.m_kerning 221 && m_commonLigaturesState == other.m_commonLigaturesState 222 && m_discretionaryLigaturesState == other.m_discretionaryLigaturesState 223 && m_historicalLigaturesState == other.m_historicalLigaturesState 206 224 && m_keywordSize == other.m_keywordSize 207 225 && m_fontSmoothing == other.m_fontSmoothing
Note: See TracChangeset
for help on using the changeset viewer.