Title: [188496] trunk/Source/WebInspectorUI
- Revision
- 188496
- Author
- [email protected]
- Date
- 2015-08-14 15:19:57 -0700 (Fri, 14 Aug 2015)
Log Message
Web Inspector: Highlight DOM node attribute changes in parallel, not sequentially
https://bugs.webkit.org/show_bug.cgi?id=148019
Reviewed by Brian Burg.
* UserInterface/Views/DOMTreeElement.js:
(WebInspector.DOMTreeElement.prototype._markNodeChanged):
(WebInspector.DOMTreeElement.prototype._nodeChangedAnimationEnd):
Now removes the animated element from the updated list once the animation ends.
Modified Paths
Diff
Modified: trunk/Source/WebInspectorUI/ChangeLog (188495 => 188496)
--- trunk/Source/WebInspectorUI/ChangeLog 2015-08-14 22:19:16 UTC (rev 188495)
+++ trunk/Source/WebInspectorUI/ChangeLog 2015-08-14 22:19:57 UTC (rev 188496)
@@ -1,3 +1,15 @@
+2015-08-14 Devin Rousso <[email protected]>
+
+ Web Inspector: Highlight DOM node attribute changes in parallel, not sequentially
+ https://bugs.webkit.org/show_bug.cgi?id=148019
+
+ Reviewed by Brian Burg.
+
+ * UserInterface/Views/DOMTreeElement.js:
+ (WebInspector.DOMTreeElement.prototype._markNodeChanged):
+ (WebInspector.DOMTreeElement.prototype._nodeChangedAnimationEnd):
+ Now removes the animated element from the updated list once the animation ends.
+
2015-08-14 Matt Baker <[email protected]>
Web Inspector: Long delay when row selection changes in timeline data grids
Modified: trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js (188495 => 188496)
--- trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2015-08-14 22:19:16 UTC (rev 188495)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/DOMTreeElement.js 2015-08-14 22:19:57 UTC (rev 188496)
@@ -41,7 +41,9 @@
this._canAddAttributes = true;
this._searchQuery = null;
this._expandedChildrenLimit = WebInspector.DOMTreeElement.InitialChildrenLimit;
+
this._nodeStateChanges = [];
+ this._boundNodeChangedAnimationEnd = this._nodeChangedAnimationEnd.bind(this);
}
isCloseTag()
@@ -1462,22 +1464,27 @@
_markNodeChanged()
{
- function animationEnd() {
- this.classList.remove("node-state-changed");
- this.removeEventListener("animationEnd", animationEnd);
- }
-
for (let change of this._nodeStateChanges) {
let element = change.element;
if (!element)
continue;
element.classList.remove("node-state-changed");
- element.addEventListener("animationEnd", animationEnd);
+ element.addEventListener("animationend", this._boundNodeChangedAnimationEnd);
element.classList.add("node-state-changed");
}
+ }
- this._nodeStateChanges = [];
+ _nodeChangedAnimationEnd(event)
+ {
+ let element = event.target;
+ element.classList.remove("node-state-changed");
+ element.removeEventListener("animationend", this._boundNodeChangedAnimationEnd);
+
+ for (let i = this._nodeStateChanges.length - 1; i >= 0; --i) {
+ if (this._nodeStateChanges[i].element === element)
+ this._nodeStateChanges.splice(i, 1);
+ }
}
_fireDidChange()
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes