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

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

Issue 301803002: Extract tree root responsibility out of HTMLImportsController. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Fix compile. Created 6 years, 7 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 | « Source/core/core.gypi ('k') | Source/core/html/imports/HTMLImportChild.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 72d43f0b09e832e16062f66a0981428991e5d03d..239b5ee289f79943d7ea03c841b74bb3ded49597 100644
--- a/Source/core/html/imports/HTMLImport.h
+++ b/Source/core/html/imports/HTMLImport.h
@@ -51,13 +51,15 @@ class KURL;
//
// HTML Imports form a tree:
//
-// * The root of the tree is HTMLImportsController, which is owned by the master
+// * The root of the tree is HTMLImportTreeRoot.
+//
+// * The HTMLImportTreeRoot is owned HTMLImportsController, which is owned by the master
// document as a DocumentSupplement.
//
-// * The non-root nodes are HTMLImportChild, which is owned by LinkStyle, that is owned by HTMLLinkElement.
+// * The non-root nodes are HTMLImportChild. They are also owned by HTMLImportsController.
// LinkStyle is wired into HTMLImportChild by implementing HTMLImportChildClient interface
//
-// * Both HTMLImportsController and HTMLImportChild are derived from HTMLImport superclass
+// * Both HTMLImportTreeRoot and HTMLImportChild are derived from HTMLImport superclass
// that models the tree data structure using WTF::TreeNode and provides a set of
// virtual functions.
//
@@ -65,12 +67,6 @@ 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 <|- HTMLImportsController <- Document
-// *
-// |
-// <|- HTMLImportChild <- LinkStyle <- HTMLLinkElement
-//
-//
// # Import Sharing and HTMLImportLoader
//
// The HTML Imports spec calls for de-dup mechanism to share already loaded imports.
@@ -94,7 +90,7 @@ class KURL;
// In such case, the preceding import should be loaded and following ones should be de-duped.
//
-// The superclass of HTMLImportsController and HTMLImportChild
+// The superclass of HTMLImportTreeRoot and HTMLImportChild
// This represents the import tree data structure.
class HTMLImport : public TreeNode<HTMLImport> {
public:
@@ -105,6 +101,7 @@ public:
virtual ~HTMLImport() { }
+ // FIXME: Consider returning HTMLImportTreeRoot.
HTMLImport* root();
bool precedes(HTMLImport*);
bool isRoot() const { return !isChild(); }
« no previous file with comments | « Source/core/core.gypi ('k') | Source/core/html/imports/HTMLImportChild.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698