Bug 64249 - Implement proper handling of focusin/focusout events in regard to shadow DOM boundaries.
Summary: Implement proper handling of focusin/focusout events in regard to shadow DOM ...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: DOM (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Hayato Ito
URL:
Keywords:
Depends on: 65529 65613 65899
Blocks: 59805
  Show dependency treegraph
 
Reported: 2011-07-10 21:19 PDT by Hayato Ito
Modified: 2011-08-15 04:02 PDT (History)
4 users (show)

See Also:


Attachments
wip (33.00 KB, patch)
2011-08-02 01:44 PDT, Hayato Ito
no flags Details | Formatted Diff | Diff
introduce FocusIn/FocusOutEventDispatchMediator (17.81 KB, patch)
2011-08-12 00:58 PDT, Hayato Ito
dglazkov: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Hayato Ito 2011-07-10 21:19:11 PDT
Implement proper handling of focusin/focusout events in regard to shadow DOM boundaries.
Comment 1 Hayato Ito 2011-08-02 01:44:55 PDT
Created attachment 102627 [details]
wip
Comment 2 Hayato Ito 2011-08-02 01:58:43 PDT
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.
Comment 3 Hayato Ito 2011-08-12 00:58:41 PDT
Created attachment 103750 [details]
introduce FocusIn/FocusOutEventDispatchMediator
Comment 4 Hayato Ito 2011-08-12 01:01:19 PDT
All separated patches have been landed. The patch is ready for a review.
Comment 5 Dimitri Glazkov (Google) 2011-08-12 10:22:37 PDT
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!
Comment 6 Hayato Ito 2011-08-15 03:57:49 PDT
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.
Comment 7 Hayato Ito 2011-08-15 04:02:31 PDT
Committed r93038: <http://trac.webkit.org/changeset/93038>