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, 2010, 2012 Apple Inc. All | 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) | 10 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies) |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 class Page; | 145 class Page; |
146 class ProcessingInstruction; | 146 class ProcessingInstruction; |
147 class PropertyRegistry; | 147 class PropertyRegistry; |
148 class QualifiedName; | 148 class QualifiedName; |
149 class Range; | 149 class Range; |
150 class ResizeObserverController; | 150 class ResizeObserverController; |
151 class ResourceFetcher; | 151 class ResourceFetcher; |
152 class RootScrollerController; | 152 class RootScrollerController; |
153 class SVGDocumentExtensions; | 153 class SVGDocumentExtensions; |
154 class SVGUseElement; | 154 class SVGUseElement; |
| 155 class ScriptLoaderClient; |
155 class ScriptRunner; | 156 class ScriptRunner; |
156 class ScriptableDocumentParser; | 157 class ScriptableDocumentParser; |
157 class ScriptedAnimationController; | 158 class ScriptedAnimationController; |
158 class ScriptedIdleTaskController; | 159 class ScriptedIdleTaskController; |
159 class Scrollbar; | 160 class Scrollbar; |
160 class SecurityOrigin; | 161 class SecurityOrigin; |
161 class SegmentedString; | 162 class SegmentedString; |
162 class SelectorQueryCache; | 163 class SelectorQueryCache; |
163 class SerializedScriptValue; | 164 class SerializedScriptValue; |
164 class Settings; | 165 class Settings; |
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
921 bool inDesignMode() const { return m_designMode; } | 922 bool inDesignMode() const { return m_designMode; } |
922 String designMode() const; | 923 String designMode() const; |
923 void setDesignMode(const String&); | 924 void setDesignMode(const String&); |
924 | 925 |
925 Document* parentDocument() const; | 926 Document* parentDocument() const; |
926 Document& topDocument() const; | 927 Document& topDocument() const; |
927 Document* contextDocument(); | 928 Document* contextDocument(); |
928 | 929 |
929 ScriptRunner* scriptRunner() { return m_scriptRunner.get(); } | 930 ScriptRunner* scriptRunner() { return m_scriptRunner.get(); } |
930 | 931 |
931 Element* currentScript() const { | |
932 return !m_currentScriptStack.isEmpty() ? m_currentScriptStack.back().get() | |
933 : nullptr; | |
934 } | |
935 void currentScriptForBinding(HTMLScriptElementOrSVGScriptElement&) const; | 932 void currentScriptForBinding(HTMLScriptElementOrSVGScriptElement&) const; |
936 void pushCurrentScript(Element*); | 933 void pushCurrentScript(ScriptLoaderClient*); |
937 void popCurrentScript(); | 934 void popCurrentScript(ScriptLoaderClient*); |
938 | 935 |
939 void setTransformSource(std::unique_ptr<TransformSource>); | 936 void setTransformSource(std::unique_ptr<TransformSource>); |
940 TransformSource* transformSource() const { return m_transformSource.get(); } | 937 TransformSource* transformSource() const { return m_transformSource.get(); } |
941 | 938 |
942 void incDOMTreeVersion() { | 939 void incDOMTreeVersion() { |
943 DCHECK(m_lifecycle.stateAllowsTreeMutations()); | 940 DCHECK(m_lifecycle.stateAllowsTreeMutations()); |
944 m_domTreeVersion = ++s_globalTreeVersion; | 941 m_domTreeVersion = ++s_globalTreeVersion; |
945 } | 942 } |
946 uint64_t domTreeVersion() const { return m_domTreeVersion; } | 943 uint64_t domTreeVersion() const { return m_domTreeVersion; } |
947 | 944 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 SVGDocumentExtensions& accessSVGExtensions(); | 1013 SVGDocumentExtensions& accessSVGExtensions(); |
1017 | 1014 |
1018 void initContentSecurityPolicy(ContentSecurityPolicy* = nullptr); | 1015 void initContentSecurityPolicy(ContentSecurityPolicy* = nullptr); |
1019 | 1016 |
1020 bool isSecureTransitionTo(const KURL&) const; | 1017 bool isSecureTransitionTo(const KURL&) const; |
1021 | 1018 |
1022 bool allowInlineEventHandler(Node*, | 1019 bool allowInlineEventHandler(Node*, |
1023 EventListener*, | 1020 EventListener*, |
1024 const String& contextURL, | 1021 const String& contextURL, |
1025 const WTF::OrdinalNumber& contextLine); | 1022 const WTF::OrdinalNumber& contextLine); |
1026 bool allowExecutingScripts(Node*); | |
1027 | 1023 |
1028 void enforceSandboxFlags(SandboxFlags mask) override; | 1024 void enforceSandboxFlags(SandboxFlags mask) override; |
1029 | 1025 |
1030 void statePopped(PassRefPtr<SerializedScriptValue>); | 1026 void statePopped(PassRefPtr<SerializedScriptValue>); |
1031 | 1027 |
1032 enum LoadEventProgress { | 1028 enum LoadEventProgress { |
1033 LoadEventNotRun, | 1029 LoadEventNotRun, |
1034 LoadEventInProgress, | 1030 LoadEventInProgress, |
1035 LoadEventCompleted, | 1031 LoadEventCompleted, |
1036 BeforeUnloadEventInProgress, | 1032 BeforeUnloadEventInProgress, |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1538 TaskRunnerTimer<Document> m_updateFocusAppearanceTimer; | 1534 TaskRunnerTimer<Document> m_updateFocusAppearanceTimer; |
1539 | 1535 |
1540 Member<Element> m_cssTarget; | 1536 Member<Element> m_cssTarget; |
1541 | 1537 |
1542 LoadEventProgress m_loadEventProgress; | 1538 LoadEventProgress m_loadEventProgress; |
1543 | 1539 |
1544 double m_startTime; | 1540 double m_startTime; |
1545 | 1541 |
1546 Member<ScriptRunner> m_scriptRunner; | 1542 Member<ScriptRunner> m_scriptRunner; |
1547 | 1543 |
1548 HeapVector<Member<Element>> m_currentScriptStack; | 1544 HeapVector<Member<ScriptLoaderClient>> m_currentScriptStack; |
1549 | 1545 |
1550 std::unique_ptr<TransformSource> m_transformSource; | 1546 std::unique_ptr<TransformSource> m_transformSource; |
1551 | 1547 |
1552 String m_xmlEncoding; | 1548 String m_xmlEncoding; |
1553 String m_xmlVersion; | 1549 String m_xmlVersion; |
1554 unsigned m_xmlStandalone : 2; | 1550 unsigned m_xmlStandalone : 2; |
1555 unsigned m_hasXMLDeclaration : 1; | 1551 unsigned m_hasXMLDeclaration : 1; |
1556 | 1552 |
1557 AtomicString m_contentLanguage; | 1553 AtomicString m_contentLanguage; |
1558 | 1554 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1720 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); | 1716 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); |
1721 | 1717 |
1722 } // namespace blink | 1718 } // namespace blink |
1723 | 1719 |
1724 #ifndef NDEBUG | 1720 #ifndef NDEBUG |
1725 // Outside the WebCore namespace for ease of invocation from gdb. | 1721 // Outside the WebCore namespace for ease of invocation from gdb. |
1726 CORE_EXPORT void showLiveDocumentInstances(); | 1722 CORE_EXPORT void showLiveDocumentInstances(); |
1727 #endif | 1723 #endif |
1728 | 1724 |
1729 #endif // Document_h | 1725 #endif // Document_h |
OLD | NEW |