Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(350)

Issue 1463823003: Return a enumeration of the state of handling of InputEvents. (Closed)

Created:
5 years, 1 month ago by dtapuska
Modified:
4 years, 11 months ago
CC:
blink-reviews, blink-reviews-api_chromium.org, blink-reviews-dom_chromium.org, chromium-reviews, darin-cc_chromium.org, dcheng, dglazkov+blink, eae+blinkwatch, jam, jochen+watch_chromium.org, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-blink_chromium.org, mlamouri+watch-content_chromium.org, mlamouri+watch-test-runner_chromium.org, mustaq, rwlbuis, sof
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Return a enumeration of the state of handling of InputEvents. It was not possible to determine how InputEvents were handled by scripts or the default handlers. The determination is required to add uma metrics for determining the use of passive event listeners. BUG=543611 Committed: https://crrev.com/5d2e9c3ce9d185794978fee56cc952822a4adf5f Cr-Commit-Position: refs/heads/master@{#362994}

Patch Set 1 #

Patch Set 2 : Fix build failures and disabled click test #

Total comments: 17

Patch Set 3 : Add 4th result type #

Total comments: 1

Patch Set 4 : Fix keyboard issue not returning result correctly #

Patch Set 5 : Fix drag layout test #

Total comments: 19

Patch Set 6 : Fix comments from Patch set 5. #

Patch Set 7 : Rebase #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+609 lines, -503 lines) Patch
M components/html_viewer/touch_handler.cc View 1 1 chunk +2 lines, -1 line 0 comments Download
M components/plugins/renderer/webview_plugin.h View 1 chunk +3 lines, -2 lines 0 comments Download
M components/plugins/renderer/webview_plugin.cc View 1 2 2 chunks +7 lines, -6 lines 0 comments Download
M components/test_runner/event_sender.h View 2 chunks +3 lines, -1 line 0 comments Download
M components/test_runner/event_sender.cc View 1 2 3 4 5 6 4 chunks +5 lines, -3 lines 0 comments Download
M components/test_runner/test_plugin.h View 1 chunk +3 lines, -2 lines 0 comments Download
M components/test_runner/test_plugin.cc View 2 chunks +4 lines, -3 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/browser_plugin/browser_plugin.cc View 1 2 3 4 5 2 chunks +9 lines, -8 lines 0 comments Download
M content/renderer/npapi/webplugin_impl.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/npapi/webplugin_impl.cc View 1 2 3 4 5 3 chunks +7 lines, -4 lines 0 comments Download
M content/renderer/pepper/pepper_webplugin_impl.h View 1 chunk +3 lines, -2 lines 0 comments Download
M content/renderer/pepper/pepper_webplugin_impl.cc View 1 2 3 4 5 1 chunk +7 lines, -4 lines 0 comments Download
M content/renderer/render_widget.cc View 2 chunks +3 lines, -1 line 0 comments Download
M content/renderer/render_widget_fullscreen_pepper.cc View 1 2 3 4 5 4 chunks +7 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Node.h View 1 2 3 4 1 chunk +0 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Node.cpp View 1 2 3 4 5 6 2 chunks +0 lines, -18 lines 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.h View 1 2 11 chunks +39 lines, -38 lines 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.cpp View 1 2 3 4 5 6 86 chunks +290 lines, -229 lines 2 comments Download
M third_party/WebKit/Source/core/page/DragController.cpp View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/InspectorOverlay.cpp View 2 chunks +4 lines, -4 lines 0 comments Download
M third_party/WebKit/Source/web/PageWidgetDelegate.h View 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/web/PageWidgetDelegate.cpp View 1 2 3 chunks +17 lines, -18 lines 2 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.h View 3 chunks +7 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/web/WebFrameWidgetImpl.cpp View 1 2 3 4 5 12 chunks +42 lines, -35 lines 0 comments Download
M third_party/WebKit/Source/web/WebPagePopupImpl.h View 2 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/web/WebPagePopupImpl.cpp View 1 2 3 4 3 chunks +11 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/web/WebPluginContainerImpl.cpp View 1 2 3 4 5 6 6 chunks +6 lines, -6 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewFrameWidget.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebViewFrameWidget.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.h View 1 2 3 4 chunks +8 lines, -7 lines 0 comments Download
M third_party/WebKit/Source/web/WebViewImpl.cpp View 1 2 3 4 5 6 21 chunks +68 lines, -58 lines 0 comments Download
M third_party/WebKit/Source/web/tests/FakeWebPlugin.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/web/tests/WebPluginContainerTest.cpp View 1 2 1 chunk +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebViewTest.cpp View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/blink_headers.gypi View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
A third_party/WebKit/public/platform/WebInputEventResult.h View 1 2 1 chunk +23 lines, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebPlugin.h View 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/public/web/WebWidget.h View 2 chunks +3 lines, -3 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 26 (7 generated)
dtapuska
5 years, 1 month ago (2015-11-23 20:03:51 UTC) #3
Rick Byers
I'm still reviewing this (sadly the 2->3 states takes some thought per site), but since ...
5 years, 1 month ago (2015-11-23 21:59:56 UTC) #4
Rick Byers
/cc mustaq since he's worked in a bunch of this code
5 years, 1 month ago (2015-11-24 01:47:35 UTC) #5
dtapuska
https://codereview.chromium.org/1463823003/diff/20001/content/renderer/npapi/webplugin_impl.cc File content/renderer/npapi/webplugin_impl.cc (right): https://codereview.chromium.org/1463823003/diff/20001/content/renderer/npapi/webplugin_impl.cc#newcode438 content/renderer/npapi/webplugin_impl.cc:438: return ret ? WebInputEventResult::HandledDefaultHandler On 2015/11/23 21:59:55, Rick Byers ...
5 years ago (2015-11-24 15:23:02 UTC) #6
dtapuska
https://codereview.chromium.org/1463823003/diff/20001/third_party/WebKit/Source/core/input/EventHandler.cpp File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1463823003/diff/20001/third_party/WebKit/Source/core/input/EventHandler.cpp#newcode1026 third_party/WebKit/Source/core/input/EventHandler.cpp:1026: return WebInputEventResult::HandledDefaultHandler; On 2015/11/23 21:59:55, Rick Byers wrote: > ...
5 years ago (2015-11-24 22:09:38 UTC) #7
dtapuska
https://codereview.chromium.org/1463823003/diff/40001/third_party/WebKit/public/platform/WebInputEventResult.h File third_party/WebKit/public/platform/WebInputEventResult.h (right): https://codereview.chromium.org/1463823003/diff/40001/third_party/WebKit/public/platform/WebInputEventResult.h#newcode12 third_party/WebKit/public/platform/WebInputEventResult.h:12: NotHandled, I was going to put NotHandled at the ...
5 years ago (2015-11-24 22:10:25 UTC) #8
Rick Byers
Looks great, thanks. Just a couple specific places to discuss a little... https://codereview.chromium.org/1463823003/diff/80001/content/renderer/npapi/webplugin_impl.cc File content/renderer/npapi/webplugin_impl.cc ...
5 years ago (2015-11-27 21:31:53 UTC) #9
mustaq
https://codereview.chromium.org/1463823003/diff/80001/third_party/WebKit/Source/core/input/EventHandler.cpp File third_party/WebKit/Source/core/input/EventHandler.cpp (left): https://codereview.chromium.org/1463823003/diff/80001/third_party/WebKit/Source/core/input/EventHandler.cpp#oldcode1350 third_party/WebKit/Source/core/input/EventHandler.cpp:1350: clickTargetNode->dispatchMouseEvent(mouseEvent, On 2015/11/27 21:31:53, Rick Byers wrote: > oh ...
5 years ago (2015-11-30 16:02:50 UTC) #11
dtapuska
https://codereview.chromium.org/1463823003/diff/80001/content/renderer/browser_plugin/browser_plugin.cc File content/renderer/browser_plugin/browser_plugin.cc (right): https://codereview.chromium.org/1463823003/diff/80001/content/renderer/browser_plugin/browser_plugin.cc#newcode527 content/renderer/browser_plugin/browser_plugin.cc:527: return blink::WebInputEventResult::HandledSystem; Adjusted here https://codereview.chromium.org/1463823003/diff/80001/content/renderer/npapi/webplugin_impl.cc File content/renderer/npapi/webplugin_impl.cc (right): https://codereview.chromium.org/1463823003/diff/80001/content/renderer/npapi/webplugin_impl.cc#newcode438 ...
5 years ago (2015-11-30 16:15:43 UTC) #12
Rick Byers
https://codereview.chromium.org/1463823003/diff/80001/third_party/WebKit/Source/core/input/EventHandler.cpp File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1463823003/diff/80001/third_party/WebKit/Source/core/input/EventHandler.cpp#newcode1013 third_party/WebKit/Source/core/input/EventHandler.cpp:1013: WebInputEventResult result = passMousePressEventToSubframe(mev, subframe.get()); On 2015/11/30 16:15:43, dtapuska ...
5 years ago (2015-12-02 14:52:10 UTC) #13
Rick Byers
On 2015/12/02 14:52:10, Rick Byers wrote: > https://codereview.chromium.org/1463823003/diff/80001/third_party/WebKit/Source/core/input/EventHandler.cpp > File third_party/WebKit/Source/core/input/EventHandler.cpp (right): > > https://codereview.chromium.org/1463823003/diff/80001/third_party/WebKit/Source/core/input/EventHandler.cpp#newcode1013 ...
5 years ago (2015-12-02 16:09:28 UTC) #14
dtapuska
On 2015/12/02 16:09:28, Rick Byers wrote: > On 2015/12/02 14:52:10, Rick Byers wrote: > > ...
5 years ago (2015-12-02 16:34:12 UTC) #16
jochen (gone - plz use gerrit)
lgtm
5 years ago (2015-12-03 14:56:42 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1463823003/120001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1463823003/120001
5 years ago (2015-12-03 15:00:11 UTC) #19
commit-bot: I haz the power
Committed patchset #7 (id:120001)
5 years ago (2015-12-03 16:40:00 UTC) #21
commit-bot: I haz the power
Patchset 7 (id:??) landed as https://crrev.com/5d2e9c3ce9d185794978fee56cc952822a4adf5f Cr-Commit-Position: refs/heads/master@{#362994}
5 years ago (2015-12-03 16:40:46 UTC) #23
kotenkov
Sorry for digging this up, but I have a couple of questions. It seems to ...
4 years, 11 months ago (2016-01-12 20:55:00 UTC) #24
dtapuska
https://codereview.chromium.org/1463823003/diff/120001/third_party/WebKit/Source/core/input/EventHandler.cpp File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1463823003/diff/120001/third_party/WebKit/Source/core/input/EventHandler.cpp#newcode1384 third_party/WebKit/Source/core/input/EventHandler.cpp:1384: if (clickTargetNode->dispatchMouseEvent(mouseEvent, On 2016/01/12 20:55:00, kotenkov wrote: > There ...
4 years, 11 months ago (2016-01-12 21:06:48 UTC) #25
kotenkov
4 years, 11 months ago (2016-01-15 07:56:15 UTC) #26
Message was sent while issue was closed.
On 2016/01/12 21:06:48, dtapuska wrote:
>
https://codereview.chromium.org/1463823003/diff/120001/third_party/WebKit/Sou...
> File third_party/WebKit/Source/core/input/EventHandler.cpp (right):
> 
>
https://codereview.chromium.org/1463823003/diff/120001/third_party/WebKit/Sou...
> third_party/WebKit/Source/core/input/EventHandler.cpp:1384: if
> (clickTargetNode->dispatchMouseEvent(mouseEvent,
> On 2016/01/12 20:55:00, kotenkov wrote:
> > There should be a negation here: |EventTarget::dispatchEvent()| returns true
> if
> > default was not prevented.
> > It doesn't affect anything in today's code, because the return value of this
> > function is ignored.
> 
> Thanks for the find; you are correct. This is in fact fixed in a follow up
> change here https://codereview.chromium.org/1479923002/ that I need to get
back
> to working on.
> 
>
https://codereview.chromium.org/1463823003/diff/120001/third_party/WebKit/Sou...
> File third_party/WebKit/Source/web/PageWidgetDelegate.cpp (right):
> 
>
https://codereview.chromium.org/1463823003/diff/120001/third_party/WebKit/Sou...
> third_party/WebKit/Source/web/PageWidgetDelegate.cpp:145: return
> WebInputEventResult::HandledSystem;
> On 2016/01/12 20:55:00, kotenkov wrote:
> > It seems to me that there are a lot of changes in EventHandler.cpp, that are
> > simply not used. The call above will lead to
> > |EventHanlder::handleMouseRelease()| that may return any of the elements of
> the
> > enum. But we ignore that value and always return
> > WebInputEventResult::HandledSystem. The same is true for
> > WebInputEvent::MouseMove and some others. It seems to me that there is an
> error
> > here: either we should pay attention to values returned from EventHandler
> > functions, or we shouldn't have changed anything there.
> 
> I agree the return values should be used. I wasn't trying to clean up all the
> cruft; and that change was larger than I wanted to make this change. Feel free
> to go ahead and fix it if you like.

Thanks for the clarification, i'll try to fix the issue with unused returns.

Powered by Google App Engine
This is Rietveld 408576698