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

Issue 2588833004: DevTools: better hasSelection check to include composed trees (Closed)

Created:
4 years ago by luoe
Modified:
4 years ago
Reviewers:
dgozman, lushnikov, allada
CC:
chromium-reviews, caseq+blink_chromium.org, lushnikov+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, devtools-reviews_chromium.org, blink-reviews, pfeldman, kozyatinskiy+blink_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

DevTools: better hasSelection check to include composed trees When shadow elements receive an event, the handler may to check for selections with hasSelection(). This CL makes hasSelection additionally check any composed subtrees by recursively calling itself on distributed nodes. BUG=674739 Committed: https://crrev.com/f9da6579a97d1e0be87de603df160a6c9358c0ae Cr-Commit-Position: refs/heads/master@{#440332}

Patch Set 1 #

Patch Set 2 : a #

Total comments: 2

Patch Set 3 : ac #

Total comments: 5

Patch Set 4 : ac #

Unified diffs Side-by-side diffs Delta from patch set Stats (+6 lines, -0 lines) Patch
M third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js View 1 2 3 1 chunk +6 lines, -0 lines 0 comments Download

Messages

Total messages: 28 (14 generated)
luoe
ptal
4 years ago (2016-12-19 22:56:05 UTC) #3
allada
https://codereview.chromium.org/2588833004/diff/20001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js File third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js (right): https://codereview.chromium.org/2588833004/diff/20001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js#newcode283 third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js:283: var contentElement = contents[i].getDistributedNodes(); Wouldnt it be easier to ...
4 years ago (2016-12-20 02:15:29 UTC) #4
luoe
https://codereview.chromium.org/2588833004/diff/20001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js File third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js (right): https://codereview.chromium.org/2588833004/diff/20001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js#newcode283 third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js:283: var contentElement = contents[i].getDistributedNodes(); On 2016/12/20 02:15:28, allada wrote: ...
4 years ago (2016-12-20 02:41:03 UTC) #5
allada
https://codereview.chromium.org/2588833004/diff/40001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js File third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js (right): https://codereview.chromium.org/2588833004/diff/40001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js#newcode283 third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js:283: if (Array.prototype.some.call(content.getDistributedNodes(), node => node.hasSelection())) Why Array.prototype.some.call? Why not ...
4 years ago (2016-12-20 18:41:36 UTC) #6
luoe
https://codereview.chromium.org/2588833004/diff/40001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js File third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js (right): https://codereview.chromium.org/2588833004/diff/40001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js#newcode283 third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js:283: if (Array.prototype.some.call(content.getDistributedNodes(), node => node.hasSelection())) getDistributedNodes() returns a NodeList, ...
4 years ago (2016-12-20 19:23:58 UTC) #7
allada
lgtm https://codereview.chromium.org/2588833004/diff/40001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js File third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js (right): https://codereview.chromium.org/2588833004/diff/40001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js#newcode283 third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js:283: if (Array.prototype.some.call(content.getDistributedNodes(), node => node.hasSelection())) On 2016/12/20 19:23:58, ...
4 years ago (2016-12-21 23:28:26 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2588833004/40001
4 years ago (2016-12-22 01:11:37 UTC) #14
commit-bot: I haz the power
Try jobs failed on following builders: chromium_presubmit on master.tryserver.chromium.linux (JOB_FAILED, http://build.chromium.org/p/tryserver.chromium.linux/builders/chromium_presubmit/builds/331282)
4 years ago (2016-12-22 01:19:42 UTC) #16
luoe
Please take a look. Although there is a lgtm, this CL requires one from an ...
4 years ago (2016-12-22 01:27:43 UTC) #18
dgozman
lgtm https://codereview.chromium.org/2588833004/diff/40001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js File third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js (right): https://codereview.chromium.org/2588833004/diff/40001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js#newcode280 third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js:280: // FIXME: use contains(node, {includeShadow: true}) when it ...
4 years ago (2016-12-22 01:59:33 UTC) #19
luoe
Thanks for the reviews! https://codereview.chromium.org/2588833004/diff/40001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js File third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js (right): https://codereview.chromium.org/2588833004/diff/40001/third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js#newcode280 third_party/WebKit/Source/devtools/front_end/platform/DOMExtension.js:280: // FIXME: use contains(node, {includeShadow: ...
4 years ago (2016-12-22 02:03:56 UTC) #20
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2588833004/60001
4 years ago (2016-12-22 02:04:17 UTC) #23
commit-bot: I haz the power
Committed patchset #4 (id:60001)
4 years ago (2016-12-22 03:51:02 UTC) #26
commit-bot: I haz the power
4 years ago (2016-12-22 03:53:53 UTC) #28
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/f9da6579a97d1e0be87de603df160a6c9358c0ae
Cr-Commit-Position: refs/heads/master@{#440332}

Powered by Google App Engine
This is Rietveld 408576698