WebKit/mac:

2009-02-11  Brady Eidson  <beidson@apple.com>

        Reviewed by Mark Rowe

        <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative

        Remove the item from the date caches before registering the visit.  Otherwise it might not be successfully removed 
        and when we add it back later it will exist in the list twice.  This will cause the entry to be written out twice,
        which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.

        * History/WebHistory.mm:
        (-[WebHistoryPrivate visitedURL:withTitle:]): Swap the removeItemFromDateCaches and visitedWithTitle calls.
        (-[WebHistoryPrivate addItem:discardDuplicate:]): Add a mode that allows the entry being added to be discarded
          if an entry for the URL already exists.  Use that mode when reading the History.plist so only the most
          recent entry for a given URL will be used.
        (-[WebHistoryPrivate addItems:]):
        (-[WebHistoryPrivate loadHistoryGutsFromURL:savedItemsCount:collectDiscardedItemsInto:error:]): 

WebKit/win:

2009-02-11  Brady Eidson  <beidson@apple.com>

        Reviewed by Mark Rowe

        <rdar://problem/6570573> Some visit counts in History.plist have insanely high values, can roll over to negative

        Remove the item from the date caches before registering the visit.  Otherwise it might not be successfully removed 
        and when we add it back later it will exist in the list twice.  This will cause the entry to be written out twice,
        which would lead to doubling (or more!) the visit count on next launch when these multiple items are merged.

        * WebHistory.cpp:
        (WebHistory::loadHistoryGutsFromURL):
        (WebHistory::addItems):
        (WebHistory::addItem): Add a mode that allows the entry being added to be discarded if an entry for the URL already 
          exists.  Use that mode when reading the History.plist so only the most recent entry for a given URL will be used.
        (WebHistory::visitedURL): Swap the removeItemFromDateCaches and visitedWithTitle calls.
        * WebHistory.h:

        * WebHistoryItem.cpp:
        (WebHistoryItem::initFromDictionaryRepresentation):  Add the negative-visit-count-correction-logic as implemented
          for Mac in http://trac.webkit.org/changeset/40851.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40882 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Windows fix for Bug 22239: Implement missing animation & transition APIs on LayoutTestController for non-mac platforms

WebKit/win:

        Windows fix for Bug 22239: Implement missing animation & transition
        APIs on LayoutTestController for non-mac platforms

        <https://bugs.webkit.org/show_bug.cgi?id=22239>

        Reviewed by Simon Fraser.

        * Interfaces/IWebFramePrivate.idl: Added pauseAnimation,
        pauseTransition, and numberOfActiveAnimations.

        * WebFrame.cpp:
        (WebFrame::pauseAnimation):
        (WebFrame::pauseTransition):
        (WebFrame::numberOfActiveAnimation):
        Added. These all call through to AnimationController.

        * WebFrame.h: Added pauseAnimation, pauseTransition, and
        numberOfActiveAnimations.

WebKitTools:

        Windows fix for Bug 22239: Implement missing animation & transition
        APIs on LayoutTestController for non-mac platforms

        <https://bugs.webkit.org/show_bug.cgi?id=22239>

        Reviewed by Simon Fraser.

        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
        (LayoutTestController::pauseAnimationAtTimeOnElementWithId):
        (LayoutTestController::pauseTransitionAtTimeOnElementWithId):
        (LayoutTestController::numberOfActiveAnimations):
        Implemented these by calling through to IWebFramePrivate.

LayoutTests:

        Windows fix for Bug 22239: Implement missing animation & transition
        APIs on LayoutTestController for non-mac platforms

        <https://bugs.webkit.org/show_bug.cgi?id=22239>

        Reviewed by Simon Fraser.

        * platform/win/Skipped: Enable the previously-skipped tests.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40883 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix the build.

* History/WebHistory.mm:
(-[WebHistoryPrivate visitedURL:withTitle:]): Use ASSERT_UNUSED in a manner that makes sense.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40884 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-02-11  Adele Peterson  <adele@apple.com>

        Reviewed by Oliver Hunt.

        Fix for https://bugs.webkit.org/show_bug.cgi?id=23910
        <rdar://problem/6160546> REGRESSION: In Full page mode, movie controller hides when I drag the knob if movie is playing

        * rendering/RenderMedia.cpp: (WebCore::RenderMedia::forwardEvent):
        When we get a mouseOut event, consider the mouse as still within the RenderMedia if the relatedTarget is a descendant.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40885 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-02-11  Brady Eidson  <beidson@apple.com>

        Fix my last checkin for more effect.

        * WebHistoryItem.cpp:
        (WebHistoryItem::initFromDictionaryRepresentation):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40886 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-02-11  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Dave Hyatt

        Fix the build on Leopard with ACCELERATED_COMPOSITING turned on.

        * WebCore.xcodeproj/project.pbxproj:
        FloatPoint3D needs to be a private header, since it's included by GraphicsLayer.h
        * platform/graphics/mac/GraphicsLayerCA.mm:
        (WebCore::getTransformFunctionValue):
        (WebCore::caValueFunctionSupported):
        (WebCore::GraphicsLayerCA::setAnchorPoint):
        (WebCore::GraphicsLayerCA::setPreserves3D):
        (WebCore::GraphicsLayerCA::setContentsToImage):
        (WebCore::GraphicsLayerCA::setBasicAnimation):
        (WebCore::GraphicsLayerCA::setKeyframeAnimation):
        * rendering/RenderLayer.h:
        (WebCore::RenderLayer::isRootLayer):
        Fix isRootLayer to return true for the renderView's layer, not the root
        renderer's layer.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-02-11  Dmitry Titov  <dimich@chromium.org>

        Reviewed by Alexey Proskuryakov.

        https://bugs.webkit.org/show_bug.cgi?id=23705
        Fix the UI freeze caused by Worker generating a flood of messages.
        Measure time we spend in executing posted work items. If too much time is spent
        without returning to the run loop, exit and reschedule.

        * wtf/MainThread.h:
        Added initializeMainThreadPlatform() to initialize low-level mechanism for posting
        work items from thread to thread. This removes #ifdefs for WIN and CHROMIUM from platform-independent code.

        * wtf/MainThread.cpp:
        (WTF::initializeMainThread):
        (WTF::dispatchFunctionsFromMainThread):
        Instead of dispatching all work items in the queue, dispatch them one by one
        and measure elapsed time. After a threshold, reschedule and quit.

        (WTF::callOnMainThread):
        (WTF::callOnMainThreadAndWait):
        Only schedule dispatch if the queue was empty - to avoid many posted messages in the run loop queue.

        * wtf/mac/MainThreadMac.mm:
        (WTF::scheduleDispatchFunctionsOnMainThread):
        Use static instance of the mainThreadCaller instead of allocating and releasing it each time.
        (WTF::initializeMainThreadPlatform):
        * wtf/gtk/MainThreadChromium.cpp:
        (WTF::initializeMainThreadPlatform):
        * wtf/gtk/MainThreadGtk.cpp:
        (WTF::initializeMainThreadPlatform):
        * wtf/qt/MainThreadQt.cpp:
        (WTF::initializeMainThreadPlatform):
        * wtf/win/MainThreadWin.cpp:
        (WTF::initializeMainThreadPlatform):
        * wtf/wx/MainThreadWx.cpp:
        (WTF::initializeMainThreadPlatform):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40888 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-02-12  David Levin  <levin@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Bug 23688: ThreadableLoader needs a sync implementation for Workers.
        <https://bugs.webkit.org/show_bug.cgi?id=23688>

        Add ResourceError to ThreadableLoaderClient.

        No observable change in behavior, so no test.

        * loader/DocumentThreadableLoader.cpp:
        (WebCore::DocumentThreadableLoader::create):
        (WebCore::DocumentThreadableLoader::willSendRequest):
        (WebCore::DocumentThreadableLoader::didFail):
        * loader/ThreadableLoaderClient.h:
        (WebCore::ThreadableLoaderClient::didFail):
        (WebCore::ThreadableLoaderClient::didFailWillSendRequestCheck):
        * loader/ThreadableLoaderClientWrapper.h:
        (WebCore::ThreadableLoaderClientWrapper::didFail):
        * loader/WorkerThreadableLoader.cpp:
        (WebCore::WorkerThreadableLoader::MainThreadBridge::mainThreadCreateLoader):
        (WebCore::workerContextDidFail):
        (WebCore::WorkerThreadableLoader::MainThreadBridge::didFail):
        * loader/WorkerThreadableLoader.h:
        * xml/XMLHttpRequest.cpp:
        (WebCore::XMLHttpRequest::didFail):
        (WebCore::XMLHttpRequest::didFailWillSendRequestCheck):
        * xml/XMLHttpRequest.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40889 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-02-12  Jian Li  <jianli@chromium.org>

        Reviewed by Alexey Proskuryakov.

        Change worker code to use different proxy class pointers.
        https://bugs.webkit.org/show_bug.cgi?id=23859

        This is a step towards using separate proxies in multi-process implementation.

        * bindings/js/WorkerScriptController.cpp:
        (WebCore::WorkerScriptController::evaluate):
        * dom/Worker.cpp:
        (WebCore::Worker::Worker):
        (WebCore::Worker::~Worker):
        (WebCore::Worker::postMessage):
        (WebCore::Worker::terminate):
        (WebCore::Worker::hasPendingActivity):
        (WebCore::Worker::notifyFinished):
        (WebCore::Worker::dispatchMessage):
        * dom/Worker.h:
        * dom/WorkerContext.cpp:
        (WebCore::WorkerContext::~WorkerContext):
        (WebCore::WorkerContext::reportException):
        (WebCore::WorkerContext::addMessage):
        (WebCore::WorkerContext::postMessage):
        (WebCore::WorkerContext::dispatchMessage):
        * dom/WorkerContext.h:
        * dom/WorkerContextProxy.h:
        * dom/WorkerMessagingProxy.cpp:
        (WebCore::MessageWorkerContextTask::performTask):
        (WebCore::MessageWorkerTask::performTask):
        (WebCore::WorkerContextProxy::create):
        (WebCore::WorkerMessagingProxy::WorkerMessagingProxy):
        (WebCore::WorkerMessagingProxy::~WorkerMessagingProxy):
        (WebCore::WorkerMessagingProxy::startWorkerContext):
        (WebCore::postConsoleMessageTask):
        (WebCore::WorkerMessagingProxy::postConsoleMessageToWorkerObject):
        (WebCore::WorkerMessagingProxy::workerThreadCreated):
        * dom/WorkerMessagingProxy.h:
        * dom/WorkerObjectProxy.h:
        * dom/WorkerThread.cpp:
        (WebCore::WorkerThread::create):
        (WebCore::WorkerThread::WorkerThread):
        (WebCore::WorkerThread::workerThread):
        * dom/WorkerThread.h:
        (WebCore::WorkerThread::workerObjectProxy):
        * loader/WorkerThreadableLoader.cpp:
        (WebCore::WorkerThreadableLoader::WorkerThreadableLoader):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40890 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Build fix.

        * platform/graphics/transforms/RotateTransformOperation.cpp: Include <algorithm>.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40899 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-02-12  Simon Hausmann  <simon.hausmann@nokia.com>

        Rubber-stamped by Lars.

        Re-enable the JIT in the Qt build with -fno-stack-protector on Linux.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40900 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2009-02-12  Adam Treat  <adam.treat@torchmobile.com>

        Fix the Qt build following r40871 which changed RenderObject::element()
        into RenderObject::node().

        * platform/qt/RenderThemeQt.cpp:
        (WebCore::RenderThemeQt::getMediaElementFromRenderObject):
        (WebCore::RenderThemeQt::getMediaControlForegroundColor):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40901 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Fix Bug 23918: Mac-specific results for fast/css/computed-style[-without-renderer] are sitting in cross-platform location

        <https://bugs.webkit.org/show_bug.cgi?id=23918>

        Move Mac-specific results for
        fast/css/computed-style[-without-renderer] to platform/mac

        Reviewed by John Sullivan.

        * fast/css/computed-style-expected.txt:
        * fast/css/computed-style-without-renderer-expected.txt:
        Made these results correct for non-Mac platforms by removing the
        -webkit-dashboard-region references.

        * platform/mac/fast/css/computed-style-expected.txt: Copied from LayoutTests/fast/css/computed-style-expected.txt.
        * platform/mac/fast/css/computed-style-without-renderer-expected.txt: Copied from LayoutTests/fast/css/computed-style-without-renderer-expected.txt.

        * platform/win/fast/css/computed-style-expected.txt:
        * platform/win/fast/css/computed-style-without-renderer-expected.txt:
        Copied the non-Mac results here, too, since on Windows we first check
        for Mac-specific results before checking for cross-platform results.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40902 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Fix Bug 23919: Mac-specific test fast/css/dashboard-region-parser is in cross-platform location

        <https://bugs.webkit.org/show_bug.cgi?id=23919>

        Moved the test and its results to platform/mac.

        Reviewed by Dan Bernstein.

        * platform/mac/fast/css/dashboard-region-parser-expected.txt: Renamed from LayoutTests/fast/css/dashboard-region-parser-expected.txt.
        * platform/mac/fast/css/dashboard-region-parser.html: Renamed from LayoutTests/fast/css/dashboard-region-parser.html.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40903 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Add another failing drag-n-drop test to the Windows Skipped list

        * platform/win/Skipped: Added editing/selection/drag-in-iframe.html.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40904 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Add a failing loader test to the Windows Skipped list

        * platform/win/Skipped: Added fast/loader/frame-creation-removal.html.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40905 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Fix Bug 23922: Warning message from run-webkit-tests when Skipped file contains non-existent tests is confusing and is given for disabled tests

        <https://bugs.webkit.org/show_bug.cgi?id=23922>

        We now no longer warn about disabled tests. The warning now reads:

        Skipped list contained '$item', but no file of that name could be
        found

        Reviewed by John Sullivan.

        * Scripts/run-webkit-tests:
        (top level): Pass the list name to processIgnoreTests so it can print
        out a reasonable warning message.
        (processIgnoreTests): Take a list name as a second parameter and use
        it to display a better warning message. Also check for a "-disabled"
        version of the test before warning about it not existing.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40906 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Remove some passing tests from the Windows Skipped list

        * platform/win/Skipped: Removed two tests in http/tests/incremental
        (one of which had been renamed and so was running anyway).

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40907 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Fix lots of Perl warnings when building JavaScriptCoreGenerated on Windows

        Reviewed by John Sullivan.

        * JavaScriptCore.vcproj/JavaScriptCore/build-generated-files.sh:
        Create the docs/ directory so that we can write bytecode.html into it.
        This matches what JavaScriptCore.xcodeproj does.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40908 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Add some tests that fail due to using the wrong font for Hebrew to the Windows Skipped list

        * platform/win/Skipped:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@40909 268f45cc-cd09-0410-ab3c-d52691b4dbfc