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

Unified Diff: sky/engine/core/html/HTMLStyleElement.h

Issue 780083003: Merge StyleElement into HTMLStyleElement. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: trim includes. 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/dom/StyleElement.cpp ('k') | sky/engine/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sky/engine/core/html/HTMLStyleElement.h
diff --git a/sky/engine/core/html/HTMLStyleElement.h b/sky/engine/core/html/HTMLStyleElement.h
index 998be96dde087ad8f88f3be564d656207e6cf3ba..fb7fb551b728ae1d49f54ae49a8a0d9aef549160 100644
--- a/sky/engine/core/html/HTMLStyleElement.h
+++ b/sky/engine/core/html/HTMLStyleElement.h
@@ -23,17 +23,19 @@
#ifndef SKY_ENGINE_CORE_HTML_HTMLSTYLEELEMENT_H_
#define SKY_ENGINE_CORE_HTML_HTMLSTYLEELEMENT_H_
-#include "sky/engine/core/dom/StyleElement.h"
+#include "sky/engine/core/css/CSSStyleSheet.h"
#include "sky/engine/core/html/HTMLElement.h"
+#include "sky/engine/wtf/text/TextPosition.h"
namespace blink {
+class ContainerNode;
+class Document;
+class Element;
class HTMLStyleElement;
+class TreeScope;
-template<typename T> class EventSender;
-typedef EventSender<HTMLStyleElement> StyleEventSender;
-
-class HTMLStyleElement final : public HTMLElement, private StyleElement {
+class HTMLStyleElement final : public HTMLElement {
DEFINE_WRAPPERTYPEINFO();
public:
static PassRefPtr<HTMLStyleElement> create(Document&, bool createdByParser);
@@ -41,11 +43,21 @@ public:
ContainerNode* scopingNode();
- using StyleElement::sheet;
+ CSSStyleSheet* sheet() const { return m_sheet.get(); }
+
+ const AtomicString& media() const;
+ const AtomicString& type() const;
private:
HTMLStyleElement(Document&, bool createdByParser);
+ void createSheet();
+ void process();
+ void clearSheet();
+
+ void processStyleSheet();
+ void clearDocumentData();
+
// overload from HTMLElement
virtual void parseAttribute(const QualifiedName&, const AtomicString&) override;
virtual void insertedInto(ContainerNode*) override;
@@ -54,8 +66,12 @@ private:
virtual void finishParsingChildren() override;
- virtual const AtomicString& media() const override;
- virtual const AtomicString& type() const override;
+ RefPtr<CSSStyleSheet> m_sheet;
+
+ bool m_createdByParser : 1;
+ bool m_loading : 1;
+ bool m_registeredAsCandidate : 1;
+ TextPosition m_startPosition;
};
} // namespace blink
« no previous file with comments | « sky/engine/core/dom/StyleElement.cpp ('k') | sky/engine/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698