2010-09-24  Pawel Hajdan  <phajdan.jr@chromium.org>

        Reviewed by Dumitru Daniliuc.

        Move the implementation of chromium_vfs to webkit for POSIX.
        This allows us to link Chrome with system-provided SQLite on Linux.
        See also http://code.google.com/p/chromium/issues/detail?id=22208.
        https://bugs.webkit.org/show_bug.cgi?id=45416

        No new tests.

        * platform/sql/chromium/SQLiteFileSystemChromiumPosix.cpp:
        (sqliteErrorFromPosixError):
        (releaseLockInfo):
        (releaseOpenInfo):
        (findLockInfo):
        (chromiumCheckReservedLock):
        (rangeLock):
        (chromiumLock):
        (closePendingFds):
        (chromiumUnlock):
        (chromiumCloseNoLock):
        (chromiumClose):
        (chromiumCheckReservedLockNoop):
        (chromiumLockNoop):
        (chromiumUnlockNoop):
        (seekAndRead):
        (chromiumRead):
        (seekAndWrite):
        (chromiumWrite):
        (syncWrapper):
        (chromiumSync):
        (chromiumTruncate):
        (chromiumFileSize):
        (chromiumFileControl):
        (chromiumSectorSize):
        (chromiumDeviceCharacteristics):
        (fillInChromiumFile):
        (findReusableFd):
        (chromiumOpen):
        (chromiumDelete):
        (chromiumAccess):
        (chromiumFullPathname):
        (chromiumDlOpen):
        (chromiumDlError):
        (chromiumDlSym):
        (chromiumDlClose):
        (chromiumRandomness):
        (chromiumSleep):
        (chromiumCurrentTime):
        (chromiumGetLastError):
        (WebCore::SQLiteFileSystem::registerSQLiteVFS):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68310 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-09-24  Tony Chang  <tony@chromium.org>

        Reviewed by Dimitri Glazkov.

        [chromium] add individual entries for repaint failures on mac
        https://bugs.webkit.org/show_bug.cgi?id=46517

        * platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68311 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-09-24  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Tony Chang.

        [chromium] Implement TextInputController::firstRectForCharacterRange
        https://bugs.webkit.org/show_bug.cgi?id=38100

        The following test now passes on chromium DumpRenderTree:
        platform/mac/editing/input/caret-primary-bidi.html
        platform/mac/editing/input/firstrectforcharacterrange-plain.html
        platform/mac/editing/input/range-for-empty-document.html
        editing/inserting/caret-position.html

        * platform/chromium/test_expectations.txt:
2010-09-24  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Tony Chang.

        [chromium] Implement TextInputController::firstRectForCharacterRange
        https://bugs.webkit.org/show_bug.cgi?id=38100

        Implemented TextInputController::firstRectForCharacterRange for chromium platform.
        Because the function needs to return an array of integers, added makeIntArray to WebBindings.
        makeIntArray does not take Vector because WebBindings.h is included in plugin glue code
        where it cannot find wtf/Vector.h.

        No new tests are added since we need to implement the same feature in chromium side
        in order to enable any tests that uses this function.

        * public/WebBindings.h:
        * public/WebFrame.h:
        * src/WebBindings.cpp:
        (WebKit::makeIntArrayImpl): Added.
        (WebKit::WebBindings::makeIntArray): Added.
        * src/WebFrameImpl.cpp:
        (WebKit::WebFrameImpl::firstRectForCharacterRange): Added.
        * src/WebFrameImpl.h:
2010-09-24  Ryosuke Niwa  <rniwa@webkit.org>

        Reviewed by Tony Chang.

        [chromium] Implement TextInputController::firstRectForCharacterRange
        https://bugs.webkit.org/show_bug.cgi?id=38100

        Implemented TextInputController::firstRectForCharacterRange for chromium platform.
        No new tests are added since we need to implement the same feature in chromium side
        in order to enable any tests that uses this function.

        * DumpRenderTree/chromium/TextInputController.cpp:
        (TextInputController::firstRectForCharacterRange): Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68312 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-09-24  Martin Robinson  <mrobinson@igalia.com>

        Reviewed by Gustavo Noronha Silva.

        [GTK] opening local files on win32
        https://bugs.webkit.org/show_bug.cgi?id=31066

        This is tested by changes to the testmimehandling API test.

        * platform/network/soup/ResourceHandleSoup.cpp: Properly convert the GContentType
        of a file into a mime type. This is important for non-Unix platforms.
2010-09-24  Martin Robinson  <mrobinson@igalia.com>

        Reviewed by Gustavo Noronha Silva.

        [GTK] opening local files on win32
        https://bugs.webkit.org/show_bug.cgi?id=31066

        Add tests that check the mime type returned by local files loaded via file URLs.

        * tests/testmimehandling.c:
        (testRemoteMimeType): Added.
        (testLocalMimeType): Added.
        (main): Run tests by using g_test_add_data_func with either
        testRemoteMimeType or testLocalMimeType.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68313 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-09-24  Mihai Parparita  <mihaip@chromium.org>

        Unreviewed Chromium test_expectations.txt and drt_expectations.txt update.

        Userscript test now pass with both the Chromium DRT and test_shell
        (as of http://crrev.com/60526).

        * platform/chromium/drt_expectations.txt:
        * platform/chromium/test_expectations.txt:

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

* WebKit2.xcodeproj/project.pbxproj:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68316 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-09-24  Mihai Parparita  <mihaip@chromium.org>

        Reviewed by Adam Barth.

        Allow rebaselines for webkit-patch rebaseline to be chosen
        https://bugs.webkit.org/show_bug.cgi?id=46407

        Instead of always rebaselining all failing tests, allow a subset to be
        chosen.

        * Scripts/webkitpy/common/system/user.py:
        * Scripts/webkitpy/tool/commands/rebaseline.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68317 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Maui: Pasteboard support (42317)
<rdar://problem/7660537>
https://bugs.webkit.org/show_bug.cgi?id=42317
        
Reviewed by Darin Adler.

This is the final piece of the pasteboard support for WebKit2.
The menu validation has been hooked up for Mac. The validation is
performed asynchronously and the menu entries updated while the menu
is visible. I've created a generic mechanism to call editing commands
that will make it easy to add new commands we will support in the future.
The commands supported now are copy, cut, paste, pasteAsPlainText, delete
and selectAll.

* Shared/CoreIPCSupport/WebPageProxyMessageKinds.h: Added DidValidateMenuItem.
* UIProcess/API/mac/PageClientImpl.h: Added setEditCommandState.
* UIProcess/API/mac/PageClientImpl.mm: Added setEditCommandState implementation.
(WebKit::PageClientImpl::setEditCommandState): Added.
* UIProcess/API/mac/WKView.mm:
(WebCore::MenuItemInfo::MenuItemInfo):
(-[WKView initWithFrame:pageNamespaceRef:]):
(createSelectorExceptionMap): Added.
(commandNameForSelector): Added.
(-[WKView validateUserInterfaceItem:]): Added implementation.
(-[WKView _setUserInterfaceItemState:enabled:state:]): Added.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::validateMenuItem):
(WebKit::WebPageProxy::executeEditCommand):
(WebKit::WebPageProxy::didReceiveMessage): Now processing also
DidValidateMenuItem.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::executeEditingCommand): Fixed.
(WebKit::WebPage::isEditingCommandEnabled): Fixed.
(WebKit::WebPage::validateMenuItem): Added.
(WebKit::WebPage::executeEditCommand): Added.
* WebProcess/WebPage/WebPage.h: Removed cut, copy, paste, selectAll.
Added validateMenuItem and executeEditCommand.
* WebProcess/WebPage/WebPage.messages.in: Added new messages.
* UIProcess/API/qt/qwkpage.cpp:
(WebKit::QWKPage::setEditCommandState): Added.
* UIProcess/API/qt/qwkpage_p.h: Added 



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68318 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-09-24  Kwang Yul Seo  <skyul@company100.net>

        Reviewed by Andreas Kling.

        [wx] ChromeClientWx::scaleFactor must return 1.0
        https://bugs.webkit.org/show_bug.cgi?id=46542

        The default value of ChromeClientWx::scaleFactor must be 1.0.
        Otherwise, canvas element won't be painted.

        * WebKitSupport/ChromeClientWx.cpp:
        (WebCore::ChromeClientWx::scaleFactor):

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

* UIProcess/API/qt/qwkpage_p.h:
* UIProcess/win/WebView.cpp:
(WebKit::WebView::setEditCommandState):
* UIProcess/win/WebView.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68320 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-09-24  Andreas Kling  <andreas.kling@nokia.com>

        Reviewed by Kenneth Rohde Christiansen.

        SVG: Avoid calling pow() in genericParseNumber() unless necessary
        https://bugs.webkit.org/show_bug.cgi?id=46537

        0.4% speedup on <http://themaninblue.com/experiment/AnimationBenchmark/svg/>

        * svg/SVGParserUtilities.cpp:
        (WebCore::genericParseNumber): Only call pow() when we have an exponent.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68321 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement WebKit2 callback equivalent to -[WebUIDelegate mouseDidMoveOverElement:modifierFlags:]
<rdar://problem/8359279>
https://bugs.webkit.org/show_bug.cgi?id=46546

Reviewed by Darin Adler.

WebKit2: 

- Adds new WKBundleHitTestResultRef object to represent a content under a cursor.
- Adds new Bundle and UI level mouseDidMoveOverElement UIClient callbacks, with
  pass through userData to communicate context up to the UIProcess

* Shared/APIObject.h:
* Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
* UIProcess/API/C/WKPage.h:
* UIProcess/API/qt/qwkpage.cpp:
(QWKPage::QWKPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didReceiveMessage):
(WebKit::WebPageProxy::mouseDidMoveOverElement):
* UIProcess/WebPageProxy.h:
* UIProcess/WebUIClient.cpp:
(WebKit::WebUIClient::mouseDidMoveOverElement):
* UIProcess/WebUIClient.h:
* WebKit2.pro:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
* WebProcess/InjectedBundle/API/c/WKBundleBase.h:
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp: Added.
(WKBundleHitTestResultGetTypeID):
(WKBundleHitTestResultGetNodeHandle):
(WKBundleHitTestResultGetFrame):
(WKBundleHitTestResultCopyAbsoluteLinkURL):
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h: Added.
* WebProcess/InjectedBundle/API/c/WKBundlePage.h:
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp: Added.
(WebKit::InjectedBundleHitTestResult::create):
(WebKit::InjectedBundleHitTestResult::nodeHandle):
(WebKit::InjectedBundleHitTestResult::webFrame):
(WebKit::InjectedBundleHitTestResult::absoluteLinkURL):
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: Added.
(WebKit::InjectedBundleHitTestResult::coreHitTestResult):
(WebKit::InjectedBundleHitTestResult::InjectedBundleHitTestResult):
(WebKit::InjectedBundleHitTestResult::type):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::mouseDidMoveOverElement):
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::mouseDidMoveOverElement):
* win/WebKit2.vcproj:

WebKitTools: 

* MiniBrowser/mac/BrowserWindowController.m:
(mouseDidMoveOverElement):
(-[BrowserWindowController awakeFromNib]):
* MiniBrowser/win/BrowserView.cpp:
(mouseDidMoveOverElement):
(BrowserView::create):
* WebKitTestRunner/InjectedBundle/InjectedBundlePage.cpp:
(WTR::InjectedBundlePage::InjectedBundlePage):
* WebKitTestRunner/TestController.cpp:
(WTR::createOtherPage):
(WTR::TestController::initialize):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68322 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-09-24  Simon Fraser  <simon.fraser@apple.com>

        Reviewed by Sam Weinig.

        Accelerated transitions do not suspend/resume properly.
        https://bugs.webkit.org/show_bug.cgi?id=43792

        (1) Fix regression from r68233, where if an animation affected two
        properties, only one would animate. The testcase tests this.

        (2) Fix a flash at the end of an animation or transition that has been
        paused and resumed. The flash occurred because we used CAAnimation's
        timeOffset when resuming to push the start of the animation into
        the past. However, timeOffset does not play nicely with fill modes,
        causing a single frame of animation with the element in its unanimated state.

        Fixed this by offsetting the beginTime into the past, rather than setting
        timeOffset. Normally we submit animations with beginTime == 0, and rely
        on CA assigning a beginTime when the animation is committed. This beginTime
        is then passed to AnimationController to sync hardware and software animations.
        However, since the code now assigns beginTimes in the past (on resume),
        we now have to denote whether we've done this, and send an appropriate
        timestamp back to AnimationController.

        (3) Finally, the patch removes PropertyAnimationPair and just uses LayerPropertyAnimation
        instead. This is just cleanup.

        Test: animations/opacity-transform-animation.html

        * platform/graphics/mac/GraphicsLayerCA.h: Remove PropertyAnimationPair,
        and change AnimationsMap to store a vector of LayerPropertyAnimation.
        New method, animationDidStart(), is called from the -animationDidStart: callback.

        * platform/graphics/mac/GraphicsLayerCA.mm:
        (-[WebAnimationDelegate animationDidStart:]): Just call m_graphicsLayer->animationDidStart()
        now.
        (WebCore::animationIdentifier): We need to pass in the property, to fix (1)
        (WebCore::GraphicsLayerCA::moveOrCopyAnimationsForProperty): Copy the WebKitAnimationBeginTimeSet
        value, if present.
        (WebCore::GraphicsLayerCA::animationDidStart): Call notifyAnimationStarted() on the client,
        after testing if we set a non-zero beginTime on this particular animation.
        (WebCore::GraphicsLayerCA::updateLayerAnimations): Change to use LayerPropertyAnimation.
        (WebCore::GraphicsLayerCA::setCAAnimationOnLayer): Set value for WebKitAnimationBeginTimeSetKey
        if we have a non-zero timeOffset. Make animationID an NSString, to avoid several conversions.
        (WebCore::GraphicsLayerCA::removeCAAnimationFromLayer):  Make animationID an NSString, to
        avoid several conversions.
        (WebCore::copyAnimationProperties): Copy WebKitAnimationBeginTimeSetKey if present.
        (WebCore::GraphicsLayerCA::pauseCAAnimationOnLayer): Make animationID an NSString, to avoid
        several conversions.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68323 268f45cc-cd09-0410-ab3c-d52691b4dbfc
One more build fix.

* UIProcess/API/qt/qwkpage.cpp:
(QWKPagePrivate::setEditCommandState):



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

* WebProcess/InjectedBundle/API/c/WKBundlePage.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68325 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix accidental increase in the size of InlineBox by using a bit
field to indicate that a bool should only take up 1 bit.

Rubber-stamped by Dan Bernstein.

* rendering/InlineBox.h:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68326 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-09-24  Mihai Parparita  <mihaip@chromium.org>

        Reviewed by Darin Fisher.

        [Chromium] Unnecessary blob dependency in WebKit.gyp
        https://bugs.webkit.org/show_bug.cgi?id=46488

        r66322 shouldn't have added a blob dependency by hand to targets in
        WebKit.gyp, instead blob should be a dependency of webkit_support.
        http://crrev.com/59406 did that, so we can now remove these deps.

        * WebKit.gyp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68327 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-09-24  Mihai Parparita  <mihaip@chromium.org>

        Unreviewed Chromium test_expectations.txt and drt_expectations.txt update.

        fast/canvas/webgl/null-object-behaviour.html and
        fast/canvas/webgl/uniform-location.html were unskipped with r68187,
        however, they still fail with the DRT (only on the bot, presumably due
        to a Leopard-only issue), just like a lot of other WebGL tests.

        fast/viewport/viewport-128.html is yet another viewport test that only
        the Qt port supports.

        animations/opacity-transform-animation.html hasn't passed since it was
        committed with r68323.

        * platform/chromium/drt_expectations.txt:
        * platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68328 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-09-25  Nicolas Weber  <thakis@chromium.org>

        Reviewed by Adam Barth.

        https://bugs.webkit.org/show_bug.cgi?id=46555
        Fix typo in prepare-ChangeLog's help output.

        * Scripts/prepare-ChangeLog:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@68329 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-09-25  Patrick Gansterer  <paroga@webkit.org>

        Unreviewed.

        Fix typo in StringHasher class
        https://bugs.webkit.org/show_bug.cgi?id=45970

        * wtf/StringHashFunctions.h:
        (WTF::StringHasher::createHash):

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