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

Unified Diff: Source/core/html/imports/HTMLImport.h

Issue 234063004: Refactoring: Get rid of HTMLImportRoot. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 8 months 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 | « no previous file | Source/core/html/imports/HTMLImport.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/html/imports/HTMLImport.h
diff --git a/Source/core/html/imports/HTMLImport.h b/Source/core/html/imports/HTMLImport.h
index 501a09f2075f79d37ec28107acacfa57d094544e..79f075d56b007f93df8b565a4836a401fe0fd738 100644
--- a/Source/core/html/imports/HTMLImport.h
+++ b/Source/core/html/imports/HTMLImport.h
@@ -41,7 +41,6 @@ class CustomElementMicrotaskImportStep;
class Document;
class LocalFrame;
class HTMLImportChild;
-class HTMLImportRoot;
class HTMLImportsController;
class KURL;
@@ -53,8 +52,7 @@ class KURL;
// HTML Imports form a tree:
//
// * The root of the tree is HTMLImportsController, which is owned by the master
-// document as a DocumentSupplement. HTMLImportsController has an abstract class called
-// HTMLImportRoot to deal with cycler dependency.
+// document as a DocumentSupplement.
//
// * The non-root nodes are HTMLImportChild, which is owned by LinkStyle, that is owned by HTMLLinkElement.
// LinkStyle is wired into HTMLImportChild by implementing HTMLImportChildClient interface
@@ -67,10 +65,10 @@ class KURL;
// One assumption is that the tree is append-only and nodes are never inserted in the middle of the tree nor removed.
//
//
-// HTMLImport <|- HTMLImportRoot <|- HTMLImportsController <- Document
-// *
-// |
-// <|- HTMLImportChild <- LinkStyle <- HTMLLinkElement
+// HTMLImport <|- HTMLImportsController <- Document
+// *
+// |
+// <|- HTMLImportChild <- LinkStyle <- HTMLLinkElement
//
//
// # Import Sharing and HTMLImportLoader
@@ -107,6 +105,7 @@ public:
virtual ~HTMLImport() { }
+ HTMLImport* root();
bool isRoot() const { return !isChild(); }
bool isSync() const { return SyncMode(m_sync) == Sync; }
const HTMLImportState& state() const { return m_state; }
@@ -114,12 +113,12 @@ public:
void appendChild(HTMLImport*);
virtual bool isChild() const { return false; }
- virtual HTMLImportRoot* root() = 0;
virtual Document* document() const = 0;
virtual bool isDone() const = 0; // FIXME: Should be renamed to haveFinishedLoading()
virtual bool hasLoader() const = 0;
virtual bool ownsLoader() const { return false; }
virtual CustomElementMicrotaskImportStep* customElementMicrotaskStep() const { return 0; }
+ virtual void stateWillChange() { }
virtual void stateDidChange();
protected:
@@ -129,7 +128,6 @@ protected:
: m_sync(sync)
{ }
- void stateWillChange();
static void recalcTreeState(HTMLImport* root);
#if !defined(NDEBUG)
@@ -143,16 +141,6 @@ private:
unsigned m_sync : 1;
};
-// An abstract class to decouple its sublcass HTMLImportsController.
-class HTMLImportRoot : public HTMLImport {
-public:
- HTMLImportRoot() : HTMLImport(Sync) { }
-
- virtual void scheduleRecalcState() = 0;
- virtual HTMLImportsController* toController() = 0;
- virtual HTMLImportChild* findLinkFor(const KURL&, HTMLImport* excluding = 0) const = 0;
-};
-
} // namespace WebCore
#endif // HTMLImport_h
« no previous file with comments | « no previous file | Source/core/html/imports/HTMLImport.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698