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

Unified Diff: Source/WebCore/inspector/front-end/treeoutline.js

Issue 8952012: Merge 102757 - Web Inspector: TreeOutline's is broken when li elements have padding-left differen... (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/963/
Patch Set: Created 9 years 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/WebCore/inspector/front-end/treeoutline.js
===================================================================
--- Source/WebCore/inspector/front-end/treeoutline.js (revision 102898)
+++ Source/WebCore/inspector/front-end/treeoutline.js (working copy)
@@ -998,7 +998,8 @@
TreeElement.prototype.isEventWithinDisclosureTriangle = function(event)
{
- const leftPadding = 14;
- var left = this._listItemNode.totalOffsetLeft() + leftPadding;
+ // FIXME: We should not use getComputedStyle(). For that we need to get rid of using ::before for disclosure triangle. (http://webk.it/74446)
+ var computedLeftPadding = window.getComputedStyle(this._listItemNode).getPropertyCSSValue("padding-left").getFloatValue(CSSPrimitiveValue.CSS_PX);
+ 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