WebCore:
authorbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2008 15:06:52 +0000 (15:06 +0000)
committerbdakin@apple.com <bdakin@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 7 Feb 2008 15:06:52 +0000 (15:06 +0000)
commitfd6fba0fdba9f4822cfb4ba9779b9e1e67587fed
treeae72ba429bd6beb1a11d509c5915b95ec48e2902
parent60876963a2b716341209a8ede7bbab1961a34587
WebCore:

        Reviewed by Geoff.

        Fix for <rdar://problem/5697882> Traffic or Street View button on
        Google Maps is sometimes not positioned correctly (17000)

        On the Mac, timers fire in the order that they are registered.
        Geoff and I discovered that this is not necessarily true on
        Windows, and that turned out to be the cause of this intermittent
        layout problem at Google Maps. This patch adds a new member
        variable to Timer to remember the timer's insertion point into the
        heap. Now when comparing timers, if two timers were registered at
        the same time, their insertion orders are compared to determine
        which should fire first. This code actually never runs on Debug
        builds on the Mac; the system clock on the Mac is accurate enough
        that it knows that the two timers were not registered at *exactly*
        the same time. This is not the case on Windows. In theory, if we
        sped up Javascript enough on the Mac, this code would run and would
        prevent misrenderings such as the one found on Google Maps.

        * platform/Timer.cpp:
        (WebCore::operator<):
        (WebCore::TimerBase::setNextFireTime):
        * platform/Timer.h:

LayoutTests:

        Test written by Geoff, reviewed by me.

        Test for <rdar://problem/5697882> Traffic or Street View button on
        Google Maps is sometimes not positioned correctly (17000)

        * fast/dom/simultaneouslyRegsiteredTimerFireOrder-expected.txt: Added.
        * fast/dom/simultaneouslyRegsiteredTimerFireOrder.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@30065 268f45cc-cd09-0410-ab3c-d52691b4dbfc
LayoutTests/ChangeLog
LayoutTests/fast/dom/simultaneouslyRegsiteredTimerFireOrder-expected.txt [new file with mode: 0644]
LayoutTests/fast/dom/simultaneouslyRegsiteredTimerFireOrder.html [new file with mode: 0644]
WebCore/ChangeLog
WebCore/platform/Timer.cpp
WebCore/platform/Timer.h