Title: [211408] trunk/Source/WebInspectorUI
Revision
211408
Author
commit-qu...@webkit.org
Date
2017-01-30 23:11:45 -0800 (Mon, 30 Jan 2017)

Log Message

Web Inspector: "bouncy highlight" element in TextEditor/DOMTreeOutline should update or dismiss when user scrolls
https://bugs.webkit.org/show_bug.cgi?id=167146

Patch by Devin Rousso <dcrousso+web...@gmail.com> on 2017-01-30
Reviewed by Timothy Hatcher.

* UserInterface/Views/TextEditor.js:
(WebInspector.TextEditor.prototype._revealSearchResult.scrollHandler):
(WebInspector.TextEditor.prototype._revealSearchResult.animationEnded):
(WebInspector.TextEditor.prototype._revealSearchResult):

Modified Paths

Diff

Modified: trunk/Source/WebInspectorUI/ChangeLog (211407 => 211408)


--- trunk/Source/WebInspectorUI/ChangeLog	2017-01-31 06:27:37 UTC (rev 211407)
+++ trunk/Source/WebInspectorUI/ChangeLog	2017-01-31 07:11:45 UTC (rev 211408)
@@ -1,3 +1,15 @@
+2017-01-30  Devin Rousso  <dcrousso+web...@gmail.com>
+
+        Web Inspector: "bouncy highlight" element in TextEditor/DOMTreeOutline should update or dismiss when user scrolls
+        https://bugs.webkit.org/show_bug.cgi?id=167146
+
+        Reviewed by Timothy Hatcher.
+
+        * UserInterface/Views/TextEditor.js:
+        (WebInspector.TextEditor.prototype._revealSearchResult.scrollHandler):
+        (WebInspector.TextEditor.prototype._revealSearchResult.animationEnded):
+        (WebInspector.TextEditor.prototype._revealSearchResult):
+
 2017-01-30  Joseph Pecoraro  <pecor...@apple.com>
 
         Implement PerformanceObserver

Modified: trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js (211407 => 211408)


--- trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js	2017-01-31 06:27:37 UTC (rev 211407)
+++ trunk/Source/WebInspectorUI/UserInterface/Views/TextEditor.js	2017-01-31 07:11:45 UTC (rev 211408)
@@ -1086,6 +1086,13 @@
         this._bouncyHighlightElement.style.left = coordinates.left + "px";
         this.element.appendChild(this._bouncyHighlightElement);
 
+        let scrollHandler = () => {
+            if (this._bouncyHighlightElement)
+                this._bouncyHighlightElement.remove();
+        };
+
+        this.addScrollHandler(scrollHandler);
+
         function animationEnded()
         {
             if (!this._bouncyHighlightElement)
@@ -1093,6 +1100,8 @@
 
             this._bouncyHighlightElement.remove();
             delete this._bouncyHighlightElement;
+
+            this.removeScrollHandler(scrollHandler);
         }
 
         // Listen for the end of the animation so we can remove the element.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to