| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) | 2 * Copyright (C) 1999 Lars Knoll (knoll@kde.org) |
| 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) | 3 * (C) 1999 Antti Koivisto (koivisto@kde.org) |
| 4 * (C) 2001 Dirk Mueller (mueller@kde.org) | 4 * (C) 2001 Dirk Mueller (mueller@kde.org) |
| 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) | 5 * (C) 2006 Alexey Proskuryakov (ap@webkit.org) |
| 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All |
| 7 * rights reserved. | 7 * rights reserved. |
| 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. |
| 9 * (http://www.torchmobile.com/) | 9 * (http://www.torchmobile.com/) |
| 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 10 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
| (...skipping 3326 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3337 } | 3337 } |
| 3338 | 3338 |
| 3339 void Document::didLoadAllImports() { | 3339 void Document::didLoadAllImports() { |
| 3340 if (!haveScriptBlockingStylesheetsLoaded()) | 3340 if (!haveScriptBlockingStylesheetsLoaded()) |
| 3341 return; | 3341 return; |
| 3342 if (!importLoader()) | 3342 if (!importLoader()) |
| 3343 styleResolverMayHaveChanged(); | 3343 styleResolverMayHaveChanged(); |
| 3344 didLoadAllScriptBlockingResources(); | 3344 didLoadAllScriptBlockingResources(); |
| 3345 } | 3345 } |
| 3346 | 3346 |
| 3347 void Document::didAddPendingStylesheetInBody() { |
| 3348 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) |
| 3349 parser->didAddPendingStylesheetInBody(); |
| 3350 } |
| 3351 |
| 3347 void Document::didRemoveAllPendingStylesheet() { | 3352 void Document::didRemoveAllPendingStylesheet() { |
| 3348 styleResolverMayHaveChanged(); | 3353 styleResolverMayHaveChanged(); |
| 3349 | 3354 |
| 3350 // Only imports on master documents can trigger rendering. | 3355 // Only imports on master documents can trigger rendering. |
| 3351 if (HTMLImportLoader* import = importLoader()) | 3356 if (HTMLImportLoader* import = importLoader()) |
| 3352 import->didRemoveAllPendingStylesheet(); | 3357 import->didRemoveAllPendingStylesheet(); |
| 3358 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) |
| 3359 parser->didLoadAllStylesheets(); |
| 3353 if (!haveImportsLoaded()) | 3360 if (!haveImportsLoaded()) |
| 3354 return; | 3361 return; |
| 3355 didLoadAllScriptBlockingResources(); | 3362 didLoadAllScriptBlockingResources(); |
| 3356 } | 3363 } |
| 3357 | 3364 |
| 3358 void Document::didLoadAllScriptBlockingResources() { | 3365 void Document::didLoadAllScriptBlockingResources() { |
| 3359 if (m_executeScriptsWaitingForResourcesTaskHandle.isActive()) | 3366 if (m_executeScriptsWaitingForResourcesTaskHandle.isActive()) |
| 3360 return; | 3367 return; |
| 3361 | 3368 |
| 3362 // Use wrapWeakPersistent because the task should not keep this Document alive | 3369 // Use wrapWeakPersistent because the task should not keep this Document alive |
| (...skipping 3225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6588 } | 6595 } |
| 6589 | 6596 |
| 6590 void showLiveDocumentInstances() { | 6597 void showLiveDocumentInstances() { |
| 6591 WeakDocumentSet& set = liveDocumentSet(); | 6598 WeakDocumentSet& set = liveDocumentSet(); |
| 6592 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6599 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
| 6593 for (Document* document : set) | 6600 for (Document* document : set) |
| 6594 fprintf(stderr, "- Document %p URL: %s\n", document, | 6601 fprintf(stderr, "- Document %p URL: %s\n", document, |
| 6595 document->url().getString().utf8().data()); | 6602 document->url().getString().utf8().data()); |
| 6596 } | 6603 } |
| 6597 #endif | 6604 #endif |
| OLD | NEW |