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

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

Issue 2623053002: [Devtools] Fix left margin for selection element (Closed)
Patch Set: Remove leading underscore Created 3 years, 11 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/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 6433cfdb128efaf2220d688a0460728948f89843..a5245f609372007d18c2310541318e5acb17e98a 100644
--- a/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js
+++ b/third_party/WebKit/Source/devtools/front_end/elements/ElementsTreeElement.js
@@ -232,7 +232,7 @@ Elements.ElementsTreeElement = class extends UI.TreeElement {
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);
}
}
@@ -803,7 +803,7 @@ Elements.ElementsTreeElement = class extends UI.TreeElement {
*/
function markAsBeingEdited(controller) {
this._editing = /** @type {!UI.InplaceEditor.Controller} */ (controller);
- this._editing.setWidth(this.treeOutline.visibleWidth() - this._computeLeftIndent());
+ this._editing.setWidth(this.treeOutline.visibleWidth() - this.computeLeftIndent());
this.treeOutline.setMultilineEditing(this._editing);
}
}
@@ -1015,8 +1015,9 @@ Elements.ElementsTreeElement = class extends UI.TreeElement {
/**
* @return {number}
+ * @override
*/
- _computeLeftIndent() {
+ computeLeftIndent() {
dgozman 2017/01/13 01:53:42 I'm worried that this clashes with treeoutline's o
aboxhall 2017/01/13 02:22:03 Done.
var treeElement = this.parent;
var depth = 0;
while (treeElement !== null) {
@@ -1029,7 +1030,7 @@ Elements.ElementsTreeElement = class extends UI.TreeElement {
}
updateDecorations() {
- this._gutterContainer.style.left = (-this._computeLeftIndent()) + 'px';
+ this._gutterContainer.style.left = (-this.computeLeftIndent()) + 'px';
if (this.isClosingTag())
return;

Powered by Google App Engine
This is Rietveld 408576698