RESOLVED FIXED 112586
Web Inspector: Switch Drawer animation from JavaScript to CSS transitions.
https://bugs.webkit.org/show_bug.cgi?id=112586
Summary Web Inspector: Switch Drawer animation from JavaScript to CSS transitions.
Dmitry Zvorygin
Reported 2013-03-18 09:55:51 PDT
This simplifies code, and gives smoother animation for free.
Attachments
Patch (11.54 KB, patch)
2013-03-18 10:23 PDT, Dmitry Zvorygin
no flags
Patch (11.84 KB, patch)
2013-03-19 04:54 PDT, Dmitry Zvorygin
no flags
Patch (11.84 KB, patch)
2013-03-19 05:34 PDT, Dmitry Zvorygin
no flags
Patch (11.57 KB, patch)
2013-03-20 03:23 PDT, Dmitry Zvorygin
no flags
Dmitry Zvorygin
Comment 1 2013-03-18 10:23:50 PDT
Vsevolod Vlasov
Comment 2 2013-03-19 00:46:02 PDT
Comment on attachment 193598 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=193598&action=review > Source/WebCore/inspector/front-end/Drawer.js:-104 > - function animationFinished() Why was this function removed? > Source/WebCore/inspector/front-end/Drawer.js:130 > + this.animationFinished = function() Please make it a named function function animationFinshed() { ... } this._animationFinished = animationFinished; > Source/WebCore/inspector/front-end/Drawer.js:141 > + if (this._viewStatusBar.style.opacity == 0 || animationType == WebInspector.Drawer.AnimationType.Immediately ) What does this condition check: this._viewStatusBar.style.opacity == 0 ?
Dmitry Zvorygin
Comment 3 2013-03-19 04:53:05 PDT
Comment on attachment 193598 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=193598&action=review >> Source/WebCore/inspector/front-end/Drawer.js:-104 >> - function animationFinished() > > Why was this function removed? By mistake. Restored, although everything seemed to work fine without this function. >> Source/WebCore/inspector/front-end/Drawer.js:130 >> + this.animationFinished = function() > > Please make it a named function > function animationFinshed() > { > ... > } > this._animationFinished = animationFinished; Done. >> Source/WebCore/inspector/front-end/Drawer.js:141 >> + if (this._viewStatusBar.style.opacity == 0 || animationType == WebInspector.Drawer.AnimationType.Immediately ) > > What does this condition check: this._viewStatusBar.style.opacity == 0 ? Added comments.
Dmitry Zvorygin
Comment 4 2013-03-19 04:54:42 PDT
Alexander Pavlov (apavlov)
Comment 5 2013-03-19 05:21:08 PDT
Comment on attachment 193794 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=193794&action=review > Source/WebCore/inspector/front-end/Drawer.js:114 > + if (this._viewStatusBar.style.opacity == 1 || animationType == WebInspector.Drawer.AnimationType.Immediately ) We use === everywhere. Also, an extraneous whitespace before ')' > Source/WebCore/inspector/front-end/Drawer.js:156 > + if (this._viewStatusBar.style.opacity == 0 || animationType == WebInspector.Drawer.AnimationType.Immediately ) I seem to have seen this somewhere? :) Is the diff/patch correct?
Dmitry Zvorygin
Comment 6 2013-03-19 05:34:44 PDT
Vsevolod Vlasov
Comment 7 2013-03-19 08:11:19 PDT
Comment on attachment 193802 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=193802&action=review > Source/WebCore/inspector/front-end/Drawer.js:155 > + // So we have to finish animation manually. But when does this actually happen?
Dmitry Zvorygin
Comment 8 2013-03-19 09:33:34 PDT
Comment on attachment 193802 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=193802&action=review >> Source/WebCore/inspector/front-end/Drawer.js:155 >> + // So we have to finish animation manually. > > But when does this actually happen? Honestly, I can't invent situation when opacity can unsynchronize with drawer state, but if it happens, we wouldn't receive webkitTransitionEnd, and thuis wouldn't perform important cleanup. I can remove opacity check assuming that such situation will newer happen.
Vsevolod Vlasov
Comment 9 2013-03-19 09:46:36 PDT
(In reply to comment #8) > (From update of attachment 193802 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=193802&action=review > > >> Source/WebCore/inspector/front-end/Drawer.js:155 > >> + // So we have to finish animation manually. > > > > But when does this actually happen? > > Honestly, I can't invent situation when opacity can unsynchronize with drawer state, but if it happens, we wouldn't receive webkitTransitionEnd, and thuis wouldn't perform important cleanup. > > I can remove opacity check assuming that such situation will newer happen. Sounds like a good time to use console.assert :)
Dmitry Zvorygin
Comment 10 2013-03-20 03:23:42 PDT
WebKit Review Bot
Comment 11 2013-03-20 04:34:14 PDT
Comment on attachment 194012 [details] Patch Clearing flags on attachment: 194012 Committed r146326: <http://trac.webkit.org/changeset/146326>
WebKit Review Bot
Comment 12 2013-03-20 04:34:17 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.