Web Inspector: Styles: pressing Down key on empty value field shouldn't discard compl...
authornvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jan 2019 21:07:57 +0000 (21:07 +0000)
committernvasilyev@apple.com <nvasilyev@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 14 Jan 2019 21:07:57 +0000 (21:07 +0000)
commitd0fe5499248fdbf0b0bfc178a6f8a5caa7fc048b
tree8b8005d096daa7479c2bc37770c00e692bc73f70
parent4bca6bdf13ee0b696cb4baeca1977fca4c74f2c4
Web Inspector: Styles: pressing Down key on empty value field shouldn't discard completion popover
https://bugs.webkit.org/show_bug.cgi?id=193098
<rdar://problem/47016036>

Reviewed by Devin Rousso.

Hide CompletionSuggestionsView when SpreadsheetTextField moves, e.g. by scrolling or resizing the sidebar.
Update CompletionSuggestionsView position after pressing Up or Down key, because SpreadsheetTextField may
move from wrapping text.

* UserInterface/Views/CompletionSuggestionsView.js:
(WI.CompletionSuggestionsView.prototype.hide):
(WI.CompletionSuggestionsView.prototype.show):
(WI.CompletionSuggestionsView.prototype.showUntilAnchorMoves): Removed.
(WI.CompletionSuggestionsView.prototype.hideWhenElementMoves): Added.
(WI.CompletionSuggestionsView.prototype._stopMoveTimer): Added.
(WI.CompletionSuggestionsView):

* UserInterface/Views/SpreadsheetTextField.js:
(WI.SpreadsheetTextField.prototype.set suggestionHint):
(WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion):
(WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView):
(WI.SpreadsheetTextField.prototype._updateCompletions):
(WI.SpreadsheetTextField.prototype._showSuggestionsView): Added.

(WI.SpreadsheetTextField.prototype._reAttachSuggestionHint):
Drive-by: abstract out repeating code into a private method.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@239935 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/CompletionSuggestionsView.js
Source/WebInspectorUI/UserInterface/Views/SpreadsheetTextField.js