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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
146 class Page; | 146 class Page; |
147 class ProcessingInstruction; | 147 class ProcessingInstruction; |
148 class PropertyRegistry; | 148 class PropertyRegistry; |
149 class QualifiedName; | 149 class QualifiedName; |
150 class Range; | 150 class Range; |
151 class ResizeObserverController; | 151 class ResizeObserverController; |
152 class ResourceFetcher; | 152 class ResourceFetcher; |
153 class RootScrollerController; | 153 class RootScrollerController; |
154 class SVGDocumentExtensions; | 154 class SVGDocumentExtensions; |
155 class SVGUseElement; | 155 class SVGUseElement; |
156 class ScriptLoaderClient; | |
156 class ScriptRunner; | 157 class ScriptRunner; |
157 class ScriptableDocumentParser; | 158 class ScriptableDocumentParser; |
158 class ScriptedAnimationController; | 159 class ScriptedAnimationController; |
159 class ScriptedIdleTaskController; | 160 class ScriptedIdleTaskController; |
160 class Scrollbar; | 161 class Scrollbar; |
161 class SecurityOrigin; | 162 class SecurityOrigin; |
162 class SegmentedString; | 163 class SegmentedString; |
163 class SelectorQueryCache; | 164 class SelectorQueryCache; |
164 class SerializedScriptValue; | 165 class SerializedScriptValue; |
165 class Settings; | 166 class Settings; |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
926 bool inDesignMode() const { return m_designMode; } | 927 bool inDesignMode() const { return m_designMode; } |
927 String designMode() const; | 928 String designMode() const; |
928 void setDesignMode(const String&); | 929 void setDesignMode(const String&); |
929 | 930 |
930 Document* parentDocument() const; | 931 Document* parentDocument() const; |
931 Document& topDocument() const; | 932 Document& topDocument() const; |
932 Document* contextDocument(); | 933 Document* contextDocument(); |
933 | 934 |
934 ScriptRunner* scriptRunner() { return m_scriptRunner.get(); } | 935 ScriptRunner* scriptRunner() { return m_scriptRunner.get(); } |
935 | 936 |
936 Element* currentScript() const { | |
937 return !m_currentScriptStack.isEmpty() ? m_currentScriptStack.back().get() | |
938 : nullptr; | |
939 } | |
940 void currentScriptForBinding(HTMLScriptElementOrSVGScriptElement&) const; | 937 void currentScriptForBinding(HTMLScriptElementOrSVGScriptElement&) const; |
941 void pushCurrentScript(Element*); | 938 void pushCurrentScript(ScriptLoaderClient*); |
942 void popCurrentScript(); | 939 void popCurrentScript(ScriptLoaderClient*); |
943 | 940 |
944 void setTransformSource(std::unique_ptr<TransformSource>); | 941 void setTransformSource(std::unique_ptr<TransformSource>); |
945 TransformSource* transformSource() const { return m_transformSource.get(); } | 942 TransformSource* transformSource() const { return m_transformSource.get(); } |
946 | 943 |
947 void incDOMTreeVersion() { | 944 void incDOMTreeVersion() { |
948 DCHECK(m_lifecycle.stateAllowsTreeMutations()); | 945 DCHECK(m_lifecycle.stateAllowsTreeMutations()); |
949 m_domTreeVersion = ++s_globalTreeVersion; | 946 m_domTreeVersion = ++s_globalTreeVersion; |
950 } | 947 } |
951 uint64_t domTreeVersion() const { return m_domTreeVersion; } | 948 uint64_t domTreeVersion() const { return m_domTreeVersion; } |
952 | 949 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1021 SVGDocumentExtensions& accessSVGExtensions(); | 1018 SVGDocumentExtensions& accessSVGExtensions(); |
1022 | 1019 |
1023 void initContentSecurityPolicy(ContentSecurityPolicy* = nullptr); | 1020 void initContentSecurityPolicy(ContentSecurityPolicy* = nullptr); |
1024 | 1021 |
1025 bool isSecureTransitionTo(const KURL&) const; | 1022 bool isSecureTransitionTo(const KURL&) const; |
1026 | 1023 |
1027 bool allowInlineEventHandler(Node*, | 1024 bool allowInlineEventHandler(Node*, |
1028 EventListener*, | 1025 EventListener*, |
1029 const String& contextURL, | 1026 const String& contextURL, |
1030 const WTF::OrdinalNumber& contextLine); | 1027 const WTF::OrdinalNumber& contextLine); |
1031 bool allowExecutingScripts(Node*); | 1028 bool allowExecutingScripts(Document*); |
hiroshige
2017/03/01 00:58:14
Document::allowExecutingScripts(Document*) looks u
Nate Chapin
2017/03/01 21:34:59
It appears to do 2 things: (1) check that both ele
| |
1032 | 1029 |
1033 void enforceSandboxFlags(SandboxFlags mask) override; | 1030 void enforceSandboxFlags(SandboxFlags mask) override; |
1034 | 1031 |
1035 void statePopped(PassRefPtr<SerializedScriptValue>); | 1032 void statePopped(PassRefPtr<SerializedScriptValue>); |
1036 | 1033 |
1037 enum LoadEventProgress { | 1034 enum LoadEventProgress { |
1038 LoadEventNotRun, | 1035 LoadEventNotRun, |
1039 LoadEventInProgress, | 1036 LoadEventInProgress, |
1040 LoadEventCompleted, | 1037 LoadEventCompleted, |
1041 BeforeUnloadEventInProgress, | 1038 BeforeUnloadEventInProgress, |
(...skipping 503 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1545 TaskRunnerTimer<Document> m_updateFocusAppearanceTimer; | 1542 TaskRunnerTimer<Document> m_updateFocusAppearanceTimer; |
1546 | 1543 |
1547 Member<Element> m_cssTarget; | 1544 Member<Element> m_cssTarget; |
1548 | 1545 |
1549 LoadEventProgress m_loadEventProgress; | 1546 LoadEventProgress m_loadEventProgress; |
1550 | 1547 |
1551 double m_startTime; | 1548 double m_startTime; |
1552 | 1549 |
1553 Member<ScriptRunner> m_scriptRunner; | 1550 Member<ScriptRunner> m_scriptRunner; |
1554 | 1551 |
1555 HeapVector<Member<Element>> m_currentScriptStack; | 1552 HeapVector<Member<ScriptLoaderClient>> m_currentScriptStack; |
1556 | 1553 |
1557 std::unique_ptr<TransformSource> m_transformSource; | 1554 std::unique_ptr<TransformSource> m_transformSource; |
1558 | 1555 |
1559 String m_xmlEncoding; | 1556 String m_xmlEncoding; |
1560 String m_xmlVersion; | 1557 String m_xmlVersion; |
1561 unsigned m_xmlStandalone : 2; | 1558 unsigned m_xmlStandalone : 2; |
1562 unsigned m_hasXMLDeclaration : 1; | 1559 unsigned m_hasXMLDeclaration : 1; |
1563 | 1560 |
1564 AtomicString m_contentLanguage; | 1561 AtomicString m_contentLanguage; |
1565 | 1562 |
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1728 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); | 1725 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); |
1729 | 1726 |
1730 } // namespace blink | 1727 } // namespace blink |
1731 | 1728 |
1732 #ifndef NDEBUG | 1729 #ifndef NDEBUG |
1733 // Outside the WebCore namespace for ease of invocation from gdb. | 1730 // Outside the WebCore namespace for ease of invocation from gdb. |
1734 CORE_EXPORT void showLiveDocumentInstances(); | 1731 CORE_EXPORT void showLiveDocumentInstances(); |
1735 #endif | 1732 #endif |
1736 | 1733 |
1737 #endif // Document_h | 1734 #endif // Document_h |
OLD | NEW |