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

Side by Side Diff: Source/core/html/imports/HTMLImport.h

Issue 305723004: Make HTMLImportTreeNode own the whole import tree. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Comments addressed. Created 6 years, 6 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | Source/core/html/imports/HTMLImportTreeRoot.h » ('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) 2013 Google Inc. All rights reserved. 2 * Copyright (C) 2013 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 // 49 //
50 // ## The Import Tree 50 // ## The Import Tree
51 // 51 //
52 // HTML Imports form a tree: 52 // HTML Imports form a tree:
53 // 53 //
54 // * The root of the tree is HTMLImportTreeRoot. 54 // * The root of the tree is HTMLImportTreeRoot.
55 // 55 //
56 // * The HTMLImportTreeRoot is owned HTMLImportsController, which is owned by th e master 56 // * The HTMLImportTreeRoot is owned HTMLImportsController, which is owned by th e master
57 // document as a DocumentSupplement. 57 // document as a DocumentSupplement.
58 // 58 //
59 // * The non-root nodes are HTMLImportChild. They are also owned by HTMLImportsC ontroller. 59 // * The non-root nodes are HTMLImportChild. They are all owned by HTMLImporTree Root.
60 // LinkStyle is wired into HTMLImportChild by implementing HTMLImportChildClie nt interface 60 // LinkStyle is wired into HTMLImportChild by implementing HTMLImportChildClie nt interface
61 // 61 //
62 // * Both HTMLImportTreeRoot and HTMLImportChild are derived from HTMLImport sup erclass 62 // * Both HTMLImportTreeRoot and HTMLImportChild are derived from HTMLImport sup erclass
63 // that models the tree data structure using WTF::TreeNode and provides a set of 63 // that models the tree data structure using WTF::TreeNode and provides a set of
64 // virtual functions. 64 // virtual functions.
65 // 65 //
66 // HTMLImportsController also owns all loaders in the tree and manages their lif etime through it. 66 // HTMLImportsController also owns all loaders in the tree and manages their lif etime through it.
67 // One assumption is that the tree is append-only and nodes are never inserted i n the middle of the tree nor removed. 67 // One assumption is that the tree is append-only and nodes are never inserted i n the middle of the tree nor removed.
68 // 68 //
69 // Full diagram is here:
70 // https://docs.google.com/drawings/d/1jFQrO0IupWrlykTNzQ3Nv2SdiBiSz4UE9-V3-vDgB b0/
69 // 71 //
70 // # Import Sharing and HTMLImportLoader 72 // # Import Sharing and HTMLImportLoader
71 // 73 //
72 // The HTML Imports spec calls for de-dup mechanism to share already loaded impo rts. 74 // The HTML Imports spec calls for de-dup mechanism to share already loaded impo rts.
73 // To implement this, the actual loading machinery is split out from HTMLImportC hild to 75 // To implement this, the actual loading machinery is split out from HTMLImportC hild to
74 // HTMLImportLoader, and each loader shares HTMLImportLoader with other loader i f the URL is same. 76 // HTMLImportLoader, and each loader shares HTMLImportLoader with other loader i f the URL is same.
75 // Check around HTMLImportsController::findLink() for more detail. 77 // Check around HTMLImportsController::findLink() for more detail.
76 // 78 //
77 // HTMLImportLoader can be shared by multiple imports. 79 // HTMLImportLoader can be shared by multiple imports.
78 // 80 //
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 #endif 136 #endif
135 137
136 private: 138 private:
137 HTMLImportState m_state; 139 HTMLImportState m_state;
138 unsigned m_sync : 1; 140 unsigned m_sync : 1;
139 }; 141 };
140 142
141 } // namespace WebCore 143 } // namespace WebCore
142 144
143 #endif // HTMLImport_h 145 #endif // HTMLImport_h
OLDNEW
« no previous file with comments | « no previous file | Source/core/html/imports/HTMLImportTreeRoot.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698