Index: Source/core/html/imports/HTMLImport.h |
diff --git a/Source/core/html/imports/HTMLImport.h b/Source/core/html/imports/HTMLImport.h |
index 8c463aa462a776f698c41473948b296fdf13333f..40b25f6d1ede7f362c7d14b605394f6588374ff7 100644 |
--- a/Source/core/html/imports/HTMLImport.h |
+++ b/Source/core/html/imports/HTMLImport.h |
@@ -101,6 +101,11 @@ class KURL; |
// This represents the import tree data structure. |
class HTMLImport : public TreeNode<HTMLImport> { |
public: |
+ enum SyncMode { |
+ Sync = 0, |
+ Async = 1 |
+ }; |
+ |
static bool isMaster(Document*); |
virtual ~HTMLImport() { } |
@@ -109,7 +114,7 @@ public: |
Document* master(); |
HTMLImportsController* controller(); |
bool isRoot() const { return !isChild(); } |
- bool isSync() const { return m_sync; } |
+ bool isSync() const { return SyncMode(m_sync) == Sync; } |
const HTMLImportState& state() const { return m_state; } |
void appendChild(HTMLImport*); |
@@ -129,7 +134,7 @@ public: |
protected: |
// Stating from most conservative state. |
// It will be corrected through state update flow. |
- explicit HTMLImport(bool sync = false) |
+ explicit HTMLImport(SyncMode sync) |
: m_sync(sync) |
{ } |
@@ -144,13 +149,13 @@ protected: |
private: |
HTMLImportState m_state; |
- bool m_sync : 1; |
+ unsigned m_sync : 1; |
}; |
// An abstract class to decouple its sublcass HTMLImportsController. |
class HTMLImportRoot : public HTMLImport { |
public: |
- HTMLImportRoot() { } |
+ HTMLImportRoot() : HTMLImport(Sync) { } |
virtual void scheduleRecalcState() = 0; |
virtual HTMLImportsController* toController() = 0; |