2010-04-15  Anders Carlsson  <andersca@apple.com>

        Reviewed by Sam Weinig.

        Start the mini browser in threaded mode if shift is pressed during startup.
        https://bugs.webkit.org/show_bug.cgi?id=37670

        * MiniBrowser/mac/AppDelegate.m:
        (-[BrowserAppDelegate init]):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add WebHistoryClient support.
https://bugs.webkit.org/show_bug.cgi?id=37671

Reviewed by Anders Carlsson.

WebKit2: 

Adds the following callbacks:
    didNavigateWithNavigationData
    didPerformClientRedirect
    didPerformServerRedirect
    didUpdateHistoryTitle

* Shared/CoreIPCSupport/WebPageProxyMessageKinds.h:
(WebPageProxyMessage::):
* Shared/WebNavigationDataStore.h: Added.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKBase.h:
* UIProcess/API/C/WKNavigationData.cpp: Added.
* UIProcess/API/C/WKNavigationData.h: Added.
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/C/WKPage.h:
* UIProcess/API/C/WebKit2.h:
* UIProcess/WebHistoryClient.cpp: Copied from UIProcess/WebUIClient.cpp.
* UIProcess/WebHistoryClient.h: Copied from UIProcess/WebUIClient.h.
* UIProcess/WebNavigationData.cpp: Added.
* UIProcess/WebNavigationData.h: Added.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* win/WebKit2.vcproj:

WebKitTools: 

Add HistoryClient logging.

* MiniBrowser/mac/BrowserWindowController.m:
(_didNavigateWithNavigationData):
(_didPerformClientRedirect):
(_didPerformServerRedirect):
(_didUpdateHistoryTitle):
(-[BrowserWindowController awakeFromNib]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Not reviewed, sheriffing.

[Chromium] Update chromium layout tests expecataions with new baselines. Remove expectations for some tests that seem to be passing now.

* platform/chromium-win/fast/backgrounds/svg-as-background-1-expected.checksum:
* platform/chromium-win/fast/backgrounds/svg-as-background-1-expected.png:
* platform/chromium-win/fast/backgrounds/svg-as-background-3-expected.checksum:
* platform/chromium-win/fast/backgrounds/svg-as-background-3-expected.png:
* platform/chromium/test_expectations.txt:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make --exit-after-n-failures work when all tests are timing out or crashing

Fixes <http://webkit.org/b/37679>.

Reviewed by Jon Honeycutt.

* Scripts/run-webkit-tests:
(top level): When a test crashes or times out, break out of the main loop if
stopRunningTestsEarlyIfNeeded returns true. Moved some code from the bottom of the main loop
from here...
(stopRunningTestsEarlyIfNeeded): ...to here.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-04-15  Ojan Vafai  <ojan@chromium.org>

        Reviewed by Adam Barth.

        Include codereview issue number in patch description
        https://bugs.webkit.org/show_bug.cgi?id=37677

        This lets us know which rietveld issue this patch is tied to.

        Also, make it so that --fancy-review overrides --no-review.

        * Scripts/webkitpy/tool/steps/postcodereview.py:
        * Scripts/webkitpy/tool/steps/postdiff.py:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Expose UserContentURLPattern as WebKit SPI

Fixes <http://webkit.org/b/37354>.

Reviewed by Tim Hatcher.

WebCore:

* WebCore.base.exp: Export UserContentURLPattern::parse, and sorted
the file.

* WebCore.xcodeproj/project.pbxproj: Marked UserContentURLPattern.h as
"Private".

* page/UserContentURLPattern.h:
(WebCore::UserContentURLPattern::UserContentURLPattern): Added a
default constructor.
(WebCore::UserContentURLPattern::isValid): Added this getter.

WebKit:

* WebKit.xcodeproj/project.pbxproj: Add WebUserContentURLPattern.

WebKit/mac:

* Misc/WebUserContentURLPattern.h: Added.

* Misc/WebUserContentURLPattern.mm: Added.
(-[WebUserContentURLPattern initWithPatternString:]): Initialize
_private and then parse the passed-in string into a
UserContentURLPattern.
(-[WebUserContentURLPattern dealloc]): Release _private.

(-[WebUserContentURLPattern isValid]):
(-[WebUserContentURLPattern scheme]):
(-[WebUserContentURLPattern host]):
(-[WebUserContentURLPattern matchesSubdomains]):
Call through to UserContentURLPattern.

WebKit/win:

* Interfaces/IWebUserContentURLPattern.idl: Added.

* Interfaces/WebKit.idl: Added WebUserContentURLPattern.

* WebKit.vcproj/Interfaces.vcproj: Added IWebUserContentURLPattern.

* WebKit.vcproj/WebKit.vcproj: Added WebUserContentURLPattern.

* WebUserContentURLPattern.cpp: Added.
(WebUserContentURLPattern::WebUserContentURLPattern):
(WebUserContentURLPattern::~WebUserContentURLPattern):
(WebUserContentURLPattern::createInstance):
(WebUserContentURLPattern::AddRef):
(WebUserContentURLPattern::Release):
(WebUserContentURLPattern::QueryInterface):
Standard COM implementations.

(WebUserContentURLPattern::parse): Parse the string into a
UserContentURLPattern and store it.

(WebUserContentURLPattern::isValid):
(WebUserContentURLPattern::scheme):
(WebUserContentURLPattern::host):
(WebUserContentURLPattern::matchesSubdomains):
Call through to UserContentURLPattern.

* WebUserContentURLPattern.h: Added.

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

Layout test fix for new test that works differently on leopard v. snow leopard.

AXHelp is being appended from ancestors incorrectly
https://bugs.webkit.org/show_bug.cgi?id=37659

* platform/mac/accessibility/unexpected-help-text-expected.txt:
* platform/mac/accessibility/unexpected-help-text.html:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Made consecutive calls to -[WebHTMLView _beginPrintModeWithPageWidth:shrinkToFit:] work
without intermediate calls -[WebHTMLView _endPrintMode].

Reviewed by Simon Fraser.

* WebView/WebHTMLView.mm:
(-[WebHTMLView _setPrinting:minimumPageWidth:maximumPageWidth:adjustViewSize:]):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Export WebUserContentURLPattern from WebKit

Rubber-stamped by Mark Rowe.

* WebKit.exp:

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

WebKit2: 

Patch by Adam Roben <aroben@apple.com> on 2010-04-15
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processDidExit):
* win/WebKit2Generated.make:

WebKitTools: 

Patch by Adam Roben <aroben@apple.com> on 2010-04-15
* MiniBrowser/win/MiniBrowser.cpp:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
        Reviewed by Geoff Garen.

        https://bugs.webkit.org/show_bug.cgi?id=37494
        <rdar://problem/7857060> REGRESSION (r57340): fast/events/mouse-drag-from-frame-to-other-frame.html
        fails on Windows

        * DumpRenderTree/win/EventSender.cpp: (makeEventSender):
        * DumpRenderTree/win/EventSender.h:
        Tell EventSender if it's being created for a top frame.
        
        * DumpRenderTree/win/FrameLoadDelegate.cpp:
        (FrameLoadDelegate::didClearWindowObjectForFrameInStandardWorld): We only want to reset
        EventSender machinery when a new test is loaded, not when an iframe (or just its global
        object) is created.



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

Reviewed by Adam Roben.

* WebKit2.sln:



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

        Reviewed by Dimitri Glazkov.

        Fix drag image thumbnails for indexed images.
        https://bugs.webkit.org/show_bug.cgi?id=37621

        * platform/chromium/DragImageChromiumMac.cpp:
        (WebCore::scaleDragImage): Always use RGB color space.
        (WebCore::dissolveDragImageToFraction): Always use RGB color space.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57687 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-04-15  Eric Uhrhane  <ericu@chromium.org>

        Reviewed by Dmitry Titov.

        Add bindings for async DB API in Workers.
        https://bugs.webkit.org/show_bug.cgi?id=34992

        * storage/change-version-handle-reuse.html: Refactored to share code with the worker version of the test.
        * storage/change-version-handle-reuse-expected.html: Removed reference to reloading, which this test doesn't do.
        * storage/change-version-handle-reuse.js: This is the extracted shared core of the test.
        * storage/execute-sql-args.html: Refactored to share code with the worker version of the test.
        * storage/execute-sql-args.js: This is the extracted shared core of the test.

        These are the worker versions of the tests; they're tiny shims around shared code.
        * fast/workers/execute-sql-args-worker-expected.txt: Added.
        * fast/workers/execute-sql-args-worker.html: Added.
        * fast/workers/change-version-handle-reuse-worker-expected.txt: Added.
        * fast/workers/change-version-handle-reuse-worker.html: Added.
        This file gets included from worker database tests; it does all the boilerplate that's needed on the DOM side.
        * fast/workers/resources/database-worker-controller.js: Added.
        This file is the boilerplate for the worker side of the database tests.  It will import and run the actual test on command, and will report back completion and exceptions.
        * fast/workers/resources/database-worker.js: Added.
2010-04-15  Eric Uhrhane  <ericu@chromium.org>

        Reviewed by Dmitry Titov.

        Add bindings for async DB API in Workers.
        https://bugs.webkit.org/show_bug.cgi?id=34992

        Tests: storage/change-version-handle-reuse-worker.html
               storage/execute-sql-args-worker.html

        * bindings/js/JSWorkerContextCustom.cpp: Add openDatabase binding.
        (WebCore::JSWorkerContext::openDatabase):

        * bindings/v8/custom/V8WorkerContextCustom.cpp: Add openDatabase stub; Chromium will need work both in V8 and in the browser process before we can turn this on there.
        (WebCore::V8WorkerContext::openDatabaseCallback):

        Add NoStaticTables flags to all objects now shared with workers.
        * storage/Database.idl:
        * storage/SQLError.idl:
        * storage/SQLResultSet.idl:
        * storage/SQLResultSetRowList.idl:
        * storage/SQLTransaction.idl:

        * workers/WorkerContext.h: Add databaseExceededQuota.
        * workers/WorkerContext.cpp:
        (WebCore::WorkerContext::databaseExceededQuota): Add stub implementation for testing; you just get 5MB for now.
        (WebCore::WorkerContext::openDatabase): Remove invalid assertion.

        Add the IDL for the call to openDatabase.
        * workers/WorkerContext.idl:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57688 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make tooltips work. Thanks Adam!

Reviewed by Adam Roben.

* UIProcess/win/WebView.cpp:
(WebKit::WebView::toolTipChanged): Pass the WebView's HWND, not the tooltip's.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57689 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-04-15  Kent Tamura  <tkent@chromium.org>

        Reviewed by Dimitri Glazkov.

        [DRT/Chromium] Add LayoutTestHelper for Mac
        https://bugs.webkit.org/show_bug.cgi?id=37668

        LayouTestHelper.mm is based on webkit/tools/test_shell/mac/layout_test_helper.mm
        of Chromium.

        * DumpRenderTree/DumpRenderTree.gyp/DumpRenderTree.gyp:
        * DumpRenderTree/chromium/LayoutTestHelper.mm: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57690 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Fix crash when trying to load an invalid URL.

Reviewed by Adam Roben.

* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadURL): Use constructor for ResourceRequest
that takes a KURL instead of the one that takes a String. The one
that takes a string expects a valid URL.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57691 268f45cc-cd09-0410-ab3c-d52691b4dbfc
<rdar://problem/7870651> WebDynamicScrollBarsView.h generates compile errors when included in plain Objective-C files.

Reviewed by Sam Weinig.

* WebView/WebDynamicScrollBarsView.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57692 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2010-04-15  Zhenyao Mo  <zmo@google.com>

        Reviewed by Dimitri Glazkov.

        Must enable GL_VERTEX_PROGRAM_POINT_SIZE during initialization
        https://bugs.webkit.org/show_bug.cgi?id=37178

        * fast/canvas/webgl/point-size-expected.txt: Added.
        * fast/canvas/webgl/point-size.html: Added.
2010-04-15  Zhenyao Mo  <zmo@google.com>

        Reviewed by Dimitri Glazkov.

        Must enable GL_VERTEX_PROGRAM_POINT_SIZE during initialization
        https://bugs.webkit.org/show_bug.cgi?id=37178

        Test: fast/canvas/webgl/point-size.html

        * platform/graphics/mac/GraphicsContext3DMac.cpp: Enable GL_VERTEX_PROGRAM_POINT_SIZE during initialization.
        (WebCore::GraphicsContext3D::GraphicsContext3D):
2010-04-15  Zhenyao Mo  <zmo@google.com>

        Reviewed by Dimitri Glazkov.

        Must enable GL_VERTEX_PROGRAM_POINT_SIZE during initialization
        https://bugs.webkit.org/show_bug.cgi?id=37178

        * src/WebGraphicsContext3DDefaultImpl.cpp: Enable GL_VERTEX_PROGRAM_POINT_SIZE during initialization.
        (WebKit::WebGraphicsContext3DDefaultImpl::initialize):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@57694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Support using FormData to send a sliced file via XHR.
https://bugs.webkit.org/show_bug.cgi?id=36678

Reviewed by Dmitry Titov.

WebCore:

Tests: http/tests/local/formdata/send-form-data-with-sliced-file.html

* html/Blob.h:
(WebCore::Blob::isFile):
* html/DOMFormData.cpp:
(WebCore::DOMFormData::append):
* html/File.h:
(WebCore::File::isFile):
* html/FormDataList.h:
(WebCore::FormDataList::appendBlob):
(WebCore::FormDataList::Item::Item):
(WebCore::FormDataList::Item::blob):
* html/HTMLInputElement.cpp:
(WebCore::HTMLInputElement::appendFormData):
* platform/network/FormData.cpp:
(WebCore::FormData::appendDOMFormData):
* platform/network/mac/FormDataStreamMac.mm:
(WebCore::closeCurrentStream):

LayoutTests:

Move common functionality to test sending FormData into a helper file
so that it can be shared by FormData layout tests.
Also move the form data testing files to a new subdirectory formdata/.

* http/tests/local/formdata/resources/send-form-data-common.js: Added.
* http/tests/local/formdata/script-tests/TEMPLATE.html: Added.
* http/tests/local/formdata/script-tests/send-form-data-with-sliced-file.js: Added.
* http/tests/local/formdata/script-tests/send-form-data.js: Added.
* http/tests/local/formdata/send-form-data-expected.txt: Renamed from LayoutTests/http/tests/local/send-form-data-expected.txt.
* http/tests/local/formdata/send-form-data-with-sliced-file-expected.txt: Added.
* http/tests/local/formdata/send-form-data-with-sliced-file.html: Added.
* http/tests/local/formdata/send-form-data.html: Added.
* http/tests/local/resources/send-form-data.js: Removed.
* http/tests/local/send-form-data.html: Removed.
* platform/gtk/Skipped:
* platform/qt/Skipped:
* platform/win/Skipped:

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