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

Side by Side Diff: sky/engine/core/html/HTMLStyleElement.h

Issue 788113002: Simplify HTMLStyleElement. (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 unified diff | Download patch
« no previous file with comments | « sky/engine/core/dom/StyleEngine.cpp ('k') | sky/engine/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org)
3 * (C) 1999 Antti Koivisto (koivisto@kde.org) 3 * (C) 1999 Antti Koivisto (koivisto@kde.org)
4 * Copyright (C) 2003, 2010 Apple Inc. ALl rights reserved. 4 * Copyright (C) 2003, 2010 Apple Inc. ALl rights reserved.
5 * 5 *
6 * This library is free software; you can redistribute it and/or 6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public 7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either 8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version. 9 * version 2 of the License, or (at your option) any later version.
10 * 10 *
(...skipping 13 matching lines...) Expand all
24 #define SKY_ENGINE_CORE_HTML_HTMLSTYLEELEMENT_H_ 24 #define SKY_ENGINE_CORE_HTML_HTMLSTYLEELEMENT_H_
25 25
26 #include "sky/engine/core/css/CSSStyleSheet.h" 26 #include "sky/engine/core/css/CSSStyleSheet.h"
27 #include "sky/engine/core/html/HTMLElement.h" 27 #include "sky/engine/core/html/HTMLElement.h"
28 #include "sky/engine/wtf/text/TextPosition.h" 28 #include "sky/engine/wtf/text/TextPosition.h"
29 29
30 namespace blink { 30 namespace blink {
31 31
32 class ContainerNode; 32 class ContainerNode;
33 class Document; 33 class Document;
34 class Element;
35 class HTMLStyleElement;
36 class TreeScope;
37 34
38 class HTMLStyleElement final : public HTMLElement { 35 class HTMLStyleElement final : public HTMLElement {
39 DEFINE_WRAPPERTYPEINFO(); 36 DEFINE_WRAPPERTYPEINFO();
40 public: 37 public:
41 static PassRefPtr<HTMLStyleElement> create(Document&, bool createdByParser); 38 static PassRefPtr<HTMLStyleElement> create(Document&);
42 virtual ~HTMLStyleElement(); 39 virtual ~HTMLStyleElement();
43 40
44 ContainerNode* scopingNode(); 41 ContainerNode* scopingNode();
45 42
46 CSSStyleSheet* sheet() const { return m_sheet.get(); } 43 CSSStyleSheet* sheet() const { return m_sheet.get(); }
47 44
48 const AtomicString& media() const; 45 const AtomicString& media() const;
49 const AtomicString& type() const; 46 const AtomicString& type() const;
50 47
51 private: 48 private:
52 HTMLStyleElement(Document&, bool createdByParser); 49 HTMLStyleElement(Document&);
53 50
54 void createSheet(); 51 void createSheet();
55 void process(); 52 void process();
56 void clearSheet(); 53 void clearSheet();
57 54
58 void processStyleSheet(); 55 void processStyleSheet();
59 void clearDocumentData(); 56 void clearDocumentData();
60 57
61 // overload from HTMLElement 58 // overload from HTMLElement
62 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide; 59 virtual void parseAttribute(const QualifiedName&, const AtomicString&) overr ide;
63 virtual void insertedInto(ContainerNode*) override; 60 virtual void insertedInto(ContainerNode*) override;
64 virtual void removedFrom(ContainerNode*) override; 61 virtual void removedFrom(ContainerNode*) override;
65 virtual void childrenChanged(const ChildrenChange&) override; 62 virtual void childrenChanged(const ChildrenChange&) override;
66 63
67 virtual void finishParsingChildren() override;
68
69 RefPtr<CSSStyleSheet> m_sheet; 64 RefPtr<CSSStyleSheet> m_sheet;
70 65
71 bool m_createdByParser : 1;
72 bool m_loading : 1; 66 bool m_loading : 1;
73 bool m_registeredAsCandidate : 1; 67 bool m_registeredAsCandidate : 1;
74 TextPosition m_startPosition;
75 }; 68 };
76 69
77 } // namespace blink 70 } // namespace blink
78 71
79 #endif // SKY_ENGINE_CORE_HTML_HTMLSTYLEELEMENT_H_ 72 #endif // SKY_ENGINE_CORE_HTML_HTMLSTYLEELEMENT_H_
OLDNEW
« no previous file with comments | « sky/engine/core/dom/StyleEngine.cpp ('k') | sky/engine/core/html/HTMLStyleElement.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698