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

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

Issue 1306413003: Make classes and structures in core/html fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « Source/core/html/forms/TypeAhead.h ('k') | Source/core/html/imports/HTMLImportLoader.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 15 matching lines...) Expand all
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #ifndef HTMLImport_h 31 #ifndef HTMLImport_h
32 #define HTMLImport_h 32 #define HTMLImport_h
33 33
34 #include "core/html/imports/HTMLImportState.h" 34 #include "core/html/imports/HTMLImportState.h"
35 #include "platform/heap/Handle.h" 35 #include "platform/heap/Handle.h"
36 #include "wtf/Allocator.h"
36 #include "wtf/TreeNode.h" 37 #include "wtf/TreeNode.h"
37 38
38 namespace blink { 39 namespace blink {
39 40
40 class Document; 41 class Document;
41 class HTMLImportLoader; 42 class HTMLImportLoader;
42 43
43 // 44 //
44 // # Basic Data Structure and Algorithms of HTML Imports implemenation. 45 // # Basic Data Structure and Algorithms of HTML Imports implemenation.
45 // 46 //
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
84 // Note that dynamically added import won't block the parser. 85 // Note that dynamically added import won't block the parser.
85 // 86 //
86 // - An import under loading also blocks imported documents that follow from bei ng created. 87 // - An import under loading also blocks imported documents that follow from bei ng created.
87 // This is because an import can include another import that has same URLs of following ones. 88 // This is because an import can include another import that has same URLs of following ones.
88 // In such case, the preceding import should be loaded and following ones shou ld be de-duped. 89 // In such case, the preceding import should be loaded and following ones shou ld be de-duped.
89 // 90 //
90 91
91 // The superclass of HTMLImportTreeRoot and HTMLImportChild 92 // The superclass of HTMLImportTreeRoot and HTMLImportChild
92 // This represents the import tree data structure. 93 // This represents the import tree data structure.
93 class HTMLImport : public NoBaseWillBeGarbageCollectedFinalized<HTMLImport>, pub lic TreeNode<HTMLImport> { 94 class HTMLImport : public NoBaseWillBeGarbageCollectedFinalized<HTMLImport>, pub lic TreeNode<HTMLImport> {
95 WTF_MAKE_FAST_ALLOCATED_WILL_BE_REMOVED(HTMLImport);
94 public: 96 public:
95 enum SyncMode { 97 enum SyncMode {
96 Sync = 0, 98 Sync = 0,
97 Async = 1 99 Async = 1
98 }; 100 };
99 101
100 virtual ~HTMLImport() { } 102 virtual ~HTMLImport() { }
101 103
102 // FIXME: Consider returning HTMLImportTreeRoot. 104 // FIXME: Consider returning HTMLImportTreeRoot.
103 HTMLImport* root(); 105 HTMLImport* root();
(...skipping 29 matching lines...) Expand all
133 #endif 135 #endif
134 136
135 private: 137 private:
136 HTMLImportState m_state; 138 HTMLImportState m_state;
137 unsigned m_sync : 1; 139 unsigned m_sync : 1;
138 }; 140 };
139 141
140 } // namespace blink 142 } // namespace blink
141 143
142 #endif // HTMLImport_h 144 #endif // HTMLImport_h
OLDNEW
« no previous file with comments | « Source/core/html/forms/TypeAhead.h ('k') | Source/core/html/imports/HTMLImportLoader.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698