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) 2005 Allan Sandfeld Jensen (kde@carewolf.com) | 3 * Copyright (C) 2005 Allan Sandfeld Jensen (kde@carewolf.com) |
4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. | 4 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Apple Inc.
All rights reserved. |
5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> | 5 * Copyright (C) 2007 Nicholas Shanks <webkit@nickshanks.com> |
6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> | 6 * Copyright (C) 2008 Eric Seidel <eric@webkit.org> |
7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) | 7 * Copyright (C) 2009 Torch Mobile Inc. All rights reserved. (http://www.torchmo
bile.com/) |
8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. | 8 * Copyright (C) 2012 Adobe Systems Incorporated. All rights reserved. |
9 * Copyright (C) 2012 Intel Corporation. All rights reserved. | 9 * Copyright (C) 2012 Intel Corporation. All rights reserved. |
10 * | 10 * |
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
324 // will set "ok" to "false" if the entire passed-in character range does | 324 // will set "ok" to "false" if the entire passed-in character range does |
325 // not represent a double. | 325 // not represent a double. |
326 bool ok; | 326 bool ok; |
327 number = charactersToDouble(characters, length, &ok); | 327 number = charactersToDouble(characters, length, &ok); |
328 return ok; | 328 return ok; |
329 } | 329 } |
330 | 330 |
331 static bool parseSimpleLengthValue(MutableStylePropertySet* declaration, CSSProp
ertyID propertyId, const String& string, bool important, CSSParserMode cssParser
Mode) | 331 static bool parseSimpleLengthValue(MutableStylePropertySet* declaration, CSSProp
ertyID propertyId, const String& string, bool important, CSSParserMode cssParser
Mode) |
332 { | 332 { |
333 ASSERT(!string.isEmpty()); | 333 ASSERT(!string.isEmpty()); |
334 bool acceptsNegativeNumbers; | 334 bool acceptsNegativeNumbers = false; |
335 | 335 |
336 // In @viewport, width and height are shorthands, not simple length values. | 336 // In @viewport, width and height are shorthands, not simple length values. |
337 if (isCSSViewportParsingEnabledForMode(cssParserMode) || !isSimpleLengthProp
ertyID(propertyId, acceptsNegativeNumbers)) | 337 if (isCSSViewportParsingEnabledForMode(cssParserMode) || !isSimpleLengthProp
ertyID(propertyId, acceptsNegativeNumbers)) |
338 return false; | 338 return false; |
339 | 339 |
340 unsigned length = string.length(); | 340 unsigned length = string.length(); |
341 double number; | 341 double number; |
342 CSSPrimitiveValue::UnitTypes unit = CSSPrimitiveValue::CSS_NUMBER; | 342 CSSPrimitiveValue::UnitTypes unit = CSSPrimitiveValue::CSS_NUMBER; |
343 | 343 |
344 if (string.is8Bit()) { | 344 if (string.is8Bit()) { |
(...skipping 1827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2172 rule->setProperties(createStylePropertySet()); | 2172 rule->setProperties(createStylePropertySet()); |
2173 clearProperties(); | 2173 clearProperties(); |
2174 | 2174 |
2175 StyleRuleViewport* result = rule.get(); | 2175 StyleRuleViewport* result = rule.get(); |
2176 m_parsedRules.append(rule.release()); | 2176 m_parsedRules.append(rule.release()); |
2177 | 2177 |
2178 return result; | 2178 return result; |
2179 } | 2179 } |
2180 | 2180 |
2181 } | 2181 } |
OLD | NEW |