| 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 10248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 10259 } | 10259 } |
| 10260 CASE("host") { | 10260 CASE("host") { |
| 10261 m_token = HOST_SYM; | 10261 m_token = HOST_SYM; |
| 10262 } | 10262 } |
| 10263 CASE("import") { | 10263 CASE("import") { |
| 10264 m_parsingMode = MediaQueryMode; | 10264 m_parsingMode = MediaQueryMode; |
| 10265 m_token = IMPORT_SYM; | 10265 m_token = IMPORT_SYM; |
| 10266 } | 10266 } |
| 10267 CASE("keyframes") { | 10267 CASE("keyframes") { |
| 10268 if (RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled()) | 10268 if (RuntimeEnabledFeatures::cssAnimationUnprefixedEnabled()) |
| 10269 m_token = WEBKIT_KEYFRAMES_SYM; | 10269 m_token = KEYFRAMES_SYM; |
| 10270 } | 10270 } |
| 10271 CASE("left-top") { | 10271 CASE("left-top") { |
| 10272 if (LIKELY(!hasEscape)) | 10272 if (LIKELY(!hasEscape)) |
| 10273 m_token = LEFTTOP_SYM; | 10273 m_token = LEFTTOP_SYM; |
| 10274 } | 10274 } |
| 10275 CASE("left-middle") { | 10275 CASE("left-middle") { |
| 10276 if (LIKELY(!hasEscape)) | 10276 if (LIKELY(!hasEscape)) |
| 10277 m_token = LEFTMIDDLE_SYM; | 10277 m_token = LEFTMIDDLE_SYM; |
| 10278 } | 10278 } |
| 10279 CASE("left-bottom") { | 10279 CASE("left-bottom") { |
| (...skipping 909 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11189 ensureLineEndings(); | 11189 ensureLineEndings(); |
| 11190 TextPosition tokenPosition = TextPosition::fromOffsetAndLineEndings(loca
tion.offset, *m_lineEndings); | 11190 TextPosition tokenPosition = TextPosition::fromOffsetAndLineEndings(loca
tion.offset, *m_lineEndings); |
| 11191 lineNumberInStyleSheet = tokenPosition.m_line.zeroBasedInt(); | 11191 lineNumberInStyleSheet = tokenPosition.m_line.zeroBasedInt(); |
| 11192 columnNumber = (lineNumberInStyleSheet ? 0 : m_startPosition.m_column.ze
roBasedInt()) + tokenPosition.m_column.zeroBasedInt(); | 11192 columnNumber = (lineNumberInStyleSheet ? 0 : m_startPosition.m_column.ze
roBasedInt()) + tokenPosition.m_column.zeroBasedInt(); |
| 11193 } else { | 11193 } else { |
| 11194 lineNumberInStyleSheet = location.lineNumber; | 11194 lineNumberInStyleSheet = location.lineNumber; |
| 11195 } | 11195 } |
| 11196 console->addMessage(CSSMessageSource, WarningMessageLevel, message, m_styleS
heet->baseURL().string(), lineNumberInStyleSheet + m_startPosition.m_line.zeroBa
sedInt() + 1, columnNumber + 1); | 11196 console->addMessage(CSSMessageSource, WarningMessageLevel, message, m_styleS
heet->baseURL().string(), lineNumberInStyleSheet + m_startPosition.m_line.zeroBa
sedInt() + 1, columnNumber + 1); |
| 11197 } | 11197 } |
| 11198 | 11198 |
| 11199 StyleRuleKeyframes* CSSParser::createKeyframesRule(const String& name, PassOwnPt
r<Vector<RefPtr<StyleKeyframe> > > popKeyframes) | 11199 StyleRuleKeyframes* CSSParser::createKeyframesRule(const String& name, PassOwnPt
r<Vector<RefPtr<StyleKeyframe> > > popKeyframes, bool isPrefixed) |
| 11200 { | 11200 { |
| 11201 OwnPtr<Vector<RefPtr<StyleKeyframe> > > keyframes = popKeyframes; | 11201 OwnPtr<Vector<RefPtr<StyleKeyframe> > > keyframes = popKeyframes; |
| 11202 m_allowImportRules = m_allowNamespaceDeclarations = false; | 11202 m_allowImportRules = m_allowNamespaceDeclarations = false; |
| 11203 RefPtr<StyleRuleKeyframes> rule = StyleRuleKeyframes::create(); | 11203 RefPtr<StyleRuleKeyframes> rule = StyleRuleKeyframes::create(); |
| 11204 for (size_t i = 0; i < keyframes->size(); ++i) | 11204 for (size_t i = 0; i < keyframes->size(); ++i) |
| 11205 rule->parserAppendKeyframe(keyframes->at(i)); | 11205 rule->parserAppendKeyframe(keyframes->at(i)); |
| 11206 rule->setName(name); | 11206 rule->setName(name); |
| 11207 rule->setVendorPrefixed(isPrefixed); |
| 11207 StyleRuleKeyframes* rulePtr = rule.get(); | 11208 StyleRuleKeyframes* rulePtr = rule.get(); |
| 11208 m_parsedRules.append(rule.release()); | 11209 m_parsedRules.append(rule.release()); |
| 11209 endRuleBody(); | 11210 endRuleBody(); |
| 11210 return rulePtr; | 11211 return rulePtr; |
| 11211 } | 11212 } |
| 11212 | 11213 |
| 11213 StyleRuleBase* CSSParser::createStyleRule(Vector<OwnPtr<CSSParserSelector> >* se
lectors) | 11214 StyleRuleBase* CSSParser::createStyleRule(Vector<OwnPtr<CSSParserSelector> >* se
lectors) |
| 11214 { | 11215 { |
| 11215 StyleRule* result = 0; | 11216 StyleRule* result = 0; |
| 11216 if (selectors) { | 11217 if (selectors) { |
| (...skipping 730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11947 { | 11948 { |
| 11948 // The tokenizer checks for the construct of an+b. | 11949 // The tokenizer checks for the construct of an+b. |
| 11949 // However, since the {ident} rule precedes the {nth} rule, some of those | 11950 // However, since the {ident} rule precedes the {nth} rule, some of those |
| 11950 // tokens are identified as string literal. Furthermore we need to accept | 11951 // tokens are identified as string literal. Furthermore we need to accept |
| 11951 // "odd" and "even" which does not match to an+b. | 11952 // "odd" and "even" which does not match to an+b. |
| 11952 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 11953 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
| 11953 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 11954 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
| 11954 } | 11955 } |
| 11955 | 11956 |
| 11956 } | 11957 } |
| OLD | NEW |