DescriptionHave CSSFontFeatureValue store the tag as an AtomicString instead of a String
Have CSSFontFeatureValue store the tag as an AtomicString instead of a String.
CSSFontFeatureValue objects are constructed in:
- CSSParser::parseFontFeatureTag() where the tag is a CSSParserString that can
be easily be used to construct either a String or an AtomicString
- CSSComputedStyleDeclaration::getPropertyCSSValue() where it is constructed
from a FontFeature. FontFeature stores the tag as an AtomicString.
CSSFontFeatureValue::tag() getter is used by:
- FontBuilder::setFeatureSettingsValue() to construct a FontFeature object,
which requires the tag as a AtomicString and thus required us to convert
the tag from String to AtomicString.
- CSSFontFeatureValue::customCSSText() which uses StringBuilder::append(), so
it does not matter if the tag is a String or AtomicString.
- CSSFontFeatureValue::equals() for comparing the tags of 2 CSSFontFeatureValue
objects. In this case, keeping the tag as AtomicString would be more efficient.
Therefore, by having CSSFontFeatureValue store the tag as an AtomicString, we
gain consistency with FontFeature, which is important as we need 2-way conversion
from CSSFontFeatureValue <-> FontFeature. Also, it makes
CSSFontFeatureValue::equals() faster.
R=eseidel
BUG=323739
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=162789
Patch Set 1 #
Total comments: 3
Patch Set 2 : Add constructor argument names #
Messages
Total messages: 5 (0 generated)
|