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

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

Issue 24253004: Cleanup: Start using toFoo methods as part of newly adopted coding guideline. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 years, 3 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 2fc1fdafbc3d982b658b041cee8d11864391cad8..3008e849c37afa293d2ff8bba77ee4635d1489cd 100644
--- a/Source/core/css/StyleRule.cpp
+++ b/Source/core/css/StyleRule.cpp
@@ -59,7 +59,7 @@ void StyleRuleBase::destroy()
{
switch (type()) {
case Style:
- delete static_cast<StyleRule*>(this);
+ delete toStyleRule(this);
return;
case Page:
delete static_cast<StyleRulePage*>(this);
@@ -143,7 +143,7 @@ PassRefPtr<CSSRule> StyleRuleBase::createCSSOMWrapper(CSSStyleSheet* parentSheet
StyleRuleBase* self = const_cast<StyleRuleBase*>(this);
switch (type()) {
case Style:
- rule = CSSStyleRule::create(static_cast<StyleRule*>(self), parentSheet);
+ rule = CSSStyleRule::create(toStyleRule(self), parentSheet);
break;
case Page:
rule = CSSPageRule::create(static_cast<StyleRulePage*>(self), parentSheet);
« 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