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

Issue 869813003: Implement elementsFromPoint (Closed)

Created:
5 years, 11 months ago by pdr.
Modified:
5 years, 10 months ago
Reviewers:
Rick Byers
CC:
arv+blink, blink-reviews, blink-reviews-dom_chromium.org, blink-reviews-rendering, Inactive, dglazkov+blink, Dominik Röttsches, eae+blinkwatch, jchaffraix+rendering, leviw+renderwatch, pdr+renderingwatchlist_chromium.org, rwlbuis, sof, zoltan1
Base URL:
https://chromium.googlesource.com/chromium/blink.git@master
Target Ref:
refs/heads/master
Project:
blink
Visibility:
Public.

Description

Implement elementsFromPoint This patch implements elementsFromPoint from the following spec: http://www.w3.org/TR/cssom-view/#extensions-to-the-document-interface There are two changes in this patch: 1) HitTestResult's rect-based results have been converted into "list- based" results. This required extracting out a mask for hit testing with list-based results in HitTestRequest and making sure all rect-based tests also pass HitTestRequest::ListBased when hit testing (this is asserted in several places). 2) Document.elementsFromPoint has been implemented in a straightforward way on top of #1. The test results match IE11 with one exception: IE11 does not ignore pointer-events none but this patch does (implied, but not specified explicitly in the spec). Until https://www.w3.org/Bugs/Public/show_bug.cgi?id=27829 is fixed, this does not work on ShadowRoots, though the patch has been implemented in TreeScope instead of Document to make adding ShadowRoot support trivial. BUG=448529 Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=190686

Patch Set 1 #

Patch Set 2 : Switch to listBased test results everywhere, update tests #

Patch Set 3 : Fix ordering #

Patch Set 4 : Fix some bugs, match IE11 #

Patch Set 5 : Rebase #

Patch Set 6 : Cleanup #

Patch Set 7 : Fix computeBlockBounds #

Patch Set 8 : Fix a few touch adjustment crashes #

Patch Set 9 : Update webexposed tests #

Patch Set 10 : Fix typeo #

Total comments: 25

Patch Set 11 : Rebase (lesson learned: do not delete your git branch and rely on git cl patch!) #

Patch Set 12 : Address reviewer comments, cleanup tests #

Patch Set 13 : Rebase #

Patch Set 14 : Fix Internals.cpp for touch adjustment #

Total comments: 7

Patch Set 15 : Address reviewer comments, cleanup tests #

Patch Set 16 : Cleanup, add a better test for tables #

Unified diffs Side-by-side diffs Delta from patch set Stats (+738 lines, -110 lines) Patch
A LayoutTests/fast/dom/elementsFromPoint/elementsFromPoint-iframes.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +53 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/elementsFromPoint/elementsFromPoint-iframes-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +41 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/elementsFromPoint/elementsFromPoint-invalid-cases.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +69 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/elementsFromPoint/elementsFromPoint-invalid-cases-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +11 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/elementsFromPoint/elementsFromPoint-simple.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +108 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/elementsFromPoint/elementsFromPoint-simple-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +62 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/elementsFromPoint/elementsFromPoint-table.html View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +93 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/elementsFromPoint/elementsFromPoint-table-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 chunk +18 lines, -0 lines 0 comments Download
A LayoutTests/fast/dom/elementsFromPoint/resources/elementsFromPoint.js View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +88 lines, -0 lines 0 comments Download
M LayoutTests/virtual/stable/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M LayoutTests/webexposed/global-interface-listing-expected.txt View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Document.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/Document.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +7 lines, -0 lines 0 comments Download
M Source/core/dom/Document.idl View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M Source/core/dom/TreeScope.h View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +2 lines, -0 lines 0 comments Download
M Source/core/dom/TreeScope.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +62 lines, -9 lines 0 comments Download
M Source/core/layout/HitTestRequest.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +12 lines, -0 lines 0 comments Download
M Source/core/layout/HitTestResult.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +10 lines, -10 lines 0 comments Download
M Source/core/layout/HitTestResult.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +37 lines, -29 lines 0 comments Download
M Source/core/layout/Layer.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 4 chunks +13 lines, -12 lines 0 comments Download
M Source/core/layout/LayoutImage.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutPart.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/layout/LayoutTable.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/LayoutTableSection.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/layout/line/EllipsisBox.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/line/InlineFlowBox.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/line/InlineTextBox.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M Source/core/layout/svg/LayoutSVGRoot.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/layout/svg/line/SVGInlineTextBox.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -1 line 0 comments Download
M Source/core/page/EventHandler.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +16 lines, -6 lines 0 comments Download
M Source/core/page/TouchDisambiguation.cpp View 1 2 3 4 5 6 7 8 9 10 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderBlock.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 2 chunks +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderBox.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -1 line 0 comments Download
M Source/core/rendering/RenderInline.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -2 lines 0 comments Download
M Source/core/rendering/RenderView.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -0 lines 0 comments Download
M Source/core/testing/Internals.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 6 chunks +8 lines, -22 lines 0 comments Download
M Source/web/WebPluginContainerImpl.cpp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (3 generated)
pdr.
On 2015/01/26 at 05:19:55, pdr wrote: > pdr@chromium.org changed reviewers: > + rbyers@chromium.org
5 years, 11 months ago (2015-01-27 04:48:04 UTC) #2
pdr.
On 2015/01/27 at 04:48:04, pdr wrote: > On 2015/01/26 at 05:19:55, pdr wrote: > > ...
5 years, 10 months ago (2015-01-30 22:54:53 UTC) #3
Rick Byers
Sorry, didn't realize this was ready for review (saw WIP in subject, etc.). I'm just ...
5 years, 10 months ago (2015-02-01 23:23:07 UTC) #4
pdr.
On 2015/02/01 at 23:23:07, rbyers wrote: > Sorry, didn't realize this was ready for review ...
5 years, 10 months ago (2015-02-01 23:31:15 UTC) #5
pdr.
On 2015/02/01 at 23:31:15, pdr wrote: > On 2015/02/01 at 23:23:07, rbyers wrote: > > ...
5 years, 10 months ago (2015-02-01 23:40:11 UTC) #6
Rick Byers
Sorry for the delay. This seems great overall. I'm quite shocked that it was this ...
5 years, 10 months ago (2015-02-04 10:34:04 UTC) #7
pdr.
Thanks for the review! PTAL https://codereview.chromium.org/869813003/diff/180001/LayoutTests/fast/events/elementsFromPoint.html File LayoutTests/fast/events/elementsFromPoint.html (right): https://codereview.chromium.org/869813003/diff/180001/LayoutTests/fast/events/elementsFromPoint.html#newcode91 LayoutTests/fast/events/elementsFromPoint.html:91: resultText += '#' + ...
5 years, 10 months ago (2015-02-17 04:10:14 UTC) #8
pdr.
The fix for crbug.com/451914 just landed so I've updated the patch now that we can ...
5 years, 10 months ago (2015-02-18 22:47:21 UTC) #9
pdr.
Pre-vacation ping?
5 years, 10 months ago (2015-02-20 06:44:53 UTC) #10
Rick Byers
On 2015/02/20 06:44:53, pdr wrote: > Pre-vacation ping? Yep, I started yesterday but unfortunately got ...
5 years, 10 months ago (2015-02-20 17:00:45 UTC) #11
Rick Byers
Looks great, thanks. I've got a couple minor outstanding questions / concerns, but I'm OK ...
5 years, 10 months ago (2015-02-20 20:02:24 UTC) #12
pdr.
https://codereview.chromium.org/869813003/diff/260001/LayoutTests/fast/events/elementsFromPoint-invalid-cases-expected.txt File LayoutTests/fast/events/elementsFromPoint-invalid-cases-expected.txt (right): https://codereview.chromium.org/869813003/diff/260001/LayoutTests/fast/events/elementsFromPoint-invalid-cases-expected.txt#newcode5 LayoutTests/fast/events/elementsFromPoint-invalid-cases-expected.txt:5: PASS document.elementsFromPoint(786, 1).length is 0 On 2015/02/20 at 20:02:24, ...
5 years, 10 months ago (2015-02-22 23:28:14 UTC) #14
pdr.
On 2015/02/20 at 20:02:24, rbyers wrote: > https://codereview.chromium.org/869813003/diff/180001/Source/core/rendering/HitTestResult.cpp#oldcode410 > Source/core/rendering/HitTestResult.cpp:410: ASSERT(isRectBasedTest() && other.isRectBasedTest()); > On ...
5 years, 10 months ago (2015-02-22 23:31:55 UTC) #15
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/869813003/300001
5 years, 10 months ago (2015-02-23 19:31:57 UTC) #17
commit-bot: I haz the power
5 years, 10 months ago (2015-02-23 20:09:39 UTC) #18
Message was sent while issue was closed.
Committed patchset #16 (id:300001) as
https://src.chromium.org/viewvc/blink?view=rev&revision=190686

Powered by Google App Engine
This is Rietveld 408576698