Permalink
Show file tree
Hide file tree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Web Inspector: Styles Redesign: hook up autocompletion to property na…
…mes and values https://bugs.webkit.org/show_bug.cgi?id=177313 <rdar://problem/34577057> Reviewed by Joseph Pecoraro. - Arrow Right accept the current completion item and places the text caret after it. - Arrow Left hides the completion popover. - Arrow Up selects the previous completion item. - Arrow Down selects the next completion item. - Enter and Tab accept the current completion item and navigate to the next focusable item. - Escape hides the completion popover, if there is one. * UserInterface/Views/CompletionSuggestionsView.js: (WI.CompletionSuggestionsView): (WI.CompletionSuggestionsView.prototype._mouseDown): Add a preventBlur option so clicking on an completion item doesn't change the focus and doesn't cause "blur" event on the target text field. * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.css: (.spreadsheet-style-declaration-editor .completion-hint): * UserInterface/Views/SpreadsheetCSSStyleDeclarationEditor.js: (WI.SpreadsheetCSSStyleDeclarationEditor): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.layout): (WI.SpreadsheetCSSStyleDeclarationEditor.prototype.detached): Call detached on every SpreadsheetTextField to hide CompletionSuggestionsView once SpreadsheetCSSStyleDeclarationEditor is removed from the DOM. (WI.SpreadsheetCSSStyleDeclarationEditor.prototype._addBlankProperty): Remove index argument since it is no longer used. * UserInterface/Views/SpreadsheetStyleProperty.js: (WI.SpreadsheetStyleProperty): (WI.SpreadsheetStyleProperty.prototype.detached): (WI.SpreadsheetStyleProperty.prototype._remove): (WI.SpreadsheetStyleProperty.prototype._update): (WI.SpreadsheetStyleProperty.prototype._nameCompletionDataProvider): (WI.SpreadsheetStyleProperty.prototype._valueCompletionDataProvider): Add an extra parameter to SpreadsheetTextField to pass a completion data provider. * UserInterface/Views/SpreadsheetTextField.js: (WI.SpreadsheetTextField): (WI.SpreadsheetTextField.prototype.get suggestionHint): (WI.SpreadsheetTextField.prototype.set suggestionHint): (WI.SpreadsheetTextField.prototype.startEditing): (WI.SpreadsheetTextField.prototype.stopEditing): (WI.SpreadsheetTextField.prototype.detached): (WI.SpreadsheetTextField.prototype.completionSuggestionsSelectedCompletion): (WI.SpreadsheetTextField.prototype.completionSuggestionsClickedCompletion): (WI.SpreadsheetTextField.prototype._getPrefix): (WI.SpreadsheetTextField.prototype._handleBlur): (WI.SpreadsheetTextField.prototype._handleKeyDown): (WI.SpreadsheetTextField.prototype._handleKeyDownForSuggestionView): (WI.SpreadsheetTextField.prototype._handleInput): (WI.SpreadsheetTextField.prototype._updateCompletions): (WI.SpreadsheetTextField.prototype._getCaretRect): (WI.SpreadsheetTextField.prototype._getCompletionPrefix): (WI.SpreadsheetTextField.prototype._applyCompletionHint): (WI.SpreadsheetTextField.prototype._hideCompletions): Provide text completion based on the existing CompletionSuggestionsView when completionProvider is passed to SpreadsheetTextField. Canonical link: https://commits.webkit.org/194497@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@223283 268f45cc-cd09-0410-ab3c-d52691b4dbfc
- Loading branch information
Showing
6 changed files
with
357 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.