Diff
Modified: trunk/Source/WebCore/ChangeLog (138673 => 138674)
--- trunk/Source/WebCore/ChangeLog 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/ChangeLog 2013-01-03 00:21:33 UTC (rev 138674)
@@ -1,3 +1,49 @@
+2013-01-02 Elliott Sprehn <[email protected]>
+
+ Clean up dispatchEvent overrides and overloads
+ https://bugs.webkit.org/show_bug.cgi?id=105959
+
+ Reviewed by Adam Barth.
+
+ Add OVERRIDE to all dispatchEvent overrides and use "using" instead of
+ reimplementing EventTarget::dispatchEvent in subclasses where having the
+ virtual override of dispatchEvent hides the overloads in
+ the superclass.
+
+ No new tests, just refactoring.
+
+ * Modules/indexeddb/IDBDatabase.h:
+ (IDBDatabase):
+ * Modules/indexeddb/IDBOpenDBRequest.h:
+ (IDBOpenDBRequest):
+ * Modules/indexeddb/IDBRequest.h:
+ (IDBRequest):
+ * Modules/indexeddb/IDBTransaction.h:
+ (IDBTransaction):
+ * dom/EventDispatchMediator.h:
+ (FocusEventDispatchMediator):
+ (BlurEventDispatchMediator):
+ * dom/GestureEvent.h:
+ (GestureEventDispatchMediator):
+ * dom/KeyboardEvent.h:
+ (KeyboardEventDispatchMediator):
+ * dom/MouseEvent.h:
+ * dom/Node.h:
+ (Node):
+ * dom/UIEvent.h:
+ (FocusInEventDispatchMediator):
+ (FocusOutEventDispatchMediator):
+ * dom/WheelEvent.h:
+ (WheelEventDispatchMediator):
+ * html/HTMLMediaElement.h:
+ * html/track/TextTrackCue.cpp:
+ * html/track/TextTrackCue.h:
+ (TextTrackCue):
+ * page/DOMWindow.h:
+ (DOMWindow):
+ * svg/SVGElementInstance.h:
+ (SVGElementInstance):
+
2013-01-02 David Grogan <[email protected]>
IndexedDB: Surface a few more leveldb errors.
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h (138673 => 138674)
--- trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -93,9 +93,10 @@
void forceClose();
const IDBDatabaseMetadata metadata() const { return m_metadata; }
void enqueueEvent(PassRefPtr<Event>);
- bool dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec) { return EventTarget::dispatchEvent(event, ec); }
- virtual bool dispatchEvent(PassRefPtr<Event>);
+ using EventTarget::dispatchEvent;
+ virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
+
int64_t findObjectStoreId(const String& name) const;
bool containsObjectStore(const String& name) const
{
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h (138673 => 138674)
--- trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -47,7 +47,7 @@
// EventTarget
virtual const AtomicString& interfaceName() const;
- virtual bool dispatchEvent(PassRefPtr<Event>);
+ virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
DEFINE_ATTRIBUTE_EVENT_LISTENER(blocked);
DEFINE_ATTRIBUTE_EVENT_LISTENER(upgradeneeded);
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h (138673 => 138674)
--- trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -105,10 +105,11 @@
// EventTarget
virtual const AtomicString& interfaceName() const;
virtual ScriptExecutionContext* scriptExecutionContext() const;
- virtual bool dispatchEvent(PassRefPtr<Event>);
- bool dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec) { return EventTarget::dispatchEvent(event, ec); }
virtual void uncaughtExceptionInEventHandler();
+ using EventTarget::dispatchEvent;
+ virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
+
void transactionDidFinishAndDispatch();
using RefCounted<IDBCallbacks>::ref;
Modified: trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h (138673 => 138674)
--- trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -113,9 +113,10 @@
// EventTarget
virtual const AtomicString& interfaceName() const;
virtual ScriptExecutionContext* scriptExecutionContext() const;
- virtual bool dispatchEvent(PassRefPtr<Event>);
- bool dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec) { return EventTarget::dispatchEvent(event, ec); }
+ using EventTarget::dispatchEvent;
+ virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
+
// ActiveDOMObject
virtual bool hasPendingActivity() const OVERRIDE;
virtual bool canSuspend() const OVERRIDE;
Modified: trunk/Source/WebCore/dom/EventDispatchMediator.h (138673 => 138674)
--- trunk/Source/WebCore/dom/EventDispatchMediator.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/dom/EventDispatchMediator.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -62,7 +62,7 @@
static PassRefPtr<FocusEventDispatchMediator> create(PassRefPtr<Node> oldFocusedNode);
private:
explicit FocusEventDispatchMediator(PassRefPtr<Node> oldFocusedNode);
- virtual bool dispatchEvent(EventDispatcher*) const;
+ virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
RefPtr<Node> m_oldFocusedNode;
};
@@ -71,7 +71,7 @@
static PassRefPtr<BlurEventDispatchMediator> create(PassRefPtr<Node> newFocusedNode);
private:
explicit BlurEventDispatchMediator(PassRefPtr<Node> newFocusedNode);
- virtual bool dispatchEvent(EventDispatcher*) const;
+ virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
RefPtr<Node> m_newFocusedNode;
};
Modified: trunk/Source/WebCore/dom/GestureEvent.h (138673 => 138674)
--- trunk/Source/WebCore/dom/GestureEvent.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/dom/GestureEvent.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -72,7 +72,7 @@
GestureEvent* event() const;
- virtual bool dispatchEvent(EventDispatcher*) const;
+ virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/dom/KeyboardEvent.h (138673 => 138674)
--- trunk/Source/WebCore/dom/KeyboardEvent.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/dom/KeyboardEvent.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -122,7 +122,7 @@
static PassRefPtr<KeyboardEventDispatchMediator> create(PassRefPtr<KeyboardEvent>);
private:
explicit KeyboardEventDispatchMediator(PassRefPtr<KeyboardEvent>);
- virtual bool dispatchEvent(EventDispatcher*) const;
+ virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/dom/MouseEvent.h (138673 => 138674)
--- trunk/Source/WebCore/dom/MouseEvent.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/dom/MouseEvent.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -122,7 +122,7 @@
explicit MouseEventDispatchMediator(PassRefPtr<MouseEvent>, MouseEventType);
MouseEvent* event() const;
- virtual bool dispatchEvent(EventDispatcher*) const;
+ virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMouseEvent; }
MouseEventType m_mouseEventType;
};
Modified: trunk/Source/WebCore/dom/Node.h (138673 => 138674)
--- trunk/Source/WebCore/dom/Node.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/dom/Node.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -616,7 +616,8 @@
virtual void postDispatchEventHandler(Event*, void* /*dataFromPreDispatch*/) { }
using EventTarget::dispatchEvent;
- bool dispatchEvent(PassRefPtr<Event>);
+ virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
+
void dispatchScopedEvent(PassRefPtr<Event>);
void dispatchScopedEventDispatchMediator(PassRefPtr<EventDispatchMediator>);
Modified: trunk/Source/WebCore/dom/UIEvent.h (138673 => 138674)
--- trunk/Source/WebCore/dom/UIEvent.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/dom/UIEvent.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -77,7 +77,7 @@
static PassRefPtr<FocusInEventDispatchMediator> create(PassRefPtr<Event>, PassRefPtr<Node> oldFocusedNode);
private:
explicit FocusInEventDispatchMediator(PassRefPtr<Event>, PassRefPtr<Node> oldFocusedNode);
- virtual bool dispatchEvent(EventDispatcher*) const;
+ virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
RefPtr<Node> m_oldFocusedNode;
};
@@ -86,7 +86,7 @@
static PassRefPtr<FocusOutEventDispatchMediator> create(PassRefPtr<Event>, PassRefPtr<Node> newFocusedNode);
private:
explicit FocusOutEventDispatchMediator(PassRefPtr<Event>, PassRefPtr<Node> newFocusedNode);
- virtual bool dispatchEvent(EventDispatcher*) const;
+ virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
RefPtr<Node> m_newFocusedNode;
};
Modified: trunk/Source/WebCore/dom/WheelEvent.h (138673 => 138674)
--- trunk/Source/WebCore/dom/WheelEvent.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/dom/WheelEvent.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -91,7 +91,7 @@
private:
WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractView>);
WheelEvent* event() const;
- virtual bool dispatchEvent(EventDispatcher*) const;
+ virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
};
} // namespace WebCore
Modified: trunk/Source/WebCore/html/HTMLMediaElement.h (138673 => 138674)
--- trunk/Source/WebCore/html/HTMLMediaElement.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/html/HTMLMediaElement.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -331,7 +331,7 @@
MediaController* controller() const;
void setController(PassRefPtr<MediaController>);
- virtual bool dispatchEvent(PassRefPtr<Event>);
+ virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
virtual bool willRespondToMouseClickEvents() OVERRIDE;
Modified: trunk/Source/WebCore/html/track/TextTrackCue.cpp (138673 => 138674)
--- trunk/Source/WebCore/html/track/TextTrackCue.cpp 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/html/track/TextTrackCue.cpp 2013-01-03 00:21:33 UTC (rev 138674)
@@ -530,11 +530,6 @@
return EventTarget::dispatchEvent(event);
}
-bool TextTrackCue::dispatchEvent(PassRefPtr<Event> event, ExceptionCode &ec)
-{
- return EventTarget::dispatchEvent(event, ec);
-}
-
bool TextTrackCue::isActive()
{
return m_isActive && track() && track()->mode() != TextTrack::disabledKeyword();
Modified: trunk/Source/WebCore/html/track/TextTrackCue.h (138673 => 138674)
--- trunk/Source/WebCore/html/track/TextTrackCue.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/html/track/TextTrackCue.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -128,8 +128,8 @@
PassRefPtr<DocumentFragment> getCueAsHTML();
void markNodesAsWebVTTNodes(Node*);
- virtual bool dispatchEvent(PassRefPtr<Event>);
- bool dispatchEvent(PassRefPtr<Event>, ExceptionCode&);
+ using EventTarget::dispatchEvent;
+ virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
bool isActive();
void setIsActive(bool);
Modified: trunk/Source/WebCore/page/DOMWindow.h (138673 => 138674)
--- trunk/Source/WebCore/page/DOMWindow.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/page/DOMWindow.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -275,6 +275,7 @@
using EventTarget::dispatchEvent;
bool dispatchEvent(PassRefPtr<Event> prpEvent, PassRefPtr<EventTarget> prpTarget);
+
void dispatchLoadEvent();
DEFINE_ATTRIBUTE_EVENT_LISTENER(abort);
Modified: trunk/Source/WebCore/svg/SVGElementInstance.h (138673 => 138674)
--- trunk/Source/WebCore/svg/SVGElementInstance.h 2013-01-03 00:08:50 UTC (rev 138673)
+++ trunk/Source/WebCore/svg/SVGElementInstance.h 2013-01-03 00:21:33 UTC (rev 138674)
@@ -55,8 +55,9 @@
virtual bool addEventListener(const AtomicString& eventType, PassRefPtr<EventListener>, bool useCapture);
virtual bool removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture);
virtual void removeAllEventListeners();
+
using EventTarget::dispatchEvent;
- virtual bool dispatchEvent(PassRefPtr<Event>);
+ virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
SVGElement* correspondingElement() const { return m_element.get(); }
SVGUseElement* correspondingUseElement() const { return m_correspondingUseElement; }