WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
65613
ScopedEventQueue should enqueue an EventDispatchMediator
https://bugs.webkit.org/show_bug.cgi?id=65613
Summary
ScopedEventQueue should enqueue an EventDispatchMediator
Hayato Ito
Reported
2011-08-03 05:34:39 PDT
This patch is the 2nd separated patch from
bug 64249
. ScopedEventQueue should support enqueuing an EventDispatchMediator so that it supports coming FocusIn/FocusOutEventDispatchMediator.
Attachments
Supports EventDispatchMediator
(9.83 KB, patch)
2011-08-03 05:37 PDT
,
Hayato Ito
no flags
Details
Formatted Diff
Diff
no more parallel structure
(8.57 KB, patch)
2011-08-04 02:05 PDT
,
Hayato Ito
no flags
Details
Formatted Diff
Diff
remove enqueueEvent and clients of that
(8.51 KB, patch)
2011-08-04 20:00 PDT
,
Hayato Ito
no flags
Details
Formatted Diff
Diff
Show Obsolete
(2)
View All
Add attachment
proposed patch, testcase, etc.
Hayato Ito
Comment 1
2011-08-03 05:37:16 PDT
Created
attachment 102769
[details]
Supports EventDispatchMediator
Dimitri Glazkov (Google)
Comment 2
2011-08-03 08:18:11 PDT
Comment on
attachment 102769
[details]
Supports EventDispatchMediator I am not sure I like this patch. Now that we can pass around EventDispatchMediator, we should be able to convert all scoped event dispatches to use it, instead of building a parallel structure. Right?
Hayato Ito
Comment 3
2011-08-03 08:42:06 PDT
Thank you for the review. (In reply to
comment #2
)
> (From update of
attachment 102769
[details]
) > I am not sure I like this patch. Now that we can pass around EventDispatchMediator, we should be able to convert all scoped event dispatches to use it, instead of building a parallel structure. Right?
That makes sense and actually I tried that at first. AFAIR, I gave up that for some reasons, which I can't recall now. Let me retry that tomorrow again to recall the reason.
Hayato Ito
Comment 4
2011-08-04 02:05:16 PDT
Created
attachment 102886
[details]
no more parallel structure
Hayato Ito
Comment 5
2011-08-04 02:12:59 PDT
Hi Dimitri, I updated a patch so that only a EventDispatchMediator, instead of a parallel structure, is enqueued into a internal queue of ScopedEventQueue. To do so, I had to make EventDispatchMediator::event() public, not private. I guess making it public is not desirable, but that's much better than maintaing parallel data structure in ScopedEventQueue. (In reply to
comment #3
)
> Thank you for the review. > > (In reply to
comment #2
) > > (From update of
attachment 102769
[details]
[details]) > > I am not sure I like this patch. Now that we can pass around EventDispatchMediator, we should be able to convert all scoped event dispatches to use it, instead of building a parallel structure. Right? > > That makes sense and actually I tried that at first. AFAIR, I gave up that for some reasons, which I can't recall now. > Let me retry that tomorrow again to recall the reason.
Dimitri Glazkov (Google)
Comment 6
2011-08-04 09:01:54 PDT
Comment on
attachment 102886
[details]
no more parallel structure View in context:
https://bugs.webkit.org/attachment.cgi?id=102886&action=review
I like it, but it doesn't go far enough. Be brave, Ito-san! :)
> Source/WebCore/dom/ScopedEventQueue.cpp:70 > void ScopedEventQueue::enqueueEvent(PassRefPtr<Event> event) > { > if (m_scopingLevel) > - m_queuedEvents.append(event); > + m_queuedEventDispatchMediators.append(EventDispatchMediator::create(event)); > + else { > + RefPtr<EventTarget> eventTarget = event->target(); > + eventTarget->dispatchEvent(event); > + } > +}
Can we just kill all callsites for this and remove it?
Hayato Ito
Comment 7
2011-08-04 20:00:45 PDT
Created
attachment 103024
[details]
remove enqueueEvent and clients of that
Hayato Ito
Comment 8
2011-08-04 20:03:47 PDT
Hi Dimitri, Thank you for the review. (In reply to
comment #6
)
> (From update of
attachment 102886
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=102886&action=review
> > I like it, but it doesn't go far enough. Be brave, Ito-san! :) > > > Source/WebCore/dom/ScopedEventQueue.cpp:70 > > void ScopedEventQueue::enqueueEvent(PassRefPtr<Event> event) > > { > > if (m_scopingLevel) > > - m_queuedEvents.append(event); > > + m_queuedEventDispatchMediators.append(EventDispatchMediator::create(event)); > > + else { > > + RefPtr<EventTarget> eventTarget = event->target(); > > + eventTarget->dispatchEvent(event); > > + } > > +} > > Can we just kill all callsites for this and remove it?
Sure. We can remove them to simplify code. Done.
Dimitri Glazkov (Google)
Comment 9
2011-08-04 21:12:45 PDT
Comment on
attachment 103024
[details]
remove enqueueEvent and clients of that View in context:
https://bugs.webkit.org/attachment.cgi?id=103024&action=review
> Source/WebCore/dom/Node.cpp:2710 > void Node::dispatchScopedEvent(PassRefPtr<Event> event)
Can we remove this too?
Hayato Ito
Comment 10
2011-08-04 21:51:51 PDT
Thank you for the review again. (In reply to
comment #9
)
> (From update of
attachment 103024
[details]
) > View in context:
https://bugs.webkit.org/attachment.cgi?id=103024&action=review
> > > Source/WebCore/dom/Node.cpp:2710 > > void Node::dispatchScopedEvent(PassRefPtr<Event> event) > > Can we remove this too?
We can. But we have to touch a lot of files to remove that because there are a lot of clients using that function. If we remove that, all clientes will be forced to use node->dispatchEvent(EventDispatchMediater::create(Event:create(....,)); instead of node->dispatchEvent(Event:create(....,));. Is it okay? Anyway, that requires touching a lot of files. So it might be done in another patch. I am going to this patch.
Hayato Ito
Comment 11
2011-08-04 21:53:03 PDT
s/ I am going to this patch / I am going to land this patch./
Ryosuke Niwa
Comment 12
2011-08-04 23:13:21 PDT
Please cc me for these scopedEventQueue-related bugs in the future.
WebKit Review Bot
Comment 13
2011-08-04 23:14:26 PDT
Comment on
attachment 103024
[details]
remove enqueueEvent and clients of that Clearing flags on attachment: 103024 Committed
r92450
: <
http://trac.webkit.org/changeset/92450
>
WebKit Review Bot
Comment 14
2011-08-04 23:14:31 PDT
All reviewed patches have been landed. Closing bug.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug