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 r
ights reserved. | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2011, 2012 Apple Inc. All r
ights reserved. |
7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) | 7 * Copyright (C) 2008, 2009 Torch Mobile Inc. All rights reserved. (http://www.t
orchmobile.com/) |
8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. | 8 * Copyright (C) 2008, 2009, 2011, 2012 Google Inc. All rights reserved. |
9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) | 9 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. | 10 * Copyright (C) Research In Motion Limited 2010-2011. All rights reserved. |
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
205 #include "platform/network/HTTPParsers.h" | 205 #include "platform/network/HTTPParsers.h" |
206 #include "platform/scroll/ScrollbarTheme.h" | 206 #include "platform/scroll/ScrollbarTheme.h" |
207 #include "platform/text/PlatformLocale.h" | 207 #include "platform/text/PlatformLocale.h" |
208 #include "platform/text/SegmentedString.h" | 208 #include "platform/text/SegmentedString.h" |
209 #include "platform/weborigin/OriginAccessEntry.h" | 209 #include "platform/weborigin/OriginAccessEntry.h" |
210 #include "platform/weborigin/SchemeRegistry.h" | 210 #include "platform/weborigin/SchemeRegistry.h" |
211 #include "platform/weborigin/SecurityOrigin.h" | 211 #include "platform/weborigin/SecurityOrigin.h" |
212 #include "public/platform/Platform.h" | 212 #include "public/platform/Platform.h" |
213 #include "wtf/CurrentTime.h" | 213 #include "wtf/CurrentTime.h" |
214 #include "wtf/DateMath.h" | 214 #include "wtf/DateMath.h" |
215 #include "wtf/Functional.h" | |
216 #include "wtf/HashFunctions.h" | 215 #include "wtf/HashFunctions.h" |
217 #include "wtf/MainThread.h" | 216 #include "wtf/MainThread.h" |
218 #include "wtf/StdLibExtras.h" | 217 #include "wtf/StdLibExtras.h" |
219 #include "wtf/TemporaryChange.h" | 218 #include "wtf/TemporaryChange.h" |
220 #include "wtf/text/StringBuffer.h" | 219 #include "wtf/text/StringBuffer.h" |
221 #include "wtf/text/TextEncodingRegistry.h" | 220 #include "wtf/text/TextEncodingRegistry.h" |
222 | 221 |
223 using namespace WTF; | 222 using namespace WTF; |
224 using namespace Unicode; | 223 using namespace Unicode; |
225 | 224 |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
374 , m_frame(initializer.frame()) | 373 , m_frame(initializer.frame()) |
375 , m_domWindow(m_frame ? m_frame->localDOMWindow() : 0) | 374 , m_domWindow(m_frame ? m_frame->localDOMWindow() : 0) |
376 , m_importsController(initializer.importsController()) | 375 , m_importsController(initializer.importsController()) |
377 , m_activeParserCount(0) | 376 , m_activeParserCount(0) |
378 , m_contextFeatures(ContextFeatures::defaultSwitch()) | 377 , m_contextFeatures(ContextFeatures::defaultSwitch()) |
379 , m_wellFormed(false) | 378 , m_wellFormed(false) |
380 , m_printing(false) | 379 , m_printing(false) |
381 , m_paginatedForScreen(false) | 380 , m_paginatedForScreen(false) |
382 , m_compatibilityMode(NoQuirksMode) | 381 , m_compatibilityMode(NoQuirksMode) |
383 , m_compatibilityModeLocked(false) | 382 , m_compatibilityModeLocked(false) |
384 , m_executeScriptsWaitingForResourcesTask(WTF::bind(&Document::executeScript
sWaitingForResources, this)) | 383 , m_executeScriptsWaitingForResourcesTimer(this, &Document::executeScriptsWa
itingForResourcesTimerFired) |
385 , m_hasAutofocused(false) | 384 , m_hasAutofocused(false) |
386 , m_clearFocusedElementTimer(this, &Document::clearFocusedElementTimerFired) | 385 , m_clearFocusedElementTimer(this, &Document::clearFocusedElementTimerFired) |
387 , m_domTreeVersion(++s_globalTreeVersion) | 386 , m_domTreeVersion(++s_globalTreeVersion) |
388 , m_styleVersion(0) | 387 , m_styleVersion(0) |
389 , m_listenerTypes(0) | 388 , m_listenerTypes(0) |
390 , m_mutationObserverTypes(0) | 389 , m_mutationObserverTypes(0) |
391 , m_visitedLinkState(VisitedLinkState::create(*this)) | 390 , m_visitedLinkState(VisitedLinkState::create(*this)) |
392 , m_visuallyOrdered(false) | 391 , m_visuallyOrdered(false) |
393 , m_readyState(Complete) | 392 , m_readyState(Complete) |
394 , m_parsingState(FinishedParsing) | 393 , m_parsingState(FinishedParsing) |
(...skipping 2555 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2950 // Only imports on master documents can trigger rendering. | 2949 // Only imports on master documents can trigger rendering. |
2951 if (HTMLImportLoader* import = importLoader()) | 2950 if (HTMLImportLoader* import = importLoader()) |
2952 import->didRemoveAllPendingStylesheet(); | 2951 import->didRemoveAllPendingStylesheet(); |
2953 if (!haveImportsLoaded()) | 2952 if (!haveImportsLoaded()) |
2954 return; | 2953 return; |
2955 didLoadAllScriptBlockingResources(); | 2954 didLoadAllScriptBlockingResources(); |
2956 } | 2955 } |
2957 | 2956 |
2958 void Document::didLoadAllScriptBlockingResources() | 2957 void Document::didLoadAllScriptBlockingResources() |
2959 { | 2958 { |
2960 Platform::current()->currentThread()->scheduler()->postLoadingTask( | 2959 m_executeScriptsWaitingForResourcesTimer.startOneShot(0, FROM_HERE); |
2961 FROM_HERE, m_executeScriptsWaitingForResourcesTask.cancelAndCreate()); | |
2962 | 2960 |
2963 if (frame()) | 2961 if (frame()) |
2964 frame()->loader().client()->didRemoveAllPendingStylesheet(); | 2962 frame()->loader().client()->didRemoveAllPendingStylesheet(); |
2965 | 2963 |
2966 if (m_gotoAnchorNeededAfterStylesheetsLoad && view()) | 2964 if (m_gotoAnchorNeededAfterStylesheetsLoad && view()) |
2967 view()->processUrlFragment(m_url); | 2965 view()->processUrlFragment(m_url); |
2968 } | 2966 } |
2969 | 2967 |
2970 void Document::executeScriptsWaitingForResources() | 2968 void Document::executeScriptsWaitingForResourcesTimerFired(Timer<Document>*) |
2971 { | 2969 { |
2972 if (!isRenderingReady()) | 2970 if (!isRenderingReady()) |
2973 return; | 2971 return; |
2974 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) | 2972 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) |
2975 parser->executeScriptsWaitingForResources(); | 2973 parser->executeScriptsWaitingForResources(); |
2976 } | 2974 } |
2977 | 2975 |
2978 CSSStyleSheet& Document::elementSheet() | 2976 CSSStyleSheet& Document::elementSheet() |
2979 { | 2977 { |
2980 if (!m_elemSheet) | 2978 if (!m_elemSheet) |
(...skipping 2739 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5720 #ifndef NDEBUG | 5718 #ifndef NDEBUG |
5721 using namespace blink; | 5719 using namespace blink; |
5722 void showLiveDocumentInstances() | 5720 void showLiveDocumentInstances() |
5723 { | 5721 { |
5724 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 5722 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
5725 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 5723 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
5726 for (Document* document : set) | 5724 for (Document* document : set) |
5727 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); | 5725 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().str
ing().utf8().data()); |
5728 } | 5726 } |
5729 #endif | 5727 #endif |
OLD | NEW |