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(); |
3348 if (!haveImportsLoaded()) | 3353 if (!haveImportsLoaded()) |
3349 return; | 3354 return; |
3350 didLoadAllScriptBlockingResources(); | 3355 didLoadAllScriptBlockingResources(); |
3351 } | 3356 } |
3352 | 3357 |
| 3358 void Document::didRemoveAllPendingBodyStylesheets() { |
| 3359 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) |
| 3360 parser->didLoadAllBodyStylesheets(); |
| 3361 } |
| 3362 |
3353 void Document::didLoadAllScriptBlockingResources() { | 3363 void Document::didLoadAllScriptBlockingResources() { |
3354 // Use wrapWeakPersistent because the task should not keep this Document alive | 3364 // Use wrapWeakPersistent because the task should not keep this Document alive |
3355 // just for executing scripts. | 3365 // just for executing scripts. |
3356 m_executeScriptsWaitingForResourcesTaskHandle = | 3366 m_executeScriptsWaitingForResourcesTaskHandle = |
3357 TaskRunnerHelper::get(TaskType::Networking, this) | 3367 TaskRunnerHelper::get(TaskType::Networking, this) |
3358 ->postCancellableTask( | 3368 ->postCancellableTask( |
3359 BLINK_FROM_HERE, | 3369 BLINK_FROM_HERE, |
3360 WTF::bind(&Document::executeScriptsWaitingForResources, | 3370 WTF::bind(&Document::executeScriptsWaitingForResources, |
3361 wrapWeakPersistent(this))); | 3371 wrapWeakPersistent(this))); |
3362 | 3372 |
(...skipping 3106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6469 } | 6479 } |
6470 | 6480 |
6471 void showLiveDocumentInstances() { | 6481 void showLiveDocumentInstances() { |
6472 WeakDocumentSet& set = liveDocumentSet(); | 6482 WeakDocumentSet& set = liveDocumentSet(); |
6473 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6483 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6474 for (Document* document : set) | 6484 for (Document* document : set) |
6475 fprintf(stderr, "- Document %p URL: %s\n", document, | 6485 fprintf(stderr, "- Document %p URL: %s\n", document, |
6476 document->url().getString().utf8().data()); | 6486 document->url().getString().utf8().data()); |
6477 } | 6487 } |
6478 #endif | 6488 #endif |
OLD | NEW |