// http://www.w3.org/TR/css3-syntax/#consume-a-numeric-token CSSParserToken CSSTokenizer::consumeNumericToken() { CSSParserToken token = consumeNumber(); if (nextCharsAreIdentifier()) token.convertToDimensionWithUnit(consumeName()); else if (consumeIfNext('%')) token.convertToPercentage(); return token; }
static CSSParserToken dimension(NumericValueType type, double value, const String& string) { CSSParserToken token = number(type, value, NoSign); // sign ignored token.convertToDimensionWithUnit(toParserString(string)); return token; }
static CSSParserToken dimension(NumericValueType type, double value, const String& string) { CSSParserToken token = number(type, value); token.convertToDimensionWithUnit(string); return token; }