| 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 6109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6120 | 6120 |
| 6121 if (name.is8Bit()) | 6121 if (name.is8Bit()) |
| 6122 parseResult = fastParseColorInternal(rgb, name.characters8(), length, st
rict); | 6122 parseResult = fastParseColorInternal(rgb, name.characters8(), length, st
rict); |
| 6123 else | 6123 else |
| 6124 parseResult = fastParseColorInternal(rgb, name.characters16(), length, s
trict); | 6124 parseResult = fastParseColorInternal(rgb, name.characters16(), length, s
trict); |
| 6125 | 6125 |
| 6126 if (parseResult) | 6126 if (parseResult) |
| 6127 return true; | 6127 return true; |
| 6128 | 6128 |
| 6129 // Try named colors. | 6129 // Try named colors. |
| 6130 StyleColor color; | 6130 Color tc; |
| 6131 color.setNamedColor(name); | 6131 tc.setNamedColor(name); |
| 6132 if (color.isValid()) { | 6132 if (tc.isValid()) { |
| 6133 rgb = color.rgb(); | 6133 rgb = tc.rgb(); |
| 6134 return true; | 6134 return true; |
| 6135 } | 6135 } |
| 6136 return false; | 6136 return false; |
| 6137 } | 6137 } |
| 6138 | 6138 |
| 6139 inline double CSSParser::parsedDouble(CSSParserValue *v, ReleaseParsedCalcValueC
ondition releaseCalc) | 6139 inline double CSSParser::parsedDouble(CSSParserValue *v, ReleaseParsedCalcValueC
ondition releaseCalc) |
| 6140 { | 6140 { |
| 6141 const double result = m_parsedCalculation ? m_parsedCalculation->doubleValue
() : v->fValue; | 6141 const double result = m_parsedCalculation ? m_parsedCalculation->doubleValue
() : v->fValue; |
| 6142 if (releaseCalc == ReleaseParsedCalcValue) | 6142 if (releaseCalc == ReleaseParsedCalcValue) |
| 6143 m_parsedCalculation.release(); | 6143 m_parsedCalculation.release(); |
| (...skipping 5829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11973 { | 11973 { |
| 11974 // The tokenizer checks for the construct of an+b. | 11974 // The tokenizer checks for the construct of an+b. |
| 11975 // However, since the {ident} rule precedes the {nth} rule, some of those | 11975 // However, since the {ident} rule precedes the {nth} rule, some of those |
| 11976 // tokens are identified as string literal. Furthermore we need to accept | 11976 // tokens are identified as string literal. Furthermore we need to accept |
| 11977 // "odd" and "even" which does not match to an+b. | 11977 // "odd" and "even" which does not match to an+b. |
| 11978 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 11978 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
| 11979 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 11979 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
| 11980 } | 11980 } |
| 11981 | 11981 |
| 11982 } | 11982 } |
| OLD | NEW |