Title: [102899] branches/chromium/963/Source/WebCore/inspector/front-end/treeoutline.js
- Revision
- 102899
- Author
- [email protected]
- Date
- 2011-12-15 01:08:53 -0800 (Thu, 15 Dec 2011)
Log Message
Merge 102757 - Web Inspector: TreeOutline's is broken when li elements have padding-left different from 14px.
https://bugs.webkit.org/show_bug.cgi?id=74445
Reviewed by Pavel Feldman.
* inspector/front-end/treeoutline.js:
(TreeElement.prototype.isEventWithinDisclosureTriangle):
[email protected]
BUG=107418
Review URL: http://codereview.chromium.org/8952012
Modified Paths
Diff
Modified: branches/chromium/963/Source/WebCore/inspector/front-end/treeoutline.js (102898 => 102899)
--- branches/chromium/963/Source/WebCore/inspector/front-end/treeoutline.js 2011-12-15 08:52:28 UTC (rev 102898)
+++ branches/chromium/963/Source/WebCore/inspector/front-end/treeoutline.js 2011-12-15 09:08:53 UTC (rev 102899)
@@ -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;
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes