Index: Source/WebCore/css/CSSParser.cpp |
=================================================================== |
--- Source/WebCore/css/CSSParser.cpp (revision 131428) |
+++ Source/WebCore/css/CSSParser.cpp (working copy) |
@@ -9925,8 +9925,10 @@ |
StyleRuleBase* CSSParser::createImportRule(const CSSParserString& url, MediaQuerySet* media) |
{ |
- if (!media || !m_allowImportRules) |
+ if (!media || !m_allowImportRules) { |
+ popRuleData(); |
return 0; |
+ } |
RefPtr<StyleRuleImport> rule = StyleRuleImport::create(url, media); |
StyleRuleImport* result = rule.get(); |
m_parsedRules.append(rule.release()); |
@@ -10038,6 +10040,7 @@ |
// have 'initial' value and cannot 'inherit' from parent. |
// See http://dev.w3.org/csswg/css3-fonts/#font-family-desc |
clearProperties(); |
+ popRuleData(); |
return 0; |
} |
} |
@@ -10127,7 +10130,8 @@ |
pageRule = rule.get(); |
m_parsedRules.append(rule.release()); |
processAndAddNewRuleToSourceTreeIfNeeded(); |
- } |
+ } else |
+ popRuleData(); |
clearProperties(); |
return pageRule; |
} |
@@ -10140,8 +10144,10 @@ |
StyleRuleBase* CSSParser::createRegionRule(Vector<OwnPtr<CSSParserSelector> >* regionSelector, RuleList* rules) |
{ |
- if (!cssRegionsEnabled() || !regionSelector || !rules) |
+ if (!cssRegionsEnabled() || !regionSelector || !rules) { |
+ popRuleData(); |
return 0; |
+ } |
m_allowImportRules = m_allowNamespaceDeclarations = false; |