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 3053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3064 // For non-HTML there is no body so resume as soon as the sheets are loa
ded. | 3064 // For non-HTML there is no body so resume as soon as the sheets are loa
ded. |
3065 beginLifecycleUpdatesIfRenderingReady(); | 3065 beginLifecycleUpdatesIfRenderingReady(); |
3066 } | 3066 } |
3067 | 3067 |
3068 if (m_gotoAnchorNeededAfterStylesheetsLoad && view()) | 3068 if (m_gotoAnchorNeededAfterStylesheetsLoad && view()) |
3069 view()->processUrlFragment(m_url); | 3069 view()->processUrlFragment(m_url); |
3070 } | 3070 } |
3071 | 3071 |
3072 void Document::executeScriptsWaitingForResources() | 3072 void Document::executeScriptsWaitingForResources() |
3073 { | 3073 { |
3074 if (!isRenderingReady()) | 3074 if (!isScriptExecutionReady()) |
3075 return; | 3075 return; |
3076 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) | 3076 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) |
3077 parser->executeScriptsWaitingForResources(); | 3077 parser->executeScriptsWaitingForResources(); |
3078 } | 3078 } |
3079 | 3079 |
3080 CSSStyleSheet& Document::elementSheet() | 3080 CSSStyleSheet& Document::elementSheet() |
3081 { | 3081 { |
3082 if (!m_elemSheet) | 3082 if (!m_elemSheet) |
3083 m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL); | 3083 m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL); |
3084 return *m_elemSheet; | 3084 return *m_elemSheet; |
(...skipping 2585 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5670 nodesToAddToChain[i]->setHovered(true); | 5670 nodesToAddToChain[i]->setHovered(true); |
5671 } | 5671 } |
5672 } | 5672 } |
5673 } | 5673 } |
5674 | 5674 |
5675 bool Document::haveStylesheetsLoaded() const | 5675 bool Document::haveStylesheetsLoaded() const |
5676 { | 5676 { |
5677 return m_styleEngine->haveStylesheetsLoaded(); | 5677 return m_styleEngine->haveStylesheetsLoaded(); |
5678 } | 5678 } |
5679 | 5679 |
| 5680 bool Document::haveRenderBlockingStylesheetsLoaded() const |
| 5681 { |
| 5682 if (RuntimeEnabledFeatures::cssInBodyDoesNotBlockPaintEnabled()) |
| 5683 return m_styleEngine->haveRenderBlockingStylesheetsLoaded(); |
| 5684 return m_styleEngine->haveStylesheetsLoaded(); |
| 5685 } |
| 5686 |
5680 Locale& Document::getCachedLocale(const AtomicString& locale) | 5687 Locale& Document::getCachedLocale(const AtomicString& locale) |
5681 { | 5688 { |
5682 AtomicString localeKey = locale; | 5689 AtomicString localeKey = locale; |
5683 if (locale.isEmpty() || !RuntimeEnabledFeatures::langAttributeAwareFormContr
olUIEnabled()) | 5690 if (locale.isEmpty() || !RuntimeEnabledFeatures::langAttributeAwareFormContr
olUIEnabled()) |
5684 return Locale::defaultLocale(); | 5691 return Locale::defaultLocale(); |
5685 LocaleIdentifierToLocaleMap::AddResult result = m_localeCache.add(localeKey,
nullptr); | 5692 LocaleIdentifierToLocaleMap::AddResult result = m_localeCache.add(localeKey,
nullptr); |
5686 if (result.isNewEntry) | 5693 if (result.isNewEntry) |
5687 result.storedValue->value = Locale::create(localeKey); | 5694 result.storedValue->value = Locale::create(localeKey); |
5688 return *(result.storedValue->value); | 5695 return *(result.storedValue->value); |
5689 } | 5696 } |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6005 #ifndef NDEBUG | 6012 #ifndef NDEBUG |
6006 using namespace blink; | 6013 using namespace blink; |
6007 void showLiveDocumentInstances() | 6014 void showLiveDocumentInstances() |
6008 { | 6015 { |
6009 Document::WeakDocumentSet& set = Document::liveDocumentSet(); | 6016 Document::WeakDocumentSet& set = Document::liveDocumentSet(); |
6010 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); | 6017 fprintf(stderr, "There are %u documents currently alive:\n", set.size()); |
6011 for (Document* document : set) | 6018 for (Document* document : set) |
6012 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); | 6019 fprintf(stderr, "- Document %p URL: %s\n", document, document->url().get
String().utf8().data()); |
6013 } | 6020 } |
6014 #endif | 6021 #endif |
OLD | NEW |