| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |