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

Unified Diff: Source/devtools/front_end/elements/ElementsTreeOutline.js

Issue 658483004: DevTools: fix DOM multiline editing, extract multiline editor API. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 2 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
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/InplaceEditor.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/elements/ElementsTreeOutline.js
diff --git a/Source/devtools/front_end/elements/ElementsTreeOutline.js b/Source/devtools/front_end/elements/ElementsTreeOutline.js
index 5835dc10bdaf667618e6c8b2bdf88eef572f76cb..4af97535ec489eedfb0dbcc99b866c5d6c015281 100644
--- a/Source/devtools/front_end/elements/ElementsTreeOutline.js
+++ b/Source/devtools/front_end/elements/ElementsTreeOutline.js
@@ -1952,15 +1952,15 @@ WebInspector.ElementsTreeElement.prototype = {
var config = new WebInspector.InplaceEditor.Config(commit.bind(this), dispose.bind(this));
config.setMultilineOptions(initialValue, { name: "xml", htmlMode: true }, "web-inspector-html", WebInspector.settings.domWordWrap.get(), true);
- self.runtime.instancePromise(WebInspector.InplaceEditor).then(markAsBeingEdited.bind(this)).done();
+ WebInspector.InplaceEditor.startMultilineEditing(this._htmlEditElement, config).then(markAsBeingEdited.bind(this)).done();
/**
- * @param {!WebInspector.InplaceEditor} inplaceEditor
+ * @param {!Object} controller
* @this {WebInspector.ElementsTreeElement}
*/
- function markAsBeingEdited(inplaceEditor)
+ function markAsBeingEdited(controller)
{
- this._editing = /** @type {!WebInspector.InplaceEditor} */ (inplaceEditor).startEditing(this._htmlEditElement, config);
+ this._editing = /** @type {!WebInspector.InplaceEditor.Controller} */ (controller);
this._editing.setWidth(this.treeOutline._visibleWidth);
this.treeOutline._multilineEditing = this._editing;
}
« no previous file with comments | « no previous file | Source/devtools/front_end/ui/InplaceEditor.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698