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

Issue 16561003: DevTools: Inspect element mode does not select element in ShadowDOM (Closed)

Created:
7 years, 6 months ago by pfeldman
Modified:
7 years, 2 months ago
Reviewers:
apavlov, vsevik, johnjbarton
CC:
blink-reviews, caseq+blink_chromium.org, loislo+blink_chromium.org, eustas+blink_chromium.org, alph+blink_chromium.org, eae+blinkwatch, yurys+blink_chromium.org, lushnikov+blink_chromium.org, vsevik+blink_chromium.org, pfeldman+blink_chromium.org, apavlov+blink_chromium.org, aandrey+blink_chromium.org
Visibility:
Public.

Description

DevTools: Inspect element mode does not select element in ShadowDOM BUG=236509 R=vsevik@chromium.org Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=152016

Patch Set 1 #

Total comments: 23

Patch Set 2 : For landing #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+264 lines, -186 lines) Patch
M LayoutTests/http/tests/inspector/elements-test.js View 1 1 chunk +22 lines, -18 lines 0 comments Download
M LayoutTests/inspector/elements/edit-dom-actions.html View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/inspector/elements/node-xpath.xhtml View 1 chunk +1 line, -1 line 0 comments Download
M LayoutTests/inspector/elements/shadow-dom-modify-chardata.html View 1 1 chunk +2 lines, -6 lines 0 comments Download
M Source/core/inspector/InspectorDOMAgent.cpp View 1 4 chunks +16 lines, -10 lines 0 comments Download
M Source/devtools/front_end/DOMAgent.js View 1 16 chunks +85 lines, -42 lines 1 comment Download
M Source/devtools/front_end/DOMBreakpointsSidebarPane.js View 1 chunk +4 lines, -3 lines 0 comments Download
M Source/devtools/front_end/ElementsPanel.js View 3 chunks +9 lines, -0 lines 0 comments Download
M Source/devtools/front_end/ElementsTreeOutline.js View 1 46 chunks +124 lines, -105 lines 2 comments Download

Messages

Total messages: 8 (0 generated)
pfeldman
7 years, 6 months ago (2013-06-06 15:57:38 UTC) #1
apavlov
Looks safe to me. https://codereview.chromium.org/16561003/diff/1/LayoutTests/http/tests/inspector/elements-test.js File LayoutTests/http/tests/inspector/elements-test.js (right): https://codereview.chromium.org/16561003/diff/1/LayoutTests/http/tests/inspector/elements-test.js#newcode26 LayoutTests/http/tests/inspector/elements-test.js:26: } finally { Curlies not ...
7 years, 6 months ago (2013-06-06 16:18:59 UTC) #2
vsevik
lgtm https://chromiumcodereview.appspot.com/16561003/diff/1/LayoutTests/http/tests/inspector/elements-test.js File LayoutTests/http/tests/inspector/elements-test.js (right): https://chromiumcodereview.appspot.com/16561003/diff/1/LayoutTests/http/tests/inspector/elements-test.js#newcode5 LayoutTests/http/tests/inspector/elements-test.js:5: var originalCallback = callback; Unused. https://chromiumcodereview.appspot.com/16561003/diff/1/LayoutTests/http/tests/inspector/elements-test.js#newcode20 LayoutTests/http/tests/inspector/elements-test.js:20: pendingRequests--; ...
7 years, 6 months ago (2013-06-07 08:40:59 UTC) #3
pfeldman
https://chromiumcodereview.appspot.com/16561003/diff/1/LayoutTests/http/tests/inspector/elements-test.js File LayoutTests/http/tests/inspector/elements-test.js (right): https://chromiumcodereview.appspot.com/16561003/diff/1/LayoutTests/http/tests/inspector/elements-test.js#newcode5 LayoutTests/http/tests/inspector/elements-test.js:5: var originalCallback = callback; On 2013/06/07 08:41:00, vsevik wrote: ...
7 years, 6 months ago (2013-06-07 08:53:48 UTC) #4
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/pfeldman@chromium.org/16561003/10001
7 years, 6 months ago (2013-06-07 09:41:09 UTC) #5
commit-bot: I haz the power
Retried try job too often on linux_layout_rel for step(s) webkit_tests http://build.chromium.org/p/tryserver.chromium/buildstatus?builder=linux_layout_rel&number=11938
7 years, 6 months ago (2013-06-07 10:36:30 UTC) #6
pfeldman
Committed patchset #2 manually as r152016 (presubmit successful).
7 years, 6 months ago (2013-06-07 11:44:00 UTC) #7
johnjbarton
7 years, 2 months ago (2013-10-08 21:59:56 UTC) #8
Message was sent while issue was closed.
See https://codereview.chromium.org/26586002

https://codereview.chromium.org/16561003/diff/10001/Source/devtools/front_end...
File Source/devtools/front_end/DOMAgent.js (right):

https://codereview.chromium.org/16561003/diff/10001/Source/devtools/front_end...
Source/devtools/front_end/DOMAgent.js:133: return this._children ?
this._children.slice() : null;
I don't know why this has not caused problems before, but the null return here
is not an array, so when we all concat we get an array 
with a null:

> [].concat(this._children ? this._children.slice() : null)
[null]

https://codereview.chromium.org/16561003/diff/10001/Source/devtools/front_end...
File Source/devtools/front_end/ElementsTreeOutline.js (right):

https://codereview.chromium.org/16561003/diff/10001/Source/devtools/front_end...
Source/devtools/front_end/ElementsTreeOutline.js:1979: if
(this._node.templateContent() || (WebInspector.settings.showShadowDOM.get() &&
this._node.hasShadowRoots()))
Here we throw an exception because this._node is null, after we descend in to
children on a children array [null].

https://codereview.chromium.org/16561003/diff/10001/Source/devtools/front_end...
Source/devtools/front_end/ElementsTreeOutline.js:2115: visibleChildren =
visibleChildren.concat(this._node.children());
Here is the concat which uses childern(). visibleChildren becomes [null].

Powered by Google App Engine
This is Rietveld 408576698