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

Issue 1654653002: Canvas2d: Implement rerouting event by hit region's control. (Closed)

Created:
4 years, 10 months ago by zino
Modified:
4 years, 9 months ago
CC:
chromium-reviews, dshwang, ajuma+watch-canvas_chromium.org, blink-reviews-html_chromium.org, Justin Novosad, dglazkov+blink, Rik, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Canvas2d: Implement rerouting event by hit region's control. According to the spec[1], should support rerouting event if there is a control on hit region. This CL is also includes fixing two spec issues[2][3] and test. [1] https://html.spec.whatwg.org/multipage/scripting.html#canvas-mouseevent-rerouting-steps [2] https://github.com/whatwg/html/issues/547 [3] https://github.com/whatwg/html/issues/548 BUG=579076, 579614, 582792 Committed: https://crrev.com/f18571e9097d0533f6fc18d62b3ab006e1d6c6d4 Cr-Commit-Position: refs/heads/master@{#380870}

Patch Set 1 #

Total comments: 11

Patch Set 2 #

Patch Set 3 : Pass existing tests. #

Total comments: 9

Patch Set 4 : #

Total comments: 21

Patch Set 5 : #

Total comments: 15

Patch Set 6 : addressed nits #

Patch Set 7 : fix bot errors #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+412 lines, -220 lines) Patch
A third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-event-test.html View 1 2 3 4 1 chunk +267 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/core.gypi View 1 2 3 4 5 6 3 chunks +2 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Document.cpp View 1 2 3 4 5 6 2 chunks +10 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/dom/Touch.h View 1 2 3 4 4 chunks +7 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Touch.cpp View 1 5 chunks +6 lines, -3 lines 0 comments Download
M third_party/WebKit/Source/core/dom/Touch.idl View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/dom/TouchInit.idl View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/DragEvent.cpp View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/events/MouseEvent.h View 1 2 3 4 4 chunks +7 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/events/MouseEvent.cpp View 1 2 3 4 6 chunks +9 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/core/events/MouseEvent.idl View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/MouseEventInit.idl View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/events/WheelEvent.cpp View 1 2 3 4 5 1 chunk +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp View 1 2 3 4 5 6 1 chunk +7 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h View 1 2 3 4 5 6 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.h View 1 2 3 4 5 6 2 chunks +3 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/input/EventHandler.cpp View 1 2 3 4 5 6 14 chunks +24 lines, -10 lines 1 comment Download
M third_party/WebKit/Source/core/page/ContextMenuControllerTest.cpp View 1 2 3 4 1 chunk +2 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.h View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp View 1 2 3 4 5 6 2 chunks +22 lines, -0 lines 0 comments Download
D third_party/WebKit/Source/modules/canvas2d/EventHitRegion.h View 1 1 chunk +0 lines, -24 lines 0 comments Download
D third_party/WebKit/Source/modules/canvas2d/EventHitRegion.cpp View 1 2 3 4 1 chunk +0 lines, -39 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/HitRegion.cpp View 1 2 1 chunk +1 line, -1 line 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/MouseEventHitRegion.h View 1 2 3 4 1 chunk +0 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/MouseEventHitRegion.cpp View 1 2 3 4 1 chunk +0 lines, -22 lines 0 comments Download
D third_party/WebKit/Source/modules/canvas2d/MouseEventHitRegion.idl View 1 2 3 4 1 chunk +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/TouchHitRegion.h View 1 2 3 4 1 chunk +0 lines, -23 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/TouchHitRegion.cpp View 1 2 3 4 1 chunk +0 lines, -21 lines 0 comments Download
D third_party/WebKit/Source/modules/canvas2d/TouchHitRegion.idl View 1 2 3 4 1 chunk +0 lines, -11 lines 0 comments Download
M third_party/WebKit/Source/modules/modules.gypi View 1 2 3 4 5 6 2 chunks +0 lines, -8 lines 0 comments Download
M third_party/WebKit/Source/platform/PlatformMouseEvent.h View 1 2 3 4 5 3 chunks +10 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebFrameTest.cpp View 1 2 3 4 5 6 2 chunks +4 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/web/tests/WebInputEventConversionTest.cpp View 1 2 3 4 3 chunks +4 lines, -4 lines 0 comments Download

Messages

Total messages: 67 (30 generated)
zino
I'm working on implementing rerouting event part in hit region feature. This is still WIP ...
4 years, 10 months ago (2016-01-31 15:58:42 UTC) #3
philipj_slow
https://codereview.chromium.org/1654653002/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/1654653002/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode1023 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:1023: bool HTMLCanvasElement::dispatchEventInternal(PassRefPtrWillBeRawPtr<Event> event) Will this happen for both UA-created ...
4 years, 10 months ago (2016-02-01 04:05:20 UTC) #6
Justin Novosad
https://codereview.chromium.org/1654653002/diff/1/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp File third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/1654653002/diff/1/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp#newcode1808 third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp:1808: document.updateLayoutTreeForNodeIfNeeded(canvas()); Don't forget write a test that requires this ...
4 years, 10 months ago (2016-02-01 16:51:43 UTC) #7
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1654653002/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1654653002/80001
4 years, 10 months ago (2016-02-04 14:47:13 UTC) #12
zino
Reviewers, Sorry for delay. I'm writing layout tests but I'm staying my hometown for now(Lunar ...
4 years, 10 months ago (2016-02-05 06:46:48 UTC) #15
zino
I have to write tests for this change. https://codereview.chromium.org/1654653002/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/1654653002/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode1023 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:1023: bool ...
4 years, 10 months ago (2016-02-05 06:59:48 UTC) #17
philipj_slow
https://codereview.chromium.org/1654653002/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/1654653002/diff/1/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode1027 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:1027: target = m_context->getControlAndUpdateEvent(*event); On 2016/02/05 06:59:48, zino wrote: > ...
4 years, 10 months ago (2016-02-05 07:30:06 UTC) #18
Justin Novosad
https://codereview.chromium.org/1654653002/diff/80001/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h File third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h (right): https://codereview.chromium.org/1654653002/diff/80001/third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h#newcode112 third_party/WebKit/Source/core/html/canvas/CanvasRenderingContext.h:112: virtual std::pair<Element*, String> getControlAndIDIfHitRegionExists(const LayoutPoint& location) { return std::make_pair(nullptr, ...
4 years, 10 months ago (2016-02-05 15:22:53 UTC) #19
Rick Byers
https://codereview.chromium.org/1654653002/diff/80001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp File third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/1654653002/diff/80001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp#newcode1803 third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp:1803: document.updateLayoutTreeForNodeIfNeeded(canvas()); On 2016/02/05 15:22:53, Justin Novosad wrote: > Updating ...
4 years, 10 months ago (2016-02-05 16:01:20 UTC) #20
zino
Please take a look again. Thank you. https://codereview.chromium.org/1654653002/diff/80001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp File third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp (right): https://codereview.chromium.org/1654653002/diff/80001/third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp#newcode1040 third_party/WebKit/Source/core/html/HTMLCanvasElement.cpp:1040: std::pair<Element*, String> ...
4 years, 10 months ago (2016-02-12 15:26:19 UTC) #30
Justin Novosad
lgtm for modules/canvas2d and core/html https://codereview.chromium.org/1654653002/diff/80001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp File third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp (right): https://codereview.chromium.org/1654653002/diff/80001/third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp#newcode1803 third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp:1803: document.updateLayoutTreeForNodeIfNeeded(canvas()); On 2016/02/12 15:26:19, ...
4 years, 10 months ago (2016-02-12 15:41:59 UTC) #31
philipj_slow
Rick said "In particular, instead of taking a LayoutPoint, we could take a HitTestResult (and ...
4 years, 10 months ago (2016-02-15 10:45:25 UTC) #32
zino
On 2016/02/15 10:45:25, philipj_UTC7 wrote: > Rick said "In particular, instead of taking a LayoutPoint, ...
4 years, 10 months ago (2016-02-15 12:35:20 UTC) #33
zino
On 2016/02/15 12:35:20, zino wrote: > On 2016/02/15 10:45:25, philipj_UTC7 wrote: > > Rick said ...
4 years, 10 months ago (2016-02-15 12:54:35 UTC) #34
philipj_slow
On 2016/02/15 12:54:35, zino wrote: > On 2016/02/15 12:35:20, zino wrote: > > On 2016/02/15 ...
4 years, 10 months ago (2016-02-16 09:52:27 UTC) #35
zino
On 2016/02/16 09:52:27, philipj_UTC7 wrote: > Thanks! This all looks reasonable to me, but if ...
4 years, 10 months ago (2016-02-16 09:55:03 UTC) #36
Rick Byers
Sorry it took me awhile to review this - finally spent a few hours on ...
4 years, 10 months ago (2016-02-23 20:26:09 UTC) #37
Rick Byers
Oh also I suspect there are a few more cases that may be broken and ...
4 years, 10 months ago (2016-02-24 23:16:05 UTC) #38
zino
On 2016/02/24 23:16:05, Rick Byers wrote: > Oh also I suspect there are a few ...
4 years, 10 months ago (2016-02-25 17:00:57 UTC) #39
zino
On 2016/02/25 17:00:57, zino (OOO until Mar 1) wrote: > On 2016/02/24 23:16:05, Rick Byers ...
4 years, 9 months ago (2016-03-02 14:36:42 UTC) #40
Rick Byers
On 2016/03/02 14:36:42, zino wrote: > On 2016/02/25 17:00:57, zino (OOO until Mar 1) wrote: ...
4 years, 9 months ago (2016-03-02 17:08:31 UTC) #41
zino
https://codereview.chromium.org/1654653002/diff/200001/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-event-test.html File third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-event-test.html (right): https://codereview.chromium.org/1654653002/diff/200001/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-event-test.html#newcode29 third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-event-test.html:29: context.addHitRegion({ id : 'button' }); On 2016/02/23 20:26:08, Rick ...
4 years, 9 months ago (2016-03-08 12:33:48 UTC) #42
Rick Byers
Did you intend to upload a new CL with the changes you marked as 'Done'? ...
4 years, 9 months ago (2016-03-08 15:57:35 UTC) #43
zino
@Rick, PTAL. (Sorry, I tried to upload a new patch set yesterday but unknown network ...
4 years, 9 months ago (2016-03-09 04:55:01 UTC) #45
Rick Byers
LGTM with nits Thanks for all the hard work on this - it's a substantial ...
4 years, 9 months ago (2016-03-10 21:36:29 UTC) #46
zino
Thank you very much for you review. I've addressed all of nits but could you ...
4 years, 9 months ago (2016-03-11 09:35:47 UTC) #47
zino
PTAL Rick@ :)
4 years, 9 months ago (2016-03-12 00:47:10 UTC) #48
zino
PTAL Rick@ :)
4 years, 9 months ago (2016-03-12 00:47:14 UTC) #49
Rick Byers
Yep, still LGTM
4 years, 9 months ago (2016-03-12 01:36:20 UTC) #50
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1654653002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1654653002/260001
4 years, 9 months ago (2016-03-12 01:49:56 UTC) #53
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_asan_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_asan_rel_ng/builds/130218)
4 years, 9 months ago (2016-03-12 02:39:50 UTC) #55
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1654653002/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1654653002/260001
4 years, 9 months ago (2016-03-12 02:46:14 UTC) #57
commit-bot: I haz the power
Try jobs failed on following builders: win_chromium_rel_ng on tryserver.chromium.win (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.win/builders/win_chromium_rel_ng/builds/188345)
4 years, 9 months ago (2016-03-12 03:55:38 UTC) #59
zino
https://codereview.chromium.org/1654653002/diff/280001/third_party/WebKit/Source/core/input/EventHandler.cpp File third_party/WebKit/Source/core/input/EventHandler.cpp (right): https://codereview.chromium.org/1654653002/diff/280001/third_party/WebKit/Source/core/input/EventHandler.cpp#newcode1062 third_party/WebKit/Source/core/input/EventHandler.cpp:1062: WebInputEventResult eventResult = updatePointerTargetAndDispatchEvents(EventTypeNames::mousedown, mev.innerNode(), m_clickCount, mev.event()); Fix trybot ...
4 years, 9 months ago (2016-03-12 05:59:08 UTC) #60
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1654653002/280001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1654653002/280001
4 years, 9 months ago (2016-03-12 05:59:31 UTC) #63
commit-bot: I haz the power
Committed patchset #7 (id:280001)
4 years, 9 months ago (2016-03-12 08:02:20 UTC) #65
commit-bot: I haz the power
4 years, 9 months ago (2016-03-12 08:03:46 UTC) #67
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/f18571e9097d0533f6fc18d62b3ab006e1d6c6d4
Cr-Commit-Position: refs/heads/master@{#380870}

Powered by Google App Engine
This is Rietveld 408576698