|
|
Chromium Code Reviews
DescriptionDevTools: Preserve the selection in StylesSideBar more often
If a selection crossed between shadow roots, it wouldn't be detected
and a new blank property would be added on mouse up.
BUG=654163
Committed: https://crrev.com/d8da265eb8eb0660119e988f1be6c49e5b7e711d
Cr-Commit-Position: refs/heads/master@{#441018}
Patch Set 1 #
Total comments: 4
Patch Set 2 : check if firstchild exists #Patch Set 3 : git cl web #Messages
Total messages: 14 (7 generated)
einbinder@chromium.org changed reviewers: + dgozman@chromium.org
https://codereview.chromium.org/2606013002/diff/1/third_party/WebKit/Source/d... File third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js (right): https://codereview.chromium.org/2606013002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js:1243: if (!this.propertiesTreeOutline.element.shadowRoot.firstChild.isComponentSelectionCollapsed()) This feels pretty magical. Ideally we would have a general purpose isSelectionCollapsedAnywhere method, but that is probably impractical because it involves keeping track and iterating over every shadow root.
https://codereview.chromium.org/2606013002/diff/1/third_party/WebKit/Source/d... File third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js (right): https://codereview.chromium.org/2606013002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js:1243: if (!this.propertiesTreeOutline.element.shadowRoot.firstChild.isComponentSelectionCollapsed()) On 2016/12/29 08:58:45, einbinder wrote: > This feels pretty magical. Ideally we would have a general purpose > isSelectionCollapsedAnywhere method, but that is probably impractical because it > involves keeping track and iterating over every shadow root. Does shadow dom v1 solve that? I think that we only care about Document.getDeepSelection if that's possible to implement. Adding more checks like this does not scale, unfortunately.
lgtm https://codereview.chromium.org/2606013002/diff/1/third_party/WebKit/Source/d... File third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js (right): https://codereview.chromium.org/2606013002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js:1243: if (!this.propertiesTreeOutline.element.shadowRoot.firstChild.isComponentSelectionCollapsed()) if (this.propertiesTreeOutline.element.shadowRoot.firstChild && ...)
Description was changed from ========== DevTools: Preserve the selection in StylesSideBar more often If a selection crossed between shadow roots, it wouldn't be detected and a new blank property would be added on mouse up. BUG=none ========== to ========== DevTools: Preserve the selection in StylesSideBar more often If a selection crossed between shadow roots, it wouldn't be detected and a new blank property would be added on mouse up. BUG=654163 ==========
https://codereview.chromium.org/2606013002/diff/1/third_party/WebKit/Source/d... File third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js (right): https://codereview.chromium.org/2606013002/diff/1/third_party/WebKit/Source/d... third_party/WebKit/Source/devtools/front_end/elements/StylesSidebarPane.js:1243: if (!this.propertiesTreeOutline.element.shadowRoot.firstChild.isComponentSelectionCollapsed()) On 2016/12/30 at 00:42:33, dgozman wrote: > if (this.propertiesTreeOutline.element.shadowRoot.firstChild && ...) Done.
The CQ bit was checked by einbinder@chromium.org
The patchset sent to the CQ was uploaded after l-g-t-m from dgozman@chromium.org Link to the patchset: https://codereview.chromium.org/2606013002/#ps20001 (title: "check if firstchild exists")
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.or...
CQ is committing da patch.
Bot data: {"patchset_id": 20001, "attempt_start_ts": 1483064259527390,
"parent_rev": "9bca5f23a9ca6b816d7f5f2cdfbec4e94d1baef2", "commit_rev":
"9757e715756603d0c8245ff4973738639d6787be"}
Message was sent while issue was closed.
Description was changed from ========== DevTools: Preserve the selection in StylesSideBar more often If a selection crossed between shadow roots, it wouldn't be detected and a new blank property would be added on mouse up. BUG=654163 ========== to ========== DevTools: Preserve the selection in StylesSideBar more often If a selection crossed between shadow roots, it wouldn't be detected and a new blank property would be added on mouse up. BUG=654163 Review-Url: https://codereview.chromium.org/2606013002 ==========
Message was sent while issue was closed.
Committed patchset #2 (id:20001)
Message was sent while issue was closed.
Description was changed from ========== DevTools: Preserve the selection in StylesSideBar more often If a selection crossed between shadow roots, it wouldn't be detected and a new blank property would be added on mouse up. BUG=654163 Review-Url: https://codereview.chromium.org/2606013002 ========== to ========== DevTools: Preserve the selection in StylesSideBar more often If a selection crossed between shadow roots, it wouldn't be detected and a new blank property would be added on mouse up. BUG=654163 Committed: https://crrev.com/d8da265eb8eb0660119e988f1be6c49e5b7e711d Cr-Commit-Position: refs/heads/master@{#441018} ==========
Message was sent while issue was closed.
Patchset 2 (id:??) landed as https://crrev.com/d8da265eb8eb0660119e988f1be6c49e5b7e711d Cr-Commit-Position: refs/heads/master@{#441018} |
