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

Side by Side Diff: sky/engine/core/dom/Document.h

Issue 671173006: Remove lots of machinery related to inline event handlers. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « sky/engine/core/css/MediaQueryList.idl ('k') | sky/engine/core/dom/Document.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 virtual bool canContainRangeEndPoint() const OVERRIDE { return true; } 196 virtual bool canContainRangeEndPoint() const OVERRIDE { return true; }
197 197
198 SelectorQueryCache& selectorQueryCache(); 198 SelectorQueryCache& selectorQueryCache();
199 199
200 // Focus Management. 200 // Focus Management.
201 Element* activeElement() const; 201 Element* activeElement() const;
202 bool hasFocus() const; 202 bool hasFocus() const;
203 203
204 // DOM methods & attributes for Document 204 // DOM methods & attributes for Document
205 205
206 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecopy);
207 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforecut);
208 DEFINE_ATTRIBUTE_EVENT_LISTENER(beforepaste);
209 DEFINE_ATTRIBUTE_EVENT_LISTENER(copy);
210 DEFINE_ATTRIBUTE_EVENT_LISTENER(cut);
211 DEFINE_ATTRIBUTE_EVENT_LISTENER(paste);
212 DEFINE_ATTRIBUTE_EVENT_LISTENER(readystatechange);
213 DEFINE_ATTRIBUTE_EVENT_LISTENER(search);
214 DEFINE_ATTRIBUTE_EVENT_LISTENER(securitypolicyviolation);
215 DEFINE_ATTRIBUTE_EVENT_LISTENER(selectionchange);
216 DEFINE_ATTRIBUTE_EVENT_LISTENER(selectstart);
217 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchcancel);
218 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchend);
219 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchmove);
220 DEFINE_ATTRIBUTE_EVENT_LISTENER(touchstart);
221 DEFINE_ATTRIBUTE_EVENT_LISTENER(wheel);
222
223 bool shouldOverrideLegacyDescription(ViewportDescription::Type); 206 bool shouldOverrideLegacyDescription(ViewportDescription::Type);
224 void setViewportDescription(const ViewportDescription&); 207 void setViewportDescription(const ViewportDescription&);
225 const ViewportDescription& viewportDescription() const { return m_viewportDe scription; } 208 const ViewportDescription& viewportDescription() const { return m_viewportDe scription; }
226 Length viewportDefaultMinWidth() const { return m_viewportDefaultMinWidth; } 209 Length viewportDefaultMinWidth() const { return m_viewportDefaultMinWidth; }
227 210
228 void setReferrerPolicy(ReferrerPolicy); 211 void setReferrerPolicy(ReferrerPolicy);
229 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; } 212 ReferrerPolicy referrerPolicy() const { return m_referrerPolicy; }
230 213
231 String outgoingReferrer(); 214 String outgoingReferrer();
232 215
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 bool canReplaceChild(const Node& newChild, const Node& oldChild) const; 419 bool canReplaceChild(const Node& newChild, const Node& oldChild) const;
437 420
438 void didInsertText(Node*, unsigned offset, unsigned length); 421 void didInsertText(Node*, unsigned offset, unsigned length);
439 void didRemoveText(Node*, unsigned offset, unsigned length); 422 void didRemoveText(Node*, unsigned offset, unsigned length);
440 void didMergeTextNodes(Text& oldNode, unsigned offset); 423 void didMergeTextNodes(Text& oldNode, unsigned offset);
441 void didSplitTextNode(Text& oldNode); 424 void didSplitTextNode(Text& oldNode);
442 425
443 void clearDOMWindow() { m_domWindow = nullptr; } 426 void clearDOMWindow() { m_domWindow = nullptr; }
444 LocalDOMWindow* domWindow() const { return m_domWindow; } 427 LocalDOMWindow* domWindow() const { return m_domWindow; }
445 428
446 // Helper functions for forwarding LocalDOMWindow event related tasks to the LocalDOMWindow if it exists.
447 void setWindowAttributeEventListener(const AtomicString& eventType, PassRefP tr<EventListener>);
448 EventListener* getWindowAttributeEventListener(const AtomicString& eventType );
449
450 static void registerEventFactory(PassOwnPtr<EventFactoryBase>); 429 static void registerEventFactory(PassOwnPtr<EventFactoryBase>);
451 static PassRefPtrWillBeRawPtr<Event> createEvent(const String& eventType, Ex ceptionState&); 430 static PassRefPtrWillBeRawPtr<Event> createEvent(const String& eventType, Ex ceptionState&);
452 431
453 // keep track of what types of event listeners are registered, so we don't 432 // keep track of what types of event listeners are registered, so we don't
454 // dispatch events unnecessarily 433 // dispatch events unnecessarily
455 enum ListenerType { 434 enum ListenerType {
456 DOMSUBTREEMODIFIED_LISTENER = 1, 435 DOMSUBTREEMODIFIED_LISTENER = 1,
457 DOMNODEINSERTED_LISTENER = 1 << 1, 436 DOMNODEINSERTED_LISTENER = 1 << 1,
458 DOMNODEREMOVED_LISTENER = 1 << 2, 437 DOMNODEREMOVED_LISTENER = 1 << 2,
459 DOMNODEREMOVEDFROMDOCUMENT_LISTENER = 1 << 3, 438 DOMNODEREMOVEDFROMDOCUMENT_LISTENER = 1 << 3,
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
951 Node* eventTargetNodeForDocument(Document*); 930 Node* eventTargetNodeForDocument(Document*);
952 931
953 } // namespace blink 932 } // namespace blink
954 933
955 #ifndef NDEBUG 934 #ifndef NDEBUG
956 // Outside the WebCore namespace for ease of invocation from gdb. 935 // Outside the WebCore namespace for ease of invocation from gdb.
957 void showLiveDocumentInstances(); 936 void showLiveDocumentInstances();
958 #endif 937 #endif
959 938
960 #endif // Document_h 939 #endif // Document_h
OLDNEW
« no previous file with comments | « sky/engine/core/css/MediaQueryList.idl ('k') | sky/engine/core/dom/Document.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698