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

Unified Diff: Source/devtools/front_end/ui/treeoutline.js

Issue 690893002: Don't use getPropertyCSSValue in treeoutline.js (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/devtools/front_end/ui/treeoutline.js
diff --git a/Source/devtools/front_end/ui/treeoutline.js b/Source/devtools/front_end/ui/treeoutline.js
index 2ffac7251d691fc0ac2700096902dc339e38dccf..764dde7a7cb2f4f8eb5183d9264159dea8bcb610 100644
--- a/Source/devtools/front_end/ui/treeoutline.js
+++ b/Source/devtools/front_end/ui/treeoutline.js
@@ -1019,8 +1019,9 @@ TreeElement.prototype.traversePreviousTreeElement = function(skipUnrevealed, don
TreeElement.prototype.isEventWithinDisclosureTriangle = function(event)
{
// FIXME: We should not use getComputedStyle(). For that we need to get rid of using ::before for disclosure triangle. (http://webk.it/74446)
- var paddingLeftValue = window.getComputedStyle(this._listItemNode).getPropertyCSSValue("padding-left");
- var computedLeftPadding = paddingLeftValue ? paddingLeftValue.getFloatValue(CSSPrimitiveValue.CSS_PX) : 0;
+ var paddingLeftValue = window.getComputedStyle(this._listItemNode).paddingLeft;
+ console.assert(paddingLeftValue.endsWith("px"));
+ var computedLeftPadding = parseFloat(paddingLeftValue, 10);
var left = this._listItemNode.totalOffsetLeft() + computedLeftPadding;
return event.pageX >= left && event.pageX <= left + this.arrowToggleWidth && this.hasChildren;
}
« 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