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

Unified Diff: third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js

Issue 2451513002: DevTools: [Elements] account for the left indent in the width of inplace editor (Closed)
Patch Set: Created 4 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js
diff --git a/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js b/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js
index 2fed09bc91463307c6006a0c8fe2f17153e1e32c..6d0342de1b11db51122fa55f068b30cd3486f94b 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js
@@ -262,7 +262,7 @@ WebInspector.ElementsTreeElement.prototype = {
if (!this.selectionElement) {
this.selectionElement = createElement("div");
this.selectionElement.className = "selection fill";
- this.selectionElement.style.setProperty("margin-left", this._computeLeftIndent() + "px");
+ this.selectionElement.style.setProperty("margin-left", (-this._computeLeftIndent()) + "px");
listItemElement.insertBefore(this.selectionElement, listItemElement.firstChild);
}
},
@@ -858,7 +858,7 @@ WebInspector.ElementsTreeElement.prototype = {
function markAsBeingEdited(controller)
{
this._editing = /** @type {!WebInspector.InplaceEditor.Controller} */ (controller);
- this._editing.setWidth(this.treeOutline.visibleWidth());
+ this._editing.setWidth(this.treeOutline.visibleWidth() - this._computeLeftIndent());
this.treeOutline.setMultilineEditing(this._editing);
}
},
@@ -1093,12 +1093,12 @@ WebInspector.ElementsTreeElement.prototype = {
}
/** Keep it in sync with elementsTreeOutline.css **/
- return -12 * (depth - 2) - (this.isExpandable() ? 1 : 12);
+ return 12 * (depth - 2) + (this.isExpandable() ? 1 : 12);
},
updateDecorations: function()
{
- this._gutterContainer.style.left = this._computeLeftIndent() + "px";
+ this._gutterContainer.style.left = (-this._computeLeftIndent()) + "px";
if (this.isClosingTag())
return;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698