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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
143 class Page; | 143 class Page; |
144 class ProcessingInstruction; | 144 class ProcessingInstruction; |
145 class PropertyRegistry; | 145 class PropertyRegistry; |
146 class QualifiedName; | 146 class QualifiedName; |
147 class Range; | 147 class Range; |
148 class ResizeObserverController; | 148 class ResizeObserverController; |
149 class ResourceFetcher; | 149 class ResourceFetcher; |
150 class RootScrollerController; | 150 class RootScrollerController; |
151 class SVGDocumentExtensions; | 151 class SVGDocumentExtensions; |
152 class SVGUseElement; | 152 class SVGUseElement; |
| 153 class ScriptElementBase; |
153 class ScriptRunner; | 154 class ScriptRunner; |
154 class ScriptableDocumentParser; | 155 class ScriptableDocumentParser; |
155 class ScriptedAnimationController; | 156 class ScriptedAnimationController; |
156 class ScriptedIdleTaskController; | 157 class ScriptedIdleTaskController; |
157 class Scrollbar; | 158 class Scrollbar; |
158 class SecurityOrigin; | 159 class SecurityOrigin; |
159 class SegmentedString; | 160 class SegmentedString; |
160 class SelectorQueryCache; | 161 class SelectorQueryCache; |
161 class SerializedScriptValue; | 162 class SerializedScriptValue; |
162 class Settings; | 163 class Settings; |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
913 bool inDesignMode() const { return m_designMode; } | 914 bool inDesignMode() const { return m_designMode; } |
914 String designMode() const; | 915 String designMode() const; |
915 void setDesignMode(const String&); | 916 void setDesignMode(const String&); |
916 | 917 |
917 Document* parentDocument() const; | 918 Document* parentDocument() const; |
918 Document& topDocument() const; | 919 Document& topDocument() const; |
919 Document* contextDocument(); | 920 Document* contextDocument(); |
920 | 921 |
921 ScriptRunner* scriptRunner() { return m_scriptRunner.get(); } | 922 ScriptRunner* scriptRunner() { return m_scriptRunner.get(); } |
922 | 923 |
923 Element* currentScript() const { | |
924 return !m_currentScriptStack.isEmpty() ? m_currentScriptStack.back().get() | |
925 : nullptr; | |
926 } | |
927 void currentScriptForBinding(HTMLScriptElementOrSVGScriptElement&) const; | 924 void currentScriptForBinding(HTMLScriptElementOrSVGScriptElement&) const; |
928 void pushCurrentScript(Element*); | 925 void pushCurrentScript(ScriptElementBase*); |
929 void popCurrentScript(); | 926 void popCurrentScript(ScriptElementBase*); |
930 | 927 |
931 void setTransformSource(std::unique_ptr<TransformSource>); | 928 void setTransformSource(std::unique_ptr<TransformSource>); |
932 TransformSource* transformSource() const { return m_transformSource.get(); } | 929 TransformSource* transformSource() const { return m_transformSource.get(); } |
933 | 930 |
934 void incDOMTreeVersion() { | 931 void incDOMTreeVersion() { |
935 DCHECK(m_lifecycle.stateAllowsTreeMutations()); | 932 DCHECK(m_lifecycle.stateAllowsTreeMutations()); |
936 m_domTreeVersion = ++s_globalTreeVersion; | 933 m_domTreeVersion = ++s_globalTreeVersion; |
937 } | 934 } |
938 uint64_t domTreeVersion() const { return m_domTreeVersion; } | 935 uint64_t domTreeVersion() const { return m_domTreeVersion; } |
939 | 936 |
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1008 SVGDocumentExtensions& accessSVGExtensions(); | 1005 SVGDocumentExtensions& accessSVGExtensions(); |
1009 | 1006 |
1010 void initContentSecurityPolicy(ContentSecurityPolicy* = nullptr); | 1007 void initContentSecurityPolicy(ContentSecurityPolicy* = nullptr); |
1011 | 1008 |
1012 bool isSecureTransitionTo(const KURL&) const; | 1009 bool isSecureTransitionTo(const KURL&) const; |
1013 | 1010 |
1014 bool allowInlineEventHandler(Node*, | 1011 bool allowInlineEventHandler(Node*, |
1015 EventListener*, | 1012 EventListener*, |
1016 const String& contextURL, | 1013 const String& contextURL, |
1017 const WTF::OrdinalNumber& contextLine); | 1014 const WTF::OrdinalNumber& contextLine); |
1018 bool allowExecutingScripts(Node*); | |
1019 | 1015 |
1020 void enforceSandboxFlags(SandboxFlags mask) override; | 1016 void enforceSandboxFlags(SandboxFlags mask) override; |
1021 | 1017 |
1022 void statePopped(PassRefPtr<SerializedScriptValue>); | 1018 void statePopped(PassRefPtr<SerializedScriptValue>); |
1023 | 1019 |
1024 enum LoadEventProgress { | 1020 enum LoadEventProgress { |
1025 LoadEventNotRun, | 1021 LoadEventNotRun, |
1026 LoadEventInProgress, | 1022 LoadEventInProgress, |
1027 LoadEventCompleted, | 1023 LoadEventCompleted, |
1028 BeforeUnloadEventInProgress, | 1024 BeforeUnloadEventInProgress, |
(...skipping 500 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1529 TaskRunnerTimer<Document> m_updateFocusAppearanceTimer; | 1525 TaskRunnerTimer<Document> m_updateFocusAppearanceTimer; |
1530 | 1526 |
1531 Member<Element> m_cssTarget; | 1527 Member<Element> m_cssTarget; |
1532 | 1528 |
1533 LoadEventProgress m_loadEventProgress; | 1529 LoadEventProgress m_loadEventProgress; |
1534 | 1530 |
1535 double m_startTime; | 1531 double m_startTime; |
1536 | 1532 |
1537 Member<ScriptRunner> m_scriptRunner; | 1533 Member<ScriptRunner> m_scriptRunner; |
1538 | 1534 |
1539 HeapVector<Member<Element>> m_currentScriptStack; | 1535 HeapVector<Member<ScriptElementBase>> m_currentScriptStack; |
1540 | 1536 |
1541 std::unique_ptr<TransformSource> m_transformSource; | 1537 std::unique_ptr<TransformSource> m_transformSource; |
1542 | 1538 |
1543 String m_xmlEncoding; | 1539 String m_xmlEncoding; |
1544 String m_xmlVersion; | 1540 String m_xmlVersion; |
1545 unsigned m_xmlStandalone : 2; | 1541 unsigned m_xmlStandalone : 2; |
1546 unsigned m_hasXMLDeclaration : 1; | 1542 unsigned m_hasXMLDeclaration : 1; |
1547 | 1543 |
1548 AtomicString m_contentLanguage; | 1544 AtomicString m_contentLanguage; |
1549 | 1545 |
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1711 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); | 1707 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); |
1712 | 1708 |
1713 } // namespace blink | 1709 } // namespace blink |
1714 | 1710 |
1715 #ifndef NDEBUG | 1711 #ifndef NDEBUG |
1716 // Outside the WebCore namespace for ease of invocation from gdb. | 1712 // Outside the WebCore namespace for ease of invocation from gdb. |
1717 CORE_EXPORT void showLiveDocumentInstances(); | 1713 CORE_EXPORT void showLiveDocumentInstances(); |
1718 #endif | 1714 #endif |
1719 | 1715 |
1720 #endif // Document_h | 1716 #endif // Document_h |
OLD | NEW |