decidePolicyForNewWindowAction should take a NavigationActionData object
https://bugs.webkit.org/show_bug.cgi?id=127952

Reviewed by Dan Bernstein.

* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNewWindowAction):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPagePolicyClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNewWindowAction):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163123 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: ObjectStore cursor iterate() support
<rdar://problem/15941914> and https://bugs.webkit.org/show_bug.cgi?id=127867

Reviewed by Tim Horton.

* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::SQLiteIDBCursor::iterate): Implement iterate() using advance()

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163124 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add session support to WebPlatformStrategies
https://bugs.webkit.org/show_bug.cgi?id=127926

Patch by Martin Hock <mhock@apple.com> on 2014-01-30
Reviewed by Alexey Proskuryakov.

* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/SessionTracker.cpp:
(WebKit::storageSessionToID):
(WebKit::SessionTracker::session):
(WebKit::SessionTracker::sessionID):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
* Shared/SessionTracker.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setSession):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::cookiesForDOM):
(WebKit::WebPlatformStrategies::setCookiesFromDOM):
(WebKit::WebPlatformStrategies::cookiesEnabled):
(WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue):
(WebKit::WebPlatformStrategies::getRawCookies):
(WebKit::WebPlatformStrategies::deleteCookie):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setSessionID): Ensure the storage session exists.
* WebProcess/WebPage/WebPage.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163125 268f45cc-cd09-0410-ab3c-d52691b4dbfc
WebGL load policy should be queried for the top level document.
https://bugs.webkit.org/show_bug.cgi?id=127937.
<rdar://problem/15950122>
Reviewed by Timothy Horton.
* html/HTMLCanvasElement.cpp:
(WebCore::HTMLCanvasElement::getContext):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163127 268f45cc-cd09-0410-ab3c-d52691b4dbfc
http/tests/security/cross-origin-plugin-private-browsing-toggled.html is flaky on WK2
https://bugs.webkit.org/show_bug.cgi?id=127960

* platform/mac-wk2/TestExpectations: Marked it as such.



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163128 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Implement NavigationState::PolicyClient::decidePolicyForNewWindowAction
https://bugs.webkit.org/show_bug.cgi?id=127962

Reviewed by Andreas Kling.

Have decidePolicyForNewWindowAction call decidePolicyForNavigationAction with a null destination frame.

* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForNewWindowAction):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163129 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [REGRESSION(r163086)] Missing localized string 'Hide console (%s)'
https://bugs.webkit.org/show_bug.cgi?id=127951

Patch by Diego Pino Garcia <dpino@igalia.com> on 2014-01-30
Reviewed by Timothy Hatcher.

* Localizations/en.lproj/localizedStrings.js:
Add 'Hide console (%s)'.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163130 268f45cc-cd09-0410-ab3c-d52691b4dbfc
IDB: Implement IDBObjectStore.count()
https://bugs.webkit.org/show_bug.cgi?id=127888

Reviewed by Tim Horton.

Now count() actually works.

Forward the count() request to the backing store”
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::countInBackingStore):

Using a cursor, get a count:
* DatabaseProcess/IndexedDB/UniqueIDBDatabaseBackingStore.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::count):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:

Give a direct accessor to allow the backing store to close a cursor it opened
for its own use:
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.cpp:
(WebKit::SQLiteIDBTransaction::closeCursor):
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBTransaction.h:

* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::didCount): Update the logging to show the count.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163131 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a webView:didStartProvisionalNavigation: delegate method
https://bugs.webkit.org/show_bug.cgi?id=127965

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didStartProvisionalLoadForFrame):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createLoaderClient):
(WebKit::NavigationState::createPolicyClient):
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::LoaderClient):
(WebKit::NavigationState::LoaderClient::~LoaderClient):
(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(-[NavigationDelegate webView:didStartProvisionalNavigation:]):
(TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163132 268f45cc-cd09-0410-ab3c-d52691b4dbfc
copy-webkitlibraries-to-product-directory should accept command-line arguments for extra work required for optional features rather than relying on environment variables
https://bugs.webkit.org/show_bug.cgi?id=120221

Reviewed by Mark Hahnenberg.

* Scripts/build-jsc:
* Scripts/build-webkit:
* Scripts/copy-webkitlibraries-to-product-directory:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163133 268f45cc-cd09-0410-ab3c-d52691b4dbfc
NRWT shouldn't say "Finished writing JSON files" if it failed to to so
https://bugs.webkit.org/show_bug.cgi?id=127966

Reviewed by Alexey Proskuryakov.

Don't say "Finished writing JSON files" if we had failed to generate the JSON file.
Also explicitly say this is for test results server as we're generating two JSON files.

* Scripts/webkitpy/layout_tests/controllers/manager.py:
(Manager._upload_json_files):
* Scripts/webkitpy/layout_tests/layout_package/json_layout_results_generator.py:
(JSONLayoutResultsGenerator.__init__): Don't generate JSON file implicitly inside the constructor.
* Scripts/webkitpy/layout_tests/layout_package/json_results_generator.py:
(JSONResultsGenerator.generate_json_output): Return a boolean indicating whether the generation
had succeeded or not.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163134 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Remove now-empty ScriptController::setCaptureCallStackForUncaughtExceptions
https://bugs.webkit.org/show_bug.cgi?id=127964

Patch by Joseph Pecoraro <pecoraro@apple.com> on 2014-01-30
Reviewed by Timothy Hatcher.

Remove empty function. It was only needed by v8 at one point.

* bindings/js/ScriptController.h:
* bindings/js/ScriptController.cpp:
Remove empty function.

* inspector/InspectorConsoleAgent.h:
* inspector/InspectorConsoleAgent.cpp:
(WebCore::InspectorConsoleAgent::enable):
(WebCore::InspectorConsoleAgent::disable):
Remove callers and related tracking state.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163135 268f45cc-cd09-0410-ab3c-d52691b4dbfc
The test server build fixes.

* TestResultServer/model/jsonresults.py:
(JsonResults.merge):
* TestResultServer/static-dashboards/flakiness_dashboard.js:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@163136 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Add a webView:didFailProvisionalNavigation:withError: delegate method
https://bugs.webkit.org/show_bug.cgi?id=127968

Reviewed by Dan Bernstein.

Source/WebKit2:

* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFailProvisionalLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):

Tools:

* TestWebKitAPI/Tests/WebKit2Cocoa/Navigation.mm:
(-[DidFailProvisionalNavigationDelegate webView:didStartProvisionalNavigation:]):
(-[DidFailProvisionalNavigationDelegate webView:didFailProvisionalNavigation:withError:]):
(TEST):

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