| Index: Source/core/css/StyleRule.h
|
| diff --git a/Source/core/css/StyleRule.h b/Source/core/css/StyleRule.h
|
| index aa319ed734416358497681eebc5c1765e301f7cd..5a0bf89f765427ad6540bd053238877ca2aa5295 100644
|
| --- a/Source/core/css/StyleRule.h
|
| +++ b/Source/core/css/StyleRule.h
|
| @@ -156,6 +156,12 @@ private:
|
| RefPtr<StylePropertySet> m_properties;
|
| };
|
|
|
| +inline const StyleRuleFontFace* toStyleRuleFontFace(const StyleRuleBase* rule)
|
| +{
|
| + ASSERT_WITH_SECURITY_IMPLICATION(!rule || rule->isFontFaceRule());
|
| + return static_cast<const StyleRuleFontFace*>(rule);
|
| +}
|
| +
|
| class StyleRulePage : public StyleRuleBase {
|
| public:
|
| static PassRefPtr<StyleRulePage> create() { return adoptRef(new StyleRulePage); }
|
| @@ -290,6 +296,12 @@ inline const StyleRuleMedia* toStyleRuleMedia(const StyleRuleGroup* rule)
|
| return static_cast<const StyleRuleMedia*>(rule);
|
| }
|
|
|
| +inline const StyleRuleMedia* toStyleRuleMedia(const StyleRuleBase* rule)
|
| +{
|
| + ASSERT_WITH_SECURITY_IMPLICATION(!rule || rule->isMediaRule());
|
| + return static_cast<const StyleRuleMedia*>(rule);
|
| +}
|
| +
|
| inline const StyleRuleSupports* toStyleRuleSupports(const StyleRuleGroup* rule)
|
| {
|
| ASSERT_WITH_SECURITY_IMPLICATION(!rule || rule->isSupportsRule());
|
| @@ -302,6 +314,12 @@ inline const StyleRuleRegion* toStyleRuleRegion(const StyleRuleGroup* rule)
|
| return static_cast<const StyleRuleRegion*>(rule);
|
| }
|
|
|
| +inline StyleRuleViewport* toStyleRuleViewport(StyleRuleBase* rule)
|
| +{
|
| + ASSERT_WITH_SECURITY_IMPLICATION(!rule || rule->isViewportRule());
|
| + return static_cast<StyleRuleViewport*>(rule);
|
| +}
|
| +
|
| class StyleRuleFilter : public StyleRuleBase {
|
| public:
|
| static PassRefPtr<StyleRuleFilter> create(const String& filterName) { return adoptRef(new StyleRuleFilter(filterName)); }
|
|
|