| 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::PseudoInternalCustomElement: |
| 312 case CSSSelector::PseudoListBox: |
| 313 case CSSSelector::PseudoSpatialNavigationFocus: |
| 314 return false; |
| 315 } |
| 316 |
| 317 return true; |
| 318 } |
| 319 |
| 305 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> BisonCSSParser::parseInlineSty
leDeclaration(const String& string, Element* element) | 320 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> BisonCSSParser::parseInlineSty
leDeclaration(const String& string, Element* element) |
| 306 { | 321 { |
| 307 Document& document = element->document(); | 322 Document& document = element->document(); |
| 308 CSSParserContext context = CSSParserContext(document.elementSheet().contents
()->parserContext(), UseCounter::getFrom(&document)); | 323 CSSParserContext context = CSSParserContext(document.elementSheet().contents
()->parserContext(), UseCounter::getFrom(&document)); |
| 309 context.setMode((element->isHTMLElement() && !document.inQuirksMode()) ? HTM
LStandardMode : HTMLQuirksMode); | 324 context.setMode((element->isHTMLElement() && !document.inQuirksMode()) ? HTM
LStandardMode : HTMLQuirksMode); |
| 310 return BisonCSSParser(context).parseDeclaration(string, document.elementShee
t().contents()); | 325 return BisonCSSParser(context).parseDeclaration(string, document.elementShee
t().contents()); |
| 311 } | 326 } |
| 312 | 327 |
| 313 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> BisonCSSParser::parseDeclarati
on(const String& string, StyleSheetContents* contextStyleSheet) | 328 PassRefPtrWillBeRawPtr<ImmutableStylePropertySet> BisonCSSParser::parseDeclarati
on(const String& string, StyleSheetContents* contextStyleSheet) |
| 314 { | 329 { |
| (...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1146 rule->setProperties(createStylePropertySet()); | 1161 rule->setProperties(createStylePropertySet()); |
| 1147 clearProperties(); | 1162 clearProperties(); |
| 1148 | 1163 |
| 1149 StyleRuleViewport* result = rule.get(); | 1164 StyleRuleViewport* result = rule.get(); |
| 1150 m_parsedRules.append(rule.release()); | 1165 m_parsedRules.append(rule.release()); |
| 1151 | 1166 |
| 1152 return result; | 1167 return result; |
| 1153 } | 1168 } |
| 1154 | 1169 |
| 1155 } | 1170 } |
| OLD | NEW |