Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(461)

Unified Diff: Source/core/css/StyleRule.cpp

Issue 1018213004: CSS Parser: Mark on stylesheets whether the first rule was valid (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/css/StyleRule.h ('k') | Source/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StyleRule.cpp
diff --git a/Source/core/css/StyleRule.cpp b/Source/core/css/StyleRule.cpp
index 8b0380cf3f9ad142225a2a182567425db009af89..dc810357ca37e3125b526763bc3498a1a480db4b 100644
--- a/Source/core/css/StyleRule.cpp
+++ b/Source/core/css/StyleRule.cpp
@@ -56,6 +56,9 @@ PassRefPtrWillBeRawPtr<CSSRule> StyleRuleBase::createCSSOMWrapper(CSSRule* paren
DEFINE_TRACE(StyleRuleBase)
{
switch (type()) {
+ case Charset:
+ toStyleRuleCharset(this)->traceAfterDispatch(visitor);
+ return;
case Style:
toStyleRule(this)->traceAfterDispatch(visitor);
return;
@@ -95,6 +98,9 @@ DEFINE_TRACE(StyleRuleBase)
void StyleRuleBase::finalizeGarbageCollectedObject()
{
switch (type()) {
+ case Charset:
+ toStyleRuleCharset(this)->~StyleRuleCharset();
+ return;
case Style:
toStyleRule(this)->~StyleRule();
return;
@@ -134,6 +140,9 @@ void StyleRuleBase::finalizeGarbageCollectedObject()
void StyleRuleBase::destroy()
{
switch (type()) {
+ case Charset:
+ delete toStyleRuleCharset(this);
+ return;
case Style:
delete toStyleRule(this);
return;
@@ -191,6 +200,7 @@ PassRefPtrWillBeRawPtr<StyleRuleBase> StyleRuleBase::copy() const
return toStyleRuleKeyframes(this)->copy();
case Viewport:
return toStyleRuleViewport(this)->copy();
+ case Charset:
case Keyframe:
case Namespace:
case Unknown:
@@ -232,6 +242,7 @@ PassRefPtrWillBeRawPtr<CSSRule> StyleRuleBase::createCSSOMWrapper(CSSStyleSheet*
break;
case Keyframe:
case Namespace:
+ case Charset:
case Unknown:
ASSERT_NOT_REACHED();
return nullptr;
« no previous file with comments | « Source/core/css/StyleRule.h ('k') | Source/core/css/StyleSheetContents.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698