| 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 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 #include "core/html/FormController.h" | 116 #include "core/html/FormController.h" |
| 117 #include "core/html/HTMLAllCollection.h" | 117 #include "core/html/HTMLAllCollection.h" |
| 118 #include "core/html/HTMLAnchorElement.h" | 118 #include "core/html/HTMLAnchorElement.h" |
| 119 #include "core/html/HTMLBodyElement.h" | 119 #include "core/html/HTMLBodyElement.h" |
| 120 #include "core/html/HTMLCanvasElement.h" | 120 #include "core/html/HTMLCanvasElement.h" |
| 121 #include "core/html/HTMLCollection.h" | 121 #include "core/html/HTMLCollection.h" |
| 122 #include "core/html/HTMLDocument.h" | 122 #include "core/html/HTMLDocument.h" |
| 123 #include "core/html/HTMLFrameOwnerElement.h" | 123 #include "core/html/HTMLFrameOwnerElement.h" |
| 124 #include "core/html/HTMLHeadElement.h" | 124 #include "core/html/HTMLHeadElement.h" |
| 125 #include "core/html/HTMLIFrameElement.h" | 125 #include "core/html/HTMLIFrameElement.h" |
| 126 #include "core/html/HTMLImports.h" |
| 126 #include "core/html/HTMLLinkElement.h" | 127 #include "core/html/HTMLLinkElement.h" |
| 127 #include "core/html/HTMLMapElement.h" | 128 #include "core/html/HTMLMapElement.h" |
| 128 #include "core/html/HTMLNameCollection.h" | 129 #include "core/html/HTMLNameCollection.h" |
| 129 #include "core/html/HTMLStyleElement.h" | 130 #include "core/html/HTMLStyleElement.h" |
| 130 #include "core/html/HTMLTitleElement.h" | 131 #include "core/html/HTMLTitleElement.h" |
| 131 #include "core/html/PluginDocument.h" | 132 #include "core/html/PluginDocument.h" |
| 132 #include "core/html/parser/HTMLDocumentParser.h" | 133 #include "core/html/parser/HTMLDocumentParser.h" |
| 133 #include "core/html/parser/HTMLParserIdioms.h" | 134 #include "core/html/parser/HTMLParserIdioms.h" |
| 134 #include "core/html/parser/NestingLevelIncrementer.h" | 135 #include "core/html/parser/NestingLevelIncrementer.h" |
| 135 #include "core/inspector/InspectorCounters.h" | 136 #include "core/inspector/InspectorCounters.h" |
| (...skipping 495 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 631 m_titleElement = 0; | 632 m_titleElement = 0; |
| 632 m_documentElement = 0; | 633 m_documentElement = 0; |
| 633 m_contextFeatures = ContextFeatures::defaultSwitch(); | 634 m_contextFeatures = ContextFeatures::defaultSwitch(); |
| 634 m_userActionElements.documentDidRemoveLastRef(); | 635 m_userActionElements.documentDidRemoveLastRef(); |
| 635 m_fullScreenElement = 0; | 636 m_fullScreenElement = 0; |
| 636 m_fullScreenElementStack.clear(); | 637 m_fullScreenElementStack.clear(); |
| 637 | 638 |
| 638 detachParser(); | 639 detachParser(); |
| 639 | 640 |
| 640 m_registry.clear(); | 641 m_registry.clear(); |
| 642 m_imports.clear(); |
| 641 | 643 |
| 642 // removeDetachedChildren() doesn't always unregister IDs, | 644 // removeDetachedChildren() doesn't always unregister IDs, |
| 643 // so tear down scope information upfront to avoid having stale references i
n the map. | 645 // so tear down scope information upfront to avoid having stale references i
n the map. |
| 644 destroyTreeScopeData(); | 646 destroyTreeScopeData(); |
| 645 removeDetachedChildren(); | 647 removeDetachedChildren(); |
| 646 // removeDetachedChildren() can access FormController. | 648 // removeDetachedChildren() can access FormController. |
| 647 m_formController.clear(); | 649 m_formController.clear(); |
| 648 | 650 |
| 649 m_markers->detach(); | 651 m_markers->detach(); |
| 650 | 652 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 | 858 |
| 857 CustomElementRegistry* Document::ensureCustomElementRegistry() | 859 CustomElementRegistry* Document::ensureCustomElementRegistry() |
| 858 { | 860 { |
| 859 if (!m_registry) { | 861 if (!m_registry) { |
| 860 ASSERT(isHTMLDocument() || isXHTMLDocument()); | 862 ASSERT(isHTMLDocument() || isXHTMLDocument()); |
| 861 m_registry = adoptRef(new CustomElementRegistry(this)); | 863 m_registry = adoptRef(new CustomElementRegistry(this)); |
| 862 } | 864 } |
| 863 return m_registry.get(); | 865 return m_registry.get(); |
| 864 } | 866 } |
| 865 | 867 |
| 868 HTMLImports* Document::imports() |
| 869 { |
| 870 if (!m_imports) |
| 871 m_imports = HTMLImports::create(this); |
| 872 return m_imports.get(); |
| 873 } |
| 874 |
| 875 void Document::didLoadAllImports() |
| 876 { |
| 877 executeScriptsWaitingForResourcesIfNeeded(); |
| 878 } |
| 879 |
| 880 SecurityContext* Document::importsContext() OVERRIDE |
| 881 { |
| 882 return this; |
| 883 } |
| 884 |
| 885 bool Document::haveImportsLoaded() const |
| 886 { |
| 887 return !m_imports || m_imports->haveLoaded(); |
| 888 } |
| 889 |
| 866 PassRefPtr<DocumentFragment> Document::createDocumentFragment() | 890 PassRefPtr<DocumentFragment> Document::createDocumentFragment() |
| 867 { | 891 { |
| 868 return DocumentFragment::create(document()); | 892 return DocumentFragment::create(document()); |
| 869 } | 893 } |
| 870 | 894 |
| 871 PassRefPtr<Text> Document::createTextNode(const String& data) | 895 PassRefPtr<Text> Document::createTextNode(const String& data) |
| 872 { | 896 { |
| 873 return Text::create(this, data); | 897 return Text::create(this, data); |
| 874 } | 898 } |
| 875 | 899 |
| (...skipping 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2618 void Document::seamlessParentUpdatedStylesheets() | 2642 void Document::seamlessParentUpdatedStylesheets() |
| 2619 { | 2643 { |
| 2620 styleResolverChanged(RecalcStyleImmediately); | 2644 styleResolverChanged(RecalcStyleImmediately); |
| 2621 } | 2645 } |
| 2622 | 2646 |
| 2623 void Document::didRemoveAllPendingStylesheet() | 2647 void Document::didRemoveAllPendingStylesheet() |
| 2624 { | 2648 { |
| 2625 m_needsNotifyRemoveAllPendingStylesheet = false; | 2649 m_needsNotifyRemoveAllPendingStylesheet = false; |
| 2626 | 2650 |
| 2627 styleResolverChanged(RecalcStyleIfNeeded); | 2651 styleResolverChanged(RecalcStyleIfNeeded); |
| 2628 | 2652 executeScriptsWaitingForResourcesIfNeeded(); |
| 2629 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) | |
| 2630 parser->executeScriptsWaitingForStylesheets(); | |
| 2631 | 2653 |
| 2632 if (m_gotoAnchorNeededAfterStylesheetsLoad && view()) | 2654 if (m_gotoAnchorNeededAfterStylesheetsLoad && view()) |
| 2633 view()->scrollToFragment(m_url); | 2655 view()->scrollToFragment(m_url); |
| 2634 } | 2656 } |
| 2635 | 2657 |
| 2658 void Document::executeScriptsWaitingForResourcesIfNeeded() |
| 2659 { |
| 2660 if (!haveStylesheetsAndImportsLoaded()) |
| 2661 return; |
| 2662 if (ScriptableDocumentParser* parser = scriptableDocumentParser()) |
| 2663 parser->executeScriptsWaitingForResources(); |
| 2664 } |
| 2665 |
| 2666 |
| 2636 CSSStyleSheet* Document::elementSheet() | 2667 CSSStyleSheet* Document::elementSheet() |
| 2637 { | 2668 { |
| 2638 if (!m_elemSheet) | 2669 if (!m_elemSheet) |
| 2639 m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL); | 2670 m_elemSheet = CSSStyleSheet::createInline(this, m_baseURL); |
| 2640 return m_elemSheet.get(); | 2671 return m_elemSheet.get(); |
| 2641 } | 2672 } |
| 2642 | 2673 |
| 2643 int Document::nodeAbsIndex(Node *node) | 2674 int Document::nodeAbsIndex(Node *node) |
| 2644 { | 2675 { |
| 2645 ASSERT(node->document() == this); | 2676 ASSERT(node->document() == this); |
| (...skipping 2975 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5621 return; | 5652 return; |
| 5622 | 5653 |
| 5623 Vector<RefPtr<Element> > associatedFormControls; | 5654 Vector<RefPtr<Element> > associatedFormControls; |
| 5624 copyToVector(m_associatedFormControls, associatedFormControls); | 5655 copyToVector(m_associatedFormControls, associatedFormControls); |
| 5625 | 5656 |
| 5626 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm
Controls); | 5657 frame()->page()->chrome()->client()->didAssociateFormControls(associatedForm
Controls); |
| 5627 m_associatedFormControls.clear(); | 5658 m_associatedFormControls.clear(); |
| 5628 } | 5659 } |
| 5629 | 5660 |
| 5630 } // namespace WebCore | 5661 } // namespace WebCore |
| OLD | NEW |