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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 235 { | 235 { |
| 236 m_selectorListForParseSelector = &selectorList; | 236 m_selectorListForParseSelector = &selectorList; |
| 237 | 237 |
| 238 setupParser("@-internal-selector ", string, ""); | 238 setupParser("@-internal-selector ", string, ""); |
| 239 | 239 |
| 240 cssyyparse(this); | 240 cssyyparse(this); |
| 241 | 241 |
| 242 m_selectorListForParseSelector = 0; | 242 m_selectorListForParseSelector = 0; |
| 243 } | 243 } |
| 244 | 244 |
| 245 bool BisonCSSParser::isSelectorAllowedInParsingMode(CSSSelector::PseudoType type ) | |
|
esprehn
2015/04/20 16:04:08
Let's not add any new features to the old parser.
dsinclair
2015/04/21 20:23:10
Done.
| |
| 246 { | |
| 247 if (isUASheetBehavior(m_context.mode())) | |
| 248 return true; | |
| 249 return type != CSSSelector::PseudoMarker; | |
| 250 } | |
| 251 | |
| 245 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> BisonCSSParser::parseInlineSty leDeclaration(const String& string, Element* element) | 252 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> BisonCSSParser::parseInlineSty leDeclaration(const String& string, Element* element) |
| 246 { | 253 { |
| 247 Document& document = element->document(); | 254 Document& document = element->document(); |
| 248 CSSParserContext context = CSSParserContext(document.elementSheet().contents ()->parserContext(), UseCounter::getFrom(&document)); | 255 CSSParserContext context = CSSParserContext(document.elementSheet().contents ()->parserContext(), UseCounter::getFrom(&document)); |
| 249 context.setMode((element->isHTMLElement() && !document.inQuirksMode()) ? HTM LStandardMode : HTMLQuirksMode); | 256 context.setMode((element->isHTMLElement() && !document.inQuirksMode()) ? HTM LStandardMode : HTMLQuirksMode); |
| 250 return BisonCSSParser(context).parseDeclaration(string, document.elementShee t().contents()); | 257 return BisonCSSParser(context).parseDeclaration(string, document.elementShee t().contents()); |
| 251 } | 258 } |
| 252 | 259 |
| 253 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> BisonCSSParser::parseDeclarati on(const String& string, StyleSheetContents* contextStyleSheet) | 260 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> BisonCSSParser::parseDeclarati on(const String& string, StyleSheetContents* contextStyleSheet) |
| 254 { | 261 { |
| (...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1014 rule->setProperties(createStylePropertySet()); | 1021 rule->setProperties(createStylePropertySet()); |
| 1015 clearProperties(); | 1022 clearProperties(); |
| 1016 | 1023 |
| 1017 StyleRuleViewport* result = rule.get(); | 1024 StyleRuleViewport* result = rule.get(); |
| 1018 m_parsedRules.append(rule.release()); | 1025 m_parsedRules.append(rule.release()); |
| 1019 | 1026 |
| 1020 return result; | 1027 return result; |
| 1021 } | 1028 } |
| 1022 | 1029 |
| 1023 } | 1030 } |
| OLD | NEW |