WebKit Bugzilla
Attachment 357748 Details for
Bug 192871
: Web Inspector: Elements tab: arrow key after undoing a DOM node delete selects the wrong element
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-192871-20181219161959.patch (text/plain), 2.61 KB, created by
Matt Baker
on 2018-12-19 16:20:00 PST
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Matt Baker
Created:
2018-12-19 16:20:00 PST
Size:
2.61 KB
patch
obsolete
>Subversion Revision: 239392 >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index 32716ddbc567d4bdd6f55556d9d1ca96719f634f..5d89a96b09e5b3307a75a8874757b720d8ffd794 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,18 @@ >+2018-12-19 Matt Baker <mattbaker@apple.com> >+ >+ Web Inspector: Elements tab: arrow key after undoing a DOM node delete selects the wrong element >+ https://bugs.webkit.org/show_bug.cgi?id=192871 >+ <rdar://problem/46849060> >+ >+ Reviewed by Devin Rousso. >+ >+ Undoing a DOM node removal reinserts the node into the DOMTreeOutline. >+ When the reinserted node precedes the selected node in the tree, the >+ SelectionController should update `_lastSelectedIndex`. >+ >+ * UserInterface/Controllers/SelectionController.js: >+ (WI.SelectionController.prototype.didInsertItem): >+ > 2018-12-19 Nikita Vasilyev <nvasilyev@apple.com> > > Web Inspector: Dark Mode: selected text is too light when Inspector window is inactive >diff --git a/Source/WebInspectorUI/UserInterface/Controllers/SelectionController.js b/Source/WebInspectorUI/UserInterface/Controllers/SelectionController.js >index 7066a3dfbf3769030a911bbecb5613e01045f421..b65f9f031f7c5e55277f554052245081eb526d66 100644 >--- a/Source/WebInspectorUI/UserInterface/Controllers/SelectionController.js >+++ b/Source/WebInspectorUI/UserInterface/Controllers/SelectionController.js >@@ -212,6 +212,11 @@ WI.SelectionController = class SelectionController extends WI.Object > > current = this._selectedIndexes.indexLessThan(current); > } >+ >+ if (this._lastSelectedIndex >= index) >+ this._lastSelectedIndex += 1; >+ if (this._shiftAnchorIndex >= index) >+ this._shiftAnchorIndex += 1; > } > > didRemoveItems(indexes) >diff --git a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >index cc8bb2d05ff11bb2da0ea787bf13d44e457ec264..22840a1e435e375b2135ff01395f9be4b22ecbd8 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >@@ -406,8 +406,10 @@ WI.TreeOutline = class TreeOutline extends WI.Object > this._cachedNumberOfDescendents++; > > let index = this._indexOfTreeElement(element); >- if (index >= 0) >+ if (index >= 0) { >+ console.assert(!element.selected, "TreeElement should not be selected before being inserted."); > this._selectionController.didInsertItem(index); >+ } > } > > _forgetTreeElement(element)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 192871
:
357716
| 357748