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

Issue 1506053003: Include clip-path and border radius when hit testing boxes (Closed)

Created:
5 years ago by pdr.
Modified:
5 years ago
Reviewers:
chrishtr, Rick Byers
CC:
blink-reviews, blink-reviews-layout_chromium.org, chromium-reviews, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, szager+layoutwatch_chromium.org, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Include clip-path and border radius when hit testing boxes This patch fixes a bug where clip-path and border radius were ignored on boxes such as images. This code was present in LayoutBlock but needed to be moved up to LayoutBox. The patch itself primarily extracts the clip-path and border radius code into functions called by both LayoutBlock and LayoutBox. The clip path code has been cleaned up a little not use a switch. A TODO has been added for sharing even more code between the block and box hit testing code. Another TODO has been added for compositor support for hit test clipping. BUG=468613 Committed: https://crrev.com/ba4a97410b76057c11d300c4bd61402863f50d45 Cr-Commit-Position: refs/heads/master@{#365050}

Patch Set 1 #

Total comments: 1

Patch Set 2 : Also fix border radius on boxes, add todos for discoveries learned about this area #

Patch Set 3 : Cleanup tests to use js-test.js #

Total comments: 2

Patch Set 4 : Add test for clip-path shapes #

Patch Set 5 : Hit test in PaintLayer, add transformed clip path tests #

Unified diffs Side-by-side diffs Delta from patch set Stats (+254 lines, -36 lines) Patch
A third_party/WebKit/LayoutTests/hittesting/image-with-border-radius.html View 1 1 chunk +54 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/hittesting/image-with-border-radius-expected.txt View 1 1 chunk +16 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/hittesting/image-with-clip-path.html View 1 2 3 4 1 chunk +93 lines, -0 lines 0 comments Download
A third_party/WebKit/LayoutTests/hittesting/image-with-clip-path-expected.txt View 1 2 3 4 1 chunk +19 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBlock.cpp View 1 2 3 4 4 chunks +11 lines, -30 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.h View 1 2 3 4 2 chunks +4 lines, -0 lines 0 comments Download
M third_party/WebKit/Source/core/layout/LayoutBox.cpp View 1 2 3 4 4 chunks +45 lines, -2 lines 0 comments Download
M third_party/WebKit/Source/core/paint/PaintLayer.cpp View 1 2 3 4 4 chunks +12 lines, -4 lines 0 comments Download

Messages

Total messages: 44 (18 generated)
pdr.
5 years ago (2015-12-08 04:31:37 UTC) #2
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1506053003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1506053003/1
5 years ago (2015-12-08 04:33:07 UTC) #4
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/152042)
5 years ago (2015-12-08 06:33:14 UTC) #6
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1506053003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1506053003/1
5 years ago (2015-12-08 15:24:37 UTC) #8
commit-bot: I haz the power
Dry run: Try jobs failed on following builders: linux_chromium_rel_ng on tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_rel_ng/builds/152287)
5 years ago (2015-12-08 16:15:42 UTC) #10
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1506053003/1 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1506053003/1
5 years ago (2015-12-08 22:06:17 UTC) #12
commit-bot: I haz the power
No L-G-T-M from a valid reviewer yet. Only full committers are accepted. Even if an ...
5 years ago (2015-12-08 22:06:18 UTC) #14
Rick Byers
I don't have any experience in the SVG-specific code here, but the hit-testing logic LGTM.
5 years ago (2015-12-08 22:13:47 UTC) #15
chrishtr
https://codereview.chromium.org/1506053003/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.cpp File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): https://codereview.chromium.org/1506053003/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode1172 third_party/WebKit/Source/core/layout/LayoutBox.cpp:1172: if (hitTestClippedOutByClipPath(FloatPoint(locationInContainer.point() - adjustedLocation))) And css clip? What kind ...
5 years ago (2015-12-08 22:14:32 UTC) #16
pdr.
On 2015/12/08 at 22:13:47, rbyers wrote: > I don't have any experience in the SVG-specific ...
5 years ago (2015-12-08 22:20:08 UTC) #17
pdr.
On 2015/12/08 at 22:14:32, chrishtr wrote: > https://codereview.chromium.org/1506053003/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.cpp > File third_party/WebKit/Source/core/layout/LayoutBox.cpp (right): > > https://codereview.chromium.org/1506053003/diff/1/third_party/WebKit/Source/core/layout/LayoutBox.cpp#newcode1172 ...
5 years ago (2015-12-08 22:32:39 UTC) #18
pdr.
Pretty large update which reflects our findings in this area over the past week. This ...
5 years ago (2015-12-11 06:36:20 UTC) #21
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1506053003/40001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1506053003/40001
5 years ago (2015-12-11 06:37:02 UTC) #23
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-11 08:27:08 UTC) #25
Rick Byers
Ah, this seems better - thank you! One suggestion for the test. https://codereview.chromium.org/1506053003/diff/40001/third_party/WebKit/LayoutTests/hittesting/image-with-clip-path.html File third_party/WebKit/LayoutTests/hittesting/image-with-clip-path.html ...
5 years ago (2015-12-11 16:02:51 UTC) #26
pdr.
https://codereview.chromium.org/1506053003/diff/40001/third_party/WebKit/LayoutTests/hittesting/image-with-clip-path.html File third_party/WebKit/LayoutTests/hittesting/image-with-clip-path.html (right): https://codereview.chromium.org/1506053003/diff/40001/third_party/WebKit/LayoutTests/hittesting/image-with-clip-path.html#newcode15 third_party/WebKit/LayoutTests/hittesting/image-with-clip-path.html:15: clip-path: url(#clipPathTopLeft); On 2015/12/11 at 16:02:51, Rick Byers wrote: ...
5 years ago (2015-12-11 18:09:23 UTC) #27
Rick Byers
LGTM
5 years ago (2015-12-11 18:12:21 UTC) #28
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1506053003/60001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1506053003/60001
5 years ago (2015-12-11 18:19:19 UTC) #30
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-11 19:35:44 UTC) #32
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1506053003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1506053003/80001
5 years ago (2015-12-13 21:03:52 UTC) #34
pdr.
On 2015/12/13 at 21:03:52, commit-bot wrote: > Dry run: CQ is trying da patch. Follow ...
5 years ago (2015-12-14 01:01:12 UTC) #35
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years ago (2015-12-14 03:23:27 UTC) #37
chrishtr
lgtm
5 years ago (2015-12-14 17:51:05 UTC) #38
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1506053003/80001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1506053003/80001
5 years ago (2015-12-14 18:21:38 UTC) #41
commit-bot: I haz the power
Committed patchset #5 (id:80001)
5 years ago (2015-12-14 18:29:51 UTC) #42
commit-bot: I haz the power
5 years ago (2015-12-14 18:30:44 UTC) #44
Message was sent while issue was closed.
Patchset 5 (id:??) landed as
https://crrev.com/ba4a97410b76057c11d300c4bd61402863f50d45
Cr-Commit-Position: refs/heads/master@{#365050}

Powered by Google App Engine
This is Rietveld 408576698