Title: [107076] trunk/Source/WebCore
- Revision
- 107076
- Author
- apav...@chromium.org
- Date
- 2012-02-08 04:58:19 -0800 (Wed, 08 Feb 2012)
Log Message
Web Inspector: Avoid an avalanche of "class" attribute modifications in WatchExpressionsSidebarPane
https://bugs.webkit.org/show_bug.cgi?id=78102
Reviewed by Vsevolod Vlasov.
* inspector/front-end/WatchExpressionsSidebarPane.js:
(WebInspector.WatchExpressionsSection.prototype._updateHoveredElement):
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (107075 => 107076)
--- trunk/Source/WebCore/ChangeLog 2012-02-08 12:48:11 UTC (rev 107075)
+++ trunk/Source/WebCore/ChangeLog 2012-02-08 12:58:19 UTC (rev 107076)
@@ -1,3 +1,13 @@
+2012-02-08 Alexander Pavlov <apav...@chromium.org>
+
+ Web Inspector: Avoid an avalanche of "class" attribute modifications in WatchExpressionsSidebarPane
+ https://bugs.webkit.org/show_bug.cgi?id=78102
+
+ Reviewed by Vsevolod Vlasov.
+
+ * inspector/front-end/WatchExpressionsSidebarPane.js:
+ (WebInspector.WatchExpressionsSection.prototype._updateHoveredElement):
+
2012-02-08 Antaryami Pandia <antaryami.pan...@motorola.com>
CSS2 overflow: scrollbar not visible on SELECT elements when overflow: scroll is set.
Modified: trunk/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js (107075 => 107076)
--- trunk/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js 2012-02-08 12:48:11 UTC (rev 107075)
+++ trunk/Source/WebCore/inspector/front-end/WatchExpressionsSidebarPane.js 2012-02-08 12:58:19 UTC (rev 107076)
@@ -277,20 +277,24 @@
_updateHoveredElement: function(pageY)
{
- if (this._hoveredElement)
- this._hoveredElement.removeStyleClass("hovered");
-
- this._hoveredElement = this.propertiesElement.firstChild;
+ var candidateElement = this.propertiesElement.firstChild;
while (true) {
- var next = this._hoveredElement.nextSibling;
- while(next && !next.clientHeight)
+ var next = candidateElement.nextSibling;
+ while (next && !next.clientHeight)
next = next.nextSibling;
if (!next || next.totalOffsetTop() > pageY)
break;
- this._hoveredElement = next;
+ candidateElement = next;
}
- this._hoveredElement.addStyleClass("hovered");
+ if (this._hoveredElement !== candidateElement) {
+ if (this._hoveredElement)
+ this._hoveredElement.removeStyleClass("hovered");
+ if (candidateElement)
+ candidateElement.addStyleClass("hovered");
+ this._hoveredElement = candidateElement;
+ }
+
this._lastMouseMovePageY = pageY;
}
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes