Chromium Code Reviews| 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 284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 295 { | 295 { |
| 296 m_selectorListForParseSelector = &selectorList; | 296 m_selectorListForParseSelector = &selectorList; |
| 297 | 297 |
| 298 setupParser("@-internal-selector ", string, ""); | 298 setupParser("@-internal-selector ", string, ""); |
| 299 | 299 |
| 300 cssyyparse(this); | 300 cssyyparse(this); |
| 301 | 301 |
| 302 m_selectorListForParseSelector = 0; | 302 m_selectorListForParseSelector = 0; |
| 303 } | 303 } |
| 304 | 304 |
| 305 bool BisonCSSParser::isSelectorAllowedInParsingMode(CSSSelector::PseudoType type ) | |
| 306 { | |
| 307 if (isUASheetBehavior(m_context.mode())) | |
| 308 return true; | |
| 309 | |
| 310 switch (type) { | |
| 311 case CSSSelector::PseudoMarker: | |
| 312 return false; | |
| 313 default: | |
| 314 return true; | |
| 315 } | |
|
Julien - ping for review
2014/12/05 19:44:03
return type != CSSSelection::PseudoMarker?
dsinclair
2015/01/23 20:46:36
Done. I'd originally written this thinking we'd ha
| |
| 316 } | |
| 317 | |
| 305 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> BisonCSSParser::parseInlineSty leDeclaration(const String& string, Element* element) | 318 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> BisonCSSParser::parseInlineSty leDeclaration(const String& string, Element* element) |
| 306 { | 319 { |
| 307 Document& document = element->document(); | 320 Document& document = element->document(); |
| 308 CSSParserContext context = CSSParserContext(document.elementSheet().contents ()->parserContext(), UseCounter::getFrom(&document)); | 321 CSSParserContext context = CSSParserContext(document.elementSheet().contents ()->parserContext(), UseCounter::getFrom(&document)); |
| 309 context.setMode((element->isHTMLElement() && !document.inQuirksMode()) ? HTM LStandardMode : HTMLQuirksMode); | 322 context.setMode((element->isHTMLElement() && !document.inQuirksMode()) ? HTM LStandardMode : HTMLQuirksMode); |
| 310 return BisonCSSParser(context).parseDeclaration(string, document.elementShee t().contents()); | 323 return BisonCSSParser(context).parseDeclaration(string, document.elementShee t().contents()); |
| 311 } | 324 } |
| 312 | 325 |
| 313 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> BisonCSSParser::parseDeclarati on(const String& string, StyleSheetContents* contextStyleSheet) | 326 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> BisonCSSParser::parseDeclarati on(const String& string, StyleSheetContents* contextStyleSheet) |
| 314 { | 327 { |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1142 rule->setProperties(createStylePropertySet()); | 1155 rule->setProperties(createStylePropertySet()); |
| 1143 clearProperties(); | 1156 clearProperties(); |
| 1144 | 1157 |
| 1145 StyleRuleViewport* result = rule.get(); | 1158 StyleRuleViewport* result = rule.get(); |
| 1146 m_parsedRules.append(rule.release()); | 1159 m_parsedRules.append(rule.release()); |
| 1147 | 1160 |
| 1148 return result; | 1161 return result; |
| 1149 } | 1162 } |
| 1150 | 1163 |
| 1151 } | 1164 } |
| OLD | NEW |