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 1267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1278 | 1278 |
1279 setupParser("@-internal-selector ", string, ""); | 1279 setupParser("@-internal-selector ", string, ""); |
1280 | 1280 |
1281 cssyyparse(this); | 1281 cssyyparse(this); |
1282 | 1282 |
1283 m_selectorListForParseSelector = 0; | 1283 m_selectorListForParseSelector = 0; |
1284 } | 1284 } |
1285 | 1285 |
1286 PassRefPtr<ImmutableStylePropertySet> CSSParser::parseInlineStyleDeclaration(con
st String& string, Element* element) | 1286 PassRefPtr<ImmutableStylePropertySet> CSSParser::parseInlineStyleDeclaration(con
st String& string, Element* element) |
1287 { | 1287 { |
1288 Document* document = element->document(); | 1288 Document& document = element->document(); |
1289 CSSParserContext context = document->elementSheet()->contents()->parserConte
xt(); | 1289 CSSParserContext context = document.elementSheet()->contents()->parserContex
t(); |
1290 context.mode = strictToCSSParserMode(element->isHTMLElement() && !document->
inQuirksMode()); | 1290 context.mode = strictToCSSParserMode(element->isHTMLElement() && !document.i
nQuirksMode()); |
1291 return CSSParser(context, UseCounter::getFrom(document)).parseDeclaration(st
ring, document->elementSheet()->contents()); | 1291 return CSSParser(context, UseCounter::getFrom(&document)).parseDeclaration(s
tring, document.elementSheet()->contents()); |
1292 } | 1292 } |
1293 | 1293 |
1294 PassRefPtr<ImmutableStylePropertySet> CSSParser::parseDeclaration(const String&
string, StyleSheetContents* contextStyleSheet) | 1294 PassRefPtr<ImmutableStylePropertySet> CSSParser::parseDeclaration(const String&
string, StyleSheetContents* contextStyleSheet) |
1295 { | 1295 { |
1296 setStyleSheet(contextStyleSheet); | 1296 setStyleSheet(contextStyleSheet); |
1297 | 1297 |
1298 setupParser("@-internal-decls ", string, ""); | 1298 setupParser("@-internal-decls ", string, ""); |
1299 cssyyparse(this); | 1299 cssyyparse(this); |
1300 m_rule = 0; | 1300 m_rule = 0; |
1301 | 1301 |
(...skipping 10669 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11971 { | 11971 { |
11972 // The tokenizer checks for the construct of an+b. | 11972 // The tokenizer checks for the construct of an+b. |
11973 // However, since the {ident} rule precedes the {nth} rule, some of those | 11973 // However, since the {ident} rule precedes the {nth} rule, some of those |
11974 // tokens are identified as string literal. Furthermore we need to accept | 11974 // tokens are identified as string literal. Furthermore we need to accept |
11975 // "odd" and "even" which does not match to an+b. | 11975 // "odd" and "even" which does not match to an+b. |
11976 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") | 11976 return equalIgnoringCase(token, "odd") || equalIgnoringCase(token, "even") |
11977 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); | 11977 || equalIgnoringCase(token, "n") || equalIgnoringCase(token, "-n"); |
11978 } | 11978 } |
11979 | 11979 |
11980 } | 11980 } |
OLD | NEW |