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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
141 clear(); | 141 clear(); |
142 } | 142 } |
143 | 143 |
144 bool HTMLImportsController::hasLoader() const | 144 bool HTMLImportsController::hasLoader() const |
145 { | 145 { |
146 return true; | 146 return true; |
147 } | 147 } |
148 | 148 |
149 bool HTMLImportsController::isDone() const | 149 bool HTMLImportsController::isDone() const |
150 { | 150 { |
151 return !m_master->parsing(); | 151 return !m_master->parsing() && m_master->haveStylesheetsLoaded(); |
152 } | 152 } |
153 | 153 |
154 void HTMLImportsController::stateDidChange() | 154 void HTMLImportsController::stateDidChange() |
155 { | 155 { |
156 HTMLImport::stateDidChange(); | 156 HTMLImport::stateDidChange(); |
157 | 157 |
158 if (!state().isReady()) | 158 if (!state().isReady()) |
159 return; | 159 return; |
160 if (LocalFrame* frame = m_master->frame()) | 160 if (LocalFrame* frame = m_master->frame()) |
161 frame->loader().checkCompleted(); | 161 frame->loader().checkCompleted(); |
162 } | 162 } |
163 | 163 |
164 void HTMLImportsController::scheduleRecalcState() | 164 void HTMLImportsController::scheduleRecalcState() |
165 { | 165 { |
166 if (m_recalcTimer.isActive()) | 166 if (m_recalcTimer.isActive()) |
167 return; | 167 return; |
168 m_recalcTimer.startOneShot(0, FROM_HERE); | 168 m_recalcTimer.startOneShot(0, FROM_HERE); |
169 } | 169 } |
170 | 170 |
171 void HTMLImportsController::recalcTimerFired(Timer<HTMLImportsController>*) | 171 void HTMLImportsController::recalcTimerFired(Timer<HTMLImportsController>*) |
172 { | 172 { |
173 do { | 173 do { |
174 m_recalcTimer.stop(); | 174 m_recalcTimer.stop(); |
175 HTMLImport::recalcTreeState(this); | 175 HTMLImport::recalcTreeState(this); |
176 } while (m_recalcTimer.isActive()); | 176 } while (m_recalcTimer.isActive()); |
177 } | 177 } |
178 | 178 |
179 } // namespace WebCore | 179 } // namespace WebCore |
OLD | NEW |