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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 HTMLImport* root(); | 103 HTMLImport* root(); |
104 bool precedes(HTMLImport*); | 104 bool precedes(HTMLImport*); |
105 bool isRoot() const { return !parent(); } | 105 bool isRoot() const { return !parent(); } |
106 bool isSync() const { return SyncMode(m_sync) == Sync; } | 106 bool isSync() const { return SyncMode(m_sync) == Sync; } |
107 bool formsCycle() const; | 107 bool formsCycle() const; |
108 const HTMLImportState& state() const { return m_state; } | 108 const HTMLImportState& state() const { return m_state; } |
109 | 109 |
110 void appendImport(HTMLImport*); | 110 void appendImport(HTMLImport*); |
111 | 111 |
112 virtual Document* document() const = 0; | 112 virtual Document* document() const = 0; |
113 virtual bool isDone() const = 0; // FIXME: Should be renamed to haveFinished
Loading() | 113 virtual bool hasFinishedLoading() const = 0; |
114 virtual HTMLImportLoader* loader() const { return nullptr; } | 114 virtual HTMLImportLoader* loader() const { return nullptr; } |
115 virtual void stateWillChange() { } | 115 virtual void stateWillChange() { } |
116 virtual void stateDidChange(); | 116 virtual void stateDidChange(); |
117 | 117 |
118 DEFINE_INLINE_VIRTUAL_TRACE() { } | 118 DEFINE_INLINE_VIRTUAL_TRACE() { } |
119 | 119 |
120 protected: | 120 protected: |
121 // Stating from most conservative state. | 121 // Stating from most conservative state. |
122 // It will be corrected through state update flow. | 122 // It will be corrected through state update flow. |
123 explicit HTMLImport(SyncMode sync) | 123 explicit HTMLImport(SyncMode sync) |
124 : m_sync(sync) | 124 : m_sync(sync) |
125 { } | 125 { } |
126 | 126 |
127 static void recalcTreeState(HTMLImport* root); | 127 static void recalcTreeState(HTMLImport* root); |
128 | 128 |
129 #if !defined(NDEBUG) | 129 #if !defined(NDEBUG) |
130 void show(); | 130 void show(); |
131 void showTree(HTMLImport* highlight, unsigned depth); | 131 void showTree(HTMLImport* highlight, unsigned depth); |
132 virtual void showThis(); | 132 virtual void showThis(); |
133 #endif | 133 #endif |
134 | 134 |
135 private: | 135 private: |
136 HTMLImportState m_state; | 136 HTMLImportState m_state; |
137 unsigned m_sync : 1; | 137 unsigned m_sync : 1; |
138 }; | 138 }; |
139 | 139 |
140 } // namespace blink | 140 } // namespace blink |
141 | 141 |
142 #endif // HTMLImport_h | 142 #endif // HTMLImport_h |
OLD | NEW |