Reviewed by Anders.
authordarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Aug 2007 03:10:00 +0000 (03:10 +0000)
committerdarin <darin@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 16 Aug 2007 03:10:00 +0000 (03:10 +0000)
commit1ba9f1a09ac23a960ba15eee7758e7d4d4a31463
tree086f45f56e337bc4ef88343d95d097447fd14032
parent896fa340d4fc24e0e06cf3c0385b959f83e0028a
    Reviewed by Anders.

        - fix <rdar://problem/5094895> REGRESSION (r19094): JavaScript timers don't
          work inside showModalDialog; caret also doesn't blink

        * platform/Timer.h: Added fireTimersInNestedEventLoop.
        * platform/Timer.cpp:
        (WebCore::TimerBase::fireTimers): Added code to exit if the timersReadyToFire
        is cleared. This indicates that someone fired the timers in the nested event
        loop, so we should not fire any more timers ourselves.
        (WebCore::TimerBase::fireTimersInNestedEventLoop): Added. Sets timersReadyToFire
        to 0 so we won't return early and do nothing if the shared timer first. Then
        calls updateSharedTimer() so the shared timer will get scheduled as needed based
        on any pending timers.

        * page/Chrome.cpp: (WebCore::Chrome::runModal): Call
        fireTimersInNestedEventLoop before calling runModal on the client.

        * manual-tests/modal-dialog.html: Added a test that uses a timeout.
        * manual-tests/show-modal-dialog-test.html: Fixed a typo.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25103 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebCore/ChangeLog
WebCore/manual-tests/modal-dialog.html
WebCore/manual-tests/show-modal-dialog-test.html
WebCore/page/Chrome.cpp
WebCore/platform/Font.cpp
WebCore/platform/Timer.cpp
WebCore/platform/Timer.h