Skip to content

Commit

Permalink
Fixes a bug where the Inspector's UI would not animate or
Browse files Browse the repository at this point in the history
        fully function because JavaScript timeouts, intervals and
        CSS animation timers where not firing while paused at a
        a breakpoint in the inspected page.

        https://bugs.webkit.org/show_bug.cgi?id=20042

        Reviewed by Darin Adler.

        Test: manual-tests/inspector/forzen-ui-while-paused.html

        * page/JavaScriptDebugServer.cpp:
        (WebCore::JavaScriptDebugServer::pauseIfNeeded):
        Add a call to TimerBase::fireTimersInNestedEventLoop before
        spinning the EventLoop.

Canonical link: https://commits.webkit.org/28313@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@35908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
xeenon committed Aug 24, 2008
1 parent e00fd1f commit 9bd9c6e
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 0 deletions.
18 changes: 18 additions & 0 deletions WebCore/ChangeLog
@@ -1,3 +1,21 @@
2008-08-24 Timothy Hatcher <timothy@apple.com>

Fixes a bug where the Inspector's UI would not animate or
fully function because JavaScript timeouts, intervals and
CSS animation timers where not firing while paused at a
a breakpoint in the inspected page.

https://bugs.webkit.org/show_bug.cgi?id=20042

Reviewed by Darin Adler.

Test: manual-tests/inspector/forzen-ui-while-paused.html

* page/JavaScriptDebugServer.cpp:
(WebCore::JavaScriptDebugServer::pauseIfNeeded):
Add a call to TimerBase::fireTimersInNestedEventLoop before
spinning the EventLoop.

2008-08-24 Rob Buis <buis@kde.org>

Reviewed by Sam Weinig.
Expand Down
11 changes: 11 additions & 0 deletions WebCore/manual-tests/inspector/forzen-ui-while-paused.html
@@ -0,0 +1,11 @@
<script>
function foo() {
var timeout = setTimeout(function() { alert("This should not happen. If you do see this alert, then timers on the page are firing while paused!") }, 0);
debugger;
clearTimeout(timeout);
}

setTimeout(foo, 100);
</script>
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=20042">Bug 20042: UI frozen when the debugger is paused</a>.</p>
<p>Open the inspector and start debugging in the Scripts panel. While paused, try to open the Console. The Console should animate open fully.</p>
2 changes: 2 additions & 0 deletions WebCore/page/JavaScriptDebugServer.cpp
Expand Up @@ -406,6 +406,8 @@ void JavaScriptDebugServer::pauseIfNeeded(Page* page)

setJavaScriptPaused(page->group(), true);

TimerBase::fireTimersInNestedEventLoop();

EventLoop loop;
m_doneProcessingDebuggerEvents = false;
while (!m_doneProcessingDebuggerEvents && !loop.ended())
Expand Down

0 comments on commit 9bd9c6e

Please sign in to comment.