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

Unified Diff: sky/engine/core/css/StyleRule.cpp

Issue 780483002: Remove the CSSOM. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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 | « sky/engine/core/css/StyleRule.h ('k') | sky/engine/core/css/StyleRuleKeyframes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/StyleRule.cpp
diff --git a/sky/engine/core/css/StyleRule.cpp b/sky/engine/core/css/StyleRule.cpp
index b200e3ff1956cc546f78527b426d0f0c30d19751..74b3ca5ce868f11acd77934774b773eb05f59c63 100644
--- a/sky/engine/core/css/StyleRule.cpp
+++ b/sky/engine/core/css/StyleRule.cpp
@@ -22,13 +22,8 @@
#include "sky/engine/config.h"
#include "sky/engine/core/css/StyleRule.h"
-#include "sky/engine/core/css/CSSFilterRule.h"
-#include "sky/engine/core/css/CSSFontFaceRule.h"
-#include "sky/engine/core/css/CSSKeyframesRule.h"
-#include "sky/engine/core/css/CSSMediaRule.h"
-#include "sky/engine/core/css/CSSStyleRule.h"
-#include "sky/engine/core/css/CSSSupportsRule.h"
#include "sky/engine/core/css/StylePropertySet.h"
+#include "sky/engine/core/css/StyleRuleKeyframes.h"
namespace blink {
@@ -38,16 +33,6 @@ struct SameSizeAsStyleRuleBase : public RefCounted<SameSizeAsStyleRuleBase> {
COMPILE_ASSERT(sizeof(StyleRuleBase) <= sizeof(SameSizeAsStyleRuleBase), StyleRuleBase_should_stay_small);
-PassRefPtr<CSSRule> StyleRuleBase::createCSSOMWrapper(CSSStyleSheet* parentSheet) const
-{
- return createCSSOMWrapper(parentSheet, 0);
-}
-
-PassRefPtr<CSSRule> StyleRuleBase::createCSSOMWrapper(CSSRule* parentRule) const
-{
- return createCSSOMWrapper(0, parentRule);
-}
-
void StyleRuleBase::destroy()
{
switch (type()) {
@@ -101,39 +86,6 @@ PassRefPtr<StyleRuleBase> StyleRuleBase::copy() const
return nullptr;
}
-PassRefPtr<CSSRule> StyleRuleBase::createCSSOMWrapper(CSSStyleSheet* parentSheet, CSSRule* parentRule) const
-{
- RefPtr<CSSRule> rule = nullptr;
- StyleRuleBase* self = const_cast<StyleRuleBase*>(this);
- switch (type()) {
- case Style:
- rule = CSSStyleRule::create(toStyleRule(self), parentSheet);
- break;
- case FontFace:
- rule = CSSFontFaceRule::create(toStyleRuleFontFace(self), parentSheet);
- break;
- case Media:
- rule = CSSMediaRule::create(toStyleRuleMedia(self), parentSheet);
- break;
- case Supports:
- rule = CSSSupportsRule::create(toStyleRuleSupports(self), parentSheet);
- break;
- case Keyframes:
- rule = CSSKeyframesRule::create(toStyleRuleKeyframes(self), parentSheet);
- break;
- case Filter:
- rule = CSSFilterRule::create(toStyleRuleFilter(self), parentSheet);
- break;
- case Unknown:
- case Keyframe:
- ASSERT_NOT_REACHED();
- return nullptr;
- }
- if (parentRule)
- rule->setParentRule(parentRule);
- return rule.release();
-}
-
unsigned StyleRule::averageSizeInBytes()
{
return sizeof(StyleRule) + sizeof(CSSSelector) + StylePropertySet::averageSizeInBytes();
« no previous file with comments | « sky/engine/core/css/StyleRule.h ('k') | sky/engine/core/css/StyleRuleKeyframes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698