Changeset 138674 in webkit


Ignore:
Timestamp:
Jan 2, 2013, 4:21:33 PM (13 years ago)
Author:
esprehn@chromium.org
Message:

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):

Location:
trunk/Source/WebCore
Files:
17 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r138670 r138674  
     12013-01-02  Elliott Sprehn  <esprehn@chromium.org>
     2
     3        Clean up dispatchEvent overrides and overloads
     4        https://bugs.webkit.org/show_bug.cgi?id=105959
     5
     6        Reviewed by Adam Barth.
     7
     8        Add OVERRIDE to all dispatchEvent overrides and use "using" instead of
     9        reimplementing EventTarget::dispatchEvent in subclasses where having the
     10        virtual override of dispatchEvent hides the overloads in
     11        the superclass.
     12
     13        No new tests, just refactoring.
     14
     15        * Modules/indexeddb/IDBDatabase.h:
     16        (IDBDatabase):
     17        * Modules/indexeddb/IDBOpenDBRequest.h:
     18        (IDBOpenDBRequest):
     19        * Modules/indexeddb/IDBRequest.h:
     20        (IDBRequest):
     21        * Modules/indexeddb/IDBTransaction.h:
     22        (IDBTransaction):
     23        * dom/EventDispatchMediator.h:
     24        (FocusEventDispatchMediator):
     25        (BlurEventDispatchMediator):
     26        * dom/GestureEvent.h:
     27        (GestureEventDispatchMediator):
     28        * dom/KeyboardEvent.h:
     29        (KeyboardEventDispatchMediator):
     30        * dom/MouseEvent.h:
     31        * dom/Node.h:
     32        (Node):
     33        * dom/UIEvent.h:
     34        (FocusInEventDispatchMediator):
     35        (FocusOutEventDispatchMediator):
     36        * dom/WheelEvent.h:
     37        (WheelEventDispatchMediator):
     38        * html/HTMLMediaElement.h:
     39        * html/track/TextTrackCue.cpp:
     40        * html/track/TextTrackCue.h:
     41        (TextTrackCue):
     42        * page/DOMWindow.h:
     43        (DOMWindow):
     44        * svg/SVGElementInstance.h:
     45        (SVGElementInstance):
     46
    1472013-01-02  David Grogan  <dgrogan@chromium.org>
    248
  • trunk/Source/WebCore/Modules/indexeddb/IDBDatabase.h

    r138081 r138674  
    9494    const IDBDatabaseMetadata metadata() const { return m_metadata; }
    9595    void enqueueEvent(PassRefPtr<Event>);
    96     bool dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec) { return EventTarget::dispatchEvent(event, ec); }
    97     virtual bool dispatchEvent(PassRefPtr<Event>);
     96
     97    using EventTarget::dispatchEvent;
     98    virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
    9899
    99100    int64_t findObjectStoreId(const String& name) const;
  • trunk/Source/WebCore/Modules/indexeddb/IDBOpenDBRequest.h

    r136714 r138674  
    4848    // EventTarget
    4949    virtual const AtomicString& interfaceName() const;
    50     virtual bool dispatchEvent(PassRefPtr<Event>);
     50    virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
    5151
    5252    DEFINE_ATTRIBUTE_EVENT_LISTENER(blocked);
  • trunk/Source/WebCore/Modules/indexeddb/IDBRequest.h

    r136696 r138674  
    106106    virtual const AtomicString& interfaceName() const;
    107107    virtual ScriptExecutionContext* scriptExecutionContext() const;
    108     virtual bool dispatchEvent(PassRefPtr<Event>);
    109     bool dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec) { return EventTarget::dispatchEvent(event, ec); }
    110108    virtual void uncaughtExceptionInEventHandler();
     109
     110    using EventTarget::dispatchEvent;
     111    virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
    111112
    112113    void transactionDidFinishAndDispatch();
  • trunk/Source/WebCore/Modules/indexeddb/IDBTransaction.h

    r136894 r138674  
    114114    virtual const AtomicString& interfaceName() const;
    115115    virtual ScriptExecutionContext* scriptExecutionContext() const;
    116     virtual bool dispatchEvent(PassRefPtr<Event>);
    117     bool dispatchEvent(PassRefPtr<Event> event, ExceptionCode& ec) { return EventTarget::dispatchEvent(event, ec); }
     116
     117    using EventTarget::dispatchEvent;
     118    virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
    118119
    119120    // ActiveDOMObject
  • trunk/Source/WebCore/dom/EventDispatchMediator.h

    r108034 r138674  
    6363private:
    6464    explicit FocusEventDispatchMediator(PassRefPtr<Node> oldFocusedNode);
    65     virtual bool dispatchEvent(EventDispatcher*) const;
     65    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
    6666    RefPtr<Node> m_oldFocusedNode;
    6767};
     
    7272private:
    7373    explicit BlurEventDispatchMediator(PassRefPtr<Node> newFocusedNode);
    74     virtual bool dispatchEvent(EventDispatcher*) const;
     74    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
    7575    RefPtr<Node> m_newFocusedNode;
    7676};
  • trunk/Source/WebCore/dom/GestureEvent.h

    r124098 r138674  
    7373    GestureEvent* event() const;
    7474
    75     virtual bool dispatchEvent(EventDispatcher*) const;
     75    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
    7676};
    7777
  • trunk/Source/WebCore/dom/KeyboardEvent.h

    r123451 r138674  
    123123private:
    124124    explicit KeyboardEventDispatchMediator(PassRefPtr<KeyboardEvent>);
    125     virtual bool dispatchEvent(EventDispatcher*) const;
     125    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
    126126};
    127127
  • trunk/Source/WebCore/dom/MouseEvent.h

    r136918 r138674  
    123123    MouseEvent* event() const;
    124124
    125     virtual bool dispatchEvent(EventDispatcher*) const;
     125    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
    126126    bool isSyntheticMouseEvent() const { return m_mouseEventType == SyntheticMouseEvent; }
    127127    MouseEventType m_mouseEventType;
  • trunk/Source/WebCore/dom/Node.h

    r138404 r138674  
    617617
    618618    using EventTarget::dispatchEvent;
    619     bool dispatchEvent(PassRefPtr<Event>);
     619    virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
     620
    620621    void dispatchScopedEvent(PassRefPtr<Event>);
    621622    void dispatchScopedEventDispatchMediator(PassRefPtr<EventDispatchMediator>);
  • trunk/Source/WebCore/dom/UIEvent.h

    r117335 r138674  
    7878    private:
    7979        explicit FocusInEventDispatchMediator(PassRefPtr<Event>, PassRefPtr<Node> oldFocusedNode);
    80         virtual bool dispatchEvent(EventDispatcher*) const;
     80        virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
    8181        RefPtr<Node> m_oldFocusedNode;
    8282    };
     
    8787    private:
    8888        explicit FocusOutEventDispatchMediator(PassRefPtr<Event>, PassRefPtr<Node> newFocusedNode);
    89         virtual bool dispatchEvent(EventDispatcher*) const;
     89        virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
    9090        RefPtr<Node> m_newFocusedNode;
    9191    };
  • trunk/Source/WebCore/dom/WheelEvent.h

    r131826 r138674  
    9292    WheelEventDispatchMediator(const PlatformWheelEvent&, PassRefPtr<AbstractView>);
    9393    WheelEvent* event() const;
    94     virtual bool dispatchEvent(EventDispatcher*) const;
     94    virtual bool dispatchEvent(EventDispatcher*) const OVERRIDE;
    9595};
    9696
  • trunk/Source/WebCore/html/HTMLMediaElement.h

    r138224 r138674  
    332332    void setController(PassRefPtr<MediaController>);
    333333
    334     virtual bool dispatchEvent(PassRefPtr<Event>);
     334    virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
    335335
    336336    virtual bool willRespondToMouseClickEvents() OVERRIDE;
  • trunk/Source/WebCore/html/track/TextTrackCue.cpp

    r138017 r138674  
    531531}
    532532
    533 bool TextTrackCue::dispatchEvent(PassRefPtr<Event> event, ExceptionCode &ec)
    534 {
    535     return EventTarget::dispatchEvent(event, ec);
    536 }
    537 
    538533bool TextTrackCue::isActive()
    539534{
  • trunk/Source/WebCore/html/track/TextTrackCue.h

    r138017 r138674  
    129129    void markNodesAsWebVTTNodes(Node*);
    130130
    131     virtual bool dispatchEvent(PassRefPtr<Event>);
    132     bool dispatchEvent(PassRefPtr<Event>, ExceptionCode&);
     131    using EventTarget::dispatchEvent;
     132    virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
    133133
    134134    bool isActive();
  • trunk/Source/WebCore/page/DOMWindow.h

    r134586 r138674  
    276276        using EventTarget::dispatchEvent;
    277277        bool dispatchEvent(PassRefPtr<Event> prpEvent, PassRefPtr<EventTarget> prpTarget);
     278
    278279        void dispatchLoadEvent();
    279280
  • trunk/Source/WebCore/svg/SVGElementInstance.h

    r125251 r138674  
    5656    virtual bool removeEventListener(const AtomicString& eventType, EventListener*, bool useCapture);
    5757    virtual void removeAllEventListeners();
     58
    5859    using EventTarget::dispatchEvent;
    59     virtual bool dispatchEvent(PassRefPtr<Event>);
     60    virtual bool dispatchEvent(PassRefPtr<Event>) OVERRIDE;
    6061
    6162    SVGElement* correspondingElement() const { return m_element.get(); }
Note: See TracChangeset for help on using the changeset viewer.