Add SPI for image controls and service controls preferences.
<rdar://problem/17292209> and https://bugs.webkit.org/show_bug.cgi?id=133820

Reviewed by Anders Carlsson.

* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetServiceControlsEnabled):
(WKPreferencesGetServiceControlsEnabled):
(WKPreferencesSetImageControlsEnabled):
(WKPreferencesGetImageControlsEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169912 268f45cc-cd09-0410-ab3c-d52691b4dbfc
[iOS WK2] Fix crash on back/foward swipe
https://bugs.webkit.org/show_bug.cgi?id=133826
<rdar://problem/17032752>

Reviewed by Tim Horton.

AsyncScrollingCoordinator::frameViewForScrollingNode() would crash with a null root
state node, because HistoryController::restoreScrollPositionAndViewState() tried
to restore scroll position (via restoreViewState()) before hooking up the scrolling
coordinator.

Fix by doing the scrollingCoordinator->frameViewRootLayerDidChange() before
calling restoreViewState().

Also add a defensive null-check on the root state node in updateScrollPositionAfterAsyncScrollTimerFired().

* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreScrollPositionAndViewState):
* page/scrolling/AsyncScrollingCoordinator.cpp:
(WebCore::AsyncScrollingCoordinator::frameViewForScrollingNode):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169913 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Convert TileController and TileGrid from ObjC to C++
https://bugs.webkit.org/show_bug.cgi?id=133819
<rdar://problem/17291841>

Reviewed by Tim Horton.

Convert TileGrid.mm and TileController.mm into C++ implementations. This required creating a 'frameForLayer'
wrapper to call the 'frame' method of the CALayer object.

* WebCore.xcodeproj/project.pbxproj:
* platform/graphics/ca/mac/TileController.cpp: Copied from platform/graphics/ca/mac/TileController.mm.
(WebCore::TileController::blankPixelCountForTiles):
* platform/graphics/ca/mac/TileController.mm: Removed.
* platform/graphics/ca/mac/TileGrid.cpp: Copied from platform/graphics/ca/mac/TileGrid.mm.
* platform/graphics/ca/mac/TileGrid.h:
* platform/graphics/ca/mac/TileGrid.mm: Removed.
* platform/graphics/mac/WebLayer.h:
* platform/graphics/mac/WebLayer.mm:
(WebCore::frameForLayer): Wrapper function to hide ObjC call from C++ compilation unit.


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@169914 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Collect correct web timing data from CFNetwork.
https://bugs.webkit.org/show_bug.cgi?id=133824
<rdar://problem/17273654>

Patch by Alex Christensen <achristensen@webkit.org> on 2014-06-12
Reviewed by Simon Fraser.

Covered by existing web timing tests.

* platform/network/mac/ResourceHandleMac.mm:
(WebCore::ResourceHandle::getConnectionTimingData):
Use _kCFNTimingDataFetchStart as the reference start time key.

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

* loader/HistoryController.cpp:
(WebCore::HistoryController::restoreScrollPositionAndViewState):

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