Web Inspector: Fix how Popover animates
authorcommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Aug 2014 20:10:05 +0000 (20:10 +0000)
committercommit-queue@webkit.org <commit-queue@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 29 Aug 2014 20:10:05 +0000 (20:10 +0000)
commit709207aeae30483bc10bd02c726eda50389471f6
tree4e55004d3c1c8ff428ea6772025b2f2b6e62b060
parentd5bd29eb0084fe4176226ec512549ffb56754e38
Web Inspector: Fix how Popover animates
https://bugs.webkit.org/show_bug.cgi?id=136353

Patch by Saam Barati <sbarati@apple.com> on 2014-08-29
Reviewed by Timothy Hatcher.

Popovers currently don't animate properly because they use
window.requestAnimationFrame which won't fire its callback
while the inspector is paused in the debugger. This patches
switches the callback mechanism to setTimeout and also changes
how a Popover's anchor animates to prevent visual glitches.

Popover also has a new function that allows a new target
frame and new content to be set simultaneously and to
animate to show the new content while changing the
location of the popover frame.

SourceCodeTextEditor uses Popover's new API for animating
between popovers when paused in the debugger. SourceCodeTextEditor
also now ensures proper balancing of popover tracking event
listeners.

* UserInterface/Views/Popover.js:
(WebInspector.Popover.prototype.present):
(WebInspector.Popover.prototype.presentNewContentWithFrame):
(WebInspector.Popover.prototype.dismiss):
(WebInspector.Popover.prototype._update):
(WebInspector.Popover.prototype.drawBackground):
(WebInspector.Popover.prototype._animateFrame):
(WebInspector.Popover.prototype._drawFrame):
(WebInspector.Popover.prototype._addListenersIfNeeded):
(WebInspector.Popover.prototype._animateFrame.drawBackground): Deleted.
* UserInterface/Views/SourceCodeTextEditor.js:
(WebInspector.SourceCodeTextEditor.prototype._showPopover):
(WebInspector.SourceCodeTextEditor.prototype._dismissPopover):
(WebInspector.SourceCodeTextEditor.prototype._trackPopoverEvents):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@173117 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/WebInspectorUI/ChangeLog
Source/WebInspectorUI/UserInterface/Views/Popover.js
Source/WebInspectorUI/UserInterface/Views/SourceCodeTextEditor.js