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

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

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/StyleInvalidationAnalysis.cpp ('k') | Source/core/css/StyleRule.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/css/StyleRule.h
diff --git a/Source/core/css/StyleRule.h b/Source/core/css/StyleRule.h
index 5aeaf86a5a42b71becfc5f44a1ff3573c00e4caf..aa319ed734416358497681eebc5c1765e301f7cd 100644
--- a/Source/core/css/StyleRule.h
+++ b/Source/core/css/StyleRule.h
@@ -128,6 +128,14 @@ inline const StyleRule* toStyleRule(const StyleRuleBase* rule)
return static_cast<const StyleRule*>(rule);
}
+inline StyleRule* toStyleRule(StyleRuleBase* rule)
+{
+ ASSERT_WITH_SECURITY_IMPLICATION(!rule || rule->isStyleRule());
+ return static_cast<StyleRule*>(rule);
+}
+
+void toStyleRule(const StyleRule*);
+
class StyleRuleFontFace : public StyleRuleBase {
public:
static PassRefPtr<StyleRuleFontFace> create() { return adoptRef(new StyleRuleFontFace); }
« no previous file with comments | « Source/core/css/StyleInvalidationAnalysis.cpp ('k') | Source/core/css/StyleRule.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698