| 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
) |
| 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 836 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1091 rule->setProperties(createStylePropertySet()); | 1098 rule->setProperties(createStylePropertySet()); |
| 1092 clearProperties(); | 1099 clearProperties(); |
| 1093 | 1100 |
| 1094 StyleRuleViewport* result = rule.get(); | 1101 StyleRuleViewport* result = rule.get(); |
| 1095 m_parsedRules.append(rule.release()); | 1102 m_parsedRules.append(rule.release()); |
| 1096 | 1103 |
| 1097 return result; | 1104 return result; |
| 1098 } | 1105 } |
| 1099 | 1106 |
| 1100 } | 1107 } |
| OLD | NEW |