Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(424)

Unified Diff: third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js

Issue 1824683002: Fixes 590477: Style pane numeric property change modifier shortcuts are undiscoverable. Shift mouse… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: show numeric precision modifier title hint on editing start Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
diff --git a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
index 84e2a53008fc318af03a155a6ef02e08109ad043..ff1d62a3e533cfbfc60ccc12c8ae6b01e2ef2473 100644
--- a/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
+++ b/third_party/WebKit/Source/devtools/front_end/ui/TextPrompt.js
@@ -189,6 +189,22 @@ WebInspector.TextPrompt.prototype = {
this._element.scrollIntoView();
},
+ /**
+ * @return {string}
+ */
+ title: function()
+ {
+ return this._element.title;
lushnikov 2016/03/25 18:48:32 In order to make methods title() and setTitle() in
+ },
+
+ /**
+ * @param {string} title
+ */
+ setTitle: function(title)
+ {
+ this._element.title = title;
lushnikov 2016/03/25 18:48:32 I think it would be better to use this._proxyEleme
+ },
+
_removeFromElement: function()
{
this.clearAutoComplete(true);
@@ -203,6 +219,16 @@ WebInspector.TextPrompt.prototype = {
this._suggestBox.removeFromElement();
},
+ onEditStart: function()
+ {
+ // Subclasses can implement.
+ },
+
+ onEditDone: function()
+ {
+ // Subclasses can implement.
+ },
+
/**
* @param {function(!Event)=} blurListener
*/
@@ -220,6 +246,7 @@ WebInspector.TextPrompt.prototype = {
WebInspector.setCurrentFocusElement(this._element);
if (!this.text())
this._updateAutoComplete();
+ this.onEditStart();
},
_stopEditing: function()
@@ -229,6 +256,7 @@ WebInspector.TextPrompt.prototype = {
this._element.removeEventListener("blur", this._blurListener, false);
this._contentElement.classList.remove("text-prompt-editing");
delete this._isEditing;
+ this.onEditDone();
},
_removeSuggestionAids: function()

Powered by Google App Engine
This is Rietveld 408576698