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

Issue 1630683002: Canvas2d: addHitRegion() should take clipping region into account. (Closed)

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

Description

Canvas2d: addHitRegion() should take clipping region into account. Current implementation ignores the clipping region when calling addHitRegion(). In the past, we had no way to get the current clip path from canvas state stack in Blink side but it's been possible since display list 2d canvas feature. BUG=387057 Committed: https://crrev.com/da1acd5523fb34ff8c71a9777cf938e0cbbf276a Cr-Commit-Position: refs/heads/master@{#371832}

Patch Set 1 #

Patch Set 2 : #

Total comments: 4

Patch Set 3 : addressed comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+141 lines, -5 lines) Patch
A third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-clip-test.html View 1 2 1 chunk +126 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2D.cpp View 1 2 1 chunk +3 lines, -5 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/CanvasRenderingContext2DState.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/ClipList.h View 1 2 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/Source/modules/canvas2d/ClipList.cpp View 1 2 2 chunks +10 lines, -0 lines 0 comments Download

Messages

Total messages: 12 (3 generated)
zino
Please take a look. Thank you.
4 years, 11 months ago (2016-01-25 15:01:33 UTC) #2
Stephen White
https://codereview.chromium.org/1630683002/diff/20001/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-clip-test.html File third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-clip-test.html (right): https://codereview.chromium.org/1630683002/diff/20001/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-clip-test.html#newcode17 third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-clip-test.html:17: return "This test requires eventSender"; Other tests seem to ...
4 years, 11 months ago (2016-01-25 15:37:36 UTC) #3
zino
Thank you for review. Please take a look again. https://codereview.chromium.org/1630683002/diff/20001/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-clip-test.html File third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-clip-test.html (right): https://codereview.chromium.org/1630683002/diff/20001/third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-clip-test.html#newcode17 third_party/WebKit/LayoutTests/fast/canvas/canvas-hit-regions-clip-test.html:17: ...
4 years, 10 months ago (2016-01-27 17:10:30 UTC) #4
Stephen White
LGTM
4 years, 10 months ago (2016-01-27 17:16:40 UTC) #5
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1630683002/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1630683002/40001
4 years, 10 months ago (2016-01-27 17:37:16 UTC) #7
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 10 months ago (2016-01-27 18:51:33 UTC) #8
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/da1acd5523fb34ff8c71a9777cf938e0cbbf276a Cr-Commit-Position: refs/heads/master@{#371832}
4 years, 10 months ago (2016-01-27 18:53:05 UTC) #10
Justin Novosad
On 2016/01/27 18:53:05, commit-bot: I haz the power wrote: > Patchset 3 (id:??) landed as ...
4 years, 10 months ago (2016-02-02 21:36:09 UTC) #11
zino
4 years, 10 months ago (2016-02-03 03:56:37 UTC) #12
Message was sent while issue was closed.
On 2016/02/02 21:36:09, Justin Novosad wrote:
> On 2016/01/27 18:53:05, commit-bot: I haz the power wrote:
> > Patchset 3 (id:??) landed as
> > https://crrev.com/da1acd5523fb34ff8c71a9777cf938e0cbbf276a
> > Cr-Commit-Position: refs/heads/master@{#371832}
> 
> post commit lgtm
> Side note: I don't know how impactful this would be, but there is a possible
> optimization that would consist in caching the cumulative clip in ClipList to
> make the intersection computation O(1) instead of O(N)

Thank you for input.

I finish MouseEvent(or/and Touch) and event rerouting works first and then I'll
try it asap.

Powered by Google App Engine
This is Rietveld 408576698