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