Summary: | Web Inspector: REGRESSION (r238602): Elements: deleting the last child of a collapsed parent selects the parent's next sibling | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Devin Rousso <hi> | ||||||||||||||||||||||
Component: | Web Inspector | Assignee: | Matt Baker <mattbaker> | ||||||||||||||||||||||
Status: | RESOLVED FIXED | ||||||||||||||||||||||||
Severity: | Normal | CC: | commit-queue, ews-watchlist, hi, inspector-bugzilla-changes, mattbaker, rniwa, timothy, webkit-bug-importer | ||||||||||||||||||||||
Priority: | P3 | Keywords: | InRadar | ||||||||||||||||||||||
Version: | WebKit Nightly Build | ||||||||||||||||||||||||
Hardware: | All | ||||||||||||||||||||||||
OS: | All | ||||||||||||||||||||||||
URL: | https://devinrousso.com/demo/WebKit/test.html | ||||||||||||||||||||||||
Bug Depends on: | |||||||||||||||||||||||||
Bug Blocks: | 197051 | ||||||||||||||||||||||||
Attachments: |
|
Description
Devin Rousso
2018-12-14 12:52:39 PST
Created attachment 366197 [details]
WIP
Need to add special-case handling for TreeOutline, so that both sibling axes are searched before going up the parent chain. Created attachment 366202 [details]
WIP
Comment on attachment 366202 [details] WIP Attachment 366202 [details] did not pass mac-ews (mac): Output: https://webkit-queues.webkit.org/results/11694687 New failing tests: inspector/table/table-remove-rows.html Created attachment 366212 [details]
Archive of layout-test-results from ews103 for mac-highsierra
The attached test failures were seen while running run-webkit-tests on the mac-ews.
Bot: ews103 Port: mac-highsierra Platform: Mac OS X 10.13.6
Comment on attachment 366202 [details] WIP Attachment 366202 [details] did not pass mac-wk2-ews (mac-wk2): Output: https://webkit-queues.webkit.org/results/11694704 New failing tests: inspector/table/table-remove-rows.html Created attachment 366213 [details]
Archive of layout-test-results from ews105 for mac-highsierra-wk2
The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews.
Bot: ews105 Port: mac-highsierra-wk2 Platform: Mac OS X 10.13.6
Comment on attachment 366202 [details] WIP Attachment 366202 [details] did not pass mac-debug-ews (mac): Output: https://webkit-queues.webkit.org/results/11695188 New failing tests: inspector/table/table-remove-rows.html Created attachment 366217 [details]
Archive of layout-test-results from ews114 for mac-highsierra
The attached test failures were seen while running run-webkit-tests on the mac-debug-ews.
Bot: ews114 Port: mac-highsierra Platform: Mac OS X 10.13.6
Created attachment 366230 [details]
Patch
Created attachment 366232 [details]
Patch
(In reply to Matt Baker from comment #12) > Created attachment 366232 [details] > Patch After a delete, the new selected TreeElement is revealed. Comment on attachment 366232 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=366232&action=review > Source/WebInspectorUI/ChangeLog:19 > + When a hidden node is selected, its selection area is drawn with a height > + of 0px. The selection area needs to be updated once the hidden node's > + parent is expanded. AFAIK, this has always been broken. So technically, this is a "drive-by"? If so, please add that before the comment for clarity. > Source/WebInspectorUI/UserInterface/Views/DOMTreeOutline.js:323 > + if (this.selectedTreeElement) > + this.selectedTreeElement.reveal(); Should we be iterating over `this.selectedTreeElements` and calling `reveal()` on each instead? If not, are we assuming that there will only ever be one selected item after any deletion? If so, please add a `console.assert`. > Source/WebInspectorUI/UserInterface/Views/TreeOutline.js:840 > - const skipUnrevealed = true; > + const skipUnrevealed = false; Why was this change made? > Source/WebInspectorUI/UserInterface/Views/TreeOutline.js:845 > + // to check siblings along the opposite axis, if they exist. "opposite axis" is a weird phrase. I'd use "other direction" (assuming that I understand your meaning). > Source/WebInspectorUI/UserInterface/Views/TreeOutline.js:846 > + if (!treeElement.previousSibling && treeElement.nextSibling) Should we limit the `previousSibling`/`nextSibling` to be only ones that are visible? If we have a hidden (or non-`selectable`) `TreeElement` before/after the given `item`, I don't think we should count that as being "valid". Created attachment 366333 [details]
Patch
Comment on attachment 366333 [details]
Patch
Clearing r?; need to make one more change.
I just noticed the change to TreeOutline.prototype.selectionControllerPreviousSelectableItem breaks up-arrow key traversal up the parent chain. DOMTreeOutline could override selectionControllerPreviousSelectableItem. The overridden version could check whether this._treeElementsToRemove exists, and if it does, perform the additional check in the opposite sibling direction. Created attachment 366408 [details]
Patch
Created attachment 367168 [details]
Patch
Comment on attachment 367168 [details] Patch Clearing flags on attachment: 367168 Committed r244155: <https://trac.webkit.org/changeset/244155> All reviewed patches have been landed. Closing bug. |