Index: Source/WebCore/css/CSSParser.cpp |
=================================================================== |
--- Source/WebCore/css/CSSParser.cpp (revision 131429) |
+++ Source/WebCore/css/CSSParser.cpp (working copy) |
@@ -9627,6 +9627,7 @@ |
return 0; |
ASSERT(!m_currentRuleDataStack->isEmpty()); |
+ m_currentRuleData.clear(); |
RefPtr<CSSRuleSourceData> data = m_currentRuleDataStack->last(); |
m_currentRuleDataStack->removeLast(); |
return data.release(); |
@@ -9920,8 +9921,14 @@ |
{ |
if (!isExtractingSourceData()) |
return; |
+ |
+ // Pop off data for a previous invalid rule. |
+ if (m_currentRuleData) |
+ m_currentRuleDataStack->removeLast(); |
+ |
RefPtr<CSSRuleSourceData> data = CSSRuleSourceData::create(ruleType); |
data->ruleHeaderRange.start = m_tokenStart - m_dataStart.get(); |
+ m_currentRuleData = data; |
m_currentRuleDataStack->append(data.release()); |
} |
@@ -9944,6 +9951,7 @@ |
{ |
if (!isExtractingSourceData()) |
return; |
+ m_currentRuleData.clear(); |
unsigned offset = m_tokenStart - m_dataStart.get(); |
if (*m_tokenStart == '{') |
++offset; // Skip the rule body opening brace. |