OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 2003 Lars Knoll (knoll@kde.org) |
3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 3 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
4 * | 4 * |
5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
9 * | 9 * |
10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 value.unit = CSSPrimitiveValue::CSS_IDENT; | 118 value.unit = CSSPrimitiveValue::CSS_IDENT; |
119 value.string = token.value(); | 119 value.string = token.value(); |
120 break; | 120 break; |
121 } | 121 } |
122 case DimensionToken: | 122 case DimensionToken: |
123 if (!std::isfinite(token.numericValue())) { | 123 if (!std::isfinite(token.numericValue())) { |
124 destroyAndClear(); | 124 destroyAndClear(); |
125 return; | 125 return; |
126 } | 126 } |
127 if (!token.unitType()) { | 127 if (!token.unitType()) { |
128 if (String(token.value()) == "__qem") { | |
129 value.setFromNumber(token.numericValue(), CSSParserValue::Q_
EMS); | |
130 value.isInt = (token.numericValueType() == IntegerValueType)
; | |
131 break; | |
132 } | |
133 | |
134 // Unknown dimensions are handled as a list of two values | 128 // Unknown dimensions are handled as a list of two values |
135 value.unit = CSSParserValue::DimensionList; | 129 value.unit = CSSParserValue::DimensionList; |
136 CSSParserValueList* list = new CSSParserValueList; | 130 CSSParserValueList* list = new CSSParserValueList; |
137 value.valueList = list; | 131 value.valueList = list; |
138 value.id = CSSValueInvalid; | 132 value.id = CSSValueInvalid; |
139 | 133 |
140 CSSParserValue number; | 134 CSSParserValue number; |
141 number.setFromNumber(token.numericValue()); | 135 number.setFromNumber(token.numericValue()); |
142 number.isInt = (token.numericValueType() == IntegerValueType); | 136 number.isInt = (token.numericValueType() == IntegerValueType); |
143 list->addValue(number); | 137 list->addValue(number); |
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
357 bool CSSParserSelector::hasHostPseudoSelector() const | 351 bool CSSParserSelector::hasHostPseudoSelector() const |
358 { | 352 { |
359 for (CSSParserSelector* selector = const_cast<CSSParserSelector*>(this); sel
ector; selector = selector->tagHistory()) { | 353 for (CSSParserSelector* selector = const_cast<CSSParserSelector*>(this); sel
ector; selector = selector->tagHistory()) { |
360 if (selector->pseudoType() == CSSSelector::PseudoHost || selector->pseud
oType() == CSSSelector::PseudoHostContext) | 354 if (selector->pseudoType() == CSSSelector::PseudoHost || selector->pseud
oType() == CSSSelector::PseudoHostContext) |
361 return true; | 355 return true; |
362 } | 356 } |
363 return false; | 357 return false; |
364 } | 358 } |
365 | 359 |
366 } // namespace blink | 360 } // namespace blink |
OLD | NEW |