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 3321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3332 } | 3332 } |
3333 | 3333 |
3334 void Document::didLoadAllImports() { | 3334 void Document::didLoadAllImports() { |
3335 if (!haveScriptBlockingStylesheetsLoaded()) | 3335 if (!haveScriptBlockingStylesheetsLoaded()) |
3336 return; | 3336 return; |
3337 if (!importLoader()) | 3337 if (!importLoader()) |
3338 styleResolverMayHaveChanged(); | 3338 styleResolverMayHaveChanged(); |
3339 didLoadAllScriptBlockingResources(); | 3339 didLoadAllScriptBlockingResources(); |
3340 } | 3340 } |
3341 | 3341 |
| 3342 void Document::didAddPendingStylesheetInBody() { |
| 3343 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) |
| 3344 parser->didAddPendingStylesheetInBody(); |
| 3345 } |
| 3346 |
3342 void Document::didRemoveAllPendingStylesheet() { | 3347 void Document::didRemoveAllPendingStylesheet() { |
3343 styleResolverMayHaveChanged(); | 3348 styleResolverMayHaveChanged(); |
3344 | 3349 |
3345 // Only imports on master documents can trigger rendering. | 3350 // Only imports on master documents can trigger rendering. |
3346 if (HTMLImportLoader* import = importLoader()) | 3351 if (HTMLImportLoader* import = importLoader()) |
3347 import->didRemoveAllPendingStylesheet(); | 3352 import->didRemoveAllPendingStylesheet(); |
| 3353 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) |
| 3354 parser->didLoadAllStylesheets(); |
3348 if (!haveImportsLoaded()) | 3355 if (!haveImportsLoaded()) |
3349 return; | 3356 return; |
3350 didLoadAllScriptBlockingResources(); | 3357 didLoadAllScriptBlockingResources(); |
3351 } | 3358 } |
3352 | 3359 |
3353 void Document::didLoadAllScriptBlockingResources() { | 3360 void Document::didLoadAllScriptBlockingResources() { |
3354 // Use wrapWeakPersistent because the task should not keep this Document alive | 3361 // Use wrapWeakPersistent because the task should not keep this Document alive |
3355 // just for executing scripts. | 3362 // just for executing scripts. |
3356 m_executeScriptsWaitingForResourcesTaskHandle = | 3363 m_executeScriptsWaitingForResourcesTaskHandle = |
3357 TaskRunnerHelper::get(TaskType::Networking, this) | 3364 TaskRunnerHelper::get(TaskType::Networking, this) |
(...skipping 3111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6469 } | 6476 } |
6470 | 6477 |
6471 void showLiveDocumentInstances() { | 6478 void showLiveDocumentInstances() { |
6472 WeakDocumentSet& set = liveDocumentSet(); | 6479 WeakDocumentSet& set = liveDocumentSet(); |
6473 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6480 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6474 for (Document* document : set) | 6481 for (Document* document : set) |
6475 fprintf(stderr, "- Document %p URL: %s\n", document, | 6482 fprintf(stderr, "- Document %p URL: %s\n", document, |
6476 document->url().getString().utf8().data()); | 6483 document->url().getString().utf8().data()); |
6477 } | 6484 } |
6478 #endif | 6485 #endif |
OLD | NEW |