Remove platform #ifdefs from WebDataSourcePrivate.h
https://bugs.webkit.org/show_bug.cgi?id=123120
<rdar://problem/15275533>

Reviewed by Anders Carlsson.

* WebView/WebDataSource.mm:
(-[WebDataSource _setAllowToBeMemoryMapped]): Define empty implementation when building without
disk image cache enabled.
(-[WebDataSource setDataSourceDelegate:]): Ditto.
(-[WebDataSource dataSourceDelegate]): Return nullptr when building without disk image cache
enabled on iOS.
* WebView/WebDataSourcePrivate.h: Removed platform #ifdefs added in
<http://trac.webkit.org/changeset/156918> (https://bugs.webkit.org/show_bug.cgi?id=121985)

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157753 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Try to fix the Mac 32-bit build.

* UIProcess/API/mac/WKBrowsingContextController.h:
* UIProcess/API/mac/WKBrowsingContextController.mm:



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157754 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Mark classes JS{Context, ManagedValue, Value, VirtualMachine} as
available since iOS 7.0
https://bugs.webkit.org/show_bug.cgi?id=123122

Reviewed by Dan Bernstein.

* API/JSContext.h:
* API/JSManagedValue.h:
* API/JSValue.h:
* API/JSVirtualMachine.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157755 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Navigation policy callback not called when performing the same fragment navigation twice
https://bugs.webkit.org/show_bug.cgi?id=123121
<rdar://problem/15230466>

Reviewed by Beth Dakin.

Source/WebCore:

There's code in PolicyChecker::checkNavigationPolicy that will call the decision function right away
if the requests are equal, without consulting any policy client. Because of this, make sure to empty out
the last checked request of the document loader when doing a fragment navigation.

* loader/FrameLoader.cpp:
(WebCore::FrameLoader::loadURL):
(WebCore::FrameLoader::loadWithDocumentLoader):

Tools:

Add a test.

* TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:
* TestWebKitAPI/Tests/mac/FragmentNavigation.html: Added.
* TestWebKitAPI/Tests/mac/FragmentNavigation.mm: Added.
(+[WebKit1FragmentNavigationTestDelegate shared]):
(-[WebKit1FragmentNavigationTestDelegate webView:runJavaScriptAlertPanelWithMessage:initiatedByFrame:]):
(-[WebKit1FragmentNavigationTestDelegate webView:decidePolicyForNavigationAction:request:frame:decisionListener:]):
(-[WebKit1FragmentNavigationTestDelegate webView:didFinishLoadForFrame:]):
(-[WebKit1FragmentNavigationTestDelegate _runNextTestWithWebView:]):
(TestWebKitAPI::TEST):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157756 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Upstream JSC Objective-C API compiler warning fixes
https://bugs.webkit.org/show_bug.cgi?id=123125

Reviewed by Mark Hahnenberg.

Based on a patch by Mark Hahnenberg.

* API/JSValue.mm:
(-[JSValue toPoint]): Cast to CGFloat to fix some compiler warnings about double narrowing to float.
(-[JSValue toSize]): Ditto.
* API/tests/testapi.mm: Changed a test that was failing due to overflow of 32-bit NSUInteger on armv7.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157761 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Web Inspector: [CSS Regions] Flows are not loading if you refresh the page several times
https://bugs.webkit.org/show_bug.cgi?id=123123

Reviewed by Joseph Pecoraro.

There was a typo in the code where an exception was thrown because "flowKey" was undefined.

* UserInterface/DOMTree.js:
(WebInspector.DOMTree.prototype._contentFlowListWasUpdated):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157762 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS] Upstream JSGlobalObject::shouldInterruptScriptBeforeTimeout()
https://bugs.webkit.org/show_bug.cgi?id=123045

Reviewed by Joseph Pecoraro.

Source/JavaScriptCore:

* jsc.cpp: Add function pointer for shouldInterruptScriptBeforeTimeout
to global method table.
* runtime/JSGlobalObject.cpp: Ditto.
* runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::shouldInterruptScriptBeforeTimeout): Added.

Source/WebCore:

* bindings/js/JSDOMWindowBase.cpp:
(WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage): Added.
(WebCore::JSDOMWindowBase::shouldInterruptScript): Extracted comment and assertion
about null Page object into WebCore::shouldInterruptScriptToPreventInfiniteRecursionWhenClosingPage()
so that it can be shared by both this function and JSDOMWindowBase::shouldInterruptScriptBeforeTimeout().
(WebCore::JSDOMWindowBase::shouldInterruptScriptBeforeTimeout):
* bindings/js/JSDOMWindowBase.h:
* bindings/js/JSWorkerGlobalScopeBase.cpp:
(WebCore::JSWorkerGlobalScopeBase::shouldInterruptScriptBeforeTimeout): Added.
* bindings/js/JSWorkerGlobalScopeBase.h:
* loader/EmptyClients.h: Added isStopping(). We'll land the iOS chrome client implementation
in a subsequent patch.
* page/ChromeClient.h: Added isStopping().

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157764 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Make IDBTransactionCoordinatorLevelDB cross platform
https://bugs.webkit.org/show_bug.cgi?id=123124

Enthusiastically reviewed by Tim Horton.

* CMakeLists.txt:
* GNUmakefile.list.am:
* WebCore.xcodeproj/project.pbxproj:

Make more methods pure virtual in the interface:
* Modules/indexeddb/IDBTransactionBackendInterface.h:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.cpp:
* Modules/indexeddb/leveldb/IDBTransactionBackendLevelDB.h:

Update the name of the class, and use IDBTransactionBackendInterface instead of IDBTransactionBackendLeveDB:
* Modules/indexeddb/IDBTransactionCoordinator.cpp: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.cpp.
(WebCore::IDBTransactionCoordinator::create):
(WebCore::IDBTransactionCoordinator::IDBTransactionCoordinator):
(WebCore::IDBTransactionCoordinator::~IDBTransactionCoordinator):
(WebCore::IDBTransactionCoordinator::didCreateTransaction):
(WebCore::IDBTransactionCoordinator::didStartTransaction):
(WebCore::IDBTransactionCoordinator::didFinishTransaction):
(WebCore::IDBTransactionCoordinator::isActive):
(WebCore::IDBTransactionCoordinator::processStartedTransactions):
(WebCore::doScopesOverlap):
(WebCore::IDBTransactionCoordinator::canRunTransaction):
* Modules/indexeddb/IDBTransactionCoordinator.h: Renamed from Source/WebCore/Modules/indexeddb/leveldb/IDBTransactionCoordinatorLevelDB.h.

Update the name of the class elsewhere:
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.cpp:
(WebCore::IDBDatabaseBackendLevelDB::IDBDatabaseBackendLevelDB):
* Modules/indexeddb/leveldb/IDBDatabaseBackendLevelDB.h:
(WebCore::IDBDatabaseBackendLevelDB::transactionCoordinator):
* Modules/indexeddb/leveldb/IDBFactoryBackendLevelDB.cpp:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@157766 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Bad cast with toRenderBoxModelObject in RenderBlock::updateFirstLetter()
https://bugs.webkit.org/show_bug.cgi?id=123013

Reviewed by Andreas Kling.

No new tests because this was reported by Google ClusterFuzz.
https://codereview.chromium.org/25713009/

There is a case that toRenderBoxModelObject causes a crash in RenderBlock::updateFirstLetter()
due to bad cast, so we need to check whether the RenderObject is a RenderBoxModelObject
by running isBoxModelObject() before calling toRenderBoxModelObject.

* rendering/RenderBlock.cpp:
(WebCore::RenderBlock::updateFirstLetter):


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