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

Unified Diff: sky/engine/core/css/CSSStyleSheet.h

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/CSSStyleRule.idl ('k') | sky/engine/core/css/CSSStyleSheet.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/css/CSSStyleSheet.h
diff --git a/sky/engine/core/css/CSSStyleSheet.h b/sky/engine/core/css/CSSStyleSheet.h
index f1ea840abf7b16faa8c087e803284d22ed7f33f3..7511226a353e5c41d2944495c25e82905e51dacc 100644
--- a/sky/engine/core/css/CSSStyleSheet.h
+++ b/sky/engine/core/css/CSSStyleSheet.h
@@ -21,7 +21,6 @@
#ifndef SKY_ENGINE_CORE_CSS_CSSSTYLESHEET_H_
#define SKY_ENGINE_CORE_CSS_CSSSTYLESHEET_H_
-#include "sky/engine/core/css/CSSRule.h"
#include "sky/engine/core/css/StyleSheet.h"
#include "sky/engine/platform/heap/Handle.h"
#include "sky/engine/wtf/Noncopyable.h"
@@ -30,8 +29,6 @@
namespace blink {
class BisonCSSParser;
-class CSSRule;
-class CSSRuleList;
class CSSStyleSheet;
class Document;
class ExceptionState;
@@ -44,7 +41,6 @@ enum StyleSheetUpdateType {
};
class CSSStyleSheet final : public StyleSheet {
- DEFINE_WRAPPERTYPEINFO();
public:
static PassRefPtr<CSSStyleSheet> createInline(Node*, const KURL&, const TextPosition& startPosition = TextPosition::minimumPosition());
static PassRefPtr<CSSStyleSheet> createInline(PassRefPtr<StyleSheetContents>, Node* ownerNode, const TextPosition& startPosition = TextPosition::minimumPosition());
@@ -52,22 +48,8 @@ public:
virtual ~CSSStyleSheet();
virtual Node* ownerNode() const override { return m_ownerNode; }
- virtual MediaList* media() const override;
- PassRefPtr<CSSRuleList> cssRules();
- unsigned insertRule(const String& rule, unsigned index, ExceptionState&);
- unsigned insertRule(const String& rule, ExceptionState&); // Deprecated.
- void deleteRule(unsigned index, ExceptionState&);
-
- // IE Extensions
- PassRefPtr<CSSRuleList> rules();
- int addRule(const String& selector, const String& style, int index, ExceptionState&);
- int addRule(const String& selector, const String& style, ExceptionState&);
- void removeRule(unsigned index, ExceptionState& exceptionState) { deleteRule(index, exceptionState); }
-
- // For CSSRuleList.
unsigned length() const;
- CSSRule* item(unsigned index);
virtual void clearOwnerNode() override;
@@ -82,7 +64,6 @@ public:
STACK_ALLOCATED();
public:
explicit RuleMutationScope(CSSStyleSheet*);
- explicit RuleMutationScope(CSSRule*);
~RuleMutationScope();
private:
@@ -93,8 +74,6 @@ public:
void didMutateRules();
void didMutate(StyleSheetUpdateType = PartialRuleUpdate);
- void clearChildRuleCSSOMWrappers();
-
StyleSheetContents* contents() const { return m_contents.get(); }
bool isInline() const { return m_isInlineStylesheet; }
@@ -107,8 +86,6 @@ private:
virtual bool isCSSStyleSheet() const override { return true; }
virtual String type() const override { return "text/css"; }
- void reattachChildRuleCSSOMWrappers();
-
RefPtr<StyleSheetContents> m_contents;
bool m_isInlineStylesheet;
RefPtr<MediaQuerySet> m_mediaQueries;
@@ -116,9 +93,6 @@ private:
RawPtr<Node> m_ownerNode;
TextPosition m_startPosition;
- mutable RefPtr<MediaList> m_mediaCSSOMWrapper;
- mutable Vector<RefPtr<CSSRule> > m_childRuleCSSOMWrappers;
- mutable OwnPtr<CSSRuleList> m_ruleListCSSOMWrapper;
};
inline CSSStyleSheet::RuleMutationScope::RuleMutationScope(CSSStyleSheet* sheet)
@@ -128,13 +102,6 @@ inline CSSStyleSheet::RuleMutationScope::RuleMutationScope(CSSStyleSheet* sheet)
m_styleSheet->willMutateRules();
}
-inline CSSStyleSheet::RuleMutationScope::RuleMutationScope(CSSRule* rule)
- : m_styleSheet(rule ? rule->parentStyleSheet() : 0)
-{
- if (m_styleSheet)
- m_styleSheet->willMutateRules();
-}
-
inline CSSStyleSheet::RuleMutationScope::~RuleMutationScope()
{
if (m_styleSheet)
« no previous file with comments | « sky/engine/core/css/CSSStyleRule.idl ('k') | sky/engine/core/css/CSSStyleSheet.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698