WebKit Bugzilla
Attachment 356502 Details for
Bug 192120
: Web Inspector: Elements: ⌘-A should select all visible nodes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch for landing
bug-192120-20181204090708.patch (text/plain), 7.64 KB, created by
Matt Baker
on 2018-12-04 09:07:15 PST
(
hide
)
Description:
Patch for landing
Filename:
MIME Type:
Creator:
Matt Baker
Created:
2018-12-04 09:07:15 PST
Size:
7.64 KB
patch
obsolete
>Subversion Revision: 238837 >diff --git a/Source/WebInspectorUI/ChangeLog b/Source/WebInspectorUI/ChangeLog >index a8672f0e4ea916ffe55d12df13f8ccaf8b516af5..9aa1c1e4e3864857cb8d744bafa86ffb5202f4a0 100644 >--- a/Source/WebInspectorUI/ChangeLog >+++ b/Source/WebInspectorUI/ChangeLog >@@ -1,3 +1,16 @@ >+2018-12-04 Matt Baker <mattbaker@apple.com> >+ >+ Web Inspector: Elements: â-A should select all visible nodes >+ https://bugs.webkit.org/show_bug.cgi?id=192120 >+ <rdar://problem/46344435> >+ >+ Reviewed by Devin Rousso. >+ >+ * UserInterface/Views/TreeOutline.js: >+ (WI.TreeOutline.prototype._treeKeyDown): >+ Remove an early return, allowing `WI.SelectionController` to handle â-A >+ and select all items. >+ > 2018-12-03 Devin Rousso <drousso@apple.com> > > Web Inspector: Audit: "Add Default Audits" shown when there are no filter results >diff --git a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >index a7511d6d55ea50b127e886b2bfd695b46ae4dfe0..e3a3fe486ec84add26bc33fa3ed5879e70fadcee 100644 >--- a/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >+++ b/Source/WebInspectorUI/UserInterface/Views/TreeOutline.js >@@ -545,66 +545,67 @@ WI.TreeOutline = class TreeOutline extends WI.Object > if (event.target !== this._childrenListNode) > return; > >- if (!this.selectedTreeElement || event.commandOrControlKey) >- return; >- > let isRTL = WI.resolvedLayoutDirection() === WI.LayoutDirection.RTL; >+ let expandKeyIdentifier = isRTL ? "Left" : "Right"; >+ let collapseKeyIdentifier = isRTL ? "Right" : "Left"; > > var handled = false; > var nextSelectedElement; > >- if ((!isRTL && event.keyIdentifier === "Left") || (isRTL && event.keyIdentifier === "Right")) { >- if (this.selectedTreeElement.expanded) { >- if (event.altKey) >- this.selectedTreeElement.collapseRecursively(); >- else >- this.selectedTreeElement.collapse(); >- handled = true; >- } else if (this.selectedTreeElement.parent && !this.selectedTreeElement.parent.root) { >- handled = true; >- if (this.selectedTreeElement.parent.selectable) { >- nextSelectedElement = this.selectedTreeElement.parent; >- while (nextSelectedElement && !nextSelectedElement.selectable) >- nextSelectedElement = nextSelectedElement.parent; >- handled = nextSelectedElement ? true : false; >- } else if (this.selectedTreeElement.parent) >- this.selectedTreeElement.parent.collapse(); >- } >- } else if ((!isRTL && event.keyIdentifier === "Right") || (isRTL && event.keyIdentifier === "Left")) { >- if (!this.selectedTreeElement.revealed()) { >- this.selectedTreeElement.reveal(); >- handled = true; >- } else if (this.selectedTreeElement.hasChildren) { >- handled = true; >+ if (this.selectedTreeElement) { >+ if (event.keyIdentifier === collapseKeyIdentifier) { > if (this.selectedTreeElement.expanded) { >- nextSelectedElement = this.selectedTreeElement.children[0]; >- while (nextSelectedElement && !nextSelectedElement.selectable) >- nextSelectedElement = nextSelectedElement.nextSibling; >- handled = nextSelectedElement ? true : false; >- } else { > if (event.altKey) >- this.selectedTreeElement.expandRecursively(); >+ this.selectedTreeElement.collapseRecursively(); > else >- this.selectedTreeElement.expand(); >+ this.selectedTreeElement.collapse(); >+ handled = true; >+ } else if (this.selectedTreeElement.parent && !this.selectedTreeElement.parent.root) { >+ handled = true; >+ if (this.selectedTreeElement.parent.selectable) { >+ nextSelectedElement = this.selectedTreeElement.parent; >+ while (nextSelectedElement && !nextSelectedElement.selectable) >+ nextSelectedElement = nextSelectedElement.parent; >+ handled = nextSelectedElement ? true : false; >+ } else if (this.selectedTreeElement.parent) >+ this.selectedTreeElement.parent.collapse(); > } >- } >- } else if (event.keyCode === 8 /* Backspace */ || event.keyCode === 46 /* Delete */) { >- for (let treeElement of this.selectedTreeElements) { >- if (treeElement.ondelete && treeElement.ondelete()) >+ } else if (event.keyIdentifier === expandKeyIdentifier) { >+ if (!this.selectedTreeElement.revealed()) { >+ this.selectedTreeElement.reveal(); >+ handled = true; >+ } else if (this.selectedTreeElement.hasChildren) { > handled = true; >+ if (this.selectedTreeElement.expanded) { >+ nextSelectedElement = this.selectedTreeElement.children[0]; >+ while (nextSelectedElement && !nextSelectedElement.selectable) >+ nextSelectedElement = nextSelectedElement.nextSibling; >+ handled = nextSelectedElement ? true : false; >+ } else { >+ if (event.altKey) >+ this.selectedTreeElement.expandRecursively(); >+ else >+ this.selectedTreeElement.expand(); >+ } >+ } >+ } else if (event.keyCode === 8 /* Backspace */ || event.keyCode === 46 /* Delete */) { >+ for (let treeElement of this.selectedTreeElements) { >+ if (treeElement.ondelete && treeElement.ondelete()) >+ handled = true; >+ } >+ if (!handled && this.treeOutline.ondelete) >+ handled = this.treeOutline.ondelete(this.selectedTreeElement); >+ } else if (isEnterKey(event)) { >+ if (this.selectedTreeElement.onenter) >+ handled = this.selectedTreeElement.onenter(); >+ if (!handled && this.treeOutline.onenter) >+ handled = this.treeOutline.onenter(this.selectedTreeElement); >+ } else if (event.keyIdentifier === "U+0020" /* Space */) { >+ if (this.selectedTreeElement.onspace) >+ handled = this.selectedTreeElement.onspace(); >+ if (!handled && this.treeOutline.onspace) >+ handled = this.treeOutline.onspace(this.selectedTreeElement); > } >- if (!handled && this.treeOutline.ondelete) >- handled = this.treeOutline.ondelete(this.selectedTreeElement); >- } else if (isEnterKey(event)) { >- if (this.selectedTreeElement.onenter) >- handled = this.selectedTreeElement.onenter(); >- if (!handled && this.treeOutline.onenter) >- handled = this.treeOutline.onenter(this.selectedTreeElement); >- } else if (event.keyIdentifier === "U+0020" /* Space */) { >- if (this.selectedTreeElement.onspace) >- handled = this.selectedTreeElement.onspace(); >- if (!handled && this.treeOutline.onspace) >- handled = this.treeOutline.onspace(this.selectedTreeElement); > } > > if (!handled)
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 192120
:
356450
| 356502