Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: third_party/WebKit/Source/core/dom/Document.h

Issue 1945563002: Set currentScript for SVGScriptElements. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added test case Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 r ights reserved. 6 * Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009, 2010, 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) 2010 Nokia Corporation and/or its subsidiary(-ies) 8 * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
9 * Copyright (C) 2011 Google Inc. All rights reserved. 9 * Copyright (C) 2011 Google Inc. All rights reserved.
10 * 10 *
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 class HTMLBodyElement; 114 class HTMLBodyElement;
115 class HTMLCanvasElement; 115 class HTMLCanvasElement;
116 class HTMLCollection; 116 class HTMLCollection;
117 class HTMLDialogElement; 117 class HTMLDialogElement;
118 class HTMLElement; 118 class HTMLElement;
119 class HTMLFrameOwnerElement; 119 class HTMLFrameOwnerElement;
120 class HTMLHeadElement; 120 class HTMLHeadElement;
121 class HTMLImportLoader; 121 class HTMLImportLoader;
122 class HTMLImportsController; 122 class HTMLImportsController;
123 class HTMLLinkElement; 123 class HTMLLinkElement;
124 class HTMLScriptElement; 124 class HTMLScriptElementOrSVGScriptElement;
125 class HitTestRequest; 125 class HitTestRequest;
126 class IdleRequestCallback; 126 class IdleRequestCallback;
127 class IdleRequestOptions; 127 class IdleRequestOptions;
128 class InputDeviceCapabilities; 128 class InputDeviceCapabilities;
129 class IntersectionObserverController; 129 class IntersectionObserverController;
130 class LayoutPoint; 130 class LayoutPoint;
131 class LayoutViewItem; 131 class LayoutViewItem;
132 class LiveNodeListBase; 132 class LiveNodeListBase;
133 class Locale; 133 class Locale;
134 class LocalFrame; 134 class LocalFrame;
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 class TouchList; 169 class TouchList;
170 class TransformSource; 170 class TransformSource;
171 class TreeWalker; 171 class TreeWalker;
172 class VisitedLinkState; 172 class VisitedLinkState;
173 class WebGLRenderingContext; 173 class WebGLRenderingContext;
174 enum class SelectionBehaviorOnFocus; 174 enum class SelectionBehaviorOnFocus;
175 struct AnnotatedRegionValue; 175 struct AnnotatedRegionValue;
176 struct FocusParams; 176 struct FocusParams;
177 struct IconURL; 177 struct IconURL;
178 178
179 typedef HTMLScriptElementOrSVGScriptElement ScriptElement;
fs 2016/05/03 10:56:01 With the below adressed I don't think this serves
ramya.v 2016/05/04 04:18:41 Done.
180
179 using MouseEventWithHitTestResults = EventWithHitTestResults<PlatformMouseEvent> ; 181 using MouseEventWithHitTestResults = EventWithHitTestResults<PlatformMouseEvent> ;
180 using ExceptionCode = int; 182 using ExceptionCode = int;
181 183
182 enum StyleResolverUpdateMode { 184 enum StyleResolverUpdateMode {
183 // Discards the StyleResolver and rebuilds it. 185 // Discards the StyleResolver and rebuilds it.
184 FullStyleUpdate, 186 FullStyleUpdate,
185 // Attempts to use StyleInvalidationAnalysis to avoid discarding the entire StyleResolver. 187 // Attempts to use StyleInvalidationAnalysis to avoid discarding the entire StyleResolver.
186 AnalyzedStyleUpdate 188 AnalyzedStyleUpdate
187 }; 189 };
188 190
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 bool inDesignMode() const { return m_designMode; } 785 bool inDesignMode() const { return m_designMode; }
784 String designMode() const; 786 String designMode() const;
785 void setDesignMode(const String&); 787 void setDesignMode(const String&);
786 788
787 Document* parentDocument() const; 789 Document* parentDocument() const;
788 Document& topDocument() const; 790 Document& topDocument() const;
789 Document* contextDocument(); 791 Document* contextDocument();
790 792
791 ScriptRunner* scriptRunner() { return m_scriptRunner.get(); } 793 ScriptRunner* scriptRunner() { return m_scriptRunner.get(); }
792 794
793 HTMLScriptElement* currentScript() const { return !m_currentScriptStack.isEm pty() ? m_currentScriptStack.last().get() : nullptr; } 795 Element* currentScript() const { return !m_currentScriptStack.isEmpty() ? m_ currentScriptStack.last().get() : nullptr; }
794 HTMLScriptElement* currentScriptForBinding() const; 796 void currentScriptForBinding(ScriptElement&) const;
795 void pushCurrentScript(HTMLScriptElement*); 797 void pushCurrentScript(const ScriptElement&);
fs 2016/05/03 10:56:01 I think I would prefer that the "internal" part of
ramya.v 2016/05/04 04:18:41 Done.
796 void popCurrentScript(); 798 void popCurrentScript();
797 799
798 void setTransformSource(PassOwnPtr<TransformSource>); 800 void setTransformSource(PassOwnPtr<TransformSource>);
799 TransformSource* transformSource() const { return m_transformSource.get(); } 801 TransformSource* transformSource() const { return m_transformSource.get(); }
800 802
801 void incDOMTreeVersion() { DCHECK(m_lifecycle.stateAllowsTreeMutations()); m _domTreeVersion = ++s_globalTreeVersion; } 803 void incDOMTreeVersion() { DCHECK(m_lifecycle.stateAllowsTreeMutations()); m _domTreeVersion = ++s_globalTreeVersion; }
802 uint64_t domTreeVersion() const { return m_domTreeVersion; } 804 uint64_t domTreeVersion() const { return m_domTreeVersion; }
803 805
804 uint64_t styleVersion() const { return m_styleVersion; } 806 uint64_t styleVersion() const { return m_styleVersion; }
805 807
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
1265 Timer<Document> m_updateFocusAppearanceTimer; 1267 Timer<Document> m_updateFocusAppearanceTimer;
1266 1268
1267 Member<Element> m_cssTarget; 1269 Member<Element> m_cssTarget;
1268 1270
1269 LoadEventProgress m_loadEventProgress; 1271 LoadEventProgress m_loadEventProgress;
1270 1272
1271 double m_startTime; 1273 double m_startTime;
1272 1274
1273 Member<ScriptRunner> m_scriptRunner; 1275 Member<ScriptRunner> m_scriptRunner;
1274 1276
1275 HeapVector<Member<HTMLScriptElement>> m_currentScriptStack; 1277 HeapVector<Member<Element>> m_currentScriptStack;
1276 1278
1277 OwnPtr<TransformSource> m_transformSource; 1279 OwnPtr<TransformSource> m_transformSource;
1278 1280
1279 String m_xmlEncoding; 1281 String m_xmlEncoding;
1280 String m_xmlVersion; 1282 String m_xmlVersion;
1281 unsigned m_xmlStandalone : 2; 1283 unsigned m_xmlStandalone : 2;
1282 unsigned m_hasXMLDeclaration : 1; 1284 unsigned m_hasXMLDeclaration : 1;
1283 1285
1284 AtomicString m_contentLanguage; 1286 AtomicString m_contentLanguage;
1285 1287
(...skipping 147 matching lines...) Expand 10 before | Expand all | Expand 10 after
1433 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true); 1435 DEFINE_TYPE_CASTS(TreeScope, Document, document, true, true);
1434 1436
1435 } // namespace blink 1437 } // namespace blink
1436 1438
1437 #ifndef NDEBUG 1439 #ifndef NDEBUG
1438 // Outside the WebCore namespace for ease of invocation from gdb. 1440 // Outside the WebCore namespace for ease of invocation from gdb.
1439 CORE_EXPORT void showLiveDocumentInstances(); 1441 CORE_EXPORT void showLiveDocumentInstances();
1440 #endif 1442 #endif
1441 1443
1442 #endif // Document_h 1444 #endif // Document_h
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698