Implement proper handling of focusin/focusout events in regard to shadow DOM boundaries.
Created attachment 102627 [details] wip
The patch is not ready for review. I am going to break this patch into several patches as follows: 1). At first, make EventDispatchMediator RefCountable object. 2). Second, update ScopedEventQueue so that it can queue EventDispatchMediator. 3). Next, fix a small bug for EventDispatcher::dispatchEvent. 4). At last, introduce FocusInEventDispatchMediator / FocusOutEventDispatchMediator.
Created attachment 103750 [details] introduce FocusIn/FocusOutEventDispatchMediator
All separated patches have been landed. The patch is ready for a review.
Comment on attachment 103750 [details] introduce FocusIn/FocusOutEventDispatchMediator View in context: https://bugs.webkit.org/attachment.cgi?id=103750&action=review > Source/WebCore/dom/Event.h:249 > +class FocusInEventDispatchMediator : public EventDispatchMediator { > +public: > + static PassRefPtr<FocusInEventDispatchMediator> create(PassRefPtr<Event>, PassRefPtr<Node> oldFocusedNode); > +private: > + explicit FocusInEventDispatchMediator(PassRefPtr<Event>, PassRefPtr<Node> oldFocusedNode); > + virtual bool dispatchEvent(EventDispatcher*) const; > + RefPtr<Node> m_oldFocusedNode; > +}; > + > +class FocusOutEventDispatchMediator : public EventDispatchMediator { > +public: > + static PassRefPtr<FocusOutEventDispatchMediator> create(PassRefPtr<Event>, PassRefPtr<Node> newFocusedNode); > +private: > + explicit FocusOutEventDispatchMediator(PassRefPtr<Event>, PassRefPtr<Node> newFocusedNode); > + virtual bool dispatchEvent(EventDispatcher*) const; > + RefPtr<Node> m_newFocusedNode; > +}; Should these go into UIEvent.h/cpp? > Source/WebCore/dom/Node.cpp:2826 > + dispatchDOMActivateEvent(detail, event); Nice!
Thank you for the review. (In reply to comment #5) > (From update of attachment 103750 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=103750&action=review > Should these go into UIEvent.h/cpp? Sure. After moving that, I'll land this patch.
Committed r93038: <http://trac.webkit.org/changeset/93038>