ChangeLog-2014-10-07 [plain text]
2014-10-07 Chris Dumez <cdumez@apple.com>
Unreviewed iOS build fix after r174400.
Missing explicit WebKit:: namespace.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLoadForMainFrame]):
(-[WKWebView _restorePageStateToExposedRect:scale:]):
(-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
2014-10-07 Christophe Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for RenderText / RenderTextFragment
https://bugs.webkit.org/show_bug.cgi?id=137476
Reviewed by Darin Adler.
Use is<>() / downcast<>() for RenderText / RenderTextFragment.
* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::WebRenderObject):
2014-10-07 Christophe Dumez <cdumez@apple.com>
[WK2] Use is<>() / downcast<>() for DrawingAreaProxy subclasses
https://bugs.webkit.org/show_bug.cgi?id=137477
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for DrawingAreaProxy subclasses.
* Shared/cf/KeyedDecoder.cpp:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLoadForMainFrame]):
(-[WKWebView _restorePageStateToExposedRect:scale:]):
(-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
* UIProcess/DrawingAreaProxy.h:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::layerTreeHost):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects):
(WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
* UIProcess/mac/LegacySessionStateCoding.cpp:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
2014-10-06 Vivek Galatage <vivek.vg@samsung.com>
Remove unused warning in WebPageOverlay
https://bugs.webkit.org/show_bug.cgi?id=137444
Reviewed by Darin Adler.
Commenting the unused parameter to supress the warning.
* WebProcess/WebPage/WebPageOverlay.h:
(WebKit::WebPageOverlay::Client::copyAccessibilityAttributeStringValueForPoint):
(WebKit::WebPageOverlay::Client::copyAccessibilityAttributeBoolValueForPoint):
2014-10-06 Ada Chan <adachan@apple.com>
Call WKPageUIClient::isPlayingAudioDidChange() whenever audio starts/stops playing on a page.
https://bugs.webkit.org/show_bug.cgi?id=137050
Reviewed by Anders Carlsson.
Implement WebChromeClient::isPlayingAudioDidChange() which sends the new isPlayingAudio state
over to the UI process. WebPageProxy caches the isPlayingAudio state, and when that changes,
it calls WKPageUIClient::isPlayingAudioDidChange().
* UIProcess/API/APIUIClient.h:
(API::UIClient::isPlayingAudioDidChange):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::isPlayingAudioDidChange):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isPlayingAudio):
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::isPlayingAudioDidChange):
* WebProcess/WebCoreSupport/WebChromeClient.h:
2014-10-06 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Restore previous scroll position using restoreViewState()
https://bugs.webkit.org/show_bug.cgi?id=136999
Reviewed by Benjamin Poulain.
There are duplicating code paths to restore previous scroll position and scale factor in
HistoryController::restoreScrollPositionAndViewState. EFL port has processed the two code paths.
It causes wrong rendering update or scroll position change when previous page's scroll position
is restored. Thus EFL port begins to use restoreViewState() to restore scroll position and scale factor.
This patch is first step to support it.
Additionally EFL port has supported to use ScrollingCoordinatorCoordinatedGraphics::requestScrollPositionUpdate()
since r173785. So EFL port can use the requestScrollPositionUpdate() to restore scroll position on previous page
instead of delegatedScrollRequested(). However setScrollPosition() can't be used there for now, because iOS port
should call it when delegatesScrolling is disabled. On the other hand, EFL port supports it only when delegatesScrolling
is enabled.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::saveViewStateToItem):
Move iOS saveViewStateToItem() to common place in order to share iOS implementation with EFL port.
(WebKit::WebFrameLoaderClient::restoreViewState):
EFL begins to share restoreViewState() of iOS, thus move iOS restoreViewState() to common place.
* WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
(WebKit::WebFrameLoaderClient::saveViewStateToItem): Deleted.
(WebKit::WebFrameLoaderClient::restoreViewState): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::WebPage::restorePageState):
Call scalePage() to update previous scaleFactor and scrollPosition of historyItem both to WebProcess and UIProcess.
(WebKit::WebPage::savePageState):
2014-10-06 Chris Dumez <cdumez@apple.com>
[Mac] We are spending too much time serializing ProtectionSpace objects
https://bugs.webkit.org/show_bug.cgi?id=137367
Reviewed by Dan Bernstein.
When profiling the load of nytimes.com, I noticed that we were spending
a lot of CPU time serializing ProtectionSpace objects (in particular
the NSURLProtectionSpace platform data):
- 5.6% of CPU time for Network Process
- 2.5% of CPU time for WebProcess
Serializing an NSURLProtectionSpace seems to be costly due to server
trust verification. We do this for every sub-resource load over HTTPS
due to the canAuthenticateAgainstProtectionSpace() callback for server
trust validation, from the NetworkProcess to the WebProcess and then to
the UIProcess.
This patch adds a WKContextSetCanHandleHTTPSServerTrustEvaluation(bool)
WK2 private API that the client can call to indicate that it cannot
handle HTTPS server trust evaluation and that it is thus unnecessary to
call the canAuthenticateAgainstProtectionSpace() callback for such
evaluations. This reduces the amount of IPC between the process and
thus the number of times we have to serialize the ProtectionSpace.
In the case of the nytimes.com load, there is no longer any
ProtectionSpace serialization happening as
canAuthenticateAgainstProtectionSpace() was only called for HTTPS
server trust evaluation.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::NetworkProcess):
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::setCanHandleHTTPSServerTrustEvaluation):
* NetworkProcess/NetworkProcess.h:
(WebKit::NetworkProcess::canHandleHTTPSServerTrustEvaluation):
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextSetCanHandleHTTPSServerTrustEvaluation):
* UIProcess/API/C/WKContextPrivate.h:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setCanHandleHTTPSServerTrustEvaluation:]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::ensureNetworkProcess):
(WebKit::WebContext::setCanHandleHTTPSServerTrustEvaluation):
* UIProcess/WebContext.h:
2014-10-06 Simon Fraser <simon.fraser@apple.com>
Don't attempt to paint into zero-sized backing store
https://bugs.webkit.org/show_bug.cgi?id=137465
Reviewed by Tim Horton.
Page scale could cause the backing store for a small composited element to become empty,
in which case we'd try to allocate, and paint into a graphics context with no surface
behind it.
Fix by bailing from RemoteLayerBackingStore::display() when checking the backing store
size after accounting for scale.
* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::backingStoreSize):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
(WebKit::RemoteLayerBackingStore::display):
2014-10-06 Christophe Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for ScrollingTree subclasses
https://bugs.webkit.org/show_bug.cgi?id=137449
Reviewed by Ryosuke Niwa.
Use is<>() / downcast<>() for ScrollingTree subclasses.
* UIProcess/Scrolling/RemoteScrollingTree.h:
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::addScrollingTreeForPage):
2014-10-05 Christophe Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for ScrollingCoordinator / ScrollingStateNode subclasses
https://bugs.webkit.org/show_bug.cgi?id=137440
Reviewed by Ryosuke Niwa.
Use is<>() / downcast<>() for ScrollingCoordinator / ScrollingStateNode subclasses.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::RemoteScrollingTreeTextStream::dump):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::addScrollingTreeForPage):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
2014-10-05 Ryuan Choi <ryuan.choi@gmail.com>
[EFL] Introduce EWebKit_Extension
https://bugs.webkit.org/show_bug.cgi?id=134921
Reviewed by Gyuyoung Kim.
EWebKit2 does not provide the functionality to extend WebProcess.
Although there is ewk_context_new_with_injected_bundle_path() in ewebkit2 APIs,
application developers can not make bundle object without touching WK APIs
which ewebkit2 does not expose.
This patch introduces EWebKit_Extension, basic structure for the extension of WebProcess.
* PlatformEfl.cmake:
Added files for the EWebKit_Extension and install them properly.
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
(bundlePathForExtension):
(EwkContext::create):
(EwkContext::getInjectedBundleInitializationUserData):
(EwkContext::setMessageFromInjectedBundleCallback):
(ewk_context_new_with_extensions_path):
Deleted because ewebkit2 does not have a way to make injected bundle.
Instead, Ewk_Extension will cover the same functionalities.
(ewk_context_new_with_injected_bundle_path): Deleted.
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
(EwkContext::extensionsPath):
* UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp: Removed.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
(EWK2UnitTest::EWK2UnitTestEnvironment::extensionSample):
(EWK2UnitTest::EWK2UnitTestEnvironment::injectedBundleSample): Renamed injectedBundleSample to extensionSample.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
* UIProcess/API/efl/tests/extensions/extension_sample.cpp: Copied from Source/WebKit2/UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp.
* UIProcess/API/efl/tests/test_ewk2_context.cpp: Renamed ewk_context_new_with_injected_bundle_path to ewk_context_new_with_extensions_path.
(TEST_F):
* WebProcess/InjectedBundle/API/efl/EWebKit_Extension.h: Added.
* WebProcess/InjectedBundle/API/efl/ewk_extension.cpp: Added.
(EwkExtension::append):
(EwkExtension::remove):
(ewk_extension_client_add):
(ewk_extension_client_del):
* WebProcess/InjectedBundle/API/efl/ewk_extension.h: Added.
* WebProcess/InjectedBundle/API/efl/ewk_extension_private.h: Added.
(EwkExtension::EwkExtension):
(EwkExtension::~EwkExtension):
* WebProcess/efl/ExtensionManagerEfl.cpp: Added.
(WebKit::ExtensionManagerEfl::shared):
(WebKit::ExtensionManagerEfl::ExtensionManagerEfl):
(WebKit::ExtensionManagerEfl::initialize):
* WebProcess/efl/ExtensionManagerEfl.h: Added.
* WebProcess/efl/WebInjectedBundleMainEfl.cpp: Added.
(WKBundleInitialize):
* efl/ewebkit2-extension.pc.in: Added.
2014-10-05 Lorenzo Tilve <ltilve@igalia.com>
[GTK] Fix build when DRAG_SUPPORT is disabled
https://bugs.webkit.org/show_bug.cgi?id=137361
Reviewed by Carlos Garcia Campos.
Flag out unbuildable code without DRAG_SUPPORT.
* Shared/gtk/ArgumentCodersGtk.cpp:
* Shared/gtk/ArgumentCodersGtk.h:
* UIProcess/API/gtk/PageClientImpl.cpp:
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
* UIProcess/PageClient.h:
2014-10-05 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] The new web inspector can't be docked again once undocked
https://bugs.webkit.org/show_bug.cgi?id=121544
Reviewed by Martin Robinson.
Use a GtkHeaderBar for the inspector window to add dock buttons
when building with GTK+ >= 3.10.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::WebInspectorProxy):
* UIProcess/WebInspectorProxy.h:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::dockButtonClicked):
(WebKit::WebInspectorProxy::createInspectorWindow):
(WebKit::WebInspectorProxy::updateInspectorWindowTitle):
(WebKit::WebInspectorProxy::platformInspectedURLChanged):
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged):
2014-10-04 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Add missing inspector files to compilation.
* PlatformGTK.cmake: Add javascript sources in
WebInspectorUI/UserInterface/External/Esprima to the list of
inspector files.
2014-10-03 Anders Carlsson <andersca@apple.com>
Remove a workaround for a bug that's been fixed
https://bugs.webkit.org/show_bug.cgi?id=137411
Reviewed by Dan Bernstein.
* mac/rewrite-availability-macros.sh:
2014-10-03 Jer Noble <jer.noble@apple.com>
Revert an accidental change introduced by r173318.
Rubber-stamped by Tim Horton.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::suspendPainting):
(WebKit::TiledCoreAnimationDrawingArea::resumePainting):
2014-10-03 Tim Horton <timothy_horton@apple.com>
WKWebView snapshot of Daring Fireball has the wrong color in the obscured inset
https://bugs.webkit.org/show_bug.cgi?id=137383
<rdar://problem/18535439>
Reviewed by Sam Weinig.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotAtSize):
Use documentBackgroundColor instead of baseBackgroundColor if backgroundShouldExtendBeyondPage is set.
2014-10-03 Andy Estes <aestes@apple.com>
[iOS] Highlight clicked links in WKPDFView
https://bugs.webkit.org/show_bug.cgi?id=137400
Reviewed by Tim Horton.
Show a _UIHighlightView on top of clicked links for 200 ms before starting the navigation. This matches the behavior of UIWebPDFView.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _createHighlightViewWithFrame:]): Created a _UIHighlightView with a color and border radius matching the values used by UIWebPDFView.
(-[WKPDFView annotation:wasTouchedAtPoint:controller:]): Displayed the highlight, then removed it after the navigation began.
2014-10-03 Csaba Osztrogonác <ossy@webkit.org>
[GTK] URTBF after r174231.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(webkit_web_page_get_dom_document):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::didInstallPageOverlay): Deleted.
(WebKit::DrawingAreaImpl::didUninstallPageOverlay): Deleted.
(WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay): Deleted.
(WebKit::DrawingAreaImpl::setPageOverlayOpacity): Deleted.
* WebProcess/WebPage/DrawingAreaImpl.h:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::createPageOverlayLayer):
(WebKit::LayerTreeHostGtk::destroyPageOverlayLayer):
(WebKit::LayerTreeHostGtk::didInstallPageOverlay): Deleted.
(WebKit::LayerTreeHostGtk::didUninstallPageOverlay): Deleted.
(WebKit::LayerTreeHostGtk::setPageOverlayNeedsDisplay): Deleted.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2014-10-03 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Fix build break since r174231 and r174256
https://bugs.webkit.org/show_bug.cgi?id=137384
Unreviewed, EFL build fix.
r174231 and r174256 didn't consider EFL port and CoordinatedGraphics area.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
(WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
* WebProcess/WebPage/TapHighlightController.cpp:
(WebKit::TapHighlightController::highlight):
(WebKit::TapHighlightController::hideHighlight):
* WebProcess/WebPage/TapHighlightController.h: Add WebCore:: namespace prefix to PageOverlay argument type.
2014-10-02 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r174231 to fix non Apple builds.
* WebProcess/WebPage/WebPage.h:
2014-10-02 Andy Estes <aestes@apple.com>
[iOS] Create an SPI wrapper for _UIHighlightView and use it in WKContentView
https://bugs.webkit.org/show_bug.cgi?id=137370
Reviewed by Tim Horton.
* UIProcess/ios/WKContentViewInteraction.mm: Included <WebCore/_UIHighlightViewSPI.h> instead of <UIKit/_UIHighlightView.h>.
2014-10-02 Andy Estes <aestes@apple.com>
Fix the iOS build.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::blurAssistedNode):
(WebKit::WebPage::setAssistedNodeValue):
(WebKit::WebPage::setAssistedNodeValueAsNumber):
(WebKit::WebPage::setAssistedNodeSelectedIndex):
2014-10-02 Andy Estes <aestes@apple.com>
[iOS] Teach WKPDFView to navigate to pageNumber links
https://bugs.webkit.org/show_bug.cgi?id=137358
Reviewed by Tim Horton.
Treat PDF pageNumber annotations as if they were fragment navigations in an HTML document. For a given page
number N, create a fragment called "#pageN" and tell WebKit to navigate to it. By doing this we create history
entries for each pageNumber navigation and allow for proper back/forward. When navigating to a page, reset to
the initial scale factor and scroll to the beginning of the Nth page.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _zoomToPoint:atScale:animated:]): Added an animated parameter. If animated is NO, use a duration of 0.
(-[WKWebView _zoomToRect:atScale:origin:animated:]): Added an animated parameter and passed it to _zoomToPoint:atScale:animated:.
(-[WKWebView _zoomOutWithOrigin:animated:]): Ditto.
(-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]): Called _zoomToRect:atScale:origin:animated:,
setting animated to YES.
(-[WKWebView _didSameDocumentNavigationForMainFrame:]): Called web_didSameDocumentNavigation: on _customContentView.
(-[WKWebView _zoomToPoint:atScale:]): Deleted.
(-[WKWebView _zoomToRect:atScale:origin:]): Deleted.
(-[WKWebView _zoomOutWithOrigin:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/Cocoa/WKWebViewContentProvider.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame): Called _didSameDocumentNavigationForMainFrame on m_webView.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _zoomOutWithOrigin:]): Called _zoomOutWithOrigin:animated: on m_webView, setting animated to YES.
* UIProcess/ios/WKPDFPageNumberIndicator.h:
* UIProcess/ios/WKPDFPageNumberIndicator.mm:
(-[WKPDFPageNumberIndicator hide]): Added a method to hide the page number indicator.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_setContentProviderData:suggestedFilename:]): Added a FIXME for restoring scroll position and page scale when loading from the back/forward list.
(-[WKPDFView scrollViewDidScroll:]): Stopped showing the page number indicator if a same-document navigation is occurring (to match UIWebPDFView).
(-[WKPDFView _updatePageNumberIndicator]): Ditto.
(-[WKPDFView web_didSameDocumentNavigation:]):
(-[WKPDFView _resetZoomAnimated:]): For same-document navigations of type kWKSameDocumentNavigationSessionStatePop, extracted the page index from the URL fragment
identifier, hid the page number indicator, reset the zoom (without an animation to match UIWebPDFView), and scrolled to the beginning of the given page.
(-[WKPDFView resetZoom:]): Called _resetZoomAnimated:, setting animated to YES.
(-[WKPDFView annotation:wasTouchedAtPoint:controller:]): If there is a non-zero pageNumber in the link annotation, construct a "#pageN" fragment and navigate to it.
2014-10-02 Tim Horton <timothy_horton@apple.com>
Move PageOverlay[Controller] to WebCore
https://bugs.webkit.org/show_bug.cgi?id=137164
<rdar://problem/18508258>
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* WebKit2.xcodeproj/project.pbxproj:
Make the appropriate build system changes.
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
Make WKBundlePageOverlayRef map to WebPageOverlay instead of PageOverlay.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageInstallPageOverlay):
(WKBundlePageUninstallPageOverlay):
(WKBundlePageInstallPageOverlayWithAnimation):
(WKBundlePageUninstallPageOverlayWithAnimation):
Forward PageOverlay installation/uninstallation to WebCore.
* WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.cpp:
(WKBundlePageOverlayGetTypeID):
(WKBundlePageOverlayCreate):
(WKBundlePageOverlaySetAccessibilityClient):
Use WebPageOverlay instead of PageOverlay, and references instead of pointers.
We forward client callbacks through from PageOverlay::Client to WebPageOverlay::Client.
(PageOverlayClientImpl::copyAccessibilityAttributeValue):
(PageOverlayClientImpl::copyAccessibilityAttributeNames):
Convert from wtf types to WebKit2 types.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::graphicsLayerFactory):
If we don't have a drawing area, don't dereference it!
(WebKit::WebChromeClient::attachViewOverlayGraphicsLayer):
Forward attachViewOverlayGraphicsLayer to the DrawingArea.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebPage/FindController.cpp:
* WebProcess/WebPage/FindController.h:
* WebProcess/WebPage/ios/FindControllerIOS.mm:
* WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
* WebProcess/WebPage/ServicesOverlayController.h:
Mechanical changes to adopt to the fact that PageOverlay is in WebCore now.
* WebProcess/WebPage/LayerTreeHost.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
Remove support for WebKit2-based page overlays.
Return MainFrame instead of Frame from mainFrame().
* WebProcess/WebPage/WebPageOverlay.cpp: Added.
* WebProcess/WebPage/WebPageOverlay.h: Added.
(WebKit::WebPageOverlay::create):
(WebKit::WebPageOverlay::WebPageOverlay):
(WebKit::WebPageOverlay::~WebPageOverlay):
(WebKit::WebPageOverlay::setNeedsDisplay):
(WebKit::WebPageOverlay::clear):
(WebKit::WebPageOverlay::pageOverlayDestroyed):
(WebKit::WebPageOverlay::willMoveToPage):
(WebKit::WebPageOverlay::didMoveToPage):
(WebKit::WebPageOverlay::drawRect):
(WebKit::WebPageOverlay::mouseEvent):
(WebKit::WebPageOverlay::didScrollFrame):
(WebKit::WebPageOverlay::copyAccessibilityAttributeStringValueForPoint):
(WebKit::WebPageOverlay::copyAccessibilityAttributeBoolValueForPoint):
(WebKit::WebPageOverlay::copyAccessibilityAttributeNames):
WebPageOverlay exists to be our API object, but forwards everything
to its WebCore::PageOverlay, and implements WebCore::PageOverlay::Client, and
forwards client callbacks to its WebPageOverlay::Client (which
WKBundlePageOverlay implements).
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
Forward the three AX properties that PageOverlays are ever queried for
to the appropriate PageOverlayController function.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::updateRootLayers):
Factor updateRootLayers out of setRootCompositingLayer.
(WebKit::RemoteLayerTreeDrawingArea::attachViewOverlayGraphicsLayer):
If we attach/detach the view-relative page overlay root layer,
reattach the root compositing layer's children.
(WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
Ditto for the root compositing layer.
(WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
(WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
Informing PageOverlayController of exposed rect/document size changes is now
WebCore's job.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::updateRootLayers):
Factor updateRootLayers out of setRootCompositingLayer.
(WebKit::TiledCoreAnimationDrawingArea::attachViewOverlayGraphicsLayer):
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
Make use of updateRootLayers when we attach/detach root compositing layer/view overlay layer.
(WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
Informing PageOverlayController of exposed rect/document size changes is now
WebCore's job.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::attachViewOverlayGraphicsLayer):
* Shared/WebRenderLayer.cpp:
* Shared/WebRenderObject.cpp:
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
* WebProcess/WebProcess.cpp:
Include MainFrame.h because WebPage::mainFrame returns a MainFrame now.
2014-10-02 Jeff Miller <jeffm@apple.com>
WKDownloadCopyRequest() returns 0 until the download starts
https://bugs.webkit.org/show_bug.cgi?id=137322
Reviewed by Anders Carlsson.
The m_request ivar in DownloadProxy was only being initialized when didStart() was called after the
download starts. Since clients have access to the ResourceRequest when the DownloadProxy is created,
there's no reason not to pass that along to DownloadProxy::create() so it can be returned if
WKDownloadCopyRequest() is called before didStart().
* UIProcess/Downloads/DownloadProxy.cpp:
(WebKit::DownloadProxy::create):
Add ResourceRequest parameter, and pass it to DownloadProxy constructor.
(WebKit::DownloadProxy::DownloadProxy):
Initialize m_request.
* UIProcess/Downloads/DownloadProxy.h:
Add ResourceRequest parameter to create() and constructor.
* UIProcess/Downloads/DownloadProxyMap.cpp:
(WebKit::DownloadProxyMap::createDownloadProxy):
Add ResourceRequest parameter and pass it to DownloadProxy::create().
* UIProcess/Downloads/DownloadProxyMap.h:
Add ResourceRequest parameter to createDownloadProxy().
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::createDownloadProxy):
Add ResourceRequest parameter and pass it to DownloadProxy::create().
* UIProcess/Network/NetworkProcessProxy.h:
Add ResourceRequest parameter to createDownloadProxy().
* UIProcess/WebContext.cpp:
(WebKit::WebContext::download):
Pass ResourceRequest to createDownloadProxy().
(WebKit::WebContext::createDownloadProxy):
Add ResourceRequest parameter and pass it to createDownloadProxy() functions.
* UIProcess/WebContext.h:
Add ResourceRequest parameter to createDownloadProxy().
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision):
Pass m_decidePolicyForResponseRequest to WebContext::createDownloadProxy().
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::createDownloadProxy):
Add ResourceRequest parameter and pass it to DownloadProxyMap::create().
* UIProcess/WebProcessProxy.h:
Add ResourceRequest parameter to createDownloadProxy().
2014-10-01 Christophe Dumez <cdumez@apple.com>
Have is<>(T*) function do a null check on the pointer argument
https://bugs.webkit.org/show_bug.cgi?id=137333
Reviewed by Gavin Barraclough.
Have is<>(T*) function do a null check on the argument instead of a
simple assertion. This makes sense for 2 reasons:
1. It is more consistent with downcast<>(T*), which will succeed even
if the argument is a nullptr.
2. It simplifies the code a bit as it gets rid of a lot of explicit
null checks.
* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::WebRenderObject):
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::mediaType):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handleEvent):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedElementChanged):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::textFieldDidBeginEditing):
(WebKit::WebEditorClient::textFieldDidEndEditing):
(WebKit::WebEditorClient::textDidChangeInTextField):
(WebKit::WebEditorClient::textDidChangeInTextArea):
(WebKit::WebEditorClient::doTextFieldCommandFromEvent):
(WebKit::WebEditorClient::textWillBeDeletedInTextField):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::containsAnyFormElements):
(WebKit::WebFrame::containsAnyFormControls):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::pdfDocumentForPrintingFrame):
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::blurAssistedNode):
(WebKit::WebPage::setAssistedNodeValue):
(WebKit::WebPage::setAssistedNodeValueAsNumber):
(WebKit::WebPage::setAssistedNodeSelectedIndex):
(WebKit::WebPage::getPositionInformation):
(WebKit::WebPage::performActionOnElement):
(WebKit::isAssistableNode):
(WebKit::WebPage::getAssistedNodeInformation):
2014-10-02 Daniel Bates <dabates@apple.com>
Clean up: Move XPC forward declarations in JavaScriptCore to WTF SPI wrapper header
https://bugs.webkit.org/show_bug.cgi?id=137277
Reviewed by Alexey Proskuryakov.
Use wtf/spi/darwin/XPCSPI.h instead of including the corresponding XPC headers/
forward declaring XPC functions.
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2014-10-02 Ryuan Choi <ryuan.choi@gmail.com>
[EFL][WK2] test_ewk2_view is failed
https://bugs.webkit.org/show_bug.cgi?id=132983
Reviewed by Gyuyoung Kim.
Enable test_ewk2_view because test cases of test_ewk2_view are passed except
for few tests related to device_pixel_ratio.
This patch adds macro guard for ailed test case to CAIRO_SURFACE_SET_DEVICE_SCALE macro.
In addition, fixed some warnings while building with test_ewk2_view.
* PlatformEfl.cmake: Enables test_ewk2_view.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Added const keyword for argument to fix the warnings.
(EWK2UnitTest::EWK2UnitTestBase::keyDown):
(EWK2UnitTest::EWK2UnitTestBase::keyUp):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
2014-10-02 JinYoung Hur <hurims@gmail.com>
Minor bug in UIClient::exceededDatabaseQuota()
https://bugs.webkit.org/show_bug.cgi?id=137213
Reviewed by Anders Carlsson.
Make sure not to call the completion handler twice if exceededDatabaseQuota is null.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
2014-10-01 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/137308> WebKit should build on OS X Yosemite for external users
Reviewed by Dan Bernstein.
* Configurations/DebugRelease.xcconfig: Use libWebKitSystemInterfaceYosemite.a on Yosemite.
2014-10-01 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r174180, r174183, and r174186.
https://bugs.webkit.org/show_bug.cgi?id=137320
Broke the Mac MountainLion build. Will investigate offline.
(Requested by dydz on #webkit).
Reverted changesets:
"Clean up: Move XPC forward declarations in JavaScriptCore to
WTF SPI wrapper header"
https://bugs.webkit.org/show_bug.cgi?id=137277
http://trac.webkit.org/changeset/174180
"Attempt to fix the build after
<https://trac.webkit.org/changeset/174180>"
https://bugs.webkit.org/show_bug.cgi?id=137277
http://trac.webkit.org/changeset/174183
"Another attempt to fix the Mac build after
<https://trac.webkit.org/changeset/174180>"
https://bugs.webkit.org/show_bug.cgi?id=137277
http://trac.webkit.org/changeset/174186
2014-10-01 Daniel Bates <dabates@apple.com>
Clean up: Move XPC forward declarations in JavaScriptCore to WTF SPI wrapper header
https://bugs.webkit.org/show_bug.cgi?id=137277
Reviewed by Alexey Proskuryakov.
Use wtf/spi/darwin/XPCSPI.h instead of including the corresponding XPC headers/
forward declaring XPC functions.
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
2014-10-01 Christophe Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Event classes
https://bugs.webkit.org/show_bug.cgi?id=137284
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for Event classes.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::handleEvent):
2014-10-01 Joseph Pecoraro <pecoraro@apple.com>
[iOS] <select> with <optgroup> may change initial selected option when assisted
https://bugs.webkit.org/show_bug.cgi?id=137261
Reviewed by Enrica Casucci.
The initial assignemnt of _singleSelectionIndex was calculating the
item index (ignoring groups) instead of the row index (affected by
groups!). Thus if there was N groups we would select the row N
before the real selection.
Also avoid this entirely if this is a multiple selection picker.
This logic is only needed for single selection with groups.
* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKMultipleSelectPicker initWithView:]):
2014-09-30 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL] Rename TEST_THEME_DIR macro
https://bugs.webkit.org/show_bug.cgi?id=137244
Reviewed by Csaba Osztrogonác.
TEST_THEME_DIR is to get a path for default theme though, it has used TEST_ prefix.
DEFAULT_THEME_DIR is better than it.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.cpp:
(EWK2UnitTest::EWK2UnitTestEnvironment::defaultTheme):
(EWK2UnitTest::EWK2UnitTestEnvironment::pathForTheme):
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
2014-09-30 Christophe Dumez <cdumez@apple.com>
Generalize is<>() / downcast<>() support to all types
https://bugs.webkit.org/show_bug.cgi?id=137243
Reviewed by Benjamin Poulain.
Generalize is<>() / downcast<>() support to all types, not just Nodes.
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
(-[WKDOMDocument createElement:]):
(-[WKDOMDocument createTextNode:]):
(-[WKDOMDocument body]):
* WebProcess/InjectedBundle/API/mac/WKDOMText.mm:
(-[WKDOMText data]):
(-[WKDOMText setData:]):
2014-09-30 Chris Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Element
https://bugs.webkit.org/show_bug.cgi?id=137241
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for Element instead of isElementNode() /
toElement().
* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::WebRenderObject):
* WebProcess/InjectedBundle/API/mac/WKDOMElement.mm:
(-[WKDOMElement hasAttribute:]):
(-[WKDOMElement getAttribute:]):
(-[WKDOMElement setAttribute:value:]):
(-[WKDOMElement tagName]):
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::elementBounds):
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::mediaType):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
(WebKit::WebPage::blurAssistedNode):
(WebKit::WebPage::getPositionInformation):
(WebKit::nextFocusableElement):
(WebKit::WebPage::elementDidFocus):
2014-09-30 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r173929): [GTK] TestInspector fails after r173929
https://bugs.webkit.org/show_bug.cgi?id=137247
Reviewed by Philippe Normand.
Add WebKitWebInspector:can-attach property to notify when the
inspector attach availability changes.
* UIProcess/API/C/gtk/WKInspectorClientGtk.h:
* UIProcess/API/gtk/WebKitWebInspector.cpp:
(webkit_web_inspector_class_init): Add WebKitWebInspector:can-attach property.
(didChangeAttachAvailability): Emit notify::can-attach.
(webkitWebInspectorCreate): Add implementation for didChangeAttachAvailability.
(webkit_web_inspector_get_can_attach): Return whether the inspector can be attached.
* UIProcess/API/gtk/WebKitWebInspector.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add index of new symbols in 2.8.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
* UIProcess/gtk/WebInspectorClientGtk.cpp:
(WebKit::WebInspectorClientGtk::didChangeAttachAvailability):
* UIProcess/gtk/WebInspectorClientGtk.h:
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): Notify the client.
2014-09-30 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] The remote web inspector shows the HTML content as plain text
https://bugs.webkit.org/show_bug.cgi?id=137250
Reviewed by Gustavo Noronha Silva.
Use GResource API directly to get the resource data, instead of
using the GFile API, and use g_content_type_guess() to get the
MIME Type.
* UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp:
(WebKit::WebInspectorServer::platformResourceForPath):
2014-09-30 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move GtkPopupMenu implementation to WebPopupMenuProxyGtk
https://bugs.webkit.org/show_bug.cgi?id=137193
Reviewed by Gustavo Noronha Silva.
GtkPopupMenu was in platform only to have a common implementation to
be shared with WebKit1. Now that it's only used by
WebPopupMenuProxyGtk in WebKit2, we can simplify the code by
merging the implementation directly into WebPopupMenuProxyGtk.
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp:
(WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk):
(WebKit::WebPopupMenuProxyGtk::~WebPopupMenuProxyGtk):
(WebKit::WebPopupMenuProxyGtk::populatePopupMenu):
(WebKit::WebPopupMenuProxyGtk::showPopupMenu):
(WebKit::WebPopupMenuProxyGtk::hidePopupMenu):
(WebKit::WebPopupMenuProxyGtk::typeAheadFind):
(WebKit::WebPopupMenuProxyGtk::resetTypeAheadFindState):
(WebKit::WebPopupMenuProxyGtk::selectItemCallback):
(WebKit::WebPopupMenuProxyGtk::keyPressEventCallback):
* UIProcess/gtk/WebPopupMenuProxyGtk.h:
(WebKit::WebPopupMenuProxyGtk::setCurrentlySelectedMenuItem):
2014-09-29 Christophe Dumez <cdumez@apple.com>
Use is<>() / downcast<>() for Document
https://bugs.webkit.org/show_bug.cgi?id=137221
Reviewed by Andreas Kling.
Use is<>() / downcast<>() for Document instead of isDocumentNode() /
toDocument().
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm:
(-[WKDOMDocument createElement:]):
(-[WKDOMDocument createTextNode:]):
(-[WKDOMDocument body]):
2014-09-29 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r174045.
https://bugs.webkit.org/show_bug.cgi?id=137231
Introduced a crash during page loading tests on Mac (Requested
by rniwa on #webkit).
Reverted changeset:
"Replace OSObjectPtr with RetainPtr/adoptOS"
https://bugs.webkit.org/show_bug.cgi?id=137158
http://trac.webkit.org/changeset/174045
2014-09-29 Anders Carlsson <andersca@apple.com>
Set the TBA versions based on the PLATFORM_NAME
https://bugs.webkit.org/show_bug.cgi?id=137226
Follow-up fix for <rdar://problem/17761459>.
Reviewed by Dan Bernstein.
* mac/rewrite-availability-macros.sh:
Turns out that MACOSX_DEPLOYMENT_TARGET is set even for iOS builds,
so set the versions based on the PLATFORM_NAME environment variable.
2014-09-29 Dan Bernstein <mitz@apple.com>
Build fix.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performActionOnElement):
2014-09-27 Andy Estes <aestes@apple.com>
[iOS] Add basic support for link navigation in WKPDFView
https://bugs.webkit.org/show_bug.cgi?id=137182
Reviewed by Tim Horton.
Teach WKPDFView to navigate to URLs when PDF link annotations are tapped.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::navigateToURLWithSimulatedClick): Sent Messages::WebPage::NavigateToURLWithSimulatedClick.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKPDFView.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _clearPages]): Removed self as the UIPDFAnnotationControllerDelegate.
(-[WKPDFView _revalidateViews]): Added self as the UIPDFAnnotationControllerDelegate.
(-[WKPDFView annotation:wasTouchedAtPoint:controller:]): Retrieved the URL from the touched annotation,
computed the touched point relative to the WKPDFView and to the screen, and called
navigateToURLWithSimulatedClick() after a 200 ms delay in order to show a soon-to-be-added tap highlight
(this value matches the delay in UIWebPDFView).
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::navigateToURLWithSimulatedClick): Created a fake single-click MouseEvent and called
FrameLoader::urlSelected(). Creating a mouse event ensures that the navigation appears as a
NavigationTypeLinkClicked in navigation policy delegates.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2014-09-29 Christophe Dumez <cdumez@apple.com>
Use the new is<>() / downcast<>() for Text Nodes
https://bugs.webkit.org/show_bug.cgi?id=137188
Reviewed by Darin Adler.
Use the new is<>() / downcast<>() functions for Text Nodes instead of
isText() / toText().
* WebProcess/InjectedBundle/API/mac/WKDOMText.mm:
(-[WKDOMText data]):
(-[WKDOMText setData:]):
2014-09-29 Christophe Dumez <cdumez@apple.com>
Make is<>() / downcast<>() work for HTMLDocument and its subclasses
https://bugs.webkit.org/show_bug.cgi?id=137169
Reviewed by Darin Adler.
Use is<>() / downcast<>() for HTMLDocument and its subclasses.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::pdfDocumentForPrintingFrame):
2014-09-29 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
Fix !ENABLE(INSPECTOR) build after r173929
https://bugs.webkit.org/show_bug.cgi?id=137210
Reviewed by Timothy Hatcher.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getLaunchOptions):
2014-09-29 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r172919): WebKitPluginProcess fails to scan GTK+2 plugins after r172919.
https://bugs.webkit.org/show_bug.cgi?id=137191
Reviewed by Philippe Normand.
In r172919 I moved the GTK+ symbols mix check earlier, before the
plugin is loaded and initialized. That made impossible to use the
GTK3 plugin process to scan gtk2 plugins, because we need to load
the plugin to get its metadata. But we don't need to initialize
the plugin to check if it requires GTK2, so we can do that check
in the UI process to decide which plugin process to use.
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin):
Remove the requires GTK2 check.
(WebKit::NetscapePluginModule::scanPlugin): Don't write
requires-gtk2 to stdout.
* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
(WebKit::pluginRequiresGtk2): Helper function to check if the
given plugin path requires GTK2.
(WebKit::PluginProcessProxy::scanPlugin): Check if the plugin path
requires GTK2 and use WebKitPluginProcess2 in such case, or return
early if GTK2 plugins are not enabled. Log error messages when
something fails scanning the plugin to make it easiert to debug
problems in the future.
2014-09-28 Myles C. Maxfield <mmaxfield@apple.com>
Replace wkGetGlyphsForCharacters() with CGFontGetGlyphsForUnichars()
https://bugs.webkit.org/show_bug.cgi?id=137197
Reviewed by Alexey Proskuryakov.
No new tests because there is no behavior change.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
* mac/WebKit2.order:
2014-09-28 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Use std::unique_ptr for ContextMenuController
https://bugs.webkit.org/show_bug.cgi?id=137178
Reviewed by Darin Adler.
Switch to using std::unique_ptr instead of OwnPtr and PassOwnPtr
for ContextMenuController class. Inherited class is changed by this use as well.
* WebProcess/WebCoreSupport/WebContextMenuClient.cpp:
(WebKit::WebContextMenuClient::customizeMenu):
* WebProcess/WebCoreSupport/WebContextMenuClient.h:
2014-09-28 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Move ColorInputType class to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=137173
Reviewed by Darin Adler.
Replace uses of PassOwnPtr in code under ColorInputType class with std::unique_ptr.
Child classes follow this change as well.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createColorChooser):
* WebProcess/WebCoreSupport/WebChromeClient.h:
2014-09-26 Sam Weinig <sam@webkit.org>
Replace OSObjectPtr with RetainPtr/adoptOS
https://bugs.webkit.org/show_bug.cgi?id=137158
Reviewed by Dan Bernstein.
* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
(DatabaseServiceInitializer):
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
(NetworkServiceInitializer):
* Platform/IPC/Connection.h:
(IPC::Connection::Identifier::Identifier):
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::ConnectionTerminationWatchdog::createConnectionTerminationWatchdog):
(IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
* PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
(WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
(PluginServiceInitializer):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
(WebKit::XPCServiceInitializer):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::checkEntitlements):
(WebKit::XPCServiceInitializerDelegate::hasEntitlement):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
(WebKit::XPCServiceEventHandler):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceEventHandler):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
(WebKit::connectToReExecService):
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):
2014-09-26 Christophe Dumez <cdumez@apple.com>
Stop using legacy NODE_TYPE_CASTS() macro for HTML Elements
https://bugs.webkit.org/show_bug.cgi?id=137137
Reviewed by Benjamin Poulain.
Use is<>() / downcast<>() where appropriate.
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::value):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::initializePlugin):
(WebKit::PluginView::pluginSnapshotTimerFired):
(WebKit::PluginView::pluginDidReceiveUserInteraction):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performActionOnElement):
2014-09-26 Anders Carlsson <andersca@apple.com>
Add API for loading local files
https://bugs.webkit.org/show_bug.cgi?id=137153
rdar://problem/17761459
Reviewed by Oliver Hunt.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadFileURL:allowingReadAccessToURL:]):
Load the file, wrapping the navigation ID in a WKNavigation using createLoadRequestNavigation.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadFile):
* UIProcess/WebPageProxy.h:
Return the navigation ID (or 0 if the navigation failed).
2014-09-26 Timothy Hatcher <timothy@apple.com>
Add WKInspector back function stubs that went missing from r173929.
My changes to WKDeprecatedFunctions.cpp got lost in the shuffle.
* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKInspectorIsDebuggingJavaScript):
(WKInspectorToggleJavaScriptDebugging):
(WKInspectorIsProfilingJavaScript):
(WKInspectorToggleJavaScriptProfiling):
2014-09-26 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r173929): Web inspector doesn't work after r173929 when INSPECTOR_SERVER is enabled
https://bugs.webkit.org/show_bug.cgi?id=137150
Reviewed by Timothy Hatcher.
The inspector doesn't show any information about the inspected
page because it's sending messages to a remote frontend that is
not running.
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::WebInspector): Initialize m_remoteFrontendConnected.
(WebKit::WebInspector::sendMessageToFrontend): Send
SendMessageToRemoteFrontend message to the UI process when remote
frontend is connected, or SendMessageToFrontend message to
WebInspectorUI otherwise.
(WebKit::WebInspector::remoteFrontendConnected): Set m_remoteFrontendConnected to true.
(WebKit::WebInspector::remoteFrontendDisconnected): Set m_remoteFrontendConnected to false.
* WebProcess/WebPage/WebInspector.h:
2014-09-26 Alberto Garcia <berto@igalia.com>
[GTK] Don't include full path names in WebKitEnumTypes.h
https://bugs.webkit.org/show_bug.cgi?id=137148
Reviewed by Carlos Garcia Campos.
Replace @filename@ with @basename@ in the template, since we don't
want to include the full path name in the generated header.
* UIProcess/API/gtk/WebKitEnumTypes.h.template:
2014-09-25 Yusuke Suzuki <utatane.tea@gmail.com>
Clean up unused parameter warnings
https://bugs.webkit.org/show_bug.cgi?id=137107
Reviewed by Benjamin Poulain.
* Scripts/webkit/messages.py:
(generate_message_handler):
Sometimes generated code doesn't use `connection` parameter. So `UNUSED_PARAM(connection)` is necessary.
* UIProcess/API/C/WKPage.cpp:
(WKPageIsPlayingAudio):
2014-09-25 Christophe Dumez <cdumez@apple.com>
Use is<HTML*Element>() instead of isHTML*Element() - Part 2
https://bugs.webkit.org/show_bug.cgi?id=137103
Reviewed by Benjamin Poulain.
Use is<HTML*Element>() instead of isHTML*Element().
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::containsAnyFormElements):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):
2014-09-25 Anders Carlsson <andersca@apple.com>
Expand WK_MAC_TBA and WK_IOS_TBA to the current deployment target version (or NA).
https://bugs.webkit.org/show_bug.cgi?id=137127
Part of rdar://problem/17761459.
Reviewed by Dan Bernstein.
* mac/rewrite-availability-macros.sh:
2014-09-25 Tim Horton <timothy_horton@apple.com>
CommitLayerTree decode fails in 32-bit apps on 64-bit devices (TransformationMatrix alignment differs)
https://bugs.webkit.org/show_bug.cgi?id=136444
<rdar://problem/17952526>
Reviewed by Anders Carlsson.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<TransformationMatrix>::encode):
(IPC::ArgumentCoder<TransformationMatrix>::decode):
Stop using SimpleArgumentCoder to encode/decode TransformationMatrix,
because the alignment of TransformationMatrix differs between architectures,
and there's no guarantee that both sides of a connection are the same architecture.
2014-09-25 Alberto Garcia <berto@igalia.com>
Unreviewed typo fix.
* UIProcess/API/C/soup/WKContextSoup.cpp:
2014-09-25 Shivakumar JM <shiva.jm@samsung.com>
[WebKit2] Fix build warning in WebKit2/WebProcess module.
https://bugs.webkit.org/show_bug.cgi?id=137105
Reviewed by Csaba Osztrogonác.
Fix build warning by removing unused parameter names
* WebProcess/WebPage/WebInspector.h:
(WebKit::WebInspector::didReceiveInvalidMessage):
* WebProcess/WebPage/WebInspectorUI.h:
(WebKit::WebInspectorUI::didReceiveInvalidMessage):
2014-09-24 Sam Weinig <sam@webkit.org>
Remove incorrect use of the BKSProcessAssertionAllowSuspendOnSleep flag for process suspension in iOS WebKit2
<rdar://problem/18400566>
https://bugs.webkit.org/show_bug.cgi?id=137077
Reviewed by Anders Carlsson.
* UIProcess/ios/ProcessAssertionIOS.mm:
Remove use of the BKSProcessAssertionAllowSuspendOnSleep which does not do what we expect, and instead
causes processes to be suspended "forever" after sleep.
2014-09-24 Christophe Dumez <cdumez@apple.com>
Use is<HTML*Element>() instead of isHTML*Element() - Part 1
https://bugs.webkit.org/show_bug.cgi?id=137068
Reviewed by Ryosuke Niwa.
Start using is<HTML*Element>() instead of isHTML*Element().
Remaining usages will be updated in a follow-up patch to
reduce the size of the change.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled):
(WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::isTextField):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedElementChanged):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::textFieldDidBeginEditing):
(WebKit::WebEditorClient::textFieldDidEndEditing):
(WebKit::WebEditorClient::textDidChangeInTextField):
(WebKit::WebEditorClient::textDidChangeInTextArea):
(WebKit::WebEditorClient::doTextFieldCommandFromEvent):
(WebKit::WebEditorClient::textWillBeDeletedInTextField):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::containsAnyFormControls):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setAssistedNodeValue):
(WebKit::WebPage::setAssistedNodeValueAsNumber):
(WebKit::WebPage::setAssistedNodeSelectedIndex):
2014-09-23 Ada Chan <adachan@apple.com>
Add stub implementation of WKPageIsPlayingAudio().
https://bugs.webkit.org/show_bug.cgi?id=137044
Reviewed by Anders Carlsson.
Also add an isPlayingAudioDidChange callback to WKPageUIClient.
* UIProcess/API/C/WKPage.cpp:
(WKPageIsPlayingAudio):
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/API/C/WKPageUIClient.h:
2014-09-21 Timothy Hatcher <timothy@apple.com>
Make the Web Inspector use a separate web process.
https://bugs.webkit.org/show_bug.cgi?id=135120
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* DerivedSources.make:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* WebKit2.xcodeproj/project.pbxproj:
Added new WebInspectorUI files and removed WebInspectorFrontendClient.cpp.
* Shared/APIObject.h: Added BundleInspectorUI.
* Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm:
(WebKit::ChildProcessMainDelegate::getExtraInitializationData):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::getExtraInitializationData):
Add support for "inspector-process" data, a boolean that is used by
WebProcess::initializeProcessName.
* UIProcess/API/C/WKInspector.cpp:
(WKInspectorIsDebuggingJavaScript):
(WKInspectorToggleJavaScriptDebugging):
(WKInspectorIsProfilingJavaScript):
(WKInspectorToggleJavaScriptProfiling):
* UIProcess/API/C/WKInspector.h:
Stub out functions we don't support but need to keep for nightly compatibility.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorPageGroups::createInspectorPageGroup):
(WebKit::WebInspectorProxy::WebInspectorProxy):
(WebKit::WebInspectorProxy::invalidate):
(WebKit::WebInspectorProxy::connect):
(WebKit::WebInspectorProxy::showConsole):
(WebKit::WebInspectorProxy::showResources):
(WebKit::WebInspectorProxy::showMainResourceForFrame):
(WebKit::WebInspectorProxy::attach):
(WebKit::WebInspectorProxy::detach):
(WebKit::WebInspectorProxy::inspectorContext):
(WebKit::WebInspectorProxy::dispatchMessageFromRemoteFrontend):
(WebKit::WebInspectorProxy::eagerlyCreateInspectorPage):
(WebKit::WebInspectorProxy::createInspectorPage):
(WebKit::WebInspectorProxy::open):
(WebKit::WebInspectorProxy::didClose):
(WebKit::WebInspectorProxy::attachAvailabilityChanged):
* UIProcess/WebInspectorProxy.h:
(WebKit::WebInspectorProxy::isConnected):
(WebKit::WebInspectorProxy::canAttach):
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformAttach):
* UIProcess/mac/WebInspectorProxyMac.mm:
(-[WKWebInspectorProxyObjCAdapter close]):
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
(WebKit::WebInspectorProxy::platformDidClose):
(WebKit::WebInspectorProxy::platformHide):
(WebKit::WebInspectorProxy::platformSave):
(WebKit::WebInspectorProxy::platformAppend):
(WebKit::WebInspectorProxy::platformAttach):
Changed how the Inspector page is created by making it in a new WebContext for
the Inspector. This removes us from the main process pool and guarantees no process
sharing for our user interface. Also send new WebInspectorUI messages to the Inspector
page and not the inspected page when appropriate.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::getLaunchOptions): Add "inspector-process" to extraInitializationData
if the context is the Inspector context. This is used by WebProcess::initializeProcessName.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::openInspectorFrontend):
(WebKit::WebInspectorClient::closeInspectorFrontend):
(WebKit::WebInspectorClient::bringFrontendToFront):
* WebProcess/WebCoreSupport/WebInspectorClient.h:
Remove the InspectorFrontendChannel class from WebInspectorClient and clean up a little.
InspectorFrontendChannel implementation moved to WebInspector.
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: Removed. Superseded by WebInspectorUI.
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::create):
(WebKit::WebInspector::WebInspector):
(WebKit::WebInspector::createInspectorPage):
(WebKit::WebInspector::closeFrontend):
(WebKit::WebInspector::openInNewTab):
(WebKit::WebInspector::showConsole):
(WebKit::WebInspector::showResources):
(WebKit::WebInspector::showMainResourceForFrame):
(WebKit::WebInspector::startPageProfiling):
(WebKit::WebInspector::stopPageProfiling):
(WebKit::WebInspector::canAttachWindow):
(WebKit::WebInspector::updateDockingAvailability):
(WebKit::WebInspector::sendMessageToBackend):
(WebKit::WebInspector::sendMessageToFrontend):
(WebKit::WebInspector::remoteFrontendConnected):
(WebKit::WebInspector::remoteFrontendDisconnected):
* WebProcess/WebPage/WebInspector.h:
(WebKit::WebInspector::didClose):
(WebKit::WebInspector::didReceiveInvalidMessage):
(WebKit::WebInspector::setAttached):
* WebProcess/WebPage/WebInspector.messages.in:
Stop taking an optional InspectorFrontendChannel and inherit it instead. Create a connection that
can be passed to the other web process for WebInspectorUI to use. Stop referencing Inspector's page
directly, since it is in another process now.
* WebProcess/WebPage/WebInspectorUI.cpp: Added.
(WebKit::WebInspectorUI::create):
(WebKit::WebInspectorUI::WebInspectorUI):
(WebKit::WebInspectorUI::establishConnection):
(WebKit::WebInspectorUI::windowObjectCleared):
(WebKit::WebInspectorUI::frontendLoaded):
(WebKit::WebInspectorUI::moveWindowBy):
(WebKit::WebInspectorUI::bringToFront):
(WebKit::WebInspectorUI::closeWindow):
(WebKit::WebInspectorUI::requestSetDockSide):
(WebKit::WebInspectorUI::setDockSide):
(WebKit::WebInspectorUI::changeAttachedWindowHeight):
(WebKit::WebInspectorUI::changeAttachedWindowWidth):
(WebKit::WebInspectorUI::setToolbarHeight):
(WebKit::WebInspectorUI::openInNewTab):
(WebKit::WebInspectorUI::save):
(WebKit::WebInspectorUI::append):
(WebKit::WebInspectorUI::inspectedURLChanged):
(WebKit::WebInspectorUI::showConsole):
(WebKit::WebInspectorUI::showResources):
(WebKit::WebInspectorUI::showMainResourceForFrame):
(WebKit::WebInspectorUI::startPageProfiling):
(WebKit::WebInspectorUI::stopPageProfiling):
(WebKit::WebInspectorUI::didSave):
(WebKit::WebInspectorUI::didAppend):
(WebKit::WebInspectorUI::sendMessageToFrontend):
(WebKit::WebInspectorUI::sendMessageToBackend):
(WebKit::WebInspectorUI::evaluateCommandOnLoad):
(WebKit::WebInspectorUI::evaluateExpressionOnLoad):
(WebKit::WebInspectorUI::evaluatePendingExpressions):
* WebProcess/WebPage/WebInspectorUI.h: Added.
(WebKit::WebInspectorUI::page):
(WebKit::WebInspectorUI::didClose):
(WebKit::WebInspectorUI::didReceiveInvalidMessage):
(WebKit::WebInspectorUI::attachedBottom):
(WebKit::WebInspectorUI::attachedRight):
(WebKit::WebInspectorUI::detached):
(WebKit::WebInspectorUI::evaluateCommandOnLoad):
* WebProcess/WebPage/WebInspectorUI.messages.in: Added.
* WebProcess/WebPage/efl/WebInspectorUIEfl.cpp: Added.
(WebKit::WebInspectorUI::canSave):
(WebKit::WebInspectorUI::localizedStringsURL):
* WebProcess/WebPage/gtk/WebInspectorUIGtk.cpp: Added.
(WebKit::WebInspectorUI::canSave):
(WebKit::WebInspectorUI::localizedStringsURL):
* WebProcess/WebPage/mac/WebInspectorUIMac.mm: Added.
(WebKit::WebInspectorUI::canSave):
(WebKit::WebInspectorUI::localizedStringsURL):
Implement the InspectorFrontendClient and handle a connection to the inspected page's WebInspector.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::~WebPage):
(WebKit::WebPage::inspector):
(WebKit::WebPage::inspectorUI):
(WebKit::WebPage::didReceiveMessage):
Setup as a listener for WebInspectorUI messages.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::isInspectorPage): It is an Inspector page if we have a m_inspectorUI.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::initializeProcessName):
Name the process "%@ Web Inspector" if it is an Inspector content process. Processes in that
context are not shared with multiple pages.
2014-09-24 Dean Jackson <dino@apple.com>
Add a deprecated stub for WKPreferencesSetMultithreadedWebGLEnabled (and Get)
https://bugs.webkit.org/show_bug.cgi?id=137071
Reviewed by Brent Fulgham.
Put in stubs for WKPreferencesSetMultithreadedWebGLEnabled and
WKPreferencesGetMultithreadedWebGLEnabled. These were removed in
r173776 but are still needed for nightly builds to link
(or will be once Yosemite nightlies are available).
* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKPreferencesSetMultithreadedWebGLEnabled):
(WKPreferencesGetMultithreadedWebGLEnabled):
2014-09-24 Daniel Bates <dabates@apple.com>
[iOS] Fix the iOS build after <http://trac.webkit.org/changeset/173893>
(https://bugs.webkit.org/show_bug.cgi?id=137007)
Add closing parenthesis characters that were inadvertently removed in <http://trac.webkit.org/changeset/173893>.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setAssistedNodeSelectedIndex):
(WebKit::WebPage::getAssistedNodeInformation):
2014-09-23 Christophe Dumez <cdumez@apple.com>
Unreviewed build fix after r173893.
Partial revert of r173893 to fix debug builds.
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::value):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::initializePlugin):
(WebKit::PluginView::pluginSnapshotTimerFired):
(WebKit::PluginView::pluginDidReceiveUserInteraction):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
2014-09-23 Chris Dumez <cdumez@apple.com>
Use downcast<HTML*Element>() instead of toHTML*Element()
https://bugs.webkit.org/show_bug.cgi?id=137007
Reviewed by Benjamin Poulain.
Use downcast<HTML*Element>() instead of toHTML*Element().
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementValueForUser):
(WebKit::InjectedBundleNodeHandle::isHTMLInputElementAutofilled):
(WebKit::InjectedBundleNodeHandle::setHTMLInputElementAutofilled):
(WebKit::InjectedBundleNodeHandle::htmlInputElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::htmlTextAreaElementLastChangeWasUserEdit):
(WebKit::InjectedBundleNodeHandle::isTextField):
(WebKit::InjectedBundleNodeHandle::htmlTableCellElementCellAbove):
(WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
* WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm:
(WebKit::PDFPluginChoiceAnnotation::commit):
* WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm:
(WebKit::PDFPluginTextAnnotation::createAnnotationElement):
(WebKit::PDFPluginTextAnnotation::value):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::initializePlugin):
(WebKit::PluginView::pluginSnapshotTimerFired):
(WebKit::PluginView::pluginDidReceiveUserInteraction):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedElementChanged):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::textFieldDidBeginEditing):
(WebKit::WebEditorClient::textFieldDidEndEditing):
(WebKit::WebEditorClient::textDidChangeInTextField):
(WebKit::WebEditorClient::textDidChangeInTextArea):
(WebKit::WebEditorClient::doTextFieldCommandFromEvent):
(WebKit::WebEditorClient::textWillBeDeletedInTextField):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setAssistedNodeValue):
(WebKit::WebPage::setAssistedNodeValueAsNumber):
(WebKit::WebPage::setAssistedNodeSelectedIndex):
(WebKit::isAssistableNode): Deleted.
(WebKit::WebPage::getAssistedNodeInformation): Deleted.
2014-09-23 Jer Noble <jer.noble@apple.com>
REGRESSION (r171197): Clip's content is drawn behind Safari window when entering Full Screen youtube html5 first time
https://bugs.webkit.org/show_bug.cgi?id=137029
Reviewed by Brent Fulgham.
In r171197, we ordered the full screen window on- and off-screen so that the fullscreen animation went to the
correct screen, which introduced a subtle glitch at the beginning and end of an animation. For entering, ensure
that the window is scaled to its starting size before ordering on-screen. For exiting, order the window off-
screen before resetting its clipping rect.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]):
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2014-09-23 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Should be able to attach a debugger to a JSContext before anything is executed
https://bugs.webkit.org/show_bug.cgi?id=136893
Reviewed by Timothy Hatcher.
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::remoteFrontendConnected):
2014-09-22 Daniel Bates <dabates@apple.com>
[Cocoa] Add UI delegate callback when window.close() is called
https://bugs.webkit.org/show_bug.cgi?id=137008
<rdar://problem/17801001>
Reviewed by Anders Carlsson.
Implement support infrastructure to notify the UI client when window.close() is called.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added method declaration for -_webViewClose:.
* UIProcess/Cocoa/UIDelegate.h: Added override declaration for API::UIClient::close().
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate): Wire up delegate method to Objective-C selector, -[WKUIDelegatePrivate _webViewClose:].
(WebKit::UIDelegate::UIClient::close): Added; turns around and calls -[WKUIDelegatePrivate _webViewClose:] (if applicable).
2014-09-21 Chris Dumez <cdumez@apple.com>
Generate Element casting helper functions
https://bugs.webkit.org/show_bug.cgi?id=136839
Reviewed by Darin Adler.
Use JSXXX::toWrapped() instead of toXXX() function.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::getOrCreate):
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::getOrCreate):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::webNotificationID):
2014-09-19 Ryosuke Niwa <rniwa@webkit.org>
WebContent crash in WebKit::WebPage::expandedRangeFromHandle
https://bugs.webkit.org/show_bug.cgi?id=136969
Reviewed by David Kilzer.
The crash was caused by m_currentBlockSelection and frame.selection().selection().toNormalizedRange()
both being null and the subsequent lines of code assuming currentRange to be not null.
Replace the assertion by an early exit since the range could be null here.
In the future, we should figure out if there are other things we need to do in addition
to checking the nullity when this race condition is hit.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
2014-09-19 Dean Jackson <dino@apple.com>
Multithreaded WebGL is a bad idea - remove it
https://bugs.webkit.org/show_bug.cgi?id=136964
<rdar://problem/18399858>
Reviewed by Brent Fulgham.
Remove the setting to allow multithreaded WebGL.
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetMultithreadedWebGLEnabled): Deleted.
(WKPreferencesGetMultithreadedWebGLEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-09-19 Simon Fraser <simon.fraser@apple.com>
Provide a default argument for the most commonly used HitTestRequest variant
https://bugs.webkit.org/show_bug.cgi?id=136653
Reviewed by Darin Adler.
Make the default HitTestRequest flags be ReadOnly | Active | DisallowShadowContent
and change call sites using the default flags to use a HitTestRequest temporary.
* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
2014-09-19 Daniel Bates <dabates@apple.com>
Always assume internal SDK when building configuration Production
https://bugs.webkit.org/show_bug.cgi?id=136925
<rdar://problem/18362399>
Reviewed by Dan Bernstein.
As a side effect of this change we will always enable ENABLE_TOUCH_EVENTS, ENABLE_IOS_{GESTURE, TOUCH}_EVENTS,
and ENABLE_XSLT when either building configuration Production or building with the Internal SDK.
* Configurations/Base.xcconfig:
2014-09-19 Simon Fraser <simon.fraser@apple.com>
Fix the Mac Mavericks build. Only iOS cares about fencing.
* Platform/mac/LayerHostingContext.h:
* Platform/mac/LayerHostingContext.mm:
2014-09-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Missing inspector files in the tarball
https://bugs.webkit.org/show_bug.cgi?id=136952
Reviewed by Gustavo Noronha Silva.
* PlatformGTK.cmake: Use APPEND instead of GLOB to add individual
and generated files to the list of inspector files.
2014-09-19 Carlos Garcia Campos <cgarcia@igalia.com>
Webkitgtk 2.5.3: tarball contains APPLE LICENSE file - stating not distributable
https://bugs.webkit.org/show_bug.cgi?id=136632
Reviewed by Gustavo Noronha Silva.
* PlatformGTK.cmake: Use only the icons from the gtk directory since they are free.
2014-09-19 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] generate-inspector-gresource-manifest.py should receive the list of files from the makefile
https://bugs.webkit.org/show_bug.cgi?id=136943
Reviewed by Philippe Normand.
* PlatformGTK.cmake: Fix the inspector file list and pass it to
the generate-inspector-gresource-manifest.py script.
2014-09-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Dot not allow to create delete-on-destroy GMainLoopSources
https://bugs.webkit.org/show_bug.cgi?id=136923
Reviewed by Gustavo Noronha Silva.
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::dispatch): Use GMainLoopSource::scheduleAndDeleteOnDestroy().
(WorkQueue::dispatchAfter): Use GMainLoopSource::scheduleAfterDelayAndDeleteOnDestroy().
2014-09-18 Ryuan Choi <ryuan.choi@gmail.com>
[EFL][CoordinatedGraphics] Remove setBackgroundColor message
https://bugs.webkit.org/show_bug.cgi?id=136824
Reviewed by Gyuyoung Kim.
CoordinatedGraphics used setBackgroundColor() to draw the background of contents
although tiles are not ready.
This patch removes setBackgroundColor() and uses pageExtendedBackgroundColor()
which provides similar functionality.
* UIProcess/API/efl/EwkView.cpp:
Enables or disables WKPageSetBackgroundExtendsBeyondPage to use pageExtendedBackgroundColor()
(EwkView::EwkView):
(EwkView::setBackgroundColor):
* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
(WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext): Passed pageExtendedBackgroundColor.
(WebCore::CoordinatedGraphicsScene::paintToGraphicsContext): Ditto.
(WebCore::CoordinatedGraphicsScene::setBackgroundColor): Deleted.
* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h:
(WebCore::CoordinatedGraphicsScene::setDrawsBackground): Deleted.
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::setBackgroundColor): Deleted.
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::paintToCurrentGLContext):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::pageExtendedBackgroundColorDidChange):
Refactored to use const reference for the Color parameter.
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebViewEfl::paintToCairoSurface):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
Added PLATFORM(EFL) to pass PageExtendedBackgroundColorDidChange message.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::setBackgroundColor): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::setBackgroundColor): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mainFrameDidLayout):
2014-09-18 Jeremy Jones <jeremyj@apple.com>
Improve fullscreen video rotation animation.
https://bugs.webkit.org/show_bug.cgi?id=136870
Reviewed by Simon Fraser.
Remove WKCAContext from LayerHostingContext and use a fencePort to synchronize animation between processes.
* Platform/mac/LayerHostingContext.h: add setFencePort. Remove WKCAContext.
* Platform/mac/LayerHostingContext.mm:
(WebKit::LayerHostingContext::createForPort): Remove WKCAContext.
(WebKit::LayerHostingContext::createForExternalHostingProcess): ditto
(WebKit::LayerHostingContext::setRootLayer): ditto
(WebKit::LayerHostingContext::rootLayer): ditto
(WebKit::LayerHostingContext::contextID): ditto
(WebKit::LayerHostingContext::invalidate): ditto
(WebKit::LayerHostingContext::setColorSpace): ditto
(WebKit::LayerHostingContext::colorSpace): ditto
(WebKit::LayerHostingContext::setFencePort): added
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.messages.in: add fence port parameter
* WebProcess/ios/WebVideoFullscreenManager.mm: ditto
(WebKit::WebVideoFullscreenManager::didSetupFullscreen): ditto
(WebKit::WebVideoFullscreenManager::setVideoLayerFrameFenced): ditto
2014-09-18 Simon Fraser <simon.fraser@apple.com>
Avoid divide by zero when we get an empty rect while snapshotting a node
https://bugs.webkit.org/show_bug.cgi?id=136932
rdar://problem/18383473
Reviewed by Dean Jackson.
renderer()->paintingRootRect() can return an empty rect for some inline configurations,
for example an <a> containing a floated <span>
When this occurs, avoid a divide by zero and return a null snapshot image.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotNode):
2014-09-18 Carlos Garcia Campos <cgarcia@igalia.com>
Incorrect pending API request URL when loading an HTML string
https://bugs.webkit.org/show_bug.cgi?id=136913
Reviewed by Alexey Proskuryakov.
Use about:blank as pending API request URL when the given base URL
is empty, otherwise use the given base URL.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadHTMLString):
2014-09-18 Tim Horton <timothy_horton@apple.com>
Occasional unreproducible crashes in MessageReceiverMap::dispatchMessage
https://bugs.webkit.org/show_bug.cgi?id=136909
<rdar://problem/17758325>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView dealloc]):
We're seeing some messages dispatched on the WebContext that end up
attempting to call dispatchMessage on a freed MessageReceiver.
The WKRemoteObjectRegistry message receiver is added to the WebContext
message receiver map, but never removed, despite the WebContext easily
outliving the WKWebView that owns the remote object registry.
2014-09-17 Rohit Kumar <kumar.rohit@samsung.com>
[EFL][WK2] Use the correct enum for control key in Ewk_Event_Modifiers in ewk_navigation_policy_decision.cpp
https://bugs.webkit.org/show_bug.cgi?id=136740
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
(toEwkEventModifiers):
2014-09-17 Daniel Bates <dabates@apple.com>
Unreviewed, rolling out r173695.
Broke building third-party Legacy WebKit apps; will
investigate offline
Reverted changeset:
"[iOS] Make WebCore build with public iOS SDK"
https://bugs.webkit.org/show_bug.cgi?id=136487
http://trac.webkit.org/changeset/173695
2014-09-17 Simon Fraser <simon.fraser@apple.com>
Fix an issue that caused video playback to not always use high resolution streams
https://bugs.webkit.org/show_bug.cgi?id=136879
rdar://problem/18316542
Reviewed by Eric Carlson.
The underlying video framework expects to be able to use -[CALayer convertRect:toLayer:nil] on
the video layer to obtain information about the display resolution of the video,
including the device scale factor. This doesn't work for layers in the web process,
which are remotely hosted into the UI process.
For now, use a workaround which involves putting a scale transform equivalent to
the device scale factor on the web process layer, and the inverse scale on the
hosting layer in the UI process.
We have to do this in two places, for in-page video, and for fullscreen video.
* Shared/mac/RemoteLayerTreeTransaction.h: Add hostingDeviceScaleFactor to the LayerCreation
properties.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties):
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(-[WKRemoteView initWithFrame:contextID:hostingDeviceScaleFactor:]): Set the inverse scale
transform on the layer.
(WebKit::RemoteLayerTreeHost::createLayer):
(-[WKRemoteView initWithFrame:contextID:]): Deleted.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID):
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
(WebKit::RemoteLayerTreeContext::deviceScaleFactor):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::layerWasCreated):
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
(WebKit::WebVideoFullscreenManager::didSetupFullscreen):
2014-09-17 Gavin Barraclough <baraclough@apple.com>
Aways have a PageThrottler (sometimes have a UserActivity::Impl)
https://bugs.webkit.org/show_bug.cgi?id=136892
Reviewed by Geoffrey Garen.
Some instances of Page have a PageThrottler to track activity on the Page, and some do not.
(Specifically, those created from WebPage in WK2 do, those related to WK1, SVG & inspector do not).
We do this for three reasons:
* We do not need to take AppNap assertions on WK1.
* Some Pages do not track their visibility correctly, and would always claim to be visible.
* Page VisibilityState is not set until after construction, so if we instantiate
Creating the entire PageThrottler lazily has the drawback that we have to check for its existence at
numerous points throughout the code, and we'll miss activity that occurs between the Page being created
& the PageThrottler added to it (really a theoretical problem right now, since they're currently always
created pretty much back to back).
Instead, Page should always have a PageThrottler, & instead make the UserActivity::Impl on the
PageThrottler be added later.
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::evaluate):
- createPageThrottler -> enablePageThrottler
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::mouseEvent):
(WebKit::WebPage::wheelEvent):
(WebKit::WebPage::keyEvent):
- Page::pageThrottler now returns a reference rather than a pointer
2014-09-17 Daniel Bates <dabates@apple.com>
[iOS] Make WebCore build with public iOS SDK
https://bugs.webkit.org/show_bug.cgi?id=136487
Reviewed by David Kilzer.
Update WebKit2 source files to include the wrapper SPI headers instead of the corresponding
actual SPI header(s).
* Platform/mac/SharedMemoryMac.cpp:
* Shared/ios/NativeWebTouchEventIOS.mm:
* Shared/mac/RemoteLayerBackingStore.mm:
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/ios/WKPDFPageNumberIndicator.mm:
* UIProcess/ios/WKScrollView.mm:
* UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm:
* WebProcess/WebPage/WebPage.cpp:
2014-09-17 Gavin Barraclough <barraclough@apple.com>
DOM timer throttling for hidden plugins
https://bugs.webkit.org/show_bug.cgi?id=136197
Reviewed by Geoff Garen & Andreas Kling.
For non-visible web pages we slow timers (since they can't be driving animations, etc).
We should do the same for plugins.
* PluginProcess/WebProcessConnection.cpp:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
- remove now redundant includes.
* WebProcess/Plugins/PluginView.h:
- audioHardwareActivity is now virtual, override.
2014-09-17 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebKitWebView::load-failed-with-tls-errors should receive the failing URI instead of a host
https://bugs.webkit.org/show_bug.cgi?id=136889
Reviewed by Gustavo Noronha Silva.
We were passing a host for two different reasons, first because
it's more convenient to add an exception with
webkit_web_context_allow_tls_certificate_for_host(), but also
because we were assuming the active URI is the failing URI in case
of failure. This assumption is correct because our current code
does that, but I'm not sure we are doing it on purpose. That
behaviour is not documented anywhere and it's not what WebKit2 does
internaly.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):
(webkitWebViewLoadFailedWithTLSErrors):
* UIProcess/API/gtk/WebKitWebView.h:
2014-09-16 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Fix layering violations in PasteboardGtk
https://bugs.webkit.org/show_bug.cgi?id=136802
Reviewed by Darin Adler.
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::WebEditorClient::updateGlobalSelection): Use new API to
update the global selection.
2014-09-16 Carlos Garcia Campos <cgarcia@igalia.com>
DragData should not depend on Clipboard, DocumentFragment, and Document
https://bugs.webkit.org/show_bug.cgi?id=21358
Reviewed by Darin Adler.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performDragControllerAction): Update to API
change in DragData::asURL().
2014-09-16 Daniel Bates <dabates@apple.com>
[iOS] Add iOS SDK name and version suffix to WebKitSystemInterface debug/release product name
https://bugs.webkit.org/show_bug.cgi?id=136862
Reviewed by David Kilzer.
* Configurations/DebugRelease.xcconfig:
2014-09-16 Enrica Casucci <enrica@apple.com>
Remove PLATFORM(IOS) from WebCore/editing (Part 3).
https://bugs.webkit.org/show_bug.cgi?id=136474
Reviewed by Benjamin Poulain.
This is the updated version of the patch that was landed in r173340.
This patch removes the use of PLATFORM(IOS) from TextAffinity.h
and removes the assumption that EAffinity values match NSSelectionAffinity
values. It also removes the includes in TextAffinity.h, creating the need to
include explicitly the files when necessary.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
2014-09-16 Dan Bernstein <mitz@apple.com>
Standardized the return type of a delegate method.
Rubber-stamped by Anders Carlsson.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Changed a return type from bool to BOOL.
2014-09-16 Tomas Popela <tpopela@redhat.com>
[GTK] Typo in webkit_security_manager_register_uri_scheme_as_empty_document documentation
https://bugs.webkit.org/show_bug.cgi?id=136852
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitSecurityManager.cpp:
2014-09-13 Gavin Barraclough <baraclough@apple.com>
Should call [BKSProcessAssertion invalidate]
https://bugs.webkit.org/show_bug.cgi?id=136804
<rdar://problem/17897780>
Reviewed by Darin Adler.
We should invalidate the process assertion before releasing it. Fortunately this is really easy,
since there is a simple 1:1 relationship with ProcessAssertion, with their lifetimes matching exactly.
* UIProcess/ProcessAssertion.cpp:
(WebKit::ProcessAssertion::~ProcessAssertion):
- no-op implementation.
* UIProcess/ProcessAssertion.h:
- added destructor.
* UIProcess/ios/ProcessAssertionIOS.mm:
(WebKit::ProcessAssertion::~ProcessAssertion):
- destructor invalidates the BKSProcessAssertion.
2014-09-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
REGRESSION(r170243): [EFL][WK2] Dirty image is shown when new page is loading on fixed layout
https://bugs.webkit.org/show_bug.cgi?id=136568
Reviewed by Csaba Osztrogonác.
r170243 landed wrong didCommitNewPage() since it always returns false. It cause that
PageViewportControllerClientEfl::didChangeVisibleContents() continues to draw dirty image on 0,0 coordinate.
This patch fixes the problem.
* UIProcess/API/efl/EwkView.h:
(EwkView::waitingForNewPage):
(EwkView::didCommitNewPage):
* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::didChangeVisibleContents):
2014-09-14 Chris Dumez <cdumez@apple.com>
Rename Node::childNodeCount() to countChildNodes() and avoid inefficient uses
https://bugs.webkit.org/show_bug.cgi?id=136789
Reviewed by Darin Adler.
Avoid calling slow Node::countChildNodes().
* WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp:
(WebKit::WebPage::findZoomableAreaForPoint):
Replace call to "node->parentNode()->childNodeCount() != 1" by
"!node->parentNode()->hasOneChild()" which is equivalent but more
efficient.
2014-09-10 Jon Honeycutt <jhoneycutt@apple.com>
Re-add the request autocomplete feature
<https://bugs.webkit.org/show_bug.cgi?id=136730>
This feature was rolled out in r148731 because it was only used by
Chromium. As we consider supporting this feature, roll it back in, but
leave it disabled.
This rolls out r148731 (which removed the feature) with small changes
needed to make the code build in ToT, to match modern style, to make
the tests run, and to remove unused code.
Reviewed by Andy Estes.
* Configurations/FeatureDefines.xcconfig:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didRequestAutocomplete):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2014-09-12 Tim Horton <timothy_horton@apple.com>
Swiping back from a Twitter image to Twitter flashes to the wrong position
https://bugs.webkit.org/show_bug.cgi?id=136798
<rdar://problem/18324338>
Reviewed by Darin Adler and Sam Weinig.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::didFinishLoadForMainFrame):
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
Add a 250ms repeating timer that we start in didFinishLoadForMainFrame
if we are for some reason still loading, and in didSameDocumentNavigationForMainFrame
unconditionally, to match behavior of the old swipe implementation.
Also, do the active gesture check in both of those places so that we don't
start the timer if we're in the middle of a live swipe or have already torn
down the snapshot (removeSwipeSnapshotAfterRepaint does this as well, so
this isn't really a behavior change).
(WebKit::ViewGestureController::activeLoadMonitoringTimerFired):
Every time the timer fires, check if we're still loading; if not,
tear down the swipe snapshot (after repainting).
(WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
Stop the active load monitoring timer.
2014-09-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r173575.
https://bugs.webkit.org/show_bug.cgi?id=136790
Failing tests (Requested by enrica on #webkit).
Reverted changeset:
"Remove PLATFORM(IOS) from WebCore/editing (Part 3)."
https://bugs.webkit.org/show_bug.cgi?id=136474
http://trac.webkit.org/changeset/173575
2014-09-12 Enrica Casucci <enrica@apple.com>
Remove PLATFORM(IOS) from WebCore/editing (Part 3).
https://bugs.webkit.org/show_bug.cgi?id=136474
Reviewed by Benjamin Poulain.
This is the updated version of the patch that was landed in r173340.
I changed the use of IntPoint to FloatPoint since it was causing tests
to fail.
This patch removes the use of PLATFORM(IOS) from TextAffinity.h
and removes the assumption that EAffinity values match NSSelectionAffinity
values. It also removes the includes in TextAffinity.h, creating the need to
include explicitly the files when necessary. It also removes the unnecessary
use of platform specific types, replacing them with WebCore types.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2014-09-12 Dan Bernstein <mitz@apple.com>
[Cocoa] Message generation scripts should be installed in WebKit.framework
https://bugs.webkit.org/show_bug.cgi?id=136771
Reviewed by Anders Carlsson.
* DerivedSources.make: Updated for rename of Scripts/webkit2 to Scripts/webkit.
* Scripts/generate-message-receiver.py:
(main): Updated for rename from webkit2 to webkit.
* Scripts/generate-messages-header.py:
(main): Ditto.
* Scripts/webkit: Renamed from Source/WebKit2/Scripts/webkit2.
* Scripts/webkit/messages.py: Updated for rename.
* Scripts/webkit/parser.py: Ditto.
* WebKit2.xcodeproj/project.pbxproj: Moved the Copy Message Generation Scripts build phase
from the WebKit2 target to the WebKit target and changed its destination to
WebKit.framework/PrivateHeaders/Scripts/webkit. Removed the Remove Compiled Python Files
build phase, since compiled files no longer get copied.
2014-09-12 Tim Horton <timothy_horton@apple.com>
Flash of page scrolled to wrong origin before restoring scroll position after swiping back to CNN front page from an article
https://bugs.webkit.org/show_bug.cgi?id=136788
<rdar://problem/18314597>
Reviewed by Sam Weinig.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
(WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
Always wait until didFinishLoadForMainFrame or didSameDocumentNavigationForMainFrame
before removing the snapshot, because otherwise we don't know if the scroll
position has been restored yet.
We should revisit this at some point, because it should be possible to
determine if the scroll position has been restored appropriately, but for
now it is safest to restore the antique behavior.
2014-09-12 Dan Bernstein <mitz@apple.com>
Build fix.
Reverted r173564.
* DerivedSources.make:
* Scripts/generate-message-receiver.py:
(main):
* Scripts/generate-messages-header.py:
(main):
* Scripts/webkit: Removed.
* Scripts/webkit/LegacyMessageReceiver-expected.cpp: Removed.
* Scripts/webkit/LegacyMessages-expected.h: Removed.
* Scripts/webkit/MessageReceiver-expected.cpp: Removed.
* Scripts/webkit/MessageReceiverSuperclass-expected.cpp: Removed.
* Scripts/webkit/Messages-expected.h: Removed.
* Scripts/webkit/MessagesSuperclass-expected.h: Removed.
* Scripts/webkit/__init__.py: Removed.
* Scripts/webkit/messages.py: Removed.
* Scripts/webkit/messages_unittest.py: Removed.
* Scripts/webkit/model.py: Removed.
* Scripts/webkit/parser.py: Removed.
* Scripts/webkit/test-legacy-messages.in: Removed.
* Scripts/webkit/test-messages.in: Removed.
* Scripts/webkit/test-superclass-messages.in: Removed.
* Scripts/webkit2: Copied from Scripts/webkit2.
* WebKit2.xcodeproj/project.pbxproj:
2014-09-11 Andy Estes <aestes@apple.com>
[WebKit2] WKImageCreateCGImage crashes when passed a null WKImage
https://bugs.webkit.org/show_bug.cgi?id=136768
Reviewed by Tim Horton.
WKImageCreateFromCGImage can return null, so it only seems fair that WKImageCreateCGImage should tolerate null.
* Shared/API/c/cg/WKImageCG.cpp:
(WKImageCreateCGImage):
2014-09-12 Dan Bernstein <mitz@apple.com>
[Cocoa] Message generation scripts should be installed in WebKit.framework
https://bugs.webkit.org/show_bug.cgi?id=136771
Reviewed by Anders Carlsson.
* DerivedSources.make: Updated for rename of Scripts/webkit2 to Scripts/webkit.
* Scripts/generate-message-receiver.py:
(main): Updated for rename from webkit2 to webkit.
* Scripts/generate-messages-header.py:
(main): Ditto.
* Scripts/webkit: Renamed from Source/WebKit2/Scripts/webkit2.
* Scripts/webkit/messages.py: Updated for rename.
* Scripts/webkit/parser.py: Ditto.
* WebKit2.xcodeproj/project.pbxproj: Moved the Copy Message Generation Scripts build phase
from the WebKit2 target to the WebKit target and changed its destination to
WebKit.framework/PrivateHeaders/Scripts/webkit. Removed the Remove Compiled Python Files
build phase, since compiled files no longer get copied.
2014-09-12 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] Use a nicer HTTP authentication dialog
https://bugs.webkit.org/show_bug.cgi?id=136615
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
(webkitAuthenticationDialogInitialize): Use a nicer layout.
(packTwoColumnLayoutInBox): Deleted.
(createLabel): Deleted.
(createEntry): Deleted.
2014-09-12 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r173423): CertificateInfo is never sent to the UI process when using shared secondary process model
https://bugs.webkit.org/show_bug.cgi?id=136669
Reviewed by Antti Koivisto.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad): Use
ResourceLoader::shouldIncludeCertificateInfo() to initialize
needsCertificateInfo parameter.
2014-09-11 Ryuan Choi <ryuan.choi@gmail.com>
[EFL][CoordinatedGraphics] Move CoordinatedGraphicsScene and CoordinatedBackingStore to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=136770
Reviewed by Gyuyoung Kim.
CoordinatedGraphicsScene and CoordinatedBackingStore is only for UIProcess.
This patch moved them from WebCore to WebKit2/UIProcess/CoordinatedGraphics/.
* PlatformEfl.cmake:
* UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.cpp.
* UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedBackingStore.h.
* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.cpp: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp.
* UIProcess/CoordinatedGraphics/CoordinatedGraphicsScene.h: Renamed from Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h.
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h:
* UIProcess/CoordinatedGraphics/WebView.cpp:
* UIProcess/efl/WebViewEfl.cpp:
2014-09-11 Bear Travis <betravis@adobe.com>
[CSS Font Loading] Enable CSS Font Loading on Mac
https://bugs.webkit.org/show_bug.cgi?id=135473
Reviewed by Antti Koivisto.
Enable CSS Font Loading in FeatureDefines.
* Configurations/FeatureDefines.xcconfig:
2014-09-11 Youenn Fablet <youenn.fablet@crf.canon.fr>
[WK2] Authentication dialog is displayed for cross-origin XHR
https://bugs.webkit.org/show_bug.cgi?id=131349
Reviewed by Alexey Proskuryakov.
Precomputing client credential policy in the Web Process before sending the resource load task to the Network Process.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): Added an ASSERT to ensure that credential policy is never set to DoNotAskClientForCrossOriginCredentials.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad): Precomputing client credential policy to handle the case of cross-origin requests.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::willSendRequest): Added a TODO to check whether redirections need a specific handling.
2014-09-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Merge WebKitAuthenticationWidget into WebKitAuthenticationDialog
https://bugs.webkit.org/show_bug.cgi?id=136700
Reviewed by Sergio Villar Senin.
Copy WebKitAuthenticationWidget implementation inside
WebKitAuthenticationDialog using a normal GtkBox instead.
* UIProcess/API/gtk/WebKitAuthenticationDialog.cpp:
(okButtonClicked):
(cancelButtonClicked):
(packTwoColumnLayoutInBox):
(createLabel):
(createEntry):
(webkitAuthenticationDialogInitialize): Remove the
CredentialStorageMode parameter since it's now a member.
(webkitAuthenticationDialogNew): Initialize the
CredentialStorageMode member too.
* UIProcess/API/gtk/WebKitAuthenticationDialog.h:
2014-09-10 Antti Koivisto <antti@apple.com>
NetworkResourceLoader cleanups
https://bugs.webkit.org/show_bug.cgi?id=136701
Reviewed by Darin Adler.
After smashing NetworkResourceLoader together with the clients it can be made nicer.
* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::scheduleLoader):
(WebKit::NetworkResourceLoadScheduler::removeLoader):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
The original request is now part of the loader.
(WebKit::sendReplyToSynchronousRequest):
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
Instead of copying everything out from NetworkResourceLoadParameters just include the whole thing as a const field.
SanboxExtension construction moves to NetworkResourceLoadParameters::decode()
Stuff that is related to starting the load moves to start().
(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::start):
(WebKit::NetworkResourceLoader::setDefersLoading):
Eliminate m_deferredRequest since we now always remember the original request.
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::didConvertHandleToDownload):
(WebKit::NetworkResourceLoader::abort):
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::NetworkResourceLoader::didFail):
(WebKit::NetworkResourceLoader::willSendRequestAsync):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
Eliminate unnecessary m_suggestedRequestForWillSendRequest.
(WebKit::NetworkResourceLoader::wasBlocked):
(WebKit::NetworkResourceLoader::cannotShowURL):
(WebKit::NetworkResourceLoader::shouldUseCredentialStorage):
(WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge):
(WebKit::NetworkResourceLoader::receivedCancellation):
(WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded):
(WebKit::NetworkResourceLoader::consumeSandboxExtensions):
(WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
(WebKit::NetworkResourceLoader::sendAbortingOnFailure):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::originalRequest):
(WebKit::NetworkResourceLoader::currentRequest):
(WebKit::NetworkResourceLoader::sessionID):
(WebKit::NetworkResourceLoader::defersLoading):
(WebKit::NetworkResourceLoader::isLoadingMainResource):
(WebKit::NetworkResourceLoader::request): Deleted.
(WebKit::NetworkResourceLoader::sendAbortingOnFailure): Deleted.
Made private and moved to cpp.
* NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
(WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor):
Use original request instead of the current one. This might fix a bug where we didn't use file backing over redirects.
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::decode):
Decode to SanboxExtensions to the actual type rather than a handle.
* Shared/Network/NetworkResourceLoadParameters.h:
2014-09-10 Michael Catanzaro <mcatanzaro@igalia.com>
[GTK] allow overwriting destination of download
https://bugs.webkit.org/show_bug.cgi?id=136372
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitDownload.cpp:
(webkitDownloadGetProperty): Added
(webkit_download_class_init): Install webkitDownloadGetProperty
(webkitDownloadDecideDestinationWithSuggestedFilename): Add
allowOverwrite parameter and set it appropriately
(webkit_download_get_allow_overwrite): Added
(webkit_download_set_allow_overwrite): Added
* UIProcess/API/gtk/WebKitDownload.h: New API
* UIProcess/API/gtk/WebKitDownloadClient.cpp:
(decideDestinationWithSuggestedFilename): Pass allowOverwrite to
webkitDownloadDecideDestinationWithSuggestedFilename
* UIProcess/API/gtk/WebKitDownloadPrivate.h: Add allowOverwrite
parameter to webkitDownloadDecideDestinationWithSuggestedFilename
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: New API
2014-09-10 Rohit Kumar <kumar.rohit@samsung.com>
[GTK] Clean up the WebKit build from unused parameter warning in Webkit2/UIProcess module
https://bugs.webkit.org/show_bug.cgi?id=136670
Reviewed by Martin Robinson.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
2014-09-09 Enrica Casucci <enrica@apple.com>
REGRESSION (WebKit2): -webkit-touch-callout: none has no effect.
https://bugs.webkit.org/show_bug.cgi?id=136685
rdar://problem/17629840
Reviewed by Benjamin Poulain.
We need to check if the touch callout is enabled for the element before starting
the long press gesture.
The information about the touch callout is returned together with the rest of data
returned by the InteractionInformationAtPosition.
* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* Shared/InteractionInformationAtPosition.h:
(WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _actionForLongPress]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2014-09-09 Benjamin Poulain <bpoulain@apple.com>
Disable the "unreachable-code" warning
https://bugs.webkit.org/show_bug.cgi?id=136677
Reviewed by Darin Adler.
* Configurations/Base.xcconfig:
2014-09-09 Dan Bernstein <mitz@apple.com>
[Cocoa] -[WKBackForwardList backList] contains an unnecessary nil check
https://bugs.webkit.org/show_bug.cgi?id=136680
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKBackForwardList.mm:
(-[WKBackForwardList backList]): Removed nil check.
(-[WKBackForwardList forwardList]): Ditto.
2014-09-09 Tim Horton <timothy_horton@apple.com>
Make DrawingArea a real MessageReceiver
https://bugs.webkit.org/show_bug.cgi?id=136438
Reviewed by Darin Adler.
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::DrawingArea):
(WebKit::DrawingArea::~DrawingArea):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::~WebPage):
(WebKit::WebPage::didReceiveMessage):
Make DrawingArea a real MessageReceiver instead of a LegacyReceiver that
jumps through WebPage to receive its messages.
2014-09-08 Antti Koivisto <antti@apple.com>
Pass certificate info as part of ResourceResponse
https://bugs.webkit.org/show_bug.cgi?id=136611
Reviewed by Darin Adler.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
Initialize the certificate info only if requested.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponse):
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Deleted.
Rename didReceiveResponseWithCertificateInfo -> didReceiveResponse as it is now part of the response.
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
Request certificate info for the main resource only.
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::certificateInfo):
2014-09-08 Shivakumar JM <shiva.jm@samsung.com>
[WebKit2] Fix build error in WebKit2/WebProcess module
https://bugs.webkit.org/show_bug.cgi?id=136667
Reviewed by Darin Adler.
Fix the build error by handling default case.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::maximumBufferingTime):
2014-09-08 Simon Fraser <simon.fraser@apple.com>
Fix the iOS build.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
2014-09-08 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
Remove FILTERS flag
https://bugs.webkit.org/show_bug.cgi?id=136571
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
2014-09-08 Antti Koivisto <antti@apple.com>
Buffer images on web process side
https://bugs.webkit.org/show_bug.cgi?id=136631
Reviewed by Darin Adler.
We can substantially reduce IPC and decoding time for large images by allowing some buffering.
This patch makes us buffer image data up to 0.5s before sending it over to the web process.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
Start the timer.
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::startBufferingTimerIfNeeded):
(WebKit::NetworkResourceLoader::bufferingTimerFired):
(WebKit::NetworkResourceLoader::sendBuffer):
Send the data when the timer fires or the load finishes, whichever happens first.
* NetworkProcess/NetworkResourceLoader.h:
* Platform/IPC/ArgumentCoders.h:
Support encoding std::chrono::duration
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
(WebKit::NetworkResourceLoadParameters::encode):
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:
Pass maximimum buffering duration.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::maximumBufferingTime):
Deterimine duration from the resource type.
Enabled full buffering for font resources. They are not decoded incrementally.
(WebKit::WebResourceLoadScheduler::scheduleLoad):
2014-09-08 Dan Bernstein <mitz@apple.com>
HAVE(VOUCHERS) is not available outside of WebKit2
https://bugs.webkit.org/show_bug.cgi?id=136637
Reviewed by Tim Horton.
* config.h: Moved the definition of HAVE_VOUCHERS from here to wtf’s Platform.h.
2014-09-08 Tim Horton <timothy_horton@apple.com>
Try to fix the build after r173383, part 4.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
Machine finally caught up so I could actually test the fixes!
2014-09-08 Tim Horton <timothy_horton@apple.com>
Try to fix the build after r173383, part 3.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
2014-09-08 Dan Bernstein <mitz@apple.com>
Build fix.
* Platform/IPC/Connection.h:
2014-09-06 Sam Weinig <sam@webkit.org>
XPCPtr should be converted into an all purpose smart pointer for os_objects
https://bugs.webkit.org/show_bug.cgi?id=136602
Reviewed by Darin Adler.
* DatabaseProcess/EntryPoint/mac/XPCService/DatabaseServiceEntryPoint.mm:
(DatabaseServiceInitializer):
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
(NetworkServiceInitializer):
* Platform/IPC/Connection.h:
(IPC::Connection::Identifier::Identifier):
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::ConnectionTerminationWatchdog::createConnectionTerminationWatchdog):
(IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
* Platform/IPC/mac/XPCPtr.h: Removed.
* PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
(WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
(PluginServiceInitializer):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
(WebKit::XPCServiceInitializer):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::checkEntitlements):
(WebKit::XPCServiceInitializerDelegate::hasEntitlement):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
(WebKit::XPCServiceEventHandler):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceEventHandler):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
(WebKit::connectToReExecService):
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):
Update after the rename of XPCPtr to OSObjectPtr.
2014-09-06 Darin Adler <darin@apple.com>
Make updates suggested by new version of Xcode
https://bugs.webkit.org/show_bug.cgi?id=136603
Reviewed by Mark Rowe.
* Configurations/Base.xcconfig: Added CLANG_WARN_UNREACHABLE_CODE, COMBINE_HIDPI_IMAGES,
and ENABLE_STRICT_OBJC_MSGSEND as suggested by the Xcode upgrade check.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::initializeCocoaOverrides): Changed NSConcreteTask_launch to use the same technique
as the other functions in this file, doing the type casting right at the call to
method_setImplementation so the global has a suitable type for making a function call,
rather than relying on the abilty to call through a type without a specific argument list.
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::pathExtension): Use size_t for the result of String::reverseFind rather than
converting it to an int. Also don't rely on the fact that WTF's notFound becomes -1 when
cast from size_t to int.
* WebKit2.xcodeproj/project.pbxproj: Let Xcode delete some orphaned items, and updated
LastUpgradeCheck.
2014-09-06 Brian J. Burg <burg@cs.washington.edu>
Web Inspector: convert DockSide to an enum class
https://bugs.webkit.org/show_bug.cgi?id=136601
Reviewed by Timothy Hatcher.
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
(WebKit::WebInspectorFrontendClient::attachWindow):
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::attachedBottom):
(WebKit::WebInspector::attachedRight):
(WebKit::WebInspector::detached):
2014-09-06 Antti Koivisto <antti@apple.com>
Serialize ResourceResponses using WebKit types
https://bugs.webkit.org/show_bug.cgi?id=136545
Reviewed by Alexey Proskuryakov.
Remove the WK2 serialization code for responses. It moves to the types itself in WebCore where it is
close to the data being serialized and less likely to get out of sync.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceResponse>::encode): Deleted.
(IPC::ArgumentCoder<ResourceResponse>::decode): Deleted.
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceResponse>::encodePlatformData): Deleted.
(IPC::ArgumentCoder<ResourceResponse>::decodePlatformData): Deleted.
2014-09-06 Ryuan Choi <ryuan.choi@gmail.com>
[EFL] Drop evas object cursor support
https://bugs.webkit.org/show_bug.cgi?id=136324
Reviewed by Gyuyoung Kim.
Removed evas object cursor because there are some bugs.
ewebkit will only support ecore_x_cursor because ewebkit is available with X, now.
* UIProcess/API/efl/EwkView.cpp:
(EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
(EwkView::EwkView):
(EwkView::updateCursor): Simplifies not to use evas object cursor.
(EwkView::setCursor): Ditto.
* UIProcess/API/efl/EwkView.h:
2014-09-05 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r173340 and r173342.
https://bugs.webkit.org/show_bug.cgi?id=136596
Broke many tests (Requested by ap on #webkit).
Reverted changesets:
"Remove PLATFORM(IOS) from WebCore/editing (Part 3)."
https://bugs.webkit.org/show_bug.cgi?id=136474
http://trac.webkit.org/changeset/173340
"Build fix after r173340."
http://trac.webkit.org/changeset/173342
2014-09-05 Joseph Pecoraro <pecoraro@apple.com>
Use WTFString::split(char) in more places
https://bugs.webkit.org/show_bug.cgi?id=136543
Reviewed by Sam Weinig.
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::PluginVersion::parse):
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::initInspectorServer):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::isTransparentSilverlightBackgroundValue):
2014-09-05 Enrica Casucci <enrica@apple.com>
Remove PLATFORM(IOS) from WebCore/editing (Part 3).
https://bugs.webkit.org/show_bug.cgi?id=136474
Reviewed by Benjamin Poulain.
This patch removes the use of PLATFORM(IOS) from TextAffinity.h
and removes the assumption that EAffinity values match NSSelectionAffinity
values. It also removes the includes in TextAffinity.h, creating the need to
include explicitly the files when necessary. It also removes the unnecessary
use of platform specific types, replacing them with WebCore types.
* WebProcess/InjectedBundle/API/mac/WKDOMInternals.mm:
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2014-09-05 David Kilzer <ddkilzer@apple.com>
JavaScriptCore should build with newer clang
<http://webkit.org/b/136002>
<rdar://problem/18020616>
Reviewed by Geoffrey Garen.
* Shared/API/c/WKString.cpp:
(WKStringCreateWithJSString): Add NULL check to prevent
WebKitTestRunner crashes that relied on the previous |this|
behavior where NULL values were allowed.
2014-09-05 Beth Dakin <bdakin@apple.com>
ScrollablArea::handleWheelEvent() should return early if the ScrollableArea is not
actually scrollable
https://bugs.webkit.org/show_bug.cgi?id=136558
Reviewed by Simon Fraser.
New ScrollableArea virtual function.
* WebProcess/Plugins/PDF/PDFPlugin.h:
2014-09-04 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, speculative build fix on GTK port since r173305.
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp:
(webkitURISchemeRequestReadCallback):
2014-09-03 Andy Estes <aestes@apple.com>
[Cocoa] Some WebKitLegacy headers migrated from WebCore incorrectly contain WEBCORE_EXPORT
https://bugs.webkit.org/show_bug.cgi?id=136521
Reviewed by Anders Carlsson.
* config.h: Included <WebCore/PlatformExportMacros.h> instead of defining WEBCORE_EXPORT.
2014-09-04 Maciej Stachowiak <mjs@apple.com>
Remove WebCoreSystemInterface glue for otherwise unused WKSI calls
https://bugs.webkit.org/show_bug.cgi?id=136527
Reviewed by Alexey Proskuryakov.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2014-09-04 Antti Koivisto <antti@apple.com>
Remove ResourceResponse::m_suggestedFilename
https://bugs.webkit.org/show_bug.cgi?id=136534
Reviewed by Alexey Proskuryakov.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceResponse>::encode):
(IPC::ArgumentCoder<ResourceResponse>::decode):
No more m_suggestedFilename.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::addArchiveResource):
Fake the suggested filename by using the Content-Disposition header.
2014-09-04 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
Remove CSS_FILTERS flag
https://bugs.webkit.org/show_bug.cgi?id=136529
Reviewed by Dirk Schulze.
* Configurations/FeatureDefines.xcconfig:
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
(IPC::ArgumentCoder<GraphicsLayerAnimation>::encode):
(IPC::ArgumentCoder<GraphicsLayerAnimation>::decode):
(IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
(IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h:
* Shared/WebCoreArgumentCoders.cpp:
* Shared/WebCoreArgumentCoders.h:
* WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
(WebKit::GraphicsLayerCARemote::filtersCanBeComposited):
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::setFromValue):
(WebKit::PlatformCAAnimationRemote::setToValue):
(WebKit::PlatformCAAnimationRemote::setValues):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
(WebKit::PlatformCALayerRemote::filtersCanBeComposited):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2014-09-04 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r173245.
https://bugs.webkit.org/show_bug.cgi?id=136533
Broke JSC tests. (Requested by ddkilzer on #webkit).
Reverted changeset:
"JavaScriptCore should build with newer clang"
https://bugs.webkit.org/show_bug.cgi?id=136002
http://trac.webkit.org/changeset/173245
2014-09-04 Carlos Garcia Campos <cgarcia@igalia.com>
Initialize m_usesNetworkProcess earlier in WebProcess::initializeWebProcess()
https://bugs.webkit.org/show_bug.cgi?id=136478
Reviewed by Alexey Proskuryakov.
The soup network backend uses WebProcess::usesNetworkProcess()
from WebProcess::platformSetCacheModel() and
WebProcess::platformInitializeWebProcess(), both called before the
m_usesNetworkProcess member has been initialized.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Move the
m_usesNetworkProcess initialization at the beginning right before
calling platformInitializeWebProcess().
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformSetCacheModel): Remove the early
return when using the network process, since this was dead code
before this change, and not really needed now that
usesNetworkProcess() will return true.
(WebKit::WebProcess::platformInitializeWebProcess): Remove comment
that is not accurate since r171156.
2014-09-03 Michael Catanzaro <mcatanzaro@igalia.com>
[SOUP] Race condition when downloading a file due to the intermediate temporary file
https://bugs.webkit.org/show_bug.cgi?id=136423
Reviewed by Carlos Garcia Campos.
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::DownloadClient): Replace m_destinationURI with
m_destinationFile and add m_createdDestination.
(WebKit::DownloadClient::deleteFilesIfNeeded): Added.
(WebKit::DownloadClient::downloadFailed): Call deleteFilesIfNeeded.
(WebKit::DownloadClient::didReceiveResponse): Attempt to create the
destination file before the intermediate file. Fail here if the file
exists and overwrite is not allowed, so we don't erroneously fire the
didCreateDestination event or waste time downloading the file when we
know the download will fail.
(WebKit::DownloadClient::didFinishLoading): Unconditionally overwrite
the empty destination file.
(WebKit::DownloadClient::cancel): Call deleteFilesIfNeeded.
(WebKit::DownloadClient::deleteIntermediateFileInNeeded): Deleted.
2014-09-03 David Kilzer <ddkilzer@apple.com>
JavaScriptCore should build with newer clang
<http://webkit.org/b/136002>
<rdar://problem/18020616>
Reviewed by Geoffrey Garen.
* Shared/API/c/WKString.cpp:
(WKStringCreateWithJSString): Add NULL check to prevent
WebKitTestRunner crashes that relied on the previous |this|
behavior where NULL values were allowed.
2014-09-03 Enrica Casucci <enrica@apple.com>
Remove PLATFORM(IOS) from WebCore/editing (Part 1).
https://bugs.webkit.org/show_bug.cgi?id=136474
Reviewed by Tim Horton.
* UIProcess/WebEditCommandProxy.cpp:
(WebKit::WebEditCommandProxy::nameForEditAction):
2014-09-03 Yongjun Zhang <yongjun_zhang@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=136395
Need a way to get userAgent from WKWebView.
Add _userAgent property to return user agent string from WKWebView.
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _userAgent]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-09-02 Maciej Stachowiak <mjs@apple.com>
Clean up naming for and slightly refactor legacy video fullscreen support
https://bugs.webkit.org/show_bug.cgi?id=136446
Reviewed by Jer Noble.
Key changes:
supportsFullscreenForNode(Node*) --> supportsVideoFullscreen()
enterFullscreenForNode(Node*) --> enterVideoFullscreenForVideoElement(HTMLVideoElement*)
exitFullscreenForNode(Node*) --> exitVideoFullscreen()
The old versions had unnecessary parameters, did not clearly distinguish their purpose
from enterFullscreenForElement and friends, and wrongly claimed generality to all Nodes.
Also changed many other places to use HTMLVideoElement* instead of Node* or
HTMLMediaElement* when they were in fact only used for video elements and would only
work for such.
Legacy video fullscreen in WebKit2 is only supported on iOS (for other ports that support
it, it's WK1 only).
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::supportsVideoFullscreen): Adjust for renames as
mentioned.
(WebKit::WebChromeClient::enterVideoFullscreenForVideoElement): ditto
(WebKit::WebChromeClient::exitVideoFullscreen): ditto
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/ios/WebVideoFullscreenManager.h:
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::clientRectForElement): No need to be generic to node.
(WebKit::WebVideoFullscreenManager::supportsVideoFullscreen): Adjust for the
main refactoring. Also change m_node to m_videoElement with appropriate type change.
(WebKit::WebVideoFullscreenManager::enterVideoFullscreenForVideoElement): ditto
(WebKit::WebVideoFullscreenManager::exitVideoFullscreen): ditto
(WebKit::WebVideoFullscreenManager::didEnterFullscreen): ditto
(WebKit::WebVideoFullscreenManager::didExitFullscreen): ditto
(WebKit::WebVideoFullscreenManager::didCleanupFullscreen): ditto
2014-09-03 Dan Bernstein <mitz@apple.com>
Get rid of HIGH_DPI_CANVAS leftovers
https://bugs.webkit.org/show_bug.cgi?id=136491
Reviewed by Benjamin Poulain.
* Configurations/FeatureDefines.xcconfig: Removed definition of ENABLE_HIGH_DPI_CANVAS
and removed it from FEATURE_DEFINES.
2014-09-02 Yongjun Zhang <yongjun_zhang@apple.com>
Pass the resource identifier in willSendRequest callback.
https://bugs.webkit.org/show_bug.cgi?id=136325
Reviewed by Dan Bernstein.
Add two new delegate methods webProcessPlugInBrowserContextController:frame:willSendRequestForResource:request:redirectResponse:
and webProcessPlugInBrowserContextController:frame:didInitiateLoadForResource:request:pageIsProvisionallyLoading:. We will remove
the old willSendRequest and didInitiateLoadForResource when clients adopt the new methods.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(willSendRequestForFrame):
(didInitiateLoadForResource):
2014-09-02 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK build fix after r173163.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::createDrawingAreaProxy):
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl):
(WebKit::DrawingAreaProxyImpl::update):
(WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState):
(WebKit::DrawingAreaProxyImpl::incorporateUpdate):
(WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState):
(WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState):
(WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::exitAcceleratedCompositingMode):
(WebKit::DrawingAreaProxyImpl::updateAcceleratedCompositingMode):
* UIProcess/DrawingAreaProxyImpl.h:
2014-09-01 Timothy Horton <timothy_horton@apple.com>
Fix the iOS build.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _createDrawingAreaProxy]):
Whoops.
2014-09-01 Ryuan Choi <ryuan.choi@gmail.com>
Build break on the EFL port since r173163
https://bugs.webkit.org/show_bug.cgi?id=136443
Unreviewed build fix.
* UIProcess/BackingStore.cpp:
(WebKit::BackingStore::BackingStore):
* UIProcess/BackingStore.h:
* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
(WebKit::CoordinatedDrawingAreaProxy::CoordinatedDrawingAreaProxy):
(WebKit::CoordinatedDrawingAreaProxy::updateViewport):
(WebKit::CoordinatedDrawingAreaProxy::contentsRect):
(WebKit::CoordinatedDrawingAreaProxy::update):
(WebKit::CoordinatedDrawingAreaProxy::didUpdateBackingStoreState):
(WebKit::CoordinatedDrawingAreaProxy::incorporateUpdate):
(WebKit::CoordinatedDrawingAreaProxy::sendUpdateBackingStoreState):
(WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
(WebKit::CoordinatedDrawingAreaProxy::enterAcceleratedCompositingMode):
(WebKit::CoordinatedDrawingAreaProxy::exitAcceleratedCompositingMode):
(WebKit::CoordinatedDrawingAreaProxy::updateAcceleratedCompositingMode):
* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.h:
(WebKit::CoordinatedDrawingAreaProxy::page):
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
(WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy):
(WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy):
(WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState):
(WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect):
(WebKit::CoordinatedLayerTreeHostProxy::renderNextFrame):
(WebKit::CoordinatedLayerTreeHostProxy::purgeBackingStores):
(WebKit::CoordinatedLayerTreeHostProxy::commitScrollOffset):
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::createDrawingAreaProxy):
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::BackingStore::incorporateUpdate):
2014-09-01 Tim Horton <timothy_horton@apple.com>
Remove two unused WebKit2 PDF-related preferences
https://bugs.webkit.org/show_bug.cgi?id=136441
Reviewed by Dan Bernstein.
* Shared/WebPreferencesDefinitions.h:
Move the macro arguments comment down near where the macros are being used.
No need to check both PLATFORM(IOS) and PLATFORM(IOS_SIMULATOR); the second can't be true without the first.
These two PDF preferences are long-unused; if we bring back their functionality,
we'll bring back the preferences.
2014-09-01 Tim Horton <timothy_horton@apple.com>
DrawingAreaProxy and friends can hold on to WebPageProxy by reference
https://bugs.webkit.org/show_bug.cgi?id=136440
Reviewed by Dan Bernstein.
* UIProcess/API/mac/WKView.mm:
(-[WKView _createDrawingAreaProxy]):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::~DrawingAreaProxy):
(WebKit::DrawingAreaProxy::setExposedRect):
(WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
* UIProcess/DrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::sizeDidChange):
(WebKit::RemoteLayerTreeDrawingAreaProxy::deviceScaleFactorDidChange):
(WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect):
(WebKit::RemoteLayerTreeDrawingAreaProxy::sendUpdateGeometry):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorScale):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
(WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::TiledCoreAnimationDrawingAreaProxy):
(WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
(WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::minimumLayoutSizeDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::enterAcceleratedCompositingMode):
(WebKit::TiledCoreAnimationDrawingAreaProxy::updateAcceleratedCompositingMode):
(WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry):
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState):
(WebKit::TiledCoreAnimationDrawingAreaProxy::intrinsicContentSizeDidChange):
(WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry):
(WebKit::TiledCoreAnimationDrawingAreaProxy::adjustTransientZoom):
(WebKit::TiledCoreAnimationDrawingAreaProxy::commitTransientZoom):
2014-09-01 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[CMAKE] Build warning by INTERFACE_LINK_LIBRARIES
https://bugs.webkit.org/show_bug.cgi?id=136194
Reviewed by Csaba Osztrogonác.
Set the LINK_INTERFACE_LIBRARIES target property on the top level CMakeLists.txt.
* CMakeLists.txt:
2014-09-01 Michael Catanzaro <mcatanzaro@igalia.com>
[SOUP] WebKitDownload cannot overwrite existing file
https://bugs.webkit.org/show_bug.cgi?id=136322
Reviewed by Carlos Garcia Campos.
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::didReceiveResponse): pass a member variable
to Download::decideDestinationWithSuggestedFilename instead of a
temporary bool, so we can use the result in didFinishLoading.
(WebKit::DownloadClient::didFinishLoading): overwrite the destination
if Download::decideDestinationWithSuggestedFilename determined we
should do so.
2014-08-31 Tim Horton <timothy_horton@apple.com>
Occasional crashes (null deref) under ViewGestureController::endMagnificationGesture
https://bugs.webkit.org/show_bug.cgi?id=136409
<rdar://problem/18104748>
Reviewed by Dan Bernstein.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::endMagnificationGesture):
Null-check DrawingArea.
2014-08-26 Maciej Stachowiak <mjs@apple.com>
Use RetainPtr::autorelease in some places where it seems appropriate
https://bugs.webkit.org/show_bug.cgi?id=136280
Reviewed by Darin Adler.
* Shared/Cocoa/WKNSURLExtras.mm:
(urlWithWTFString): Use autorelease() instead of CFBridgingRelease(leakRef())
2014-08-29 Tim Horton <timothy_horton@apple.com>
More occasional crashes in ServicesController::resfreshExistingServices
https://bugs.webkit.org/show_bug.cgi?id=136387
<rdar://problem/18167200>
Reviewed by Dan Bernstein.
* UIProcess/mac/ServicesController.mm:
(WebKit::ServicesController::ServicesController):
Speculative fix; if this block is called synchronously, we'll end up
calling back into ::shared() before the NeverDestroyed is initialized,
ending up with two ServicesControllers.
2014-08-29 Alexey Proskuryakov <ap@apple.com>
Crashes in IPC code under VisitedLinkProvider::pendingVisitedLinksTimerFired
https://bugs.webkit.org/show_bug.cgi?id=136384
rdar://problem/16991213
Reviewed by Sam Weinig.
VisitedLinkProvider process tracking relied on a combination of WebPageProxy process
lifecycle notifications and checking process state. As evidenced by multiple FIXMEs,
these are not yet as reliable as they should be.
Changed to unregister a process when it closes, not when it no longer has any pages
using the particular VisitedLinkProvider or WebUserContentControllerProxy. This
is a deoptimization that should not matter in practice.
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
(WebKit::WebUserContentControllerProxy::removeProcess):
(WebKit::WebUserContentControllerProxy::addUserScript):
(WebKit::WebUserContentControllerProxy::removeAllUserScripts):
(WebKit::WebUserContentControllerProxy::addUserStyleSheet):
(WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
(WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
(WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::~VisitedLinkProvider):
(WebKit::VisitedLinkProvider::removeProcess):
(WebKit::VisitedLinkProvider::removeAll):
(WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
(WebKit::VisitedLinkProvider::resizeTable):
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::processDidFinishLaunching):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::disconnect):
(WebKit::WebProcessProxy::addVisitedLinkProvider):
(WebKit::WebProcessProxy::addWebUserContentControllerProxy):
(WebKit::WebProcessProxy::didDestroyVisitedLinkProvider):
(WebKit::WebProcessProxy::didDestroyWebUserContentControllerProxy):
* UIProcess/WebProcessProxy.h:
2014-08-29 Alexey Proskuryakov <ap@apple.com>
WebPageProxy::close() is a no-op for terminated processes
https://bugs.webkit.org/show_bug.cgi?id=136378
Related to <rdar://problem/16991213> and to <rdar://problem/17095600>
Reviewed by Brady Eidson.
Also fixes issues that got uncovered after making close() work.
* UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::invalidate): Don't
close the page, because it makes no sense, and causes an assertion now. Previosly,
this was OK because the page was invalid already, and close() was a no-op.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::~WebPageProxy): Added some assertions to catch invalidation
issues earlier.
(WebKit::WebPageProxy::reattachToWebProcess): Make it an invariant that a page's
process always has a message receiver for it, until close() removes it.
(WebKit::WebPageProxy::close): Make this function work for all open pages, whether
they have a page or not.
(WebKit::WebPageProxy::processDidFinishLaunching): Added an asserion that process
agrees about its state.
(WebKit::WebPageProxy::resetStateAfterProcessExited): Don't remove a message receiver,
we now only do this in reattach or close.
2014-08-29 Antti Koivisto <antti@apple.com>
Remove NetworkResourceLoaderClient and subclasses.
https://bugs.webkit.org/show_bug.cgi?id=136370
Reviewed by Darin Adler.
This code is needlessly abstract. Move what logic these classes have to NetworkResourceLoader.
* NetworkProcess/AsynchronousNetworkLoaderClient.cpp: Removed.
* NetworkProcess/AsynchronousNetworkLoaderClient.h: Removed.
* NetworkProcess/NetworkLoaderClient.h: Removed.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::isSynchronous):
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
(WebKit::NetworkResourceLoader::didFail):
(WebKit::NetworkResourceLoader::willSendRequestAsync):
(WebKit::NetworkResourceLoader::didSendData):
(WebKit::NetworkResourceLoader::sendBuffer):
(WebKit::NetworkResourceLoader::sendReplyToSynchronousRequest):
(WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::SynchronousLoadData::SynchronousLoadData):
* NetworkProcess/SynchronousNetworkLoaderClient.cpp: Removed.
* NetworkProcess/SynchronousNetworkLoaderClient.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:
2014-08-29 Csaba Osztrogonác <ossy@webkit.org>
Unreviwed, remove empty directories.
* PluginProcess/qt: Removed.
* Shared/API/c/qt: Removed.
* Shared/Downloads/qt: Removed.
* Shared/FileAPI: Removed.
* Shared/qt: Removed.
* UIProcess/API/C/qt: Removed.
* UIProcess/API/cpp/qt: Removed.
* UIProcess/API/qt: Removed.
* UIProcess/API/qt/raw: Removed.
* UIProcess/API/qt/tests: Removed.
* UIProcess/API/qt/tests/html: Removed.
* UIProcess/API/qt/tests/html/resources: Removed.
* UIProcess/API/qt/tests/inspectorserver: Removed.
* UIProcess/API/qt/tests/publicapi: Removed.
* UIProcess/API/qt/tests/qmltests: Removed.
* UIProcess/API/qt/tests/qmltests/DesktopBehavior: Removed.
* UIProcess/API/qt/tests/qmltests/WebView: Removed.
* UIProcess/API/qt/tests/qmltests/common: Removed.
* UIProcess/API/qt/tests/qquickwebview: Removed.
* UIProcess/API/qt/tests/qrawwebview: Removed.
* UIProcess/InspectorServer/qt: Removed.
* UIProcess/Launcher/qt: Removed.
* UIProcess/Plugins/qt: Removed.
* UIProcess/SharedWorkers: Removed.
* UIProcess/qt: Removed.
* WebProcess/Cookies/qt: Removed.
* WebProcess/Downloads: Removed.
* WebProcess/IndexedDB: Removed.
* WebProcess/InjectedBundle/qt: Removed.
* WebProcess/NetworkInfo: Removed.
* WebProcess/Plugins/Netscape/qt: Removed.
* WebProcess/WebCoreSupport/qt: Removed.
* WebProcess/WebPage/qt: Removed.
* WebProcess/qt: Removed.
* qt: Removed.
2014-08-28 Tim Horton <timothy_horton@apple.com>
_setDidMoveSwipeSnapshotCallback's block should only be called if the snapshot is going to move
https://bugs.webkit.org/show_bug.cgi?id=136354
<rdar://problem/18167791>
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Update the comment to note the new behavior.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Don't call the block until the snapshot is actually moving (if the snapshot
never moves because it's behind the live view, don't call the block at all).
2014-08-28 Tim Horton <timothy_horton@apple.com>
Occasional thread-safety-related crashes on the ServicesController queue
https://bugs.webkit.org/show_bug.cgi?id=136356
<rdar://problem/18045685>
Reviewed by Dan Bernstein.
* UIProcess/mac/ServicesController.mm:
(WebKit::hasCompatibleServicesForItems):
Added. Check directly with NSSharingService if we have any services for the given items.
We should eventually check Viewer and Editor services separately so the Web process can
be smarter about when it shows the overlay, but for now this maintains the existing behavior.
(WebKit::ServicesController::refreshExistingServices):
Make use of hasCompatibleServicesForItems instead of having NSSharingServicePicker construct NSMenus.
2014-08-28 Tim Horton <timothy_horton@apple.com>
WebKit2 doesn't support viewer services that accept image attachments
https://bugs.webkit.org/show_bug.cgi?id=136349
<rdar://problem/18164606>
Reviewed by Brady Eidson.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
Encode the already-existing parameter.
2014-08-28 Zalan Bujtas <zalan@apple.com>
Subpixel layout: Remove unused pixel snapping functions.
https://bugs.webkit.org/show_bug.cgi?id=136341
Reviewed by Simon Fraser.
Let's not encourage integral snapping by having these functions around.
No change in functionality.
* Shared/WebRenderObject.cpp:
(WebKit::WebRenderObject::WebRenderObject):
2014-08-27 Enrica Casucci <enrica@apple.com>
textStylingAtPosition returns incorrect values after executing toggleBold, toggleItalic and toggleUnderline.
https://bugs.webkit.org/show_bug.cgi?id=136323
rdar://problem/18141964
Reviewed by Antti Koivisto.
For underline style we need to check typingStyle first and use that information to populate
the dictionary. If there is no typing style we can use the render style.
We also need to update the editor state for the toggle commands to reflect the state in the UIProcess
even for commands that don't change the selection.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::executeEditCommandWithCallback):
2014-08-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=136248
Reviewed by Gustavo Noronha Silva.
Add webkit_uri_response_get_http_headers() that returns the HTTP
headers as a SoupMessageHeaders* like webkit_uri_request_get_http_headers().
* UIProcess/API/gtk/WebKitURIResponse.cpp:
(webkitURIResponseGetProperty): Add http-headers property getter.
(webkit_uri_response_class_init): Add http-headers property.
(webkit_uri_response_get_http_headers): Return the HTTP headers as
a SoupMessageHeaders* or NULL for non HTTP responses.
* UIProcess/API/gtk/WebKitURIResponse.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol.
2014-08-27 Zalan Bujtas <zalan@apple.com>
Subpixel layout: Rename LayoutRect's device pixel snapping functions.
https://bugs.webkit.org/show_bug.cgi?id=136319
Reviewed by Simon Fraser.
From pixelSnappedForPainting() to snapRectToDevicePixels() and
pixelSnappedIntRect*() to snappedIntRect*().
No change in functionality.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::renderedImage):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotNode):
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::buildSelectionHighlight):
2014-08-27 Zalan Bujtas <zalan@apple.com>
Subpixel layout: Rename FloatPoint/FloatRect device pixel snapping functions.
https://bugs.webkit.org/show_bug.cgi?id=136314
Reviewed by Simon Fraser.
From *edToDevicePixels() to *PointToDevicePixels() (* = floor/round/ceil)
EnclosedIntRect -> enclosingIntRect() changes functionality for InspectorOverlay painting,
but currently untestable.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _updateTapHighlight]):
2014-08-27 Tim Horton <timothy_horton@apple.com>
WebKit2 swipe gesture should report the position of the snapshot to the client
https://bugs.webkit.org/show_bug.cgi?id=136308
rdar://problem/18105827
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _setDidMoveSwipeSnapshotCallback:]):
Add _setDidMoveSwipeSnapshotCallback, and plumb it to ViewGestureController.
Callers provide a block which is called whenever ViewGestureController moves the
swipe *snapshot* layer around.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::boundsOfLayerInLayerBackedWindowCoordinates):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::boundsOfLayerInLayerBackedWindowCoordinates):
Expose a Mac-only way to get the bounds of a given CALayer in window coordinates,
respecting transforms. This only works for layer-backed windows because
it uses CA in order to do the mapping respecting transforms.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::~ViewGestureController):
(WebKit::ViewGestureController::setDidMoveSwipeSnapshotCallback):
Do the Block_copy and Block_release dance to keep our copy of the callback block.
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::handleSwipeGesture):
(WebKit::ViewGestureController::didMoveSwipeSnapshotLayer):
When the swipe snapshot layer moves around, call the block.
2014-08-27 Tim Horton <timothy_horton@apple.com>
Occasional crashes in commitTransientZoom's transaction completion block
https://bugs.webkit.org/show_bug.cgi?id=136309
<rdar://problem/17215064>
Reviewed by Dan Bernstein.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
Hold a reference to zoomLayer and the WebPage. It's possible that either
of these things could have gone away by the time the transaction is committed.
2014-08-27 Benjamin Poulain <bpoulain@apple.com>
[iOS WK2] Provide a delegate callback to skip Geolocation authorization per page for WebApp
https://bugs.webkit.org/show_bug.cgi?id=136243
Reviewed by Sam Weinig.
Just ask the UI if the authorization dialog needs to be skipped.
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]): Deleted.
The code in WKContentView only exists due to legacy. Instead, the PageClient dispatch the request
to the GeolocationProvider directly.
* UIProcess/ios/WKGeolocationProviderIOS.h:
* UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:view:]):
(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
(-[WKGeolocationProviderIOS positionChanged:]):
(-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]): Deleted.
2014-08-27 Beth Dakin <bdakin@apple.com>
overflow:scroll elements should not latch to the body if the body is
overflow:hidden
https://bugs.webkit.org/show_bug.cgi?id=136273
Reviewed by Darin Adler.
New ScrollabeArea virtual function.
* WebProcess/Plugins/PDF/PDFPlugin.h:
2014-08-26 Matt Lilek <mrl@apple.com>
Add WebKit SPI to control the navigator.standalone property
https://bugs.webkit.org/show_bug.cgi?id=136189
Reviewed by Andy Estes.
Add a property to WKPreferences that allows toggling this setting.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _isStandalone]):
(-[WKPreferences _setStandalone:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2014-08-26 Joseph Pecoraro <pecoraro@apple.com>
FileReader cannot read files selected with <input type="file"> in iOS 8
https://bugs.webkit.org/show_bug.cgi?id=136117
Reviewed by Alexey Proskuryakov.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
Correct an overzealous deny that was accidentally denying all
com.apple.app-sandbox.read extensions instead of just the ones
in Application bundles it was trying to deny.
2014-08-26 Tim Horton <timothy_horton@apple.com>
Crashes in ViewGestureController::beginSwipeGesture when swiping in rapid succession
https://bugs.webkit.org/show_bug.cgi?id=136271
<rdar://problem/17923694>
Reviewed by Simon Fraser.
It was possible to get into trackSwipeGesture while another swipe was still
occurring, because the guard against this happening depended on m_pendingSwipeReason
never being set while a swipe was occurring. However, if the very first scroll event
had sufficient magnitude, we would still set m_pendingSwipeReason to InsufficientMagnitude,
and then *never clear it*, leading to a path around the guard against multiple live swipes.
This in turn allowed stale layers in m_liveSwipeLayers, which lead to the crash.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::handleScrollWheelEvent):
Don't unset m_pendingSwipeReason before calling trackSwipeGesture;
trackSwipeGesture will do it itself.
Don't set m_pendingSwipeReason to InsufficientMagnitude
if the event actually *has* sufficient magnitude to start a swipe.
(WebKit::ViewGestureController::trackSwipeGesture):
Assert that we don't have an active gesture while starting a swipe.
Reset m_pendingSwipeReason, because the swipe is no longer pending!
2014-08-26 Andy Estes <aestes@apple.com>
[Cocoa] Some projects are incorrectly installed to $BUILT_PRODUCTS_DIR
https://bugs.webkit.org/show_bug.cgi?id=136267
Reviewed by Dan Bernstein.
INSTALL_PATH was set to $BUILT_PRODUCTS_DIR for engineering configurations in r20225 as part of a build fix.
Not only is this no longer necessary to build, but it causes built products to be incorrectly installed in
engineering configurations.
Remove the setting of INSTALL_PATH from the pbxproj file so that the value specified in the xcconfig files is
used instead.
* WebKit2.xcodeproj/project.pbxproj:
2014-08-25 Maciej Stachowiak <mjs@apple.com>
Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
https://bugs.webkit.org/show_bug.cgi?id=136082
Reviewed by Alexey Proskuryakov.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService): Remove accidental leftover retrieval
of the localization.
(WebKit::createProcess): Get current localization name from
CFBundle API instead of using SPI.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Remove mention of WKCopyCFLocalizationPreferredName
* mac/WebKit2.order: ditto
2014-08-26 Dana Burkart <dburkart@apple.com>
The UNUSED_PARAM macros in ServicesOverlayController.mm are causing ASan build failures.
https://bugs.webkit.org/show_bug.cgi?id=136262
Reviewed by David Kilzer.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::selectionRectsDidChange):
(WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
2014-08-26 Csaba Osztrogonác <ossy@webkit.org>
[EFL] URTBF after r172966.
* UIProcess/efl/WebViewEfl.h:
2014-08-26 Carlos Alberto Lopez Perez <clopez@igalia.com>
REGRESSION(r172966) [GTK] Build broken.
Unreviewed build fix after r172966.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
* UIProcess/API/gtk/PageClientImpl.h:
2014-08-26 Simon Fraser <simon.fraser@apple.com>
Crashes in hit testing under WebPage::determinePrimarySnapshottedPlugIn()
https://bugs.webkit.org/show_bug.cgi?id=136240
rdar://problem/17231462
Reviewed by Darin Adler.
determinePrimarySnapshottedPlugIn() does render tree hit testing, so needs
to ensure that layout is up-to-date.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
2014-08-26 Tim Horton <timothy_horton@apple.com>
REGRESSION (r172771): Amazon product page becomes unresponsive after swiping back to it
https://bugs.webkit.org/show_bug.cgi?id=136260
<rdar://problem/18107826>
Reviewed by Dan Bernstein.
Previously, when a swipe ended up performing a same-document navigation,
we would never get didFinishLoadForMainFrame nor didFirstVisuallyNonEmptyLayoutForMainFrame
nor would we even get didHitRenderTreeSizeThreshold in all cases, so we would never
remove the swipe snapshot. Previous implementations removed the snapshot on
didSameDocumentNavigation for the main frame if the navigation type was Replace or Pop,
so we will match that behavior.
Also, reinstate the watchdog that starts at swipe-end which would have prevented
this bug from forever breaking the view it was associated with.
Also, defend against removing the snapshot before the swipe has finished (before
we have even caused the navigation that we're watching for the effects of).
* UIProcess/API/mac/WKView.mm:
(-[WKView _didSameDocumentNavigationForMainFrame:]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didSameDocumentNavigationForMainFrame):
Plumb main-frame same-document navigation notification from WebPageProxy
to ViewGestureControllerMac via PageClient and WKView.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
Keep track of whether a swipe is currently occurring. We can't use
activeGestureType for this because the swipe currently remains the "active"
gesture until the snapshot is removed.
Reintroduce the old swipeWatchdogTimer (and rename the shorter timer that starts
when we get a visually non-empty layout) so that we will always remove the
snapshot after 5 seconds, even if we haven't committed the load.
This could lead to flashing back to the old content if we fail to get a single
byte for 5 seconds, but that is a rare case and should eventually get additional
special treatment (dropping the tiles until we do get content, or some such).
(WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
If a swipe is still in progress, we haven't done our navigation and thus
don't care about render tree size changes.
(WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
If a swipe is still in progress, we haven't done our navigation and thus
don't care about layouts.
Stop the 5 second overall watchdog if we start the 3 second after-visuallyNonEmptyLayout
watchdog. This means that the snapshot could stay up for a maximum of 8 seconds
for a very, very slow load.
(WebKit::ViewGestureController::didFinishLoadForMainFrame):
If a swipe is still in progress, we haven't done our navigation and thus
don't care about loads that complete.
(WebKit::ViewGestureController::didSameDocumentNavigationForMainFrame):
Remove the swipe snapshot after painting if we do replaceState or popState.
(WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
If a swipe is still in progress, we shouldn't remove the snapshot yet.
2014-08-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Translations are not initialized in the UI process
https://bugs.webkit.org/show_bug.cgi?id=136249
Reviewed by Philippe Normand.
This is breaking things like webkitContextMenuActionGetForContextMenuItem()
for non English locales in the cases where we use the action title to guess the
action, because the action title we get from the web process is translated while
the one in the UI process is in English.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext): Initialize gettext right before
creating the default web context.
2014-08-26 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Remove dead code in WebPageEfl.cpp
https://bugs.webkit.org/show_bug.cgi?id=136246
Reviewed by Gyuyoung Kim.
* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::scroll): Deleted.
2014-08-26 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Build break using clang
https://bugs.webkit.org/show_bug.cgi?id=136245
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake: defines GTEST_HAS_RTTI=0
2014-08-25 Zalan Bujtas <zalan@apple.com>
Subpixel layout: remove roundedLayoutPoint/roundedLayoutSize functions.
https://bugs.webkit.org/show_bug.cgi?id=136236
Reviewed by Simon Fraser.
These functions simply call LayoutPoint/LayoutSize c'tors. They don't round the input value at all.
Non change in functionality.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::computeCustomFixedPositionRect):
2014-08-25 Antti Koivisto <antti@apple.com>
Don't pass priority as parameter to ResourceLoadScheduler
https://bugs.webkit.org/show_bug.cgi?id=136232
Reviewed by Sam Weinig.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::priority): Deleted.
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
(WebKit::NetworkResourceLoadParameters::encode):
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad):
(WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad):
(WebKit::WebResourceLoadScheduler::scheduleLoad):
* WebProcess/Network/WebResourceLoadScheduler.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously):
2014-08-25 Brady Eidson <beidson@apple.com>
Don't crash when the DataDetectors framework is unavailable.
<rdar://problem/18106066> and https://bugs.webkit.org/show_bug.cgi?id=136234
Reviewed by Tim Horton.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::buildPhoneNumberHighlights): Bail if DD.framework didn’t soft link.
(WebKit::ServicesOverlayController::buildSelectionHighlight): Ditto.
2014-08-25 Antti Koivisto <antti@apple.com>
Remove load scheduling code from network process
https://bugs.webkit.org/show_bug.cgi?id=136199
Reviewed by Darin Adler.
Most platforms just flush resource loads directly to the networking layer by
making the parallel load count large. Also we always pass ResourceLoadPriorityHighest
to the scheduler so no actual scheduling happens. This is effectively dead code.
Keep basic support for serializing loads. This is only used for testing.
* NetworkProcess/HostRecord.cpp: Removed.
* NetworkProcess/HostRecord.h: Removed.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::servePendingRequests):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::getNetworkProcessStatistics):
* NetworkProcess/NetworkResourceLoadScheduler.cpp:
(WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler):
(WebKit::NetworkResourceLoadScheduler::scheduleLoader):
(WebKit::NetworkResourceLoadScheduler::removeLoader):
(WebKit::NetworkResourceLoadScheduler::loadsPendingCount):
(WebKit::NetworkResourceLoadScheduler::loadsActiveCount):
(WebKit::NetworkResourceLoadScheduler::scheduleServePendingRequests): Deleted.
(WebKit::NetworkResourceLoadScheduler::requestTimerFired): Deleted.
(WebKit::NetworkResourceLoadScheduler::hostForURL): Deleted.
(WebKit::NetworkResourceLoadScheduler::receivedRedirect): Deleted.
(WebKit::NetworkResourceLoadScheduler::servePendingRequests): Deleted.
(WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders): Deleted.
(WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader): Deleted.
(WebKit::NetworkResourceLoadScheduler::hostsPendingCount): Deleted.
(WebKit::NetworkResourceLoadScheduler::hostsActiveCount): Deleted.
* NetworkProcess/NetworkResourceLoadScheduler.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::~NetworkResourceLoader):
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::isLoadingMainResource):
(WebKit::NetworkResourceLoader::setHostRecord): Deleted.
(WebKit::NetworkResourceLoader::hostRecord): Deleted.
* NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
(WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
(WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted.
* NetworkProcess/soup/NetworkResourceLoadSchedulerSoup.cpp:
(WebKit::NetworkResourceLoadScheduler::platformInitializeNetworkSettings):
(WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2014-08-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Older versions of WebKit should use the plugins cache in read only mode
https://bugs.webkit.org/show_bug.cgi?id=136215
Reviewed by Philippe Normand.
Now that WebKitGTK+ 2.4 and 2.5 are parallel installable, since
they use different versions of the plugins cache, apps using 2.4
might override the plugins cache file. We should prevent this from
happening by making older versions use the plugin cache, but not
downgrade it.
* UIProcess/Plugins/gtk/PluginInfoCache.cpp:
(WebKit::PluginInfoCache::PluginInfoCache):
(WebKit::PluginInfoCache::updatePluginInfo):
* UIProcess/Plugins/gtk/PluginInfoCache.h:
2014-08-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Should check if a plugin mixes GTK+ symbols earlier
https://bugs.webkit.org/show_bug.cgi?id=136214
Reviewed by Philippe Normand.
We are currently checking if the plugin module and the plugin
process mix GTK symbols after the plugin has been loaded and
initialized. This is too late in many cases, since plugins can use
GTK methods in the NP_Initialize implementation. This is causing
the apps using WebKitGTK+ 2.4 to freeze when the plugin process
scans the plugins and there's a plugin using GTK+3 installed. We
should move the check earlier, once the module is loaded but
before calling NP_Initialize.
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
(WebKit::moduleMixesGtkSymbols):
(WebKit::NetscapePluginModule::tryLoad):
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPostInitialize):
2014-08-25 Zan Dobersek <zdobersek@igalia.com>
Improve virtual method declarations in LayerTreeHostGtk
https://bugs.webkit.org/show_bug.cgi?id=136210
Reviewed by Carlos Garcia Campos.
Mark the LayerTreeHostGtk class as final in the virtual inheritance hierarchy.
Order the public and private virtual method overrides from the LayerTreeHost
and GraphicsLayerClient interfaces. Explicitly mark them as overriding the
base class methods.
Remove the overriding notifyAnimationStarted() and notifyFlushRequired()
methods since they are identical to the methods in the base class.
De-virtualize flushPendingLayerChanges(). It's not inherited and is not
overriden by anything (and nothing can inherit from LayerTreeHostGtk from
now on due to the final specifier).
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::notifyAnimationStarted): Deleted.
(WebKit::LayerTreeHostGtk::notifyFlushRequired): Deleted.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
(WebKit::LayerTreeHostGtk::didCommitChangesForLayer): Deleted.
2014-08-24 Brian J. Burg <burg@cs.washington.edu>
Remove unused method declarations replaced by WebPage::setViewState
https://bugs.webkit.org/show_bug.cgi?id=136180
Reviewed by Darin Adler.
* WebProcess/WebPage/WebPage.h:
Remove setFocused, setActive, setViewIsVisible. No longer used.
2014-08-23 Byungseon Shin <sun.shin@lge.com>
Unify GraphicsLayer::setContentsToMedia and setContentsToCanvas
https://bugs.webkit.org/show_bug.cgi?id=109658
Reviewed by Martin Robinson.
Based on patch originally written by Tim Horton.
Merge setContentsToMedia and setContentsToCanvas into setContentsToPlatformLayer.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::encode):
(IPC::ArgumentCoder<CoordinatedGraphicsLayerState>::decode):
Rename canvas -> platformLayer.
2014-08-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r172866.
https://bugs.webkit.org/show_bug.cgi?id=136177
Broke iOS build (Requested by othermaciej on #webkit).
Reverted changeset:
"Replace use of WKCopyCFLocalizationPreferredName with
NSLocale public API"
https://bugs.webkit.org/show_bug.cgi?id=136082
http://trac.webkit.org/changeset/172866
2014-08-19 Maciej Stachowiak <mjs@apple.com>
Replace use of WKCopyCFLocalizationPreferredName with NSLocale public API
https://bugs.webkit.org/show_bug.cgi?id=136082
Reviewed by Alexey Proskuryakov.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService): Remove accidental leftover retrieval
of the localization.
(WebKit::createProcess): Get current localization name from
CFBundle API instead of using SPI.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Remove mention of WKCopyCFLocalizationPreferredName
* mac/WebKit2.order: ditto
2014-08-22 Daniel Bates <dabates@apple.com>
[iOS] Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, and temporarily disable ENABLE_TOUCH_EVENTS
and ENABLE_XSLT when building with the iOS public SDK
https://bugs.webkit.org/show_bug.cgi?id=135945
Reviewed by Andy Estes.
* Configurations/FeatureDefines.xcconfig: Disable ENABLE_IOS_{GESTURE, TOUCH}_EVENTS, ENABLE_TOUCH_EVENTS
and ENABLE_XSLT when building with the public SDK.
* Shared/WebEventConversion.h: Write preprocessor logic in terms of ENABLE(IOS_TOUCH_EVENTS).
* WebProcess/WebPage/WebPage.h: Ditto.
2014-08-22 Simon Fraser <simon.fraser@apple.com>
Implement paint flashing via GraphicsLayers in the WK2 inspector overlay
https://bugs.webkit.org/show_bug.cgi?id=136136
Reviewed by Sam Weinig, Joseph Pecoraro.
Allow InspectorClient to have a custom implementation of showPaintRect(). For
WebKit2's WebInspectorClient, implement this by creating a set of GraphicsLayers
which are parented in a document overlay, with 0.25s fade-out animations.
Also change InspectorInstrumentation::didPaintImpl() to no longer take a GraphicsContext;
it makes no sense to paint the paint rects directly into the context of the web page.
Now that the paint rects are painted into an overlay, the rectangles need to be converted
to root document coordinates, which is done in InspectorInstrumentation::didPaintImpl().
Remove the generic InspectorOverlay::drawOutline()-based indicators; they will
be reimplemented in a later patch.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::RepaintIndicatorLayerClient::RepaintIndicatorLayerClient):
(WebKit::RepaintIndicatorLayerClient::~RepaintIndicatorLayerClient):
(WebKit::RepaintIndicatorLayerClient::notifyAnimationEnded):
(WebKit::WebInspectorClient::WebInspectorClient):
(WebKit::WebInspectorClient::~WebInspectorClient):
(WebKit::WebInspectorClient::showPaintRect):
(WebKit::WebInspectorClient::animationEndedForLayer):
* WebProcess/WebCoreSupport/WebInspectorClient.h:
(WebKit::WebInspectorClient::WebInspectorClient): Deleted.
2014-08-22 Jon Lee <jonlee@apple.com>
Fix iOS build due to r172832 and move RUBBER_BANDING out of FeatureDefines.h
https://bugs.webkit.org/show_bug.cgi?id=136157
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig: Add ENABLE(RUBBER_BANDING).
2014-08-21 Joseph Pecoraro <pecoraro@apple.com>
Possible RetainPtr misuse in WKScriptMessage.mm - could leak
https://bugs.webkit.org/show_bug.cgi?id=136140
Reviewed by Darin Adler.
Adopt a copy into a RetainPtr to avoid leaking.
* UIProcess/API/Cocoa/WKScriptMessage.mm:
(-[WKScriptMessage _initWithBody:webView:frameInfo:name:]):
2014-08-21 Simon Fraser <simon.fraser@apple.com>
Add animationDidEnd callbacks on GraphicsLayer
https://bugs.webkit.org/show_bug.cgi?id=136084
Reviewed by Tim Horton.
Hook up GraphicsLayerClient::notifyAnimationEnded() so that code using GraphicsLayers directly
can add animations, and know when they finish.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidEnd):
* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::animationDidEnd):
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::acceleratedAnimationDidEnd):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(-[WKAnimationDelegate animationDidStop:finished:]):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::animationStarted):
(WebKit::PlatformCALayerRemote::animationEnded):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
(WebKit::RemoteLayerTreeContext::willStartAnimationOnLayer):
(WebKit::RemoteLayerTreeContext::animationDidStart):
(WebKit::RemoteLayerTreeContext::animationDidEnd):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidEnd):
2014-08-21 Zalan Bujtas <zalan@apple.com>
Enable SATURATED_LAYOUT_ARITHMETIC.
https://bugs.webkit.org/show_bug.cgi?id=136106
Reviewed by Simon Fraser.
SATURATED_LAYOUT_ARITHMETIC protects LayoutUnit against arithmetic overflow.
(No measurable performance regression on Mac.)
* Configurations/FeatureDefines.xcconfig:
2014-08-21 Víctor Manuel Jáquez Leal <vjaquez@igalia.com>
[GTK] WebkitWebProcess crashing navigating away from ogg video element
https://bugs.webkit.org/show_bug.cgi?id=135348
Reviewed by Philippe Normand.
When a page is cached, by default doesn't recreate the backing store
(an optimization added in r89316).
Not all the ports uses that optimization. For example IOS port doesn't
use it (r161185).
In the case of the GTK port, the MediaPlayerPrivateGStreamer, not only
processes video buffers, also display them, because it is a
TextureMapperPlatformLayer too.
Nevertheless, in r153937, when a page is cached, the player is
destroyed. But our player has a backing store and the render tree
doesn't know that the player has gone. Hence, when the page is redraw,
the TextureMapper tree visits the video element, which doesn't exist
anymore, a segmentation fault occurs.
So, as our media player renders, and as we cannot trust that the
player exists when a page is painted, we cannot rely in the r89316
optimization.
Disabling the backing stores optimization fixes the problem.
Covered by existing tests.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::WebProcess::platformSetCacheModel): Enable the backing store
clearing when page caching for GTK.
2014-08-20 Alex Christensen <achristensen@webkit.org>
Introducing WEBCORE_EXPORT macro.
https://bugs.webkit.org/show_bug.cgi?id=136108
Reviewed by Antti Koivisto.
* config.h:
Added stub definition of WEBCORE_EXPORT defined to nothing to be able to compile with WebCore headers.
2014-08-20 Pratik Solanki <psolanki@apple.com>
Move DiskCacheMonitor to WebCore so that WebKit1 clients can use it as well
https://bugs.webkit.org/show_bug.cgi?id=135896
Reviewed by Andreas Kling.
* NetworkProcess/mac/NetworkDiskCacheMonitor.h:
Inherit from WebCore::DiskCacheMonitor which has the bulk of the functionality now.
(WebKit::NetworkDiskCacheMonitor::~NetworkDiskCacheMonitor):
* NetworkProcess/mac/NetworkDiskCacheMonitor.mm:
(WebKit::NetworkDiskCacheMonitor::monitorFileBackingStoreCreation):
(WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor):
(WebKit::NetworkDiskCacheMonitor::resourceBecameFileBacked):
Override virtual method and send the data to the WebContent process as before.
2014-08-19 Pratik Solanki <psolanki@apple.com>
Remove PurgeableBuffer since it is not very useful any more
https://bugs.webkit.org/show_bug.cgi?id=135939
Reviewed by Andreas Kling.
* WebProcess/WebProcess.cpp:
(WebKit::getWebCoreMemoryCacheStatistics):
2014-08-19 Peyton Randolph <prandolph@apple.com>
Expose injected bundle SPI to get a node's URL element, get the visible selection range of that
element, and snapshot that range
https://bugs.webkit.org/show_bug.cgi?id=136076
Reviewed by Tim Horton.
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.cpp:
(WKBundleHitTestResultCopyURLElementHandle): Added.
* WebProcess/InjectedBundle/API/c/WKBundleHitTestResult.h:
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp:
(WKBundleNodeHandleCopyVisibleRange): Added.
* WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h:
* WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp:
(WKBundleRangeHandleGetBoundingRectInWindowCoordinates): Added.
(WKBundleRangeHandleCopySnapshotWithOptions): Added.
* WebProcess/InjectedBundle/API/c/WKBundleRangeHandlePrivate.h:
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::visibleRange): Added.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp:
(WebKit::InjectedBundleRangeHandle::boundingRectInWindowCoordinates): Added.
(WebKit::InjectedBundleRangeHandle::renderedImage): Added.
* WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h:
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::urlElementHandle): Added.
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.h:
2014-08-19 Zalan Bujtas <zalan@apple.com>
Remove ENABLE(SUBPIXEL_LAYOUT).
https://bugs.webkit.org/show_bug.cgi?id=136077
Reviewed by Simon Fraser.
Remove compile time flag SUBPIXEL_LAYOUT. All ports have it enabled for a while now.
* Configurations/FeatureDefines.xcconfig:
2014-08-19 Peyton Randolph <prandolph@apple.com>
Extend injected bundle node snapshotting to support forced white and black text
https://bugs.webkit.org/show_bug.cgi?id=136061
Reviewed by Beth Dakin.
* Shared/API/c/WKImage.h:
Add -ForceBlackText and -ForceWhiteText snapshotting options.
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toSnapshotOptions):
Support aforementioned text snapshotting options.
* Shared/ImageOptions.h:
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::imageForRect):
Respect text color snapshotting options by setting appropriate paint behaviors.
2014-08-18 Maciej Stachowiak <mjs@apple.com>
Use NSURLFileTypeMappings directly instead of depending on WebKitSystemInterface wrappers for it
https://bugs.webkit.org/show_bug.cgi?id=136035
Reviewed by Dan Bernstein.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Don't initialize the no-longer-used WKGetExtensionsForMIMEType,
WKGetPreferredExtensionForMIMEType, or WKGetMIMETypeForExtension
* mac/WebKit2.order: Remove exports related to above.
2014-08-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r172736.
https://bugs.webkit.org/show_bug.cgi?id=136060
Caused 14% PLT regressions (Requested by rniwa on #webkit).
Reverted changeset:
"Remove PurgeableBuffer since it is not very useful any more"
https://bugs.webkit.org/show_bug.cgi?id=135939
http://trac.webkit.org/changeset/172736
2014-08-18 Simon Fraser <simon.fraser@apple.com>
Provide default implementations of all GraphicsLayerClient methods
https://bugs.webkit.org/show_bug.cgi?id=136054
Reviewed by Tim Horton.
Remove overrides which are no longer required.
* WebProcess/WebPage/PageOverlayController.h:
* WebProcess/WebPage/ServicesOverlayController.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
2014-08-18 Pratik Solanki <psolanki@apple.com>
Remove PurgeableBuffer since it is not very useful any more
https://bugs.webkit.org/show_bug.cgi?id=135939
Reviewed by Geoffrey Garen.
* WebProcess/WebProcess.cpp:
(WebKit::getWebCoreMemoryCacheStatistics):
2014-08-18 Peyton Randolph <prandolph@apple.com>
Expose long mouse press WebKit API. Part of 135257 - Add long mouse press gesture
https://bugs.webkit.org/show_bug.cgi?id=136048
Reviewed by Dan Bernstein.
This patch exposes long mouse press API callbacks in both the injected bundle and on the UI process
through their respective page UI clients. The callbacks are modeled off of the mouseDidMoveOverElement
callback. Like the mouseDidMoveOverElement callback, these callbacks allow the bundle to pass
information to the UI process via a userData out parameter.
* UIProcess/API/APIUIClient.h:
(API::UIClient::didBeginTrackingPotentialLongMousePress): Added.
(API::UIClient::didRecognizeLongMousePress): Added.
(API::UIClient::didCancelTrackingPotentialLongMousePress): Added.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didBeginTrackingPotentialLongMousePress): Added.
(WebKit::WebPageProxy::didRecognizeLongMousePress): Added.
(WebKit::WebPageProxy::didCancelTrackingPotentialLongMousePress): Added.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
(API::InjectedBundle::PageUIClient::didBeginTrackingPotentialLongMousePress): Added.
(API::InjectedBundle::PageUIClient::didRecognizeLongMousePress): Added.
(API::InjectedBundle::PageUIClient::didCancelTrackingPotentialLongMousePress): Added.
* WebProcess/InjectedBundle/API/c/WKBundlePageUIClient.h:
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Added.
(WebKit::InjectedBundlePageUIClient::didBeginTrackingPotentialLongMousePress): Added.
(WebKit::InjectedBundlePageUIClient::didRecognizeLongMousePress): Added.
(WebKit::InjectedBundlePageUIClient::didCancelTrackingPotentialLongMousePress): Added.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::didBeginTrackingPotentialLongMousePress): Added.
(WebKit::WebChromeClient::didRecognizeLongMousePress): Added.
(WebKit::WebChromeClient::didCancelTrackingPotentialLongMousePress): Added.
* WebProcess/WebCoreSupport/WebChromeClient.h:
2014-08-18 Przemyslaw Kuczynski <p.kuczynski@samsung.com>
Fix unintentional integer overflow before widen
https://bugs.webkit.org/show_bug.cgi?id=135463
Reviewed by Oliver Hunt.
Overflowing expression is evaluated using operands arithmetic but then is used in
context which expects an wider integer type. To avoid overflow at least one operand
has to be representative of the wider type.
* WebProcess/soup/WebProcessSoup.cpp:
(WebKit::getMemorySize): Added long long literal.
2014-08-18 Przemyslaw Kuczynski <p.kuczynski@samsung.com>
Fix resource leak in unclosed file descriptor handles
https://bugs.webkit.org/show_bug.cgi?id=135458
Reviewed by Oliver Hunt.
Leaving descriptor unclosed will cause the resources associated with the open
file description never be freed (they are freed on closing the last descriptor
refering to the underlying file).
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::StdoutDevNullRedirector::StdoutDevNullRedirector): Closed newStdout descriptor.
(WebKit::StdoutDevNullRedirector::~StdoutDevNullRedirector): Closed m_savedStdout descriptor.
2014-08-18 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL] ewk_init() is sufficient to initialize EFL components
https://bugs.webkit.org/show_bug.cgi?id=136036
Reviewed by Gyuyoung Kim.
Developers do not have to initialize EFL components as ewk_init()
already does it.
* UIProcess/API/efl/ewk_intro.h:
2014-08-16 Pratik Solanki <psolanki@apple.com>
Rename DiskCacheMonitor to NetworkDiskCacheMonitor
https://bugs.webkit.org/show_bug.cgi?id=135897
Reviewed by Andreas Kling.
In preparation for moving DiskCacheMonitor code to WebCore in bug 135896, rename the WebKit2
class to NetworkDiskCacheMonitor.
* NetworkProcess/mac/NetworkDiskCacheMonitor.h: Renamed from Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.h.
(WebKit::NetworkDiskCacheMonitor::resourceRequest):
* NetworkProcess/mac/NetworkDiskCacheMonitor.mm: Renamed from Source/WebKit2/NetworkProcess/mac/DiskCacheMonitor.mm.
(WebKit::NetworkDiskCacheMonitor::monitorFileBackingStoreCreation):
(WebKit::NetworkDiskCacheMonitor::NetworkDiskCacheMonitor):
(WebKit::NetworkDiskCacheMonitor::messageSenderConnection):
(WebKit::NetworkDiskCacheMonitor::messageSenderDestinationID):
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::willCacheResponseAsync):
* WebKit2.xcodeproj/project.pbxproj:
2014-08-16 Byungseon Shin <sun.shin@lge.com>
[GTK] build fails with error: cannot allocate an object of abstract type 'WebKit::PageClientImpl'
https://bugs.webkit.org/show_bug.cgi?id=136017
Reviewed by Gyuyoung Kim.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
(WebKit::PageClientImpl::didFinishLoadForMainFrame):
* UIProcess/API/gtk/PageClientImpl.h:
2014-08-15 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Add ewk_intro.h to describe main page of doxygen
https://bugs.webkit.org/show_bug.cgi?id=136013
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake:
* UIProcess/API/efl/EWebKit2.h.in:
* UIProcess/API/efl/ewk_intro.h: Added.
2014-08-15 Zalan Bujtas <zalan@apple.com>
Do not use FloatRect::infiniteRect() to flag full repaints.
https://bugs.webkit.org/show_bug.cgi?id=135900
Reviewed by Simon Fraser.
Converting FloatRect::infiniteRect() to IntRect leads to value overflow
and we end up with invalid repaint rectangle. Use a boolean flag to indicate
full repaint request.
Covered by existing tests.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::setNeedsDisplayInRect):
(WebKit::PlatformCALayerRemote::setNeedsDisplay):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::setNeedsDisplayInRect):
(WebKit::PlatformCALayerRemoteCustom::setNeedsDisplay):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
(WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplayInRect):
(WebKit::PlatformCALayerRemoteTiledBacking::setNeedsDisplay):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2014-08-15 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r172660): WebKit2.TerminateTwice asserts
https://bugs.webkit.org/show_bug.cgi?id=136012
* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::terminateProcess):
Added bug number to a fixme.
2014-08-15 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed build fix on the EFL port since r172635
* UIProcess/WebPageProxy.cpp: Guard removeNavigationGestureSnapshot with PLATFORM(MAC) macro.
* UIProcess/WebPageProxy.h: Ditto.
* UIProcess/efl/WebViewEfl.h: Added didFirstVisuallyNonEmptyLayoutForMainFrame and didFinishLoadForMainFrame as dummy.
2014-08-15 Alexey Proskuryakov <ap@apple.com>
Improve page to process relationship tracking
https://bugs.webkit.org/show_bug.cgi?id=135996
<rdar://problem/16991213>
Reviewed by Sam Weinig.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::removeAll):
(WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
(WebKit::VisitedLinkProvider::sendTable):
Added assertions for m_processes only having valid entries.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcess): When attaching to a new process,
tell the old process that the page is not longer associated with it, avoiding
a potential stale pointer.
If re-attached to an existing process, make sure that we perform all the same
registrations as after having launched a new process. This substantially improves
the behavior when the number of open tabs is over process limit.
(WebKit::WebPageProxy::reattachToWebProcessWithItem): Added ASSERT(!isValid())
to avoid confusion. All other calls to reattachToWebProcess() have this as a
runtime check, but reattachToWebProcessWithItem() is only called for valid pages.
(WebKit::WebPageProxy::terminateProcess): Added an assertion with a FIXME for
something that will need to be fixed another day.
* UIProcess/WebPageProxy.h: Removed an unimplemented function.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addExistingWebPage): Added assertions for page map sanity.
(WebKit::WebProcessProxy::removeWebPage): Added a check for page state being Terminated
already. This avoids an assertion failure that happened under the new call to
removeWebPage() in reattachToWebProcess(), as we are now calling it for terminated
processes that are not in WebContext::m_processes any more.
(WebKit::WebProcessProxy::didFinishLaunching): Added an assertion that page agrees
about using this process.
2014-08-15 Gavin Barraclough <barraclough@apple.com>
Fix plugin visibility check.
https://bugs.webkit.org/show_bug.cgi?id=135991
D'oh, more unreviewed typo fix. :-(
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::visibilityDidChange):
(WebKit::PluginControllerProxy::windowVisibilityChanged):
(WebKit::PluginControllerProxy::updateVisibilityActivity):
(WebKit::PluginControllerProxy::updateVisiblityActivity): Deleted.
* PluginProcess/PluginControllerProxy.h:
2014-08-15 Wenson Hsieh <wenson_hsieh@apple.com>
Implement snapping behavior for iOS
https://bugs.webkit.org/show_bug.cgi?id=135769
Reviewed by Brent Fulgham.
Added support for snap points on iOS.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode): Added snap offset encoding.
(ArgumentCoder<ScrollingStateScrollingNode>::decode): Added snap offset decoding.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]): For mainframe scrolling, retargets the scroll destination to the appropriate snap point.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h: Added methods to extract relevant information for WKWebView from snap offsets in mainframe scrolling.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate scrollViewWillEndDragging:withVelocity:targetContentOffset:]): For overflow scrolling, retargets the scroll destination to the appropriate snap point.
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren): Sets the deceleration factor to FAST if snap points are active.
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::adjustTargetContentOffsetForSnapping): Used by WKWebView for mainframe scrolling to retarget the scroll destination, if necessary.
(WebKit::RemoteScrollingCoordinatorProxy::shouldSetScrollViewDecelerationRateFast): Used by WKWebView for mainframe scrolling to determine whether to set deceleration rate to the fast value.
(WebKit::RemoteScrollingCoordinatorProxy::shouldSnapForMainFrameScrolling): Helper method.
(WebKit::RemoteScrollingCoordinatorProxy::closestSnapOffsetForMainFrameScrolling): Helper method.
2014-08-15 Gavin Barraclough <barraclough@apple.com>
Fix plugin visibility check.
https://bugs.webkit.org/show_bug.cgi?id=135991
Unreviewed typo fix.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::PluginControllerProxy):
(WebKit::PluginControllerProxy::visibilityDidChange):
(WebKit::PluginControllerProxy::windowVisibilityChanged):
(WebKit::PluginControllerProxy::updateVisibilityActivity):
* PluginProcess/PluginControllerProxy.h:
2014-08-15 Gavin Barraclough <barraclough@apple.com>
Fix plugin visibility check.
https://bugs.webkit.org/show_bug.cgi?id=135991
Reviewed by Andreas Kling.
We should only take a UserActivity if the plugin is in a visible window,
and also is itself visible.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::PluginControllerProxy):
- initialize member state.
(WebKit::PluginControllerProxy::visibilityDidChange):
(WebKit::PluginControllerProxy::windowVisibilityChanged):
- update member state & call updateVisibilityActivity.
(WebKit::PluginControllerProxy::updateVisibilityActivity):
- enable the UserActivity only if both visibilities are true.
* PluginProcess/PluginControllerProxy.h:
- added m_isVisible, m_isWindowVisible, updateVisibilityActivity.
2014-08-15 Enrica Casucci <enrica@apple.com>
[Services with UI] Selections are incorrect when selecting three lines.
https://bugs.webkit.org/show_bug.cgi?id=135989
<rdar://problem/18032571>
Reviewed by Tim Horton.
The stitching algorithm did not handle correctly the case of selections
over three lines if the middle line is composed of only one rectangle.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::stitchRects):
2014-08-15 Tim Horton <timothy_horton@apple.com>
Service overlays stay fixed when <iframe> scrolls
https://bugs.webkit.org/show_bug.cgi?id=135959
<rdar://problem/17957716>
Reviewed by Enrica Casucci.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::highlightsAreEquivalent):
Tiny correctness fix; highlights can only be equivalent if their
types are equivalent as well.
2014-08-15 Gavin Barraclough <barraclough@apple.com>
de-PLATFORM(COCOA) a couple of methods in plugin code
https://bugs.webkit.org/show_bug.cgi?id=135987
Reviewed by Sam Weinig.
Pass through the visibility & focus on all platforms, to simplify & avoid
any weird inconsistencies between platforms.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::windowFocusChanged):
(WebKit::PluginControllerProxy::windowVisibilityChanged):
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginControllerProxy.messages.in:
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::windowFocusChanged): Deleted.
(WebKit::PluginControllerProxy::windowVisibilityChanged): Deleted.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::windowFocusChanged):
(WebKit::NetscapePlugin::windowVisibilityChanged):
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::windowAndViewFramesChanged):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewStateDidChange):
(WebKit::PluginView::platformViewStateDidChange): Deleted.
* WebProcess/Plugins/PluginView.h:
2014-08-15 Tim Horton <timothy_horton@apple.com>
Service overlays stay fixed when <iframe> scrolls
https://bugs.webkit.org/show_bug.cgi?id=135959
<rdar://problem/17957716>
Reviewed by Enrica Casucci.
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::didScrollFrame):
* WebProcess/WebPage/PageOverlay.h:
(WebKit::PageOverlay::Client::didScrollFrame):
* WebProcess/WebPage/PageOverlayController.cpp:
(WebKit::PageOverlayController::didScrollFrame):
Push didScrollFrame down to the overlays.
* WebProcess/WebPage/ServicesOverlayController.h:
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::Highlight::createForSelection):
Hold on to the selection's Range so we can use it to compare Highlights later.
(WebKit::ServicesOverlayController::Highlight::Highlight):
(WebKit::ServicesOverlayController::Highlight::setDDHighlight):
Factor the code to set up and paint the highlight out, so that we can
set a new DDHighlightRef on a Highlight and the layer moves/reshapes/repaints.
(WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
(WebKit::ServicesOverlayController::buildSelectionHighlight):
(WebKit::ServicesOverlayController::replaceHighlightsOfTypePreservingEquivalentHighlights):
Factor replaceHighlightsOfTypePreservingEquivalentHighlights out
so that we can use it for buildSelectionHighlight as well.
Steal the DDHighlightRef from the new Highlight when re-using an old one
so that the newly computed rects are used instead of the old ones.
(WebKit::ServicesOverlayController::highlightsAreEquivalent):
We will always have a Range now, so we can always check equivalence using it.
(WebKit::ServicesOverlayController::didScrollFrame):
Rebuild all highlights upon subframe scroll, as they might have moved.
We could optimize this in the future, but for now it's cheap enough
and rare enough that it doesn't matter.
2014-08-15 Tim Horton <timothy_horton@apple.com>
REGRESSION (WebKit2 Gestures): White flash when swiping back to cnn.com's homepage from an article
https://bugs.webkit.org/show_bug.cgi?id=135951
<rdar://problem/18006149>
Reviewed by Simon Fraser.
Wait for (the first visually non-empty layout AND the render tree size threshold to be hit),
OR didFinishLoadForFrame, whichever comes first. Once we've done the first visually non-empty layout,
we'll start the watchdog and tear down the snapshot in three seconds no matter what.
Also, force a repaint so we can asynchronously wait for the Web Process to paint and return to us
before removing the snapshot, which improves our chances that something is actually on the screen.
* UIProcess/API/mac/WKView.mm:
(-[WKView _didFirstVisuallyNonEmptyLayoutForMainFrame]):
(-[WKView _didFinishLoadForMainFrame]):
(-[WKView _removeNavigationGestureSnapshot]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFinishLoadForFrame):
(WebKit::WebPageProxy::didFirstVisuallyNonEmptyLayoutForFrame):
(WebKit::WebPageProxy::removeNavigationGestureSnapshot):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
(WebKit::PageClientImpl::didFinishLoadForMainFrame):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didFirstVisuallyNonEmptyLayoutForMainFrame):
(WebKit::PageClientImpl::didFinishLoadForMainFrame):
(WebKit::PageClientImpl::removeNavigationGestureSnapshot):
Plumb didFirstVisuallyNonEmptyLayoutForMainFrame and didFinishLoadForMainFrame
through to ViewGestureController from WebPageProxy via the PageClient, etc.
Ditto for removeNavigationGestureSnapshot, though it is called from a
VoidCallback in ViewGestureController instead of from WebFrameLoaderClient and friends.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::endSwipeGesture):
When finishing a swipe, we want to wait for both the first visually non-empty layout
and the render tree size threshold being hit.
(WebKit::ViewGestureController::didHitRenderTreeSizeThreshold):
(WebKit::ViewGestureController::didFirstVisuallyNonEmptyLayoutForMainFrame):
When both of these things have happened, remove the swipe snapshot (after forcing a repaint).
For didFirstVisuallyNonEmptyLayoutForMainFrame, we will also start a watchdog
ensuring that we remove the snapshot in three seconds.
(WebKit::ViewGestureController::didFinishLoadForMainFrame):
When didFinishLoadForMainFrame happens, remove the swipe snapshot (after forcing a repaint).
(WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
If the watchdog timer fires, remove the swipe snapshot (after forcing a repaint).
(WebKit::ViewGestureController::removeSwipeSnapshotAfterRepaint):
Force a repaint and wait for the async callback before removing the snapshot.
It is safe to hold on to the WebPageProxy here because it will always
call all of its callbacks before it is destroyed.
Avoid enqueuing multiple force-repaints.
(WebKit::ViewGestureController::removeSwipeSnapshot):
2014-08-15 Gavin Barraclough <barraclough@apple.com>
Fix plugin visibility initialization
https://bugs.webkit.org/show_bug.cgi?id=135985
Reviewed by Geoffrey Garen.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::didInitializePlugin):
- We're not currently initializing the plugin visibility state,
and we're passing the wrong value for window visibility.
2014-08-15 Gavin Barraclough <barraclough@apple.com>
Simplify visibility activity accounting for plugins
https://bugs.webkit.org/show_bug.cgi?id=135981
Reviewed by Dan Bernstein.
Just take one per connection, rather than implementing a counting mechanism.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::PluginControllerProxy):
* PluginProcess/PluginControllerProxy.h:
- added m_visiblityActivity.
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess):
(WebKit::PluginProcess::pluginsForWebProcessDidBecomeVisible): Deleted.
(WebKit::PluginProcess::pluginsForWebProcessDidBecomeHidden): Deleted.
* PluginProcess/PluginProcess.h:
- removed pluginsForWebProcessDidBecomeVisible/Hidden.
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::removePluginControllerProxy):
(WebKit::WebProcessConnection::pluginDidBecomeVisible): Deleted.
(WebKit::WebProcessConnection::pluginDidBecomeHidden): Deleted.
* PluginProcess/WebProcessConnection.h:
- removed pluginDidBecomeVisible/Hidden.
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::windowVisibilityChanged):
- windowVisibilityChanged uses m_visiblityActivity, rather than calling to PluginControllerProxy.
2014-08-15 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.3 release.
* gtk/NEWS: Add release notes for 2.5.3.
2014-08-14 Enrica Casucci <enrica@apple.com>
[Services with UI] Selection services don't work inside <iframes>.
https://bugs.webkit.org/show_bug.cgi?id=135941
<rdar://problem/17957690>
Reviewed by Tim Horton.
Need to map the selection rectangles using the correct FrameView.
When handling the click, we must use the selection from the focused frame.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::buildSelectionHighlight):
(WebKit::ServicesOverlayController::handleClick):
2014-08-13 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/135909> Move helper applications out of the root of the framework.
As described in <https://developer.apple.com/library/mac/technotes/tn2206/>, for bundles containing
a Versions directory there may be no other content at the top level of the bundle other than symlinks.
Upcoming changes to code signing will prevent bundles that violate this rule from being signed.
Reviewed by Sam Weinig.
* Configurations/Base.xcconfig: Define a configuration setting that points to the content directory
of the framework. On OS X this is Versions/A. On iOS, where frameworks are shallow, this is the top level.
* Configurations/BaseLegacyProcess.xcconfig: Install the legacy processes in the content directory
of the framework.
* WebKit2.xcodeproj/project.pbxproj: Copy the legacy processes into the content directory of the
framework during engineering builds. Generate symlinks for the legacy processes to their locations
in Versions/Current. This is necessary because -[NSBundle pathForAuxiliaryExecutable:] only looks
at the top level of the framework wrapper.
2014-08-14 Michael Catanzaro <mcatanzaro@igalia.com>
WebKit2GTK - WebKitWebProcess assertion fails when dragging and dropping a file into the view
https://bugs.webkit.org/show_bug.cgi?id=127576
Reviewed by Carlos Garcia Campos.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performDragControllerAction): Assume read access
to any file that has been dragged into the web view when compiling for
GTK, since we don't support sandbox extensions.
2014-08-13 Wenson Hsieh <wenson_hsieh@apple.com>
Enable CSS_SCROLL_SNAP for iOS
https://bugs.webkit.org/show_bug.cgi?id=135915
Turn on CSS_SCROLL_SNAP for iOS and the iOS simulator.
Reviewed by Tim Horton.
* Configurations/FeatureDefines.xcconfig:
2014-08-13 Enrica Casucci <enrica@apple.com>
[Services with UI] Use a longer delay duration for editable content.
https://bugs.webkit.org/show_bug.cgi?id=135918
<rdar://problem/17998929>
Reviewed by Tim Horton.
Use a 1 second delay for selections in editable content.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
2014-08-13 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/135911> WebKit should build on Yosemite with the public SDK.
Reviewed by Darin Adler.
* Platform/IPC/mac/ImportanceAssertion.h: Forward-declare the new assertion functions we use.
* UIProcess/mac/WebContextMenuProxyMac.mm: Forward-declare some details related to NSSharingServicePicker.
2014-08-13 Alexey Proskuryakov <ap@apple.com>
iOS build fix.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureNetworkProcess):
(WebKit::WebContext::createNewWebProcess):
2014-08-13 Joseph Pecoraro <pecoraro@apple.com>
Opening Web Inspector causes a large amount of sandbox violations
https://bugs.webkit.org/show_bug.cgi?id=135908
Reviewed by Timothy Hatcher.
* WebProcess/com.apple.WebProcess.sb.in:
Permit the WebContent process to create file read extensions for the
system WebInspectorUI.framework which the Network process can already
read anyways.
2014-08-13 Tim Horton <timothy_horton@apple.com>
Avoid making new active service overlay highlights while the mouse is down
https://bugs.webkit.org/show_bug.cgi?id=135872
<rdar://problem/17982341>
Reviewed by Enrica Casucci.
* WebProcess/WebPage/ServicesOverlayController.h:
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
(WebKit::ServicesOverlayController::mouseEvent):
If the mouse is pressed or it's been less than 200ms since the mouse went up,
don't allow the highlight to change. We apply the mouse-is-pressed rule to telephone
number highlights as well, unlike the rest of the hysteresis logic.
2014-08-13 Timothy Hatcher <timothy@apple.com>
Web Inspector: Workaround a NSWindow change to the title bar.
https://bugs.webkit.org/show_bug.cgi?id=135880
Reviewed by Joseph Pecoraro.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow): Set titlebarAppearsTransparent on 10.10.
Only call border thickness APIs on 10.9 and earlier.
(WebKit::WebInspectorProxy::platformCreateInspectorPage): Only call setDrawsBackground: on 10.9 and earlier.
(WebKit::WebInspectorProxy::platformSetToolbarHeight): Only call setContentBorderThickness: on 10.9 and earlier.
2014-08-13 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Add API to set application name for the user agent
https://bugs.webkit.org/show_bug.cgi?id=135640
Reviewed by Gyuyoung Kim.
Add ewk_application_name_for_user_agent_set to make default user agent string
with application name which application passes.
It's useful for application to set only application information without knowledge
of legacy user agent components.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
(EwkView::setApplicationNameForUserAgent):
* UIProcess/API/efl/EwkView.h:
(EwkView::applicationNameForUserAgent):
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_application_name_for_user_agent_set):
(ewk_view_application_name_for_user_agent_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::standardUserAgent):
2014-08-12 Carlos Garcia Campos <cgarcia@igalia.com>
[CMAKE] WebProcess shouldn't need to explicitly link to JavaScriptCore and WebCore
https://bugs.webkit.org/show_bug.cgi?id=135832
Reviewed by Gyuyoung Kim.
Linking to WebKit2 should be enough, like Network and Plugin processes.
* CMakeLists.txt:
2014-08-12 Tim Horton <timothy_horton@apple.com>
Document-relative page overlays drop some mouse events with non-zero top content inset
https://bugs.webkit.org/show_bug.cgi?id=135871
<rdar://problem/17982275>
Reviewed by Beth Dakin.
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::mouseEvent):
Convert the mouse position into document-relative coordinates; the bounds()
already are! This way, we can actually compare them without being wrong sometimes.
2014-08-12 Peyton Randolph <prandolph@apple.com>
Runtime switch for long mouse press gesture. Part of 135257 - Add long mouse press gesture
https://bugs.webkit.org/show_bug.cgi?id=135682
Reviewed by Tim Horton.
* Configurations/FeatureDefines.xcconfig: Remove LONG_MOUSE_PRESS feature flag.
* Shared/WebPreferencesDefinitions.h:
Add LongMousePressEnabled preference, initially false.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetLongMousePressEnabled): Added.
(WKPreferencesGetLongMousePressEnabled): Added.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Reflect the WebKit long mouse press setting in WebCore.
2014-08-12 Pratik Solanki <psolanki@apple.com>
Cached file backed resources don't make it to the Web Process when NETWORK_CFDATA_ARRAY_CALLBACK is enabled
https://bugs.webkit.org/show_bug.cgi?id=135727
<rdar://problem/17947880>
Reviewed by Darin Adler.
tryGetShareableHandleFromSharedBuffer() assumed that we have a file backed resource only if
we had a CFDataRef (platformData()) in SharedBuffer. This is wrong when we use the data
array callbacks since the file backed buffer could be in the data array. Instead of relying
on hasPlatformData(), explicitly ask the SharedBuffer to give us a CFDataRef if it has one
so that SharedBuffer can take care of the data array case.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
2014-08-12 Alexey Proskuryakov <ap@apple.com>
REGRESSION: WebContent process has a sandbox extension for the entirety of user's temp directory
https://bugs.webkit.org/show_bug.cgi?id=135853
<rdar://problem/17986556>
Reviewed by Oliver hunt.
Move extensions recently added for iOS benefit under PLATFORM(IOS). Removed some
dead code while at it (child processes don't need actual paths, they only need
sandbox extensions in most cases).
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureNetworkProcess):
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::openGLCacheDirectory): Deleted.
(WebKit::WebContext::networkingHSTSDatabasePath): Deleted.
* UIProcess/WebContext.h:
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::containerTemporaryDirectory): Deleted.
(WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::containerTemporaryDirectory): Deleted.
(WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::openGLCacheDirectory):
(WebKit::WebContext::parentBundleDirectory):
(WebKit::WebContext::networkingHSTSDatabasePath):
(WebKit::WebContext::platformDefaultOpenGLCacheDirectory): Deleted.
(WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-08-12 Tim Horton <timothy_horton@apple.com>
Small region (~1px tall) where you get the selection button instead of the phone number overlay
https://bugs.webkit.org/show_bug.cgi?id=135852
<rdar://problem/17992795>
Reviewed by Enrica Casucci.
* WebProcess/WebPage/ServicesOverlayController.h:
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::findTelephoneNumberHighlightContainingSelectionHighlight):
(WebKit::ServicesOverlayController::determineActiveHighlight):
If our new active highlight is a selection highlight that is completely contained
by one of the phone number highlights, we'll make the phone number highlight active
even if it's not hovered. This fixes the case where the selection highlight
(a subset of a telephone number) is slightly taller than the telephone number
highlight, and can be hovered without hovering the phone number highlight.
2014-08-12 Tim Horton <timothy_horton@apple.com>
REGRESSION (r172424): Extra menu header in combined telephone number menu when no phone paired
https://bugs.webkit.org/show_bug.cgi?id=135854
<rdar://problem/17996339>
Reviewed by Enrica Casucci.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
Get all the menu items ahead of time, and only add the shared header
if there are any telephone number menu items.
2014-08-12 Enrica Casucci <enrica@apple.com>
Crash at com.apple.WebKit.WebContent at com.apple.WebKit: WebKit::expandForGap
https://bugs.webkit.org/show_bug.cgi?id=135859
<rdar://problem/17994679>
Reviewed by Tim Horton.
expandForGap made the assumption that the selection rects were always three.
This was not true even before http://trac.webkit.org/changeset/172395 but
was more likely to happen after that change.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::expandForGap):
2014-08-12 Tim Horton <timothy_horton@apple.com>
Don't show the combined menu if there are no services available
https://bugs.webkit.org/show_bug.cgi?id=135846
<rdar://problem/17582099>
Reviewed by Enrica Casucci.
* WebProcess/WebPage/ServicesOverlayController.h:
Add a FIXME.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::determineActiveHighlight):
Don't allow a selection Highlight to become active if there is no
service available to handle it. Previously we showed the combined menu
with just phone numbers in it if any were detected.
2014-08-12 Tim Horton <timothy_horton@apple.com>
Add a fade transition to services highlights
https://bugs.webkit.org/show_bug.cgi?id=135829
<rdar://problem/17935736>
Reviewed by Enrica Casucci.
Add a smooth fade to highlight installation and uninstallation.
To do so, we make each highlight paint into its own small layer.
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::layer):
* WebProcess/WebPage/PageOverlay.h:
* WebProcess/WebPage/PageOverlayController.cpp:
(WebKit::PageOverlayController::layerForOverlay):
* WebProcess/WebPage/PageOverlayController.h:
Expose the GraphicsLayer on PageOverlay.
* WebProcess/WebPage/ServicesOverlayController.h:
(WebKit::ServicesOverlayController::Highlight::layer):
(WebKit::ServicesOverlayController::activeHighlight):
(WebKit::ServicesOverlayController::webPage):
(WebKit::ServicesOverlayController::Highlight::Highlight): Deleted.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::Highlight::createForSelection):
(WebKit::ServicesOverlayController::Highlight::createForTelephoneNumber):
(WebKit::ServicesOverlayController::Highlight::Highlight):
Highlights now own a GraphicsLayer, which are later installed
as sublayers of the ServicesOverlayController's PageOverlay layer.
These layers are sized and positioned according to the DDHighlight's bounds.
(WebKit::ServicesOverlayController::Highlight::~Highlight):
(WebKit::ServicesOverlayController::Highlight::invalidate):
ServicesOverlayController will invalidate any remaining highlights
when it is torn down, so they can clear their backpointers.
(WebKit::ServicesOverlayController::Highlight::notifyFlushRequired):
Forward flush notifications to the DrawingArea.
(WebKit::ServicesOverlayController::Highlight::paintContents):
Paint the DDHighlight into the layer. Translation is done by the layer position,
so we zero the bounds origin when painting.
(WebKit::ServicesOverlayController::Highlight::deviceScaleFactor):
Forward the deviceScaleFactor so that things are painted at the right scale.
(WebKit::ServicesOverlayController::Highlight::fadeIn):
(WebKit::ServicesOverlayController::Highlight::fadeOut):
Apply a fade animation to the layer.
(WebKit::ServicesOverlayController::Highlight::didFinishFadeOutAnimation):
When the fade completes, unparent the layer, unless it has become active again.
(WebKit::ServicesOverlayController::ServicesOverlayController):
(WebKit::ServicesOverlayController::~ServicesOverlayController):
Invalidate all highlights, so they can clear their backpointers.
(WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
Make remainingTimeUntilHighlightShouldBeShown act upon a particular highlight
instead of always the active highlight.
(WebKit::ServicesOverlayController::determineActiveHighlightTimerFired): Rename.
(WebKit::ServicesOverlayController::drawRect):
drawRect is no longer called and will no longer do anything; all of the
painting is done in sublayers.
(WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
Ensure that phone number Highlights stay stable even while the selection
changes, by comparing the underlying Ranges and keeping around old Highlights
that match the new ones. This enables us to e.g. fade in while changing
the selection within a phone number.
(WebKit::ServicesOverlayController::buildSelectionHighlight):
(WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
(WebKit::ServicesOverlayController::createOverlayIfNeeded):
Don't call setNeedsDisplay; the overlay doesn't have backing store.
Instead, call determineActiveHighlight, which will install/uninstall
highlights as necessary.
(WebKit::ServicesOverlayController::determineActiveHighlight):
Apply fade in/fade out to the overlays.
Keep track of which highlight we're going to activate, until the hysteresis
delay is up, then actually make it active/parent it/fade it in.
We now will have no active highlight between the fade out of the previous one
and the fade in of the new one (during the hysteresis delay).
(WebKit::ServicesOverlayController::mouseEvent):
The overlay now will not become active until the delay is up, so we don't
need to check it again here.
(WebKit::ServicesOverlayController::handleClick):
(WebKit::ServicesOverlayController::didCreateHighlight):
(WebKit::ServicesOverlayController::willDestroyHighlight):
(WebKit::ServicesOverlayController::repaintHighlightTimerFired): Deleted.
(WebKit::ServicesOverlayController::drawHighlight): Deleted.
2014-08-11 Andy Estes <aestes@apple.com>
[iOS] Get rid of iOS.xcconfig
https://bugs.webkit.org/show_bug.cgi?id=135809
Reviewed by Joseph Pecoraro.
All iOS.xcconfig did was include AspenFamily.xcconfig, so there's no need for the indirection.
* Configurations/Base.xcconfig:
* Configurations/iOS.xcconfig: Removed.
* WebKit2.xcodeproj/project.pbxproj:
2014-08-12 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL] Rename ewk_private.h to EwkDebug.h
https://bugs.webkit.org/show_bug.cgi?id=135797
Reviewed by Gyuyoung Kim.
ewk_private.h contains only debug macros alllowing
logging.
* UIProcess/API/efl/EwkView.cpp:
* UIProcess/API/efl/ewk_main.cpp:
* UIProcess/efl/EwkDebug.h: Renamed from Source/WebKit2/UIProcess/API/efl/ewk_private.h.
* UIProcess/efl/ViewClientEfl.cpp:
2014-08-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] The plugins metadata cache doesn't work if the user cache directory doesn't exist
https://bugs.webkit.org/show_bug.cgi?id=135834
Reviewed by Philippe Normand.
Make sure the user cache directory exists. If creating the
directory fails for whatever reason, do not try to save the cache
to disk.
* UIProcess/Plugins/gtk/PluginInfoCache.cpp:
(WebKit::PluginInfoCache::PluginInfoCache):
(WebKit::PluginInfoCache::updatePluginInfo):
2014-08-12 Alexey Proskuryakov <ap@apple.com>
[Mac] Allow reading CoreGraphics debugging preferences
https://bugs.webkit.org/show_bug.cgi?id=135821
<rdar://problem/11219259>
Reviewed by Darin Adler.
* WebProcess/com.apple.WebProcess.sb.in:
2014-08-11 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL] Prevent the client from creating ewk_view when EWebkit is not initialized
https://bugs.webkit.org/show_bug.cgi?id=135606
Reviewed by Gyuyoung Kim.
Similarly to EFL modules (eina, evas etc.), application using EWebKit
has to initialize it using ewk_init().
Do not allow the client to create ewk_view if ewk_init has not been called.
Add an appropriate logs warning the client about wrong APIs usage.
* UIProcess/API/efl/ewk_main.cpp: Add EwkMain class to control ewk lifetime.
(WebKit::EwkMain::EwkMain):
(WebKit::EwkMain::shared):
(WebKit::EwkMain::~EwkMain): Add logs when the client forgot to destroy EWebkit.
(WebKit::EwkMain::initialize):
(WebKit::EwkMain::finalize):
(WebKit::EwkMain::shutdownInitializedEFLModules):
(ewk_init):
(ewk_shutdown):
* UIProcess/API/efl/ewk_main_private.h: Added.
(WebKit::EwkMain::isInitialized):
(WebKit::EwkMain::logDomainId):
* UIProcess/API/efl/ewk_private.h:
* UIProcess/API/efl/ewk_view.cpp:
(EWKViewCreate):
Prevent the client from creating ewk_view when ewk_init() has not been called.
2014-08-11 Enrica Casucci <enrica@apple.com>
Improve look and feel of combined service menu..
https://bugs.webkit.org/show_bug.cgi?id=135824
<rdar://problem/17936880>
Reviewed by Tim Horton.
When showing the combined menu, list the phone numbers first,
grouped under a common header, followed by the entries relative
to the services.
* Platform/mac/MenuUtilities.h:
* Platform/mac/MenuUtilities.mm:
(WebKit::menuItemTitleForTelephoneNumberGroup):
(WebKit::menuItemForTelephoneNumber):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
2014-08-11 Joseph Pecoraro <pecoraro@apple.com>
Add Private WKPreferences API for developer extras (show inspector)
https://bugs.webkit.org/show_bug.cgi?id=135811
Reviewed by Timothy Hatcher.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _developerExtrasEnabled]):
(-[WKPreferences _setDeveloperExtrasEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2014-08-08 Enrica Casucci <enrica@apple.com>
[Services with UI] Action menu arrow hit testing is sometimes wrong.
https://bugs.webkit.org/show_bug.cgi?id=135776
<rdar://problem/17837670>
Reviewed by Brady Eidson.
There was a problem in the algorithm that stitches together the selection rectangles
to be given to Data Detectors API.
This change adds a new function that stiches together all the rects contributing to the
first line, all the rects contributing to the last line and all the ones in the middle.
This way we can have a maximum of 3 non overlapping rectangles.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::stitchRects):
(WebKit::compactRectsWithGapRects):
2014-08-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, EFL build fix since r172385.
* PlatformEfl.cmake:
2014-08-11 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.2 release.
* gtk/NEWS: Add release notes for 2.5.2.
2014-08-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] No IPC messages are sent when building WebKitGTK+ with VERSION_SCRIPT
https://bugs.webkit.org/show_bug.cgi?id=135760
Reviewed by Philippe Normand.
The problem is that the threading initialization is failing
because there are two copies of WTF, one in libjavascriptcoregtk
and the other in libwebkit2gtk. When WebKit2 is initialized in the
UI process, JSC::initializeThreading() is called first and then
WTF::initializeMainThread(). The former is calling
ThreadIdentifierData::initializeOnce() initializing the
ThreadIdentifierData::m_key symbol in libjavascriptcoregtk, while
the latter is using the ThreadIdentifierData API from libwebkit2gtk
that hasn't been initialized.
* CMakeLists.txt: Do not add WTF to the list of WebKit2 libraries,
WebKit2 already depends on JavaScriptCore that already links to WTF.
2014-08-10 Tim Horton <timothy_horton@apple.com>
Yelp phone number highlights often disappear
https://bugs.webkit.org/show_bug.cgi?id=135789
<rdar://problem/17971057>
Reviewed by Brady Eidson.
Since selectedTelephoneNumberRangesChanged doesn't provide an associated
Frame, an incoming selectedTelephoneNumberRangesChanged from a subframe
would overwrite ServicesOverlayController's cached (and potentially active)
telephone number highlights.
This happens a lot on Yelp, because they have many subframes which are
doing layout on a regular basis.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
* WebProcess/WebCoreSupport/WebEditorClient.h:
Adjust to the new (lack of) arguments.
* WebProcess/WebPage/ServicesOverlayController.h:
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
Adjust logging; we can revisit it later.
(WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
When building phone number highlights, walk the Frame tree and retrieve
them from all of the Editors.
(WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
(WebKit::ServicesOverlayController::telephoneNumberRangesForFocusedFrame):
(WebKit::ServicesOverlayController::determineActiveHighlight):
(WebKit::ServicesOverlayController::handleClick):
Retrieve the detected telephone number ranges from the focused frame
when combining telephone numbers with selection services.
This ensures that we don't show combined phone number highlights from other frames.
2014-08-10 Tim Horton <timothy_horton@apple.com>
Refactor ServiceOverlayController in preparation for fading between highlights
https://bugs.webkit.org/show_bug.cgi?id=135787
<rdar://problem/17935736>
Reviewed by Brady Eidson.
Rework ServicesOverlayController so that we always keep a set of generic
"potential highlights", which are refcounted Highlight objects and
wrap a DDHighlightRef, as well as a type (Selection or TelephoneNumber),
Range (only used in the case of TelephoneNumber), and potentially more
things in the future (like, say, fade state!).
We eagerly update the list of potential highlights when the selection or set
of detected telephone numbers changes, and use this information to install
or uninstall the page overlay as needed.
When we need to recompute the "active" highlight from this set (for example,
we need to handle a mouse event or paint the highlight), we look through
the set of potential highlights and decide. This moves the "active" highlight
decision logic into one small and confined place.
* WebProcess/WebPage/ServicesOverlayController.h:
(WebKit::ServicesOverlayController::Highlight):
Add the new aforementioned refcounted Highlight class.
Rename m_lastHoveredHighlightChangeTime to m_lastActiveHighlightChangeTime.
Make m_webPage a reference.
The rest is just added/removed/adjusted functions for the refactoring.
(WebKit::TelephoneNumberData::TelephoneNumberData): Deleted.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::Highlight::createForSelection):
(WebKit::ServicesOverlayController::Highlight::createForTelephoneNumber):
Create Highlights for the two different highlight types.
(WebKit::ServicesOverlayController::ServicesOverlayController):
(WebKit::ServicesOverlayController::willMoveToWebPage):
Our WebPage pointer is always valid because it owns us; don't clear it.
We need to keep it around so that we can uninstall the overlay and
install it again later, anyway.
(WebKit::ServicesOverlayController::selectionRectsDidChange):
(WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
When selection rects or detected telephone numbers change, rebuild potential highlights.
This will have the side-effect of installing the overlay if needed.
(WebKit::ServicesOverlayController::mouseIsOverHighlight):
Make this function take a Highlight instead of a DDHighlightRef.
(WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
Make this function take a Highlight instead of a DDHighlightRef.
(WebKit::ServicesOverlayController::drawHighlight):
Make this function take a Highlight instead of a DDHighlightRef.
There's no reason to do the translation separately from the layer blit,
also allowing us to avoid the StateSaver.
(WebKit::ServicesOverlayController::drawRect):
drawRect now always paints the active highlight, instead of duplicating
logic about which highlight should be active.
Also, it will update the active highlight before painting.
We no longer need to re-determine whether the active highlight's phone
number range is still a valid phone number range, because we rebuild
the potential highlights whenever the set of phone number ranges changes.
(WebKit::ServicesOverlayController::clearActiveHighlight):
Mostly an adoption of new names.
(WebKit::ServicesOverlayController::removeAllPotentialHighlightsOfType):
Run through the list of potential highlights and remove any of the given type.
The two highlight building functions use this helper to clear the old ones before building.
(WebKit::ServicesOverlayController::buildPhoneNumberHighlights):
(WebKit::ServicesOverlayController::buildSelectionHighlight):
Rebuild the list of potential highlights, replacing all highlights of
the given type with new ones.
(WebKit::ServicesOverlayController::hasRelevantSelectionServices):
Factor out the code that decides whether our current selection is
viable for servicing based on whether we have plain-text and/or rich-text services.
(WebKit::ServicesOverlayController::didRebuildPotentialHighlights):
When rebuilding potential highlights, if we have no potential highlights at all,
uninstall the page overlay; we don't need mouse tracking and don't need to
paint anything. This improves memory use and compositing performance significantly,
where previously we were leaving the overlay up forever after creating it.
If we have either detected telephone numbers or relevant selection services,
create and install the overlay if it doesn't already exist.
(WebKit::ServicesOverlayController::createOverlayIfNeeded):
This just moved from elsehwere, except that it now uses FadeMode::DoNotFade.
It doesn't make sense to fade on install/uninstall (which happens even before hover)
but not on changing the active highlight; fading will be re-addressed in the next patch.
(WebKit::ServicesOverlayController::highlightsAreEquivalent):
Determine whether two highlights are equivalent. While we may have
created a new Highlight at rebuild time, if two telephone number
highlights have equivalent ranges, there's no need to 'transition' to the new one.
(WebKit::ServicesOverlayController::determineActiveHighlight):
Run through the list of services, and try to find one that is hovered.
We prefer telephone number highlights to selection highlights, and
we will never make a selection highlight active if it is both
not serviceable and there are no telephone numbers to show in the combined menu.
This is the centralized location for determination of which highlight
should be considered active. If the active highlight changed, update
the time since last change and cancel the mouse-down tracking.
(WebKit::ServicesOverlayController::mouseEvent):
Adjust some comments to be more explanatory.
A bunch of code moved out of here and into determineActiveHighlight.
(WebKit::ServicesOverlayController::handleClick):
Adjust to take a reference and use Highlight instead of DDHighlightRef.
2014-08-10 Timothy Hatcher <timothy@apple.com>
Web Inspector: new glyphs are visible on OS X 10.9 builds
https://bugs.webkit.org/show_bug.cgi?id=135743
Reviewed by Joseph Pecoraro.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow): Use 10100 instead of 1090 for the version.
2014-08-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] REGRESSION(r166239): The ld version script is not being used
https://bugs.webkit.org/show_bug.cgi?id=135694
Reviewed by Martin Robinson.
* CMakeLists.txt: Add VERSION_SCRIPT to WebKit2 link flags if present.
2014-08-09 Tim Horton <timothy_horton@apple.com>
REGRESSION (r172301): Combined phone number highlight doesn't appear if rich content is selected and we have no rich content services
https://bugs.webkit.org/show_bug.cgi?id=135785
<rdar://problem/17969843>
Reviewed by Brady Eidson.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::drawSelectionHighlight):
We can't early return in the rich-content-but-no-rich-services case
if we have telephone numbers in the selection, because we want to offer
them up in the combined menu.
* UIProcess/mac/WebContextMenuProxyMac.mm:
If we end up with no menu, because there were no services available,
make a fresh one that we can fill with combined telephone number items.
2014-08-08 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL] Do not initialize g_type in WebProcessMain::platformInitialize()
https://bugs.webkit.org/show_bug.cgi?id=135700
Reviewed by Gyuyoung Kim.
Inspired by r171788.
Glib since 2.36 itself initializes g_type_init.
* WebProcess/efl/WebProcessMainEfl.cpp:
2014-08-08 Tim Horton <timothy_horton@apple.com>
Build fix for 32-bit.
* UIProcess/mac/ServicesController.mm:
(WebKit::ServicesController::ServicesController):
Don't dynamically refresh services in 32-bit apps. It's not possible
to write a 32-bit app with the Modern API, so this doesn't matter.
2014-08-08 Tim Horton <timothy_horton@apple.com>
[mac] Dynamically update serviceability when the set of services changes
https://bugs.webkit.org/show_bug.cgi?id=135738
<rdar://problem/17533459>
Reviewed by Brady Eidson.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
Adopt the new universal refreshExistingServices.
(WebKit::WebContext::refreshExistingServices): Deleted.
* UIProcess/WebContext.h:
Remove WebContext::refreshExistingServices; there's no need for it.
* UIProcess/mac/ServicesController.h:
* UIProcess/mac/ServicesController.mm:
Fix the build with only public headers by including NSSharingService.h itself.
Place the NSSharingServicePicker (Details) category outside the #ifdef.
Forward-declare and possibly import NSExtension SPI.
(WebKit::ServicesController::ServicesController):
Register a callback to be notified whenever the set of services changes.
When this occurs, call refreshExistingServices. We let refreshExistingServices
coalesce updates because these notifications can come in small batches.
(WebKit::ServicesController::refreshExistingServices):
Dispatch changes in service availability to all processes in all contexts.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
Adjust the referenced rdar:// and call ServicesController::refreshExistingServices
instead of the now-removed WebContext:: variant. We can't remove this
yet because our services state can still be stale because NSServiceSharingPicker
can still sometimes lie about the current service state immediately after a change occurs;
once that is fixed, we should get rid of this as well as the refresh in Web Process creation.
2014-08-08 Timothy Horton <timothy_horton@apple.com>
Clients that request the selection services menu after WebKit2 will get one with different metrics than otherwise
https://bugs.webkit.org/show_bug.cgi?id=135765
<rdar://problem/17962180>
Reviewed by Brady Eidson.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
The menu is cached between clients, but we make adjustments to it.
We should copy it before adjusting.
2014-08-08 Timothy Horton <timothy_horton@apple.com>
Services overlay dropdown is often in the wrong place with zoomed pages or horizontal scrolling
https://bugs.webkit.org/show_bug.cgi?id=135755
<rdar://problem/17907752>
Reviewed by Brady Eidson.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
(WebKit::ServicesOverlayController::maybeCreateSelectionHighlight):
DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection adjusts the
location of the button based on the visible rect, trying to keep the button visible.
We're handing it the wrong visible rect, though, not taking scrolling into account.
This leads to pages that scroll horizontally showing the button on the left
even if there's space for it on the right, or sometimes not showing it at all.
Instead, provide the actual main FrameView visible rect; the same coordinate
space that the highlight rects are provided in.
2014-08-08 Timothy Horton <timothy_horton@apple.com>
Additional items added to selection services menus are misaligned
https://bugs.webkit.org/show_bug.cgi?id=135747
<rdar://problem/17933167>
Reviewed by Brady Eidson.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
Use NSSharingServicePickerStyleRollover for the rollover image services menu;
use NSSharingServicePickerStyleTextSelection for the selection services menu.
Set NSMenu's showsStateColumn to YES for selection services menus, so that
other items added to the menu line up correctly.
Remove an unncessary .get()
2014-08-08 Grzegorz Czajkowski <g.czajkowski@samsung.com>
[EFL] Remove unnecessary ewk_private.h includes
https://bugs.webkit.org/show_bug.cgi?id=135753
Reviewed by Gyuyoung Kim.
Neither the below file uses the functionality from ewk_private.h.
* UIProcess/API/efl/ewk_context.cpp:
* UIProcess/API/efl/ewk_context_menu_item.cpp:
* UIProcess/API/efl/ewk_cookie_manager.cpp:
* UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
* UIProcess/API/efl/ewk_popup_menu_item.cpp:
* UIProcess/API/efl/ewk_view.cpp:
2014-08-08 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Do not use GtkWindow:resize-grip-visible with recent GTK+ versions
https://bugs.webkit.org/show_bug.cgi?id=135699
Reviewed by Philippe Normand.
Resize grips support have been removed from GTK+ since 3.13.4, the
API has been deprecated and does nothing.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseSetToplevelOnScreenWindow):
(resizeWebKitWebViewBaseFromAllocation):
2014-08-07 Tim Horton <timothy_horton@apple.com>
[Services with UI] Action menu does not appear if selection includes both text and an image
https://bugs.webkit.org/show_bug.cgi?id=135731
<rdar://problem/17837491>
Reviewed by Dean Jackson.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
Initialize hasRichContentServices with the cached value.
2014-08-07 Benjamin Poulain <bpoulain@apple.com>
Get rid of SCRIPTED_SPEECH
https://bugs.webkit.org/show_bug.cgi?id=135729
Reviewed by Brent Fulgham.
* Configurations/FeatureDefines.xcconfig:
2014-08-07 Timothy Horton <timothy_horton@apple.com>
setCustomSwipeViews inside didChangeBackForwardList client callback is ignored
https://bugs.webkit.org/show_bug.cgi?id=135633
<rdar://problem/17926507>
Reviewed by Sam Weinig.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeBackForwardList):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::clearCustomSwipeViews): Deleted.
WebKit clears the set of custom swipe views at the end of WebPageProxy::didChangeBackForwardList,
*after* calling into the client. This means that if the client wants to setCustomSwipeViews in
didChangeBackForwardList, it won't be respected.
Since there's only one client of this SPI, let's just stop clearing the list of custom swipe
views in WebKit and leave that totally up to the client.
2014-08-07 Enrica Casucci <enrica@apple.com>
[Services with UI] Action menu does not appear if selection includes both text and an image.
https://bugs.webkit.org/show_bug.cgi?id=135731
<rdar://problem/17837491>
Reviewed by Brady Eidson.
Adding a new setting to ServicesController to communicate to the WebProcess if
there are services installed that can handle a combination of text and images.
This way ServicesOverlayController can decide if it appropriate to show the hightlight
based on the type of selection (text only or non text only). This information is retrieved
when the selection rects are collected by SelectionGatherer and used by
SelectionGatherer::Notifier to communicate the selection change.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
* Shared/WebProcessCreationParameters.h:
* UIProcess/mac/ServicesController.h:
(WebKit::ServicesController::hasRichContentServices):
* UIProcess/mac/ServicesController.mm:
(WebKit::ServicesController::ServicesController):
(WebKit::ServicesController::refreshExistingServices):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectionRectsDidChange):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/ServicesOverlayController.h:
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::ServicesOverlayController):
(WebKit::ServicesOverlayController::selectionRectsDidChange):
(WebKit::ServicesOverlayController::drawSelectionHighlight):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::setEnabledServices):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::hasRichContentServices):
* WebProcess/WebProcess.messages.in:
2014-08-07 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Fix several warnings of doxygen
https://bugs.webkit.org/show_bug.cgi?id=135643
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/ewk_context_menu_item.h: Removed /info which is not doxygen keyword and unnecessary to the user.
* UIProcess/API/efl/ewk_cookie_manager.h: Fixed parameter name.
* UIProcess/API/efl/ewk_form_submission_request.h: Removed # from Eina_List because doxygen may not know the EFL structures.
* UIProcess/API/efl/ewk_page_group.h: Fixed to match with parameter name.
* UIProcess/API/efl/ewk_settings.h: Fixed wrong keyword and parameter name.
* UIProcess/API/efl/ewk_text_checker.h: Ditto.
* UIProcess/API/efl/ewk_view.h:
- Used escape string for the tag.
- Used @code, @endcode for media query example.
2014-08-07 Benjamin Poulain <bpoulain@apple.com>
Get rid of INPUT_SPEECH
https://bugs.webkit.org/show_bug.cgi?id=135672
Reviewed by Andreas Kling.
* Configurations/FeatureDefines.xcconfig:
* PlatformGTK.cmake:
2014-08-07 Timothy Hatcher <timothy@apple.com>
Web Inspector: Update glyphs to be more like Xcode 6
https://bugs.webkit.org/show_bug.cgi?id=135705
Reviewed by Joseph Pecoraro.
* Resources/DockBottom.pdf: Added.
* Resources/DockBottomLegacy.pdf: Copied from Source/WebKit/mac/Resources/Dock.pdf.
* Resources/DockRight.pdf: Added.
* Resources/DockRightLegacy.pdf: Copied from Source/WebKit2/Resources/DockRight.pdf.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow): Use new images.
* WebKit2.xcodeproj/project.pbxproj: Added new images.
2014-08-07 Oliver Hunt <oliver@apple.com>
WebContent needs access to HSTS database due to some networking still being performed in process
https://bugs.webkit.org/show_bug.cgi?id=135711
<rdar://17940220>
Reviewed by Alexey Proskuryakov.
Simple patch in the same theme as the equivalent network process
extension. Provide an extension that covers the WebContent specific
HSTS file and consume it on launch.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
* UIProcess/WebContext.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::webContentHSTSDatabasePath):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-08-07 Gordon Sheridan <gordon_sheridan@apple.com>
Clear the m_previousItem member of HistoryControllers when it matches the HistoryItem being removed.
https://bugs.webkit.org/show_bug.cgi?id=135634
<rdar://problem/17388461>
Reviewed by Brady Eidson.
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::removeItem):
Call WebCore::Page::clearPreviousItemFromAllPages() for each item removed from
the back/forward list to ensure the page URL is released from IconDatabase.
2014-08-07 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use WebKitNavigationAction also for WebKitNavigationPolicyDecision
https://bugs.webkit.org/show_bug.cgi?id=135695
Reviewed by Gustavo Noronha Silva.
WebKitNavigationAction was introduced to extend WebKitWebView::create signal
and its API is mostly duplicated in WebKitNavigationPolicyDecision.
Use WebKitNavigationAction insternally in WebKitNavigationPolicyDecision and
deprecated all the duplicated API in favor of a single property navigation-action.
* UIProcess/API/gtk/WebKitDefines.h: Remove unused macro
WEBKIT_OBSOLETE and add WEBKIT_DEPRECATED and WEBKIT_DEPRECATED_FOR.
* UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp:
(_WebKitNavigationPolicyDecisionPrivate::~_WebKitNavigationPolicyDecisionPrivate):
Free the WebKitNavigationAction.
(webkitNavigationPolicyDecisionGetProperty): Add getter for
navigation-action and use WebKitNavigationAction in all other getters.
(webkit_navigation_policy_decision_class_init): Add navigation-action
property and deprecated all others except frame-name.
(webkit_navigation_policy_decision_get_navigation_action): Return the WebKitNavigationAction.
(webkit_navigation_policy_decision_get_navigation_type): Use WebKitNavigationAction.
(webkit_navigation_policy_decision_get_mouse_button): Ditto.
(webkit_navigation_policy_decision_get_modifiers): Ditto.
(webkit_navigation_policy_decision_get_request): Ditto.
(webkitNavigationPolicyDecisionCreate):
(webkitNewWindowPolicyDecisionCreate):
* UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
* UIProcess/API/gtk/WebKitNavigationPolicyDecisionPrivate.h:
* UIProcess/API/gtk/WebKitPolicyClient.cpp: Use a custom
PolicyClient class so that we receive a NavigationActionData in
the callbacks.
(attachPolicyClientToView):
(toWebKitNavigationType): Deleted.
(decidePolicyForNavigationAction): Deleted.
(decidePolicyForNewWindowAction): Deleted.
(decidePolicyForResponse): Deleted.
* UIProcess/API/gtk/WebKitResponsePolicyDecision.cpp:
(webkitResponsePolicyDecisionCreate):
* UIProcess/API/gtk/WebKitResponsePolicyDecisionPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for
deprecated symbols.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
2014-08-06 Antti Koivisto <antti@apple.com>
Move Soup specific code out of WebCoreArgumentCoders.cpp
https://bugs.webkit.org/show_bug.cgi?id=135665
Reviewed by Anders Carlsson.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encode):
(IPC::ArgumentCoder<ResourceRequest>::decode):
(IPC::ArgumentCoder<ResourceError>::encode):
(IPC::ArgumentCoder<ResourceError>::decode):
* Shared/WebCoreArgumentCoders.h:
Soup is the only client for this code. Move it to *Soup.cpp
* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
(IPC::ArgumentCoder<ResourceError>::encodePlatformData):
(IPC::ArgumentCoder<ResourceError>::decodePlatformData):
2014-08-06 Tim Horton <timothy_horton@apple.com>
Services overlay flashes a lot; should have some hysteresis before showing overlay
https://bugs.webkit.org/show_bug.cgi?id=135683
<rdar://problem/16878039>
Reviewed by Simon Fraser.
Don't show the highlight until it's been 200ms since the last change
in selection or change in which highlight is hovered, whichever was more recent.
* WebProcess/WebPage/ServicesOverlayController.h:
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::ServicesOverlayController):
(WebKit::ServicesOverlayController::selectionRectsDidChange):
Keep track of when the selection last changed.
(WebKit::ServicesOverlayController::drawTelephoneNumberHighlightIfVisible):
Make establishHoveredTelephoneHighlight take a bool instead of Boolean.
(WebKit::ServicesOverlayController::mouseIsOverHighlight):
Factor mouseIsOverHighlight out of establishHoveredTelephoneHighlight and drawHighlight.
(WebKit::ServicesOverlayController::remainingTimeUntilHighlightShouldBeShown):
Return the amount of time until the highlight should be shown; this is
the maximum of (the difference between the last selection change and the timeout)
and (the difference between the last change in which highlight is hovered and the timeout).
Telephone number highlights are shown immediately, because they are already stable
by virtue of being expanded to include the entire telephone number.
(WebKit::ServicesOverlayController::repaintHighlightTimerFired):
(WebKit::ServicesOverlayController::drawHighlight):
If the highlight shouldn't be shown yet (because we haven't hit the two timeouts),
schedule a timer to repaint us around when we will hit the timeouts.
(WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight):
(WebKit::ServicesOverlayController::mouseEvent):
Don't allow mouseUp to trigger the menu if we shouldn't be showing the overlay yet.
2014-08-06 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] www.france24.com doesn't always load the page, sections stay white
https://bugs.webkit.org/show_bug.cgi?id=135684
<rdar://problem/17931712>
Reviewed by Tim Horton.
It's possible for a UIScrollView for overflow to move between one scrolling tree node
and another. When this happens, we need to avoid unconditionally clearing the delegate
on the node that's being destroyed, because the new node will already have set the
UIScrollView delegate to its own delegate.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
2014-08-06 Dean Jackson <dino@apple.com>
ENABLE_CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED is not used anywhere. Remove it.
https://bugs.webkit.org/show_bug.cgi?id=135675
Reviewed by Sam Weinig.
* Configurations/FeatureDefines.xcconfig:
2014-08-06 Brady Eidson and Jeffrey Pfau <beidson@apple.com>
IDB transactions never reset if the Web Process ends before cleaning up
https://bugs.webkit.org/show_bug.cgi?id=135218
Reviewed by Darin Adler and David Kilzer.
* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::didReceiveMessage):
(WebKit::DatabaseToWebProcessConnection::didReceiveSyncMessage): Added.
(WebKit::DatabaseToWebProcessConnection::didClose):
* DatabaseProcess/DatabaseToWebProcessConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::resetTransactionSync): Added
Wait until the reset is complete before sending the sync reply.
(WebKit::DatabaseProcessIDBConnection::rollbackTransactionSync): Added.
Ditto.
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.h:
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.messages.in:
Keep track of all in progress transactions and make sure they’re cleaned up
whenever a connection to a WebProcess is broken:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::unregisterConnection):
(WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
(WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::didEstablishTransaction):
(WebKit::UniqueIDBDatabase::didResetTransaction):
(WebKit::UniqueIDBDatabase::resetAllTransactions):
(WebKit::UniqueIDBDatabase::finalizeRollback):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
Add sync versions of reset/rollback:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
(WebKit::WebIDBServerConnection::resetTransactionSync):
(WebKit::WebIDBServerConnection::rollbackTransactionSync):
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
2014-08-06 Wenson Hsieh <wenson_hsieh@apple.com>
Implement parsing for CSS scroll snap points
https://bugs.webkit.org/show_bug.cgi?id=134301
Reviewed by Dean Jackson.
* Configurations/FeatureDefines.xcconfig: Added ENABLE_CSS_SCROLL_SNAP
2014-08-06 Andy Estes <aestes@apple.com>
[iOS] Subresources referenced in converted QuickLook documents sometimes fail to load
https://bugs.webkit.org/show_bug.cgi?id=135676
Reviewed by David Kilzer.
QuickLookHandle needs to stay alive in order for its NSURLProtocol to service subresource loads originating
from the converted HTML document. Some of these loads happen dynamically after the main resource finishes
loading, so we cannot tie the lifetime of the QuickLookHandle to that of the main resource's ResourceLoader.
Instead, give ownership of the QuickLookHandle to DocumentLoader.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Stored the created QuickLookHandle in DocumentLoader.
(WebKit::WebResourceLoader::didReceiveData): Accessed DocumentLoader's QuickLookHandle.
(WebKit::WebResourceLoader::didFinishResourceLoad): Ditto.
(WebKit::WebResourceLoader::didFailResourceLoad): Ditto.
(WebKit::WebResourceLoader::didReceiveResource): Ditto.
* WebProcess/Network/WebResourceLoader.h: Removed m_quickLookHandle.
2014-08-06 Filip Pizlo <fpizlo@apple.com>
Merge r171389, r171495, r171508, r171510, r171605, r171606, r171611, r171614, r171763 from ftlopt.
2014-08-06 Mark Hahnenberg <mhahnenberg@apple.com>
Refactor our current implementation of for-in
https://bugs.webkit.org/show_bug.cgi?id=134142
Reviewed by Filip Pizlo.
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
(WebKit::JSNPObject::invalidate): Fixed an invalid ASSERT that was crashing in debug builds.
2014-08-06 Alexey Proskuryakov <ap@apple.com>
REGRESSION (WebKit2): iOS Safari default encoding doesn't follow system language
https://bugs.webkit.org/show_bug.cgi?id=135667
<rdar://problem/17862892>
Reviewed by Anders Carlsson.
* Shared/WebPreferencesDefinitions.h: Compute the actual proper default, don't
hardcode it to ISO-8859-1 hoping that someone else will correct it later.
* Shared/WebPreferencesStore.cpp: Added an include for WebPreferencesDefinitions.h
macro expansion to compile.
* UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::createWithLegacyDefaults):
Added a FIXME.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface):
We now use WKGetWebDefaultCFStringEncoding in WebCore, so it needs to be initialized.
2014-08-06 Adrian Perez de Castro <aperez@igalia.com>
[GTK] Add support for user scripts to WebKitUserContentManager
https://bugs.webkit.org/show_bug.cgi?id=134738
Reviewed by Carlos Garcia Campos.
Add support for user scripts, to complement the user style sheet
support already present in WebKitUserContentManager. Most of the
moving parts are already present, so this just adds a boxed type
for user scripts (WebKitUserScript) and the corresponding methods
to add and remove scripts from the WebKitUserContentManager.
* UIProcess/API/gtk/WebKitUserContent.cpp: Add a WebKitUserScript
boxed type and its corresponding methods and enums.
(toUserScriptInjectionTime): Needed to convert
WebKitUserScriptInjectionTime values into its WebCore counterparts.
(_WebKitUserScript::_WebKitUserScript): Added.
(_WebKitUserScript::referenceCount): Ditto.
(webkit_user_script_ref):
(webkit_user_script_unref):
(webkit_user_script_new):
(webkitUserScriptGetUserScript): Internal method to obtain the
boxed WebCore::UserScript value.
* UIProcess/API/gtk/WebKitUserContent.h: Add the new public API
methods.
* UIProcess/API/gtk/WebKitUserContentManager.cpp: Implement the
methods for adding and removing user scripts.
(webkit_user_content_manager_add_script):
(webkit_user_content_manager_remove_all_scripts):
* UIProcess/API/gtk/WebKitUserContentManager.h: Add the new public
API methods.
* UIProcess/API/gtk/WebKitUserContentPrivate.h: Add the definition
for the new private function.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include the
new public methods in the API documentation.
2014-08-06 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Be able to disable gtk2 dependency
https://bugs.webkit.org/show_bug.cgi?id=135505
Reviewed by Gustavo Noronha Silva.
* PlatformGTK.cmake: Only build WebKitPluginProcess2 when
ENABLE_PLUGIN_PROCESS_GTK2 is ON.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess): Do not try to launch
WebKitPluginProcess2 executable when ENABLE_PLUGIN_PROCESS_GTK2 is OFF.
2014-08-05 Tim Horton <timothy_horton@apple.com>
REGRESSION (r164337): Pages are sometimes cut off/oriented incorrectly after using WKThumbnailView
https://bugs.webkit.org/show_bug.cgi?id=135622
<rdar://problem/17202556>
Reviewed by Dan Bernstein.
In some cases (when the page changed scroll offset while thumbnailed),
when transitioning back to thumbnail scale = 1, we would get the math
wrong and end up with a non-identity sublayerTransform on the DrawingArea.
Luckily, none of this code is necessary anymore, as the only client
of WKThumbnailView only uses its snapshotting mode.
* Shared/ImageOptions.h:
Remove SnapshotOptionsRespectDrawingAreaTransform; DrawingArea no longer
has a rootLayerTransform().
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setThumbnailScale): Deleted.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::scaledSnapshotWithOptions):
(WebKit::WebPage::snapshotAtSize):
(WebKit::WebPage::setThumbnailScale): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Remove setThumbnailScale and SnapshotOptionsRespectDrawingAreaTransform.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
Revert this to its state before r164337, as we no longer have "thumbnail scale".
* UIProcess/API/Cocoa/_WKThumbnailView.h:
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView initWithFrame:fromWKView:]):
(-[_WKThumbnailView _viewWasUnparented]):
(-[_WKThumbnailView _viewWasParented]):
(-[_WKThumbnailView _requestSnapshotIfNeeded]):
(-[_WKThumbnailView setScale:]):
Clean up code assuming _shouldApplyThumbnailScale = NO, _usesSnapshot = YES.
(-[_WKThumbnailView setUsesSnapshot:]):
(-[_WKThumbnailView usesSnapshot]):
Always return YES from usesSnapshot; we only support snapshotting WKThumbnailViews.
Ignore setUsesSnapshot.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setThumbnailView:]):
(-[WKView _updateThumbnailViewLayer]):
Stop checking usesSnapshot; it's always true.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::setRootLayerTransform): Deleted.
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::rootLayerTransform): Deleted.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::setRootLayerTransform): Deleted.
Remove rootLayerTransform() and setRootLayerTransform().
2014-08-05 Peyton Randolph <prandolph@apple.com>
Rename MAC_LONG_PRESS feature flag to LONG_MOUSE_PRESS.
https://bugs.webkit.org/show_bug.cgi?id=135276
Reviewed by Beth Dakin.
* Configurations/FeatureDefines.xcconfig:
2014-08-04 Andy Estes <aestes@apple.com>
[iOS] The raw bytes of an iWork document's PDF preview are displayed rather than the PDF itself
https://bugs.webkit.org/show_bug.cgi?id=135596
Reviewed by David Kilzer.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): If the response will be handled by
QuickLook, do not call ResourceLoader::didReceiveResponse. It will be called later by
WebResourceLoaderQuickLookDelegate once converted data is received.
2014-08-05 Alexey Proskuryakov <ap@apple.com>
Build fix.
* UIProcess/WebContext.h:
2014-08-05 Oliver Hunt <oliver@apple.com>
SSO expects to be able to walk parent application's bundle
https://bugs.webkit.org/show_bug.cgi?id=135581
<rdar://problem/17864079>
Reviewed by Alexey Proskuryakov.
SSO expects to be able to walk the parent application's
bundle looking for Info plists. To allow this to actually
work we provide an extension from the ui process that
covers the bundle directory, and then in the profile
restrict access to the ability to read directories and
files named Info.plist.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureNetworkProcess):
(WebKit::WebContext::parentBundleDirectory):
* UIProcess/WebContext.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::parentBundleDirectory):
2014-08-04 Benjamin Poulain <benjamin@webkit.org>
Add a flag for the CSS Selectors level 4 implementation
https://bugs.webkit.org/show_bug.cgi?id=135535
Reviewed by Andreas Kling.
* Configurations/FeatureDefines.xcconfig:
2014-08-04 Benjamin Poulain <bpoulain@apple.com>
Check for null frame when processing geolocation authorization request
https://bugs.webkit.org/show_bug.cgi?id=135577
<rdar://problem/17896295>
Reviewed by Geoffrey Garen.
I could have put the null check in GeolocationController instead of the WebKit layer,
but that would be a little weird as GeolocationController knows nothing about how
the WebKit layer decides what to do with requests.
* WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
(WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
2014-08-02 Jeremy Jones <jeremyj@apple.com>
Support both window and view based video fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=135525
Reviewed by Simon Fraser.
Parenting in the view instead of the window gives the fullscreen implementation more latitude
in how it implements the animation.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): Use view instead of window.
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::clientRectForNode): Use client rect instead of screen rect.
(WebKit::WebVideoFullscreenManager::enterFullscreenForNode): ditto
(WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
(WebKit::screenRectForNode): Deleted.
2014-08-01 Dan Bernstein <mitz@apple.com>
<rdar://problem/17891752> [iOS] WebKit links against libraries it doesn’t use
https://bugs.webkit.org/show_bug.cgi?id=135536
Reviewed by Tim Horton.
* Configurations/WebKit.xcconfig: Removed -lassertion_extension and -framework MobileAsset
from FRAMEWORK_AND_LIBRARY_LDFLAGS_iphonesimulator.
2014-08-01 Joseph Pecoraro <pecoraro@apple.com>
[iOS WK2] Add extension read permission to network sandbox profile
<rdar://problem/17671574>
Reviewed by Alexey Proskuryakov and Oliver Hunt.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2014-08-01 Oliver Hunt <oliver@apple.com>
Various frameworks may want to use the container temp directory, so our current restrictions are too tight
https://bugs.webkit.org/show_bug.cgi?id=135518
<rdar://17869279>
Reviewed by Anders Carlsson.
We don't (and can't) have complete knowledge of what different frameworks
will want to use the container temporary directory for, and so our
current attempt to heavily restrict access is simply too tight.
This patch recognises this by simply giving read-write access to the
entire NSTemporary() directory (e.g. $container/tmp in the general case),
rather than the single sub directory we wishfully thought that we would
be able to get away with.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::mediaCacheDirectory): Deleted.
* UIProcess/WebContext.h:
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::containerTemporaryDirectory):
(WebKit::WebContext::platformMediaCacheDirectory): Deleted.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::containerTemporaryDirectory):
(WebKit::WebContext::platformMediaCacheDirectory): Deleted.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::containerTemporaryDirectory):
(WebKit::WebContext::platformMediaCacheDirectory): Deleted.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-08-01 Dan Bernstein <mitz@apple.com>
<rdar://problem/17862013> REGRESSION (r169357): Disabling "allow plug-ins" doesn't stick on quit/relaunch
https://bugs.webkit.org/show_bug.cgi?id=135511
Reviewed by Alexey Proskuryakov.
Since the values map in the preferences store doesn’t include values that are equal to the
defaults, we need to update it when a new default is registered.
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::createWithLegacyDefaults): Changed to use new member functions
for registering defaults.
(WebKit::WebPreferences::registerDefaultBoolValueForKey): Added. Sets an override default
in the store, and sets the user default, if there is one, on top of it.
(WebKit::WebPreferences::registerDefaultUInt32ValueForKey): Ditto.
* UIProcess/WebPreferences.h: Declared new member functions for getting the user default
value for a key.
* UIProcess/efl/WebPreferencesEfl.cpp:
(WebKit::WebPreferences::platformGetStringUserValueForKey): Added an implementation that
returns false, because the EFL port doesn’t support persistent user defaults.
(WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
(WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
(WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
* UIProcess/gtk/WebPreferencesGtk.cpp:
(WebKit::WebPreferences::platformGetStringUserValueForKey): Ditto for the GTK port.
(WebKit::WebPreferences::platformGetBoolUserValueForKey): Ditto.
(WebKit::WebPreferences::platformGetUInt32UserValueForKey): Ditto.
(WebKit::WebPreferences::platformGetDoubleUserValueForKey): Ditto.
* UIProcess/mac/WebPreferencesMac.mm:
(WebKit::WebPreferences::platformGetStringUserValueForKey): Added. Replaces
setStringValueIfInUserDefaults, on which it is based.
(WebKit::WebPreferences::platformGetBoolUserValueForKey): Similarly for booleans.
(WebKit::WebPreferences::platformGetUInt32UserValueForKey): Similarly for integers.
(WebKit::WebPreferences::platformGetDoubleUserValueForKey): Similarly for doubles.
(WebKit::WebPreferences::platformInitializeStore): Changed to use the above functions.
2014-08-01 Brent Fulgham <bfulgham@apple.com>
[Mac] Fullscreen mode for some applications shows only a black screen.
https://bugs.webkit.org/show_bug.cgi?id=135493
<rdar://problem/17628212>
Reviewed by Jer Noble.
In some applications, the window hosting the WKView is an InProcess layer hosting mode.
The fullscreen window created by the WKFullScreenWindowController defaults to an
OutOfProcess mode.
When this kind of mismatch is encountered, the WK2 layer in the UI process is supposed
to send a message back to the WebProcess indicating that the layer hosting mode of the
containing window is different, so that the WebProcess can adjust its logic accordingly.
Unfortunately, the notification that this had happened was not getting sent to the
WebProcess due to an optimization in window state change logic (see Bug 135509 for
details).
The fix is to check layer hosting mode state when a WKView is added to a window, and
notify the WebProcess when it needs to change state to match.
* UIProcess/API/mac/WKView.mm:
(-[WKView viewDidMoveToWindow]): When moving to a new window, always call
'layerHostingModeDidChange' to pick up any changes in the layer hosting mode.
2014-08-01 Carlos Garcia Campos <cgarcia@igalia.com>
[CMake] GTK and EFL are using PROJECT_VERSION_PATCH to define the micro version
https://bugs.webkit.org/show_bug.cgi?id=135501
Reviewed by Gyuyoung Kim.
Use PROJECT_VERSION_MICRO instead.
* UIProcess/API/efl/EWebKit2.h.in:
* UIProcess/API/gtk/WebKitVersion.h.in:
2014-08-01 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Add missing sections to documentation.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add
WebKitUserContent and WebKitUserContentManager sections to the
documentation.
2014-08-01 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Unable to do make install since r171901
https://bugs.webkit.org/show_bug.cgi?id=135497
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake: Removed ewk_defins.h from the installation list.
2014-07-31 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] MiniBrower comes to crash when combo box is pressed
https://bugs.webkit.org/show_bug.cgi?id=135378
Reviewed by Gyuyoung Kim.
Added doxygen comment of popup_menu_show/popup_menu_hide not to confuse the usage.
* UIProcess/API/efl/ewk_view.h:
2014-07-31 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] remove ewk_defines.h
https://bugs.webkit.org/show_bug.cgi?id=135456
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/ewk_context_menu.h:
* UIProcess/API/efl/ewk_context_menu_item.h: Moved the declaration from ewk_defines.h
* UIProcess/API/efl/ewk_defines.h: Removed.
2014-07-31 Brent Fulgham <bfulgham@apple.com>
Unreviewed typo correction.
https://bugs.webkit.org/show_bug.cgi?id=135482
Rename '_fullScreenIsEnabled' -> '_fullScreenEnabled'
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _fullScreenEnabled]): Added
(-[WKPreferences _fullScreenIsEnabled]): Deleted.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
2014-07-31 Brent Fulgham <bfulgham@apple.com>
MiniBrowser Should Support Fullscreen Videos in WebKit2 Mode
https://bugs.webkit.org/show_bug.cgi?id=135482
Reviewed by Simon Fraser.
Add accessors for the missing Fullscreen API so that MiniBrowser
can use them.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _fullScreenIsEnabled]): Added.
(-[WKPreferences _setFullScreenEnabled:]): Added.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h: Add accessor for
Fullscreen mode.
2014-07-31 Beth Dakin <bdakin@apple.com>
Hit-testing broken in WebKit 1 views with AppKit's contentInsets
https://bugs.webkit.org/show_bug.cgi?id=135434
-and corresponding-
<rdar://problem/17850323>
Reviewed by Benjamin Poulain.
Re-named functions.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::convertFromScrollbarToContainingView):
(WebKit::PDFPlugin::convertFromContainingViewToScrollbar):
2014-07-31 Oliver Hunt <oliver@apple.com>
Various SSO services need the networking process to be able to spoof its bundle id
https://bugs.webkit.org/show_bug.cgi?id=135468
<rdar://problem/17864139>
Reviewed by Alexey Proskuryakov.
Just add the entitlement required to allow the sandbox to let this happen.
* Configurations/Network-iOS.entitlements:
2014-07-31 Przemyslaw Kuczynski <p.kuczynski@samsung.com>
Fix uninitialized scalar variable
https://bugs.webkit.org/show_bug.cgi?id=135461
Reviewed by Alexey Proskuryakov.
If fopen fails, returned ApplicationMemoryStats structure will be uninitialized
* Shared/linux/WebMemorySamplerLinux.cpp:
(WebKit::sampleMemoryAllocatedForApplication): Initialized applicationStats.
2014-07-31 Rohit Kumar <kumar.rohit@samsung.com>
Clean up the WebKit build from unused parameter warning in Webkit2/WebProcess module
https://bugs.webkit.org/show_bug.cgi?id=135413
Reviewed by Darin Adler.
* WebProcess/OriginData/WebOriginDataManager.cpp:
(WebKit::WebOriginDataManager::getOrigins):
(WebKit::WebOriginDataManager::deleteEntriesForOrigin):
(WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
(WebKit::WebOriginDataManager::deleteAllEntries):
2014-07-31 Chris Fleizach <cfleizach@apple.com>
AX: iOS: Crash accessing m_page in WKAccessibilityPageObject
https://bugs.webkit.org/show_bug.cgi?id=134617
Reviewed by Darin Adler.
Provide a way to detach a WK2 WebPage object so that it can uninitialize other pointers, like the accessibility object.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::~WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::WebPage::platformDetach):
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformDetach):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformDetach):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformDetach):
2014-07-31 Dan Bernstein <mitz@apple.com>
WebKit part of: Server trust authentication challenges aren’t sent to the navigation delegate
https://bugs.webkit.org/show_bug.cgi?id=135327
Reviewed by Alexey Proskuryakov.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame):
Return true for server trust protection spaces if the delegate implements
-webView:didReceiveAuthenticationChallenge:completionHandler:.
(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Removed
an assertion that is no longer true due to the above.
2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Update OptionsGTK.cmake and NEWS for 2.5.1 release.
* gtk/NEWS: Add release notes for 2.5.1.
2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ make distcheck.
* Shared/InteractionInformationAtPosition.h: Only include
WebCore/SelectionRect.h for IOS.
2014-07-31 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Bump binary version for 2.6
https://bugs.webkit.org/show_bug.cgi?id=133724
Reviewed by Philippe Normand.
* PlatformGTK.cmake: Fix JavaScriptCore dependency on
instrospection commands and make them depend on GTK+-3.0.
2014-07-30 Enrica Casucci <enrica@apple.com>
REGRESSION (WK2 iOS): Inline editing for Chinese and Japanese keyboards does not work in Safari.
https://bugs.webkit.org/show_bug.cgi?id=135449
<rdar://problem/17824833>
Reviewed by Benjamin Poulain.
The WebProcess sends the notification that the gesture modified the phrase boundary,
but the flag was not being converted properly, therefore we failed to notify
the text input system that a change had occurred.
* UIProcess/ios/WKContentViewInteraction.mm:
(toUIWKSelectionFlags):
2014-07-30 Andy Estes <aestes@apple.com>
USE(CONTENT_FILTERING) should be ENABLE(CONTENT_FILTERING)
https://bugs.webkit.org/show_bug.cgi?id=135439
Reviewed by Tim Horton.
We now support two different platform content filters, and will soon support a mock content filter (as part of
webkit.org/b/128858). This makes content filtering a feature of WebKit, not just an adoption of a third-party
library. ENABLE() is the correct macro to use for such a feature.
* Configurations/FeatureDefines.xcconfig:
* Shared/WebCoreArgumentCoders.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didStartProvisionalLoad):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2014-07-30 Andreas Kling <akling@apple.com>
Static hash tables no longer need to be coupled with a VM.
<https://webkit.org/b/135421>
Reviewed by Geoffrey Garen.
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
* WebProcess/Plugins/Netscape/JSNPObject.cpp:
2014-07-30 Dan Bernstein <mitz@apple.com>
Get rid of the WKNSURLProtectionSpace wrapper
https://bugs.webkit.org/show_bug.cgi?id=135425
Reviewed by Sam Weinig.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject): Don’t allocate WKNSURLProtectionSpace wrappers.
* Shared/Cocoa/WKNSURLProtectionSpace.h: Removed.
* Shared/Cocoa/WKNSURLProtectionSpace.mm: Removed.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(canAuthenticateAgainstProtectionSpaceInFrame): Get the NSURLProtectionSpace from the
WebCore::ProtectionSpace in the WebProtectionSpace.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): Ditto.
* WebKit2.xcodeproj/project.pbxproj: Removed references to removed files.
2014-07-30 Dan Bernstein <mitz@apple.com>
Updated for changes to the WebCore::Credential API.
Work towards fixing https://bugs.webkit.org/show_bug.cgi?id=135327
Reviewed by Alexey Proskuryakov.
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::receivedCredential):Use new Credential::nsCredential getter.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Credential>::encode): If encoding the credential requires encoding the
platform data, do that.
(IPC::ArgumentCoder<Credential>::decode): If platform data was encoded, decode it.
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<Credential>::encodePlatformData): Archive the NSURLCredential.
(IPC::ArgumentCoder<Credential>::decodePlatformData): Unarchive it.
* UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
(-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Use
Credential constructor that takes an NSURLCredential.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): Ditto.
2014-07-30 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] REGRESSION(r171742): Test /webkit2/WebKitWebView/disallow-modal-dialogs fails
https://bugs.webkit.org/show_bug.cgi?id=135412
Reviewed by Philippe Normand.
The problem is that WebPageProxy::setUIClient() calls
setCanRunModal() with the value of m_uiClient->canRunModal() which
is always true for us. We override that manually by calling
setCanRunModal() depending on the WebKitSettings. In r171742,
webkitWebViewUpdateSettings(), the method that overrides
setCanRunModal(), was moved before attachUIClientToView(), so the
value set by WebPageProxy::setUIClient() is the last one and takes
precedence. We need to make sure webkitWebViewUpdateSettings() is
always called after attachUIClientToView().
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed): Move webkitWebViewUpdateSettings()
call after attachUIClientToView() and add a comment to not forget
about it again.
2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove WebKitCertificateInfo from WebKit2GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=134830
Reviewed by Gustavo Noronha Silva.
It was added to make the API more convenient but it has ended up
making it more complicated. WebKitWebView::load-failed-with-tls-errors
now receives a GTlsCertificate + GTlsCertificateFlags and
webkit_web_context_allow_tls_certificate_for_host() receives a GTlsCertificate
since the errors are not actually needed. This makes the API more
consistent with the existing method webkit_web_view_get_tls_info().
* PlatformGTK.cmake: Remove files from compilation.
* UIProcess/API/gtk/WebKitCertificateInfo.cpp: Removed.
* UIProcess/API/gtk/WebKitCertificateInfo.h: Removed.
* UIProcess/API/gtk/WebKitCertificateInfoPrivate.h: Removed.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkit_web_context_allow_tls_certificate_for_host):
* UIProcess/API/gtk/WebKitWebContext.h:
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_class_init):
(webkitWebViewLoadFailedWithTLSErrors):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
* UIProcess/API/gtk/webkit2.h:
2014-07-29 Jinwoo Song <jinwoo7.song@samsung.com>
[EFL] Do not initialize g_type system explicitly in the ewk_init()
https://bugs.webkit.org/show_bug.cgi?id=135407
Reviewed by Gyuyoung Kim.
EFL build requires glib version 2.38 but g_type_init() has been deprecated
since version 2.36. As the type system is initialized automatically since
version 2.36, we do not need to call g_type_init() in the ewk_init().
https://developer.gnome.org/gobject/unstable/gobject-Type-Information.html#g-type-init
* UIProcess/API/efl/ewk_main.cpp:
(ewk_init):
2014-07-29 Enrica Casucci <enrica@apple.com>
REGRESSION [WebKit2 iOS]: Cannot add shortcut to user dictionary from non editable content.
https://bugs.webkit.org/show_bug.cgi?id=135392
<rdar://problem/17760073>
Reviewed by Benjamin Poulain.
Adding a shortcut to the user dictionary needs to be available in non editable content too.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _addShortcut:]):
2014-07-29 Tim Horton <timothy_horton@apple.com>
WKPDFView paints rotated pages squished
https://bugs.webkit.org/show_bug.cgi?id=135401
<rdar://problem/17173916>
Reviewed by Simon Fraser.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _computePageAndDocumentFrames]):
[page size] returns the crop box's size, ignoring rotation.
[page cropBoxAccountForRotation] respects rotation, but otherwise returns the same size.
UIPDFPageView will respect rotation when painting, so we
should make sure that it is given an aspect ratio that also
respects rotation, so that the page isn't squished.
2014-07-29 Csaba Osztrogonác <ossy@webkit.org>
URTBF for !ENABLE(DATABASE_PROCESS) platforms.
* WebProcess/OriginData/WebOriginDataManager.cpp:
(WebKit::WebOriginDataManager::getOrigins):
(WebKit::WebOriginDataManager::deleteEntriesForOrigin):
(WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates):
(WebKit::WebOriginDataManager::deleteAllEntries):
2014-07-29 Brady Eidson <beidson@apple.com>
Make WKOriginDataManager actually operate on IndexedDatabases.
https://bugs.webkit.org/show_bug.cgi?id=135346
Reviewed by Sam Weinig (and David Kilzer and Alex Christensen)
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::DatabaseProcess):
(WebKit::DatabaseProcess::getIndexedDatabaseOrigins):
(WebKit::DatabaseProcess::doGetIndexedDatabaseOrigins):
(WebKit::removeAllDatabasesForOriginPath): Utility to delete all database files for the given origin path
that have been modified between the given dates.
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesForOrigin):
(WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesForOrigin):
(WebKit::DatabaseProcess::deleteIndexedDatabaseEntriesModifiedBetweenDates):
(WebKit::DatabaseProcess::doDeleteIndexedDatabaseEntriesModifiedBetweenDates):
(WebKit::DatabaseProcess::deleteAllIndexedDatabaseEntries):
(WebKit::DatabaseProcess::doDeleteAllIndexedDatabaseEntries):
* DatabaseProcess/DatabaseProcess.h:
* Shared/WebCrossThreadCopier.cpp:
(WebCore::SecurityOriginData>::copy):
* Shared/WebCrossThreadCopier.h:
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::getOrigins):
(WebKit::WebOriginDataManagerProxy::didGetOrigins):
(WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
(WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates):
(WebKit::WebOriginDataManagerProxy::deleteAllEntries):
* WebProcess/OriginData/WebOriginDataManager.cpp:
(WebKit::WebOriginDataManager::getOrigins): Pipe IDB requests through to the DatabaseProcess.
(WebKit::WebOriginDataManager::deleteEntriesForOrigin): Ditto.
(WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Ditto.
(WebKit::WebOriginDataManager::deleteAllEntries): Ditto.
2014-07-29 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r171704.
https://bugs.webkit.org/show_bug.cgi?id=135389
Broke two IndexedDB tests (Requested by ap on #webkit).
Reverted changeset:
"IDB transactions never reset if the Web Process ends before
cleaning up"
https://bugs.webkit.org/show_bug.cgi?id=135218
http://trac.webkit.org/changeset/171704
2014-07-29 Daniel Bates <dabates@apple.com>
Use WTF::move() instead of std::move() to help ensure move semantics
https://bugs.webkit.org/show_bug.cgi?id=135351
Reviewed by Alexey Proskuryakov.
* UIProcess/API/Cocoa/_WKSessionState.mm:
(-[_WKSessionState _initWithSessionState:]):
* UIProcess/API/gtk/WebKitUserContent.cpp:
(toStringVector): Remove use of std::move(). It's unnecessary to call std::move() on an rvalue.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::mouseEvent):
2014-07-28 Pratik Solanki <psolanki@apple.com>
Get SharedBuffer.h out of ResourceBuffer.h (and a few other places)
https://bugs.webkit.org/show_bug.cgi?id=131782
Original patch by Tim Horton.
Reviewed by Darin Adler.
* NetworkProcess/NetworkResourceLoader.cpp:
* WebProcess/Network/NetworkProcessConnection.cpp:
Include SharedBuffer.h in implementation files.
* WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h:
Un-indent namespace and remove SharedBuffer forward-declaration.
2014-07-29 Adrian Perez de Castro <aperez@igalia.com>
[GTK] Remove WebKitWebViewGroup from WebKit2 GTK+ API
https://bugs.webkit.org/show_bug.cgi?id=133729
Reviewed by Carlos Garcia Campos.
Removes WebKitWebViewGroup, effectively reverting the changes
introduced by r149117. The motivation for WebKitWebViewGroup
was using the user style sheet injection API, which has been
moved into WebKitUserContentManager, rendering it unneeded.
* PlatformGTK.cmake: Remove WebKitWebViewGroup source files
from the build.
* UIProcess/API/C/gtk/WKView.cpp:
(WKViewCreate): Accomodate for changes in the signature of
webkitWebViewBaseCreate().
* UIProcess/API/gtk/WebKitSettings.cpp: Update API documentation.
* UIProcess/API/gtk/WebKitWebContext.cpp: Remove the default web
view group from WebKitWebContext.
(webkitWebContextCreatePageForWebView): Allow passing a
WebPreferences object at construction.
(webkitWebContextGetDefaultWebViewGroup): Deleted.
* UIProcess/API/gtk/WebKitWebContextPrivate.h: Ditto.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewUpdateSettings): Use WebPageProxy::setPreferences()
directly. Handle the case when webkit_web_view_set_settings()
is called on construction by doing an early-return.
(webkitWebViewConstructed): Call webkitWebViewUpdateSettings()
after creating the internal WebPageProxy object.
(webkitWebViewSetProperty): Removed "group" property, added
"settings" property.
(webkitWebViewGetProperty): Ditto.
(webkitWebViewDispose): Do not disconnect signal handler for
the (now unexistant) WebKitWebViewGroup.
(webkit_web_view_class_init): Removed "group" property, added
"settings" property.
(webkitWebViewHandleAuthenticationChallenge): Access the
WebKitWebSettings directly.
(webkit_web_view_new_with_related_view): Make new views share
settings with their related view.
(webkit_web_view_new_with_settings): Added.
(webkit_web_view_set_settings): Access the settings directly in
the WebKitWebView.
(webkit_web_view_get_settings): Ditto.
(webkit_web_view_set_zoom_level): Ditto.
(webkit_web_view_get_zoom_level): Ditto.
(webkitWebViewSettingsChanged): Deleted.
(webkitWebViewDisconnectSettingsChangedSignalHandler): Deleted.
(webkit_web_view_new_with_group): Deleted.
(webkit_web_view_get_group): Deleted.
* UIProcess/API/gtk/WebKitWebView.h: Removed API methods related
to WebKitWebViewGroup.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreate): Allow passing a WebPreferences object
for constructing the WebPageProxy.
(webkitWebViewBaseUpdatePreferences): Instead of going through
the page group, use WebPageProxy::preferences() directly.
(webkitWebViewBaseCreateWebPage): Allow passing a WebPreferences
object for constructing the WebPageProxy.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Update the
prototypes of the internal functions.
* UIProcess/API/gtk/WebKitWebViewGroup.cpp: Removed.
* UIProcess/API/gtk/WebKitWebViewGroup.h: Removed.
* UIProcess/API/gtk/WebKitWebViewGroupPrivate.h: Removed.
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Change public API
bits in the documentation.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ditto.
* UIProcess/API/gtk/docs/webkit2gtk.types: Ditto.
* UIProcess/API/gtk/webkit2.h: Removed WebKitWebViewGroup.h header.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
Accomodate for changes in the signature of
webkitWebViewBaseCreate().
2014-07-29 Carlos Garcia Campos <cgarcia@igalia.com>
Implement webkit_web_view_load_string() in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=134735
Reviewed by Sergio Villar Senin.
Add webkit_web_view_load_bytes() that receives a GBytes to load
random data in the web view using the given MIME-Type, encoding
and base URL.
* UIProcess/API/gtk/WebKitWebView.cpp:
(releaseGBytes):
(webkit_web_view_load_bytes):
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2014-07-29 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Alpha value of ewk_view_bg_color_set is not working
https://bugs.webkit.org/show_bug.cgi?id=135333
Reviewed by Gyuyoung Kim.
evas_object_image_alpha_set should be called for the transparent evas object.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::handleEvasObjectColorSet):
(EwkView::setBackgroundColor): Checked the alpha value of object and called evas_object_image_alpha_set.
* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_bg_color_set): Moved the logic to EwkView.
2014-07-28 Mark Rowe <mrowe@apple.com>
Web process crash causes UI process to die with an assertion failure in Connection::exceptionSourceEventHandler
https://bugs.webkit.org/show_bug.cgi?id=135366
Reviewed by Dan Bernstein.
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::exceptionSourceEventHandler): Remove the assertion since it frequently fires during
normal development with debug builds.
2014-07-28 Benjamin Poulain <bpoulain@apple.com>
[iOS WK2] WKWebView sometime tries to change the size of a null DrawingAreaProxy
https://bugs.webkit.org/show_bug.cgi?id=135368
<rdar://problem/16988887>
Reviewed by Simon Fraser.
We should never assume DrawingAreaProxy exists in the API invoked by the clients
of WKWebView. There are at least two cases where the DrawingAreaProxy is null:
-In some path on initialization.
-After a crash.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
We can safely null check and skip setting the size. If the call was skipped,
the size is set on DrawingAreaProxy initialization by querying the current
size through the page client.
2014-07-28 Roger Fong <roger_fong@apple.com>
Disable tagged strings for the plugin process.
https://bugs.webkit.org/show_bug.cgi?id=135354
<rdar://problem/17295639>.
Patch by Alexey Proskuryakov and Roger Fong.
Reviewed by Anders Carlsson.
* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToReExecService):
2014-07-25 Jeffrey Pfau <jpfau@apple.com>
IDB transactions never reset if the Web Process ends before cleaning up
https://bugs.webkit.org/show_bug.cgi?id=135218
Reviewed by Darin Adler.
* DatabaseProcess/DatabaseToWebProcessConnection.cpp:
(WebKit::DatabaseToWebProcessConnection::didClose):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::unregisterConnection):
(WebKit::UniqueIDBDatabase::didCompleteTransactionOperation):
(WebKit::UniqueIDBDatabase::openBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::resetBackingStoreTransaction):
(WebKit::UniqueIDBDatabase::didEstablishTransaction):
(WebKit::UniqueIDBDatabase::didResetTransaction):
(WebKit::UniqueIDBDatabase::resetAllTransactions):
(WebKit::UniqueIDBDatabase::finalizeRollback):
(WebKit::UniqueIDBDatabase::absoluteDatabaseDirectory):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.h:
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::rollbackTransaction):
2014-07-27 Yusuke Suzuki <utatane.tea@gmail.com>
[GTK] Keep non-DATABASE_PROCESS build
https://bugs.webkit.org/show_bug.cgi?id=135321
Reviewed by Gyuyoung Kim.
This is the patch for r171622 in non-DATABASE_PROCESS builds.
Change sendToDatabaseProcessRelaunchingIfNecessary to support non-DATABASE_PROCESS implementation.
* CMakeLists.txt:
* UIProcess/WebContext.h:
(WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
2014-07-27 Gavin Barraclough <baraclough@apple.com>
Don't rely on reading applicationState from within DidEnterBackground/WillEnterForeground
https://bugs.webkit.org/show_bug.cgi?id=135329
rdar://problem/17818308
Reviewed by Sam Weinig.
API may not be stable.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewVisible):
- changed to use -[WKContentView isBackground]
* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager init]):
- split notification handlers
(-[WKProcessAssertionBackgroundTaskManager _applicationWillEnterForeground:]):
(-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackground:]):
(-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackgroundOrWillEnterForeground:]): Deleted.
- Assume application is background is after DidEnterBackground, and not after WillEnterForeground
* UIProcess/ios/WKContentView.h:
- added isBackground.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:configuration:webView:]):
- check applicationState at init.
(-[WKContentView isBackground]):
- accessor
(-[WKContentView _applicationDidEnterBackground:]):
(-[WKContentView _applicationWillEnterForeground:]):
- update isBackground
2014-07-26 Enrica Casucci <enrica@apple.com>
[WebKit2 iOS]Add support for caret movement for the 3rd party keyboard protocol.
https://bugs.webkit.org/show_bug.cgi?id=135325
<rdar://problem/17682120>
Reviewed by Sam Weinig.
WKContentView now implements moveByOffset to support the
protocol for 3rd party keyboards.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView moveByOffset:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::moveSelectionByOffset):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::moveSelectionByOffset):
2014-07-26 Timothy Horton <timothy_horton@apple.com>
Crash in Web Content Process under ~PDFDocument under clearTouchEventListeners at topDocument()
https://bugs.webkit.org/show_bug.cgi?id=135319
<rdar://problem/17315168>
Reviewed by Darin Adler and Antti Koivisto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::committedLoad):
Allow data through to WebCore for frames with custom content providers;
the only custom content provider currently implemented is main frame PDF
on iOS, which will end up creating a PDFDocument in WebCore, which drops all
data on the floor immediately, so this won't result in WebCore doing anything
with the data, but makes sure that more of the normal document lifecycle is maintained.
In the future, we might want to consider ensuring that all custom content providers
end up creating a SinkDocument or something similarly generic to ensure that
WebCore doesn't try to do anything with their data, but for now, the only client is covered.
2014-07-25 Jeremy Jones <jeremyj@apple.com>
Parent fullscreen from window instead of view
https://bugs.webkit.org/show_bug.cgi?id=135310
Reviewed by Jer Noble.
Parenting in the view causes an incorrect animation to fullscreen, and can cause
fullscreen to only expand to the size of the view instead of the whole window.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass view's window.
* WebProcess/ios/WebVideoFullscreenManager.mm: screenRect instead of clientRect
(WebKit::screenRectForNode): was clientRectForNode
(WebKit::WebVideoFullscreenManager::enterFullscreenForNode): use screenRectForNode
(WebKit::WebVideoFullscreenManager::exitFullscreenForNode): ditto
(WebKit::clientRectForNode): Deleted.
2014-07-25 Oliver Hunt <oliver@apple.com>
Creating incorrect sandbox extension for hsts plist due to missing /
https://bugs.webkit.org/show_bug.cgi?id=135309
Reviewed by Sam Weinig.
So it turns out that you do actually need /'s in paths...
Now we actually create the correct extension.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
2014-07-24 Anders Carlsson <andersca@apple.com>
WKNavigation's properties are either always nil or don't behave as documented
https://bugs.webkit.org/show_bug.cgi?id=135267
<rdar://problem/17730536>
Reviewed by Andreas Kling.
Remove the properties from WKNavigation and introduce -[WKNavigation _request] as SPI for now.
* Shared/API/Cocoa/WebKitPrivate.h:
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigation.mm:
(-[WKNavigation _request]):
(-[WKNavigation initialRequest]): Deleted.
(-[WKNavigation request]): Deleted.
(-[WKNavigation setRequest:]): Deleted.
(-[WKNavigation response]): Deleted.
(-[WKNavigation error]): Deleted.
* UIProcess/API/Cocoa/WKNavigationInternal.h:
* UIProcess/API/Cocoa/WKNavigationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationInternal.h.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createLoadRequestNavigation):
* WebKit2.xcodeproj/project.pbxproj:
2014-07-25 Brady Eidson <beidson@apple.com>
Clean up WKOriginDataManager and get it messaging to the DatabaseProcess
https://bugs.webkit.org/show_bug.cgi?id=135035
Reviewed by Sam Weinig.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::DatabaseProcess): Instantiate the WebOriginDataManager, installing its message handler.
(WebKit::DatabaseProcess::didReceiveMessage): Try the message receiver map, which will try the WebOriginDataManager.
* DatabaseProcess/DatabaseProcess.h:
* DatabaseProcess/DatabaseProcess.messages.in:
* UIProcess/API/C/WKOriginDataManager.cpp:
(WKOriginDataManagerDeleteEntriesForOrigin): Updated to also take a callback.
(WKOriginDataManagerDeleteEntriesModifiedBetweenDates): Added.
(WKOriginDataManagerDeleteAllEntries): Updated to also take a callback.
(WKOriginDataManagerStartObservingChanges): Deleted.
(WKOriginDataManagerStopObservingChanges): Deleted.
(WKOriginDataManagerSetChangeClient): Deleted.
* UIProcess/API/C/WKOriginDataManager.h:
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::didReceiveMessage): Send messages to the WebOriginDataManagerProxy supplement if appropriate.
* UIProcess/Databases/DatabaseProcessProxy.h:
* UIProcess/Databases/DatabaseProcessProxy.messages.in:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext): Instantiate the WebOriginDataManagerProxy supplement.
* UIProcess/WebContext.h:
(WebKit::WebContext::sendToDatabaseProcessRelaunchingIfNecessary):
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::contextDestroyed):
(WebKit::WebOriginDataManagerProxy::processDidClose):
(WebKit::WebOriginDataManagerProxy::getOrigins):
(WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin): Setup a callback with the message.
(WebKit::WebOriginDataManagerProxy::deleteEntriesModifiedBetweenDates): Added
(WebKit::WebOriginDataManagerProxy::didDeleteEntries): Call the callback.
(WebKit::WebOriginDataManagerProxy::deleteAllEntries): Setup a callback with the message.
(WebKit::WebOriginDataManagerProxy::didDeleteAllEntries): Call the callback.
(WebKit::WebOriginDataManagerProxy::startObservingChanges): Deleted.
(WebKit::WebOriginDataManagerProxy::stopObservingChanges): Deleted.
(WebKit::WebOriginDataManagerProxy::setChangeClient): Deleted.
(WebKit::WebOriginDataManagerProxy::didChange): Deleted.
* UIProcess/WebOriginDataManagerProxy.h:
* UIProcess/WebOriginDataManagerProxy.messages.in:
* UIProcess/WebOriginDataManagerProxyChangeClient.cpp: Removed.
* UIProcess/WebOriginDataManagerProxyChangeClient.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/OriginData/WebOriginDataManager.cpp:
(WebKit::WebOriginDataManager::deleteEntriesForOrigin): Send the callback reply.
(WebKit::WebOriginDataManager::deleteEntriesModifiedBetweenDates): Added.
(WebKit::WebOriginDataManager::deleteAllEntries): Send the callback reply.
(WebKit::WebOriginDataManager::startObservingChanges): Deleted.
(WebKit::WebOriginDataManager::stopObservingChanges): Deleted.
* WebProcess/OriginData/WebOriginDataManager.h:
* WebProcess/OriginData/WebOriginDataManager.messages.in:
2014-07-25 Gavin Barraclough <baraclough@apple.com>
Yosemite version number is 101000
https://bugs.webkit.org/show_bug.cgi?id=135301
Reviewed by Sam Weinig.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
* WebProcess/com.apple.WebProcess.sb.in:
2014-07-24 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Do not try to hit test a null mainFrameRenderView on dynamicViewportSizeUpdate()
https://bugs.webkit.org/show_bug.cgi?id=135277
<rdar://problem/17804891>
Reviewed by Tim Horton.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
There is no guarantee that the main frame have its root view when performing a dynamicViewportSizeUpdate(),
we should not attempt to use the layer without null checking it first.
The odd part for me is <rdar://problem/17804891> is a little too frequent. In the vast majority of cases,
there is a RenderView, it seems actually pretty hard not to have one on dynamicViewportSizeUpdate().
Skipping hit testing is safe because it is a completely optional part of this algorithm.
When the hit test is not done, the new position is computed based on the relative position prior to
the size change.
2014-07-24 Dan Bernstein <mitz@apple.com>
WebKit2 part of <rdar://problem/17593701> Assertion failure in WebPage::reload (!m_pendingNavigationID) when reloading after a same-document back navigation
https://bugs.webkit.org/show_bug.cgi?id=135129
Reviewed by Darin Adler.
* Shared/WebBackForwardListItem.cpp:
(WebKit::childItemWithDocumentSequenceNumber): New helper function based on
WebCore::HistoryItem::childItemWithDocumentSequenceNumber.
(WebKit::documentTreesAreEqual): New helper function based on
WebCore::HistoryItem::hasSameDocumentTree.
(WebKit::WebBackForwardListItem::itemIsInSameDocument): Added. Based on
WebCore::HistoryItem::shouldDoSameDocumentNavigationTo.
* Shared/WebBackForwardListItem.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::goForward): Don’t assign a new navigation ID if the back-forward
navigation is a same-document navigation.
(WebKit::WebPageProxy::goBack): Ditto.
(WebKit::WebPageProxy::goToBackForwardItem): Ditto.
2014-07-24 Tim Horton <timothy_horton@apple.com>
Sometimes WKWebView is blank after resuming the app, until you scroll
https://bugs.webkit.org/show_bug.cgi?id=135275
<rdar://problem/17803170>
Reviewed by Benjamin Poulain.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::dispatchViewStateChange):
If the UI process is waiting for a didUpdateViewState, we need to *always*
get a reply from the Web Process, so dispatchViewStateChange should *always*
send SetViewState even if nothing changed (so that we get the reply).
2014-07-24 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
https://bugs.webkit.org/show_bug.cgi?id=135221
<rdar://problem/17542454>
Reviewed by Benjamin Poulain.
The call to didCommitLayerTree() can cause one or two visible rect updates,
via changes to the UIScrollView contentSize and contentOffset. As a result, we
would notify the scrolling tree about a viewport change, but using the old
scrolling tree rather than the new one, so we could move layers around for
nodes which are about to be removed from the tree.
However, we also have to ensure that programmatic scrolls are applied after
didCommitLayerTree() has updated the view size, so have RemoteScrollingCoordinatorProxy
store data about programmatic scrolls and return them to the caller, which
can apply them after didCommitLayerTree().
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp: Store a pointer to a RequestedScrollInfo
for the duration of the tree update, so that we can store requested scroll info in it.
(WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
(WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLayerTree): Give Mac a stub implementation.
* UIProcess/WebPageProxy.h: Group some editing-related functions together.
(WebKit::WebPageProxy::editorState):
(WebKit::WebPageProxy::canDelete):
(WebKit::WebPageProxy::hasSelectedRange):
(WebKit::WebPageProxy::isContentEditable):
(WebKit::WebPageProxy::maintainsInactiveSelection):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): Ordering change: update
the layer tree, then call didCommitLayerTree(), then do the viewport update, followed
by any programmatic scroll.
2014-07-24 Peyton Randolph <prandolph@apple.com>
Rename feature flag for long-press gesture on Mac.
https://bugs.webkit.org/show_bug.cgi?id=135259
Reviewed by Beth Dakin.
* Configurations/FeatureDefines.xcconfig:
Rename LINK_LONG_PRESS to MAC_LONG_PRESS.
2014-07-24 Dan Bernstein <mitz@apple.com>
WebKit2 part of <rdar://problem/17766348> [Cocoa] WebCore::ProtectionSpace doesn’t preserve all NSURLProtectionSpace properties, such as the distinguishedNames array
https://bugs.webkit.org/show_bug.cgi?id=135229
Reviewed by Alexey Proskuryakov.
* Shared/Cocoa/WKNSURLProtectionSpace.mm: Changed to use ProtectionSpace::nsSpace.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ProtectionSpace>::encode): If encoding the space requires encoding the
platform data, do that.
(IPC::ArgumentCoder<ProtectionSpace>::decode): If platform data was encoded, decode it.
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Archive the NSURLProtectionSpace.
(IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Unarchive it.
* Shared/soup/WebCoreArgumentCodersSoup.cpp:
(IPC::ArgumentCoder<ProtectionSpace>::encodePlatformData): Added.
(IPC::ArgumentCoder<ProtectionSpace>::decodePlatformData): Added.
2014-07-24 Benjamin Poulain <benjamin@webkit.org>
[WK2] Fixed/Sticky layers can get mispositioned when the layer tree commit change their position or size
https://bugs.webkit.org/show_bug.cgi?id=135227
<rdar://problem/17279500>
Reviewed by Simon Fraser.
In some cases, a fixed or sticky positioned layer would end up at its position corresponding to the WebProcess
instead of sticking the to real viewport in the UIProcess.
The sequence of event is:
1) A layer becomes fixed in some ScrollingTree transaction.
2) Later, some change in the WebProcess causes a LayerTree update for that exact same layer, but no corresponding
ScrollingTree update is made.
3) In the UIProcess, the position of the fixed layer is changed due to the LayerTree update.
But! There is no ScrollingTree change, updateScrollingTree() never sets fixedOrStickyLayerChanged to true,
and the position is not corrected.
-> The layer is now at the wrong position until the next VisibleContentRectUpdate.
Ideally, we should have fixedOrStickyLayerChanged track if either the position or size of a fixed layer changed
in the layer tree. This is tricky since the layer tree does not keep track of the fixed nodes of the scrolling tree.
Since this complexity seems risky at this point, I went for something simpler but with more overhead:
any time the scrolling tree contains either a fixed or sticky layer, viewportChangedViaDelegatedScrolling()
is called to "fix" the position.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree):
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
(WebKit::RemoteScrollingCoordinatorProxy::hasFixedOrSticky):
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2014-07-24 Oliver Hunt <oliver@apple.com>
Need to explicitly support location services in webcontent profile
https://bugs.webkit.org/show_bug.cgi?id=135251
<rdar://17798346>
Reviewed by Dan Bernstein.
Switching to uikit-app means that we remove the implicit support
for location services. This makes us explicitly opt-in.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2014-07-24 Tim Horton <timothy_horton@apple.com>
Crash at [WKContentView _applicationWillEnterForeground:] + 28
<rdar://problem/17797103>
Reviewed by Sam Weinig.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _applicationWillEnterForeground:]):
Drawing area can be null; null check it!
It's ok if we don't hide the content in this case, because if the drawing area is null,
it doesn't have any layers in the tree anyway.
2014-07-23 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Some help.apple.com pages not scrollable
https://bugs.webkit.org/show_bug.cgi?id=135228
<rdar://problem/17790792>
Reviewed by Benjamin Poulain.
On pages which size their document to the device size, the WKContentView size
never changes after it's created. In this situation, we never set a bounds
on the _rootContentView, so it remains zero-sized which breaks hit testing
on all enclosed UIScrollViews for overflow:scroll.
Fix by making the _rootContentView and the _inspectorIndicationView use autosizing
so they are always the size of their parent view, and remove the explicit setting
of their bounds.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:configuration:webView:]):
(-[WKContentView setShowingInspectorIndication:]):
(-[WKContentView _didCommitLayerTree:]):
2014-07-23 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] r171124 is incorrect when the virtual keyboard is up
https://bugs.webkit.org/show_bug.cgi?id=135187
Reviewed by Simon Fraser.
Unfortunately, restricting the input into the document rect does not work.
When the keyboard is up, the keyboard bounds can overlap the WKWebView, and
the valid range should account for that.
Instead of playing with the keyboard rect, we can limit the scroll position
inside the valid range of UIScrollView. The keyboard always adjusts the UIScrollView
range as needed to give access to the content. Using that range is a bit more permissive
because the page could scroll to reveal content in the content inset defined by the client
of the API (this could actually be quite useful for hybrid apps).
There was already a function to change the content offset in the valid scrollview
range: changeContentOffsetBoundedInValidRange(), I extracted the range check
to contentOffsetBoundedInValidRange() for the needs of -[WKWebView _scrollToContentOffset:].
So...contentOffsetBoundedInValidRange() is cool, but it is not in the right coordinate
system. The scroll position we get from the WebProcess is in document coordinates, while
contentOffsetBoundedInValidRange() works with the UIScrollView coordinates.
To fix that, we scale the input position to get to the same scale as UIScrollView, then
apply the insets with the weirdly named [WKWebView _adjustedContentOffset:].
* UIProcess/API/Cocoa/WKWebView.mm:
(contentOffsetBoundedInValidRange):
(changeContentOffsetBoundedInValidRange):
(-[WKWebView _scrollToContentOffset:]):
2014-07-23 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r171498.
https://bugs.webkit.org/show_bug.cgi?id=135223
It will regress some scroll position restoration on navigation
(r167916). (Requested by smfr on #webkit).
Reverted changeset:
"[iOS WK2] Header bar on nytimes articles lands in the wrong
place after rubberbanding"
https://bugs.webkit.org/show_bug.cgi?id=135221
http://trac.webkit.org/changeset/171498
2014-07-23 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Header bar on nytimes articles lands in the wrong place after rubberbanding
https://bugs.webkit.org/show_bug.cgi?id=135221
Reviewed by Tim Horton.
The call to didCommitLayerTree() can cause one or two visible rect updates,
via changes to the UIScrollView contentSize and contentOffset. As a result, we
would notify the scrolling tree about a viewport change, but using the old
scrolling tree rather than the new one, so we could move layers around for
nodes which are about to be removed from the tree.
Fix by m_webPageProxy->didCommitLayerTree() after the scrolling tree has been
committed.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2014-07-23 Oliver Hunt <oliver@apple.com>
Add a pseudo target to create sandbox override roots
https://bugs.webkit.org/show_bug.cgi?id=135216
<rdar://17785560>
Reviewed by Alexey Proskuryakov.
Just a duplicate of the standard ios sandbox target, targetting
the profile overrides directory. This means we can make roots
that "Just Work".
* WebKit2.xcodeproj/project.pbxproj:
2014-07-23 Oliver Hunt <oliver@apple.com>
Incorrect commit for sandbox profile
https://bugs.webkit.org/show_bug.cgi?id=135214
<rdar://17739108>
Reviewed by Anders Carlsson.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2014-07-23 Dan Bernstein <mitz@apple.com>
<rdar://problem/17782623> [iOS] Client-certificate authentication isn’t working with some certificates
https://bugs.webkit.org/show_bug.cgi?id=135206
Reviewed by Anders Carlsson.
* Shared/cf/ArgumentCodersCF.cpp:
(IPC::copyPersistentRef): Added this helper function. It differs from
SecKeyCopyPersistentRef in that if multiple copies of the key exist in the keychain, it
ensures that we get a reference to the copy that is in the keychain access group that the
Networking process can use.
(IPC::encode): Use copyPersistentRef.
2014-07-23 Bem Jones-Bey <bjonesbe@adobe.com>
Remove CSS_EXCLUSIONS compile flag and leftover code
https://bugs.webkit.org/show_bug.cgi?id=135175
Reviewed by Zoltan Horvath.
At this point, the CSS_EXCLUSIONS flag guards nothing but some useless
stubs. This removes the flag and the useless code.
* Configurations/FeatureDefines.xcconfig:
2014-07-23 Timothy Horton <timothy_horton@apple.com>
REGRESSION (r171239): Much more time spent taking snapshots during the PLT
https://bugs.webkit.org/show_bug.cgi?id=135177
<rdar://problem/17764847>
Reviewed by Dan Bernstein.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
(WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
(WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
* WebProcess/WebPage/WebPage.h:
Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
Only send it when the current history item for the main frame changes.
2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] EWebKit2.h should contain version information
https://bugs.webkit.org/show_bug.cgi?id=135189
Reviewed by Gyuyoung Kim.
Generate EWebKit2.h to contain the version information.
* PlatformEfl.cmake:
* UIProcess/API/efl/EWebKit2.h.in: Renamed from Source/WebKit2/UIProcess/API/efl/EWebKit2.h.
2014-07-23 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Do not generate forwarding header for ewk headers
https://bugs.webkit.org/show_bug.cgi?id=135147
Reviewed by Gyuyoung Kim.
Only EWebKit2.h and ewk_text_checker.h are generated as forwarding header.
This is unnecessary.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
* UIProcess/API/efl/tests/test_ewk2_context_menu.cpp:
* UIProcess/API/efl/tests/test_ewk2_window_features.cpp:
* UIProcess/efl/TextCheckerClientEfl.h:
2014-07-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r171366.
https://bugs.webkit.org/show_bug.cgi?id=135190
Broke three API tests (Requested by ap on #webkit).
Reverted changeset:
"REGRESSION (r171239): Much more time spent taking snapshots
during the PLT"
https://bugs.webkit.org/show_bug.cgi?id=135177
http://trac.webkit.org/changeset/171366
2014-07-22 Oliver Hunt <oliver@apple.com>
Reduce the size of the root WebContent sandbox profile
https://bugs.webkit.org/show_bug.cgi?id=135182
<rdar://problem/17739108>
Reviewed by Alexey Proskuryakov.
Switch from apple-ui-app to uikit-app as the root of the webcontent
profile.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2014-07-22 Jinwoo Song <jinwoo7.song@samsung.com>
Unreviewed build fix on EFL port after r171356.
Implement a dummy platformMediaCacheDirectory() to avoid undefined reference error.
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformMediaCacheDirectory):
2014-07-22 Enrica Casucci <enrica@apple.com>
REGRESSION (WebKit2): Selection inside accelerated overflow:scroll doesn't track scrolling.
https://bugs.webkit.org/show_bug.cgi?id=135180
<rdar://problem/16721055>
Reviewed by Simon Fraser.
Adds notifications to the WKContentView to know when scrolling starts and ends
in an overflow scroll. When scrolling starts, we hide the selection and we restore
it when scrolling ends, though not before the selection information in the editor
state has been updated.
It also adds a new method to the EditorClient class to force the
selection update when scrolling is completed.
* UIProcess/PageClient.h:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartScroll):
(WebKit::RemoteScrollingTree::scrollingTreeNodeDidEndScroll):
* UIProcess/Scrolling/RemoteScrollingTree.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
(-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
(-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollWillStart):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollDidEnd):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::overflowScrollWillStartScroll):
(WebKit::PageClientImpl::overflowScrollDidEndScroll):
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartScroll):
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidEndScroll):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _overflowScrollingWillBegin]):
(-[WKContentView _overflowScrollingDidEnd]):
(-[WKContentView _updateChangedSelection]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::overflowScrollWillStartScroll):
(WebKit::WebPageProxy::overflowScrollDidEndScroll):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
* WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
(WebKit::WebEditorClient::updateSelection):
2014-07-22 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] WebPageProxy should not do anything when responding to an animated resize is the page is not in a valid state
https://bugs.webkit.org/show_bug.cgi?id=135169
<rdar://problem/17740149>
Reviewed by Tim Horton.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
Neither m_dynamicViewportSizeUpdateWaitingForTarget nor m_dynamicViewportSizeUpdateWaitingForLayerTreeCommit should
be modified if there is not WebProcess to respond to DynamicViewportSizeUpdate.
(WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
We should not attempt to synchronize anything if the page was closed before the end of the dynamic viewport
update.
2014-07-22 Timothy Horton <timothy_horton@apple.com>
REGRESSION (r171239): Much more time spent taking snapshots during the PLT
https://bugs.webkit.org/show_bug.cgi?id=135177
<rdar://problem/17764847>
Reviewed by Dan Bernstein.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willChangeCurrentHistoryItemForMainFrame):
(WebKit::WebPageProxy::willChangeCurrentHistoryItem): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willChangeCurrentHistoryItemForMainFrame):
(WebKit::WebPage::willChangeCurrentHistoryItem): Deleted.
* WebProcess/WebPage/WebPage.h:
Rename WillChangeCurrentHistoryItem to WillChangeCurrentHistoryItemForMainFrame.
Only send it when the current history item for the main frame changes.
2014-07-22 Oliver Hunt <oliver@apple.com>
Add accountsd access to network sandbox profile
https://bugs.webkit.org/show_bug.cgi?id=135176
<rdar://17656487>
Reviewed by Anders Carlsson.
This is available to the webcontent process already, but is also
needed for the networking process.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2014-07-22 Oliver Hunt <oliver@apple.com>
Remove unused com.apple.webkit.* rules from profiles
https://bugs.webkit.org/show_bug.cgi?id=135174
<rdar://17755931>
Reviewed by Anders Carlsson.
We never send these rules so we should just remove use of them
from the profiles.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2014-07-22 Oliver Hunt <oliver@apple.com>
Provide networking process with access to its HSTS db
https://bugs.webkit.org/show_bug.cgi?id=135121
<rdar://17654369>
Reviewed by Alexey Proskuryakov.
Add an extension parameter to pass the hsts database file.
This requires us to create the Caches/com.apple.WebKit.Networking
directory in the UI process, as the network sandbox
does not allow it to create the containing directory.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureNetworkProcess):
(WebKit::WebContext::networkingHSTSDatabasePath):
* UIProcess/WebContext.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultNetworkingHSTSDatabasePath):
2014-07-22 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] UI helpers that zoom on an element ignore the viewport's allowsUserScaling
https://bugs.webkit.org/show_bug.cgi?id=135140
<rdar://problem/17754921>
Reviewed by Tim Horton.
UIScrollView makes a difference between min/max zoom and allowUserScaling. To express that,
everything is set up on the LayerTransaction.
For zooming related helpers (find on page, double tap to zoom, etc), the min and max zoom
should be the actual min/max for the current page state.
This patch split the two explicitely.
For layer transactions, the values are taken from the viewport configuration directly.
For everything else, we should use minimumPageScaleFactor/maximumPageScaleFactor. Those two methods
have been updated to take into account allowsUserScaling.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willCommitLayerTree):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::minimumPageScaleFactor):
(WebKit::WebPage::maximumPageScaleFactor):
(WebKit::WebPage::getAssistedNodeInformation):
2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
Web Inspector: Fix unused parameter build warning
https://bugs.webkit.org/show_bug.cgi?id=135151
Reviewed by Joseph Pecoraro.
Fix unused parameter build warning by removing the parameter name
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::setJavaScriptProfilingEnabled):
2014-07-22 Shivakumar JM <shiva.jm@samsung.com>
Fix unused parameter build warning in UIProcess module
https://bugs.webkit.org/show_bug.cgi?id=135154
Reviewed by Alexey Proskuryakov.
Fix unused parameter build warning in UIProcess module by using UNUSED_PARAM macro.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange):
2014-07-22 Jeremy Jones <jeremyj@apple.com>
Don't create new UIWindow for video fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=135038
Reviewed by Darin Adler.
Use root UIView to parent fullscreen interface.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): pass parent UIView
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::screenRectForNode): Use client rect instead of screen rect.
2014-07-21 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Add Ewk prefix to enums of ewk_navigation_policy
https://bugs.webkit.org/show_bug.cgi?id=135144
Reviewed by Gyuyoung Kim.
All public enums of ewebkit should start with Ewk prefix.
This patch added Ewk prefix to Ewk_Event_Mouse_Button and Ewk_Event_Modifiers.
In addition, added missing description and default value for Ewk_Event_Modifier.
* UIProcess/API/efl/ewk_navigation_policy_decision.cpp:
(toEwkEventMouseButton):
(toEwkEventModifiers):
(EwkNavigationPolicyDecision::mouseButton):
(EwkNavigationPolicyDecision::modifiers):
(ewk_navigation_policy_mouse_button_get):
(ewk_navigation_policy_modifiers_get):
(toEventMouseButton): Deleted.
(toEventModifierKeys): Deleted.
* UIProcess/API/efl/ewk_navigation_policy_decision.h:
* UIProcess/API/efl/ewk_navigation_policy_decision_private.h:
2014-07-21 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Improve event throttling for Scroll Events
https://bugs.webkit.org/show_bug.cgi?id=135082
<rdar://problem/17445266>
Reviewed by Simon Fraser.
In the WebKit layer, we want a measure that is representative of the responsiveness.
In this patch, I use the total delay between a VisibleContentRectUpdate being dispatched
by the UIProcess, and the time RemoteLayerTreeDrawingArea flushes the layer tree.
The value used for eventThrottlingDelay() is computed by averaging the new value with
the old values with a 80/20 split, favoring the old data. Favoring historical data
over the last timing avoid excessively throttling for a single slow frame.
The computation of m_estimatedMainThreadLatency can be improved in the future, this is
a first cut keeping things simple.
With m_estimatedMainThreadLatency in our hands, we can compute our eventThrottlingDelay().
If m_estimatedMainThreadLatency is smaller than a single frame timespan, we have a fast page
and nothing is throttled.
If is it more than a frame, we throttle such that we can at least render two frames
per event dispatch based on the historical data.
The exact values will need some tweaking, but this set ensures well written pages get
60 events per seconds, while slow pages do not waste too much time on events.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::eventThrottlingDelay):
* WebProcess/WebPage/ViewUpdateDispatcher.cpp:
(WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
(WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
* WebProcess/WebPage/ViewUpdateDispatcher.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::didFlushLayerTreeAtTime):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::eventThrottlingDelay):
(WebKit::WebPage::updateVisibleContentRects):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2014-07-21 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r170361): In landscape with UI hidden, fixed position elements at top of screen are too low
https://bugs.webkit.org/show_bug.cgi?id=135141
<rdar://problem/17627525>
Reviewed by Benjamin Poulain.
We can't use the WKWebView's UIScrollView contentInsets to determine the unobscured rect
in MobileSafari, because contentInsets can't be changed dynamically while scrolling.
To get around this, MobileSafari sets obscured insets instead (but also sets a fixed
contentInset).
So if the client calls _setObscuredInsets:, always use _obscuredInsets to compute the
content insets.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _computedContentInset]):
(-[WKWebView _setObscuredInsets:]):
2014-07-21 Oliver Hunt <oliver@apple.com>
Remove global cookie workaround from sandbox profiles
https://bugs.webkit.org/show_bug.cgi?id=135138
<rdar://17513375>
Reviewed by Alexey Proskuryakov.
Remove the workaround needed for global cookie access, and silencing
of the associated sandbox violation.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultCookieStorageDirectory):
2014-07-21 Oliver Hunt <oliver@apple.com>
Correct sandbox profiles to fix some excess privileges
https://bugs.webkit.org/show_bug.cgi?id=135134
<rdar://problem/17741886>
<rdar://problem/17739080>
Reviewed by Alexey Proskuryakov.
This cleans up our sandbox profiles to fix a few issues - the profiles
no longer allow us to issue file extension we have the ability to consume,
and tightens some of the other file access rules.
This means we have to addd some rules to allow us to access things
that we previously had access to due to lax file system restrictions.
Some of the features were fixable simply by using entitlements on the
process rather than custom rules.
* Configurations/WebContent-iOS.entitlements:
* Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2014-07-21 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Turn off position:fixed behavior when the keyboard is up
https://bugs.webkit.org/show_bug.cgi?id=132537
Reviewed by Benjamin Poulain.
Make interaction with form elements inside position:fixed less terrible by re-laying out
fixed elements relative to the document while we have an assisted node. This ensures
that all parts of a position:fixed are accessible (e.g. inputs on the right side
of a fixed-width top bar).
* Shared/AssistedNodeInformation.cpp: Add a flag for being inside postion:fixed,
and encode/decode it.
(WebKit::AssistedNodeInformation::encode):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h:
(WebKit::AssistedNodeInformation::AssistedNodeInformation):
* UIProcess/PageClient.h: Add isAssistingNode().
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isAssistingNode):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::computeCustomFixedPositionRect): If we have an assisted
node, just use the document rect as the custom fixed position rect.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation): Get the selection rect first,
since we have to fix it up for position:fixed. If the element is inside fixed
position in the main frame, re-set the fixed position rect to the document rect
(which forces a layout), re-fetch elementRect, then set it back. This ensures
that the UI process gets an elementRect which it can zoom to correctly.
2014-07-21 Timothy Horton <timothy_horton@apple.com>
Random crashes on the Web Thread due to Timers firing on the wrong thread in the UI process
https://bugs.webkit.org/show_bug.cgi?id=135132
<rdar://problem/17719832>
Reviewed by Simon Fraser.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::ProcessThrottler):
(WebKit::ProcessThrottler::suspendTimerFired):
* UIProcess/ProcessThrottler.h:
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::swipeSnapshotWatchdogTimerFired):
We can't use WebCore timers in the UI process because of coexistence concerns
(they fire on the Web Thread if there is one!), so use RunLoop::Timer instead.
2014-07-21 Andy Estes <aestes@apple.com>
[iOS] Handle QuickLook ResourceLoaders in the web process
https://bugs.webkit.org/show_bug.cgi?id=135113
Reviewed by David Kilzer.
The QuickLook framework registers a NSURLProtocol to handle loading subresources of the HTML documents it
generates. In order for these loads to succeed, we need to start them in the same process in which QuickLook
generated the main resource.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
2014-07-21 Brady Eidson <beidson@apple.com>
DatabaseProcess doesn't relaunch after crashing.
<rdar://problem/17717343> and https://bugs.webkit.org/show_bug.cgi?id=135117
Reviewed by Alexey Proskuryakov.
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::didClose): Tell the WebContext.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::databaseProcessCrashed): Notify supplements, then clear the DatabaseProcessProxy pointer.
* UIProcess/WebContext.h:
* UIProcess/WebContextSupplement.h:
(WebKit::WebContextSupplement::processDidClose): Added. No users right now, but the patch in bug 135035 will need this.
2014-07-20 KwangHyuk Kim <hyuki.kim@samsung.com>
Fix warnings caused by unused parameter.
https://bugs.webkit.org/show_bug.cgi?id=134975
Reviewed by Gyuyoung Kim.
Fix warnings on EwkView.cpp and LegacySessionStateCodingNone.cpp that are caused by unused parameter data.
* UIProcess/API/efl/EwkView.cpp:
(EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
* UIProcess/LegacySessionStateCodingNone.cpp:
(WebKit::decodeLegacySessionState):
2014-07-20 Jeremy Jones <jeremyj@apple.com>
Disable ff/rw based on canPlayFastForward and canPlayFastRewind.
https://bugs.webkit.org/show_bug.cgi?id=134894
Reviewed by Darin Adler.
Add setCanPlayFastReverse
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: ditto
* WebProcess/ios/WebVideoFullscreenManager.h: ditto
* WebProcess/ios/WebVideoFullscreenManager.mm: ditto
(WebKit::WebVideoFullscreenManager::setCanPlayFastReverse): ditto
2014-07-20 Jeremy Jones <jeremyj@apple.com>
Decrease flicker when enter and exit fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=134919
Reviewed by Simon Fraser.
Change the sequence of tear down and use transparency to prevent flicker when entering and exiting fullscreen.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm: wait to remove layerHost until didCleanupFullscreen
(WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen): removed from here
(WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): added here
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::didSetupFullscreen): use transparent background during transition
2014-07-20 Dan Bernstein <mitz@apple.com>
<rdar://problem/17739526> REGRESSION (r171057): Crash in WebPage::getPositionInformation()
https://bugs.webkit.org/show_bug.cgi?id=135099
Reviewed by David Kilzer.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation): Added a null check.
2014-07-19 Zan Dobersek <zdobersek@igalia.com>
Consistently use uint64_t as the handle parameter type for the SetAcceleratedCompositingWindowId message
https://bugs.webkit.org/show_bug.cgi?id=135047
Reviewed by Darin Adler.
UIProcess' WebPageProxy is handling this parameter as an uint64_t, it should be handled as such
in WebProcess as well.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Also changed the parameter name to match other places.
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::setAcceleratedCompositingWindowId):
2014-07-18 Oliver Hunt <oliver@apple.com>
We don't provide an extension to the temp file used for uploads
https://bugs.webkit.org/show_bug.cgi?id=135079
Reviewed by Sam Weinig.
Make sure didChooseFilesForOpenPanelWithDisplayStringAndIcon vends
extensions for the files passed to the content process.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
2014-07-18 Tim Horton <timothy_horton@apple.com>
ASSERTion failures in ViewGestureController indicating that we're copying WebBackForwardList
https://bugs.webkit.org/show_bug.cgi?id=135080
<rdar://problem/17734714>
Reviewed by Sam Weinig.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::canSwipeInDirection):
2014-07-18 Yongjun Zhang <yongjun_zhang@apple.com>
_WKActivatedElementInfo.title should fallback to innerText if the link doesn't have title attribute.
https://bugs.webkit.org/show_bug.cgi?id=135077
When populate InteractionInformationAtPosition's title value, use a link element's innerText if it
doesn't have title attribute.
Reviewed by Dan Bernstein.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2014-07-18 Andy Estes <aestes@apple.com>
[iOS] Tapping "Allow Website" on a restricted page does not bring up the keypad
https://bugs.webkit.org/show_bug.cgi?id=135072
<rdar://problem/17528188>
Reviewed by David Kilzer.
* Shared/WebCoreArgumentCoders.h: Declared an ArgumentCoder for WebCore::ContentFilter.
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ContentFilter>::encode): Encoded the ContentFilter using a NSKeyedArchiver.
(IPC::ArgumentCoder<ContentFilter>::decode): Decoded the ContentFilter using a NSKeyedUnarchiver.
* UIProcess/Cocoa/WebPageProxyCocoa.mm:
(WebKit::WebPageProxy::contentFilterDidBlockLoadForFrame): Called WebFrameProxy::setContentFilterForBlockedLoad().
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::didStartProvisionalLoad): Reset m_contentFilterForBlockedLoad to nullptr.
(WebKit::WebFrameProxy::contentFilterDidHandleNavigationAction): Called ContentFilter::handleUnblockRequestAndDispatchIfSuccessful().
If the unblock is successful, reload the WebPageProxy.
* UIProcess/WebFrameProxy.h:
(WebKit::WebFrameProxy::setContentFilterForBlockedLoad):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Check if this is navigation represents an unblock
request and ignore if so.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Defined ContentFilterDidBlockLoadForFrame.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::contentFilterDidBlockLoad): Sent ContentFilterDidBlockLoadForFrame to the WebPageProxy.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
2014-07-18 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] position:fixed in iframes with programmatic scroll could end up in the wrong place
https://bugs.webkit.org/show_bug.cgi?id=135078
<rdar://problem/17401823>
Reviewed by Tim Horton.
Fix the logging of requested scroll position and frame scale factor.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingTreeTextStream::dump):
2014-07-18 Joseph Pecoraro <pecoraro@apple.com>
[Cocoa] Use RetainPtr in _WKRemoteObjectInterface
https://bugs.webkit.org/show_bug.cgi?id=135062
Reviewed by Anders Carlsson.
Switch to RetainPtr instead of manual memory management of ivars.
* Shared/API/Cocoa/_WKRemoteObjectInterface.h:
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
(-[_WKRemoteObjectInterface identifier]):
(-[_WKRemoteObjectInterface description]):
(-[_WKRemoteObjectInterface dealloc]): Deleted.
2014-07-18 Tim Horton <timothy_horton@apple.com>
Take navigation snapshots whenever the current back-forward item is going to change
https://bugs.webkit.org/show_bug.cgi?id=135058
<rdar://problem/17464515>
Reviewed by Dan Bernstein.
Instead of trying to have the UI process figure out when to take navigation snapshots by itself,
snapshot whenever the Web process says that the current back-forward item is going to change.
This fixes snapshotting timing with pushState, and lets us bottleneck snapshotting down to
just two places instead of 5.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::goForward):
(WebKit::WebPageProxy::goBack):
(WebKit::WebPageProxy::goToBackForwardItem):
(WebKit::WebPageProxy::didStartProvisionalLoadForFrame):
We no longer need to special-case taking navigation snapshots
when the UI process changes the back forward item or upon
didStartProvisionalLoadForFrame, because we'll always snapshot
in willChangeCurrentHistoryItem in all of these cases.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willChangeCurrentHistoryItem):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
Add willChangeCurrentHistoryItem message, which comes from the Web process.
When it arrives, take a navigation snapshot.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Take the pre-swipe navigation snapshot before telling WebPageProxy that we're doing a swipe,
so that it doesn't bail from taking the snapshot because we have a snapshot up.
(WebKit::ViewGestureController::endSwipeGesture):
We no longer need to explicitly disable snapshotting while navigating, because
we will avoid taking the snapshot if there's a snapshot being displayed.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::~ViewGestureController):
Remove the snapshot if it's still up when ViewGestureController is destroyed.
The Mac version of ViewGestureController is destroyed on Web process crashes
because it is a message receiver, so it is not guaranteed to have the same
lifetime as the WebPageProxy and friends.
(WebKit::ViewGestureController::trackSwipeGesture):
Make use of recordNavigationSnapshot.
(WebKit::ViewGestureController::endSwipeGesture):
Ditto from the Mac version.
* UIProcess/mac/ViewSnapshotStore.h:
(WebKit::ViewSnapshotStore::disableSnapshotting): Deleted.
(WebKit::ViewSnapshotStore::enableSnapshotting): Deleted.
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::recordSnapshot):
Remove the snapshot disabling mechanism and bail from snapshotting if we're
showing a snapshot, as mentioned above.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::willChangeCurrentHistoryItem):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willChangeCurrentHistoryItem):
* WebProcess/WebPage/WebPage.h:
Proxy willChangeCurrentHistoryItem from HistoryController to the UI process.
2014-07-18 Jon Honeycutt <jhoneycutt@apple.com>
REGRESSION: Crash when typing into text field that clears itself on iOS
<https://bugs.webkit.org/show_bug.cgi?id=135044>
<rdar://problem/17640443>
Reviewed by Darin Adler.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestAutocorrectionData):
wordRangeFromPosition() returns null in some cases; null check range
before dereferencing it. Moved some variable declarations around to
better match our style.
2014-07-18 Tim Horton <timothy_horton@apple.com>
[WK2] Provide a mechanism to grab the back-forward list for gesture navigation purposes from another WKWebView
https://bugs.webkit.org/show_bug.cgi?id=134999
<rdar://problem/17238025>
Reviewed by Sam Weinig.
In some cases, clients may need to throw a WKWebView with no back-forward list over
another WKWebView, and want to participate in gesture swipe as if they were actually
the page being overlaid.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView setAllowsBackForwardNavigationGestures:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _alternateWebViewForNavigationGestures]):
(-[WKWebViewConfiguration _setAlternateWebViewForNavigationGestures:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
Keep an "alternate" WKWebView "for navigation gestures", which ViewGestureController
will use as the real source of back-forward items, and the destination of the swipe navigation.
All swipe delegate callbacks will also fire from the alternate view, because it owns the items
and will be doing the navigation.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::setAlternateBackForwardListSourceView):
(WebKit::ViewGestureController::beginSwipeGesture):
Send navigationGestureDidBegin via the alternate view's WebPageProxy if it exists.
Record a new snapshot on the current page, but copy it to the alternate view if necessary,
so that when swiping forward from the alternate view, it will have the "right" snapshot.
Get the target back forward item from the alternate view.
Send navigationGestureWillEnd via the alternate view's WebPageProxy if it exists.
(WebKit::ViewGestureController::canSwipeInDirection):
Determine if we can swipe in a direction by looking at the alternate view's back-forward list if necessary.
(WebKit::ViewGestureController::endSwipeGesture):
Send navigationGestureDidEnd via the alternate view's WebPageProxy if it exists.
Perform the navigation on the alternate view if necessary.
(WebKit::ViewGestureController::removeSwipeSnapshot):
Send navigationGestureSnapshotWasRemoved via the alternate view's WebPageProxy if it exists.
* UIProcess/mac/ViewGestureController.h:
2014-07-17 David Kilzer <ddkilzer@apple.com>
SECTORDER_FLAGS should be defined in target's xcconfig file, not Base.xcconfig
<http://webkit.org/b/135006>
Reviewed by Darin Adler.
* Configurations/Base.xcconfig: Move SECTORDER_FLAGS to
WebKit.xcconfig.
* Configurations/DebugRelease.xcconfig: Remove empty
SECTORDER_FLAGS definition.
* Configurations/WebKit.xcconfig: Use $(CONFIGURATION) so
SECTORDER_FLAGS is only set on Production builds.
2014-07-17 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r171167): LoaderClient processDidCrash call is made after load state changes
https://bugs.webkit.org/show_bug.cgi?id=135032
<rdar://problem/17716602>
Reviewed by Dan Bernstein.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processDidCrash): Create a transaction, so that the nested
transaction in resetStateAfterProcessExited() wouldn't be committed.
(WebKit::WebPageProxy::resetStateAfterProcessExited): Don't use auto - it was hiding
the most important fact that this is a stack object that can't be simply moved to
a different function.
2014-07-17 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Fix the updateVisibleContentRects synchronization for load after r171154
https://bugs.webkit.org/show_bug.cgi?id=135036
Reviewed by Dan Bernstein.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
I forgot to update one of the condition after changing from lastTransaction to next transaction
in r171154.
2014-07-17 Enrica Casucci <enrica@apple.com>
[REGRESSION WK2]The menu bar does not show up when tapping on the caret.
https://bugs.webkit.org/show_bug.cgi?id=135023
<rdar://problem/17617282>
Reviewed by Benjamin Poulain and Ryosuke Niwa.
WKContentView needs to implement hasContent to correctly show
the appropriate menu bar content. The patch adds this information
to the EditorState.
* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView hasContent]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
2014-07-17 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] Add SPI to do a dynamic viewport update without showing any content
https://bugs.webkit.org/show_bug.cgi?id=135010
Reviewed by Darin Adler.
This patch add a new SPI, [WKWebView _resizeWhileHidingContentWithUpdates:] to perform all the work
of a dynamic viewport size update, but instead of animating the old content, it is hidden.
The patch is built on top of the animated resize mechanism. Instead of having an animation driving
the beginning and end, we let the content do that. The dynamic resize begins, it runs for as long as
the WebProcess needs, and it ends when first layer tree commit with the new content is processed.
The attribute "_isAnimatingResize" is generalized to support two modes of resizing: animated and
hiding content.
The attribute "_hasCommittedLoadForMainFrame" is rather silly. It is only needed because
[WKWebView _resizeWhileHidingContentWithUpdates:] is intended to be called a lot before the page
is initialized, and doing an animated resize would trash the WebProcess state.
I wish I had a better solution, this is not great.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _processDidExit]):
(-[WKWebView _didCommitLoadForMainFrame]):
(-[WKWebView _didCommitLayerTree:]):
This is the key to make this work properly. We want _resizeWhileHidingContentWithUpdates: to behave
exactly like an animated resize to avoid bugs. So we went to the whole update mechanism using
_resizeAnimationTransformAdjustments to accumulate the adjustments, now we need to restore a correct
view state.
Calling [WKWebView _endAnimatedResize] will do exactly that, but we need to make sure we do not hit
the synchronization path or we would be blocked there for a while, which is what we are trying to avoid.
After r171154, WebPageProxy keeps track of what stage of dynamic viewport update we are in. Since we are
executing the layer tree update stage, with the right transaction ID, WebPageProxy already knows we have
everything we need and does not use any synchronous messages.
(-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
(-[WKWebView _restorePageStateToExposedRect:scale:]):
(-[WKWebView _restorePageStateToUnobscuredCenter:scale:]):
(-[WKWebView _scrollToContentOffset:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _setMinimumLayoutSizeOverride:]):
(-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
(-[WKWebView _setInterfaceOrientationOverride:]):
(-[WKWebView _setMaximumUnobscuredSizeOverride:]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _endAnimatedResize]):
(-[WKWebView _resizeWhileHidingContentWithUpdates:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-07-17 Brent Fulgham <bfulgham@apple.com>
[Mac] Full screen video not always animating in the correct Space
https://bugs.webkit.org/show_bug.cgi?id=135020
<rdar://problem/17542310>
Reviewed by Dean Jackson.
The fullscreen window can "remember" the Space it was part of the first time you enter fullscreen
mode. Subsequent fullscreen transitions will always start from this Space, even if you move
the WebKit-hosted application to a different Space.
We can help the display system know when we've moved to a new Space by calling NSWindow's
'orderBack' method on the fullscreen window prior to starting the transition to fullscreen mode.
This method call hooks the window into the current Space so everything works properly.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:finalFrame:]): Add the
new fullscreen window to the current Space before starting transition to fullscreen.
2014-07-17 Timothy Hatcher <timothy@apple.com>
Make console.profile record to the Timeline.
https://bugs.webkit.org/show_bug.cgi?id=134643
Reviewed by Joseph Pecoraro.
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::setJavaScriptProfilingEnabled):
(WebKit::WebInspector::startJavaScriptProfiling):
(WebKit::WebInspector::stopJavaScriptProfiling):
2014-07-17 Brady Eidson <beidson@apple.com>
Crash in ServicesOverlayController::~ServicesOverlayController.
<rdar://problem/17622172> and https://bugs.webkit.org/show_bug.cgi?id=135022
Reviewed by Tim Horton.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::~ServicesOverlayController): Don’t need to uninstall the
PageOverlay as it has already been destroyed by this point in WebPage::~WebPage.
2014-07-17 Tim Horton <timothy_horton@apple.com>
Sometimes purgeable (or empty!) tiles are shown on screen when resuming the app
https://bugs.webkit.org/show_bug.cgi?id=135018
<rdar://problem/17615038>
Reviewed by Simon Fraser.
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::hideContentUntilNextUpdate):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::hideContentUntilNextUpdate):
* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::detachRootLayer):
Add a mechanism to "hide" drawing area content until the next commit,
by detaching the root layer. RemoteLayerTreeHost will automatically reattach
it at the next commit.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange):
* UIProcess/WebPageProxy.h:
Add a parameter to viewStateDidChange specifying whether dispatching the change
to the Web process is deferrable or not. We will also automatically use "Immediate" if
the view is coming in-window, like we did before.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _applicationWillEnterForeground:]):
Make use of the aforementioned new mechanisms to ensure that we immediately dispatch
view state changes when coming into the foreground, and will have removed the root layer
if a commit didn't come in while waitForDidUpdateViewState blocks.
2014-07-17 Sanghyup Lee <sh53.lee@samsung.com>
[EFL][WK2] Add a "focus,notfound" signal.
https://bugs.webkit.org/show_bug.cgi?id=134674
Reviewed by Gyuyoung Kim.
Add a "focus,notfound" signal to handover focus control to application
because there are no elements of webview to focus on the given direction.
Application can decide to move the focus to next widget of ewk_view or something else
by using this signal.
* UIProcess/API/efl/EwkViewCallbacks.h:
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: Added keyDown and keyUp function.
(EWK2UnitTest::EWK2UnitTestBase::waitUntilDirectionChanged):
(EWK2UnitTest::EWK2UnitTestBase::keyDown):
(EWK2UnitTest::EWK2UnitTestBase::keyUp):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(EWK2ViewTest::FocusNotFoundCallback):
(TEST_F):
* UIProcess/efl/PageUIClientEfl.cpp: Removed unnecessary calls to evas_object_focus_set().
(WebKit::PageUIClientEfl::takeFocus):
2014-07-16 Brady Eidson <beidson@apple.com>
Reintroduce the SPI _websiteDataURLForContainerWithURL: that was removed in r171160
https://bugs.webkit.org/show_bug.cgi?id=134984
Reviewed by David Kilzer.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(+[WKProcessPool _websiteDataURLForContainerWithURL:]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2014-07-16 Alexey Proskuryakov <ap@apple.com>
A test that hangs at cleanup stage confuses webkitpy hugely
https://bugs.webkit.org/show_bug.cgi?id=122475
<rdar://problem/17184354>
Reviewed by Anders Carlsson.
Reset m_pageLoadState when the process exits cleanly - otherwise messages from a
new process for the same WebPageProxy would hit assertions.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::processDidCrash):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
2014-07-16 David Kilzer <ddkilzer@apple.com>
[iOS] Update order file paths for WebKit and WebKit2
<http://webkit.org/b/134993>
<rdar://problem/17557776>
Reviewed by Darin Adler.
* Configurations/Base.xcconfig: Add order file for iOS
named WebKit.order.
2014-07-16 Brady Eidson <beidson@apple.com>
Add WebSecurityOrigin "webSecurityOriginFromDatabaseIdentifier" SPI and change _websiteDataURLForContainerWithURL: SPI
<rdar://problem/17454712> and https://bugs.webkit.org/show_bug.cgi?id=134984
Reviewed by Dan Bernstein.
Change _websiteDataURLForContainerWithURL: SPI to include an optional bundle identifier argument:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(+[WKProcessPool _websiteDataURLForContainerWithURL:bundleIdentifierIfNotInContainer:]):
(+[WKProcessPool _websiteDataURLForContainerWithURL:]): Deleted.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
Add a big shiny comment in a few key places:
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::initializeDatabaseProcess):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::UniqueIDBDatabase):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
(WebKit::WebContext::ensureDatabaseProcess):
2014-07-16 Enrica Casucci <enrica@apple.com>
REGRESSION (iOS WebKit2): Cannot scroll while dragging a selection.
https://bugs.webkit.org/show_bug.cgi?id=134992
<rdar://problem/17528020>
Reviewed by Benjamin Poulain.
This patch exposes the scroller and the visible content rect so that
UIKit can implement autoscroll when dragging the selections.
It also changes that way we do hit testing to allow hit test outside
the clipping region and fixes the way we compute the selection rectangle
for the block selection, ensuring that we consider also non text elements
like images.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView scroller]):
(-[WKContentView visibleRect]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::selectionBoxForRange):
(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::rangeForBlockAtPoint):
(WebKit::WebPage::expandedRangeFromHandle):
(WebKit::WebPage::contractedRangeFromHandle):
(WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
(WebKit::WebPage::changeBlockSelection):
2014-07-16 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/17669097> REGRESSION (r170155): Sandbox violations using a wrong
CFNetwork cache path in WebContent process
Rubber-stamped by Sam Weinig.
Before r170155, we incorrectly checked usesNetworkProcess(), which always returns
false at this point in initialization sequence. But we did the right thing, as we
always need to set the cache path, even when network process is used for most loading.
* WebProcess/cocoa/WebProcessCocoa.mm: (WebKit::WebProcess::platformInitializeWebProcess):
2014-07-16 Timothy Horton <timothy_horton@apple.com>
Dispatch top content inset changes immediately if synchronously waiting for view state changes
https://bugs.webkit.org/show_bug.cgi?id=134942
<rdar://problem/17666800>
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKView.mm:
(-[WKView _dispatchSetTopContentInset]):
(-[WKView _setTopContentInset:]):
Move the check from _setTopContentInset: to _dispatchSetTopContentInset
that ensures that we only send the message if the top content inset changed.
2014-07-16 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Synchronize the dynamic viewport updates with their layer tree commit
https://bugs.webkit.org/show_bug.cgi?id=134965
Related to <rdar://problem/17082607>
Reviewed by Tim Horton.
Dynamic viewport update relies on the _resizeAnimationTransformAdjustments being applied
to the page at the new size during the transition.
Because of the races between the LayerTree Commit and DynamicViewportSizeUpdate, the transform
can be applied to the wrong set of tiles.
This is mostly a problem for unresponsive WebProcess or when the synchronization is done
immediately.
There is at least one more case that is not handled: if synchronizeDynamicViewportUpdate()
completely fails to get the new page, the UIProcess is in a somewhat messy state.
I will look into that separately than the layer tree synchronization.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
(-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:nextValidLayerTreeTransactionID:]):
(-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
(WebKit::WebPageProxy::didCommitLayerTree):
(WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::synchronizeDynamicViewportUpdate):
(WebKit::WebPage::updateVisibleContentRects):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
(WebKit::RemoteLayerTreeDrawingArea::nextTransactionID):
(WebKit::RemoteLayerTreeDrawingArea::currentTransactionID): Deleted.
2014-07-16 Dan Bernstein <mitz@apple.com>
REGRESSION (r170653): Web Content service’s Info.plist has wrong format
https://bugs.webkit.org/show_bug.cgi?id=134973
Reviewed by Alexey Proskuryakov.
* WebKit2.xcodeproj/project.pbxproj: Updated the Add CFBundle Localization Info.plist Key
script build phases to convert Info.plist back to binary format if the
PLIST_FILE_OUTPUT_FORMAT build setting requires it.
2014-07-15 Benjamin Poulain <bpoulain@apple.com>
Fix r171124
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollToContentOffset:]):
On landing, I changed the min/max branches to shrunkTo/expandedTo, but the return value
of those was ignored.
2014-07-15 Dan Bernstein <mitz@apple.com>
WKWebView’s FormClient::willSubmitForm should use CompletionHandlerCallChecker
https://bugs.webkit.org/show_bug.cgi?id=134951
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setFormDelegate:]):
2014-07-15 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] Scrolling request from the scrolling tree must be limited to offsets in the document
https://bugs.webkit.org/show_bug.cgi?id=134952
<rdar://problem/17647116>
Reviewed by Enrica Casucci.
When we received a scroll request, we were taking that offset directly to set the UIScrollView
scroll position. This is a problem if a page request scrolling to an invalid position, we were
still doing it.
This patch limits the position to be inside the document.
-- Why not limit the scroll offset in the WebProcess when we receive the scroll request? --
Some pages rely on the page scale factor changing instantly, because that is how it worked
on WebKit1.
On WebKit2, the WebProcess cannot know the valid range because the obscured insets are changing
dynamically, and the page scale factor can change in response to WebProcess events (the focus
changing for example). To make the page works, the WebProcess does not restrict the scroll position.
In that architecture, the UIProcess has to sanitize the input, which was not done before this patch.
-- Why not use changeContentOffsetBoundedInValidRange()?
The scroll offset as seen by the page is relative to the unobscured rect. While the position used
for history item is a visual position. All we need in this case is a position in the view.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollToContentOffset:]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::resendLastVisibleContentRects):
2014-07-15 Timothy Horton <timothy_horton@apple.com>
Dispatch top content inset changes immediately if synchronously waiting for view state changes
https://bugs.webkit.org/show_bug.cgi?id=134942
<rdar://problem/17666800>
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKView.mm:
(-[WKView endDeferringViewInWindowChanges]):
(-[WKView endDeferringViewInWindowChangesSync]):
(-[WKView _dispatchSetTopContentInset]):
(-[WKView _setTopContentInset:]):
Send top content inset changes immediately before sync-waiting for new tiles from the Web Process.
This will ensure that the incoming contents have the right top content inset, and we don't
flash between the wrong inset and the right one.
2014-07-15 Enrica Casucci <enrica@apple.com>
REGRESSION(WK2 iOS): Safari hangs when switching focus from a field using the Tab key.
https://bugs.webkit.org/show_bug.cgi?id=134934
<rdar://problem/17224638>
Reviewed by Tim Horton.
* UIProcess/ios/WKContentViewInteraction.mm:
Tab and back tab should be handled as special keys that have
a command associated. The command specifies for each key the relevant
action. This patch implements the commands property to create the association
between key and command and the relevant actions that will execute the same
code executed when the used taps on the < > buttons in the accessory bar.
(-[WKContentView keyCommands]):
(-[WKContentView _nextAccessoryTab:]):
(-[WKContentView _prevAccessoryTab:]):
2014-07-15 Oliver Hunt <oliver@apple.com>
More tidying of the webcontent sandbox profile
https://bugs.webkit.org/show_bug.cgi?id=134938
Reviewed by Alexey Proskuryakov.
Remove some excessive abilities from the profile and make
the required ones explicit.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2014-07-14 Andreas Kling <akling@apple.com>
[iOS] Don't progressively re-render tiles while pinch-zooming under memory pressure.
<https://webkit.org/b/134915>
When we're under memory pressure, the last thing we want to be doing is
creating gratuitous new IOSurfaces. Just wait for the gesture to end before
rendering at the new scale.
Reviewed by Tim Horton.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
2014-07-14 Joseph Pecoraro <pecoraro@apple.com>
[Cocoa] _WKRemoteObjectInterface leaks NSString ivar
https://bugs.webkit.org/show_bug.cgi?id=134914
Reviewed by Simon Fraser.
Release our copied NSString in dealloc.
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm:
(-[_WKRemoteObjectInterface dealloc]):
2014-07-14 Dean Jackson <dino@apple.com>
[PlugIns] Check for a non-null snapshot image before trying to decode it
https://bugs.webkit.org/show_bug.cgi?id=134913
<rdar://problem/17606033>
Reviewed by Tim Horton.
Changeset r169820 introduced a bug where we could examine the pixels of
an image (looking for solid colors) before checking if the image actually
existed.
I added a null check, and moved the code around a bit to avoid checking
for existence three times.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginSnapshotTimerFired): Check that snapshotImage exists
before trying to look at it.
2014-07-14 Anders Carlsson <andersca@apple.com>
Fix 32-bit build.
* UIProcess/Cocoa/SessionStateCoding.mm:
(WebKit::encodeSessionState):
2014-07-14 Anders Carlsson <andersca@apple.com>
Use the legacy session coder for encoding/decoding session state
https://bugs.webkit.org/show_bug.cgi?id=134910
Reviewed by Beth Dakin.
* UIProcess/Cocoa/SessionStateCoding.mm:
(WebKit::encodeSessionState):
(WebKit::decodeSessionState):
2014-07-14 Oliver Hunt <oliver@apple.com>
Restrict network process to remote connections
https://bugs.webkit.org/show_bug.cgi?id=134908
Reviewed by Geoffrey Garen.
Further restrict network client
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2014-07-14 Tim Horton <timothy_horton@apple.com>
ASSERT(isMainThread()) under OneShotDisplayLinkHandler
https://bugs.webkit.org/show_bug.cgi?id=134900
Reviewed by Simon Fraser.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(-[OneShotDisplayLinkHandler displayLinkFired:]):
isMainThread means the Web thread sometimes.
2014-07-14 Tim Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _frameOrBoundsChanged]):
2014-07-14 Carlos Alberto Lopez Perez <clopez@igalia.com>
[UNIX] Log error description when failing to create shared memory file.
https://bugs.webkit.org/show_bug.cgi?id=134892
Reviewed by Darin Adler.
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::create): Print the string describing the error number (errno).
2014-07-14 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] On rotation, RemoteLayerTreeDrawingArea renders one extra frame at the wrong orientation
https://bugs.webkit.org/show_bug.cgi?id=134875
Reviewed by Tim Horton.
On animated resize, the size of the DrawingAreaProxy was changed before the layout parameters were
changed. This in turn caused the WebProcess's DrawingArea to flush the layer tree while still
at the wrong orientation.
This patch fixes the issue by making a special case for animated resize:
-While starting animated resize, _frameOrBoundsChanged can be called several times in response to
the API's client changing the WKWebView. In that case, we do not update the drawing area.
-After the "updateBlock" is executed and the size have been changed, the dynamic viewport update
is computed, the dynamicViewportSizeUpdate is sent to the WebProcess, followed by the message
DrawingArea::updateGeometry(). Since both messages are asynchronous, they are received in that
order, and the updateGeometry() is always done after the viewport configuration has been updated.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView setMinimumSize:]): Deleted.
2014-07-14 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Fix withinEpsilon()
https://bugs.webkit.org/show_bug.cgi?id=134798
Reviewed by Darin Adler.
Move the function back to WKWebView, it is no longer needed in WKContentView.
Use the real types as input to properly verify that the two inputs are within
a small value of the 32bit floating point.
The epsilon we use is always on 32 bits float because we want to avoid doing work for changes
that would not make any difference on float.
The source of those small changes comes from the fact UIProcess does a lot of processing
on CGFloat, which are double on 64bits architecture, while the WebProcess use 32bits floating point
for scale. When we are getting updates from the WebProcess, we should ignore any small differences
caused by the computations done with less precision.
* UIProcess/API/Cocoa/WKWebView.mm:
(withinEpsilon):
* UIProcess/ios/WKContentViewInteraction.h:
(withinEpsilon): Deleted.
2014-07-14 Bear Travis <betravis@adobe.com>
[Feature Queries] Enable Feature Queries on Mac
https://bugs.webkit.org/show_bug.cgi?id=134404
Reviewed by Antti Koivisto.
Enable Feature Queries on Mac and resume running the
feature tests.
* Configurations/FeatureDefines.xcconfig: Turn on
ENABLE_CSS3_CONDITIONAL_RULES.
2014-07-14 Anders Carlsson <andersca@apple.com>
Make shouldKeepCurrentBackForwardListItemInList part of WKPageLoaderClientV5 to avoid breaking ABI
https://bugs.webkit.org/show_bug.cgi?id=134889
Reviewed by Beth Dakin.
* UIProcess/API/C/WKPage.cpp:
* UIProcess/API/C/WKPageLoaderClient.h:
2014-07-14 Dan Bernstein <mitz@apple.com>
REGRESSION (r171045): Reproducible crash on navigation in PageClientImpl::willRecordNavigationSnapshot
https://bugs.webkit.org/show_bug.cgi?id=134887
Reviewed by Tim Horton.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::navigationGestureDidBegin): nil-check m_webView. It can be nil when
the client is using WKView directly.
(WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
(WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
(WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
2014-07-14 Eric Carlson <eric.carlson@apple.com>
[Mac] don't enable low power audio mode on external output devices
https://bugs.webkit.org/show_bug.cgi?id=134877
Reviewed by Sam Weinig.
* PluginProcess/PluginProcess.h: Add an empty implementation of
AudioHardwareListener::audioOutputDeviceChanged.
2014-07-14 Tim Horton <timothy_horton@apple.com>
[iOS] Throttle painting using a UI-process-side CADisplayLink
https://bugs.webkit.org/show_bug.cgi?id=134879
<rdar://problem/17641699>
Reviewed by Simon Fraser.
Just waiting for CA to commit is insufficient to actually throttle to 60fps,
because nothing will block the main runloop from spinning.
Instead, listen to a CADisplayLink, and send didUpdate to the WebProcess
the first time it fires after we commit. This is not a guarantee that
our content is on the screen, but we don't have any way to make that guarantee yet.
This will throttle painting, rAF, etc. to the display refresh rate.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(-[OneShotDisplayLinkHandler initWithDrawingAreaProxy:]):
(-[OneShotDisplayLinkHandler dealloc]):
(-[OneShotDisplayLinkHandler displayLinkFired:]):
(-[OneShotDisplayLinkHandler invalidate]):
(-[OneShotDisplayLinkHandler schedule]):
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::didRefreshDisplay):
(WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
2014-07-14 Dan Bernstein <mitz@apple.com>
<rdar://problem/17657391> [iOS] Networking process writes persistent credentials to the keychain
https://bugs.webkit.org/show_bug.cgi?id=134878
Reviewed by Sam Weinig.
Route CFNetwork’s calls to Security API through to the UI process.
* NetworkProcess/ios/NetworkProcessIOS.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcess): Initialize SecItemShim.
* Shared/mac/SecItemShim.cpp:
(WebKit::SecItemShim::initialize): On iOS, rather than using a shim library, supply
CFNetwork with alternate functions to call.
* Shared/mac/SecItemShim.messages.in: Removed #if !PLATFORM(IOS).
* UIProcess/mac/SecItemShimProxy.messages.in: Ditto.
* config.h: Define ENABLE_SEC_ITEM_SHIM to 1 on iOS as well.
2014-07-14 Dan Bernstein <mitz@apple.com>
<rdar://problem/17398060> NetworkProcess sometimes hangs under copyDefaultCredentialForProtectionSpace
https://bugs.webkit.org/show_bug.cgi?id=134666
Reviewed by Tim Horton.
A SecItem may have an attribute whose value is a SecAccessControlRef, which is not supported
by ArgumentCodersCF. In debug builds, trying to encode a CFDictionary containing a value of
unsupprted type causes an assertion to fail, but in release builds encoding succeeds, and
only decoding fails, in this case silently, simply not delivering the
SecItemShim::secItemResponse message.
The fix is to teach ArgumentCodersCF about SecAccessControlRef.
* Shared/cf/ArgumentCodersCF.cpp:
(IPC::typeFromCFTypeRef): Check for the SecAccessControlRef type.
(IPC::encode): Encode the SecAccessControl serialized into CFData.
(IPC::decode): Deserialize a SecAccessControl from the decoded CFData.
* Shared/cf/ArgumentCodersCF.h:
* config.h: Defined HAVE_SEC_ACCESS_CONTROL.
2014-07-13 Dan Bernstein <mitz@apple.com>
<rdar://problem/17295636> [Cocoa] Include element snapshot in _WKActivatedElementInfo
https://bugs.webkit.org/show_bug.cgi?id=134872
Reviewed by Sam Weinig.
* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode): Encode the image if there is one.
(WebKit::InteractionInformationAtPosition::decode): Decode the image if there is one.
* Shared/InteractionInformationAtPosition.h: Added an image member to the struct.
* UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Exposed the boundingRect property and added
an image property.
* UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
(-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:image:]): Added an image
parameter, which is stored in a new ivar.
(-[_WKActivatedElementInfo image]): Added this getter, which converts the ShareableBitmap
into a cached Cocoa image and returns it.
* UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: Added image parameter to the
initializer, removed _boundingRect property declaration from here.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]): Pass the image from the position information
into the _WKActivatedElementInfo initializer.
(-[WKActionSheetAssistant showLinkSheet]): Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotNode): Added.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation): If the element is a link or an image, store a
snapshot of it in the image member of the InteractionInformationAtPosition.
2014-07-13 Dan Bernstein <mitz@apple.com>
[Cocoa] Clean up session state API a little
https://bugs.webkit.org/show_bug.cgi?id=134871
Reviewed by Darin Adler.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _sessionState]):
(-[WKWebView _restoreFromSessionState:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-07-13 Javier Fernandez <jfernandez@igalia.com>
REGRESSION(r171045) [GTK] Build broken.
https://bugs.webkit.org/show_bug.cgi?id=134867
Unreviewed GTK build fix after r171045.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::willRecordNavigationSnapshot):
* UIProcess/API/gtk/PageClientImpl.h:
2014-07-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, EFL build fix since r171045.
* UIProcess/CoordinatedGraphics/WebView.h:
2014-07-12 Dan Bernstein <mitz@apple.com>
[Cocoa] Notify the client when a navigation snapshot is taken
https://bugs.webkit.org/show_bug.cgi?id=134865
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Initialize new flag in
m_navigationDelegateMethods.
(WebKit::NavigationState::willRecordNavigationSnapshot): Added. Calls the new
WKNavigationDelegate method.
* UIProcess/PageClient.h: Declared new client function.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::willRecordNavigationSnapshot): Added. Calls the new client function.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::willRecordNavigationSnapshot): Override that calls
NavigationState::willRecordNavigationSnapshot.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::willRecordNavigationSnapshot): Ditto.
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::recordSnapshot): Added a call to
WebPageProxy::willRecordNavigationSnapshot.
2014-07-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, fix EFL build break since r171034.
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformMediaCacheDirectory):
2014-07-12 Darin Adler <darin@apple.com>
Try to fix 32-bit Mac build.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::navigationGestureDidBegin): Added WK_API_ENABLED conditional.
(WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
(WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
2014-07-12 Javier Fernandez <jfernandez@igalia.com>
REGRESSION(r171034) [GTK] Build broken.
https://bugs.webkit.org/show_bug.cgi?id=134861
Unreviewed GTK build fix.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::navigationGestureDidBegin):
(WebKit::PageClientImpl::navigationGestureWillEnd):
(WebKit::PageClientImpl::navigationGestureDidEnd):
* UIProcess/API/gtk/PageClientImpl.h:
2014-07-12 Javier Fernandez <jfernandez@igalia.com>
REGRESSION(r171024) [GTK] Build broken.
https://bugs.webkit.org/show_bug.cgi?id=134859
Unreviewed GTK build fix.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformMediaCacheDirectory):
2014-07-12 Dan Bernstein <mitz@apple.com>
<rdar://problem/16020380> [Cocoa] Inform the client when back-forward navigation gestures begin and end
https://bugs.webkit.org/show_bug.cgi?id=134853
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new WKNavigationDelegate
methods.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isShowingNavigationGestureSnapshot]): Added this getter.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new property
_isShowingNavigationGestureSnapshot.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Initialize new flags in
m_navigationDelegateMethods.
(WebKit::NavigationState::navigationGestureDidBegin): Added. Calls the new
WKNavigationDelegate method.
(WebKit::NavigationState::navigationGestureWillEnd): Ditto.
(WebKit::NavigationState::navigationGestureDidEnd): Ditto.
* UIProcess/PageClient.h: Declared new client functions.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize new member variable.
(WebKit::WebPageProxy::navigationGestureDidBegin): Set m_isShowingNavigationGestureSnapshot
and call the new client function.
(WebKit::WebPageProxy::navigationGestureWillEnd): Call the new client function.
(WebKit::WebPageProxy::navigationGestureDidEnd): Ditto.
(WebKit::WebPageProxy::navigationGestureSnapshotWasRemoved): Clear
m_isShowingNavigationGestureSnapshot.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isShowingNavigationGestureSnapshot): Added this getter.
* UIProcess/ios/PageClientImplIOS.h: Declared overrides of new client functions.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
NavigationState function.
(WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
(WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture): Added calls to
WebPageProxy::navigationGestureDidBegin and WebPageProxy::navigationGestureWillEnd.
(WebKit::ViewGestureController::endSwipeGesture): Added calls to
WebPageProxy::navigationGestureDidEnd.
(WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
WebPageProxy::navigationGestureSnapshotWasRemoved.
* UIProcess/mac/PageClientImpl.h: Declared overrides of new client functions.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::navigationGestureDidBegin): Override that calls the new
NavigationState function.
(WebKit::PageClientImpl::navigationGestureWillEnd): Ditto.
(WebKit::PageClientImpl::navigationGestureDidEnd): Ditto.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture): Added call to
WebPageProxy::navigationGestureDidBegin.
(WebKit::ViewGestureController::endSwipeGesture): Added calls to
WebPageProxy::navigationGestureDidEnd.
(WebKit::ViewGestureController::removeSwipeSnapshot): Added call to
WebPageProxy::navigationGestureSnapshotWasRemoved.
2014-07-12 Oliver Hunt <oliver@apple.com>
Fix typo in prior patch
https://bugs.webkit.org/show_bug.cgi?id=134858
Reviewed by Sam Weinig.
Fix typo
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultCookieStorageDirectory):
2014-07-12 Dan Bernstein <mitz@apple.com>
[Cocoa] Client is not notified of same-document navigations
https://bugs.webkit.org/show_bug.cgi?id=134855
Reviewed by Sam Weinig.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didSameDocumentNavigationForFrame): Added navigationID parameter.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient): Ditto.
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Added new enum and delegate method.
* UIProcess/Cocoa/NavigationState.h: Declare override of
API::LoaderClient::didSameDocumentNavigationForFrame. Added flag in
m_navigationDelegateMethods struct.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Initialize new m_navigationDelegateMethods
flag.
(WebKit::toWKSameDocumentNavigationType): Added this helper to convert from internal to API
values.
(WebKit::NavigationState::LoaderClient::didSameDocumentNavigationForFrame): Override to call
the delegate method, if implemented.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Added navigationID parameter,
which is forwarded to the client.
* UIProcess/WebPageProxy.h: Added navigationID parameter.
* UIProcess/WebPageProxy.messages.in: Ditto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidChangeLocationWithinPage): Send the navigation ID.
(WebKit::WebFrameLoaderClient::dispatchDidPushStateWithinPage): Ditto.
(WebKit::WebFrameLoaderClient::dispatchDidReplaceStateWithinPage): Ditto.
(WebKit::WebFrameLoaderClient::dispatchDidPopStateWithinPage): Ditto.
2014-07-12 Oliver Hunt <oliver@apple.com>
Extend WebContent sandbox to allow some extra access for frameworks
https://bugs.webkit.org/show_bug.cgi?id=134844
Reviewed by Sam Weinig.
Open up the webcontent sandbox a bit so that some external frameworks
can work correctly.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::mediaCacheDirectory):
* UIProcess/WebContext.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformMediaCacheDirectory):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-07-12 Oliver Hunt <oliver@apple.com>
Temporary work around for <rdar://<rdar://problem/17513375>
https://bugs.webkit.org/show_bug.cgi?id=134848
Reviewed by Sam Weinig.
Temporarily work around <rdar://<rdar://problem/17513375> by
dropping the explicit cookie storage if it points out of the
container.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultCookieStorageDirectory):
2014-07-11 Enrica Casucci <enrica@apple.com>
Implement textStylingAtPosition in WK2.
https://bugs.webkit.org/show_bug.cgi?id=134843
<rdar://problem/17614981>
Reviewed by Benjamin Poulain.
Adding information about typing attributes to EditorState so
that we can implement textStylingAtPosition.
* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView textStylingAtPosition:inDirection:]):
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView toggleBoldface:]):
(-[WKContentView toggleItalics:]):
(-[WKContentView toggleUnderline:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
2014-07-11 Oliver Hunt <oliver@apple.com>
Tighten WebContent sandbox
https://bugs.webkit.org/show_bug.cgi?id=134834
Reviewed by Sam Weinig.
Define a much tighter sandbox profile for the WebContent process
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb:
2014-07-11 Antti Koivisto <antti@apple.com>
REGRESSION (r170163?): Web content shifts revealing space equivalent to the find bar when clicking a link while a phrase is targeted via Cmd+F
https://bugs.webkit.org/show_bug.cgi?id=134833
<rdar://problem/17580021>
Reviewed by Zalan Bujtas.
Some versions of OS X Safari can't handle the new unfreeze timing. Revert back to DidFirstLayout on Mac.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
2014-07-11 Zalan Bujtas <zalan@apple.com>
Subpixel layout: return integral results for offset*, client*, scroll* by default.
https://bugs.webkit.org/show_bug.cgi?id=134651
Reviewed by Simon Fraser.
Revert to returning integral values for Element.offset* client* scroll* by default.
Fractional values break number of sites(tight design) and JS frameworks(fail to handle fractional values).
Since snapped dimension depends on both the original point and the width/height of the box,
we need to call RenderBoxModelObject::pixelSnapped*() helpers, instead of round().
Covered by existing tests
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferencesRefPrivate.h:
2014-07-10 Jinwoo Song <jinwoo7.song@samsung.com>
Unreviewed EFL build fix after r170970.
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformDefaultOpenGLCacheDirectory):
2014-07-10 Carlos Alberto Lopez Perez <clopez@igalia.com>
REGRESSION(r170970) REGRESSION(r170974): [GTK] Build broken.
https://bugs.webkit.org/show_bug.cgi?id=134825
Unreviewed GTK build fix.
* Shared/SessionState.h: Put ifdefs for ViewSnapshot on Mac port.
* Shared/WebBackForwardListItem.h: Idem.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultOpenGLCacheDirectory): Implement skeleton.
2014-07-10 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] It should be safe to call WKContentViewInteraction's cleanupInteraction multiple times
https://bugs.webkit.org/show_bug.cgi?id=134820
Reviewed by Andreas Kling.
If a view is destroyed just after a crash, "cleanupInteraction" is called twice: once on crash,
once on dealloc.
The code handling _interactionViewsContainerView is using KVO to monitor transform changes. It is not safe
to remove the observer if we are not already observing on that view.
To solve the problem, this patch makes the cleanup actually remove the view so that setup and cleanup
are completely symmetrical. If cleanup is called twice, the second time would not enter the branch because
the view is already nil.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
2014-07-10 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Move WKInspectorHighlightView to its own file
https://bugs.webkit.org/show_bug.cgi?id=134819
Reviewed by Joseph Pecoraro.
WKInspectorHighlightView brought a lot of path/quad-related code into WKContentView.mm,
so move it into its own file.
* UIProcess/WKInspectorHighlightView.h: Added.
* UIProcess/WKInspectorHighlightView.mm: Added.
(-[WKInspectorHighlightView dealloc]):
(-[WKInspectorHighlightView _removeAllLayers]):
(-[WKInspectorHighlightView _createLayers:]):
(findIntersectionOnLineBetweenPoints):
(quadIntersection):
(layerPathWithHole):
(layerPath):
(-[WKInspectorHighlightView _layoutForNodeHighlight:]):
(-[WKInspectorHighlightView _layoutForRectsHighlight:]):
(-[WKInspectorHighlightView update:]):
* UIProcess/ios/WKContentView.mm:
(-[WKInspectorHighlightView initWithFrame:]): Deleted.
(-[WKInspectorHighlightView dealloc]): Deleted.
(-[WKInspectorHighlightView _removeAllLayers]): Deleted.
(-[WKInspectorHighlightView _createLayers:]): Deleted.
(findIntersectionOnLineBetweenPoints): Deleted.
(quadIntersection): Deleted.
(layerPathWithHole): Deleted.
(layerPath): Deleted.
(-[WKInspectorHighlightView _layoutForNodeHighlight:]): Deleted.
(-[WKInspectorHighlightView _layoutForRectsHighlight:]): Deleted.
(-[WKInspectorHighlightView update:]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2014-07-10 Tim Horton <timothy_horton@apple.com>
REGRESSION (r170935): WKWebView is always transparent until the first layer tree commit
https://bugs.webkit.org/show_bug.cgi?id=134818
<rdar://problem/17632468>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(scrollViewBackgroundColor):
r170935 made it so that we would initialize the scroll view background color to an
invalid color until the first layer tree commit. We should go with white instead.
2014-07-10 Enrica Casucci <enrica@apple.com>
Add a mechanism to notify the UIProcess when an editing command is done executing.
https://bugs.webkit.org/show_bug.cgi?id=134807
Reviewed by Tim Horton.
Some editing commands have an effect on some parts of the system that
run inside the UIProcess. A good example are the cursor movement commands
that require an update of the autocorrection/autosuggestion machinery.
This patch adds a way to reliably know when the command has been executed
in the WebProcess. A previous attempt at solving this problem was added in
r170858 and was partially reverted in r170948.
The change also removes the selectionWillChange notification added in r170858.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::editorStateChanged):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::selectionWillChange): Deleted.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView executeEditCommandWithCallback:]):
(-[WKContentView _moveUp:withHistory:]):
(-[WKContentView _moveDown:withHistory:]):
(-[WKContentView _moveLeft:withHistory:]):
(-[WKContentView _moveRight:withHistory:]):
(-[WKContentView _moveToStartOfWord:withHistory:]):
(-[WKContentView _moveToStartOfParagraph:withHistory:]):
(-[WKContentView _moveToStartOfLine:withHistory:]):
(-[WKContentView _moveToStartOfDocument:withHistory:]):
(-[WKContentView _moveToEndOfWord:withHistory:]):
(-[WKContentView _moveToEndOfParagraph:withHistory:]):
(-[WKContentView _moveToEndOfLine:withHistory:]):
(-[WKContentView _moveToEndOfDocument:withHistory:]):
(-[WKContentView _selectionWillChange]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::executeEditCommand):
(WebKit::WebPageProxy::notifySelectionWillChange): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::executeEditCommandWithCallback):
2014-07-10 Joseph Pecoraro <pecoraro@apple.com>
[Mac] NSWindow warning: adding an unknown subview opening detached Inspector
https://bugs.webkit.org/show_bug.cgi?id=134813
Reviewed by Timothy Hatcher.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::createInspectorWindow):
Use a selector that will avoid the warning message.
2014-07-10 Oliver Hunt <oliver@apple.com>
Remove use of container relative restrictions in the network process sandbox
https://bugs.webkit.org/show_bug.cgi?id=134816
Reviewed by Anders Carlsson.
As i'm tidying up the various sandboxes and that's meaning we
need to reduce some file restrictions in the network process.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
2014-07-10 Pratik Solanki <psolanki@apple.com>
Unreviewed iOS build fix after r170974. Define id if building a non ObjC file.
* UIProcess/mac/ViewSnapshotStore.h:
2014-07-10 Tim Horton <timothy_horton@apple.com>
Store ViewSnapshots directly on the WebBackForwardListItem
https://bugs.webkit.org/show_bug.cgi?id=134667
<rdar://problem/17082639>
Reviewed by Dan Bernstein.
Make ViewSnapshot a refcounted class. Store it directly on the back-forward item
instead of in a side map referenced by UUID. Switch to a very simple LRU eviction model for now.
This fixes a ton of snapshot management bugs; for example, we would start throwing out snapshots
in the page that was actively being interacted with *first* when evicting snapshots, instead of
preferring older snapshots. Additionally, we would not throw away snapshots when back forward items
became unreachable.
There is definitely room for improvement of the eviction mechanism, but this is closer to a time-tested implementation.
* Shared/SessionState.h:
Keep a ViewSnapshot instead of a UUID on the BackForwardListItemState.
* Shared/WebBackForwardListItem.h:
Fix some indented namespace contents.
(WebKit::WebBackForwardListItem::snapshot):
(WebKit::WebBackForwardListItem::setSnapshot):
(WebKit::WebBackForwardListItem::setSnapshotUUID): Deleted.
(WebKit::WebBackForwardListItem::snapshotUUID): Deleted.
Switch the snapshot getter/setter to operate on ViewSnapshots instead of UUIDs.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _takeViewSnapshot]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::takeViewSnapshot):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::takeViewSnapshot):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::takeViewSnapshot):
Adopt ViewSnapshot::create, return a PassRefPtr, and class-ify ViewSnapshot.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::shouldUseSnapshotForSize):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
Grab the ViewSnapshot directly from the WebBackForwardListItem, and adopt the new functions.
* UIProcess/ios/WebMemoryPressureHandlerIOS.mm:
(WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
Rename discardSnapshots to discardSnapshotImages, because we're really only discarding
the images; the render tree size/background color "snapshot" remains and is useful.
* UIProcess/mac/ViewSnapshotStore.h:
(WebKit::ViewSnapshot::setRenderTreeSize):
(WebKit::ViewSnapshot::renderTreeSize):
(WebKit::ViewSnapshot::setBackgroundColor):
(WebKit::ViewSnapshot::backgroundColor):
(WebKit::ViewSnapshot::setDeviceScaleFactor):
(WebKit::ViewSnapshot::deviceScaleFactor):
(WebKit::ViewSnapshot::imageSizeInBytes):
(WebKit::ViewSnapshot::surface):
(WebKit::ViewSnapshot::size):
(WebKit::ViewSnapshot::creationTime):
Make ViewSnapshot a refcounted class.
Add create functions which take an image (or slot ID), and relevant sizes.
It is expected that a ViewSnapshot is created with an image, and it is only possible
to remove that image, never to replace it. A new ViewSnapshot is required in that case.
Add setters for things that ViewSnapshotStore sets on the snapshot after the PageClient
retrieves it from the view. Add getters for things that the ViewGestureControllers need.
Remove removeSnapshotImage, getSnapshot, and the snapshot map.
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::~ViewSnapshotStore):
(WebKit::ViewSnapshotStore::didAddImageToSnapshot):
(WebKit::ViewSnapshotStore::willRemoveImageFromSnapshot):
Manage m_snapshotCacheSize and m_snapshotsWithImages via didAddImageToSnapshot and willRemoveImageFromSnapshot.
willRemoveImageFromSnapshot will -always- be called before the ViewSnapshot is destroyed.
(WebKit::ViewSnapshotStore::pruneSnapshots):
Switch to a simple LRU eviction model. As previously mentioned, it's possible to do better, but
this is much less broken than the previous implementation.
(WebKit::ViewSnapshotStore::recordSnapshot):
(WebKit::ViewSnapshotStore::discardSnapshotImages):
(WebKit::ViewSnapshot::create):
(WebKit::ViewSnapshot::ViewSnapshot):
(WebKit::ViewSnapshot::~ViewSnapshot):
(WebKit::ViewSnapshot::hasImage):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::asLayerContents):
If a surface is Empty when it comes back from being volatile, throw away the surface
and notify the Store to remove it from m_snapshotCacheSize (via clearImage()).
(WebKit::ViewSnapshotStore::removeSnapshotImage): Deleted.
(WebKit::ViewSnapshotStore::getSnapshot): Deleted.
(WebKit::ViewSnapshotStore::discardSnapshots): Deleted.
2014-07-10 Beth Dakin <bdakin@apple.com>
Need Setting/WKPreference that allows clients to prevent scrollbars from drawing
on a secondary thread
https://bugs.webkit.org/show_bug.cgi?id=134778
-and corresponding-
<rdar://problem/17595333>
Reviewed by Tim Horton.
This is a requirement for some types of performance tests.
New pref.
* Shared/WebPreferencesDefinitions.h:
PDFPlugin has to implement this new ScrollableArea virtual function to indicate
the Setting’s value.
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::forceUpdateScrollbarsOnMainThreadForPerformanceTesting):
New pref.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-07-10 Tim Horton <timothy_horton@apple.com>
[iOS] Frequent assertion failures when swiping back
Reviewed by Dan Bernstein.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
Don't create an unused VoidCallback. It will assert when destroyed without being called.
2014-07-10 Oliver Hunt <oliver@apple.com>
Pass sandbox extension for GL cache over to webprocess
https://bugs.webkit.org/show_bug.cgi?id=134806
Reviewed by Anders Carlsson.
Add additional WebProcess parameters to pass an extension
that allows access to the opengl cache directory in the
host application's container.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::openGLCacheDirectory):
* UIProcess/WebContext.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultOpenGLCacheDirectory):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-07-10 Dan Bernstein <mitz@apple.com>
iOS build fix.
* WebProcess/WebPage/ServicesOverlayController.h:
2014-07-09 Brady Eidson <beidson@apple.com>
Phone number highlights should always be visible if the mouse hovers over.
<rdar://problem/17527476> and https://bugs.webkit.org/show_bug.cgi?id=134784
Reviewed by Tim Horton.
This is a fairly extensive rewrite of ServicesOverlayController.
It allows one selection highlight for the entire selection, and as many telephone number highlights as there are numbers.
If a telephone number highlight is hovered over, it wins and is painted.
If no telephone number highlight is hovered but the selection highlight is, then it is painted.
The purposes of each method are self evident by their name, and the concepts are mostly the same as they used to be.
The exception is establishHoveredTelephoneHighlight which gets a more detailed explanation below.
* Platform/Logging.h: Add a Services logging channel.
* WebProcess/WebPage/ServicesOverlayController.h:
(WebKit::TelephoneNumberData::TelephoneNumberData):
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::ServicesOverlayController):
(WebKit::ServicesOverlayController::selectionRectsDidChange):
(WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
(WebKit::ServicesOverlayController::clearHighlightState):
(WebKit::ServicesOverlayController::drawRect):
(WebKit::ServicesOverlayController::drawSelectionHighlight):
(WebKit::ServicesOverlayController::maybeDrawTelephoneNumberHighlight):
(WebKit::ServicesOverlayController::drawHighlight):
(WebKit::ServicesOverlayController::clearSelectionHighlight):
(WebKit::ServicesOverlayController::clearHoveredTelephoneNumberHighlight):
(WebKit::ServicesOverlayController::establishHoveredTelephoneHighlight): Starts walking the telephone number ranges and
creating a highlight for each one that doesn’t already have a highlight. If that highlight is also being hovered by
the mouse, then it is set as the hovered telephone number highlight and the method stops creating new highlights.
(WebKit::ServicesOverlayController::maybeCreateSelectionHighlight):
(WebKit::ServicesOverlayController::mouseEvent):
(WebKit::ServicesOverlayController::handleClick):
(WebKit::ServicesOverlayController::drawTelephoneNumberHighlight): Deleted.
(WebKit::ServicesOverlayController::drawCurrentHighlight): Deleted.
2014-07-10 Timothy Horton <timothy_horton@apple.com>
Assertions or crashes under _takeViewSnapshot when restoring windows
https://bugs.webkit.org/show_bug.cgi?id=134792
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Taking a window-server snapshot of a non-visible window tends to not succeed.
2014-07-09 Pratik Solanki <psolanki@apple.com>
Buffer CSS and JS resources in network process before sending over to web process
https://bugs.webkit.org/show_bug.cgi?id=134560
<rdar://problem/16737186>
Reviewed by Antti Koivisto.
For CSS and JS resources, ask the network process to buffer the entire resource instead of
sending it to web process in chunks since the web process can't do anything with a partial
css or js file.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
(WebKit::NetworkResourceLoadParameters::encode):
(WebKit::NetworkResourceLoadParameters::decode):
* Shared/Network/NetworkResourceLoadParameters.h:
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
2014-07-09 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Disable text quantization while actively changing the page's scale factor
https://bugs.webkit.org/show_bug.cgi?id=134781
Reviewed by Tim Horton and Myles C. Maxfield.
While zooming a page, text quantization causes glyphs to "move" in order to get to the closest
boundary for the current scale factor.
We do not want this to happen while dynamically changing the scale factor because the effect
is visible. To avoid this, we disable text quantization if the page's scale factor changes
in response to a non-stable contentRect update.
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::hasStablePageScaleFactor):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::hasStablePageScaleFactor):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
2014-07-09 Joseph Pecoraro <pecoraro@apple.com>
[iOS] Use UIAlertController API in WKFileUploadPanel instead of SPI
https://bugs.webkit.org/show_bug.cgi?id=134777
Reviewed by Sam Weinig.
* UIProcess/ios/forms/WKFileUploadPanel.mm:
(-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
2014-07-09 Shivakumar JM <shiva.jm@samsung.com>
[EFL][WK2] Add new Public API in ewk_download_job.h to get size of the data already downloaded.
https://bugs.webkit.org/show_bug.cgi?id=134759
Reviewed by Gyuyoung Kim.
Add new API in ewk_download_job.h to get size of the data already downloaded.
* UIProcess/API/efl/ewk_download_job.cpp:
(ewk_download_job_received_data_length_get):
(EwkDownloadJob::receivedData):
* UIProcess/API/efl/ewk_download_job.h:
* UIProcess/API/efl/ewk_download_job_private.h:
* UIProcess/API/efl/tests/test_ewk2_download_job.cpp:
(EWK2DownloadJobTest::on_download_requested):
(EWK2DownloadJobTest::on_download_finished):
2014-07-09 Enrica Casucci <enrica@apple.com>
REGRESSION(r170858): Safari freezes upon making a search on a website (yelp.com).
https://bugs.webkit.org/show_bug.cgi?id=134791
<rdar://problem/17616971>
Reviewed by Benjamin Poulain.
After r170858 we notify the keyboard too often about
the changed selection. This patch removes the notification
until we find a better way to do it that doesn't cause
deadlocks.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _selectionWillChange]):
(-[WKContentView _selectionChanged]):
2014-07-09 Anders Carlsson <andersca@apple.com>
Safari showing blank pages
https://bugs.webkit.org/show_bug.cgi?id=134790
<rdar://problem/17617166>
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Make sure to add the content view to the scroll view.
2014-07-09 Anders Carlsson <andersca@apple.com>
Closed web views should never create new web processes
https://bugs.webkit.org/show_bug.cgi?id=134787
<rdar://problem/16892526>
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadHTMLString:baseURL:]):
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
Return nil if the returned navigation ID is 0.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcess):
Assert that the page is not closed.
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
(WebKit::WebPageProxy::loadRequest):
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::loadData):
(WebKit::WebPageProxy::loadHTMLString):
(WebKit::WebPageProxy::loadAlternateHTMLString):
(WebKit::WebPageProxy::loadPlainTextString):
(WebKit::WebPageProxy::loadWebArchiveData):
Add early returns if the page is closed.
* UIProcess/WebPageProxy.h:
2014-07-09 Anders Carlsson <andersca@apple.com>
Support transparent WKWebViews
https://bugs.webkit.org/show_bug.cgi?id=134779
<rdar://problem/17351058>
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Call _updateScrollViewBackground instead of setting the background color.
(contentZoomScale):
Use dot notation.
(scrollViewBackgroundColor):
Helper function that returns the scroll view background color.
If the web view isn't opaque, we want the scroll view to be transparent.
(-[WKWebView _updateScrollViewBackground]):
Call scrollViewBackgroundColor.
(-[WKWebView setOpaque:]):
Call WebPageProxy::setDrawsBackground and update the scroll view background.
(-[WKWebView setBackgroundColor:]):
Call setBackgroundColor on the content view.
2014-07-09 Andy Estes <aestes@apple.com>
[iOS] WebKit can crash under QuickLookDocumentData::encode() when viewing a QuickLook preview
https://bugs.webkit.org/show_bug.cgi?id=134780
Reviewed by Tim Horton.
Don't use CFDataCreateWithBytesNoCopy() when we can't guarantee the lifetime of the copied-from DataReference
will match or exceed that of the CFDataRef. Copy the data instead.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveData):
2014-07-09 Pratik Solanki <psolanki@apple.com>
Move resource buffering from SynchronousNetworkLoaderClient to NetworkResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=134732
Reviewed by Darin Adler.
Buffer the resource in NetworkResourceLoader instead of SynchronousNetworkLoaderClient. This
is in preparation for bug 134560 where we will be supporting JS and CSS resource buffering
that uses AsynchronousNetworkLoaderClient.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::didReceiveBuffer):
(WebKit::NetworkResourceLoader::didFinishLoading):
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::bufferedData):
* NetworkProcess/SynchronousNetworkLoaderClient.cpp:
(WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
(WebKit::SynchronousNetworkLoaderClient::didFinishLoading):
(WebKit::SynchronousNetworkLoaderClient::didFail):
(WebKit::SynchronousNetworkLoaderClient::sendDelayedReply):
* NetworkProcess/SynchronousNetworkLoaderClient.h:
2014-07-09 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] subviews of the unscaled view drift out during CA animations
https://bugs.webkit.org/show_bug.cgi?id=134751
Reviewed by Enrica Casucci.
It is not possible to animate the WKContentView and the inverse view in such a way
that the combined matrix remain the identity for every frame of the animation.
This patch solves the issue by moving the unscaled view as a sibling of WKContentView
instead of a child so that we do not need to update two scales simultaneously.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _processDidExit]):
(-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
Set the z scale to 1 or no coordinate transform will work with this view.
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _endAnimatedResize]):
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
Since we need to observe changes inside the animation block, the code now use KVO to observe changes of scale.
(-[WKContentView cleanupInteraction]):
(-[WKContentView unscaledView]):
(-[WKContentView inverseScale]):
(-[WKContentView observeValueForKeyPath:ofObject:change:context:]):
We update the utility views as usual. The extra bits here are to deal with views coming in during an animation.
If a new utility view comes in during a scaling animation, we do not want to start a new animation with the same curve
to end up at the right place. To avoid any issue, we just hide the view until the animation is finished.
(-[WKContentView hitTest:withEvent:]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _updateUnscaledView]): Deleted.
2014-07-09 Tim Horton <timothy_horton@apple.com>
Use IOSurface ViewSnapshots everywhere on Mac, remove JPEG encoding path
https://bugs.webkit.org/show_bug.cgi?id=134773
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
* UIProcess/mac/ViewSnapshotStore.h:
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::~ViewSnapshotStore):
(WebKit::ViewSnapshotStore::recordSnapshot):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::asLayerContents):
(WebKit::createIOSurfaceFromImage): Deleted.
(WebKit::compressImageAsJPEG): Deleted.
(WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost): Deleted.
(WebKit::ViewSnapshotStore::didCompressSnapshot): Deleted.
Remove all ViewSnapshot(Store) code related to JPEG-encoded snapshots.
Remove the "image" member on ViewSnapshot; Mac will always start out with an IOSurface instead.
Adopt WebCore::IOSurface::createFromImage to make that happen.
Add a comment noting that if a snapshot comes back empty, we should throw it away completely.
2014-07-09 Anders Carlsson <andersca@apple.com>
RemoteLayerBackingStore::ensureBackingStore should ensure that the entire backing store gets redrawn
https://bugs.webkit.org/show_bug.cgi?id=134772
Reviewed by Tim Horton.
* Shared/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::Buffer::operator bool):
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::ensureBackingStore):
2014-07-09 KwangHyuk Kim <hyuki.kim@samsung.com>
[EFL] Fix crash caused by invalid cursor image.
https://bugs.webkit.org/show_bug.cgi?id=134663
Reviewed by Gyuyoung Kim.
Remove calling of updateCursor since the custom cursor image is invalid once a mouse is out of the webview.
* UIProcess/API/efl/EwkView.cpp:
(EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
2014-07-08 Tim Horton <timothy_horton@apple.com>
Remove WebBackForwardListItems when their owning page goes away
https://bugs.webkit.org/show_bug.cgi?id=134709
<rdar://problem/17584645>
Reviewed by Dan Bernstein.
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::pageID):
Add the associated PageID to the WebBackForwardListItem.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::restoreFromState):
Push the current PageID onto the WebBackForwardListItem.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):
Remove all of the WebBackForwardListItems from m_backForwardListItemMap when
the page they are associated with is removed.
(WebKit::WebProcessProxy::addBackForwardItem):
Push the PageID from the WebProcess onto the WebBackForwardListItem.
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::idToHistoryItemMap):
(WebKit::historyItemToIDMap):
(WebKit::updateBackForwardItem):
(WebKit::WebBackForwardListProxy::addItemFromUIProcess):
(WebKit::WK2NotifyHistoryItemChanged):
(WebKit::WebBackForwardListProxy::idForItem):
(WebKit::WebBackForwardListProxy::addItem):
(WebKit::WebBackForwardListProxy::goToItem):
(WebKit::WebBackForwardListProxy::close):
* WebProcess/WebPage/WebBackForwardListProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSession):
Keep track of the PageID that back-forward items were created by.
Pass the PageID along when registering WebBackForwardListItems.
2014-07-08 Tim Horton <timothy_horton@apple.com>
[WK2] Expose a few drawing/compositing settings on WKPreferences(Private)
https://bugs.webkit.org/show_bug.cgi?id=134645
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _compositingBordersVisible]):
(-[WKPreferences _setCompositingBordersVisible:]):
(-[WKPreferences _compositingRepaintCountersVisible]):
(-[WKPreferences _setCompositingRepaintCountersVisible:]):
(-[WKPreferences _tiledScrollingIndicatorVisible]):
(-[WKPreferences _setTiledScrollingIndicatorVisible:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
Expose layer borders, repaint counters, and the tiled scrolling indicator on WKPreferences, as SPI.
2014-07-08 Tim Horton <timothy_horton@apple.com>
WKProcessPoolConfigurationPrivate's maximumProcessCount property has no effect
https://bugs.webkit.org/show_bug.cgi?id=134711
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _initWithConfiguration:]):
Respect the maximumProcessCount.
Currently the default limit is UINT_MAX; if maximumProcessCount = 0 (the default), we'll use that limit.
2014-07-08 Adrian Perez de Castro <aperez@igalia.com>
[GTK] Move user style sheet API out of WebKitWebViewGroup
https://bugs.webkit.org/show_bug.cgi?id=134551
Reviewed by Carlos Garcia Campos.
* PlatformGTK.cmake: Include the new source files in the build.
* UIProcess/API/C/gtk/WKView.cpp:
(WKViewCreate):
Adapt to the additional webkitWebViewBaseCreateWebPage() parameter.
* UIProcess/API/gtk/WebKitUserContent.cpp: Added.
(toUserContentInjectedFrames):
(toUserStyleLevel):
(toStringVector):
(_WebKitUserStyleSheet::_WebKitUserStyleSheet):
(webkit_user_style_sheet_ref):
(webkit_user_style_sheet_unref):
(webkit_user_style_sheet_new):
(webkitWebKitUserStyleSheetToUserStyleSheet):
* UIProcess/API/gtk/WebKitUserContent.h: Added.
* UIProcess/API/gtk/WebKitUserContentManager.cpp: Added.
(_WebKitUserContentManagerPrivate::_WebKitUserContentManagerPrivate):
(webkit_user_content_manager_class_init):
(webkit_user_content_manager_new):
(webkit_user_content_manager_add_style_sheet):
(webkit_user_content_manager_remove_all_style_sheets):
(webkitUserContentManagerGetUserContentControllerProxy):
* UIProcess/API/gtk/WebKitUserContentManager.h: Added.
* UIProcess/API/gtk/WebKitUserContentManagerPrivate.h: Added.
* UIProcess/API/gtk/WebKitUserContentPrivate.h: Added.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(webkitWebContextCreatePageForWebView): Add a new parameter to allow
passing the WebKitUserContentManager that the web view will use.
* UIProcess/API/gtk/WebKitWebContextPrivate.h: Ditto.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewConstructed): Added handling of the
"user-content-manager" property on construction.
(webkitWebViewSetProperty): Added support for the
"user-content-manager" property.
(webkitWebViewGetProperty): Added support for the
"user-content-manager" property.
(webkit_web_view_class_init): Added the "user-content-manager"
property definition to the WebKitWebView class.
(webkit_web_view_new_with_related_view): Made related views share
the same WebKitUserContentManager used by the view they are
related to.
(webkit_web_view_new_with_user_content_manager): Added.
(webkit_web_view_get_user_content_manager): Added.
* UIProcess/API/gtk/WebKitWebView.h: Add new API methods.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreate): Added a parameter to pass the user
content manager.
(webkitWebViewBaseCreateWebPage): Added a parameter to pass the user
content manager.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Ditto.
* UIProcess/API/gtk/WebKitWebViewGroup.cpp: Removed the bits related
to user style sheet support from WebKitWebViewGroup.
(webkit_web_view_group_set_settings):
(toAPIArray): Deleted.
(webkit_web_view_group_add_user_style_sheet): Deleted.
(webkit_web_view_group_remove_all_user_style_sheets): Deleted.
* UIProcess/API/gtk/WebKitWebViewGroup.h: Deleted the API methods
for user style sheet handling.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added the new API
functions and types, and removed the methods which are no longer
available in WebKitWebViewGroup.
* UIProcess/API/gtk/webkit2.h: Add the new headers.
* UIProcess/UserContent/WebUserContentControllerProxy.cpp: Added
methods to add and remove user style sheets, alike those used for
user scripts.
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::addUserStyleSheet):
(WebKit::WebUserContentControllerProxy::removeAllUserStyleSheets):
* UIProcess/UserContent/WebUserContentControllerProxy.h: Ditto.
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::platformCreateInspectorPage):
Adapt to the additional webkitWebViewBaseCreateWebPage() parameter.
* WebProcess/UserContent/WebUserContentController.cpp: Added methods
to add and remove user style sheets, alike those used for user scripts.
(WebKit::WebUserContentController::addUserStyleSheets):
(WebKit::WebUserContentController::removeAllUserStyleSheets):
* WebProcess/UserContent/WebUserContentController.h: Ditto.
* WebProcess/UserContent/WebUserContentController.messages.in:
Ditto.
2014-07-08 Zan Dobersek <zdobersek@igalia.com>
[GTK] Guard uses of RedirectedXCompositeWindow in WebKitWebViewBase with PLATFORM(X11)
https://bugs.webkit.org/show_bug.cgi?id=133871
Reviewed by Martin Robinson.
Guard uses of the RedirectedXCompositeWindow object in WebKitWebViewBase with the
PLATFORM(X11) build guard. This is required to properly support building the GTK
port only for the Wayland target.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
(webkitWebViewRenderAcceleratedCompositingResults):
(resizeWebKitWebViewBaseFromAllocation):
(webkitWebViewBaseUpdatePreferences):
(webkitWebViewBaseCreateWebPage):
2014-07-07 Tim Horton <timothy_horton@apple.com>
Turn on accelerated drawing for WebKit2 by default
https://bugs.webkit.org/show_bug.cgi?id=134708
<rdar://problem/17584642>
Reviewed by Simon Fraser.
* Shared/WebPreferencesDefinitions.h:
Make Mac match iOS, in that accelerated drawing is on by default.
2014-07-07 Timothy Horton <timothy_horton@apple.com>
Don't leak _WKRemoteObjectRegistry in WKBrowsingContextController
https://bugs.webkit.org/show_bug.cgi?id=134703
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _remoteObjectRegistry]):
Adoption is important!!
2014-07-07 Simon Fraser <simon.fraser@apple.com>
[UI-side compositing] Support reflections on custom layers like video
https://bugs.webkit.org/show_bug.cgi?id=134701
Reviewed by Tim Horton.
For video reflections, we have to support cloning of PlatformCALayerRemoteCustom
in the web process. Do so by implementing PlatformCALayerRemoteCustom::clone(),
which does the right gyrations to get AVPlayerLayers cloned, then makes a
new PlatformCALayerRemoteCustom to wrap the new layer. This ends up getting
its own context hosting ID, allowing the clone to show in the UI process.
Attempt to do the same for WebGL, but turn it off because it breaks.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::encode): Unconditionally encode/decode
the hostingContextID. It will be 0 for most layers.
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::decode):
(WebKit::RemoteLayerTreeTransaction::description):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::create): Creation with a custom PlatformLayer* always
creates a PlatformCALayerRemoteCustom.
(WebKit::PlatformCALayerRemote::clone): Factor some code.
(WebKit::PlatformCALayerRemote::updateClonedLayerProperties):
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::create):
(WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
(WebKit::PlatformCALayerRemoteCustom::clone): Clone by making an instance of the
correct type of platform layer when possible, then wrapping a PlatformCALayerRemoteCustom
around it.
(WebKit::PlatformCALayerRemoteCustom::contents):
(WebKit::PlatformCALayerRemoteCustom::setContents):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::layerWasCreated):
(WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
2014-07-07 Simon Fraser <simon.fraser@apple.com>
[UI-side compositing] Crash when starting a filter transition on a reflected layer
https://bugs.webkit.org/show_bug.cgi?id=134694
Reviewed by Tim Horton.
When cloned layers had animations, we would fire two animationDidStart callbacks,
but the second would pass an empty animationKey string to the web process, resulting
in a crash.
Fix by not blindly copying all layer properties when cloning PlatformCALayerRemotes,
since the clone would include addedAnimations, and then get the same animations
added on top by the caller.
Also protect against an empty animation key in the animationDidStart callback.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::animationDidStart):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
(WebKit::PlatformCALayerRemote::clone): Don't copy all the properties; copy
them manually as PlatformCALayerMac does. Only copy the big things if they don't
have their default values.
(WebKit::PlatformCALayerRemote::copyFiltersFrom): Need an implementation of this
for clone() to call.
2014-07-07 Tim Horton <timothy_horton@apple.com>
Nearly everything in the UIProcess "leaks" when WKWebView is torn down
https://bugs.webkit.org/show_bug.cgi?id=134699
<rdar://problem/17581777>
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Adoption is important!
2014-07-07 Enrica Casucci <enrica@apple.com>
REGRESSION(iOS WK2): arrow keys movements don't work.
https://bugs.webkit.org/show_bug.cgi?id=134561
<rdar://problem/16827629>
Reviewed by Benjamin Poulain.
This change add the implementations for cursor movement selectors.
It also provides a mechanism to ensure that every selection
change in WebKit is reflected in UIKit so that it can update the
autocorrection data. This way we ensure that the autocorraction state
is consistent even when selection changes are originated by JavaScript.
WebPageProxy::editorStateChanged now notifies the page client when the
selection is about to change as well as when it actually changed.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::editorStateChanged):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::selectionWillChange):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cut:]): Removed incorrect calls to textWillChange and
textDidChange.
(-[WKContentView paste:]):
(-[WKContentView _moveUp:withHistory:]):
(-[WKContentView _moveDown:withHistory:]):
(-[WKContentView _moveLeft:withHistory:]):
(-[WKContentView _moveRight:withHistory:]):
(-[WKContentView _moveToStartOfWord:withHistory:]):
(-[WKContentView _moveToStartOfParagraph:withHistory:]):
(-[WKContentView _moveToStartOfLine:withHistory:]):
(-[WKContentView _moveToStartOfDocument:withHistory:]):
(-[WKContentView _moveToEndOfWord:withHistory:]):
(-[WKContentView _moveToEndOfParagraph:withHistory:]):
(-[WKContentView _moveToEndOfLine:withHistory:]):
(-[WKContentView _moveToEndOfDocument:withHistory:]):
(-[WKContentView _selectionWillChange]):
(-[WKContentView _selectionChanged]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::notifySelectionWillChange):
2014-07-07 Anders Carlsson <andersca@apple.com>
Add SPI for saving and restoring a WKWebView's _WKSessionState
https://bugs.webkit.org/show_bug.cgi?id=134693
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKPage.cpp:
(WKPageRestoreFromSessionState):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _sessionState]):
(-[WKWebView _restoreFromSessionStateData:]):
(-[WKWebView _restoreFromSessionState:]):
(-[WKWebView _restoreSessionState:andNavigate:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKSessionState.mm:
(-[_WKSessionState _initWithSessionState:]):
* UIProcess/API/Cocoa/_WKSessionStateInternal.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromSessionState):
* UIProcess/WebPageProxy.h:
2014-07-07 Anders Carlsson <andersca@apple.com>
Add a stubbed out _WKSessionState class
https://bugs.webkit.org/show_bug.cgi?id=134690
Reviewed by Geoffrey Garen.
* UIProcess/API/Cocoa/_WKSessionState.h: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
* UIProcess/API/Cocoa/_WKSessionState.mm: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
(-[_WKSessionState initWithData:]):
(-[_WKSessionState data]):
* UIProcess/API/Cocoa/_WKSessionStateInternal.h: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
* UIProcess/Cocoa/SessionStateCoding.h: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
* UIProcess/Cocoa/SessionStateCoding.mm: Copied from Source/WebKit2/UIProcess/LegacySessionStateCoding.h.
(WebKit::encodeSessionState):
(WebKit::decodeSessionState):
* UIProcess/LegacySessionStateCoding.h:
* WebKit2.xcodeproj/project.pbxproj:
2014-07-07 Anders Carlsson <andersca@apple.com>
Some of the WKPreferences (API) property getters read like questions
https://bugs.webkit.org/show_bug.cgi?id=134678
<rdar://problem/17576847>
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences javaScriptIsEnabled]):
(-[WKPreferences javaIsEnabled]):
(-[WKPreferences plugInsAreEnabled]):
(-[WKPreferences isJavaScriptEnabled]): Deleted.
(-[WKPreferences isJavaEnabled]): Deleted.
(-[WKPreferences arePlugInsEnabled]): Deleted.
2014-07-07 Brady Eidson <beidson@apple.com>
ServicesOverlayController menus show up in the wrong place.
<rdar://problem/17130576> and https://bugs.webkit.org/show_bug.cgi?id=134684
Reviewed by Tim Horton.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged): Handle cases where
the telephone number is in a subframe.
(WebKit::ServicesOverlayController::handleClick): The click point is always in main frame document
coordinates, so convert it to window coordinates using the main frame’s FrameView.
2014-07-07 Dan Bernstein <mitz@apple.com>
[Cocoa] Assertion failure in NavigationState::LoaderClient::didStartProvisionalLoadForFrame (navigationID) when navigating through the page cache
https://bugs.webkit.org/show_bug.cgi?id=134682
Reviewed by Tim Horton.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame): Replaced the
assertion with a FIXME.
(WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
Ditto.
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame): Ditto.
2014-07-07 KwangHyuk Kim <hyuki.kim@samsung.com>
[EFL] Fix cursor artifacts on naver map site.
https://bugs.webkit.org/show_bug.cgi?id=134649
Reviewed by Gyuyoung Kim.
Old evas cursor and ecore x cursor are reset before new cursor is applied.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::updateCursor):
2014-07-06 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] The tap highlight ID is not invalidated when a long press ends
https://bugs.webkit.org/show_bug.cgi?id=134660
Reviewed by Darin Adler.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _cancelInteraction]):
(-[WKContentView _finishInteraction]):
(cancelPotentialTapIfNecessary):
I messed that up in r170600. I only accounted for the web process being too fast.
If the web process is too slow, _cancelInteraction or _finishInteraction happen before
_didGetTapHighlightForRequest:, and we also need to nuke the tap highlight.
2014-07-06 Tim Horton <timothy_horton@apple.com>
[WK2] Don't support dynamically enabling the RemoteLayerTree debug indicator
https://bugs.webkit.org/show_bug.cgi?id=134644
Reviewed by Darin Adler.
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::setShouldShowDebugIndicator): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::preferencesDidChange):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::initializeDebugIndicator):
(WebKit::RemoteLayerTreeDrawingAreaProxy::setShouldShowDebugIndicator): Deleted.
The indicator depends on the live layer tree commits coming in, including layer creation,
so it can't be turned on after the root layer is created. Even a refresh is insufficient
to get it working; the debug indicator really needs to exist from the first commit.
So, don't even attempt to dynamically enable the indicator; create it at
RemoteLayerTreeDrawingAreaProxy construction time if the pref is enabled.
2014-07-06 Yoav Weiss <yoav@yoav.ws>
Turn on img@sizes compile flag
https://bugs.webkit.org/show_bug.cgi?id=134634
Reviewed by Benjamin Poulain.
* Configurations/FeatureDefines.xcconfig: Moved compile flag to alphabetical order.
2014-07-06 Brady Eidson <beidson@apple.com>
Speculative fix for: NetworkProcess sometimes hangs under copyDefaultCredentialForProtectionSpace
https://bugs.webkit.org/show_bug.cgi?id=134666
Reviewed by Tim Horton.
* Shared/mac/SecItemRequestData.cpp:
(WebKit::SecItemRequestData::encode): Encode whether or not the query dictionary exists.
(WebKit::SecItemRequestData::decode): Only fail when query dictionary fails to decode if we expect one.
* UIProcess/mac/SecItemShimProxy.cpp:
(WebKit::SecItemShimProxy::secItemRequest): If the request is of type Invalid, log an error message asking
for a bug, and respond with an "invalid parameter" error.
2014-07-06 Antti Koivisto <antti@apple.com>
Don't throttle layer flushes when the main resource is a GIF
https://bugs.webkit.org/show_bug.cgi?id=134650
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::adjustLayerFlushThrottling):
2014-07-04 Rohit Kumar <kumar.rohit@samsung.com>
[EFL][WK2]Fix build break in EFL WK2
https://bugs.webkit.org/show_bug.cgi?id=134629
Unreviewed build fix.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::scheduleCompositingLayerFlushImmediately):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
2014-07-04 Dan Bernstein <mitz@apple.com>
[Cocoa] -[WKWebView _reload] is unused
https://bugs.webkit.org/show_bug.cgi?id=134638
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _reload]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-07-04 Tim Horton <timothy_horton@apple.com>
[WK2] Take TopContentInset into account when sending dictionary lookup point to PluginView
https://bugs.webkit.org/show_bug.cgi?id=134624
<rdar://problem/17222041>
Reviewed by Sam Weinig.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::performDictionaryLookupAtLocation):
Perform the same coordinate conversion we use for mouse events, which happens
to take the top content inset into account.
2014-07-04 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK WK2 build fix after r170787.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::scheduleCompositingLayerFlushImmediately):
* WebProcess/WebPage/DrawingAreaImpl.h:
2014-07-04 Zan Dobersek <zdobersek@igalia.com>
Unreviewed. Reverting the bad changes introduced in r170795.
* Platform/IPC/ArgumentDecoder.cpp:
(IPC::ArgumentDecoder::decode): Deleted.
* Platform/IPC/ArgumentDecoder.h:
* Platform/IPC/ArgumentEncoder.cpp:
(IPC::ArgumentEncoder::encode): Deleted.
* Platform/IPC/ArgumentEncoder.h:
2014-07-04 Zan Dobersek <zdobersek@igalia.com>
Unreviewed. Fixing the build for ports on 64-bit Linux.
Add IPC encoding and decoding overloads for the long long type, needed
after r170755 started encoding and decoding long long variables in
FormDataElement.
* Platform/IPC/ArgumentDecoder.cpp:
(IPC::ArgumentDecoder::decode):
* Platform/IPC/ArgumentDecoder.h:
* Platform/IPC/ArgumentEncoder.cpp:
(IPC::ArgumentEncoder::encode):
* Platform/IPC/ArgumentEncoder.h:
2014-07-04 Timothy Horton <timothy_horton@apple.com>
[iOS][WK2] Black web view after un-suspending process
https://bugs.webkit.org/show_bug.cgi?id=134623
<rdar://problem/17513223>
Reviewed by Simon Fraser.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange):
Add an argument to viewStateDidChange that allows callers (-[WKContentView _applicationWillEnterForeground:])
to force us to wait for a synchronous reply from the Web process after performing a view state change.
(WebKit::WebPageProxy::dispatchViewStateChange):
Move the has-been-in-window-and-now-is-newly-in-window check into dispatchViewStateChange.
Adjust the logic surrounding going into/out of window by factoring out the IsInWindow-did-change check, for clarity.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _applicationWillEnterForeground:]):
As previously mentioned, wait for a reply when foregrounding.
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlushImmediately):
(WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
(WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange):
Make sure to schedule a commit immediately if the UI process is waiting for a reply.
Previously we assumed that a commit would be scheduled anyway because we would have to reparent the
layer tree, but that doesn't happen in the suspension-without-unparenting case. Also, we want to skip
all throttling in this case.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerFlushImmediately):
2014-07-03 Gavin Barraclough <baraclough@apple.com>
Should not take background task assertion for NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=134622
Reviewed by Tim Horton.
When the WebContent wants to complete a task in the background we take a process assertion on the child process, and also need to prevent the UI process from suspending.
However for the NetworkProcess we always just hold a process assertion, and don't want this to interfere with UIApp suspension.
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
- ProcessAssertion -> ProcessAndUIAssertion
* UIProcess/ProcessAssertion.cpp:
(WebKit::ProcessAssertion::ProcessAssertion):
- assignment -> initializer list.
(WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
(WebKit::ProcessAndUIAssertion::~ProcessAndUIAssertion):
(WebKit::ProcessAndUIAssertion::setState):
- added no-op implementation.
(WebKit::ProcessAssertion::~ProcessAssertion): Deleted.
* UIProcess/ProcessAssertion.h:
- removed ~ProcessAssertion, added ProcessAndUIAssertion class.
* UIProcess/ProcessThrottler.cpp:
(WebKit::ProcessThrottler::didConnnectToProcess):
- ProcessAssertion -> ProcessAndUIAssertion
* UIProcess/ProcessThrottler.h:
- ProcessAssertion -> ProcessAndUIAssertion
* UIProcess/ios/ProcessAssertionIOS.mm:
(WebKit::ProcessAssertion::ProcessAssertion):
- assignment -> initializer list.
- moved code to manage WKProcessAssertionBackgroundTaskManager
(WebKit::ProcessAssertion::setState):
- moved code to manage WKProcessAssertionBackgroundTaskManager
(WebKit::ProcessAndUIAssertion::ProcessAndUIAssertion):
(WebKit::ProcessAndUIAssertion::~ProcessAndUIAssertion):
(WebKit::ProcessAndUIAssertion::setState):
- moved code to manage WKProcessAssertionBackgroundTaskManager from ProcessAssertion.
(WebKit::ProcessAssertion::~ProcessAssertion): Deleted.
- delete - moved code to manage WKProcessAssertionBackgroundTaskManager
2014-07-03 Simon Fraser <simon.fraser@apple.com>
Clean up Brady's mess on iOS.
* Platform/mac/StringUtilities.h:
* Platform/mac/StringUtilities.mm:
2014-07-03 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Compositing layers draw outside page bounds
https://bugs.webkit.org/show_bug.cgi?id=134619
<rdar://problem/16953222>
Reviewed by Benjamin Poulain.
With the new rubber-banding behavior, we no longer have the root content layer clipping all
the web layers, but this resulted in web layers which were moved outside the viewport by CSS
transforms not being clipped.
Fix by adding a clipping layer inside the scroll view, above _rootContentView. This layer
normally has the same bounds as the content, but when rubber-banding or pinching,
it takes the union of the content bounds and the rect used for fixed positioning.
To make scrolling work as expected in this scenario, when it has non-zero offset, it
has to compensate by setting its bounds origin.
The bounds of the clipping layer are updated on scrolling/zooming, and when the
layer commit tells us that the content size changed.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]):
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:configuration:webView:]):
(-[WKContentView updateFixedClippingView:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
(-[WKContentView _didCommitLayerTree:]):
2014-07-03 Brady Eidson <beidson@apple.com>
When showing the selection menu, include menu options for all selected phone numbers.
<rdar://problem/16983434>, <rdar://problem/16874568>, and https://bugs.webkit.org/show_bug.cgi?id=134613
Reviewed by Tim Horton.
Move some telephone number menu logic from WebKitSystemInterface here.
Also provide utility to get just the one menu item relevant to a telephone number.
* Platform/mac/MenuUtilities.h:
* Platform/mac/MenuUtilities.mm: Added.
(WebKit::menuItemForTelephoneNumber):
(WebKit::menuItemsForTelephoneNumber):
* Platform/mac/StringUtilities.h:
* Platform/mac/StringUtilities.mm:
(WebKit::formattedPhoneNumberString): Return a localized formatted phone number.
Add a member to track the selected phone numbers:
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::selectedTelephoneNumbers):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu): Also add menu items for each phone number that is
in the selection.
Switch away from a WKSI method, and remove a lot of unneeded forward declarations and soft linking:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showTelephoneNumberMenu):
(WebKit::WebPageProxy::showSelectionServiceMenu):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::drawSelectionHighlight):
(WebKit::ServicesOverlayController::handleClick): Pass the phone numbers along.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::handleSelectionServiceClick): Pass the phone numbers along.
2014-07-03 Gavin Barraclough <baraclough@apple.com>
WKProcessAssertionBackgroundTaskManager should clear member if task expires
https://bugs.webkit.org/show_bug.cgi?id=134618
Reviewed by Anders Carlson.
Failure to do so results in a warning, and could result in us erroneously completing a background task too soon.
* UIProcess/ios/ProcessAssertionIOS.mm:
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
- remove local variable, _backgroundTask = UIBackgroundTaskInvalid;
2014-07-03 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed iOS build fix for r170774.
Remove some unnecessary WTF::moves on iOS:
error: static_assert failed "T is not an lvalue reference; move() is unnecessary."
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::getQueuedTouchEventsForPage):
(WebKit::EventDispatcher::touchEvent):
2014-07-03 Anders Carlsson <andersca@apple.com>
Try to fix the iOS build.
Add WebPageProxyCocoa.mm for code shared between iOS and OS X. Put the recent searches save/restore code there.
* UIProcess/Cocoa/WebPageProxyCocoa.mm: Added.
(WebKit::autosaveKey):
(WebKit::WebPageProxy::saveRecentSearches):
(WebKit::WebPageProxy::loadRecentSearches):
* UIProcess/mac/WebPageProxyMac.mm:
* WebKit2.xcodeproj/project.pbxproj:
2014-07-03 Dan Bernstein <mitz@apple.com>
<rdar://problem/16337741> The UI process needs to track the number of HTTP subresource loads in progress (or at least whether there are any)
https://bugs.webkit.org/show_bug.cgi?id=134615
Reviewed by Anders Carlsson.
Added a _networkRequestsInProgress boolean property to WKWebView.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
PageLoadStateObserver member functions.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _networkRequestsInProgress]): New getter that gets this state from the
PageLoadState.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new property.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::willChangeNetworkRequestsInProgress):: Override this new
PageLoadState::Observer member function by sending the appropriate KVO change message to the
WKWebView.
(WebKit::NavigationState::didChangeNetworkRequestsInProgress): Ditto.
* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::commitChanges): Check for changes to networkRequestsInProgress
and call the observers if needed.
(WebKit::PageLoadState::reset): Reset networkRequestsInProgress in the uncommitted state.
(WebKit::PageLoadState::setNetworkRequestsInProgress): Set networkRequestsInProgress in the
uncommitted state.
* UIProcess/PageLoadState.h:
(WebKit::PageLoadState::networkRequestsInProgress): Added this getter.
(WebKit::PageLoadState::Data::Data): Initialize new networkRequestsInProgress member.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setNetworkRequestsInProgress): Added. Updates the PageLoadState.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Added SetNetworkRequestsInProgress message.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest): Call
WebPage::addResourceRequest.
(WebKit::WebFrameLoaderClient::dispatchDidFinishLoading): Call
WebPage::removeResourceRequest.
(WebKit::WebFrameLoaderClient::dispatchDidFailLoading): Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::addResourceRequest): Added. If the new request is for an HTTP-family URL,
add its identifier to the set of network resourece request identifiers. If the set was
previously empty, send the WebPageProxy a message.
(WebKit::WebPage::removeResourceRequest): Added. Remove the identifier from the set. If it
becomes empty, send the WebPageProxy a message.
* WebProcess/WebPage/WebPage.h:
2014-07-03 Anders Carlsson <andersca@apple.com>
Remove two unused functions
https://bugs.webkit.org/show_bug.cgi?id=134614
Reviewed by Andreas Kling.
* UIProcess/LegacySessionStateCoding.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeLegacySessionHistoryEntryData): Deleted.
(WebKit::decodeLegacySessionHistoryEntryData): Deleted.
2014-07-03 Daniel Bates <dabates@apple.com>
Add WTF::move()
https://bugs.webkit.org/show_bug.cgi?id=134500
Rubber-stamped by Anders Carlsson.
Substitute WTF::move() for std::move().
* DatabaseProcess/DatabaseProcess.cpp:
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
* Platform/IPC/ArgumentCoders.h:
* Platform/IPC/ArgumentDecoder.cpp:
* Platform/IPC/Connection.cpp:
* Platform/IPC/Connection.h:
[...]
2014-07-03 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Fix small bugs of dynamicViewportSizeUpdate that were causing inaccuracies in the computed target
https://bugs.webkit.org/show_bug.cgi?id=134582
Reviewed by Tim Horton.
This patch fixes two small bugs that were causing "jumpiness" on animated resize:
1) The new scale was less accurate than the target scale, making the WebProcess force a worse scale on the content.
2) The code putting back the rects in view was ignoring the obscured insets, constraining the scroll position more
than it should be.
The first problem was cause by a series of rounding issues accumulating to the fact that "scale != targetScale"
was almost never true.
The first issue is that the unobscured content size was stored in integer coordinates. Because of that, it was
impossible to determine accurately how much content is in the view.
The outcome was that visibleHorizontalFraction was very inaccurate compared to what the UIProcess computed.
Another issue affecting the scale is that scaleAfterViewportWidthChange was computing the widthToKeepInView
on floating point. Since ARM64 does all those computations on doubles in the UIProcess, the value would be quite
different from the received targetScale.
Finally, the code uses withinEpsilon() instead of a strict equality to reduce the effect of rounding errors.
For the second issue, the problem was that I was bounding the exposed rect to the page bounds. It is completely
valid to have an exposed rect outside the page bounds, that area is just under the obscured insets.
On the other hand, the unobscured rect needs to be within the bounds as we do not want to rotate to a rubberbanding
position. The fix is simply to put the right rect into bounds, and the horizontal/vertical adjustement applies on
both rects.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::scaleAfterViewportWidthChange):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::updateVisibleContentRects):
2014-07-03 Anders Carlsson <andersca@apple.com>
Fix build.
* UIProcess/mac/WebPageProxyMac.mm:
2014-07-03 Anders Carlsson <andersca@apple.com>
Get rid of WebPageProxyCF.cpp
https://bugs.webkit.org/show_bug.cgi?id=134609
Reviewed by Dan Bernstein.
* UIProcess/cf/WebPageProxyCF.cpp: Removed.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::autosaveKey):
(WebKit::WebPageProxy::saveRecentSearches):
(WebKit::WebPageProxy::loadRecentSearches):
* WebKit2.xcodeproj/project.pbxproj:
2014-07-03 Tim Horton <timothy_horton@apple.com>
[WK2] Revise the flat find indicator secondary highlight shadows
https://bugs.webkit.org/show_bug.cgi?id=134607
<rdar://problem/17554828>
Reviewed by Brady Eidson.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::drawRect):
Bring back the secondary highlight shadow, with new constants.
2014-07-03 Tim Horton <timothy_horton@apple.com>
[iOS][WK2] Sometimes the swipe snapshot stays up too long
https://bugs.webkit.org/show_bug.cgi?id=134506
<rdar://problem/17496803>
Reviewed by Simon Fraser.
Implement a transaction callback mechanism.
The UI process can register a callback at any point, generally immediately after sending a message to the Web process.
It will then send another message (in-order) with the callback ID to the Web process, which will put it into the next transaction
(scheduling a new one if needed). When the transaction comes back to the UI process, the callbacks are performed.
This ensures that the callback fires alongside a commit that includes the results of whatever messages were sent before it was registered.
For now, all callbacks are fired just before committing layer changes, but it's possible future patches will want post-commit callbacks.
Make use of this to remove the ViewGestureControllerIOS snapshots at the right time.
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::callbackIDs):
(WebKit::RemoteLayerTreeTransaction::setCallbackIDs):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
Add a vector of callback IDs to the transaction; encode and decode as appropriate.
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::dispatchAfterEnsuringDrawing):
(WebKit::DrawingAreaProxy::lastVisibleTransactionID): Deleted.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::dispatchAfterEnsuringDrawing):
Add dispatchAfterEnsuringDrawing, which takes a function.
When a callback is added, we send the callback ID to the Web process via the AddTransactionCallbackID message.
Perform callbacks listed in the incoming transaction's vector of callback IDs.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::addTransactionCallbackID):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
(WebKit::RemoteLayerTreeDrawingArea::addTransactionCallbackID):
Keep track of the pending callback IDs on the drawing area, and move them into the transaction.
We schedule a flush when installing a transaction callback on the premise that
sometimes the action (goToBackForwardListItem in the swipe case) might have already occurred
and been committed by the time the Web process receives AddTransactionCallbackID, so we need
to cause another commit to send the callbacks across. If said commit is still pending, this is a no-op.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(allViewGestureControllers):
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::~ViewGestureController):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::willCommitPostSwipeTransitionLayerTree):
(WebKit::ViewGestureController::setRenderTreeSize):
* UIProcess/mac/ViewGestureController.h:
Keep a side-map of page IDs to ViewGestureControllers, so that we can safely get back to
our ViewGestureController from the callback.
When the callback fires, if it succeeded, set m_shouldRemoveSnapshotWhenTargetRenderTreeSizeHit,
so that the commit (which is about to occur immediately after the callback returns) which calls
setRenderTreeSize will (perhaps) remove the snapshot.
If it failed, we remove the snapshot immediately, as this usually happens if the Web process crashed.
2014-07-03 Brady Eidson <beidson@apple.com>
Followup to "rects sent to ServicesOverlayController are wrong"
https://bugs.webkit.org/show_bug.cgi?id=134568
Rubberstamped by Tim Horton.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::drawSelectionHighlight): Don’t check to see if the
proposed rect intersects the dirty rect. We always need to include all rects that form
the selection when creating the DDHighlight.
2014-07-03 Tim Horton <timothy_horton@apple.com>
[WK2] RemoteLayerTreeDrawingAreaProxy re-checks a preference every commit for no reason
https://bugs.webkit.org/show_bug.cgi?id=134586
Reviewed by Benjamin Poulain.
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::setShouldShowDebugIndicator):
(WebKit::DrawingAreaProxy::showDebugIndicator): Deleted.
(WebKit::DrawingAreaProxy::isShowingDebugIndicator): Remove this, nobody is using it.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::preferencesDidChange):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::setShouldShowDebugIndicator):
(WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator): Deleted.
Check the debug indicator pref at construction time, and update the state when it changes.
Checking it every commit was surprisingly expensive.
2014-07-03 Antti Koivisto <antti@apple.com>
Ensure frame creation messages get through to UI process
https://bugs.webkit.org/show_bug.cgi?id=134591
<rdar://problem/16918218>
Reviewed by Anders Carlsson.
If we are middle of handling a synchronous message from UI process a frame creation message back gets delayed.
The subsequent synchronous DecidePolicyForNavigationAction message expects that the frame creation
message has arrived first and fails.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::createWithCoreMainFrame):
(WebKit::WebFrame::createSubframe):
Send messages with DispatchMessageEvenWhenWaitingForSyncReply so they always go through in order.
2014-07-03 Anders Carlsson <andersca@apple.com>
Get rid of DecoderAdapter and EncoderAdapter
https://bugs.webkit.org/show_bug.cgi?id=134598
Reviewed by Andreas Kling.
* CMakeLists.txt:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/DecoderAdapter.cpp: Removed.
* WebProcess/WebPage/DecoderAdapter.h: Removed.
* WebProcess/WebPage/EncoderAdapter.cpp: Removed.
* WebProcess/WebPage/EncoderAdapter.h: Removed.
* WebProcess/WebPage/WebPage.cpp:
2014-07-02 Anders Carlsson <andersca@apple.com>
Stop using EncoderAdapter/DecoderAdapter for FormData
https://bugs.webkit.org/show_bug.cgi?id=134571
Reviewed by Andreas Kling.
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode):
(WebKit::NetworkResourceLoadParameters::decode):
2014-07-03 Brady Eidson <beidson@apple.com>
Selection rects sent to ServicesOverlayController are wrong.
<rdar://problem/16727796> and https://bugs.webkit.org/show_bug.cgi?id=134568
Reviewed by Darin Adler (and Tim Horton and Ryosuke Niwa).
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectionRectsDidChange): Also pass the GapRects to the ServicesOverlayController.
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/ServicesOverlayController.h:
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::expandForGap):
(WebKit::compactRectsWithGapRects): Combine 3+ rects down to exactly 3 rects, then expand them based on GapRects.
(WebKit::ServicesOverlayController::selectionRectsDidChange): Call compactRectsWithGapRects, then reverse the list.
(WebKit::ServicesOverlayController::drawSelectionHighlight): Tell data detectors to flip this.
(WebKit::ServicesOverlayController::drawTelephoneNumberHighlight): Tell data detectors to flip this.
(WebKit::ServicesOverlayController::drawCurrentHighlight): No need to flip this anymore.
2014-07-03 Brady Eidson <beidson@apple.com>
Possible crash in IconDatabase in WebCore::IconDatabase::dispatchDidRemoveAllIconsOnMainThread
<rdar://problem/17437687> and https://bugs.webkit.org/show_bug.cgi?id=134517
Reviewed by Eric Carlson.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::~WebContext): Instead of directly deref’ing the WebIconDatabase, ask it to
deref itself when appropriate.
* UIProcess/WebIconDatabase.cpp:
(WebKit::WebIconDatabase::WebIconDatabase):
(WebKit::WebIconDatabase::didClose): If this WebIconDatabase is supposed to deref itself when
appropriate, do so now.
(WebKit::WebIconDatabase::derefWhenAppropriate): If the WebCore::IconDatabase is still open then
defer this deref.
* UIProcess/WebIconDatabase.h:
2014-07-03 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r170676): [GTK] UI process crashes when the Web Process crashes
https://bugs.webkit.org/show_bug.cgi?id=134541
Reviewed by Gyuyoung Kim.
It happens when attaching a new web process, because it tries to
encode a null SessionState.
* UIProcess/LegacySessionStateCodingNone.cpp:
(WebKit::encodeLegacySessionState): Return an empty API::Data
object instead of nullptr.
(WebKit::encodeLegacySessionHistoryEntryData): Ditto.
2014-07-03 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r170743): [GTK] [EFL] Build broken.
https://bugs.webkit.org/show_bug.cgi?id=134585
Reviewed by Philippe Normand.
Add ENABLE(PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC) guards where needed.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::initializePlugin):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
2014-07-02 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] Make is safe/fast to use the animated resize API without resizing anything
https://bugs.webkit.org/show_bug.cgi?id=134570
Reviewed by Enrica Casucci.
Today, if someone calls _beginAnimatedResizeWithUpdates-_endAnimatedResize, it is always a very heavy process
forcing a relayout and can cause synchronous operations.
We should not force the caller of the API to maintain their own state tracking, we should do that for them.
With this patch, we track everything we need for a resize and only do the heavy lifting if anything has actually changed.
* UIProcess/API/Cocoa/WKWebView.mm:
(activeMinimumLayoutSize):
(activeMinimumLayoutSizeForMinimalUI):
(activeMaximumUnobscuredSize):
(activeOrientation):
This code is used in both _didRelaunchProcess and _beginAnimatedResizeWithUpdates. It is moved to static functions
to avoid having it in two places.
(-[WKWebView _didRelaunchProcess]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
The updates now goes like this:
1) Set _isAnimatingResize to prevent the undesired side effects updateBlock() if we really need to resize.
2) Get all the original values before calling the update block.
3) Call the update block.
4a) If nothing useful for resize has changed, reset _isAnimatingResize to false.
We also need to update the visible content rect because the update block may have changed something unrelated
to the view size (scale, scroll position, etc).
4b) If we really need to resize, proceed as usual.
(-[WKWebView _endAnimatedResize]):
With the changes in _beginAnimatedResizeWithUpdates:, _isAnimatingResize is only set for real cases of animated resize,
bail out early if that flag isn't set.
The remaining code is unchanged, it is just not indented due to the removal of the if() branch.
2014-07-02 Roger Fong <roger_fong@apple.com>
Improve handling of primary offscreen plugins.
https://bugs.webkit.org/show_bug.cgi?id=134528.
<rdar://problem/17471864>
Reviewed by Dean Jackson.
* WebProcess/Plugins/PluginView.cpp:
Determine whether or not the plugin starts offscreen when the plugin is initialized.
(WebKit::PluginView::initializePlugin):
(WebKit::PluginView::pluginSnapshotTimerFired):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createPlugin):
Use the PluginProcessTypeNormal for offscreen plugins that are potentially primary plugins.
2014-07-02 Enrica Casucci <enrica@apple.com>
REGRESSION(WK2): Undo does not work in text fields in Safari.
https://bugs.webkit.org/show_bug.cgi?id=134572
<rdar://problem/17542238>
Reviewed by Benjamin Poulain.
This patch adds for iOS the same implementation we have already for OS X.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(-[WKEditCommandObjC initWithWebEditCommandProxy:]):
(-[WKEditCommandObjC command]):
(-[WKEditorUndoTargetObjC undoEditing:]):
(-[WKEditorUndoTargetObjC redoEditing:]):
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::registerEditCommand):
(WebKit::PageClientImpl::clearAllEditCommands):
(WebKit::PageClientImpl::canUndoRedo):
(WebKit::PageClientImpl::executeUndoRedo):
2014-07-02 Gavin Barraclough <baraclough@apple.com>
ProcessAssertion should also prevent UIApp suspension
https://bugs.webkit.org/show_bug.cgi?id=134563
Reviewed by Dan Bernstein.
If the application suspends then the child processes will, too.
Use beginBackgroundTaskWithName:expirationHandler: to request that the application remain runnable
while waiting for background tasks to complete.
* UIProcess/ProcessAssertion.cpp:
(WebKit::ProcessAssertion::~ProcessAssertion):
- Added destructor.
* UIProcess/ProcessAssertion.h:
- Added destructor.
* UIProcess/ios/ProcessAssertionIOS.mm:
(+[WKProcessAssertionBackgroundTaskManager shared]):
- singleton WKProcessAssertionBackgroundTaskManager.
(-[WKProcessAssertionBackgroundTaskManager init]):
(-[WKProcessAssertionBackgroundTaskManager dealloc]):
- register/remove notification handlers.
(-[WKProcessAssertionBackgroundTaskManager _updateBackgroundTask]):
- if we need to be runnable make sure we're holding a BackgroundTask, if not release it.
(-[WKProcessAssertionBackgroundTaskManager _applicationDidEnterBackgroundOrWillEnterForeground:]):
- detect when the app enters/leaves foreground; calls to _updateBackgroundTask.
(-[WKProcessAssertionBackgroundTaskManager incrementNeedsToRunInBackgroundCount]):
(-[WKProcessAssertionBackgroundTaskManager decrementNeedsToRunInBackgroundCount]):
- interface to update the count; calls to _updateBackgroundTask.
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::~ProcessAssertion):
- count ProcessAssertions in and out of existance.
(WebKit::ProcessAssertion::setState):
- count when the state changes.
2014-07-01 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/134522> Remove duplication in code that prepares the user agent string on Mac and iOS
Reviewed by Simon Fraser.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::webKitBundleVersionString): Return the entire CFBundleVersion now that WebCore handles formatting it.
(WebKit::WebPageProxy::standardUserAgent):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::webKitBundleVersionString): Ditto.
(WebKit::WebPageProxy::standardUserAgent):
2014-06-28 Oliver Hunt <oliver@apple.com>
Restrict network process sandbox
https://bugs.webkit.org/show_bug.cgi?id=134360
Reviewed by Sam Weinig.
Add more restrictions to the network process sandbox.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
Always use the cache directory provided in the initialization parameters,
and make sure we consume the cookie directory extension.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
Make the sandbox profile much more restrictive.
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
The network process now requires an extension to access
its cookie storage.
* Shared/mac/SandboxUtilities.cpp:
(WebKit::pathForProcessContainer):
* Shared/mac/SandboxUtilities.h:
We need to be able to get hold of our container so
that we can get the correct cookie storage directory.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureNetworkProcess):
We have to pass in the an extension for the cookie storage directory when
initalising the network process
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultCookieStorageDirectory):
Make sure we provide the correct location on IOS
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Consume the cookie storage extension
2014-07-02 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r170725.
* CMakeLists.txt: Removed Shared/LegacySessionState.cpp.
2014-07-02 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r170719 for !CF platforms.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::sessionStateData): Deleted.
(WebKit::WebPageProxy::restoreFromSessionStateData): Deleted.
2014-07-02 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/134521> iOS should use shared code to determine the system marketing version
Reviewed by Simon Fraser.
* Shared/ios/ChildProcessIOS.mm: Update #import.
* Shared/mac/ChildProcessMac.mm: Ditto.
2014-07-02 Anders Carlsson <andersca@apple.com>
Rip out more dead code
https://bugs.webkit.org/show_bug.cgi?id=134562
Reviewed by Andreas Kling.
* Shared/LegacySessionState.cpp: Removed.
* Shared/LegacySessionState.h: Removed.
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem): Deleted.
(WebKit::WebBackForwardListItem::backForwardData): Deleted.
(WebKit::WebBackForwardListItem::setBackForwardData): Deleted.
(WebKit::WebBackForwardListItem::encode): Deleted.
(WebKit::WebBackForwardListItem::decode): Deleted.
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::create): Deleted.
(WebKit::WebBackForwardListItem::setOriginalURL): Deleted.
(WebKit::WebBackForwardListItem::setURL): Deleted.
(WebKit::WebBackForwardListItem::setTitle): Deleted.
* UIProcess/WebPageProxy.cpp:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
2014-07-02 Anders Carlsson <andersca@apple.com>
RestoreSession should take a vector of BackForwardListItemStates
https://bugs.webkit.org/show_bug.cgi?id=134558
Reviewed by Tim Horton.
* Scripts/webkit2/messages.py:
(struct_or_class):
(headers_for_type):
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::itemStates):
* UIProcess/WebBackForwardList.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::restoreSession):
(WebKit::WebPage::restoreSessionAndNavigateToCurrentItem): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2014-07-02 Anders Carlsson <andersca@apple.com>
Store the back forward list item id inside BackForwardListItemState
https://bugs.webkit.org/show_bug.cgi?id=134557
Reviewed by Tim Horton.
* Shared/SessionState.cpp:
(WebKit::BackForwardListItemState::encode):
(WebKit::BackForwardListItemState::decode):
* Shared/SessionState.h:
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
(WebKit::WebBackForwardListItem::encode):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::itemID):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::restoreFromState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
2014-07-02 Manuel Rego Casasnovas <rego@igalia.com>
Unreviewed. EFL and GTK build fix after r170716.
* UIProcess/LegacySessionStateCodingNone.cpp:
(WebKit::decodeLegacySessionState): Update method signature.
2014-07-02 Anders Carlsson <andersca@apple.com>
Begin ripping out the old session state code
https://bugs.webkit.org/show_bug.cgi?id=134556
Reviewed by Andreas Kling.
* UIProcess/WebBackForwardList.h:
* UIProcess/WebPageProxy.h:
* UIProcess/cf/WebBackForwardListCF.cpp: Removed.
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::sessionStateData): Deleted.
(WebKit::WebPageProxy::restoreFromSessionStateData): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2014-07-02 Anders Carlsson <andersca@apple.com>
Use legacy state coding directly in WKWebView
https://bugs.webkit.org/show_bug.cgi?id=134553
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKPage.cpp:
(WKPageRestoreFromSessionState):
* UIProcess/API/C/WKSessionStateRef.cpp:
(WKSessionStateCreateFromData):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _sessionStateData]):
(-[WKWebView _sessionState]):
(-[WKWebView _restoreFromSessionStateData:]):
(-[WKWebView _restoreFromSessionState:]):
(releaseNSData): Deleted.
* UIProcess/LegacySessionStateCoding.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromSessionState):
(WebKit::WebPageProxy::restoreFromState): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeLegacySessionState):
2014-07-02 Anders Carlsson <andersca@apple.com>
Add -[WKWebView _sessionStateData] and -[WKWebView _restoreFromSessionStateData:]
https://bugs.webkit.org/show_bug.cgi?id=134549
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _sessionState]):
(-[WKWebView _sessionStateData]):
(-[WKWebView _restoreFromSessionState:]):
(-[WKWebView _restoreFromSessionStateData:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-07-02 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebKitVersion.h should be shared between UI and Web Process APIs
https://bugs.webkit.org/show_bug.cgi?id=134538
Reviewed by Martin Robinson.
To be able to check current version from web extensions too.
* UIProcess/API/gtk/WebKitVersion.h.in: Allow to include WebKitVersion.h also from webkit-web-extension.h.
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: Include WebKitVersion.h.
2014-07-02 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebKitWebView::create should receive information about the navigation action
https://bugs.webkit.org/show_bug.cgi?id=133680
Reviewed by Martin Robinson.
Add WebKitNavigationAction boxed type representing a navigation
action to be passed as parameter of WebKitWebView::create
signal. In the future it could be also for the
WebKitNavigationPolicyDecision class. The class contains
information about a navigation action like the navigation type,
the request, the mouse button and key modifiers and whether it was
started by a user gesture. This information is needed to be able
to implement a proper popup blocker. Since all that information is
not provided by the C API, we have switched the UI client to use a
custom client derived from API::UIClient. This also avoids a lot
of toAPI -> toImpl unneeded conversions.
* PlatformGTK.cmake: Add new files to compilation.
* UIProcess/API/gtk/WebKitHitTestResult.cpp:
(webkitHitTestResultCreate): Use a WebHitTestResult::Data const
reference instead of a pointer to a WebHitTestResult.
(webkitHitTestResultCompare): Ditto.
* UIProcess/API/gtk/WebKitHitTestResultPrivate.h:
* UIProcess/API/gtk/WebKitNavigationAction.cpp: Added.
(webkitNavigationActionCreate): Create a WebKitNavigationAction
for the given ResourceRequest and NavigationActionData.
(webkit_navigation_action_copy):
(webkit_navigation_action_free):
(webkit_navigation_action_get_navigation_type):
(webkit_navigation_action_get_mouse_button):
(webkit_navigation_action_get_modifiers):
(webkit_navigation_action_get_request):
(webkit_navigation_action_is_user_gesture):
* UIProcess/API/gtk/WebKitNavigationAction.h: Added.
* UIProcess/API/gtk/WebKitNavigationActionPrivate.h: Added.
* UIProcess/API/gtk/WebKitNavigationPolicyDecision.h:
* UIProcess/API/gtk/WebKitPrivate.cpp:
(toGdkModifiers):
(toWebKitNavigationType):
(toWebKitMouseButton):
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/API/gtk/WebKitUIClient.cpp:
(UIClient::UIClient): Implement the UIClient using a custom class.
(attachUIClientToView): Set the UIClient directly to the WebPageProxy.
(createNewPage): Deleted.
(showPage): Deleted.
(closePage): Deleted.
(runJavaScriptAlert): Deleted.
(runJavaScriptConfirm): Deleted.
(runJavaScriptPrompt): Deleted.
(toolbarsAreVisible): Deleted.
(setToolbarsAreVisible): Deleted.
(menuBarIsVisible): Deleted.
(setMenuBarIsVisible): Deleted.
(statusBarIsVisible): Deleted.
(setStatusBarIsVisible): Deleted.
(isResizable): Deleted.
(setIsResizable): Deleted.
(getWindowFrame): Deleted.
(setWindowFrame): Deleted.
(mouseDidMoveOverElement): Deleted.
(printFrame): Deleted.
(runOpenPanel): Deleted.
(decidePolicyForGeolocationPermissionRequest): Deleted.
(runModal): Deleted.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewCreate): Add WebKitNavigationAction parameter.
(webkit_web_view_class_init): Add WebKitNavigationAction paramter
to CREATE signal.
(webkitWebViewCreateNewPage): Add WebKitNavigationAction parameter
and pass it to the signal callbacks.
(webkitWebViewMouseTargetChanged): Use a WebHitTestResult::Data
const reference.
(webkitWebViewPopulateContextMenu): Ditto.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/WebKitWebViewPrivate.h:
* UIProcess/API/gtk/WebKitWindowProperties.cpp:
(webkitWindowPropertiesUpdateFromWebWindowFeatures): Use a
WebCore::WindowFeatures const reference.
* UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h:
* UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section.
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols.
* UIProcess/API/gtk/webkit2.h: Include WebKitNavigationAction.h.
2014-07-01 KwangHyuk Kim <hyuki.kim@samsung.com>
[EFL] Fix occurrence of two cursors on WK2 EFL.
https://bugs.webkit.org/show_bug.cgi?id=134436
Reviewed by Anders Carlsson.
ecore_x_window_cursor is released when ecore_evas_object_cursor should be shown in order to avoid occurrence of two cursors.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::updateCursor):
2014-07-01 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Fix build break on EFL and GTK ports since r170683
https://bugs.webkit.org/show_bug.cgi?id=134536
Unreviewed, build fix.
* CMakeLists.txt:
2014-07-01 Dean Jackson <dino@apple.com>
Make LogsPageMessagesToSystemConsoleEnabled a global debug preference
https://bugs.webkit.org/show_bug.cgi?id=134534
Reviewed by Joseph Pecoraro.
* Shared/WebPreferencesDefinitions.h:
2014-07-01 Tim Horton <timothy_horton@apple.com>
Handle invalid data more gracefully.
Reviewed by Anders Carlsson.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeFormData):
(WebKit::decodeBackForwardTreeNode):
2014-07-01 Mark Rowe <mrowe@apple.com>
Add a missing return statement in WKPageCopySessionState.
Reviewed by Anders Carlsson.
* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
2014-07-01 Anders Carlsson <andersca@apple.com>
Don't encode/decode the snapshot UUID
https://bugs.webkit.org/show_bug.cgi?id=134532
Reviewed by Sam Weinig.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistory):
(WebKit::decodeSessionHistoryEntry):
2014-07-01 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r170608.
https://bugs.webkit.org/show_bug.cgi?id=134533
Safari keeps crashing on device due to sandbox violation.
(Requested by enrica on #webkit).
Reverted changeset:
"Restrict network process sandbox"
https://bugs.webkit.org/show_bug.cgi?id=134360
http://trac.webkit.org/changeset/170608
2014-07-01 Pratik Solanki <psolanki@apple.com>
Encode/decode CFURLRequestRefs when USE(CFNETWORK) is enabled
https://bugs.webkit.org/show_bug.cgi?id=134454
<rdar://problem/17510980>
Reviewed by Andreas Kling.
Use new helper methods to serialize/deserialize CFURLRequestRef directly so we can avoid
creating NSURLRequest.
* Shared/mac/WebCoreArgumentCodersMac.mm:
(IPC::ArgumentCoder<ResourceRequest>::encodePlatformData):
(IPC::ArgumentCoder<ResourceRequest>::decodePlatformData):
2014-07-01 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] Fix a race between the short tap and long tap highlight
https://bugs.webkit.org/show_bug.cgi?id=134530
Reviewed by Enrica Casucci.
There was a potential race of event that can theoretically cause WKContentViewInteraction
to call [WKContentView _showTapHighlight] after all interactions have been cancelled.
The race would be like this:
1) On a short tap, _singleTapRecognized: is called, a tap highlight ID is defined and
_potentialTapInProgress is set to YES.
2) For some reason, the gesture is cancelled. The method _singleTapDidReset is called,
setting _potentialTapInProgress but leaving the tap highlight ID as valid.
3) The UIProcess receives the tap highlight information from the WebProcess, _didGetTapHighlightForRequest:
has a valid ID, _potentialTapInProgress is false -> the highlight is shown right away as if a long tap
was in progress.
The missing piece that causes this is _singleTapDidReset: must also invalidate the tap highlight ID. This is done
in the new static function cancelPotentialTapIfNecessary().
Just invalidating the ID would create another race:
1) Short tap gesture recognizer starts.
2) The long press recognizer starts before (1) is commited.
3) The long press recognizers sets up its own tap highlight ID.
4) The short tap gesture recognizer resets, erasing the tap highlight ID defined in (3).
To avoid this, the long press gesture recognizers immediately cancels any potential tap in progress.
If _singleTapDidReset: is called before (3), this does nothing. If the reset is called after (3),
_singleTapDidReset does nothing.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _highlightLongPressRecognized:]):
(cancelPotentialTapIfNecessary):
(-[WKContentView _singleTapDidReset:]):
2014-07-01 Anders Carlsson <andersca@apple.com>
Add ABI hacks to allow WKPageRef to use WKSessionStateRef
https://bugs.webkit.org/show_bug.cgi?id=134529
Reviewed by Sam Weinig.
* UIProcess/API/APISessionState.h:
Add a sessionState() getter.
* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
Add a hack where we return a WKSessionStateRef if the least significant bit of the context pointer
is 1, and a WKDataRef otherwise.
(WKPageRestoreFromSessionState):
Handle both WKDataRef and WKSessionStateref.
* UIProcess/API/C/WKPage.h:
Use WKTypeRefs for state saving and restoration.
* UIProcess/API/C/WKSessionStateRef.cpp:
(WKSessionStateCopyData):
Add helper function.
2014-07-01 Anders Carlsson <andersca@apple.com>
WKPageRestoreFromSessionState should use the new session state restore code path
https://bugs.webkit.org/show_bug.cgi?id=134526
Reviewed by Tim Horton.
* UIProcess/API/C/WKPage.cpp:
(WKPageRestoreFromSessionState):
Use the new code path.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromState):
Only restore the back-forward state if we have a back-forward list.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistory):
Save the original URL string as well.
(WebKit::decodeV1SessionHistory):
If we don't have a current index, set it to Nullopt instead of 0.
2014-07-01 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed. EFL and GTK build fix since r170654.
* UIProcess/LegacySessionStateCodingNone.cpp: Add a dummy encodeLegacySessionState(const SessionState&).
(WebKit::encodeLegacySessionState):
2014-07-01 Dan Bernstein <mitz@apple.com>
Crash in WebDocumentLoader::setNavigationID
https://bugs.webkit.org/show_bug.cgi?id=134520
Reviewed by Anders Carlsson.
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::didReceivePolicyDecision): Null-check the policy document loader.
2014-07-01 Dan Bernstein <mitz@apple.com>
Build fix.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didDestroyNavigation):
2014-07-01 Anders Carlsson <andersca@apple.com>
Use the new legacy session state coding in WKPageCopySessionState
https://bugs.webkit.org/show_bug.cgi?id=134516
Reviewed by Tim Horton.
* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
Call encodeLegacySessionState.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistoryEntryData):
Use leakPtr() so we won't attempt to double-free the buffer.
(WebKit::createDictionary):
Fix a typo.
(WebKit::encodeLegacySessionState):
Don't encode the provisional URL if it's empty.
2014-07-01 Chris Fleizach <cfleizach@apple.com>
AX: [iOS WebKit2] Support for Speak selection
https://bugs.webkit.org/show_bug.cgi?id=134512
Reviewed by Darin Adler.
Implement a method that Speak Selection can use to retrieve the selected content.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView accessibilityRetrieveSpeakSelectionContent]):
2014-07-01 Anders Carlsson <andersca@apple.com>
Update the highest back-forward list item ID in the other WebBackForwardListItem constructor
https://bugs.webkit.org/show_bug.cgi?id=134515
Reviewed by Tim Horton.
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
2014-07-01 Brady Eidson <beidson@apple.com>
Fix ServicesOverlayController teardown
<rdar://problem/17523998> and https://bugs.webkit.org/show_bug.cgi?id=134510
Reviewed by Mark Rowe.
* WebProcess/WebPage/mac/ServicesOverlayController.mm:
(WebKit::ServicesOverlayController::~ServicesOverlayController): Flipped logic on null-checking the overlay.
2014-07-01 Sam Weinig <sam@webkit.org>
[Cocoa][Mac] WKWebView should automatically set topContentInset when beneath a toolbar
<rdar://problem/17523159>
https://bugs.webkit.org/show_bug.cgi?id=134496
Reviewed by Beth Dakin.
- Adds _automaticallyAdjustsContentInsets SPI to both WKView and WKWebView.
- Defaults _automaticallyAdjustsContentInsets to NO for WKView to keep legacy clients working.
- Defaults _automaticallyAdjustsContentInsets to YES for WKWebView.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Add _automaticallyAdjustsContentInsets SPI.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Default _automaticallyAdjustsContentInsets to YES for WKWebView.
(-[WKWebView _setTopContentInset:]):
(-[WKWebView _topContentInset]):
Change to forward to the WKView, since we now do coalescing and caching there.
(-[WKWebView _setAutomaticallyAdjustsContentInsets:]):
(-[WKWebView _automaticallyAdjustsContentInsets]):
Forward to the WKView.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Add _automaticallyAdjustsContentInsets SPI.
* UIProcess/API/mac/WKView.mm:
(-[WKView renewGState]):
Ensure the contentInset is updated when the view changes, as its relative location to the toolbar may have changed.
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
(-[WKView observeValueForKeyPath:ofObject:change:context:]):
Add observers for the contentLayoutRect and titlebarAppearsTransparent properties on the window. If either of them
change, we need to recalculate the content inset.
(-[WKView _updateContentInsetsIfAutomatic]):
If _automaticallyAdjustsContentInsets is YES, follow the same rules as AppKit in setting the top content inset. Like
AppKit this is only done when:
- The window's style mask has the NSFullSizeContentViewWindowMask bit.
- The window does not have titlebarAppearsTransparent set.
- And we are not in an enclosing NSScrollView.
(-[WKView _setTopContentInset:]):
(-[WKView _topContentInset]):
Coalesce setting the topContentInset to avoid a visual lag when resizing the window that was caused by us sending
multiple topContentInsets to the WebContentProcess per runloop cycle. The reason for the lag was that at the time
we observe the contentLayoutRect changing, our view may not yet be in its final position yet, so the inset will be
temporarily wrong. When the view is finally positioned correctly, we will get a renewGState, at which point we will
again calculate the inset, which now will be correct. Since these both happen in the same runloop iteration, we can
just defer sending the inset to the WebContentProcess.
(-[WKView _setAutomaticallyAdjustsContentInsets:]):
(-[WKView _automaticallyAdjustsContentInsets]):
Add the new SPI.
2014-07-01 Anders Carlsson <andersca@apple.com>
Add a function for restoring page state given a SessionState object
https://bugs.webkit.org/show_bug.cgi?id=134509
Reviewed by Tim Horton.
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::itemState):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::saveState):
* UIProcess/WebBackForwardList.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::saveState):
* UIProcess/WebPageProxy.h:
2014-07-01 Dan Bernstein <mitz@apple.com>
[Cocoa] Navigation parameter in navigation delegate messages is nil for navigations started by the Web Content process
https://bugs.webkit.org/show_bug.cgi?id=134482
Reviewed by Tim Horton.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didDestroyNavigation): New client function, called when a navigation ID
is not going to be used anymore.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _restoreFromSessionState:]): If restoring triggered a navigation, create a
WKNavigation for its ID.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createLoadRequestNavigation): Removed FIXME, because we now remove
navigations from the map in LoaderClient::didDestroyNavigation.
(WebKit::NavigationState::createBackForwardNavigation): Ditto.
(WebKit::NavigationState::createReloadNavigation): Ditto.
(WebKit::NavigationState::createLoadDataNavigation): Ditto.
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction): If we are only
getting a navigation ID now, create a WKNavigation for it. Also changed to create the
NSURLRequest lazily.
(WebKit::NavigationState::LoaderClient::didStartProvisionalLoadForFrame): Assert that
navigationID is not zero and that it maps to an existing WKNavigation.
(WebKit::NavigationState::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
Ditto.
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didCommitLoadForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame): Ditto.
(WebKit::NavigationState::LoaderClient::didDestroyNavigation): Override the new client
function to remove the navigation from the map.
(WebKit::NavigationState::LoaderClient::processDidCrash): Clear the navigations map.
* UIProcess/WebFrameListenerProxy.cpp:
(WebKit::WebFrameListenerProxy::WebFrameListenerProxy): Initialize new m_navigationID
member variable.
(WebKit::WebFrameListenerProxy::receivedPolicyDecision): Pass the navigation ID to
WebFrame::receivedPolicyDecision.
* UIProcess/WebFrameListenerProxy.h:
(WebKit::WebFrameListenerProxy::navigationID): Added this accessor.
(WebKit::WebFrameListenerProxy::setNavigationID): Ditto.
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::receivedPolicyDecision): Added navigationID parameter, which is
passed along to the WebPageProxy.
* UIProcess/WebFrameProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision): Added navigationID parameter, which is
passed along in the message to the Web Content process.
(WebKit::WebPageProxy::restoreFromSessionStateData): Changed to return a navigation ID of 0.
(WebKit::WebPageProxy::restoreFromState): Changed to return a navigation ID if one was
started.
(WebKit::WebPageProxy::didDestroyNavigation): Added. Calls the new client function.
(WebKit::WebPageProxy::decidePolicyForNavigationAction): Added navigationID and
newNavigationID parameters. If a main-frame navigation doesn’t already have an ID, assign it
a new ID and return it in the newNavigationID parmeter as well as setting it on the listener
for the asynchronous case.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Added navigationID and newNavigationID parameters.
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData): Changed to return a navigation ID if
one was started.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): Updated for additional
parameter.
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Send the navigation
ID to the UI process, get the new navigation ID from the reply, and set it on the document
loader.
* WebProcess/WebPage/WebDocumentLoader.cpp:
(WebKit::WebDocumentLoader::detachFromFrame): Override to let the UI process know that the
navigation ID will not be used anymore.
* WebProcess/WebPage/WebDocumentLoader.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::didReceivePolicyDecision): Added navigationID parameter, set it on the
document loader.
(WebKit::WebFrame::documentLoaderDetached): Pass the message along to the UI process.
* WebProcess/WebPage/WebFrame.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didReceivePolicyDecision): Pass new navigationID parameter along.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in: Added navigationID parameter.
2014-07-01 Anders Carlsson <andersca@apple.com>
Fix build.
* WebKit2.xcodeproj/project.pbxproj:
2014-07-01 Anders Carlsson <andersca@apple.com>
Temporarily encode and decode the snapshot UUID
https://bugs.webkit.org/show_bug.cgi?id=134507
Reviewed by Tim Horton.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistory):
(WebKit::decodeSessionHistoryEntry):
(WebKit::decodeSessionHistoryEntries):
2014-07-01 Anders Carlsson <andersca@apple.com>
Implement encodeSessionHistoryEntryData
https://bugs.webkit.org/show_bug.cgi?id=134505
Reviewed by Tim Horton.
* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
Add back a missing null check for the filter pointer.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistoryEntryData):
2014-07-01 Simon Fraser <simon.fraser@apple.com>
[UI-side compositing] Bad spinner on news.google.com: animations need to be ordered
https://bugs.webkit.org/show_bug.cgi?id=134504
<rdar://problem/17507892>
Reviewed by Tim Horton.
The layer's addedAnimations property needs to maintain order, since the order
in which transforms are applied is important.
* Shared/mac/RemoteLayerTreeTransaction.h: Use a Vector<pair<>> for addedAnimations.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::dumpChangedLayers):
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::updateLayerAnimations):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::addAnimationForKey): If this is a new entry, we
can just append to addedAnimations, otherwise we have to find the existing one
and update its properties.
(WebKit::PlatformCALayerRemote::removeAnimationForKey): Do linear search to
find the animation to remove (this list will normally be short).
2014-07-01 Anders Carlsson <andersca@apple.com>
Add a encodeLegacySessionState function
https://bugs.webkit.org/show_bug.cgi?id=134502
Reviewed by Tim Horton.
* UIProcess/LegacySessionStateCoding.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::encodeSessionHistoryEntryData):
(WebKit::encodeLegacySessionHistoryEntryData):
(WebKit::createDictionary):
(WebKit::encodeSessionHistory):
(WebKit::encodeLegacySessionState):
2014-07-01 Alexey Proskuryakov <ap@apple.com>
[Cocoa] WebProcess doesn't follow localization of UI process when run as a service
https://bugs.webkit.org/show_bug.cgi?id=133126
<rdar://problem/13396515>
Patch by Alexey Proskuryakov.
Reviewed by Tim Horton.
* Configurations/WebContentService.Development.xcconfig:
* Configurations/WebContentService.xcconfig:
Figure out which of the two keys to use. CFBundleAllowMixedLocalizations was
a workaround before we got CFBundleFollowParentLocalization, and these cannot be
used together.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService): Set up
XPC bootstrap for CFBundle to use.
* WebKit2.xcodeproj/project.pbxproj: Added a script that applies the key to Info.plist.
* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
Removed CFBundleAllowMixedLocalizations, we now add it programmatically.
2014-07-01 Alex Christensen <achristensen@webkit.org>
[iOS] Unreviewed build fix after r170640.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
(WebKit::WebEditorClient::selectionRectsDidChange):
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/WebPage.h:
Add ifdefs to make everything compile and link.
2014-07-01 Anders Carlsson <andersca@apple.com>
Add WKSessionStateGetTypeID
https://bugs.webkit.org/show_bug.cgi?id=134499
Reviewed by Tim Horton.
* UIProcess/API/C/WKSessionStateRef.cpp:
(WKSessionStateGetTypeID):
* UIProcess/API/C/WKSessionStateRef.h:
2014-07-01 Daniel Bates <dabates@apple.com>
Remove unnecessary calls to std::move()
https://bugs.webkit.org/show_bug.cgi?id=134493
Reviewed by Anders Carlsson.
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::Handle::tryWrapInCFData):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::certificateInfo): Return a WebCore::CertificateInfo instead
of const WebCore::CertificateInfo& to avoid returning a dangling reference to
a local variable. Also, remove the unnecessary calls to std::move() as the compiler
will invoke the move constructor for WebCore::CertificateInfo on return from the
function.
* WebProcess/WebPage/WebFrame.h:
2014-07-01 Anders Carlsson <andersca@apple.com>
Add a BackForwardListItemState struct and put the snapshot UUID there
https://bugs.webkit.org/show_bug.cgi?id=134497
Reviewed by Sam Weinig.
* Shared/SessionState.cpp:
(WebKit::PageState::encode):
(WebKit::PageState::decode):
(WebKit::BackForwardListItemState::encode):
(WebKit::BackForwardListItemState::decode):
* Shared/SessionState.h:
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
(WebKit::WebBackForwardListItem::backForwardData):
(WebKit::WebBackForwardListItem::setBackForwardData):
(WebKit::WebBackForwardListItem::encode):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setPageState):
(WebKit::WebBackForwardListItem::setOriginalURL):
(WebKit::WebBackForwardListItem::originalURL):
(WebKit::WebBackForwardListItem::setURL):
(WebKit::WebBackForwardListItem::url):
(WebKit::WebBackForwardListItem::setTitle):
(WebKit::WebBackForwardListItem::title):
(WebKit::WebBackForwardListItem::setSnapshotUUID):
(WebKit::WebBackForwardListItem::snapshotUUID):
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::restoreFromState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeSessionHistoryEntries):
2014-07-01 Yongjun Zhang <yongjun_zhang@apple.com>
Add encodeInteger and decodeInteger for remote object encoder and decoder.
https://bugs.webkit.org/show_bug.cgi?id=134453
In 64bit system, encodeInteger/decodeInteger is by default mapped into encodeInt64/decodeInt64. For
32bit system, they are mapped to encodeInt32/decodeInt32. However, since we don't have encodeInt32/decodeInt32
implementation in WKRemoteObjectCoder, we could hit crash in 32bit systems.
Reviewed by Sam Weinig.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectEncoder encodeInteger:forKey:]): Instead of creating a new number type UInt32, use encodeInt64 for
encoding NSInteger.
(-[WKRemoteObjectDecoder decodeIntegerForKey:]):
2014-06-30 Anders Carlsson <andersca@apple.com>
Use an std::function for filtering session state data
https://bugs.webkit.org/show_bug.cgi?id=134481
Reviewed by Sam Weinig.
* UIProcess/API/C/WKPage.cpp:
(WKPageCopySessionState):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _sessionState]):
* UIProcess/WebBackForwardList.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::sessionStateData):
* UIProcess/WebPageProxy.h:
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::sessionStateData):
2014-07-01 Rohit Kumar <kumar.rohit@samsung.com>
Clean up the WebKit build from unused parameter warning in Webkit2/UIProcess module
https://bugs.webkit.org/show_bug.cgi?id=134294
Reviewed by Darin Adler.
* UIProcess/API/APIUIClient.h:
(API::UIClient::reachedApplicationCacheOriginQuota):
2014-07-01 Brady Eidson <beidson@apple.com>
Followup for: Combine the Telephone and Selection overlay controllers, updating UI behavior.
https://bugs.webkit.org/show_bug.cgi?id=134461
Rubberstamped by Tim Horton.
* WebProcess/WebPage/mac/ServicesOverlayController.mm: Include the correct constant.
2014-07-01 Brady Eidson <beidson@apple.com>
Build fix.
Forgot to commit locally before pushing.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::servicesOverlayController): s/this/*this/
2014-07-01 Brady Eidson <beidson@apple.com>
Combine the Telephone and Selection overlay controllers, updating UI behavior.
https://bugs.webkit.org/show_bug.cgi?id=134461
Reviewed by Tim Horton.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged):
(WebKit::WebEditorClient::selectionRectsDidChange):
Remove the separate Selection overlay controller:
* WebProcess/WebPage/SelectionOverlayController.cpp: Removed.
* WebProcess/WebPage/ServicesOverlayController.h: Renamed from Source/WebKit2/WebProcess/WebPage/SelectionOverlayController.h.
(WebKit::ServicesOverlayController::create):
* WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm: Removed.
Remove the separate TelephoneNumber overlay controller:
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp: Removed.
* WebProcess/WebPage/TelephoneNumberOverlayController.h: Removed.
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm: Removed.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::servicesOverlayController):
(WebKit::WebPage::telephoneNumberOverlayController): Deleted.
(WebKit::WebPage::selectionOverlayController): Deleted.
(WebKit::WebPage::didChangeScrollOffsetForFrame): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::serviceControlsEnabled): Deleted.
ServicesOverlayController is a combination of the old TelephoneNumber and Selection overlay controllers.
A lot of code duplication is resolved, and things are generally easier to follow.
It enforces displaying a telephone number highlight if precisely one telephone number is selected, or
the selection highlight if the selection contains more than a single phone number
* WebProcess/WebPage/mac/ServicesOverlayController.mm: Added.
(WebKit::textQuadsToBoundingRectForRange):
(WebKit::ServicesOverlayController::ServicesOverlayController):
(WebKit::ServicesOverlayController::destroyOverlay):
(WebKit::ServicesOverlayController::pageOverlayDestroyed):
(WebKit::ServicesOverlayController::willMoveToWebPage):
(WebKit::ServicesOverlayController::didMoveToWebPage):
(WebKit::ServicesOverlayController::createOverlayIfNeeded):
(WebKit::ServicesOverlayController::selectionRectsDidChange):
(WebKit::ServicesOverlayController::selectedTelephoneNumberRangesChanged):
(WebKit::ServicesOverlayController::clearHighlightState):
(WebKit::ServicesOverlayController::drawRect):
(WebKit::ServicesOverlayController::drawSelectionHighlight):
(WebKit::ServicesOverlayController::drawTelephoneNumberHighlight):
(WebKit::ServicesOverlayController::drawCurrentHighlight):
(WebKit::ServicesOverlayController::mouseEvent):
(WebKit::ServicesOverlayController::handleClick):
2014-07-01 Zan Dobersek <zdobersek@igalia.com>
[WK2] IPC messages' arguments() method returns const std::tuple<> copies
https://bugs.webkit.org/show_bug.cgi?id=131975
Reviewed by Darin Adler.
The arguments() method of the different IPC message objects should return a const reference
to the std::tuple<> containing the arguments, instead of a const value. This avoids copying
the std::tuple<> every time the arguments are encoded, and works best with the
ArgumentEncoder::encode<std::tuple<...>>(const std::tuple<...>&) template instantiation.
The unit test baselines are updated accordingly.
* Scripts/webkit2/LegacyMessages-expected.h:
(Messages::WebPage::LoadURL::arguments):
(Messages::WebPage::LoadSomething::arguments):
(Messages::WebPage::TouchEvent::arguments):
(Messages::WebPage::AddEvent::arguments):
(Messages::WebPage::LoadSomethingElse::arguments):
(Messages::WebPage::DidReceivePolicyDecision::arguments):
(Messages::WebPage::Close::arguments):
(Messages::WebPage::PreferencesDidChange::arguments):
(Messages::WebPage::SendDoubleAndFloat::arguments):
(Messages::WebPage::SendInts::arguments):
(Messages::WebPage::CreatePlugin::arguments):
(Messages::WebPage::RunJavaScriptAlert::arguments):
(Messages::WebPage::GetPlugins::arguments):
(Messages::WebPage::GetPluginProcessConnection::arguments):
(Messages::WebPage::TestMultipleAttributes::arguments):
(Messages::WebPage::TestParameterAttributes::arguments):
(Messages::WebPage::TemplateTest::arguments):
(Messages::WebPage::SetVideoLayerID::arguments):
(Messages::WebPage::DidCreateWebProcessConnection::arguments):
(Messages::WebPage::InterpretKeyEvent::arguments):
(Messages::WebPage::DeprecatedOperation::arguments):
(Messages::WebPage::ExperimentalOperation::arguments):
* Scripts/webkit2/Messages-expected.h:
(Messages::WebPage::LoadURL::arguments):
(Messages::WebPage::LoadSomething::arguments):
(Messages::WebPage::TouchEvent::arguments):
(Messages::WebPage::AddEvent::arguments):
(Messages::WebPage::LoadSomethingElse::arguments):
(Messages::WebPage::DidReceivePolicyDecision::arguments):
(Messages::WebPage::Close::arguments):
(Messages::WebPage::PreferencesDidChange::arguments):
(Messages::WebPage::SendDoubleAndFloat::arguments):
(Messages::WebPage::SendInts::arguments):
(Messages::WebPage::CreatePlugin::arguments):
(Messages::WebPage::RunJavaScriptAlert::arguments):
(Messages::WebPage::GetPlugins::arguments):
(Messages::WebPage::GetPluginProcessConnection::arguments):
(Messages::WebPage::TestMultipleAttributes::arguments):
(Messages::WebPage::TestParameterAttributes::arguments):
(Messages::WebPage::TemplateTest::arguments):
(Messages::WebPage::SetVideoLayerID::arguments):
(Messages::WebPage::DidCreateWebProcessConnection::arguments):
(Messages::WebPage::InterpretKeyEvent::arguments):
(Messages::WebPage::DeprecatedOperation::arguments):
(Messages::WebPage::ExperimentalOperation::arguments):
* Scripts/webkit2/MessagesSuperclass-expected.h:
(Messages::WebPage::LoadURL::arguments):
* Scripts/webkit2/messages.py:
(message_to_struct_declaration):
2014-07-01 Evan Nemerson <evan@nemerson.com>
[GTK] Annotations for WebResource.get_data produce wrong signature in Vala binding
https://bugs.webkit.org/show_bug.cgi?id=134476
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitWebResource.cpp: Add array length and
element-type annotations to return value of webkit_web_resource_get_data_finish().
2014-07-01 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[WK2] Can not convert ‘sessionState.WebKit::SessionState::provisionalURL’ from ‘WebCore::URL’ to ‘bool’
https://bugs.webkit.org/show_bug.cgi?id=134487
Rubber-stamped by Carlos Garcia Campos.
* UIProcess/WebPageProxy.cpp: Use isNull().
(WebKit::WebPageProxy::restoreFromState):
2014-07-01 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Fix build break on EFL and GTK ports since r170611 and r170614
https://bugs.webkit.org/show_bug.cgi?id=134479
Reviewed by Carlos Garcia Campos.
Add LegacySessionStateCodingNone.cpp in order to fix build break on EFL and GTK ports. Additionally
SessionStateConversion.cpp is added to CMakeLists.txt as well.
* CMakeLists.txt:
* UIProcess/LegacySessionStateCoding.h: Copied from Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.h.
* UIProcess/LegacySessionStateCodingNone.cpp: Renamed from Source/WebKit2/UIProcess/mac/LegacySessionStateCoding.h.
(WebKit::encodeLegacySessionHistoryEntryData):
(WebKit::decodeLegacySessionState):
(WebKit::decodeLegacySessionHistoryEntryData):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadFile):
(WebKit::WebPageProxy::restoreFromState):
* WebKit2.xcodeproj/project.pbxproj:
2014-06-30 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] The long press gesture recognizers should not block the pinch gesture
https://bugs.webkit.org/show_bug.cgi?id=134477
<rdar://problem/17514936>
Reviewed by Tim Horton.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
2014-06-30 Anders Carlsson <andersca@apple.com>
Add WebPageProxy::restoreFromState
https://bugs.webkit.org/show_bug.cgi?id=134480
Reviewed by Tim Horton.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::restoreFromState):
* UIProcess/WebPageProxy.h:
2014-06-30 Anders Carlsson <andersca@apple.com>
Add a function to restore a WebBackForwardList object from a BackForwardListState object
https://bugs.webkit.org/show_bug.cgi?id=134478
Reviewed by Tim Horton.
* UIProcess/WebBackForwardList.cpp:
(WebKit::generateWebBackForwardItemID):
(WebKit::WebBackForwardList::restoreFromState):
* UIProcess/WebBackForwardList.h:
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::generateWebBackForwardItemID): Deleted.
2014-06-30 Anders Carlsson <andersca@apple.com>
Change the AddBackForwardItem message to take a page state object
https://bugs.webkit.org/show_bug.cgi?id=134475
Reviewed by Andreas Kling.
* Scripts/webkit2/messages.py:
(struct_or_class):
(headers_for_type):
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::create):
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setPageState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::addBackForwardItem):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::updateBackForwardItem):
2014-06-30 Tim Horton <timothy_horton@apple.com>
[WK2] Add a flatter find-in-page current match indicator style
https://bugs.webkit.org/show_bug.cgi?id=134434
<rdar://problem/16225673>
Reviewed by Simon Fraser.
* UIProcess/FindIndicator.cpp:
(WebKit::findIndicatorsForTextRectsOverlap):
(WebKit::FindIndicator::frameRect):
(WebKit::flatHighlightColor):
(WebKit::flatRimShadowColor):
(WebKit::flatDropShadowColor):
(WebKit::FindIndicator::draw):
Add a flatter find indicator, with a bigger shadow.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
(WebKit::FindController::getFindIndicatorBitmapAndRect):
(WebKit::FindController::hideFindIndicator):
(WebKit::FindController::drawRect):
Don't paint a shadow behind the secondary matches if we're using the new style.
2014-06-30 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] Improve double-tap-to-scroll on image documents
https://bugs.webkit.org/show_bug.cgi?id=134474
<rdar://problem/17496778>
Reviewed by Enrica Casucci.
On image document, we were always rendering the center of the image as the origin, which broke
double tap to scroll.
This patch improves on this in two ways:
1) If the hit testing already got the image, only change the type to replaced (to get the right
scaling behavior for images since the type is block on iOS's image document).
2) If the hit testing is outside the image, only center the axis that is not in the image.
This way, we "fix" the component that is not valid, and keep the vali component.
This works great for viewing comics on iPad.
* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
2014-06-30 Enrica Casucci <enrica@apple.com>
REGRESSION (WK2): Weird selection behavior on autos.yahoo.com, en.wikipedia.org.
https://bugs.webkit.org/show_bug.cgi?id=134466
<rdar://problem/16817263>
Reviewed by Benjamin Poulain.
Avoid selecting blocks across frame boundaries and skip non-selectable
blocks. If the only block we find is almost the same height as the
visible area, we should not select at all.
This patch also fixes the logic to compute the next block when
shrinking the selection. When calculating the new range after shrinking,
we should not include the block that corresponds to the current handle position.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::expandedRangeFromHandle):
(WebKit::WebPage::contractedRangeFromHandle):
(WebKit::WebPage::updateSelectionWithTouches):
2014-06-30 Anders Carlsson <andersca@apple.com>
WebBackForwardListItem should not store back-forward data
https://bugs.webkit.org/show_bug.cgi?id=134469
Reviewed by Darin Adler.
Change WebBackForwardListItem::backForwardData to encode the main frame state lazily,
and change WebBackForwardListItem::setBackForwardData to decode it into the main frame state.
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::backForwardData):
(WebKit::WebBackForwardListItem::setBackForwardData):
(WebKit::WebBackForwardListItem::encode):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::backForwardData): Deleted.
* UIProcess/cf/WebBackForwardListCF.cpp:
(WebKit::WebBackForwardList::createCFDictionaryRepresentation):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSession):
2014-06-30 Anders Carlsson <andersca@apple.com>
WebBackForwardListItems should hold on to PageState objects
https://bugs.webkit.org/show_bug.cgi?id=134467
Reviewed by Darin Adler.
* Shared/WebBackForwardListItem.cpp:
(WebKit::WebBackForwardListItem::WebBackForwardListItem):
(WebKit::WebBackForwardListItem::encode):
* Shared/WebBackForwardListItem.h:
(WebKit::WebBackForwardListItem::setOriginalURL):
(WebKit::WebBackForwardListItem::originalURL):
(WebKit::WebBackForwardListItem::setURL):
(WebKit::WebBackForwardListItem::url):
(WebKit::WebBackForwardListItem::setTitle):
(WebKit::WebBackForwardListItem::title):
2014-06-30 Benjamin Poulain <benjamin@webkit.org>
Add a missing semicolon in WKContentViewInteraction
* UIProcess/ios/WKContentViewInteraction.mm:
(nsSizeForTapHighlightBorderRadius):
I messed up this when fixing the patch on landing.
2014-06-30 Anders Carlsson <andersca@apple.com>
Adopt the legacy session decoding inside WebPage::restoreSession for now
https://bugs.webkit.org/show_bug.cgi?id=134465
Reviewed by Sam Weinig.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeLegacySessionHistoryEntryData):
* UIProcess/mac/LegacySessionStateCoding.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSession):
2014-06-30 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Don't crash on status bar tap with overflow scroll views
https://bugs.webkit.org/show_bug.cgi?id=134459
Reviewed by Tim Horton.
The tiled scrolling indicator parents UIViews under CALayers, but that causes
those views to miss -willMoveToWindow:nil notifications on teardown. This can leave
deleted UIScrollViews in UIKit's "scroll to top" list.
Fix by not making UIScrollViews in the debug layer tree host.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
2014-06-28 Oliver Hunt <oliver@apple.com>
Restrict network process sandbox
https://bugs.webkit.org/show_bug.cgi?id=134360
Reviewed by Sam Weinig.
Add more restrictions to the network process sandbox.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
Always use the cache directory provided in the initialization parameters,
and make sure we consume the cookie directory extension.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb:
Make the sandbox profile much more restrictive.
* Shared/Network/NetworkProcessCreationParameters.cpp:
(WebKit::NetworkProcessCreationParameters::encode):
(WebKit::NetworkProcessCreationParameters::decode):
* Shared/Network/NetworkProcessCreationParameters.h:
The network process now requires an extension to access
its cookie storage.
* Shared/mac/SandboxUtilities.cpp:
(WebKit::pathForProcessContainer):
* Shared/mac/SandboxUtilities.h:
We need to be able to get hold of our container so
that we can get the correct cookie storage directory.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureNetworkProcess):
We have to pass in the an extension for the cookie storage directory when
initalising the network process
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultCookieStorageDirectory):
Make sure we provide the correct location on IOS
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Consume the cookie storage extension
2014-06-30 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Turn off scrollsToTop on overflow UIScrollViews
https://bugs.webkit.org/show_bug.cgi?id=134456
Reviewed by Tim Horton.
Set scrollsToTop to NO on our UIScrollViews created for overflow scrolling, since
we don't have a good strategy for when to allow it, and doing so would also require
some smarts in the main UIScrollView.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
2014-06-30 Enrica Casucci <enrica@apple.com>
REGRESSION (Okemo): The contextual menu on tap and hold does not cancel the other gestures.
https://bugs.webkit.org/show_bug.cgi?id=134463
<rdar://problem/17388907>
Reviewed by Benjamin Poulain.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _longPressRecognized:]):
2014-06-30 Anders Carlsson <andersca@apple.com>
Implement the last pieces of encodeFrameStateNode
https://bugs.webkit.org/show_bug.cgi?id=134460
Reviewed by Andreas Kling.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataEncoder::operator<<):
(WebKit::isValidEnum):
(WebKit::encodeFormDataElement):
(WebKit::encodeFormData):
(WebKit::encodeFrameStateNode):
2014-06-30 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Move tap highlight to the inverseScaleRootView
https://bugs.webkit.org/show_bug.cgi?id=134424
<rdar://problem/17480880>
Reviewed by Tim Horton.
Enrica introduced the inverseScaleRootView that is a dynamic version of _highlightRootView.
This patch moves the tap highlight from its own inverse root to inverseScaleRootView. This provides better handling
of scale, better behavior on crash, and remove one extra view from the hierarchy.
The code is pretty much the same, just moved around. Some of the changes:
Now the code needs to handle repainting live when the view scale. To do that, _showTapHighlightXXX was split in two:
-_showTapHighlight to setup the view.
-_updateTapHighlight to update the view based on the current scale.
Since the view updates live on scaling, we need to recompute the coordinates for each update. To do that, the _potentialTapHighlightInformation
was generalized to handle all cases of highlight.
Since we can no longer test for the nullity of _potentialTapHighlightInformation,
a new attribute is introduced for that: _hasTapHighlightForPotentialTap.
The last bit of change concern reentering the tap highlight. This becomes quite simple:
1) _isTapHighlightIDValid is updated before the animation starts
so that it can be set again during an animation.
2) The animation checks the "finished" flags before removing the view from its superview
to avoid breaking the new animation.
* UIProcess/API/Cocoa/WKWebView.mm:
(withinEpsilon): Deleted.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
Make _updateUnscaledView conditional to scale changes, that thing isn't cheap!
* UIProcess/ios/WKContentViewInteraction.h:
(withinEpsilon):
Move withinEpsilon() from WKContentView to use it from both classes.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
(-[WKContentView _updateUnscaledView]):
(-[WKContentView _updateTapHighlight]):
(-[WKContentView _showTapHighlight]):
(-[WKContentView _didGetTapHighlightForRequest:color:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]):
(-[WKContentView _cancelInteraction]):
(-[WKContentView _finishInteraction]):
(-[WKContentView _singleTapDidReset:]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _showTapHighlightWithColor:quads:topLeftRadius:topRightRadius:bottomLeftRadius:bottomRightRadius:]): Deleted.
2014-06-30 Anders Carlsson <andersca@apple.com>
Add code for encoding legacy session history entries
https://bugs.webkit.org/show_bug.cgi?id=134452
Reviewed by Andreas Kling.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataEncoder::HistoryEntryDataEncoder):
(WebKit::HistoryEntryDataEncoder::operator<<):
(WebKit::HistoryEntryDataEncoder::finishEncoding):
(WebKit::HistoryEntryDataEncoder::encodeArithmeticType):
(WebKit::HistoryEntryDataEncoder::encodeFixedLengthData):
(WebKit::HistoryEntryDataEncoder::grow):
(WebKit::HistoryEntryDataEncoder::growCapacity):
(WebKit::encodeFrameStateNode):
(WebKit::encodeLegacySessionHistoryEntryData):
(WebKit::decodeSessionHistoryEntryData):
(WebKit::decodeLegacySessionHistoryEntryData):
* UIProcess/mac/LegacySessionStateCoding.h:
2014-06-29 Yoav Weiss <yoav@yoav.ws>
Add support for HTMLImageElement's sizes attribute
https://bugs.webkit.org/show_bug.cgi?id=133620
Reviewed by Dean Jackson.
Added an ENABLE_PICTURE_SIZES compile flag.
* Configurations/FeatureDefines.xcconfig:
2014-06-28 Tim Horton <timothy_horton@apple.com>
[iOS][WK2] PDFs never load inline again after the Web process crashes
https://bugs.webkit.org/show_bug.cgi?id=134432
<rdar://problem/17484205>
Reviewed by Dan Bernstein.
After a crash, the WebPage never gets mimeTypesWithCustomContentProviders filled back in.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Add mimeTypesWithCustomContentProviders to WebPageCreationParameters.
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.h:
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
(-[WKWebViewContentProviderRegistry addPage:]):
We don't need to send the MIME types across when a page is added, because it already got them in its creation parameters.
(-[WKWebViewContentProviderRegistry removePage:]):
(-[WKWebViewContentProviderRegistry _mimeTypesWithCustomContentProviders]):
Return a vector of all registered MIME types.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::mimeTypesWithCustomContentProviders):
* UIProcess/PageClient.h:
Add (iOS only for now) mimeTypesWithCustomContentProviders to PageClient.
2014-06-28 Dan Bernstein <mitz@apple.com>
REGRESSION: WebPageProxy::attributedSubstringForCharacterRangeAsync never calls its callback function
https://bugs.webkit.org/show_bug.cgi?id=134429
Reviewed by Tim Horton.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
2014-06-27 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] position:fixed inside accelerated overflow:scroll is jumpy
https://bugs.webkit.org/show_bug.cgi?id=134426
<rdar://problem/17474523>
Reviewed by Tim Horton.
After committing a new layer tree (with possibly stale position:fixed layer
positions), we need the scrolling tree to update those positions based on
the current scroll offset.
To achieve that, implement ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterAncestorChange()
and have it add to the cumulative delta the difference between the last committed scroll
position and the current scroll position.
Also make sure that ScrollingTreeOverflowScrollingNodeIOS doesn't call back to scrollViewDidScroll()
when we're updating its scroll position inside a scrolling tree commit.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterAncestorChange):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):
2014-06-27 Antti Koivisto <antti@apple.com>
Flush throttling with remote layers
https://bugs.webkit.org/show_bug.cgi?id=134398
Reviewed by Darin Adler.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::adjustLayerFlushThrottling):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::adjustLayerFlushThrottling):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
(WebKit::RemoteLayerTreeDrawingArea::scheduleCompositingLayerFlush):
Delay layer flushes during page loading.
If use interacts with the page the next flush in unthrottled even if loading is in progress.
(WebKit::RemoteLayerTreeDrawingArea::adjustLayerFlushThrottling):
Compute the new delay. The first visual flush uses a shorter delay.
Flush immediately when we are no longer throttling.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
2014-06-27 Joseph Pecoraro <pecoraro@apple.com>
[iOS][WK2] <select> tapping "next" does not save new picker value
https://bugs.webkit.org/show_bug.cgi?id=134409
Reviewed by Enrica Casucci.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView accessoryTab:]):
We know the assisted node will change, so call endEditing
before the assisted node changes in the WebProcess.
(-[WKContentView _stopAssistingNode]):
Ensure we call endEditing to trigger controlEndEditing.
* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKMultipleSelectPicker initWithView:]):
(-[WKMultipleSelectPicker pickerView:row:column:checked:]):
(-[WKSelectSinglePicker dealloc]):
Style fixes.
2014-06-27 Peyton Randolph <prandolph@apple.com>
Add feature flag for link long-press gesture.
https://bugs.webkit.org/show_bug.cgi?id=134262
Reviewed by Enrica Casucci.
* Configurations/FeatureDefines.xcconfig:
Add ENABLE_LINK_LONG_PRESS.
2014-06-26 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Fix touch-scrollable elements with overflow:scroll on just one axis, and RTL scrolling
https://bugs.webkit.org/show_bug.cgi?id=134377
<rdar://problem/16762224>
Reviewed by Tim Horton.
Make -webkit-overflow-scrolling:touch scrolling work correctly when one axis
has overflow:scroll and the other overflow:hidden. Also fix scrolling in RTL
contexts.
An RTL scroller with overflow-x:hidden will have a non-zero scroll origin,
and needs to truncate the scrolled content on the left side. To pass the
correct geometry to the UI process, we need to introduce the concept of
"reachable" size as well as total content size; normally these are the same,
but will differ when scrolling is only allowed on one axis but there is overflow
on both axes.
ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren() uses the total and
reachable content sizes to set a negative edge inset on the left (for RTL) or top
(for bottom-to-top) so prevent scrolling into these areas.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
(WebKit::RemoteScrollingTreeTextStream::dump):
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
2014-06-27 Joseph Pecoraro <pecoraro@apple.com>
Fix various leaks, RetainPtrs should adopt allocs
https://bugs.webkit.org/show_bug.cgi?id=134308
Reviewed by Alexey Proskuryakov.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _remoteObjectRegistry]):
2014-06-27 Dan Bernstein <mitz@apple.com>
Remove unused definitions that were mistakenly added back in r170323 and then again in r170329
https://bugs.webkit.org/show_bug.cgi?id=134397
Reviewed by Geoff Garen.
* UIProcess/API/Cocoa/WKBackForwardList.mm:
2014-06-26 Daniel Bates <dabates@apple.com>
[iOS][WK2] Distant focusable element may not be scrolled into view when focused using keyboard
https://bugs.webkit.org/show_bug.cgi?id=134309
<rdar://problem/17427385>
Reviewed by Darin Adler.
Fixes an issue where the focusable element may not be scrolled into view when it's focused by
using the keyboard accessory (i.e. the < and > buttons). In particular, we don't scroll a
keyboard focused text field into view when it's positioned significantly outside the visible region.
* UIProcess/ios/WKContentViewInteraction.h: Added an instance variable called _didAccessoryTabInitiateFocus
to track whether an accessory tab initiated the focus of the focusable element.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]): Clear _didAccessoryTabInitiateFocus so that we're in a good state
should the WebProcess crash between the time the UIProcess receives the accessory tab request and the
WebProcess calls back to the UIProcess to zoom/scroll to the newly focused element.
(-[WKContentView _displayFormNodeInputView]): Modified to pass an empty rectangle for the selection
rectangle to -_zoomToFocusRect to avoid constraining the scroll to the newly focused element when it
was focused using the keyboard accessory tab buttons
(-[WKContentView accessoryTab:]): Modified to set _didAccessoryTabInitiateFocus to YES. We'll set
this boolean to NO in -_displayFormNodeInputView.
2014-06-26 Timothy Horton <timothy_horton@apple.com>
[iOS][WK2] Implement WKPDFView smart magnification
https://bugs.webkit.org/show_bug.cgi?id=134269
<rdar://problem/17272825>
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _currentContentView]):
(contentZoomScale):
Factor _currentContentView out of contentZoomScale.
(-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
(-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
(-[WKWebView _contentRectForUserInteraction]):
Use it in a bunch more places so we query the right view when zooming/scrolling for smart magnification.
* UIProcess/ios/WKPDFView.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView scrollViewDidScroll:]):
(-[WKPDFView _revalidateViews]):
(-[WKPDFView zoom:to:atPoint:kind:]):
(-[WKPDFView resetZoom:]):
Implement zoom:to:atPoint:kind: and resetZoom: UIPDFPageViewDelegate methods.
Convert the rects/points and forward them on to the WKWebView to do the zoom.
resetZoom: doesn't provide the gesture origin, so we zoom out using the view center as our origin.
Avoid parenting new UIPDFPageViews while starting a zoom; they'll end up with a bizarre
animation on them and go flying across the screen (even before _isAnimatingZoom is set).
2014-06-26 Tim Horton <timothy_horton@apple.com>
[WK2] Pinch-zoom shadows can overlap headers and footers
https://bugs.webkit.org/show_bug.cgi?id=134372
<rdar://problem/16004095>
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::shadowLayerPositionForFrame):
(WebKit::shadowLayerBoundsForFrame):
Compute the initial shadow layer and shadow bounds exactly as RenderLayerCompositor does
(in updateRootLayerPosition and friends). Also, clip the shadow layer to the old document rect,
otherwise it can extend over top of the header/footers. The content is automatically clipped to
this rect by the root content layer, but the shadow is outside of that.
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers):
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
Pass all of the arguments to constrainScrollPositionForOverhang, not just half of them.
There's still a bug where we constrain incorrectly with header/footer layers, but that
will be addressed elsewhere.
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
Make use of the new helpers.
2014-06-26 Tim Horton <timothy_horton@apple.com>
Don't leak WKBrowsingContextControllers
https://bugs.webkit.org/show_bug.cgi?id=134368
<rdar://problem/17476582>
Reviewed by Sam Weinig.
* UIProcess/API/mac/WKView.mm:
(-[WKView browsingContextController]):
Adoption is important.
2014-06-26 Alexey Proskuryakov <ap@apple.com>
REGRESSION: Mountain Lion: Gmail's "in new window" view of mail threads is very slow to load its content
https://bugs.webkit.org/show_bug.cgi?id=133882
<rdar://problem/17271965>
Reviewed by Brady Eidson.
* NetworkProcess/mac/NetworkResourceLoadSchedulerMac.mm:
(WebKit::NetworkResourceLoadScheduler::platformInitializeMaximumHTTPConnectionCountPerHost):
Same fix as in WebCore.
2014-06-26 Brady Eidson <beidson@apple.com>
Remove use of PlatformStrategies for Gamepad API.
https://bugs.webkit.org/show_bug.cgi?id=134348
https://bugs.webkit.org/show_bug.cgi?id=134348
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createGamepadStrategy): Deleted.
* NetworkProcess/NetworkProcessPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createGamepadStrategy): Deleted.
(WebKit::WebPlatformStrategies::startMonitoringGamepads): Deleted.
(WebKit::WebPlatformStrategies::stopMonitoringGamepads): Deleted.
(WebKit::WebPlatformStrategies::platformGamepads): Deleted.
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2014-06-26 Dan Bernstein <mitz@apple.com>
[iOS] Add API for opting into character selection granularity
https://bugs.webkit.org/show_bug.cgi?id=134354
Reviewed by Geoff Garen.
* Shared/API/Cocoa/WKFoundation.h: Added a definition of WK_ENUM_AVAILABLE_IOS.
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
(WKSelectionGranularity): Added this enum with two values, one representing dynamic
granularity( the current, default behavior) and one representing character granularity.
Delcared new selectionGranularity property.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]): Copy the _selectionGranularity ivar.
* UIProcess/ios/WKContentViewInteraction.mm:
(toUIWebSelectionMode): Added this helper function for mapping WKSelectionGranularity values
to UIWebSelectionMode values.
(-[WKContentView setupInteraction]): Use a selection assistant with the mode specified in
the configuration.
(-[WKContentView _stopAssistingKeyboard]): Ditto.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture): Changed the behavior of the loupe gesture type in
non-editable text to select a word, rather than an empty range, matching the UITextView
behavior.
2014-06-26 Ada Chan <adachan@apple.com>
Change the target membership of WKBackForwardListPrivate.h from WebKit2 to WebKit.
Rubber-stamped by Dan Bernstein.
* WebKit2.xcodeproj/project.pbxproj:
2014-06-26 Benjamin Poulain <bpoulain@apple.com>
Remove a useless return in WebPageProxyIOS
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects):
Darin caught this mistake in r170460.
2014-06-26 Chris Fleizach <cfleizach@apple.com>
Add an undo group for each dictated utterance in WebKit
https://bugs.webkit.org/show_bug.cgi?id=134086
Applied review comments from Sam Weinig.
Move the associated USE #define into Platform.h.
* UIProcess/PageClient.h:
2014-06-24 Roger Fong <roger_fong@apple.com>
Don't allow sudden termination while writing to local storage.
https://bugs.webkit.org/show_bug.cgi?id=134254.
<rdar://problem/15093854>.
Reviewed by Darin Adler.
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
Disable sudden termination when a database update is scheduled.
(WebKit::LocalStorageDatabase::updateDatabase):
Re-enable sudden termination when the update completes.
* UIProcess/Storage/LocalStorageDatabase.h:
2014-06-25 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Update the long press interactions correctly when an overflow scroll view scrolls
https://bugs.webkit.org/show_bug.cgi?id=134334
Reviewed by Simon Fraser.
* UIProcess/PageClient.h:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::overflowScrollViewWillStartPanGesture):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewWillStartPanGesture): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::overflowScrollViewWillStartPanGesture):
(WebKit::PageClientImpl::overflowScrollViewDidScroll):
(WebKit::PageClientImpl::scrollViewWillStartPanGesture): Deleted.
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartPanGesture):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::overflowScrollViewWillStartPanGesture):
(WebKit::WebPageProxy::overflowScrollViewDidScroll):
(WebKit::WebPageProxy::scrollViewWillStartPanGesture): Deleted.
2014-06-25 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Page jumps when rubber-banding on azuremagazine.com
https://bugs.webkit.org/show_bug.cgi?id=134238
<rdar://problem/16918228>
Reviewed by Benjamin Poulain.
If the scroll view is in the process of rubber-banding when -setContentSize: is called,
it clamps the scroll offsets between zero and the max value, which visibly interrupts the
rubberband. This can easily happen now that we continually send scroll events to the page
on scrolling, especially when pages like azuremagazine.com do fake sticky by toggling
in-flow elements into position:fixed.
Fix by computing the amount of rubber-band before calling -setContentSize:, and then
restoring the contentOffset with the same amount of rubber-band even when the content size
is different, for top/left rubberbands.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
* UIProcess/ios/WKScrollView.h:
* UIProcess/ios/WKScrollView.mm:
(-[WKScrollView _currentTopLeftRubberbandAmount]):
(-[WKScrollView _restoreContentOffsetWithRubberbandAmount:]):
(-[WKScrollView _setContentSizePreservingContentOffsetDuringRubberband:]):
2014-06-25 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Fixed position elements jump around when zooming
https://bugs.webkit.org/show_bug.cgi?id=134328
<rdar://problem/17447048>
Reviewed by Zalan Bujtas.
If a given remote layer tree commit contains changes of layers for viewport-constrained
objects, then the associated scrolling tree also needs to show that the layers changed,
since we need to re-run the "viewport changed" logic in the UI process to get the
layers correctly positioned for the current zoom level.
The bug was that page scale changes resulted in small "pixel alignment" position
changes which touched layers, but we didn't commit any scrolling tree changes. So
the scrolling tree commit would result in visibly stale layer positions, with no scrolling tree
update to adjust them for the current transient zoom.
Fix by making use of the existing "alignment offset" field in the ViewportConstraints
data, and having RemoteScrollingCoordinatorProxy::connectStateNodeLayers() note that
fixed or sticky layers changed if any properties of fixed or sticky scrolling tree
nodes were updated.
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2014-06-25 Benjamin Poulain <bpoulain@apple.com>
REGRESSION (r170325): UI process crashes in lastCommittedLayerTreeTransactionID() when the Web Content process crashes
https://bugs.webkit.org/show_bug.cgi?id=134284
Reviewed by Simon Fraser.
The crash was caused by the access to the Drawing Area after the crash.
This lead to discovering another bug: m_lastVisibleContentRectUpdate could have been updated after WebPageProxy::resetState(),
which in turn would prevent valid updates when a new WebProcess is created.
This patch fixes both issues by moving the VisibleContentRectUpdateInfo to be internal to WebPageProxy,
then early return if we get there in an invalid state.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects):
2014-06-25 Brady Eidson <beidson@apple.com>
Add new platform gamepad abstractions
https://bugs.webkit.org/show_bug.cgi?id=134325
Reviewed by Dean Jackson.
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
(WebKit::NetworkProcessPlatformStrategies::createGamepadStrategy):
* NetworkProcess/NetworkProcessPlatformStrategies.h:
Actually return a GamepadStrategy in WK2 with no implementation for now:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::createGamepadStrategy):
(WebKit::WebPlatformStrategies::startMonitoringGamepads):
(WebKit::WebPlatformStrategies::stopMonitoringGamepads):
(WebKit::WebPlatformStrategies::platformGamepads):
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2014-06-25 Jaehun Lim <ljaehun.lim@samsung.com>
Unreviewed, CMake build fix after r170450
* CMakeLists.txt: Add ProcessAssertion.cpp and ProcessThrottler.cpp.
* UIProcess/ProcessAssertion.cpp: Replace #import with #include.
2014-06-25 Tim Horton <timothy_horton@apple.com>
[WK2] Shadow layer is in the wrong place while pinch-zooming
https://bugs.webkit.org/show_bug.cgi?id=134321
Reviewed by Dan Bernstein.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers):
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
The anchor point of the shadow layer changed, so we no longer need to shift our position to the center.
2014-06-25 Dan Bernstein <mitz@apple.com>
Fixed crashes after r170450.
Reviewed by Tim Horton.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy): Removed iOS platform #ifdef around
initialization of m_throttler.
2014-06-25 Beth Dakin <bdakin@apple.com>
Crash in ScrollingTree::isRubberBandInProgress()
https://bugs.webkit.org/show_bug.cgi?id=134316
-and corresponding-
<rdar://problem/16247911>
Reviewed by Geoffrey Garen.
Move all ScrollingTreeNode creation from ScrollingCoordinator subclasses into
ScrollingTree subclasses.
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createScrollingTreeNode):
(WebKit::RemoteScrollingTree::createNode): Deleted.
* UIProcess/Scrolling/RemoteScrollingTree.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::createScrollingTreeNode): Deleted.
2014-06-25 Dan Bernstein <mitz@apple.com>
Web process should become active when sent a message that requires a callback
https://bugs.webkit.org/show_bug.cgi?id=134315
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Removed one-off code to
acquire an activity token, now that WebPageProxy::takeSnapshot does it automatically for us.
* UIProcess/GenericCallback.h:
(WebKit::CallbackBase::CallbackBase): Made this constructor take and adopt an activity
token.
(WebKit::GenericCallback::create): Added an optional activity token parameter.
(WebKit::GenericCallback::GenericCallback): Pass the activity token to the CallbackBase
constructor.
(WebKit::CallbackMap::put): Added an activity token parameter, which is passed along to
GenericCallback::create.
* UIProcess/ProcessAssertion.cpp: Moved from Source/WebKit2/UIProcess/ios/ProcessAssertion.mm.
This copy includes generic no-op implementations for platforms that don’t have assertions.
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::setState):
* UIProcess/ProcessAssertion.h: Moved from Source/WebKit2/UIProcess/ios/ProcessAssertion.h.
Changed platform #ifdefs to make this usable by all platforms.
* UIProcess/ProcessThrottler.cpp: Moved from Source/WebKit2/UIProcess/ios/ProcessThrottler.mm.
Removed iOS platform #ifdef.
* UIProcess/ProcessThrottler.h: Moved from Source/WebKit2/UIProcess/ios/ProcessThrottler.h.
Ditto.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::validateCommand): Create a background activity token and pass it
along to CallbackMap::put.
(WebKit::WebPageProxy::runJavaScriptInMainFrame): Ditto.
(WebKit::WebPageProxy::getRenderTreeExternalRepresentation): Ditto.
(WebKit::WebPageProxy::getSourceForFrame): Ditto.
(WebKit::WebPageProxy::getContentsAsString): Ditto.
(WebKit::WebPageProxy::getBytecodeProfile): Ditto.
(WebKit::WebPageProxy::getSelectionOrContentsAsString): Ditto.
(WebKit::WebPageProxy::getSelectionAsWebArchiveData): Ditto.
(WebKit::WebPageProxy::getMainResourceDataOfFrame): Ditto.
(WebKit::WebPageProxy::getResourceDataFromFrame): Ditto.
(WebKit::WebPageProxy::getWebArchiveOfFrame): Ditto.
(WebKit::WebPageProxy::getMarkedRangeAsync): Ditto.
(WebKit::WebPageProxy::getSelectedRangeAsync): Ditto.
(WebKit::WebPageProxy::characterIndexForPointAsync): Ditto.
(WebKit::WebPageProxy::firstRectForCharacterRangeAsync): Ditto.
(WebKit::WebPageProxy::takeSnapshot): Ditto.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::sendProcessWillSuspend): Moved from WebProcessProxyIOS.mm.
(WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Ditto.
(WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
(WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
* UIProcess/WebProcessProxy.h: Removed iOS platform #ifdef.
* UIProcess/WebProcessProxy.messages.in: Ditto.
* UIProcess/ios/ProcessAssertionIOS.mm: Renamed from Source/WebKit2/UIProcess/ios/ProcessAssertion.mm.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::selectWithGesture): Changed to pass the function directly to
CallbackMap::put, along with a background activity token.
(WebKit::WebPageProxy::updateSelectionWithTouches): Ditto.
(WebKit::WebPageProxy::requestAutocorrectionData): Ditto.
(WebKit::WebPageProxy::applyAutocorrection): Ditto.
(WebKit::WebPageProxy::requestDictationContext): Ditto.
(WebKit::WebPageProxy::requestAutocorrectionContext): Ditto.
(WebKit::WebPageProxy::selectWithTwoTouches): Ditto.
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::sendProcessWillSuspend): Moved to WebProcessProxy.cpp.
(WebKit::WebProcessProxy::sendCancelProcessWillSuspend): Ditto.
(WebKit::WebProcessProxy::processReadyToSuspend): Ditto.
(WebKit::WebProcessProxy::didCancelProcessSuspension): Ditto.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync): Create a background
activity token and pass it along to CallbackMap::put.
* WebKit2.xcodeproj/project.pbxproj: Updated for moves and copies.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess): Moved iOS platform #ifdef.
* WebProcess/WebProcess.h: Ditto.
* WebProcess/WebProcess.messages.in: Ditto.
2014-06-25 Chris Fleizach <cfleizach@apple.com>
Add an undo group for each dictated utterance in WebKit
https://bugs.webkit.org/show_bug.cgi?id=134086
Reviewed by Enrica Casucci.
* UIProcess/API/mac/WKView.mm:
(-[WKView insertText:replacementRange:]):
(-[WKView validAttributesForMarkedText]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::registerInsertionUndoGrouping):
(WebKit::WebPageProxy::insertTextAsync):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::registerInsertionUndoGrouping):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::registerInsertionUndoGrouping):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::insertDictatedTextAsync):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::insertTextAsync):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::insertDictatedTextAsync):
2014-06-25 Joseph Pecoraro <pecoraro@apple.com>
[iOS]: WK2 Inspector Node Search
https://bugs.webkit.org/show_bug.cgi?id=134279
Reviewed by Benjamin Poulain.
* UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.h: Added.
* UIProcess/ios/WKInspectorNodeSearchGestureRecognizer.mm: Added.
(-[WKInspectorNodeSearchGestureRecognizer locationInView:]):
(-[WKInspectorNodeSearchGestureRecognizer _processTouches:state:]):
(-[WKInspectorNodeSearchGestureRecognizer touchesBegan:withEvent:]):
(-[WKInspectorNodeSearchGestureRecognizer touchesMoved:withEvent:]):
(-[WKInspectorNodeSearchGestureRecognizer touchesEnded:withEvent:]):
(-[WKInspectorNodeSearchGestureRecognizer touchesCancelled:withEvent:]):
(-[WKInspectorNodeSearchGestureRecognizer reset]):
Gesture recognizer that tracks a single touch, updates as that touch
moves, and ends when that touch is cancelled or ends. The location
of the gesture recognizer is the location of the touch it was tracking.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
Handle the inspector node search gesture recognizer if needed.
(-[WKContentView _removeDefaultGestureRecognizers]):
(-[WKContentView _addDefaultGestureRecognizers]):
Helpers to add and remove the default gestures.
(-[WKContentView _enableInspectorNodeSearch]):
(-[WKContentView _disableInspectorNodeSearch]):
When node search is enabled, remove all gesture recognizers and
replace with a single inspector node search gesture recognizer.
Likewise, inverse that when disabled.
(-[WKContentView _inspectorNodeSearchRecognized:]):
Notify the WebProcess of new touch positions during node search.
(-[WKContentView hasSelectablePositionAtPoint:]):
When inspector node search is enabled, disable selection.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::inspectorNodeSearchMovedToPosition):
Send a mouse move to the new location. WebCore will update the highlight.
(WebKit::WebPage::inspectorNodeSearchEndedAtPosition):
Inspect the node at the location.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _enableInspectorNodeSearch]):
(-[WKWebView _disableInspectorNodeSearch]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::enableInspectorNodeSearch):
(WebKit::PageClientImpl::disableInspectorNodeSearch):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::inspectorNodeSearchMovedToPosition):
(WebKit::WebPageProxy::inspectorNodeSearchEndedAtPosition):
(WebKit::WebPageProxy::enableInspectorNodeSearch):
(WebKit::WebPageProxy::disableInspectorNodeSearch):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::didSetSearchingForNode):
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::enableInspectorNodeSearch):
(WebKit::WebPage::disableInspectorNodeSearch):
Pass the inspector node search state up from the WebProcess
to the WKContentView in the UIProcess. Likewise some messages
in the reverse direction.
2014-06-25 Dana Burkart <dburkart@apple.com>
Add support for 5-tuple versioning.
Reviewed by David Farler.
* Configurations/Version.xcconfig:
2014-06-25 Dan Bernstein <mitz@apple.com>
<rdar://problem/17448049> REGRESSION (r170254): Input methods don’t work
https://bugs.webkit.org/show_bug.cgi?id=134311
Reviewed by Tim Horton.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getSelectedRangeAsync): Removed code that accidentally put the
callback function into a throwaway EditingRangeCallback.
2014-06-25 Timothy Horton <timothy_horton@apple.com>
[iOS][WK2] Rotating a zoomed PDF leads to weird scrolling behavior
https://bugs.webkit.org/show_bug.cgi?id=134286
Reviewed by Benjamin Poulain.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView _computePageAndDocumentFrames]):
The WKPDFView frame and scroll view content size need to be scaled.
(-[WKPDFView web_setScrollView:]): Deleted.
(-[WKPDFView web_initWithFrame:webView:]):
Get rid of _documentFrame, and don't set it at initWithFrame: time (it's not useful yet).
2014-06-25 Laszlo Gombos <l.gombos@samsung.com>
Remove build guard for progress element
https://bugs.webkit.org/show_bug.cgi?id=134292
Reviewed by Benjamin Poulain.
* Configurations/FeatureDefines.xcconfig:
2014-06-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Windowed plugins visibility doesn't work
https://bugs.webkit.org/show_bug.cgi?id=131487
Reviewed by Anders Carlsson.
Implement plugins visibility changes and add a new message to
notify the UI process when a windowed plugin is shown/hidden to
show/hide the plugin widget.
* PluginProcess/PluginControllerProxy.cpp:
(WebKit::PluginControllerProxy::visibilityDidChange): Add
implementation to notify the plugin about visibility change.
(WebKit::PluginControllerProxy::windowedPluginVisibilityDidChange):
Send WindowedPluginVisibilityDidChange to the plugin proxy.
* PluginProcess/PluginControllerProxy.h:
* PluginProcess/PluginControllerProxy.messages.in: Add VisibilityDidChange message.
* UIProcess/WebPageProxy.h: Add windowedPluginVisibilityDidChange
to handle WindowedPluginVisibilityDidChange message.
* UIProcess/WebPageProxy.messages.in: Add WindowedPluginVisibilityDidChange message.
* UIProcess/efl/WebPageProxyEfl.cpp:
(WebKit::WebPageProxy::windowedPluginVisibilityDidChange):
* UIProcess/gtk/WebPageProxyGtk.cpp:
(WebKit::WebPageProxy::createPluginContainer): Do not show the
plugins by default.
(WebKit::WebPageProxy::windowedPluginVisibilityDidChange): Show or hide the plugin widget.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::NetscapePlugin): Initialize m_isVisible.
(WebKit::NetscapePlugin::visibilityDidChange): Add visible parameter and save it in m_isVisible
member, calling platformVisibilityDidChange() only when it has actually changed.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformVisibilityDidChange): Notify the controller about visibility change.
* WebProcess/Plugins/PDF/PDFPlugin.h:
* WebProcess/Plugins/Plugin.h:
* WebProcess/Plugins/PluginController.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::visibilityDidChange): Send VisibilityDidChange message to the plugin controller proxy.
(WebKit::PluginProxy::windowedPluginVisibilityDidChange): Notify the controller about visibility change.
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginProxy.messages.in: Add WindowedPluginVisibilityDidChange message.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::didInitializePlugin): Also call viewVisibilityDidChange() when the plugin is initialized.
(WebKit::PluginView::setParentVisible): Override this Widget method to update the plugin visibility when parent
widget is shown/hidden.
(WebKit::PluginView::viewVisibilityDidChange): Pass visible parameter to visibilityDidChange().
(WebKit::PluginView::windowedPluginVisibilityDidChange): Send WindowedPluginVisibilityDidChange message to the UI process.
* WebProcess/Plugins/PluginView.h:
2014-06-24 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] We should not start potential tap activation unless the tap gesture recognizer succeed
https://bugs.webkit.org/show_bug.cgi?id=134277
<rdar://problem/17439973>
Reviewed by Anders Carlsson.
* UIProcess/ios/WKSyntheticClickTapGestureRecognizer.m:
(-[WKSyntheticClickTapGestureRecognizer setState:]):
We were calling the _gestureRecognizedAction even for failure states. The potential activation work
is not light on the Web Process, we should not start if we don't care about the result.
2014-06-24 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Adopt the C API of UIWebTouchEventsGestureRecognizer for touch event mapping
https://bugs.webkit.org/show_bug.cgi?id=134234
Reviewed by Tim Horton.
The C API is more efficient and expose properties we will need for other patches. This patch moves from
getting each value independently on UIWebTouchEventsGestureRecognizer to the single structure exposed
by _UIWebTouchEvent.
* Shared/NativeWebTouchEvent.h:
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::convertTouchPhase):
(WebKit::extractWebTouchPoint):
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _webTouchEventsRecognized:]):
2014-06-24 Joseph Pecoraro <pecoraro@apple.com>
[iOS]: WK2 Inspector Node Highlighting
https://bugs.webkit.org/show_bug.cgi?id=134257
Reviewed by Timothy Hatcher.
* Scripts/webkit2/messages.py:
(struct_or_class):
(headers_for_type):
* Shared/WebCoreArgumentCoders.h:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Highlight>::encode):
(IPC::ArgumentCoder<Highlight>::decode):
Add a way to encode a WebCore::Highlight struct.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _showInspectorHighlight:WebCore::]):
(-[WKWebView _hideInspectorHighlight]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::showInspectorHighlight):
(WebKit::PageClientImpl::hideInspectorHighlight):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::showInspectorHighlight):
(WebKit::WebPageProxy::hideInspectorHighlight):
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::highlight):
(WebKit::WebInspectorClient::hideHighlight):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::showInspectorHighlight):
(WebKit::WebPage::hideInspectorHighlight):
Send web process highlight / hideHighlight messages up to
the UIProcess so it can highlight in the WKContentView.
Pass up a WebCore::Highlight in Document coordinates.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKInspectorHighlightView initWithFrame:]):
(-[WKInspectorHighlightView dealloc]):
(-[WKInspectorHighlightView _removeAllLayers]):
(-[WKInspectorHighlightView _createLayers:]):
(findIntersectionOnLineBetweenPoints):
(quadIntersection):
(layerPathWithHole):
(layerPath):
(-[WKInspectorHighlightView _layoutForNodeHighlight:]):
(-[WKInspectorHighlightView _layoutForRectsHighlight:]):
(-[WKInspectorHighlightView update:]):
Reuse the WebKit1 code to turn highlight float quads into CAShapeLayers.
(-[WKContentView _showInspectorHighlight:WebCore::]):
(-[WKContentView _hideInspectorHighlight]):
Show and hide the highlight view with the respective WebCore::Highlight.
2014-06-24 Anders Carlsson <andersca@apple.com>
Simplify decodeLegacySessionState
https://bugs.webkit.org/show_bug.cgi?id=134280
Reviewed by Andreas Kling.
There's no need to use a LegacySessionStateDecoder object with a single member,
just make all functions static and only export a single entry point; decodeLegacySessionState.
No functionality change, just moving code around.
* UIProcess/API/C/WKSessionStateRef.cpp:
(WKSessionStateCreateFromData):
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeSessionHistoryEntryData):
(WebKit::decodeSessionHistoryEntry):
(WebKit::decodeSessionHistoryEntries):
(WebKit::decodeV0SessionHistory):
(WebKit::decodeV1SessionHistory):
(WebKit::decodeSessionHistory):
(WebKit::decodeLegacySessionState):
(WebKit::LegacySessionStateDecoder::LegacySessionStateDecoder): Deleted.
(WebKit::LegacySessionStateDecoder::~LegacySessionStateDecoder): Deleted.
(WebKit::LegacySessionStateDecoder::decodeSessionState): Deleted.
(WebKit::LegacySessionStateDecoder::decodeSessionHistory): Deleted.
(WebKit::LegacySessionStateDecoder::decodeV0SessionHistory): Deleted.
(WebKit::LegacySessionStateDecoder::decodeV1SessionHistory): Deleted.
(WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntries): Deleted.
(WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntry): Deleted.
(WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntryData): Deleted.
* UIProcess/mac/LegacySessionStateCoding.h:
2014-06-24 Brady Eidson <beidson@apple.com>
Enable GAMEPAD in the Mac build, but disabled at runtime.
https://bugs.webkit.org/show_bug.cgi?id=134255
Reviewed by Dean Jackson.
* Configurations/FeatureDefines.xcconfig:
* Shared/WebPreferencesDefinitions.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetGamepadsEnabled):
(WKPreferencesGetGamepadsEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-06-24 Anders Carlsson <andersca@apple.com>
Add support for v0 legacy decoding
https://bugs.webkit.org/show_bug.cgi?id=134275
Reviewed by Andreas Kling.
* Shared/SessionState.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::LegacySessionStateDecoder::decodeV0SessionHistory):
(WebKit::LegacySessionStateDecoder::decodeV1SessionHistory):
2014-06-24 Anders Carlsson <andersca@apple.com>
Add SPI for clearing an entire back-forward list
https://bugs.webkit.org/show_bug.cgi?id=134274
Reviewed by Dan Bernstein.
Add -[WKBackForwardList _clear] which only clears the back-forward items, and
change -[WKBackForwardList _removeAllItems] to remove all items including the current one.
* UIProcess/API/Cocoa/WKBackForwardList.mm:
(-[WKBackForwardList _removeAllItems]):
(-[WKBackForwardList _clear]):
* UIProcess/API/Cocoa/WKBackForwardListPrivate.h:
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::removeAllItems):
* UIProcess/WebBackForwardList.h:
2014-06-24 Anders Carlsson <andersca@apple.com>
Add iOS specific frame state member variables
https://bugs.webkit.org/show_bug.cgi?id=134268
Reviewed by Andreas Kling.
* Shared/SessionState.cpp:
(WebKit::FrameState::encode):
(WebKit::FrameState::decode):
* Shared/SessionState.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataDecoder::operator>>):
(WebKit::decodeBackForwardTreeNode):
* WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toFrameState):
(WebKit::applyFrameState):
2014-06-24 Enrica Casucci <enrica@apple.com>
iOS WebKit2: block selection tends to prefer block to single words even when the page is zoomed.
https://bugs.webkit.org/show_bug.cgi?id=134267
<rdar://problem/17138059>
Reviewed by Benjamin Poulain.
When trying to find the best selection match for the position where the tap occurs,
we need to take into account the page scale. This patch applies the scale factor
to the selection rect before comparing it with the desired size.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForWebSelectionAtPosition):
2014-06-24 Anders Carlsson <andersca@apple.com>
Add code to convert HistoryItem to PageState
https://bugs.webkit.org/show_bug.cgi?id=134263
Reviewed by Andreas Kling.
* WebProcess/WebCoreSupport/SessionStateConversion.cpp:
(WebKit::toHTTPBody):
(WebKit::toFrameState):
(WebKit::toPageState):
* WebProcess/WebCoreSupport/SessionStateConversion.h:
2014-06-24 Andreas Kling <akling@apple.com>
[iOS WebKit2] Disable screen font substitution by default.
<https://webkit.org/b/134266>
<rdar://problem/17427740>
Just like OS X >= 10.9, screen font substitution should be disabled
by default in WebKit2 for iOS.
Reviewed by Anders Carlsson.
* Shared/WebPreferencesDefinitions.h:
2014-06-24 Anders Carlsson <andersca@apple.com>
Add PageState to HistoryItem conversion code
https://bugs.webkit.org/show_bug.cgi?id=134259
Reviewed by Andreas Kling.
* Shared/SessionState.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::decodeBackForwardTreeNode):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/SessionStateConversion.cpp: Added.
(WebKit::toFormData):
(WebKit::applyFrameState):
(WebKit::toHistoryItem):
* WebProcess/WebCoreSupport/SessionStateConversion.h: Added.
2014-06-24 Antti Koivisto <antti@apple.com>
Only flush layers when the exposed rect actually changes
https://bugs.webkit.org/show_bug.cgi?id=134248
Reviewed by Anders Carlsson.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
2014-06-24 Martin Hock <mhock@apple.com>
[iOS] DOMWindow::outerWidth and outerHeight don't return useful values, so return 0.
Also, revert r169281.
https://bugs.webkit.org/show_bug.cgi?id=134233
<rdar://problem/17060183>
Reviewed by Benjamin Poulain.
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::windowFrame): Deleted.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::convertToUserSpace):
2014-06-24 Jeremy Jones <jeremyj@apple.com>
Initialize WKWebViewConfiguration properties to their default values.
https://bugs.webkit.org/show_bug.cgi?id=134216
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
add -init method to initialize _mediaPlaybackRequiresUserAction and _mediaPlaybackAllowsAirPlay.
2014-06-24 Anders Carlsson <andersca@apple.com>
Add missing semicolon.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateVisibleContentRects]):
2014-06-24 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
Fix unused parameter warnings if inspector is disabled
https://bugs.webkit.org/show_bug.cgi?id=134244
Reviewed by Zalan Bujtas.
* WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
(WKBundleInspectorShow):
(WKBundleInspectorClose):
(WKBundleInspectorEvaluateScriptForTest):
(WKBundleInspectorSetPageProfilingEnabled):
2014-06-24 Anders Carlsson <andersca@apple.com>
WKWebView doesn't respect -[UIScrollView contentInset]
https://bugs.webkit.org/show_bug.cgi?id=134230
<rdar://problem/17429107>
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
Call initWithFrame and pass the WKWebView along.
(-[WKWebView _adjustedContentOffset:]):
New helper method that takes a content offset as a CGPoint and offsets it by the computed content inset.
(-[WKWebView _computedContentInset]):
New helper method that returns the _obscuredInsets, or if it's zero, the scroll view's content inset.
(-[WKWebView _processDidExit]):
Use _computedContentInset.
(-[WKWebView _didCommitLayerTree:WebKit::]):
use _computedContentInset.
(-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
Use _computedContentInset.
(-[WKWebView _scrollToContentOffset:WebCore::]):
Use _computedContentInset.
(-[WKWebView _updateVisibleContentRects]):
If we have a custom content view, call web_computedContentInsetDidChange.
(-[WKWebView _setObscuredInsets:]):
Don't call web_setObscuredInsets: if we have a custom content view.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
Add new methods.
* UIProcess/Cocoa/WKWebViewContentProvider.h:
Add new methods.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_initWithFrame:webView:]):
Set the _webView and _scrollView ivars.
(-[WKPDFView _offsetForPageNumberIndicator]):
Get the computed content offset from the WKWebView.
(-[WKPDFView web_computedContentInsetDidChange]):
Update the page indicator.
(-[WKPDFView initWithFrame:]): Deleted.
(-[WKPDFView web_setObscuredInsets:]): Deleted.
* UIProcess/ios/WKScrollView.mm:
(-[WKScrollView setContentInset:]):
Call _updateVisibleContentRects.
2014-06-23 Jaehun Lim <ljaehun.lim@samsung.com>
Unreviewed, fix build warning.
Source/WebKit2/WebProcess/WebPage/DrawingArea.h:117:18: warning: unused parameter ‘wantsDidUpdateViewState’ [-Wunused-parameter]
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::viewStateDidChange):
2014-06-23 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] Replace RefPtr<Evas_Object> with UniquePtrEfl
https://bugs.webkit.org/show_bug.cgi?id=134236
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::updateCursor):
* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/SnapshotImageGL.cpp:
* UIProcess/API/efl/ewk_favicon_database.cpp:
(ewk_favicon_database_icon_get):
* UIProcess/API/efl/tests/test_ewk2_refptr_evas_object.cpp: Removed.
2014-06-23 Daniel Bates <dabates@apple.com>
[iOS][WK2] REGRESSION (r169324): Page jumps to top when you type into a text field
https://bugs.webkit.org/show_bug.cgi?id=134219
<rdar://problem/17279113>
Reviewed by Benjamin Poulain.
Fixes an issue where typing into a text field may cause a noticeable jump to the top of
the page.
Currently when updating the visual content rectangles we always constrain the scroll offset
(s_x, s_y) such that 0 <= s_x <= "content width" - "visible width" and 0 <= s_y <= "content height" - "visible height".
However the UIProcess may want to scroll the page by an offset outside of this range to
create a visually pleasing result. In particular, on iOS we may scroll the page slightly
outside of this range (e.g. s_y > 0 = "content height" - "visible height") when a form
control is focused so as to be consistent with platform convention.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects): Temporarily disable content edge constraint when
updating scroll offset.
2014-06-23 Dan Bernstein <mitz@apple.com>
<rdar://problem/17413374> [iOS] Application cache size per origin is not limited
https://bugs.webkit.org/show_bug.cgi?id=134229
Reviewed by Anders Carlsson.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess): Set the default quota per origin to the same
value it is set in Legacy WebKit.
2014-06-23 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed, EFL build fix after r170330.
* WebProcess/WebPage/WebPage.cpp: Guard WKStringCF.h with PLATFORM(COCOA) macro.
2014-06-23 Timothy Horton <timothy_horton@apple.com>
[WK2] Use the page background color instead of white when swipe snapshots were purged (134218)
https://bugs.webkit.org/show_bug.cgi?id=134218
<rdar://problem/17426454>
Reviewed by Benjamin Poulain.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]):
(-[WKWebView WebKit::]):
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::shouldUseSnapshotForSize):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::retrieveSnapshotForItem): Deleted.
* UIProcess/mac/ViewSnapshotStore.h:
Store a color along with each snapshot.
Set the background color of the swipe snapshot layer accordingly.
2014-06-23 Anders Carlsson <andersca@apple.com>
Add -[WKBackForwardList _removeAllItems]
https://bugs.webkit.org/show_bug.cgi?id=134227
<rdar://problem/17291623>
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKBackForwardList.mm:
(-[WKBackForwardList _removeAllItems]):
* UIProcess/API/Cocoa/WKBackForwardListPrivate.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
2014-06-23 Dan Bernstein <mitz@apple.com>
<rdar://problem/17413498> [Cocoa] Expose WebPreferences::offlineWebApplicationCacheEnabled
https://bugs.webkit.org/show_bug.cgi?id=134217
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _offlineApplicationCacheIsEnabled]):
(-[WKPreferences _setOfflineApplicationCacheIsEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesPrivate.h: Added _offlineWebApplicationCacheIsEnabled
property.
2014-06-23 Grant Kennell <gkennell@apple.com>
Add SPI for Injected Bundle to provide user agent for a given URL.
https://bugs.webkit.org/show_bug.cgi?id=133562
Reviewed by Sam Weinig.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
Added delegate method to WebProcess PluIn protocol to provide UserAgent per URL.
* WebProcess/InjectedBundle/API/c/WKBundlePageLoaderClient.h:
Added new typedef for function pointer for this new delegate call.
Added new version (V8) of bundle loader client struct containing
a function pointer of that new type.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(userAgentForURL): Makes delegate call with the new method.
(setUpPageLoaderClient): Sets the struct's new function pointer to the new method.
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp:
(WebKit::InjectedBundlePageLoaderClient::userAgentForURL):
* WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::userAgent):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::userAgent): Began using the new API to ask for user agent
instead of simply returning what had been stored.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::userAgent): Deleted.
2014-06-23 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r170324.
https://bugs.webkit.org/show_bug.cgi?id=134223
lots of build breakage (Requested by bradeeoh on #webkit).
Reverted changeset:
"Unreviewed, revert an unintentional change committed with
r170323."
http://trac.webkit.org/changeset/170324
2014-06-23 Timothy Horton <timothy_horton@apple.com>
[iOS][wk2] Don't use view snapshots if the destination layer is a different size
https://bugs.webkit.org/show_bug.cgi?id=134210
<rdar://problem/17369463>
Reviewed by Benjamin Poulain.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Only use the view snapshot if the snapshot is the same (in device space) size
as the layer it's going to be put into, and only if the device scale factor is
the same as it was when the snapshot was taken.
2014-06-23 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Make the state restore from HistoryItem more precise and reliable
https://bugs.webkit.org/show_bug.cgi?id=134150
Reviewed by Tim Horton.
This patch make several little improvements to improve how we restore the visible content rect and scale
from the HistoryItem.
The biggest architectural change is that the exposed rect is now restored on the UIProcess instead of the WebProcess,
this ensure we restore the same position regardless of any modification of obscured areas.
* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::lastLayerTreeTransactionId):
(WebKit::WebPage::updateVisibleContentRects):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
A race between the UIProcess and the WebProcess could cause the viewport of the next page to be influenced by updates
of the previous page. To avoid that, VisibleContentRectUpdateInfo keeps track of the last transaction seen at the time
of the update.
The WebProcess updates the size and scale of the content through layer tree updates. If an update was generated for a layer tree
update of the old page, none of the information is valid for the current content. Since the UIProcess drives the state in case of conflicts,
the WebProcess was updating the scale of the current page based on incorrect information.
To avoid the problems, we save the layer tree transaction ID when we commit a new page. Only updates after that transaction are useful
for the current page.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _processDidExit]):
(withinEpsilon):
(changeContentOffsetBoundedInValidRange):
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _restorePageStateToExposedRect:WebCore::scale:]):
(-[WKWebView _restorePageStateToUnobscuredCenter:WebCore::scale:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::restorePageState):
(WebKit::PageClientImpl::restorePageCenterAndScale):
Restoring the state is now done by WKWebView. The state is only updated on the next layer tree commit,
this is done to avoid any jumping if the page has scrolled since we tried to restore its state.
Both update path end up calling _updateVisibleContentRects. This is because the update on the WebProcess
never sets the ScrollPosition (because it does not know the current state of the obscured insets). Pushing
a new VisibleContentRect will nicely udpates the exposed rect, scroll position, fixed elements, etc.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::restorePageState):
(WebKit::WebPageProxy::restorePageCenterAndScale):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
(WebKit::RemoteLayerTreeDrawingAreaProxy::lastCommittedLayerTreeTransactionID):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
* WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
(WebKit::WebFrameLoaderClient::saveViewStateToItem):
(WebKit::WebFrameLoaderClient::restoreViewState):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
Get rid of m_obscuredTopInset. It was a bad idea. The UIProcess updates the obscured insets a lot during
page load, the value we used to restore the scroll position was frequently stale.
(WebKit::WebPage::userHasChangedPageScaleFactor): Deleted.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::savePageState):
(WebKit::scaleAfterViewportWidthChange):
(WebKit::relativeCenterAfterContentSizeChange):
(WebKit::adjustExposedRectForNewScale):
Extract this out of dynamicViewportSizeUpdate(). It is useful to adjust the exposed rect when restoring a HistoryItem
to a ViewportConfiguration that is different from when it was saved.
(WebKit::WebPage::restorePageState):
There are two variations of restorePage:
1) If the viewport configuration is compatible, restore the exact scale and position of the page.
2) Otherwise, restore the scale and position similarily to dynamicViewportSizeUpdate().
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::viewportConfigurationChanged):
(WebKit::adjustExposedRectForBoundedScale):
(WebKit::RemoteLayerTreeDrawingArea::currentTransactionID):
Expose the transactionID for the race issue on VisibleRectUpdate.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
Store the exposed rect in floating point coordinates. This makes it possible to restore that exact
position when needed.
2014-06-23 Eric Carlson <eric.carlson@apple.com>
Unreviewed, revert an unintentional change committed with r170323.
* UIProcess/API/Cocoa/WKBackForwardList.mm:
2014-06-23 Anders Carlsson <andersca@apple.com>
Policy delegate methods should use CompletionHandlerCallChecker
https://bugs.webkit.org/show_bug.cgi?id=134215
Reviewed by Dan Bernstein.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
2014-06-23 Anders Carlsson <andersca@apple.com>
Don't use the WK prefix for internal C++ types
https://bugs.webkit.org/show_bug.cgi?id=134214
Reviewed by Dan Bernstein.
* Shared/AssistedNodeInformation.cpp:
(WebKit::OptionItem::encode):
(WebKit::OptionItem::decode):
(WebKit::WKOptionItem::encode): Deleted.
(WebKit::WKOptionItem::decode): Deleted.
* Shared/AssistedNodeInformation.h:
(WebKit::OptionItem::OptionItem):
(WebKit::AssistedNodeInformation::AssistedNodeInformation):
(WebKit::WKOptionItem::WKOptionItem): Deleted.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
(-[WKContentView inputView]):
(-[WKContentView requiresAccessoryView]):
(-[WKContentView _updateAccessory]):
(-[WKContentView textInputTraits]):
(-[WKContentView assistedNodeSelectOptions]):
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
(-[WKContentView _stopAssistingNode]):
* UIProcess/ios/forms/WKFormInputControl.mm:
(-[WKDateTimePicker initWithView:datePickerMode:]):
(-[WKFormInputControl initWithView:]):
* UIProcess/ios/forms/WKFormSelectControl.h:
* UIProcess/ios/forms/WKFormSelectControl.mm:
(adjustedFontSize):
* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKOptionPickerCell initWithOptionItem:]):
(-[WKOptionGroupPickerCell initWithOptionItem:]):
(-[WKMultipleSelectPicker initWithView:]):
(-[WKMultipleSelectPicker pickerView:viewForRow:forComponent:reusingView:]):
(-[WKMultipleSelectPicker pickerView:row:column:checked:]):
(-[WKSelectSinglePicker pickerView:attributedTitleForRow:forComponent:]):
(-[WKSelectSinglePicker pickerView:didSelectRow:inComponent:]):
* UIProcess/ios/forms/WKFormSelectPopover.mm:
(-[WKSelectTableViewController initWithView:hasGroups:]):
(-[WKSelectTableViewController tableView:numberOfRowsInSection:]):
(-[WKSelectTableViewController tableView:titleForHeaderInSection:]):
(-[WKSelectTableViewController populateCell:withItem:]):
(-[WKSelectTableViewController findItemIndexAt:]):
(-[WKSelectTableViewController findItemAt:]):
(-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
(-[WKSelectTableViewController tableView:didSelectRowAtIndexPath:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):
2014-06-23 Dan Bernstein <mitz@apple.com>
[Cocoa] No way to grant storage quotas for web application cache
https://bugs.webkit.org/show_bug.cgi?id=134213
Reviewed by Anders Carlsson.
* UIProcess/API/APIUIClient.h:
(API::UIClient::reachedApplicationCacheOriginQuota): Added this new client function, with
a default implementation that calls the completion handler with the current quota.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Declared a new delegate method.
* UIProcess/API/Cocoa/_WKSecurityOrigin.mm:
(-[_WKSecurityOrigin _initWithSecurityOrigin:WebCore::]): Changed the parameter into a const
reference, since we copy it.
* UIProcess/API/Cocoa/_WKSecurityOriginInternal.h:
* UIProcess/Cocoa/UIDelegate.h: Override API::UIClient::reachedApplicationCacheOriginQuota.
Added flag to m_delegateMethods struct for new delegate method.
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate): Set new flag in m_delegateMethods struct.
(WebKit::UIDelegate::UIClient::exceededDatabaseQuota): Updated for change in
_WKSecurityOrigin initializer.
(WebKit::UIDelegate::UIClient::reachedApplicationCacheOriginQuota): Added. Calls the new
delegate method.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reachedApplicationCacheOriginQuota): Added. Forwards the message to
the UI client.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Added ReachedApplicationCacheOriginQuota message.
* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
(API::InjectedBundle::PageUIClient::didReachApplicationCacheOriginQuota): Changed the return
type to bool, indicating whether the client handled the callback.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::didReachApplicationCacheOriginQuota): Return the
appropriate value.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): If the bundle client didn’t
handle the callback, send a message the the UI process, and update the quota with the reply.
2014-06-23 Tim Horton <timothy_horton@apple.com>
[wk2] Synchronously wait a short time for a layer tree update after bringing a web view in-window
https://bugs.webkit.org/show_bug.cgi?id=134189
Reviewed by Simon Fraser.
Make the old behavior of -[WKView endDeferringViewInWindowChangesSync] the default; synchronously wait
for a fraction of a second when a page that was previously in-window but currently isn't comes back in-window,
until new content is painted (or we hit a timeout).
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::waitForDidUpdateViewState):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h:
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForDidUpdateViewState):
Delegate waitForDidUpdateViewState to the DrawingAreaProxys, because behavior is very dependent on them.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers):
(WebKit::RemoteLayerTreeDrawingAreaProxy::waitForDidUpdateViewState):
Implement waitForDidUpdateViewState for the RemoteLayerTree; it waits for CommitLayerTree.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::updateViewState):
(WebKit::WebPageProxy::viewStateDidChange):
(WebKit::WebPageProxy::dispatchViewStateChange):
(WebKit::WebPageProxy::waitForDidUpdateViewState):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
(WebKit::WebPageProxy::viewSize): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::didUpdateViewState):
* UIProcess/API/mac/WKView.mm:
(-[WKView endDeferringViewInWindowChangesSync]):
Always waitForDidUpdateViewState when a page that was previously in-window but currently isn't comes back in-window.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::viewStateDidChange):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setViewState):
(WebKit::WebPage::didUpdateViewStateTimerFired): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
(WebKit::RemoteLayerTreeDrawingArea::viewStateDidChange):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::viewStateDidChange):
(WebKit::TiledCoreAnimationDrawingArea::didUpdateViewStateTimerFired):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::didUpdateViewStateTimerFired): Deleted.
Delegate sending of didUpdateViewState to the DrawingAreas (RemoteLayerTreeDrawingArea won't send it,
because the UI process waits for CommitLayerTree instead).
2014-06-23 Timothy Horton <timothy_horton@apple.com>
[iOS][wk2] Ensure that layers are marked volatile before allowing the process to suspend
https://bugs.webkit.org/show_bug.cgi?id=134004
<rdar://problem/17186342>
Reviewed by Simon Fraser.
WebKit tries to make layers volatile when unparented, but sometimes isn't given
a chance to do so before the process gets suspended, so we end up with lots of
non-volatile surfaces that should really be volatile.
* Shared/mac/RemoteLayerBackingStoreCollection.h:
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatileImmediately):
(WebKit::RemoteLayerBackingStoreCollection::markAllBackingStoreVolatileImmediatelyIfPossible):
Add markAllBackingStoreVolatileImmediatelyIfPossible, which tries to mark *all*
buffers of *all* backing store, (live and unreachable), (front, back, and secondary),
volatile right away. It returns false if any buffer isn't marked volatile (because it was in-use).
* UIProcess/ios/ProcessThrottler.h:
* UIProcess/ios/ProcessThrottler.mm:
(WebKit::ProcessThrottler::updateAssertion):
(WebKit::ProcessThrottler::processReadyToSuspend):
(WebKit::ProcessThrottler::didCancelProcessSuspension):
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::sendCancelProcessWillSuspend):
(WebKit::WebProcessProxy::didCancelProcessSuspension):
* UIProcess/WebProcessProxy.h:
* UIProcess/WebProcessProxy.messages.in:
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
If the UI process is waiting for the Web process to confirm that it can suspend
and something happens (the view is reparented) that cancels the suspension, inform
the Web process that this happened, so that it can cancel any cleanup that might still be taking place.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange):
If a view goes in-window, dispatch the view state change immediately without delay,
to minimize the latency between coming in-window and being ready to go.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::markLayersVolatileImmediatelyIfPossible):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
Schedule a flush when we change the root layer; otherwise, we can end up
detaching the root layer but changing nothing else, and never committing that change.
(WebKit::RemoteLayerTreeDrawingArea::markLayersVolatileImmediatelyIfPossible):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::processWillSuspend):
(WebKit::WebProcess::cancelProcessWillSuspend):
(WebKit::WebProcess::markAllLayersVolatileIfPossible):
(WebKit::WebProcess::processSuspensionCleanupTimerFired):
When the UI process is going to suspend the process, it sends us ProcessWillSuspend,
and defers the suspension until we send a ProcessReadyToSuspend back.
Delay ProcessReadyToSuspend until all layers in our process have been marked volatile.
We'll keep trying every 20ms until they're all volatile. For safety, the UI process will eventually
stop waiting for us, but the volatility change is usually applied successfully within the first
or second timer callback.
2014-06-23 Oliver Hunt <oliver@apple.com>
Ensure that we always use symlink free paths when specifying cache directories
https://bugs.webkit.org/show_bug.cgi?id=134206
Reviewed by Anders Carlsson.
Sandboxing will deny symlink based paths, so we use realpath to create extensions.
This leaves us in the position of an extension using a visually different path
from other parts of the process code. This patch simply makes sure that we always
use the realpath for cache directories, so making debugging easier and also ensuring
that we don't ever accidentally try to use a path with symlinks that will thus get
denied.
* Shared/SandboxExtension.h:
(WebKit::stringByResolvingSymlinksInPath):
* Shared/mac/SandboxExtensionMac.mm:
(WebKit::stringByResolvingSymlinksInPath):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::ensureNetworkProcess):
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultApplicationCacheDirectory):
(WebKit::WebContext::platformDefaultDiskCacheDirectory):
(WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory):
(WebKit::WebContext::platformDefaultIconDatabasePath):
(WebKit::WebContext::platformDefaultLocalStorageDirectory):
2014-06-23 Roger Fong <roger_fong@apple.com>
Unregister notification observer registered in r170156.
https://bugs.webkit.org/show_bug.cgi?id=134204.
Reviewed by Tim Horton.
* UIProcess/API/mac/WKView.mm:
(-[WKView dealloc]):
2014-06-23 Dan Bernstein <mitz@apple.com>
[Cocoa] No way to grant storage quotas for WebSQL
https://bugs.webkit.org/show_bug.cgi?id=134175
Reviewed by Anders Carlsson.
* Shared/WebSecurityOrigin.h:
(WebKit::WebSecurityOrigin::securityOrigin): Changed to return a non-const reference.
* UIProcess/API/APIUIClient.h:
(API::UIClient::exceededDatabaseQuota): Added a completion handler parameter than takes the
new quota, and changed the return type to void.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient): Changed the override of exceededDatabaseQuota to call the
completion handler with the new quota, or with the existing quota if the client doesn’t
implement the callback.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Declared new delegate method.
* UIProcess/API/Cocoa/_WKSecurityOrigin.h: Added.
* UIProcess/API/Cocoa/_WKSecurityOrigin.mm: Added.
(-[_WKSecurityOrigin _initWithSecurityOrigin:WebCore::]): Store the origin in an ivar.
(-[_WKSecurityOrigin protocol]): Added this accessor.
(-[_WKSecurityOrigin host]): Ditto.
(-[_WKSecurityOrigin port]): Ditto.
* UIProcess/API/Cocoa/_WKSecurityOriginInternal.h: Added.
* UIProcess/Cocoa/UIDelegate.h: Override API::UIClient::exceededDatabaseQuota. Added flag
to m_delegateMethods struct for new delegate method.
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate): Set new flag in m_delegateMethods struct.
(WebKit::UIDelegate::UIClient::exceededDatabaseQuota): Added. Calls the new delegate method.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::exceededDatabaseQuota): Updated for the new client interface: now
passing a completion handler that replies with the new quota.
* WebKit2.xcodeproj/project.pbxproj: Added references to new files, sorted a group.
2014-06-23 Simon Fraser <simon.fraser@apple.com>
More build fixing after r170295.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2014-06-23 Anders Carlsson <andersca@apple.com>
Give read-only properties proper ownership attributes
https://bugs.webkit.org/show_bug.cgi?id=134197
<rdar://problem/16830117>
Reviewed by Dan Bernstein.
Also, make WKFrameInfo conform to NSCopying since it's a data-only object and thus intended to be copied.
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKFrameInfo.mm:
(-[WKFrameInfo copyWithZone:]):
(-[WKFrameInfo setRequest:]): Deleted.
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction setSourceFrame:]):
(-[WKNavigationAction setTargetFrame:]):
* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKUserScript.h:
* UIProcess/API/Cocoa/WKWebView.h:
2014-06-23 Gwang Yoon Hwang <yoon@igalia.com>
Unreviewed, GTK build fix after r170274.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
Drawing::m_webPage changed to reference.
(WebKit::DrawingAreaImpl::DrawingAreaImpl):
(WebKit::DrawingAreaImpl::setNeedsDisplay):
(WebKit::DrawingAreaImpl::setNeedsDisplayInRect):
(WebKit::DrawingAreaImpl::forceRepaint):
(WebKit::DrawingAreaImpl::updatePreferences):
(WebKit::DrawingAreaImpl::layerHostDidFlushLayers):
(WebKit::DrawingAreaImpl::updateBackingStoreState):
(WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState):
(WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode):
(WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode):
(WebKit::DrawingAreaImpl::display):
* WebProcess/WebPage/DrawingAreaImpl.h:
2014-06-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
REGRESSION(r170163): It made everything crash on EFL
https://bugs.webkit.org/show_bug.cgi?id=134097
Unreviewed EFL layout test and perforamcne crash fix.
* WebProcess/WebPage/WebPage.cpp: Add a null check for m_mainFrame.
(WebKit::WebPage::didCompletePageTransition):
2014-06-22 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed EFL build fix since r170274. Use reference for m_webPage member variable.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::CoordinatedDrawingArea):
(WebKit::CoordinatedDrawingArea::setNeedsDisplay):
(WebKit::CoordinatedDrawingArea::setNeedsDisplayInRect):
(WebKit::CoordinatedDrawingArea::forceRepaint):
(WebKit::CoordinatedDrawingArea::updatePreferences):
(WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged):
(WebKit::CoordinatedDrawingArea::layerHostDidFlushLayers):
(WebKit::CoordinatedDrawingArea::updateBackingStoreState):
(WebKit::CoordinatedDrawingArea::sendDidUpdateBackingStoreState):
(WebKit::CoordinatedDrawingArea::suspendPainting):
(WebKit::CoordinatedDrawingArea::resumePainting):
(WebKit::CoordinatedDrawingArea::enterAcceleratedCompositingMode):
(WebKit::CoordinatedDrawingArea::display):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
2014-06-22 Tim Horton <timothy_horton@apple.com>
[iOS][wk2] Swiping back sometimes results in a missing (not blank) swipe snapshot
https://bugs.webkit.org/show_bug.cgi?id=134181
Reviewed by Benjamin Poulain.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::setRenderTreeSize):
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewGestureController.h:
Make it explicit that we should only remove the swipe snapshot when a
big-enough render tree size arrives *after the swipe ends*.
2014-06-22 Tim Horton <timothy_horton@apple.com>
Thread some references through the remote layer tree code
https://bugs.webkit.org/show_bug.cgi?id=134177
Reviewed by Zalan Bujtas.
A first pass at references for never-null things (first pass because I didn't touch the collections).
Things that aren't straightforward reference-threading:
* Shared/mac/RemoteLayerBackingStoreCollection.h:
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
Remove the unimplemented/nonexistant RemoteLayerBackingStoreCollection::create.
Make RemoteLayerBackingStoreCollection constructor not take a context, because m_context is never used.
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
Factor out grabbing the PlatformLayerID in a few places.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
Use WebPage::mainFrameView() instead of WebPage::corePage()->mainFrame().view().
* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
* WebProcess/WebPage/DrawingArea.cpp:
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.h:
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:om):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
* Shared/mac/RemoteLayerBackingStore.mm:
References.
2014-06-22 Anders Carlsson <andersca@apple.com>
Replace a couple of uses of bind with lambdas
https://bugs.webkit.org/show_bug.cgi?id=134172
Reviewed by Sam Weinig.
* Platform/IPC/Connection.cpp:
(IPC::Connection::postConnectionDidCloseOnConnectionWorkQueue):
(IPC::Connection::connectionDidClose):
(IPC::Connection::dispatchMessage):
(IPC::Connection::dispatchConnectionDidClose): Deleted.
* Platform/IPC/Connection.h:
* Shared/Plugins/NPObjectProxy.cpp:
(WebKit::NPObjectProxy::NP_Deallocate):
* UIProcess/Storage/LocalStorageDatabase.cpp:
(WebKit::LocalStorageDatabase::scheduleDatabaseUpdate):
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::pluginThreadAsyncCall):
(WebKit::NetscapePlugin::handlePluginThreadAsyncCall): Deleted.
* WebProcess/Plugins/Netscape/NetscapePlugin.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync):
(WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition):
2014-06-20 Simon Fraser <simon.fraser@apple.com>
Have scrollingTreeAsText() dump the non-fast-scrollable region
https://bugs.webkit.org/show_bug.cgi?id=134149
Reviewed by Sam Weinig.
Dump the non-fast-scrollable region (as an array of rects).
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingTreeTextStream::dump):
2014-06-22 Anders Carlsson <andersca@apple.com>
Add IPC decoding support to BackForwardListState
https://bugs.webkit.org/show_bug.cgi?id=134171
Reviewed by Dan Bernstein.
* Shared/SessionState.cpp:
(WebKit::isValidEnum):
(WebKit::HTTPBody::Element::decode):
(WebKit::HTTPBody::decode):
(WebKit::FrameState::decode):
(WebKit::PageState::decode):
(WebKit::BackForwardListState::decode):
* Shared/SessionState.h:
2014-06-22 Anders Carlsson <andersca@apple.com>
Address a review comment.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataDecoder::markInvalid):
(WebKit::decodeFormDataElement):
2014-06-21 Anders Carlsson <andersca@apple.com>
Implement the rest of back forward tree decoding
https://bugs.webkit.org/show_bug.cgi?id=134166
Reviewed by Sam Weinig.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataDecoder::operator>>):
(WebKit::decodeFormDataElement):
(WebKit::decodeFormData):
(WebKit::decodeBackForwardTreeNode):
2014-06-22 Dan Bernstein <mitz@apple.com>
[iOS] WKWebViewConfiguration.allowsInlineMediaPlayback has no effect
https://bugs.webkit.org/show_bug.cgi?id=134170
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Fixed a typo.
2014-06-21 Zan Dobersek <zdobersek@igalia.com>
Unreviewed. Fixing the GTK+ build after r170253.
* UIProcess/API/gtk/WebKitSettings.cpp:
(_WebKitSettingsPrivate::_WebKitSettingsPrivate): WebPreferences::create()
now takes an additional String argument.
2014-06-21 Dan Bernstein <mitz@apple.com>
CallbackMap::put should be able to take an unwrapped function
https://bugs.webkit.org/show_bug.cgi?id=134104
Reviewed by Anders Carlsson.
* UIProcess/GenericCallback.h:
(WebKit::CallbackMap::put): Added an overload that takes a function and creates and puts a
callback. Changed both overloads of put() to return the callback ID.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::validateCommand):
(WebKit::WebPageProxy::runJavaScriptInMainFrame):
(WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
(WebKit::WebPageProxy::getSourceForFrame):
(WebKit::WebPageProxy::getContentsAsString):
(WebKit::WebPageProxy::getBytecodeProfile):
(WebKit::WebPageProxy::getContentsAsMHTMLData):
(WebKit::WebPageProxy::getSelectionOrContentsAsString):
(WebKit::WebPageProxy::getSelectionAsWebArchiveData):
(WebKit::WebPageProxy::getMainResourceDataOfFrame):
(WebKit::WebPageProxy::getResourceDataFromFrame):
(WebKit::WebPageProxy::getWebArchiveOfFrame):
(WebKit::WebPageProxy::getMarkedRangeAsync):
(WebKit::WebPageProxy::getSelectedRangeAsync):
(WebKit::WebPageProxy::characterIndexForPointAsync):
(WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
(WebKit::WebPageProxy::takeSnapshot):
2014-06-21 Anders Carlsson <andersca@apple.com>
Make it possible to override debug preferences on a per-identifier basis as well as globally
https://bugs.webkit.org/show_bug.cgi?id=134164
Reviewed by Dan Bernstein.
* Shared/WebPreferencesDefinitions.h:
* Shared/WebPreferencesKeys.cpp:
* Shared/WebPreferencesKeys.h:
* Shared/WebPreferencesStore.cpp:
(WebKit::defaults):
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesCreate):
(WKPreferencesCreateWithIdentifier):
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences init]):
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::WebPageGroup):
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::create):
(WebKit::WebPreferences::createWithLegacyDefaults):
(WebKit::WebPreferences::WebPreferences):
* UIProcess/WebPreferences.h:
* UIProcess/mac/WebPreferencesMac.mm:
(WebKit::makeKey):
(WebKit::debugUserDefaultsValue):
(WebKit::setDebugBoolValueIfInUserDefaults):
(WebKit::WebPreferences::platformInitializeStore):
2014-06-21 Anders Carlsson <andersca@apple.com>
Begin work on decoding form data
https://bugs.webkit.org/show_bug.cgi?id=134163
Reviewed by Sam Weinig.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataDecoder::operator>>):
(WebKit::HistoryEntryDataDecoder::isValid):
(WebKit::isValidEnum):
(WebKit::decodeFormDataElement):
(WebKit::decodeFormData):
(WebKit::decodeBackForwardTreeNode):
2014-06-21 Anders Carlsson <andersca@apple.com>
Only initialize WebPreferences from NSUserDefaults if there's an identifier
https://bugs.webkit.org/show_bug.cgi?id=134162
Reviewed by Sam Weinig.
We don't want to allow changing preferences by registering user defaults.
* UIProcess/mac/WebPreferencesMac.mm:
(WebKit::makeKey):
(WebKit::WebPreferences::platformInitializeStore):
2014-06-21 Anders Carlsson <andersca@apple.com>
Begin work on decoding the back/forward tree
https://bugs.webkit.org/show_bug.cgi?id=134161
Reviewed by Sam Weinig.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntries):
(WebKit::HistoryEntryDataDecoder::operator>>):
(WebKit::HistoryEntryDataDecoder::decodeArithmeticType):
(WebKit::HistoryEntryDataDecoder::bufferIsLargeEnoughToContain):
(WebKit::decodeBackForwardTreeNode):
(WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntryData):
(WebKit::HistoryEntryDataDecoder::decode): Deleted.
2014-06-21 Brady Eidson <beidson@apple.com>
Gamepad API - Deprecate the existing implementation
https://bugs.webkit.org/show_bug.cgi?id=134108
Reviewed by Timothy Hatcher.
-Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
-Move some implementation files into a "deprecated" subdirectory.
* Configurations/FeatureDefines.xcconfig:
2014-06-20 Anders Carlsson <andersca@apple.com>
Implement more of HistoryEntryDataDecoder
https://bugs.webkit.org/show_bug.cgi?id=134146
Reviewed by Sam Weinig.
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::HistoryEntryDataDecoder::HistoryEntryDataDecoder):
(WebKit::HistoryEntryDataDecoder::operator>>):
(WebKit::HistoryEntryDataDecoder::decode):
(WebKit::HistoryEntryDataDecoder::decodeFixedLengthData):
(WebKit::HistoryEntryDataDecoder::alignBufferPosition):
(WebKit::HistoryEntryDataDecoder::alignedBuffer):
(WebKit::HistoryEntryDataDecoder::alignedBufferIsLargeEnoughToContain):
(WebKit::HistoryEntryDataDecoder::markInvalid):
(WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntryData):
2014-06-21 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r170244.
https://bugs.webkit.org/show_bug.cgi?id=134157
GTK/EFL bindings generator works differently, making this
patch not work there. Will fix entire patch after a rollout.
(Requested by bradee-oh on #webkit).
Reverted changeset:
"Gamepad API - Deprecate the existing implementation"
https://bugs.webkit.org/show_bug.cgi?id=134108
http://trac.webkit.org/changeset/170244
2014-06-21 Brady Eidson <beidson@apple.com>
Gamepad API - Deprecate the existing implementation
https://bugs.webkit.org/show_bug.cgi?id=134108
Reviewed by Timothy Hatcher.
-Add new "GAMEPAD_DEPRECATED" build flag, moving the existing implementation to use it
-Add the "Deprecated" suffix to some implementation files
* Configurations/FeatureDefines.xcconfig:
2014-06-21 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[CoordinatedGraphics][WK2][EFL] Page is moved to (0,0) position before rendering content
https://bugs.webkit.org/show_bug.cgi?id=133300
Reviewed by Csaba Osztrogonác.
When new page is loaded, PageViewportController::didCommitLoad() calls PageViewportController::syncVisibleContents()
with initial position via applyPositionAfterRenderingContents() before starting to render
new page by PageViewportController::didRenderFrame(). This call flow causes that webview shows
incomplete tiles to the user during a few milliseconds. To fix showing incomplete tiles during
the page loading, this patch adds a flag so that we don't show the incomplete tiles until showing
new page.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
* UIProcess/API/efl/EwkView.h:
(EwkView::setWaitingForNewPage):
(EwkView::waitingForNewPage):
* UIProcess/efl/PageLoadClientEfl.cpp:
(WebKit::PageLoadClientEfl::didCommitLoadForFrame):
* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::didChangeVisibleContents):
* UIProcess/efl/ViewClientEfl.cpp:
(WebKit::ViewClientEfl::didRenderFrame):
(WebKit::ViewClientEfl::didCompletePageTransition):
2014-06-21 Ryosuke Niwa <rniwa@webkit.org>
Commit queue has been failing due to a build failure in WKFoundation.h
https://bugs.webkit.org/show_bug.cgi?id=134152
Reviewed by Csaba Osztrogonác.
Landed by Brady Eidson.
The build failure was caused by WKFoundation.h erroneously redefining
NSURLSessionAuthChallengeDisposition even when building with 10.9 SDK.
The availability of this type depends on the version of SDK,
not the target operating system.
* Shared/API/Cocoa/WKFoundation.h:
2014-06-21 Eva Balazsfalvi <evab.u-szeged@partner.samsung.com>
Removing PAGE_VISIBILITY_API compile guard.
https://bugs.webkit.org/show_bug.cgi?id=133844
Reviewed by Gavin Barraclough.
* Configurations/FeatureDefines.xcconfig:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-06-20 Anders Carlsson <andersca@apple.com>
Implement more of LegacySessionStateDecoder
https://bugs.webkit.org/show_bug.cgi?id=134145
Reviewed by Sam Weinig.
* Shared/SessionState.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntry):
(WebKit::HistoryEntryDataDecoder::HistoryEntryDataDecoder):
(WebKit::HistoryEntryDataDecoder::finishDecoding):
(WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntryData):
* UIProcess/mac/LegacySessionStateCoding.h:
2014-06-20 Anders Carlsson <andersca@apple.com>
Implement more of LegacySessionStateDecoder
https://bugs.webkit.org/show_bug.cgi?id=134144
Reviewed by Sam Weinig.
* Shared/SessionState.cpp:
(WebKit::BackForwardListState::encode):
(WebKit::SessionState::encode): Deleted.
* Shared/SessionState.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::LegacySessionStateDecoder::decodeSessionState):
(WebKit::LegacySessionStateDecoder::decodeSessionHistory):
(WebKit::LegacySessionStateDecoder::decodeV0SessionHistory):
(WebKit::LegacySessionStateDecoder::decodeV1SessionHistory):
(WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntries):
(WebKit::LegacySessionStateDecoder::decodeSessionHistoryEntry):
* UIProcess/mac/LegacySessionStateCoding.h:
2014-06-20 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed. build fix for the cmake based ports since r170188
* CMakeLists.txt: Added LegacySessionState.cpp in source list.
2014-06-20 Dan Bernstein <mitz@apple.com>
[Cocoa] No way to get the main frame’s main resource’s data
https://bugs.webkit.org/show_bug.cgi?id=134113
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _getMainResourceDataWithCompletionHandler:]): Added. Calls
WebPageProxy::getMainResourceDataOfFrame and invokes the completion handler form the
callback.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared new method.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getMainResourceDataOfFrame): Made it safe to pass a NULL frame into
this function.
2014-06-20 Anders Carlsson <andersca@apple.com>
Introduce a WKSessionStateRef object
https://bugs.webkit.org/show_bug.cgi?id=134136
Reviewed by Tim Horton.
WKSessionStateRef is going to hold session state, making it possible to migrate state from one
webpage to another without having to do any serialization/deserialization.
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* Shared/SessionState.cpp:
(WebKit::SessionState::encode):
* Shared/SessionState.h:
* UIProcess/API/APISessionState.cpp: Added.
(API::SessionState::create):
(API::SessionState::SessionState):
(API::SessionState::~SessionState):
* UIProcess/API/APISessionState.h:
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKSessionStateRef.cpp:
(WKSessionStateCreateFromData):
* UIProcess/API/C/WKSessionStateRef.h:
* UIProcess/mac/LegacySessionStateCoding.cpp:
(WebKit::LegacySessionStateDecoder::LegacySessionStateDecoder):
(WebKit::LegacySessionStateDecoder::~LegacySessionStateDecoder):
(WebKit::LegacySessionStateDecoder::decodeSessionState):
* UIProcess/mac/LegacySessionStateCoding.h:
* WebKit2.xcodeproj/project.pbxproj:
2014-06-19 Enrica Casucci <enrica@apple.com>
iOS WebKit2: selection handles become too large when zooming a page.
https://bugs.webkit.org/show_bug.cgi?id=134084
<rdar://problem/16799164>
Reviewed by Benjamin Poulain.
Since the document view is zoomed, we add a subview that has the inverse transform
of the document view. This new view becomes the root for the selection hierarchy.
The new view has zero size, not to interfere with the existing gestures on the WKContenView
therefore we implement hitTest to detect interaction with the selection elements.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView unscaledView]):
(-[WKContentView inverseScale]):
(-[WKContentView _updateUnscaledView]):
(-[WKContentView hitTest:withEvent:::]):
(-[WKContentView selectedTextRange]):
2014-06-20 Timothy Horton <timothy_horton@apple.com>
Snapshotting WKThumbnailViews should not tell Web processes backing unparented WKViews that they're in window
https://bugs.webkit.org/show_bug.cgi?id=134134
<rdar://problem/17402119>
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setThumbnailView:]):
Re-evaluating our in-window state is only useful if we're going to use the live layer tree;
snapshots can be taken of unparented views with no trouble. Plus, doing so sets off a chain of
expensive things in the Web process which we can avoid if using snapshots.
2014-06-20 Timothy Horton <timothy_horton@apple.com>
WKThumbnailView should only use live layer trees before the snapshot arrives for parented WKViews
https://bugs.webkit.org/show_bug.cgi?id=134129
<rdar://problem/17401591>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView initWithFrame:fromWKView:]):
Add a white background to WKThumbnailView, so that if we have no snapshot and no layer tree,
the view isn't transparent.
* UIProcess/API/mac/WKView.mm:
(-[WKView _updateThumbnailViewLayer]):
We currently pull the live layer tree into the WKThumbnailView even in snapshot mode,
before the snapshot arrives, to avoid flashing when transitioning a live WKView to a thumbnail view.
This is, however, not useful for unparented WKViews, because their layer tree will be detached
and we'll flash anyway. So, only do that when the WKView is parented.
2014-06-20 Geoffrey Garen <ggaren@apple.com>
WebKit delegate methods should document their default behaviors
https://bugs.webkit.org/show_bug.cgi?id=134132
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
2014-06-20 Simon Fraser <simon.fraser@apple.com>
Fix lots of WK2 test crashes.
We don't always have a ScrollingCoordinator.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2014-06-20 Anders Carlsson <andersca@apple.com>
Always use XPC on iOS
https://bugs.webkit.org/show_bug.cgi?id=134130
Reviewed by Sam Weinig.
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::platformGetLaunchOptions):
(WebKit::shouldUseXPC): Deleted.
2014-06-20 Anders Carlsson <andersca@apple.com>
Fix build.
* Shared/SessionState.cpp:
2014-06-20 Anders Carlsson <andersca@apple.com>
Add ArgumentEncoder support to PageState and friends
https://bugs.webkit.org/show_bug.cgi?id=134128
Reviewed by Andreas Kling.
Change the classes to structs, get rid of the constructors/destructors
and add encode member functions.
* Shared/SessionState.cpp:
(WebKit::HTTPBody::Element::encode):
(WebKit::HTTPBody::encode):
(WebKit::FrameState::encode):
(WebKit::PageState::encode):
(WebKit::HTTPBody::Element::Element): Deleted.
(WebKit::HTTPBody::Element::~Element): Deleted.
(WebKit::FrameState::FrameState): Deleted.
(WebKit::FrameState::~FrameState): Deleted.
(WebKit::PageState::PageState): Deleted.
(WebKit::PageState::~PageState): Deleted.
* Shared/SessionState.h:
(WebKit::HTTPBody::Element::type): Deleted.
2014-06-20 Anders Carlsson <andersca@apple.com>
Add encoding and decoding support for WTF::Optional
https://bugs.webkit.org/show_bug.cgi?id=134125
Reviewed by Andreas Kling.
* Platform/IPC/ArgumentCoders.h:
(IPC::ArgumentCoder<WTF::Optional<T>>::encode):
(IPC::ArgumentCoder<WTF::Optional<T>>::decode):
2014-06-20 Anders Carlsson <andersca@apple.com>
Give NPAPI post requests a default content type
https://bugs.webkit.org/show_bug.cgi?id=134120
Reviewed by Andreas Kling.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::loadURL):
2014-06-20 Simon Fraser <simon.fraser@apple.com>
Always commit the scrolling tree when we flush layers
https://bugs.webkit.org/show_bug.cgi?id=134115
Reviewed by Beth Dakin.
The scrolling state tree contains bare pointers to GraphicsLayers, which get
converted to CALayers at commit time. To avoid a window of time where those
GraphicsLayer pointers go stale, commit the scrolling tree whenever we flush the
compositing layer tree.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
2014-06-19 Simon Fraser <simon.fraser@apple.com>
[iOS WebKit2] Make -webkit-overflow-scrolling:touch work in iframes (breaks MSWord previews)
https://bugs.webkit.org/show_bug.cgi?id=134085
<rdar://problem/16440586>
Reviewed by Tim Horton.
Add some debug-only assertions that check that the number of nodes we encoded is
the expected number.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::encode):
2014-06-19 Simon Fraser <simon.fraser@apple.com>
Handle scrolling tree modifications which remove intermediate nodes
https://bugs.webkit.org/show_bug.cgi?id=134082
Reviewed by Tim Horton.
When updating the scrolling tree from the state tree, we failed to maintain
the children arrays correctly. Fix by removing all children on scrolling nodes,
and allowing the calls on children to add them back. A temporary hash map
keeps the nodes alive.
The state tree's m_nodesRemovedSinceLastCommit was also made into a HashSet,
to make it easier to handle removal followed by re-insertion.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::RemoteScrollingTreeTextStream::dump):
2014-06-19 Simon Fraser <simon.fraser@apple.com>
Make ScrollingTreeNodes refounted, for easier tree reconfiguration
https://bugs.webkit.org/show_bug.cgi?id=134075
Reviewed by Tim Horton.
Make ScrollingTreeNode be ref-counted.
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createNode):
* UIProcess/Scrolling/RemoteScrollingTree.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::create):
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::createScrollingTreeNode):
2014-06-20 Dan Bernstein <mitz@apple.com>
[Cocoa] No way to get the MIME type of the main frame
https://bugs.webkit.org/show_bug.cgi?id=134111
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _MIMEType]): Added. Returns the MIME type of the main frame, or nil.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-06-20 Joseph Pecoraro <pecoraro@apple.com>
[iOS]: Overrelease of RetainPtr object in file upload
https://bugs.webkit.org/show_bug.cgi?id=134072
Reviewed by Brady Eidson.
This ivar is a RetainPtr, the release will be done automatically
for us when we assign to nil or destruct.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView fileUploadPanelDidDismiss:]):
2014-06-20 Anders Carlsson <andersca@apple.com>
Begin stubbing out new session state classes
https://bugs.webkit.org/show_bug.cgi?id=134110
Reviewed by Geoffrey Garen.
The basic idea is that these classes will replace the data blobs representing HistoryItems
that we currently send back and forth between the web and UI processes.
* Shared/SessionState.cpp: Added.
(WebKit::HTTPBody::Element::Element):
(WebKit::HTTPBody::Element::~Element):
(WebKit::FrameState::FrameState):
(WebKit::FrameState::~FrameState):
(WebKit::PageState::PageState):
(WebKit::PageState::~PageState):
* Shared/SessionState.h: Added.
(WebKit::HTTPBody::Element::type):
* WebKit2.xcodeproj/project.pbxproj:
2014-06-20 Anders Carlsson <andersca@apple.com>
Rename SessionState to LegacySessionState
https://bugs.webkit.org/show_bug.cgi?id=134107
Reviewed by Dan Bernstein.
* Shared/LegacySessionState.cpp: Renamed from Source/WebKit2/Shared/SessionState.cpp.
(IPC::ArgumentCoder<RefPtr<T>>::encode):
(IPC::ArgumentCoder<RefPtr<T>>::decode):
(WebKit::LegacySessionState::LegacySessionState):
(WebKit::LegacySessionState::isEmpty):
(WebKit::LegacySessionState::encode):
(WebKit::LegacySessionState::decode):
* Shared/LegacySessionState.h: Renamed from Source/WebKit2/Shared/SessionState.h.
(WebKit::LegacySessionState::list):
(WebKit::LegacySessionState::currentIndex):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::restoreSession):
(WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2014-06-20 Anders Carlsson <andersca@apple.com>
Document the underlying types of the WKWindowFeatures rect properties
https://bugs.webkit.org/show_bug.cgi?id=134103
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWindowFeatures.h:
2014-06-20 Zan Dobersek <zdobersek@igalia.com>
PluginProcessMainUnix should only scan for plugins when X11 plugin architecture is enabled
https://bugs.webkit.org/show_bug.cgi?id=134098
Reviewed by Carlos Garcia Campos.
* PluginProcess/unix/PluginProcessMainUnix.cpp: Guard the call to NetscapePluginModule::scanPlugin()
with PLUGIN_ARCHITECTURE(X11) since the declaration has the same build guard. In case the X11 plugin
architecture is not enabled the program exits with EXIT_FAILURE.
2014-06-20 Tim Horton <timothy_horton@apple.com>
LayerPool’d PlatformCALayerRemote/RemoteLayerBackingStore can have stale context pointers
https://bugs.webkit.org/show_bug.cgi?id=134050
<rdar://problem/17315114>
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
(WebKit::PlatformCALayerRemote::layerPool):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
(WebKit::RemoteLayerTreeContext::layerPool):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::buildTransaction):
Ensure that layers being committed are always in the context that is committing them.
Use a LayerPool per RemoteLayerTreeContext, to avoid moving layers between contexts.
2014-06-20 Tim Horton <timothy_horton@apple.com>
WKContentViewInteraction isn't cleaned up when the Web Content process crashes
https://bugs.webkit.org/show_bug.cgi?id=134080
<rdar://problem/17387652> and <rdar://problem/16848360>
Reviewed by Benjamin Poulain.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _processDidExit]):
Tear down WKContentViewInteraction when the process crashes.
(-[WKContentView _didRelaunchProcess]):
Set WKContentViewInteraction back up when the process is relaunched.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
Clear the SmartMagnificationController, which is a message receiver and thus must be re-created with the new page.
Remove all gesture recognizers from the content view.
Clear _fileUploadPanel, else we'll get an assert the next time we try to open one.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Give the PageClient a chance to clean up *before* we clean up internals;
it is at a higher level and some cleanup depends on WebPageProxy members
not having been cleared yet.
2014-06-19 Dan Bernstein <mitz@apple.com>
Removed unused SPI -[WKWebView _runJavaScriptInMainFrame:].
Rubber-stamped by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _runJavaScriptInMainFrame:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-06-19 Dan Bernstein <mitz@apple.com>
Use a single map for all callback types in WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=134069
Reviewed by Tim Horton.
* UIProcess/GenericCallback.h:
(WebKit::CallbackMap::take):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::printFinishedCallback):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::drawPagesForPrinting):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
(WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
2014-06-19 Anders Carlsson <andersca@apple.com>
Another build fix attempt.
* Shared/API/Cocoa/WKFoundation.h:
2014-06-19 Dan Bernstein <mitz@apple.com>
[iOS] Legacy processes are installed inside WebKit.framework
https://bugs.webkit.org/show_bug.cgi?id=134079
Reviewed by Anders Carlsson.
* Configurations/All.xcconfig: Exclude the legacy processes on iOS so they don’t get copied.
* Configurations/BaseLegacyProcess.xcconfig: Set SKIP_INSTALL to YES on iOS.
2014-06-19 Anders Carlsson <andersca@apple.com>
It's OS X, not OSX...
* Shared/API/Cocoa/WKFoundation.h:
2014-06-19 Antti Koivisto <antti@apple.com>
Unfreeze the layer tree on DidFirstVisuallyNonEmptyLayout
https://bugs.webkit.org/show_bug.cgi?id=134073
Reviewed by Simon Fraser.
DidFirstLayout is too early and we usually get a blank page. This doesn't match the existing iOS behavior either.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2014-06-19 Anders Carlsson <andersca@apple.com>
Try to fix the Mavericks build.
* Shared/API/Cocoa/WKFoundation.h:
2014-06-19 Sam Weinig <sam@webkit.org>
[Cocoa] Need SPI to determine if the WKWebView is displaying a standalone image
https://bugs.webkit.org/show_bug.cgi?id=134071
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isDisplayingStandaloneImageDocument]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-06-19 Dan Bernstein <mitz@apple.com>
Use a single map for all callback types in WebPageProxy
https://bugs.webkit.org/show_bug.cgi?id=134069
Reviewed by Anders Carlsson.
* UIProcess/GenericCallback.h:
(WebKit::CallbackBase::as): Added. Performs a dynamic cast to a specific callback type.
(WebKit::CallbackBase::CallbackBase): Added a type parameter, which is used to initialize
the new m_type member.
(WebKit::GenericCallback::GenericCallback): Pass the type to the base class constructor.
(WebKit::GenericCallback::type): Added. Returns a unique type.
(WebKit::GenericCallback::invalidate): Now virtual.
(WebKit::CallbackMap::put): Adds the callback to the map.
(WebKit::CallbackMap::take): Removes the callback from the map, and dynamically casts it to
the specified type.
(WebKit::CallbackMap::invalidate): Invalidates the map.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::validateCommand):
(WebKit::WebPageProxy::runJavaScriptInMainFrame):
(WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
(WebKit::WebPageProxy::getSourceForFrame):
(WebKit::WebPageProxy::getContentsAsString):
(WebKit::WebPageProxy::getBytecodeProfile):
(WebKit::WebPageProxy::getSelectionOrContentsAsString):
(WebKit::WebPageProxy::getSelectionAsWebArchiveData):
(WebKit::WebPageProxy::getMainResourceDataOfFrame):
(WebKit::WebPageProxy::getResourceDataFromFrame):
(WebKit::WebPageProxy::getWebArchiveOfFrame):
(WebKit::WebPageProxy::forceRepaint):
(WebKit::WebPageProxy::clearLoadDependentCallbacks):
(WebKit::WebPageProxy::voidCallback):
(WebKit::WebPageProxy::dataCallback):
(WebKit::WebPageProxy::imageCallback):
(WebKit::WebPageProxy::stringCallback):
(WebKit::WebPageProxy::scriptValueCallback):
(WebKit::WebPageProxy::computedPagesCallback):
(WebKit::WebPageProxy::validateCommandCallback):
(WebKit::WebPageProxy::unsignedCallback):
(WebKit::WebPageProxy::editingRangeCallback):
(WebKit::WebPageProxy::rectForCharacterRangeCallback):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::computePagesForPrinting):
(WebKit::WebPageProxy::drawRectToImage):
(WebKit::WebPageProxy::drawPagesToPDF):
(WebKit::WebPageProxy::getMarkedRangeAsync):
(WebKit::WebPageProxy::getSelectedRangeAsync):
(WebKit::WebPageProxy::characterIndexForPointAsync):
(WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
(WebKit::WebPageProxy::takeSnapshot):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::gestureCallback):
(WebKit::WebPageProxy::touchesCallback):
(WebKit::WebPageProxy::autocorrectionDataCallback):
(WebKit::WebPageProxy::dictationContextCallback):
(WebKit::WebPageProxy::autocorrectionContextCallback):
(WebKit::WebPageProxy::selectWithGesture):
(WebKit::WebPageProxy::updateSelectionWithTouches):
(WebKit::WebPageProxy::requestAutocorrectionData):
(WebKit::WebPageProxy::applyAutocorrection):
(WebKit::WebPageProxy::requestDictationContext):
(WebKit::WebPageProxy::requestAutocorrectionContext):
(WebKit::WebPageProxy::selectWithTwoTouches):
2014-06-19 Anders Carlsson <andersca@apple.com>
No way to handle HTTP Authentication with WKWebView
https://bugs.webkit.org/show_bug.cgi?id=134067
<rdar://problem/17317874>
Reviewed by Dan Bernstein.
Add a public webView:didReceiveAuthenticationChallenge:completionHandler: delegate method and get rid of the SPI.
* Shared/API/Cocoa/WKFoundation.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):
2014-06-18 Roger Fong <roger_fong@apple.com>
Don't kill the UIProcess until all local storage transactions have been committed.
https://bugs.webkit.org/show_bug.cgi?id=134042.
<rdar://problem/16660724>.
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm: Add a listener for the application will terminate notification.
(-[WKView _applicationWillTerminate:]):
(-[WKView initWithFrame:context:configuration:webView:]):
* UIProcess/WebContext.cpp: Calls code in StorageManager to cleanup local storage transactions upon application termination.
(WebKit::WebContext::applicationWillTerminate):
* UIProcess/WebContext.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::applicationWillTerminate):
Dispatch local storage cleanup task to background thread and make sure the UIProcess can't exit early.
* UIProcess/Storage/StorageManager.h:
2014-06-19 Oliver Hunt <oliver@apple.com>
Switch to using the process parameters during initialisation
to determine whether we hsould be using the network process.
RS=Sam Weinig
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-06-19 Pratik Solanki <psolanki@apple.com>
Copy SharedBuffer data into IPC message directly
https://bugs.webkit.org/show_bug.cgi?id=133920
Reviewed by Anders Carlsson.
When data array callbacks are enabled, we currently merge all the CFDataRefs in SharedBuffer
into one contiguous memory buffer when creating IPC::DataReference. This patch creates a
subclass of DataReference that uses SharedBuffer::getSomeData() to copy the data directly
into the IPC message.
* NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
(WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
* Platform/IPC/ArgumentEncoder.cpp:
(IPC::ArgumentEncoder::reserve): Added.
(IPC::ArgumentEncoder::grow):
* Platform/IPC/ArgumentEncoder.h:
* Platform/IPC/DataReference.cpp:
(IPC::SharedBufferDataReference::encode):
* Platform/IPC/DataReference.h:
(IPC::DataReference::~DataReference):
2014-06-18 Zan Dobersek <zdobersek@igalia.com>
Unreviewed. Fixing the GTK+ build after r170114.
* UIProcess/API/gtk/WebKitAuthenticationRequest.cpp:
(webkit_authentication_request_get_proposed_credential):
The core() accessor has been renamed to credential().
2014-06-18 Dan Bernstein <mitz@apple.com>
Try to fix the Mountain Lion build.
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame):
2014-06-18 Tim Horton <timothy_horton@apple.com>
Remove RemoteLayerBackingStore’s RemoteLayerTreeContext pointer
https://bugs.webkit.org/show_bug.cgi?id=134055
Reviewed by Simon Fraser.
* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::ensureBackingStore):
(WebKit::RemoteLayerBackingStore::display):
(WebKit::RemoteLayerBackingStore::drawInContext):
Remove RemoteLayerBackingStore's RemoteLayerTreeContext pointer. Instead, use the PlatformCALayer's.
Pass the PlatformCALayer in to the constructor, and remove it from ensureBackingStore();
RemoteLayerBackingStore is (for now) strictly tied to a single layer.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::ensureBackingStore):
(WebKit::PlatformCALayerRemote::updateBackingStore):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
(WebKit::PlatformCALayerRemote::context):
2014-06-18 Dan Bernstein <mitz@apple.com>
[Cocoa] Modernize one-method authentication
https://bugs.webkit.org/show_bug.cgi?id=134051
Reviewed by Anders Carlsson.
Instead of an NSURLConnection-style delegate method that takes a challenge and responds to
its sender, provide an NSURLSession-style method that takes a challenge and a completion
handler.
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method, replacing
old unused method.
* UIProcess/Cocoa/NavigationState.h: Renamed flag in m_navigationDelegateMethods struct.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Check for new delegate method and update
new flag.
(WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): If
the delegate implements the new method, return true (if it cannot handle the protection
space, it can reject it through the completion handler), except for server-trust
authentication, which is not supported yet.
(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): If the
delegate implements the new method, call it, passing a completion handler that calls the
right AuthenticationDecisionListener function based on its disposition and credential
parameters.
2014-06-18 Anders Carlsson <andersca@apple.com>
Make FrameLoadType a strongly typed enum
https://bugs.webkit.org/show_bug.cgi?id=134047
Reviewed by Andreas Kling.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didCommitLoadForFrame):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::goForward):
(WebKit::WebPage::goBack):
(WebKit::WebPage::goToBackForwardItem):
(WebKit::shouldReuseCommittedSandboxExtension):
(WebKit::WebPage::didCommitLoad):
2014-06-18 Anders Carlsson <andersca@apple.com>
Simplify WebSecurityOrigin
https://bugs.webkit.org/show_bug.cgi?id=134049
Reviewed by Andreas Kling.
* Shared/API/c/WKSecurityOrigin.cpp:
(WKSecurityOriginCreateFromString):
(WKSecurityOriginCreateFromDatabaseIdentifier):
(WKSecurityOriginCopyDatabaseIdentifier):
(WKSecurityOriginCopyToString):
(WKSecurityOriginCopyProtocol):
(WKSecurityOriginCopyHost):
(WKSecurityOriginGetPort):
* Shared/WebSecurityOrigin.h:
(WebKit::WebSecurityOrigin::securityOrigin):
(WebKit::WebSecurityOrigin::createFromDatabaseIdentifier): Deleted.
(WebKit::WebSecurityOrigin::protocol): Deleted.
(WebKit::WebSecurityOrigin::host): Deleted.
(WebKit::WebSecurityOrigin::port): Deleted.
(WebKit::WebSecurityOrigin::databaseIdentifier): Deleted.
(WebKit::WebSecurityOrigin::toString): Deleted.
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy):
(WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::deleteEntriesForOrigin):
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebApplicationCacheManagerProxy.cpp:
(WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin):
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::didGetDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::didGetDatabaseOrigins):
(WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin):
(WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin):
(WebKit::WebDatabaseManagerProxy::setQuotaForOrigin):
(WebKit::WebDatabaseManagerProxy::didModifyOrigin):
(WebKit::WebDatabaseManagerProxy::didModifyDatabase):
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::didGetStorageDetailsByOrigin):
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::deleteEntriesForOrigin):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::exceededDatabaseQuota):
(WebKit::WebPageProxy::requestGeolocationPermissionForFrame):
* UIProcess/WebResourceCacheManagerProxy.cpp:
(WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin):
* UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::exceededDatabaseQuota):
2014-06-18 Anders Carlsson <andersca@apple.com>
Add back WKPageRunJavaScriptInMainFrame_b for now
https://bugs.webkit.org/show_bug.cgi?id=134045
<rdar://problem/17368879>
Reviewed by Tim Horton.
Reverted changeset:
"Remove WKPageRunJavaScriptInMainFrame_b"
https://bugs.webkit.org/show_bug.cgi?id=133926
http://trac.webkit.org/changeset/169991
2014-06-18 Anders Carlsson <andersca@apple.com>
Simplify WebPageProxy::saveRecentSearches and WebPageProxy::loadRecentSearches
https://bugs.webkit.org/show_bug.cgi?id=134041
Reviewed by Andreas Kling.
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::saveRecentSearches):
(WebKit::WebPageProxy::loadRecentSearches):
2014-06-18 Simon Fraser <simon.fraser@apple.com>
Make ScrollingStateNodes refcounted, and other minor cleanup
https://bugs.webkit.org/show_bug.cgi?id=134040
Reviewed by Beth Dakin.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::encodeNodeAndDescendants):
2014-06-18 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] Do not add padding when magnifying replaced elements
https://bugs.webkit.org/show_bug.cgi?id=134019
Reviewed by Tim Horton.
Having margins for regular blocks make sense to improve readability. For replaced elements,
we should follow iOS's UI and display edge to edge.
* UIProcess/ios/SmartMagnificationController.mm:
(WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
2014-06-18 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Re-sync didCommitLoadForMainFrame with its corresponding tile update
https://bugs.webkit.org/show_bug.cgi?id=134009
Reviewed by Tim Horton.
WKWebView assumed the first _didCommitLayerTree: after _didCommitLoadForMainFrame
had the state of the page being loaded.
This is not always true. Sometimes, a set of tiles can be rendering asynchronously while the next
page is loaded, and does not flush the queue until after didCommitLoadForMainFrame is executed.
Tim introduced a transactionID with each layer tree update. This patch uses that to synchronize
WKWebView with the right set of tiles.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLoadForMainFrame]):
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _updateVisibleContentRects]):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
(WebKit::RemoteLayerTreeDrawingAreaProxy::nextLayerTreeTransactionID):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.messages.in:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::willCommitLayerTree):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2014-06-18 Anders Carlsson <andersca@apple.com>
Simplify WebCredential
https://bugs.webkit.org/show_bug.cgi?id=134036
Reviewed by Andreas Kling.
* UIProcess/API/C/WKCredential.cpp:
(WKCredentialCreate):
(WKCredentialCreateWithCertificateInfo):
(WKCredentialCopyUser):
* UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
(WebKit::AuthenticationChallengeProxy::useCredential):
* UIProcess/Authentication/WebCredential.cpp:
(WebKit::WebCredential::credential):
(WebKit::WebCredential::core): Deleted.
(WebKit::WebCredential::user): Deleted.
* UIProcess/Authentication/WebCredential.h:
(WebKit::WebCredential::create): Deleted.
2014-06-18 Anders Carlsson <andersca@apple.com>
Adopt modern C++11 loops and fix WebArchive creation functions
https://bugs.webkit.org/show_bug.cgi?id=134032
Reviewed by Andreas Kling.
* Shared/APIWebArchive.cpp:
(API::WebArchive::WebArchive):
2014-06-18 Anders Carlsson <andersca@apple.com>
Give WKWebView on iOS a mobile user agent
https://bugs.webkit.org/show_bug.cgi?id=134034
<rdar://problem/17346489>
Reviewed by Enrica Casucci.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
2014-06-18 Joseph Pecoraro <pecoraro@apple.com>
Remove stale include, header was removed in r170101.
Unreviewed build fix.
* Shared/API/Cocoa/WebKitPrivate.h:
2014-06-18 Anders Carlsson <andersca@apple.com>
Add CF type cast function templates and use them in KeyedDecoder in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=134033
Reviewed by Sam Weinig.
* Shared/cf/KeyedDecoder.cpp:
(WebKit::KeyedDecoder::KeyedDecoder):
(WebKit::KeyedDecoder::decodeBytes):
(WebKit::KeyedDecoder::decodeBool):
(WebKit::KeyedDecoder::decodeInt32):
(WebKit::KeyedDecoder::decodeInt64):
(WebKit::KeyedDecoder::decodeFloat):
(WebKit::KeyedDecoder::decodeDouble):
(WebKit::KeyedDecoder::decodeString):
(WebKit::KeyedDecoder::beginObject):
(WebKit::KeyedDecoder::beginArray):
(WebKit::KeyedDecoder::beginArrayElement):
2014-06-18 Dan Bernstein <mitz@apple.com>
Remove the unused _WKBackForwardListDidChangeNotification.
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKBackForwardList.mm:
* UIProcess/API/Cocoa/WKBackForwardListInternal.h:
* UIProcess/API/Cocoa/WKBackForwardListPrivate.h: Removed.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::didChangeBackForwardList): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2014-06-18 Andreas Kling <akling@apple.com>
Set main thread QoS policies after IPC initialization.
<https://webkit.org/b/134014>
Something was flipping the QoS level back to "unspecified" after
setting it in the ChildProcess initialization code. Pending a better
understanding of what really happens, move the code to a later stage,
after IPC channels are up and running. Now the priority sticks.
Reviewed by Anders Carlsson.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::initialize):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
2014-06-17 Dan Bernstein <mitz@apple.com>
[Cocoa] WKWebView's _privateBrowsingEnabled property is unused
https://bugs.webkit.org/show_bug.cgi?id=134013
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _privateBrowsingEnabled]): Deleted.
(-[WKWebView _setPrivateBrowsingEnabled:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-06-17 Tim Horton <timothy_horton@apple.com>
[iOS][wk2] Use ImageDocument to display subframe PDFs
https://bugs.webkit.org/show_bug.cgi?id=133944
<rdar://problem/17205983>
Reviewed by Dan Bates.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Always use ImageDocument for subframe PDFs in WebKit2 on iOS.
2014-06-17 Anders Carlsson <andersca@apple.com>
Make it possible to use -[NSBundle classNamed:] to find WebKitLegacy classes
https://bugs.webkit.org/show_bug.cgi?id=134008
<rdar://problem/17037600>
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/LegacyBundleForClass.mm: Added.
* WebKit2.xcodeproj/project.pbxproj:
2014-06-17 Anders Carlsson <andersca@apple.com>
Expose the location of website data
https://bugs.webkit.org/show_bug.cgi?id=134000
<rdar://problem/17350498>
Reviewed by Dan Bernstein.
Also, remove the bundle ID from the website data path for containerized apps.
* Shared/mac/SandboxUtilities.cpp:
(WebKit::processIsAppSandboxed):
* Shared/mac/SandboxUtilities.h:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(+[WKProcessPool _websiteDataURLForContainerWithURL:]):
(websiteDataDirectoryURL):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
2014-06-17 Jeremy Jones <jeremyj@apple.com>
Improve enter and exit fullscreen transition by using two step transition.
https://bugs.webkit.org/show_bug.cgi?id=133706
Reviewed by Simon Fraser.
Add setupFullscreen()/didSetupFullscreen() and cleanupFullscreen()/didCleanupFullscreen()
to the proxies. And refactor enter/exit fullscreen to do some of the work in setup/cleanup.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
Add four methods mentioned above.
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
Add Setup/Cleanup functions.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setupFullscreenWithID): does what enterFullscreen used to do.
(WebKit::WebVideoFullscreenManagerProxy::didCleanupFullscreen): forward IPC.
(WebKit::WebVideoFullscreenManagerProxy::didSetupFullscreen): forward IPC.
(WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID): changed to enterFullscreen
* WebProcess/ios/WebVideoFullscreenManager.h: Add didSetup/didCleanup
* WebProcess/ios/WebVideoFullscreenManager.messages.in: Add didSetup/didCleanup
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::enterFullscreenForNode): refactored,
some implementation moves to didSetupFullscreen.
(WebKit::WebVideoFullscreenManager::didSetupFullscreen):
Moves the video layer over to the hosted layer, and initiates fullscreen.
(WebKit::WebVideoFullscreenManager::didExitFullscreen): refactored,
some implementation moves to didCleanupFullscreen, and initiates cleanup.
(WebKit::WebVideoFullscreenManager::didCleanupFullscreen):
Final cleanup refactored from didExitFullscreen()
2014-06-17 Eric Carlson <eric.carlson@apple.com>
[iOS] enable background audio in WK2
https://bugs.webkit.org/show_bug.cgi?id=133996
Reviewed by Jer Noble.
* WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info-iOS.plist: Mark as
allowed to play audio when in the background.
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist: Ditto.
2014-06-17 Simon Fraser <simon.fraser@apple.com>
[UI-side compositing] fix reflections on composited layers
https://bugs.webkit.org/show_bug.cgi?id=133942
Reviewed by Tim Horton.
Fix reflections on composited layers. There are two main set of changes.
First, a PlatformCALayerRemote which is a clone has to track the layer
it is a clone of, so it knows where to grab the contents from in the UI process.
This layer may be told that its contents need updating out of order during
recursiveBuildTransaction(), so we need some small changes in RemoteLayerTreeContext
to allow a layer to add itself to the set of layers requiring commit.
In the UI process, a new step is added to RemoteLayerTreeHost::updateLayerTree()
to go through clones, and copy their contents from the origin layer.
The second set of changes makes platformCALayerLayerDidDisplay() work for
UI-side compositing by not taking a PlatformLayer*, but instead a PlatformCALayer*.
PlatformCALayer::setContentsChanged() changed to copyContentsFromLayer() so we know
what the origin layer is.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display): Remove the early return so we can always
call platformCALayerLayerDidDisplay().
* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::clone):
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
(WebKit::PlatformCALayerRemote::copyContentsFromLayer):
(WebKit::PlatformCALayerRemote::setClonedLayer):
(WebKit::PlatformCALayerRemote::setContentsChanged): Deleted.
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
(WebKit::PlatformCALayerRemote::properties):
(WebKit::PlatformCALayerRemote::context):
2014-06-17 Anders Carlsson <andersca@apple.com>
Remove session state methods from WKBrowsingContextController
https://bugs.webkit.org/show_bug.cgi?id=133995
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKBrowsingContextController.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController sessionState]): Deleted.
(-[WKBrowsingContextController restoreFromSessionState:]): Deleted.
2014-06-17 Brady Eidson <beidson@apple.com>
Only show telephone number highlights if only one number is selected
<rdar://problem/16874568> and https://bugs.webkit.org/show_bug.cgi?id=133989
Reviewed by Tim Horton.
Add a flag to TelephoneNumberData to remember if it was hovered over:
* WebProcess/WebPage/TelephoneNumberOverlayController.h:
(WebKit::TelephoneNumberData::hovered):
(WebKit::TelephoneNumberData::setHovered):
(WebKit::TelephoneNumberData::TelephoneNumberData):
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::TelephoneNumberOverlayController::drawRect): Only draw the highlight if one
phone number is selected.
(WebKit::TelephoneNumberOverlayController::mouseEvent): Update the hover state of the
current phone number, and setNeedsDisplay if the hover state changes.
(WebKit::TelephoneNumberOverlayController::clearHighlights):
2014-06-17 Tim Horton <timothy_horton@apple.com>
Remove WKContentView _setFindIndicator:fadeOut:animate:
https://bugs.webkit.org/show_bug.cgi?id=133976
Reviewed by Anders Carlsson.
Find indicators are totally internal to FindController on iOS,
we don't need to push them to the content view via PageClient,
so this code was unused.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setFindIndicator):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _setFindIndicator:WebKit::fadeOut:animate:]): Deleted.
2014-06-17 Andreas Kling <akling@apple.com>
Web process main thread priority is lower than some network process threads.
<https://webkit.org/b/133987>
<rdar://problem/17330300>
Mark the main thread as "user initiated" in process entry.
Reviewed by Maciej Stachowiak.
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::initialize):
2014-06-17 Anders Carlsson <andersca@apple.com>
Add SPI to get the NSURLRequest from a WKNavigationResponse
https://bugs.webkit.org/show_bug.cgi?id=133984
<rdar://problem/17006399>
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKNavigationResponse.mm:
(-[WKNavigationResponse _request]):
* UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
* UIProcess/API/Cocoa/WKNavigationResponsePrivate.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
2014-06-17 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL][WK2] Skip failing EFL API tests
https://bugs.webkit.org/show_bug.cgi?id=133981
Reviewed by Csaba Osztrogonác.
UserMessage, WillLoad and test_ewk2_view have been failed since r169784.
* PlatformEfl.cmake:
2014-06-17 Zan Dobersek <zdobersek@igalia.com>
Unreviewed build fix for the GTK+ port. Removing the *Callback::create() wrappings
for lambda callbacks that aren't required anymore after the changes in r170041.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_can_execute_editing_command):
(webkit_web_view_run_javascript):
(resourcesStreamReadCallback):
(webkit_web_view_save):
(webkit_web_view_save_to_file):
2014-06-16 Jaehun Lim <ljaehun.lim@samsung.com>
Unreviewed build fix when MHTML is enabled after r170041
* UIProcess/API/C/WKPage.cpp:
(WKPageGetContentsAsMHTMLData):
2014-06-16 Dan Bernstein <mitz@apple.com>
Part 2 of: Change GenericCallback<> function parameters into std::function<>
https://bugs.webkit.org/show_bug.cgi?id=133927
Reviewed by Sam Weinig.
* UIProcess/API/C/WKPage.cpp:
(WKPageRunJavaScriptInMainFrame):
(WKPageRenderTreeExternalRepresentation):
(WKPageGetSourceForFrame):
(WKPageGetContentsAsString):
(WKPageGetBytecodeProfile):
(WKPageGetSelectionAsWebArchiveData):
(WKPageValidateCommand):
* UIProcess/API/C/WKPluginSiteDataManager.cpp:
(WKPluginSiteDataManagerClearSiteData):
(WKPluginSiteDataManagerClearAllSiteData):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView evaluateJavaScript:completionHandler:]):
* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]):
(-[WKView startSpeaking:]):
(-[WKView selectedRangeWithCompletionHandler:]):
(-[WKView markedRangeWithCompletionHandler:]):
(-[WKView hasMarkedTextWithCompletionHandler:]):
(-[WKView firstRectForCharacterRange:completionHandler:]):
(-[WKView characterIndexForPoint:completionHandler:]):
* UIProcess/Plugins/WebPluginSiteDataManager.cpp:
(WebKit::WebPluginSiteDataManager::clearSiteData):
* UIProcess/Plugins/WebPluginSiteDataManager.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::validateCommand):
(WebKit::WebPageProxy::runJavaScriptInMainFrame):
(WebKit::WebPageProxy::getRenderTreeExternalRepresentation):
(WebKit::WebPageProxy::getSourceForFrame):
(WebKit::WebPageProxy::getContentsAsString):
(WebKit::WebPageProxy::getBytecodeProfile):
(WebKit::WebPageProxy::getContentsAsMHTMLData):
(WebKit::WebPageProxy::getSelectionOrContentsAsString):
(WebKit::WebPageProxy::getSelectionAsWebArchiveData):
(WebKit::WebPageProxy::getMarkedRangeAsync):
(WebKit::WebPageProxy::getSelectedRangeAsync):
(WebKit::WebPageProxy::characterIndexForPointAsync):
(WebKit::WebPageProxy::firstRectForCharacterRangeAsync):
(WebKit::WebPageProxy::takeSnapshot):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _define:]):
(-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView requestDictationContext:]):
(-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateSelectionWithTouches):
(WebKit::WebPageProxy::requestAutocorrectionData):
(WebKit::WebPageProxy::applyAutocorrection):
(WebKit::WebPageProxy::requestDictationContext):
(WebKit::WebPageProxy::requestAutocorrectionContext):
2014-06-16 Jaehun Lim <ljaehun.lim@samsung.com>
Unreviewed build fix after r170029
Use String() instead of AtomicString().
* UIProcess/InspectorServer/HTTPRequest.cpp:
(WebKit::HTTPRequest::parseHeaders):
2014-06-16 Brent Fulgham <bfulgham@apple.com>
[Win] Use TileController on Windows
https://bugs.webkit.org/show_bug.cgi?id=133895
Reviewed by Tim Horton.
* WebProcess/WebPage/mac/PlatformCALayerRemote.h: Remove
unneeded overload.
2014-06-16 Timothy Horton <timothy_horton@apple.com>
[iOS][wk2] Swipe snapshots are removed too quickly if there is no saved render tree size
https://bugs.webkit.org/show_bug.cgi?id=133891
Reviewed by Simon Fraser.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::setRenderTreeSize):
If we don't know the target render tree size, wait until the first layer tree commit
that comes in, instead of removing the snapshot when the gesture ends.
2014-06-16 Timothy Horton <timothy_horton@apple.com>
[iOS][wk2] Swiping back briefly shows the previous page before loading the new one
https://bugs.webkit.org/show_bug.cgi?id=133885
Reviewed by Simon Fraser.
Remove a race between the UI and Web processes when removing the swipe snapshot.
Previously, it was possible to get a commit from the Web process with layer content
(and render tree size) from the previous page *after* sending the navigation request
to the page, because of the asynchronicity of layer tree commits. This could cause
the snapshot to be removed early (if the previous fully-loaded page had a sufficiently
large render tree size), revealing the old tiles underneath the snapshot.
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::transactionID):
(WebKit::RemoteLayerTreeTransaction::setTransactionID):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::lastVisibleTransactionID):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
(WebKit::RemoteLayerTreeDrawingArea::didUpdate):
Keep track of an ever-increasing transaction ID in RemoteLayerTreeDrawingArea(Proxy).
It increments in the UI process at didUpdate time, because the Web process cannot
have started on a new layer tree commit until didUpdate is sent.
It increments in the Web process at commit time.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::endSwipeGesture):
(WebKit::ViewGestureController::setRenderTreeSize):
* UIProcess/mac/ViewGestureController.h:
Adopt transaction IDs; don't remove the snapshot until the commit
that includes the navigation arrives.
2014-06-16 Dan Bernstein <mitz@apple.com>
<rdar://problem/17327707> [Cocoa] Expose WebPreferences::storageBlockingPolicy
https://bugs.webkit.org/show_bug.cgi?id=133958
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKPreferences.mm:
(toStorageBlockingPolicy): Added this helper conversion function.
(toAPI): Ditto.
(-[WKPreferences _storageBlockingPolicy]): Added this getter.
(-[WKPreferences _setStorageBlockingPolicy:]): Added this setter.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h: Declared new _storageBlockingPolicy property
and _WKStorageBlockingPolicy enum.
2014-06-16 Anders Carlsson <andersca@apple.com>
Don't use AtomicString in HTTPHeaderMap
https://bugs.webkit.org/show_bug.cgi?id=133957
<rdar://problem/15256572>
Reviewed by Andreas Kling.
Update for WebCore changes.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<HTTPHeaderMap>::decode):
2014-06-15 Anders Carlsson <andersca@apple.com>
Change ResourceRequestBase::addHTTPHeaderFields to setHTTPHeaderFields instead
https://bugs.webkit.org/show_bug.cgi?id=133925
Reviewed by Sam Weinig.
* PluginProcess/PluginControllerProxy.h:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceRequest>::decode):
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::NPN_PostURL):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::loadURL):
* WebProcess/Plugins/PluginView.h:
2014-06-16 Anders Carlsson <andersca@apple.com>
Add HTTPHeaderName overloads on ResourceResponseBase
https://bugs.webkit.org/show_bug.cgi?id=133946
Reviewed by Andreas Kling.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::buildHTTPHeaders):
2014-06-16 Dan Bernstein <mitz@apple.com>
Fixed a typo in the last change.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences init]):
2014-06-16 Dan Bernstein <mitz@apple.com>
[Cocoa] Remove WKPreferences persistence in user defaults
https://bugs.webkit.org/show_bug.cgi?id=133945
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKPreferences.h: Removed userDefaultsKeyPrefix property and
initializer with userDefaultsKeyPrefix parameter.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences init]): Changed to initialize an instance with an empty identifier, which
means that it won’t persist to user defaults.
(-[WKPreferences initWithUserDefaultsKeyPrefix:]): Deleted.
(-[WKPreferences userDefaultsKeyPrefix]): Deleted.
2014-06-16 Zan Dobersek <zdobersek@igalia.com>
Page::findStringMatchingRanges() should take Vector<RefPtr<Range>> by reference instead of pointer
https://bugs.webkit.org/show_bug.cgi?id=133677
Reviewed by Anders Carlsson.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findString): Update the call to Page::findStringMatchingRanges() to pass
in a Vector<RefPtr<Range>> reference instead of a pointer.
(WebKit::FindController::findStringMatches): Ditto.
2014-06-16 Zan Dobersek <zdobersek@igalia.com>
Unreviewed build fixes for the EFL and GTK+ ports after r169994 and 170000.
* UIProcess/API/C/WKPluginSiteDataManager.cpp: Undefine the None macro under X11.
* UIProcess/API/gtk/WebKitCookieManager.cpp:
(webkit_cookie_manager_get_accept_policy): Remove unnecessary ::create() wrappings.
(webkit_cookie_manager_get_domains_with_cookies): Ditto.
* UIProcess/API/gtk/WebKitWebResource.cpp:
(webkit_web_resource_get_data): Ditto.
2014-06-15 Dan Bernstein <mitz@apple.com>
Part 1 of: Change GenericCallback<> function parameters into std::function<>
https://bugs.webkit.org/show_bug.cgi?id=133927
Reviewed by Sam Weinig.
* UIProcess/API/C/WKApplicationCacheManager.cpp:
(WKApplicationCacheManagerGetApplicationCacheOrigins):
* UIProcess/API/C/WKContext.cpp:
(WKContextGetStatistics):
(WKContextGetStatisticsWithOptions):
* UIProcess/API/C/WKCookieManager.cpp:
(WKCookieManagerGetHostnamesWithCookies):
(WKCookieManagerGetHTTPCookieAcceptPolicy):
* UIProcess/API/C/WKDatabaseManager.cpp:
(WKDatabaseManagerGetDatabasesByOrigin):
(WKDatabaseManagerGetDatabaseOrigins):
* UIProcess/API/C/WKFrame.cpp:
(WKFrameGetMainResourceData):
(WKFrameGetResourceData):
(WKFrameGetWebArchive):
* UIProcess/API/C/WKKeyValueStorageManager.cpp:
(WKKeyValueStorageManagerGetKeyValueStorageOrigins):
(WKKeyValueStorageManagerGetStorageDetailsByOrigin):
* UIProcess/API/C/WKMediaCacheManager.cpp:
(WKMediaCacheManagerGetHostnamesWithMediaCache):
* UIProcess/API/C/WKOriginDataManager.cpp:
(WKOriginDataManagerGetOrigins):
* UIProcess/API/C/WKPluginSiteDataManager.cpp:
(WKPluginSiteDataManagerGetSitesWithData):
* UIProcess/API/C/WKResourceCacheManager.cpp:
(WKResourceCacheManagerGetCacheOrigins):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _getWebArchiveDataWithCompletionHandler:]):
* UIProcess/API/mac/WKView.mm:
(-[WKView attributedSubstringForProposedRange:completionHandler:]):
* UIProcess/Plugins/WebPluginSiteDataManager.cpp:
(WebKit::WebPluginSiteDataManager::getSitesWithData):
* UIProcess/Plugins/WebPluginSiteDataManager.h:
* UIProcess/WebApplicationCacheManagerProxy.cpp:
(WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins):
* UIProcess/WebApplicationCacheManagerProxy.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::getStatistics):
* UIProcess/WebContext.h:
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::getHostnamesWithCookies):
(WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy):
* UIProcess/WebCookieManagerProxy.h:
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin):
(WebKit::WebDatabaseManagerProxy::getDatabaseOrigins):
* UIProcess/WebDatabaseManagerProxy.h:
* UIProcess/WebFrameProxy.cpp:
(WebKit::WebFrameProxy::getWebArchive):
(WebKit::WebFrameProxy::getMainResourceData):
(WebKit::WebFrameProxy::getResourceData):
* UIProcess/WebFrameProxy.h:
* UIProcess/WebKeyValueStorageManager.cpp:
(WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins):
(WebKit::WebKeyValueStorageManager::getStorageDetailsByOrigin):
* UIProcess/WebKeyValueStorageManager.h:
* UIProcess/WebMediaCacheManagerProxy.cpp:
(WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache):
* UIProcess/WebMediaCacheManagerProxy.h:
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::getOrigins):
* UIProcess/WebOriginDataManagerProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::getMainResourceDataOfFrame):
(WebKit::WebPageProxy::getResourceDataFromFrame):
(WebKit::WebPageProxy::getWebArchiveOfFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebResourceCacheManagerProxy.cpp:
(WebKit::WebResourceCacheManagerProxy::getCacheOrigins):
* UIProcess/WebResourceCacheManagerProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
(-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::selectWithGesture):
(WebKit::WebPageProxy::selectWithTwoTouches):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
2014-06-15 Dan Bernstein <mitz@apple.com>
<rdar://problem/17291697> [Cocoa] Can’t tell at policy decision time whether WebKit can handle the request
https://bugs.webkit.org/show_bug.cgi?id=133930
Reviewed by Sam Weinig.
* Shared/NavigationActionData.cpp:
(WebKit::NavigationActionData::NavigationActionData): Initialize new member canHandleRequest
to false.
(WebKit::NavigationActionData::encode): Encode canHandleRequest.
(WebKit::NavigationActionData::decode): Decode it.
* Shared/NavigationActionData.h: Declared new boolean member canHandleRequest.
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction _initWithNavigationActionData:]): Set new ivar _canHandleRequest from
the action data.
(-[WKNavigationAction _canHandleRequest]): Added this getter.
* UIProcess/API/Cocoa/WKNavigationActionPrivate.h: Declared new property _canHandleRequest.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow): Set canHandleRequest in the NavigationActionData.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
2014-06-15 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Change ewk_view_settings_get to ewk_page_group_settings_get
https://bugs.webkit.org/show_bug.cgi?id=133841
Reviewed by Gyuyoung Kim.
Ewk_Settings object is a member of Ewk_Page_Group.
So, Ewk_Page_Group is better place for the getter of Ewk_Settings.
* UIProcess/API/efl/ewk_page_group.cpp:
(ewk_page_group_settings_get): Added instead of ewk_view_settings_get.
* UIProcess/API/efl/ewk_page_group.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_settings_get): Deleted.
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_page_group.cpp:
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_settings.cpp:
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F): Deleted.
2014-06-15 Anders Carlsson <andersca@apple.com>
Add an autorelease() member function to RetainPtr
https://bugs.webkit.org/show_bug.cgi?id=133929
Reviewed by Dan Bernstein.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm:
(-[_WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView navigationDelegate]):
(-[WKWebView UIDelegate]):
(-[WKWebView loadRequest:]):
(-[WKWebView loadHTMLString:baseURL:]):
(-[WKWebView goToBackForwardListItem:]):
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView _historyDelegate]):
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::animationValueFromKeyframeValue):
2014-06-15 Dan Bernstein <mitz@apple.com>
Get rid of VoidAPICallback
https://bugs.webkit.org/show_bug.cgi?id=133928
Reviewed by Sam Weinig.
* UIProcess/API/C/WKPage.cpp:
(WKPageForceRepaint): Wrap the API callback in a generic callback here.
* UIProcess/API/C/WKPluginSiteDataManager.cpp:
(WKPluginSiteDataManagerClearSiteData): Ditto.
(WKPluginSiteDataManagerClearAllSiteData): Ditto.
* UIProcess/GenericCallback.h:
(WebKit::GenericCallback::performCallback): Added this helper for 0-argument callbacks.
(WebKit::VoidCallback::create): Deleted.
(WebKit::VoidCallback::~VoidCallback): Deleted.
(WebKit::VoidCallback::performCallback): Deleted.
(WebKit::VoidCallback::invalidate): Deleted.
(WebKit::VoidCallback::VoidCallback): Deleted.
(WebKit::VoidAPICallback::create): Deleted.
* UIProcess/mac/WKFullScreenWindowController.h:
2014-06-15 Zan Dobersek <zdobersek@igalia.com>
Unreviewed build fix for the GTK+ port after r169990.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetState): Pass the error value to
the rest of invalidateCallbackMap calls.
2014-06-15 Anders Carlsson <andersca@apple.com>
Remove WKPageRunJavaScriptInMainFrame_b
https://bugs.webkit.org/show_bug.cgi?id=133926
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKPage.cpp:
(callRunJavaScriptBlockAndRelease): Deleted.
(WKPageRunJavaScriptInMainFrame_b): Deleted.
* UIProcess/API/C/WKPage.h:
2014-06-15 Anders Carlsson <andersca@apple.com>
invalidateCallbackMap doesn’t pass the error parameter on to invalidate(), so script completion handler is passed the wrong error
https://bugs.webkit.org/show_bug.cgi?id=133921
<rdar://problem/17316653>
Reviewed by Dan Bernstein.
* UIProcess/GenericCallback.h:
(WebKit::VoidCallback::performCallback):
(WebKit::VoidCallback::invalidate):
(WebKit::VoidAPICallback::create):
(WebKit::invalidateCallbackMap):
* UIProcess/Plugins/WebPluginSiteDataManager.cpp:
(WebKit::WebPluginSiteDataManager::invalidate):
(WebKit::WebPluginSiteDataManager::clearSiteData):
* UIProcess/WebApplicationCacheManagerProxy.cpp:
(WebKit::WebApplicationCacheManagerProxy::contextDestroyed):
(WebKit::WebApplicationCacheManagerProxy::processDidClose):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::~WebContext):
* UIProcess/WebCookieManagerProxy.cpp:
(WebKit::WebCookieManagerProxy::contextDestroyed):
(WebKit::WebCookieManagerProxy::processDidClose):
* UIProcess/WebDatabaseManagerProxy.cpp:
(WebKit::WebDatabaseManagerProxy::contextDestroyed):
(WebKit::WebDatabaseManagerProxy::processDidClose):
* UIProcess/WebMediaCacheManagerProxy.cpp:
(WebKit::WebMediaCacheManagerProxy::contextDestroyed):
(WebKit::WebMediaCacheManagerProxy::processDidClose):
* UIProcess/WebOriginDataManagerProxy.cpp:
(WebKit::WebOriginDataManagerProxy::contextDestroyed):
(WebKit::WebOriginDataManagerProxy::processDidClose):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::forceRepaint):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebResourceCacheManagerProxy.cpp:
(WebKit::WebResourceCacheManagerProxy::contextDestroyed):
(WebKit::WebResourceCacheManagerProxy::processDidClose):
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController dealloc]):
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
2014-06-15 Zan Dobersek <zdobersek@igalia.com>
Unreviewed build fix for the GTK+ port after r169987.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_can_execute_editing_command): The first passed-in parameter
is now a reference to a const String object.
2014-06-14 Dan Bernstein <mitz@apple.com>
Replace StringImpl* callback parameters with const String&
https://bugs.webkit.org/show_bug.cgi?id=133922
Reviewed by Sam Weinig.
* UIProcess/API/C/WKPage.cpp:
(toGenericCallbackFunction): Added this helper function to wrap a WKStringRef-returning
API callback in a generic const String&-returning callback.
(WKPageRenderTreeExternalRepresentation):
(WKPageGetSourceForFrame):
(WKPageGetContentsAsString):
(WKPageGetBytecodeProfile):
(WKPageValidateCommand):
* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]):
(-[WKView startSpeaking:]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _define:]):
(-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
2014-06-14 Dan Bernstein <mitz@apple.com>
Additional iOS build fix.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _define:]):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
(-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
(-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
(-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
2014-06-14 Dan Bernstein <mitz@apple.com>
iOS build fix.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
2014-06-14 Dan Bernstein <mitz@apple.com>
Get rid of GenericAPICallback
https://bugs.webkit.org/show_bug.cgi?id=133909
Reviewed by Sam Weinig.
In preparation for passing callbacks as functions, replace GenericAPICallback::create, which
returned a GenericCallback, with a function template that returns an appropriate callback
function.
* UIProcess/API/C/WKApplicationCacheManager.cpp:
(WKApplicationCacheManagerGetApplicationCacheOrigins):
* UIProcess/API/C/WKContext.cpp:
(WKContextGetStatistics):
(WKContextGetStatisticsWithOptions):
* UIProcess/API/C/WKCookieManager.cpp:
(WKCookieManagerGetHostnamesWithCookies):
(WKCookieManagerGetHTTPCookieAcceptPolicy):
* UIProcess/API/C/WKDatabaseManager.cpp:
(WKDatabaseManagerGetDatabasesByOrigin):
(WKDatabaseManagerGetDatabaseOrigins):
* UIProcess/API/C/WKFrame.cpp:
(WKFrameGetMainResourceData):
(WKFrameGetResourceData):
(WKFrameGetWebArchive):
* UIProcess/API/C/WKKeyValueStorageManager.cpp:
(WKKeyValueStorageManagerGetKeyValueStorageOrigins):
(WKKeyValueStorageManagerGetStorageDetailsByOrigin):
* UIProcess/API/C/WKMediaCacheManager.cpp:
(WKMediaCacheManagerGetHostnamesWithMediaCache):
* UIProcess/API/C/WKOriginDataManager.cpp:
(WKOriginDataManagerGetOrigins):
* UIProcess/API/C/WKPage.cpp:
(WKPageRunJavaScriptInMainFrame):
(WKPageRenderTreeExternalRepresentation):
(WKPageGetSourceForFrame):
(WKPageGetContentsAsString):
(WKPageGetBytecodeProfile):
(WKPageGetSelectionAsWebArchiveData):
(WKPageGetContentsAsMHTMLData):
(WKPageDrawPagesToPDF):
* UIProcess/API/C/WKPluginSiteDataManager.cpp:
(WKPluginSiteDataManagerGetSitesWithData):
* UIProcess/API/C/WKResourceCacheManager.cpp:
(WKResourceCacheManagerGetCacheOrigins):
* UIProcess/GenericCallback.h:
(WebKit::toGenericCallbackFunction): Added. Given a C SPI callback function, returns a generic
callback function that wraps it.
2014-06-14 Dan Bernstein <mitz@apple.com>
Reverted the last change, which broken the Mac build.
* UIProcess/GenericCallback.h:
(WebKit::invalidateCallbackMap):
2014-06-14 Dan Bernstein <mitz@apple.com>
Tried to fix the GTK build.
* UIProcess/GenericCallback.h:
(WebKit::invalidateCallbackMap):
2014-06-14 Anders Carlsson <andersca@apple.com>
Fix build.
* UIProcess/API/mac/WKView.mm:
(-[WKView selectedRangeWithCompletionHandler:]):
(-[WKView markedRangeWithCompletionHandler:]):
(-[WKView hasMarkedTextWithCompletionHandler:]):
(-[WKView attributedSubstringForProposedRange:completionHandler:]):
(-[WKView firstRectForCharacterRange:completionHandler:]):
(-[WKView characterIndexForPoint:completionHandler:]):
2014-06-14 Zan Dobersek <zdobersek@igalia.com>
Unreviewed build fix for the GTK+ port.
Fixing the callback lambda parameters after r169962.
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
(webkitPrintOperationPrintPagesForFrame):
* UIProcess/API/gtk/WebKitWebResource.cpp:
(webkit_web_resource_get_data):
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_can_execute_editing_command):
(webkit_web_view_run_javascript):
(resourcesStreamReadCallback):
(webkit_web_view_save):
(webkit_web_view_save_to_file):
2014-06-14 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r169943 and r169946, use the format of set/get.
* UIProcess/InspectorServer/WebInspectorServer.cpp:
(WebKit::WebInspectorServer::didReceiveUnrecognizedHTTPRequest):
* UIProcess/InspectorServer/WebSocketServerConnection.cpp:
(WebKit::WebSocketServerConnection::readHTTPMessage):
(WebKit::WebSocketServerConnection::upgradeToWebSocketServerConnection):
2014-06-13 Andreas Kling <akling@apple.com>
REGRESSION (r167635): Reference leak in NetworkResourceLoader while loads are being deferred.
<https://webkit.org/b/133894>
<rdar://problem/17312299>
Don't self-ref() in start() until we actually start; if page loads are being
deferred, start() will be called again once deferral stops.
This was causing us to leak the entire NetworkResourceLoader object graph.
Reviewed by Brady Eidson.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
2014-06-13 Dan Bernstein <mitz@apple.com>
Make GenericCallback variadic
https://bugs.webkit.org/show_bug.cgi?id=133897
Reviewed by Sam Weinig.
Also eliminated legacy callback functions and all CallbackBase derived classes outside of
GenericCallback.h.
* UIProcess/API/C/WKPage.cpp:
(WKPageValidateCommand): Changed legacy callback (with leading bool parameter) into modern
callback (with trailing error parameter).
(WKPageComputePagesForPrinting): Ditto.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _getWebArchiveDataWithCompletionHandler:]): Ditto.
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]): Ditto.
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView _requestSnapshotIfNeeded]): Ditto.
* UIProcess/API/mac/WKView.mm:
(-[WKView validateUserInterfaceItem:]): Ditto.
(-[WKView startSpeaking:]): Ditto.
* UIProcess/AutoCorrectionCallback.h: Replaced CallbackBase derived classes with
GenericCallback specializations.
* UIProcess/GenericCallback.h:
- Made GenericCallback variadic:
(WebKit::GenericCallback::performCallbackWithReturnValue):
(WebKit::GenericCallback::invalidate):
(WebKit::GenericAPICallback::create):
- Replaced CallbackBase derived classes with GenericCallback specializations:
(WebKit::GenericCallback::create): Deleted.
(WebKit::ComputedPagesCallback::create): Deleted.
(WebKit::ComputedPagesCallback::~ComputedPagesCallback): Deleted.
(WebKit::ComputedPagesCallback::performCallbackWithReturnValue): Deleted.
(WebKit::ComputedPagesCallback::invalidate): Deleted.
(WebKit::ComputedPagesCallback::ComputedPagesCallback): Deleted.
(WebKit::ImageCallback::create): Deleted.
(WebKit::ImageCallback::~ImageCallback): Deleted.
(WebKit::ImageCallback::performCallbackWithReturnValue): Deleted.
(WebKit::ImageCallback::invalidate): Deleted.
(WebKit::ImageCallback::ImageCallback): Deleted.
* UIProcess/WebPageProxy.h: Replaced CallbackBase derived classes with GenericCallback
specializations.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]): Changed
legacy callback (with leading bool parameter) into modern callback (with trailing error
parameter).
(-[WKContentView requestDictationContext:]): Ditto.
(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]): Ditto.
* UIProcess/mac/WKPrintingView.mm:
(-[WKPrintingView _preparePDFDataForPrintingOnSecondaryThread]): Ditto.
(-[WKPrintingView _askPageToComputePageRects]): Ditto.
(-[WKPrintingView _drawPreview:]): Ditto.
2014-06-13 Tim Horton <timothy_horton@apple.com>
Unreviewed; fix the build.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext):
2014-06-13 Martin Hock <mhock@apple.com>
Clean up layers in RemoteLayerTreeHost::clearLayers().
https://bugs.webkit.org/show_bug.cgi?id=133888
Reviewed by Tim Horton.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::clearLayers):
2014-06-13 Anders Carlsson <andersca@apple.com>
Add a HTTPHeaderMap::get overload that takes an HTTPHeaderName
https://bugs.webkit.org/show_bug.cgi?id=133877
Reviewed by Andreas Kling.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::parsePostBuffer):
2014-06-13 Dan Bernstein <mitz@apple.com>
[iOS] Networking process always decodes keys
https://bugs.webkit.org/show_bug.cgi?id=133863
Reviewed by Anders Carlsson.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializer): Call checkEntitlements on iOS, too.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::checkEntitlements): On iOS, allow decoding keys
if the application has the appropriate keychain access group.
* Shared/cf/ArgumentCodersCF.cpp:
(IPC::setAllowsDecodingSecKeyRef): Added. Sets static bool.
(IPC::decode): Check the secKeyRefDecodingAllowed bool before decoding a key.
* Shared/cf/ArgumentCodersCF.h:
2014-06-12 Anders Carlsson <andersca@apple.com>
Add overloads of HTTPHeaderMap::find and remove that take enums
https://bugs.webkit.org/show_bug.cgi?id=133823
Reviewed by Sam Weinig.
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::parsePostBuffer):
Update for WebCore changes.
2014-06-12 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Do not update the viewport configuration on load until the first viewport arguments is received
https://bugs.webkit.org/show_bug.cgi?id=133719
<rdar://problem/17008149>
Reviewed by Simon Fraser.
When pages are loaded from the page cache, we were updating the viewport to the initial values
in WebPage::dynamicViewportSizeUpdate(), then update the viewport again when the page's viewport argument
are received.
The problem is that was messing up with text autosizing. The page would relayout with the default viewport
configuration, adopt the text autosizing parameters from that size, then remain in that state when
the actual viewport configuration would be set.
With this patch, the viewport configuration is updated from the values in WebCore instead of with default values.
For new documents, this is strictly equivalent. For documents coming from the page cache, the values are from
the previous state of the page, which ensure we do not restart negotiating a viewport configuration from scratch.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
2014-06-12 Gavin Barraclough <barraclough@apple.com>
Add support for thread/WorkQueue QoS
https://bugs.webkit.org/show_bug.cgi?id=130688
Reviewed by Anders Carlson & Simon Fraser.
The EventDispatcher's WorkQueue should be UserInteractive.
* Platform/WorkQueue.cpp:
(WorkQueue::create):
- pass QOS to constructor.
(WorkQueue::WorkQueue):
- pass QOS to platformInitialize.
* Platform/WorkQueue.h:
- added enum, arguments.
* Platform/efl/WorkQueueEfl.cpp:
(WorkQueue::platformInitialize):
- has extra argument.
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::platformInitialize):
- has extra argument.
* Platform/mac/WorkQueueMac.cpp:
(platformQOS):
- map from enum to platform type.
(WorkQueue::platformInitialize):
- set the QoS of the dispatch queue.
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::EventDispatcher):
- EventDispatcher's WorkQueue should be UserInteractive.
* config.h:
- added HAVE_QOS_CLASSES
2014-06-12 Simon Fraser <simon.fraser@apple.com>
[iOS] Tiny hack to fix WebKitTestRunner view visibility
https://bugs.webkit.org/show_bug.cgi?id=133833
Reviewed by Tim Horton.
PageClientImplIOS in WebKitTestRunner has a null m_webView, so isViewInWindow
was returning false, which confused things.
Fix by falling back to a check on the content view if the m_webView is nil.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::isViewInWindow):
2014-06-12 Brady Eidson <beidson@apple.com>
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:
2014-06-12 Alexey Proskuryakov <ap@apple.com>
[Mac] Allow reading com.apple.universalaccess preferences
https://bugs.webkit.org/show_bug.cgi?id=133817
<rdar://problem/17028261>
Reviewed by Anders Carlsson.
* WebProcess/com.apple.WebProcess.sb.in:
2014-06-12 Anders Carlsson <andersca@apple.com>
Fix build.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<HTTPHeaderMap>::decode):
(CoreIPC::ArgumentCoder<ResourceRequest>::decode):
2014-06-12 Dan Bernstein <mitz@apple.com>
Fixed a harmless error message when rewrite-availability-macros.sh is run in a clean build.
Rubber-stamped by Anders Carlsson.
* mac/rewrite-availability-macros.sh:
2014-06-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove view mode API
https://bugs.webkit.org/show_bug.cgi?id=133725
Reviewed by Martin Robinson.
It currently does nothing because support for view source mode was
removed from WebCore.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewSetProperty):
(webkitWebViewGetProperty):
(webkit_web_view_class_init):
(webkit_web_view_set_view_mode): Deleted.
(webkit_web_view_get_view_mode): Deleted.
* UIProcess/API/gtk/WebKitWebView.h:
* UIProcess/API/gtk/docs/webkit2gtk-sections.txt:
2014-06-12 Pratik Solanki <psolanki@apple.com>
Avoid creating a CFData when checking if a resource is file backed
https://bugs.webkit.org/show_bug.cgi?id=133783
Reviewed by Andreas Kling.
When a resource is file backed, we have it as a single CFDataRef in SharedBuffer. Add an
early return in tryGetShareableHandleFromSharedBuffer() so we don't end up creating a new
CFDataRef if we don't already have one in SharedBuffer. If we had to create a CFDataRef, the
it can't have been a file backed resource.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
2014-06-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Fix build break on EFL and GTK ports since r169820
https://bugs.webkit.org/show_bug.cgi?id=133786
Reviewed by Philippe Normand.
ENABLE_PRIMARY_SNAPSHOTTED_PLUGIN_HEURISTIC macro are missing in PluginView::pluginSnapshotTimerFired().
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginSnapshotTimerFired):
2014-06-11 Csaba Osztrogonác <ossy@webkit.org>
[EFL][GTK] Ultimate fix not to have build failures
in the future because of "#if TARGET_OS_IPHONE" guards.
Unreviewed buildfix.
Revert the previous wrong fix attempt r169879.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2014-06-11 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Fix build break on EFL port since r169869
https://bugs.webkit.org/show_bug.cgi?id=133785
Unreviewed, fix a build break on EFL port.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: Use defined(TARGET_OS_IPHONE).
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: ditto.
2014-06-11 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Give WebKitTestRunner a viewport configuration with initial scale=1 for testing
https://bugs.webkit.org/show_bug.cgi?id=133779
Reviewed by Benjamin Poulain.
Support a custom viewport configuration for testing, on iOS.
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _frameOrBoundsChanged]): Call setViewportConfigurationMinimumLayoutSize()
just as WKWebView does.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetUseTestingViewportConfiguration): New SPI to set a viewport config for testing.
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::setUseTestingViewportConfiguration):
(WebKit::WebPage::isUsingTestingViewportConfiguration):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::resetViewportDefaultConfiguration):
2014-06-11 Timothy Horton <timothy_horton@apple.com>
Remove unused VisibleContentRectUpdateInfo update ID
https://bugs.webkit.org/show_bug.cgi?id=133777
Reviewed by Benjamin Poulain.
Remove some unused code.
* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::operator==):
(WebKit::VisibleContentRectUpdateInfo::updateID): Deleted.
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::setLastVisibleContentRectUpdateID): Deleted.
(WebKit::RemoteLayerTreeTransaction::lastVisibleContentRectUpdateID): Deleted.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::nextVisibleContentRectUpdateID): Deleted.
(WebKit::WebPageProxy::lastVisibleContentRectUpdateID): Deleted.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::willCommitLayerTree):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
2014-06-11 Dan Bernstein <mitz@apple.com>
[Cocoa] Move CompletionHandlerCallChecker into a separate file
https://bugs.webkit.org/show_bug.cgi?id=133774
Reviewed by Anders Carlsson.
* Shared/Cocoa/CompletionHandlerCallChecker.h: Added.
* Shared/Cocoa/CompletionHandlerCallChecker.mm: Added.
(WebKit::CompletionHandlerCallChecker::create):
(WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker):
(WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker):
(WebKit::CompletionHandlerCallChecker::didCallCompletionHandler):
(WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod):
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::CompletionHandlerCallChecker::create): Deleted.
(WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker): Deleted.
(WebKit::CompletionHandlerCallChecker::didCallCompletionHandler): Deleted.
(WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker): Deleted.
(WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2014-06-11 Martin Hock <mhock@apple.com>
[iOS] Clear UIProcess visual state after WebProcess crash
https://bugs.webkit.org/show_bug.cgi?id=133664
<rdar://problem/16952742>
Reviewed by Benjamin Poulain.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didRelaunchProcess]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didRelaunchProcess):
* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::~RemoteLayerTreeHost):
(WebKit::RemoteLayerTreeHost::clearLayers):
2014-06-11 Tim Horton <timothy_horton@apple.com>
Implement swipeWithEvent for non-fluid swipes
https://bugs.webkit.org/show_bug.cgi?id=133766
<rdar://problem/17126889>
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView swipeWithEvent:]):
On non-fluid swipes, go back or forward depending on the swipe direction.
2014-06-11 Dan Bernstein <mitz@apple.com>
[Cocoa] Xcode cannot infer that the WebKit target implicitly depends on WebCore.framework
https://bugs.webkit.org/show_bug.cgi?id=133765
Reviewed by Anders Carlsson.
* Configurations/WebKit.xcconfig: Move linking against WebCore from OTHER_LDFLAGS here...
* WebKit2.xcodeproj/project.pbxproj: ...to the Link Binary With Libraries build phase here.
2014-06-11 Timothy Horton <timothy_horton@apple.com>
[wk2] Don't dispatch view state changes immediately
https://bugs.webkit.org/show_bug.cgi?id=133713
Reviewed by Simon Fraser.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::viewStateDidChange):
(WebKit::WebPageProxy::dispatchViewStateChange):
(WebKit::WebPageProxy::updateViewState): Deleted.
* UIProcess/WebPageProxy.h:
On PLATFORM(COCOA), wait until just before CA is going to commit the UI process layer
tree to dispatch view state changes to the Web process. This avoids sending multiple
view state change messages to the Web process within one run-loop cycle, for example
when a view is moved around in the view hierarchy but the view state otherwise remains the same.
2014-06-11 Timothy Horton <timothy_horton@apple.com>
Make it possible for waitForAndDispatchImmediately to bail if a sync message comes in from the other direction
https://bugs.webkit.org/show_bug.cgi?id=133708
Reviewed by Anders Carlsson.
* Platform/IPC/Connection.cpp:
(IPC::WaitForMessageState):
(IPC::Connection::Connection):
(IPC::Connection::waitForMessage):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::connectionDidClose):
* Platform/IPC/Connection.h:
(IPC::Connection::waitForAndDispatchImmediately):
Remove the waitForMessageMap, and assert that we're only ever waiting for one message at a time.
This simplifies this code a bit, and we never wait on more than one message at a time, so it was unnecessary.
Add a flag to waitForAndDispatchImmediately, InterruptWaitingIfSyncMessageArrives, which will cause
waitForAndDispatchImmediately to bail if a sync message arrives, to avoid pointlessly blocking both processes
for the entire timeout.
2014-06-11 Oliver Hunt <oliver@apple.com>
Restrict database process profile
https://bugs.webkit.org/show_bug.cgi?id=133750
Reviewed by Alexey Proskuryakov.
Make the sandbox profile much more restrictive.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb:
2014-06-11 Roger Fong <roger_fong@apple.com>
Don't snapshot offscreen plugins that would normally be considered primary plugins after they are moved in view.
https://bugs.webkit.org/show_bug.cgi?id=133667.
<rdar://problem/16743250>
Reviewed by Tim Horton.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::PluginView):
(WebKit::PluginView::pluginSnapshotTimerFired):
Set the display state to Playing if the following is true:
The plugin in question is large enough to be considered the primary snapshot and either:
a) The maximum number of snapshot retries has been reached and no good snapshot has been found.
b) The plugin is moved to be on-screen while the snapshot attempts are in progress.
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::plugInIntersectsSearchRect): Re-factor out intersection logic.
(WebKit::WebPage::plugInIsPrimarySize): Re-factor out primary plugin size logic.
(WebKit::WebPage::determinePrimarySnapshottedPlugIn): Use the above two methods here.
* WebProcess/WebPage/WebPage.h:
2014-06-11 Anders Carlsson <andersca@apple.com>
Move more WKPreferences to WKWebViewConfiguration
https://bugs.webkit.org/show_bug.cgi?id=133756
<rdar://problem/17271468>
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences setMinimumFontSize:]):
(-[WKPreferences suppressesIncrementalRendering]): Deleted.
(-[WKPreferences setSuppressesIncrementalRendering:]): Deleted.
(-[WKPreferences allowsInlineMediaPlayback]): Deleted.
(-[WKPreferences setAllowsInlineMediaPlayback:]): Deleted.
(-[WKPreferences mediaPlaybackRequiresUserAction]): Deleted.
(-[WKPreferences setMediaPlaybackRequiresUserAction:]): Deleted.
(-[WKPreferences mediaPlaybackAllowsAirPlay]): Deleted.
(-[WKPreferences setMediaPlaybackAllowsAirPlay:]): Deleted.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
* WebKit2.xcodeproj/project.pbxproj:
2014-06-11 Enrica Casucci <enrica@apple.com>
WebKit2 iOS: Unable to open UI menu for "open in new tab" for links on yahoo.com.
https://bugs.webkit.org/show_bug.cgi?id=133749
<rdar://problem/17165992>
Reviewed by Brady Eidson.
The URL returned to the UIProcess as string needs to be encoded.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2014-06-10 Anders Carlsson <andersca@apple.com>
Move suppressesIncrementalRendering to WKWebViewConfiguration
https://bugs.webkit.org/show_bug.cgi?id=133707
<rdar://problem/17271468>
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKPreferences.h:
Get rid of suppressesIncrementalRendering.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Set the suppressesIncrementalRenderingKey key in webPageConfiguration.preferenceValues.
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
Add suppressesIncrementalRendering.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
Assign suppressesIncrementalRendering.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Copy webPageConfiguration.preferenceValues to m_configurationPreferenceValues.
(WebKit::WebPageProxy::preferencesStore):
If m_configurationPreferenceValues is empty, just return m_preferences->store(). Otherwise,
copy the store and apply the configuration preference values.
(WebKit::WebPageProxy::preferencesDidChange):
Call preferencesStore() so we'll get the configuration preference values as well.
(WebKit::WebPageProxy::creationParameters):
Ditto.
* UIProcess/WebPageProxy.h:
2014-06-11 Antti Koivisto <antti@apple.com>
Wrap NSURLRequest in bundle API
https://bugs.webkit.org/show_bug.cgi?id=133732
<rdar://problem/17267217>
Reviewed by Andreas Kling.
Patch by Dan Bernstein.
We don't want to construct actual NSURLRequests in the web process side unless really needed as it is slow.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* Shared/Cocoa/WKNSURLRequest.h: Added.
(WebKit::wrapper):
* Shared/Cocoa/WKNSURLRequest.mm: Added.
Add a wrapper object that initializes the underlying NSURLRequest on-demand.
(-[WKNSURLRequest _web_createTarget]):
(-[WKNSURLRequest URL]):
(-[WKNSURLRequest copyWithZone:]):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(willSendRequestForFrame):
(didInitiateLoadForResource):
2014-06-11 Dan Bernstein <mitz@apple.com>
<rdar://problem/17218629> [Cocoa] WKWebView’s canGoBack and canGoForward properties are not KVO-compliant
https://bugs.webkit.org/show_bug.cgi?id=133722
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm: Added no-op overrides of new
PageLoadStateObserver member functions.
* UIProcess/API/Cocoa/WKWebView.h: Documented the canGoBack and canGoForward properties as
being KVO-compliant.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView canGoBack]): Changed to get the return value from the page load state.
(-[WKWebView canGoForward]): Ditto.
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::willChangeCanGoBack): Override this new PageLoadStateObserver
member function by sending the appropriate KVO change message to the WKWebView.
(WebKit::NavigationState::didChangeCanGoBack): Ditto.
(WebKit::NavigationState::willChangeCanGoForward): Ditto.
(WebKit::NavigationState::didChangeCanGoForward): Ditto.
* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::commitChanges): Check for changes to canGoBack and canGoForward
and call the observers if needed.
(WebKit::PageLoadState::canGoBack): Added. Returns the value from the committed state.
(WebKit::PageLoadState::setCanGoBack): Added. Sets the value in the uncommitted state.
(WebKit::PageLoadState::canGoForward): Added. Returns the value from the committed state.
(WebKit::PageLoadState::setCanGoForward): Added. Sets the value in the uncommitted state.
* UIProcess/PageLoadState.h:
(WebKit::PageLoadState::Data::Data): Added canGoBack and canGoForward boolean members.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChangeBackForwardList): Update the page load state with the new
state of canGoBack and canGoForward.
* UIProcess/WebPageProxy.h: Removed unused member variables m_canGoBack and m_canGoForward.
2014-06-11 Zan Dobersek <zdobersek@igalia.com>
Avoid Vector copies in WebNotificationManagerProxy::providerDidCloseNotifications(), FindController::findStringMatches()
https://bugs.webkit.org/show_bug.cgi?id=133676
Reviewed by Andreas Kling.
* UIProcess/Notifications/WebNotificationManagerProxy.cpp:
(WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): Move the newly-created
Vector object into the HashMap<>::add() call.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::findStringMatches): Movethe newly-create Vector object into the
Vector<>::append() call.
2014-06-11 Shivakumar JM <shiva.jm@samsung.com>
[EFL][WK2] Add missing test cases for EWK2ViewTest.
https://bugs.webkit.org/show_bug.cgi?id=133715
Reviewed by Gyuyoung Kim.
Add missing test cases for ewk_view.h APIs, ewk_view_stop(), ewk_view_html_string_load(), ewk_view_theme_get(),
ewk_view_feed_touch_event(), ewk_view_text_find_highlight_clear(), ewk_view_text_find(), ewk_view_text_matches_count(),
ewk_view_page_contents_get(), ewk_view_script_execute().
* PlatformEfl.cmake:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
2014-06-11 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use a different user agent string depending on the site
https://bugs.webkit.org/show_bug.cgi?id=132681
Reviewed by Anders Carlsson.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webkit_settings_class_init): Enable site specific quirks setting
by default.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::userAgent): Pass the given URL to WebPage.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::userAgent): Try to get the user agent for the
URL received falling back to the current one otherwise.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::platformUserAgent): Added.
* WebProcess/WebPage/efl/WebPageEfl.cpp:
(WebKit::WebPage::platformUserAgent): Return null String.
* WebProcess/WebPage/gtk/WebPageGtk.cpp:
(WebKit::WebPage::platformUserAgent): Use WebCore::standardUserAgentForURL() when site specific quirks
setting is enabled.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformUserAgent): Return null String.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::platformUserAgent): Return null String.
2014-06-10 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] ScrollingTreeOverflowScrollingNode does not use asynchronous touch dispatch
https://bugs.webkit.org/show_bug.cgi?id=133702
<rdar://problem/17259261>
Reviewed by Simon Fraser.
Notify the WKWebView and the TouchGestureRecognizer when on of the internal UIScrollView
starts scrolling in response to a gesture.
* UIProcess/PageClient.h:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::scrollingTreeNodeWillStartPanGesture):
* UIProcess/Scrolling/RemoteScrollingTree.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewWillStartPanGesture):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::scrollViewWillStartPanGesture):
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeWillStartPanGesture):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::scrollViewWillStartPanGesture):
2014-06-10 Dan Bernstein <mitz@apple.com>
WebKit2 part of [Cocoa] Handling authentication challenges should not require multiple delegate methods
https://bugs.webkit.org/show_bug.cgi?id=133697
Reviewed by Anders Carlsson.
* Shared/Authentication/AuthenticationManager.cpp:
(WebKit::AuthenticationManager::performDefaultHandling): Added. Calls the new
AuthenticationClient function receivedRequestToPerformDefaultHandling.
(WebKit::AuthenticationManager::rejectProtectionSpaceAndContinue): Added. Calls the new
AuthenticationClient function receivedChallengeRejection.
* Shared/Authentication/AuthenticationManager.h:
* Shared/Authentication/AuthenticationManager.messages.in: Added new messages
PerformDefaultHandling and RejectProtectionSpaceAndContinue.
* Shared/Downloads/DownloadAuthenticationClient.h: Override new AuthenticationClient member
functions.
* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::Download::receivedRequestToPerformDefaultHandling): Added empty implementation.
(WebKit::Download::receivedChallengeRejection): Ditto.
* Shared/Downloads/mac/DownloadMac.mm:
(WebKit::Download::receivedRequestToPerformDefaultHandling): Added. Forwards to the sender.
(WebKit::Download::receivedChallengeRejection): Ditto.
* UIProcess/API/Cocoa/WKNSURLAuthenticationChallenge.mm:
(checkChallenge): Factored out a bit of code into this helper function.
(-[WKNSURLAuthenticationChallengeSender cancelAuthenticationChallenge:]): Use new helper.
(-[WKNSURLAuthenticationChallengeSender continueWithoutCredentialForAuthenticationChallenge:]):
Ditto.
(-[WKNSURLAuthenticationChallengeSender useCredential:forAuthenticationChallenge:]): Ditto.
(-[WKNSURLAuthenticationChallengeSender performDefaultHandlingForAuthenticationChallenge:]):
Implemented this optional NSURLAuthenticationChallengeSender protocol method by forwarding
to the decision listener.
(-[WKNSURLAuthenticationChallengeSender rejectProtectionSpaceAndContinueWithChallenge:]):
Ditto.
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
* UIProcess/Authentication/AuthenticationChallengeProxy.cpp:
(WebKit::AuthenticationChallengeProxy::performDefaultHandling): Added. Sends a message to
the authentication manager.
(WebKit::AuthenticationChallengeProxy::rejectProtectionSpaceAndContinue): Ditto.
* UIProcess/Authentication/AuthenticationChallengeProxy.h:
* UIProcess/Authentication/AuthenticationDecisionListener.cpp:
(WebKit::AuthenticationDecisionListener::performDefaultHandling): Added. Forwards to the
authentication challenge proxy.
(WebKit::AuthenticationDecisionListener::rejectProtectionSpaceAndContinue): Ditto.
* UIProcess/Authentication/AuthenticationDecisionListener.h:
* UIProcess/Cocoa/NavigationState.h: Added flag in m_navigationDelegateMethods struct.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Initialize
webViewWillSendRequestForAuthenticationChallenge flag in the delegate methods struct.
(WebKit::NavigationState::LoaderClient::canAuthenticateAgainstProtectionSpaceInFrame): If
the delegate implements -_webView:willSendRequestForAuthenticationChallenge:, return true
here; the delegate will respond with -rejectProtectionSpaceAndContinueWithChallenge: if
it cannot authenticate.
(WebKit::NavigationState::LoaderClient::didReceiveAuthenticationChallengeInFrame): If the
delegate implements -_webView:willSendRequestForAuthenticationChallenge:, send that message.
2014-06-10 Timothy Horton <timothy_horton@apple.com>
Factor repeated CFRunLoopObserver code out
https://bugs.webkit.org/show_bug.cgi?id=133690
Reviewed by Simon Fraser.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::~RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
(WebKit::coreAnimationDidCommitLayersCallback): Deleted.
(WebKit::RemoteLayerTreeDrawingAreaProxy::scheduleCoreAnimationLayerCommitObserver): Deleted.
(WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers): Deleted.
Make use of WebCore::RunLoopObserver.
2014-06-10 Anders Carlsson <andersca@apple.com>
Fix availability declaration.
* UIProcess/API/Cocoa/WKError.h:
2014-06-10 Anders Carlsson <andersca@apple.com>
Address a comment about a comment.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView evaluateJavaScript:completionHandler:]):
2014-06-10 Anders Carlsson <andersca@apple.com>
Add -[WKWebView evaluateJavaScript:completionHandler:]
https://bugs.webkit.org/show_bug.cgi?id=133689
<rdar://problem/17152685>
Reviewed by Geoffrey Garen.
* Shared/API/c/WKErrorRef.h:
Remove WKErrorCode typedef from here.
* UIProcess/API/C/WKPageLoaderClient.h:
Use uint32_t instead of WKErrorCode.
* UIProcess/API/Cocoa/WKError.h:
(NS_ENUM):
Add a WKErrorDomain and a WKErrorCode enum.
* UIProcess/API/Cocoa/WKError.mm:
(localizedDescriptionForErrorCode):
Helper that returns the localized description given an error code.
(createNSError):
Helper that creates an NSError with the correct localized description given an error code.
* UIProcess/API/Cocoa/WKErrorInternal.h:
Add helpers.
* UIProcess/API/Cocoa/WKWebView.h:
Add evaluateJavaScript:completionHandler: method.
* UIProcess/API/Cocoa/WKWebView.mm:
(callbackErrorCode):
Helper that returns a WKErrorCode from a WebKit::CallbackBase::Error enum.
(-[WKWebView evaluateJavaScript:completionHandler:]):
Run the JavaScript code and handle all the error cases.
(-[WKWebView _runJavaScriptInMainFrame:]):
Reimplement this using the API method.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2014-06-10 Anders Carlsson <andersca@apple.com>
Don't call Connection::terminateSoon if the connection is null
https://bugs.webkit.org/show_bug.cgi?id=133695
<rdar://problem/17069024>
Reviewed by Tim Horton.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):
2014-06-10 Oliver Hunt <oliver@apple.com>
Add process entitlements
https://bugs.webkit.org/show_bug.cgi?id=133693
Reviewed by Alexey Proskuryakov.
Add entitlements description for Database process, and
ensure that we reference the correct seatbelt profiles.
* Configurations/DatabaseService.Development.xcconfig:
* Configurations/DatabaseService.xcconfig:
* Configurations/Databases-iOS.entitlements:
* Configurations/Network-iOS.entitlements:
* Configurations/WebContent-iOS.entitlements:
* WebKit2.xcodeproj/project.pbxproj:
2014-06-10 Alexey Proskuryakov <ap@apple.com>
Fix crashes on some plug-in tests.
https://bugs.webkit.org/show_bug.cgi?id=133691
<rdar://problem/17255836>
Reviewed by Anders Carlsson.
* PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::initialize):
Cannot use TemporaryChange here, because the object may go away before stack unwinds.
2014-06-10 Antti Koivisto <antti@apple.com>
Serialize ResourceRequests without platform request
https://bugs.webkit.org/show_bug.cgi?id=133679
Reviewed by Alexey Proskuryakov.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encode):
(IPC::ArgumentCoder<ResourceRequest>::decode):
Encode ResourceRequest directly if possible.
2014-06-09 Anders Carlsson <andersca@apple.com>
Fix build.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetState):
2014-06-09 Simon Fraser <simon.fraser@apple.com>
Work towards having frames in the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=133665
Reviewed by Tim Horton.
Override coordinatesScrollingForFrameView() to always return true for composited
frames, for iOS WK2 (eventually this class will have to be specialized for iOS and OS X).
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::coordinatesScrollingForFrameView):
2014-06-09 Anders Carlsson <andersca@apple.com>
Give callbacks real status codes
https://bugs.webkit.org/show_bug.cgi?id=133668
Reviewed by Dan Bernstein.
This makes it possible to know whether a callback was invalidated due to the webpage being closed,
or whether it was due the a web process crash.
* UIProcess/GenericCallback.h:
(WebKit::GenericCallback::create):
(WebKit::GenericCallback::performCallbackWithReturnValue):
(WebKit::GenericCallback::invalidate):
(WebKit::invalidateCallbackMap):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:
2014-06-09 Enrica Casucci <enrica@apple.com>
iOS WebKit: Crash in charactersAroundPosition.
https://bugs.webkit.org/show_bug.cgi?id=133659
<rdar://problem/17220870>
Reviewed by Benjamin Poulain.
We only need to compute charactersAroundPosition when we are in
editable content.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
2014-06-06 Andy Estes <aestes@apple.com>
[iOS] Expose _WKWebViewPrintFormatter and -_webView:printFrame: as SPI
https://bugs.webkit.org/show_bug.cgi?id=133600
Reviewed by David Kilzer.
Expose -_webView:printFrame: in WKUIDelegatePrivate so that clients can implement support for window.print().
Since window.print() can be called from a subframe, expose _WKWebViewPrintFormatter (renamed from
WKWebViewPrintFormatter to reflect its new SPI status) as SPI and add a frameToPrint property.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Forward-declared _WKFrameHandle and declared -_webView:printFrame:.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _webViewPrintFormatter]): Added to get a _WKWebViewPrintFormatter.
(-[WKWebView _printFormatterClass]): Updated the class name to _WKWebViewPrintFormatter.
(-[WKWebView _computePageCountAndStartDrawingToPDFForFrame:printInfo:WebKit::firstPage:computedTotalScaleFactor:]):
Added a frame argument. If frame is nil, print the main frame.
(-[WKWebView _computePageCountAndStartDrawingToPDFWithPrintInfo:WebKit::firstPage:computedTotalScaleFactor:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h: Forward-declared _WKFrameHandle; removed an unneccessary
forward-declaration of WKWebViewPrintFormatter.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Added a _webViewPrintFormatter property.
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::printFrame): Called -_webView:printFrame:.
* UIProcess/_WKWebViewPrintFormatter.h: Renamed from Source/WebKit2/UIProcess/WKWebViewPrintFormatter.h.
* UIProcess/_WKWebViewPrintFormatter.mm: Renamed from Source/WebKit2/UIProcess/WKWebViewPrintFormatter.mm.
* WebKit2.xcodeproj/project.pbxproj:
2014-06-09 Beth Dakin <bdakin@apple.com>
Flash video controls hit-test incorrectly after changing topContentInset
https://bugs.webkit.org/show_bug.cgi?id=133658
-and corresponding-
<rdar://problem/16978590>
Reviewed by Anders Carlsson.
When the topContent changes, the PluginView needs to be informed.
New function PluginView::topContentInsetDidChange() calls viewGeometryDidChange().
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::topContentInsetDidChange):
* WebProcess/Plugins/PluginView.h:
Call topContentInsetDidChange() after setting an inset only if it is a new inset.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setTopContentInset):
2014-06-09 Daniel Bates <dabates@apple.com>
Another attempt to fix the EFL and GTK builds after <http://trac.webkit.org/changeset/169711>
(https://bugs.webkit.org/show_bug.cgi?id=133657)
Substitute WKErrorRef.h for WKError.h.
* UIProcess/API/efl/ewk_error.cpp:
* WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
* WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
2014-06-09 Daniel Bates <dabates@apple.com>
Attempt to fix the EFL and GTK builds after <http://trac.webkit.org/changeset/169711>
(https://bugs.webkit.org/show_bug.cgi?id=133657)
Rename Shared/API/c/WKError.cpp to Shared/API/c/WKErrorRef.cpp.
* CMakeLists.txt:
2014-06-09 Anders Carlsson <andersca@apple.com>
Address review feedback.
* UIProcess/API/Cocoa/WKWebView.h:
2014-06-09 Anders Carlsson <andersca@apple.com>
Add a WKError.h header and rename the existing WKError.h to WKErrorRef.h
https://bugs.webkit.org/show_bug.cgi?id=133657
Reviewed by Dan Bernstein.
* Shared/API/Cocoa/WebKit.h:
* Shared/API/c/WKErrorRef.cpp: Renamed from Source/WebKit2/Shared/API/c/WKError.cpp.
(WKErrorGetTypeID):
(WKErrorCopyWKErrorDomain):
(WKErrorCopyDomain):
(WKErrorGetErrorCode):
(WKErrorCopyFailingURL):
(WKErrorCopyLocalizedDescription):
* Shared/API/c/WKErrorRef.h: Renamed from Source/WebKit2/Shared/API/c/WKError.h.
* UIProcess/API/C/WKPage.h:
* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/API/C/WebKit2_C.h:
* UIProcess/API/Cocoa/WKError.h: Copied from Source/WebKit2/Shared/API/Cocoa/WebKit.h.
* UIProcess/API/Cocoa/WKError.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WebKit.h.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/mac/WebErrorsMac.mm:
2014-06-09 Brady Eidson <beidson@apple.com>
Use different AppKit API for all services menus
<rdar://problem/16874403> and https://bugs.webkit.org/show_bug.cgi?id=133649
Reviewed by Tim Horton.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showContextMenu):
2014-06-09 Anders Carlsson <andersca@apple.com>
Add WKWindowFeatures.h to the umbrella header.
Reviewed by Dan Bernstein.
* Shared/API/Cocoa/WebKit.h:
2014-06-09 Anders Carlsson <andersca@apple.com>
Add -[WKWebView loadHTMLString:baseURL:]
https://bugs.webkit.org/show_bug.cgi?id=133645
<rdar://problem/17170649>
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView loadHTMLString:baseURL:]):
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createLoadDataNavigation):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::loadHTMLString):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadDataImpl):
(WebKit::WebPage::loadString):
(WebKit::WebPage::loadData):
(WebKit::WebPage::loadHTMLString):
(WebKit::WebPage::loadAlternateHTMLString):
(WebKit::WebPage::loadPlainTextString):
(WebKit::WebPage::loadWebArchiveData):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2014-06-09 Simon Fraser <simon.fraser@apple.com>
Fix more latched scrolling test flakiness and slowness
https://bugs.webkit.org/show_bug.cgi?id=133601
Reviewed by Brent Fulgham.
Latched scrolling tests were flakey for two reasons. First, the EventSender
wheel events were async from the web to the UI process, and the resulting
synthetic events also async from the UI to the web process. Make them sync
for testing.
Secondly, the timer-based scrolling tree commit could result in the scrolling
tree (specifically the frame node's notion of the scrollable area and content
size) not being updated before the scrolling thread starts getting wheel events.
Fix by having WebPage::wheelEventSyncForTesting() commit if necessary.
Finally remove all the now-unnecessary timeouts from the tests.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::wheelEventSyncForTesting):
2014-06-09 Andrzej Badowski <a.badowski@samsung.com>
[EFL] Add parameter to MiniBrowser to disable web security
https://bugs.webkit.org/show_bug.cgi?id=121095
Reviewed by Gyuyoung Kim.
-w (--web-security) commandline allows to disable/enable web security (enabled by default).
The reason for this is to test and debug (using, for example, MiniBrowser) scripts accessing
resources from other domains (cross-domain requests) such as access map location on another server.
Another possibility is to launch in a webkit browser local file tests that will refer to the links
in the http website loaded in an iframe. It will not be possible without deactivation of web security.
* UIProcess/API/efl/ewk_settings.cpp:
(ewk_settings_web_security_enabled_set):
(ewk_settings_web_security_enabled_get):
* UIProcess/API/efl/ewk_settings.h:
* UIProcess/API/efl/tests/test_ewk2_settings.cpp:
(TEST_F):
2014-06-08 Sam Weinig <sam@webkit.org>
[Cocoa] WKScriptMessage should include the frame the message is from
<rdar://problem/17210226>
https://bugs.webkit.org/show_bug.cgi?id=133623
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKScriptMessage.h:
Add WKFrameInfo property.
* UIProcess/API/Cocoa/WKScriptMessage.mm:
(-[WKScriptMessage _initWithBody:webView:frameInfo:name:]):
Add WKFrameInfo to the initializer.
(-[WKScriptMessage frameInfo]):
Implement frameInfo accessor.
* UIProcess/API/Cocoa/WKScriptMessageInternal.h:
Add WKFrameInfo to the initializer.
* UIProcess/API/Cocoa/WKUserContentController.mm:
Pass the WKFrameInfo to the WKScriptMessage initializer.
2014-06-08 Dan Bernstein <mitz@apple.com>
[Cococa] WKWindowFeatures.h is missing from WebKit.framework
https://bugs.webkit.org/show_bug.cgi?id=133622
Reviewed by Sam Weinig.
* WebKit2.xcodeproj/project.pbxproj: Promoted WKWindowFeatures.h to Public.
2014-06-08 Dan Bernstein <mitz@apple.com>
<rdar://problem/17208234> [Mac] Client-certificate authentication isn’t working when using the modern API
https://bugs.webkit.org/show_bug.cgi?id=133617
Reviewed by Sam Weinig.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Credential>::encode): Encode certificate credentials on Mac as well.
(IPC::ArgumentCoder<Credential>::decode): Decode certificate credentials on Mac as well.
* Shared/cf/ArgumentCodersCF.cpp:
(IPC::encode): Use OS X API for getting a persistent reference to a key.
(IPC::decode): Use OS X API for getting a key from a persistent reference.
* Shared/cf/ArgumentCodersCF.h: Make identity coding available on Mac as well.
2014-06-07 Anders Carlsson <andersca@apple.com>
Get rid of _WKScriptWorld
https://bugs.webkit.org/show_bug.cgi?id=133610
Reviewed by Dan Bernstein.
* Shared/API/Cocoa/WebKitPrivate.h:
* UIProcess/API/Cocoa/_WKScriptWorld.h: Removed.
* UIProcess/API/Cocoa/_WKScriptWorld.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:
2014-05-29 Anders Carlsson <andersca@apple.com>
HTTPHeaderMap should not derive from HashMap
https://bugs.webkit.org/show_bug.cgi?id=133392
Reviewed by Darin Adler.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<HTTPHeaderMap>::encode):
(IPC::ArgumentCoder<HTTPHeaderMap>::decode):
2014-06-07 Alexey Proskuryakov <ap@apple.com>
[iOS] Fix a path used for sandbox profiles
https://bugs.webkit.org/show_bug.cgi?id=133602
<rdar://problem/17212011>
Reviewed by David Kilzer.
* WebKit2.xcodeproj/project.pbxproj:
2014-06-06 Enrica Casucci <enrica@apple.com>
REGRESSION (iOS WebKit2): backspace key does not repeat beyond a single word.
https://bugs.webkit.org/show_bug.cgi?id=133593
<rdar://problem/16352228>
Reviewed by Benjamin Poulain.
We need to provide a way for the keyboard layer to select from
the current position to the beginning of the word moving backwards
and implement the method to know when we have reached the beginning of the document.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView selectWordBackward]):
(-[WKContentView _selectionAtDocumentStart]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::selectWordBackward):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWordBackward):
2014-06-06 Enrica Casucci <enrica@apple.com>
Adopt the new UIAlertController API to replace UIActionSheet.
https://bugs.webkit.org/show_bug.cgi?id=133582
<rdar://problem/16845223>
Reviewed by Joseph Pecoraro.
UIActionSheet is deprecated. We need to move out action sheets
implementation to UIAlertView.
* UIProcess/API/Cocoa/_WKElementAction.h:
* UIProcess/API/Cocoa/_WKElementAction.mm:
* UIProcess/ios/WKActionSheet.h:
* UIProcess/ios/WKActionSheet.mm:
(-[WKActionSheet presentSheetFromRect:]):
(-[WKActionSheet doneWithSheet]):
(-[WKActionSheet willRotate]):
(-[WKActionSheet updateSheetPosition]):
(-[WKActionSheet _didRotateAndLayout]):
(-[WKActionSheet didRotate]):
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):
(-[WKActionSheetAssistant cleanupSheet]):
(-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]): Deleted.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _longPressRecognized:]):
2014-06-06 Gavin Barraclough <baraclough@apple.com>
Should boost ChildProcesses on iOS
https://bugs.webkit.org/show_bug.cgi?id=133583
Reviewed by Sam Weinig.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
- boost all child processes on iOS.
2014-06-06 Alexey Proskuryakov <ap@apple.com>
Build fix after <http://trac.webkit.org/changeset/169655>.
The SPIs used do not exist on Mac, limit the code to iOS.
* Shared/Authentication/mac/AuthenticationManager.mac.mm:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Credential>::encode):
(IPC::ArgumentCoder<Credential>::decode):
* Shared/cf/ArgumentCodersCF.cpp:
(IPC::typeFromCFTypeRef):
(IPC::encode):
(IPC::decode):
* Shared/cf/ArgumentCodersCF.h:
2014-06-06 Dan Bernstein <mitz@apple.com>
<rdar://problem/17095692> [iOS] Client-certificate authentication isn’t working
https://bugs.webkit.org/show_bug.cgi?id=133527
Reviewed by Darin Adler.
* Configurations/Network-iOS.entitlements: Enabled the Network process to access the keys
needed to create identities to authenticate with.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<Credential>::encode): Encode the credential type, and if it is a client
certificate, encode the identity and the certificates.
(IPC::ArgumentCoder<Credential>::decode): Decode the credential type. If it is a client
certificate, decode the identity and the certificates and use the proper Credential
constructor.
* Shared/cf/ArgumentCodersCF.cpp:
(IPC::typeFromCFTypeRef): Handle SecIdentityRef.
(IPC::encode): Encode an identity by encoding its certificate and a persistent reference to
its key.
(IPC::decode): Decode a certificate and a persistent reference to a key, find the key, and
create an identity.
* Shared/cf/ArgumentCodersCF.h:
2014-06-05 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] WebPage sometimes forces two resize events on animated resize
https://bugs.webkit.org/show_bug.cgi?id=133534
Reviewed by Enrica Casucci.
When I updated the patch for resize events (r168556) to use the unobscured rect in scrollview coordinates,
I forgot to update a snippet of code in dynamicViewportSizeUpdate(). Since that code was still using
the scaled unobscured rect, there was sometimes a difference of 1 pixel between the size set by that
call site and the others.
This path nukes the bad code and use the unobscured rect in scrollview coordinates given by the UIProcess.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
2014-06-05 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Add device orientation
https://bugs.webkit.org/show_bug.cgi?id=133530
<rdar://problem/16680041>
Reviewed by Tim Horton.
Add device orientation for WebKit2.
For the public API, WKWebView get the updates through the notification UIWindowDidRotateNotification.
We do not have any control over how the API is used, but we can expect the size will be updated before
the end of rotation in most cases and the events should be sent in the right order.
For Safari, we use an override to support animated resize (and some tabs corner cases).
On the WebProcess side, we just get the new orientation directly or on DynamicViewportSizeUpdate.
* UIProcess/API/Cocoa/WKWebView.mm:
(deviceOrientationForUIInterfaceOrientation):
(deviceOrientation):
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _windowDidRotate:]):
(-[WKWebView _setInterfaceOrientationOverride:]):
(-[WKWebView _interfaceOrientationOverride]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::deviceOrientation):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::setDeviceOrientation):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::deviceOrientation):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::deviceOrientation):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setDeviceOrientation):
(WebKit::WebPage::dynamicViewportSizeUpdate):
2014-06-05 Oliver Hunt <oliver@apple.com>
Enable SANDBOX_EXTENSIONS build flag universally on cocoa
https://bugs.webkit.org/show_bug.cgi?id=133556
Reviewed by Alexey Proskuryakov.
Remove unnecessary iOS exception.
* WebKit2Prefix.h:
2014-06-05 Alexey Proskuryakov <ap@apple.com>
[Mac] Tweak plug-in sandbox profiles
https://bugs.webkit.org/show_bug.cgi?id=133549
Fix <rdar://problem/17068055> and <rdar://problem/17148837>.
Reviewed by Sam Weinig and Simon Cooper.
* Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
* Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
2014-06-05 Tanay C <tanay.c@samsung.com>
Resolve compiler error (call of overloaded 'schedule' function is ambiguous)
https://bugs.webkit.org/show_bug.cgi?id=133467
Reviewed by Carlos Garcia Campos.
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::handleResponseLater): Explicitly casting second parameter to std::function<void()>
2014-06-04 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Restore the visual scroll position instead of the dom scroll position when restoring states from the history
https://bugs.webkit.org/show_bug.cgi?id=133490
Reviewed by Tim Horton.
Instead of restoring the scroll position, restore the visual position. This makes pages appear at the same position
on screen ignoring changes in the obscured top inset.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
(WebKit::WebFrameLoaderClient::saveViewStateToItem):
(WebKit::WebFrameLoaderClient::restoreViewState):
Save and restore userHasChangedPageScaleFactor to handle rescaling correctly.
Limit the scale into valid viewport limits in case the viewport meta tag has changed or the device has rotated.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::userHasChangedPageScaleFactor):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::restorePageState):
(WebKit::WebPage::updateVisibleContentRects):
In updateVisibleContentRects, we keep track or the current difference between the exposed rect and the unobscured rect.
When restoring the page position, we use the current top inset and the saved exposed rect to restore the visual
scroll position.
It is not very robust as it does not resolve races between the two processes, but that is not worse than what we is there now.
2014-06-03 Timothy Horton <timothy_horton@apple.com>
WebKit2 View Gestures (Zoom): Can show unpainted regions when zoom-pinching-out
https://bugs.webkit.org/show_bug.cgi?id=133472
<rdar://problem/15686848>
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToLayers):
(WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
Use prepopulateRect() when zooming out to ensure that we have tiles for the current exposed area.
Factor applyTransientZoomToLayers out of adjustTransientZoom, so that
flushLayers can call applyTransientZoomToLayers without ending up calling prepopulateRect()
during layer flushing, which causes trouble.
It is OK to populate layers at the current scale even when zooming out, because the overdraw
already covers most of the zoomed out area, and we're only adding a few more tiles at worst.
2014-06-03 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Align the highlight rects with device pixels
https://bugs.webkit.org/show_bug.cgi?id=133464
<rdar://problem/16708861>
Reviewed by Enrica Casucci.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _showTapHighlightWithColor:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
2014-06-02 Enrica Casucci <enrica@apple.com>
REGRESSION (iOS WebKit2): Single tap in pages with focus on load will clear the selection after the keyboard appears.
https://bugs.webkit.org/show_bug.cgi?id=133465
<rdar://problem/17059189>
Reviewed by Benjamin Poulain.
If a page focuses an input field on load we don't bring the keyboard on screen
since the keyboard is only shown when the user interacts with the page with gestures.
Still the WebProcess sets the focus and the selection according to the rules.
We need to make sure the UI process doesn't accidentally clear this selection
when the user starts the interaction with the page.
This patch also improves the function that retrieves the autocorrection data
to be returned to the keyboard, making sure that we always send back a reply
even when we don't have a valid selection.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _singleTapCommited:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestAutocorrectionData):
2014-05-31 Anders Carlsson <andersca@apple.com>
Change DeferrableOneShotTimer to use std::function instead of being a class template
https://bugs.webkit.org/show_bug.cgi?id=133423
Reviewed by Antti Koivisto.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformSetCacheModel):
* Shared/CacheModel.cpp:
(WebKit::calculateCacheSizes):
* Shared/CacheModel.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginSnapshotTimerFired):
* WebProcess/Plugins/PluginView.h:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformSetCacheModel):
2014-06-02 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Round the UIScrollView content size to device pixel
https://bugs.webkit.org/show_bug.cgi?id=133417
<rdar://problem/15922440>
Reviewed by Simon Fraser.
We should really have the scaled content size floored to device pixels, but that will be for another
time.
This patch ensure the content size as seen by the API is rounded to device pixels. The value is floored
to avoid showing partial pixels when the content is stable.
* UIProcess/API/Cocoa/WKWebView.mm:
(floorFloatToPixels):
(roundScrollViewCountentSize):
(-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView scrollView:contentSizeForZoomScale:withProposedSize:]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _endAnimatedResize]):
2014-06-02 Oliver Hunt <oliver@apple.com>
Move ifdef to the right place.
RS=Enrica
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::initializeSandbox):
2014-06-02 Gavin Barraclough <barraclough@apple.com>
Set default voucher for XPC client processes
https://bugs.webkit.org/show_bug.cgi?id=133458
Reviewed by Geoff Garen.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializer):
- add voucher_replace_default_voucher.
* config.h:
- add HAVE_VOUCHERS.
2014-06-02 Jeremy Jones <jeremyj@apple.com>
Send external playback properties to fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=133366
Reviewed by Simon Fraser.
Forward setExternalPlayback.
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in: add setExternalPlaybackProperties
* WebProcess/ios/WebVideoFullscreenManager.h: add setExternalPlaybackProperties
* WebProcess/ios/WebVideoFullscreenManager.mm: add setExternalPlaybackProperties
(WebKit::WebVideoFullscreenManager::setExternalPlaybackProperties): added
2014-06-02 Enrica Casucci <enrica@apple.com>
Remove unintentional changes to WKContentViewInteraction.mm
introduced in r169500.
Unreviewed.
* UIProcess/ios/WKContentViewInteraction.mm:
(+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
2014-06-02 Geoffrey Garen <ggaren@apple.com>
Address some review comments on bug 133408
https://bugs.webkit.org/show_bug.cgi?id=133410
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
2014-06-02 Dan Bernstein <mitz@apple.com>
[Cocoa] -[WKWebView activeURL] is unused
https://bugs.webkit.org/show_bug.cgi?id=133440
Reviewed by Mark Rowe.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView activeURL]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Removed the property declaration.
2014-05-31 Oliver Hunt <oliver@apple.com>
Restructure initial distinct sandbox profiles
https://bugs.webkit.org/show_bug.cgi?id=133415
Reviewed by Alexey Proskuryakov.
Add support for manually instantiating the network and
content process sandboxes, and add initial profiles.
These profiles are completely generic so we can make sure
nothing is broken by enabling them.
This also adds a target to the WebKit2 project to correctly
process the profiles.
* DatabaseProcess/ios/DatabaseProcessIOS.mm:
(WebKit::DatabaseProcess::initializeSandbox):
* DatabaseProcess/ios/com.apple.WebKit.DatabasesIOS.sb: Removed.
* NetworkProcess/ios/NetworkProcessIOS.mm:
(WebKit::NetworkProcess::initializeSandbox):
* Resources/SandboxProfiles/ios/com.apple.WebKit.Databases.sb: Added.
* Resources/SandboxProfiles/ios/com.apple.WebKit.Networking.sb: Added.
* Resources/SandboxProfiles/ios/com.apple.WebKit.WebContent.sb: Added.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::initializeSandbox):
2014-06-01 Sam Weinig <sam@webkit.org>
[Cocoa] Add SPI to get a WebArchive of the WKWebView
<rdar://problem/16748120>
https://bugs.webkit.org/show_bug.cgi?id=133439
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _getWebArchiveDataWithCompletionHandler:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-05-31 Anders Carlsson <andersca@apple.com>
Add a LazyNeverDestroyed class template and use it
https://bugs.webkit.org/show_bug.cgi?id=133425
Reviewed by Darin Adler.
* Shared/mac/SecItemShim.cpp:
(WebKit::responseMap):
2014-05-31 Timothy Horton <timothy_horton@apple.com>
View snapshots are sometimes taken at the wrong scale
https://bugs.webkit.org/show_bug.cgi?id=133419
<rdar://problem/17087497>
Reviewed by Sam Weinig.
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Work around <rdar://problem/17084993> by re-requesting the snapshot at
kCGWindowImageNominalResolution if it was captured at the wrong scale.
2014-05-31 Dan Bernstein <mitz@apple.com>
[iOS] WebKit2.framework is unused
https://bugs.webkit.org/show_bug.cgi?id=133424
Reviewed by Anders Carlsson.
* Configurations/WebKit2.xcconfig: Set SKIP_INSTALL to YES when targeting iOS.
2014-05-30 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] When a page does not finish rotation before the end of the animation, synchronize explicitely
https://bugs.webkit.org/show_bug.cgi?id=133364
<rdar://problem/17026333>
Reviewed by Sam Weinig.
When a page that does layout on rotation does not respond before the end of the animation, we end up with
a completely inconsistent state on the UIProcess (because it is unware of the new states).
The perfect way to fix this would be to make animated resize transactional and have the WebProcess resolve
conflicts. That is very complicated and the issue is uncommon, so this patch does not do that.
This patch force the synchronization whenever we finish the animation before we heard back
from the WebProcess.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _endAnimatedResize]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::resetState):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::synchronizeDynamicViewportUpdate):
(WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::synchronizeDynamicViewportUpdate):
2014-05-30 Enrica Casucci <enrica@apple.com>
REGRESSION (WebKit2): space space to insert period doesn't work in web forms.
https://bugs.webkit.org/show_bug.cgi?id=133413
<rdar://problem/16948333>
Reviewed by Benjamin Poulain.
iOS TextInput needs to know about content surrounding the
current position while editing. Since we don't want to
query this information synchronously when asked, we cache it
as part of the EditorState. EditorState now contains a vector of
three characters representing the content after, before and two
position before the caret position.
The patch also replaces all calls to plainText with plainTextReplacingNoBreakSpace
to work well with iOS text input.
* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _characterInRelationToCaretSelection:]):
(+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestDictationContext):
(WebKit::WebPage::replaceSelectedText):
(WebKit::WebPage::replaceDictatedText):
(WebKit::WebPage::requestAutocorrectionData):
(WebKit::WebPage::syncApplyAutocorrection):
(WebKit::computeAutocorrectionContext):
2014-05-30 Geoffrey Garen <ggaren@apple.com>
Fixed the build by adding back a declaration I deleted by accident :(.
Unreviewed.
* UIProcess/API/Cocoa/WKWebView.h:
2014-05-30 Geoffrey Garen <ggaren@apple.com>
Unreviewed, rolling in r169490.
I changed a non-ASCII apostrophe to ASCII.
Restored changeset:
"Some more copy-editing of the Modern WebKit headerdoc"
https://bugs.webkit.org/show_bug.cgi?id=133408
http://trac.webkit.org/changeset/169490
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
(NS_ENUM):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKProcessPool.h:
* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKScriptMessageHandler.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2014-05-30 Geoffrey Garen <ggaren@apple.com>
Unreviewed, rolling out r169490.
It broke the build with a mysterious warning about ASCII.
Reverted changeset:
"Some more copy-editing of the Modern WebKit headerdoc"
https://bugs.webkit.org/show_bug.cgi?id=133408
http://trac.webkit.org/changeset/169490
2014-05-30 Geoffrey Garen <ggaren@apple.com>
Some more copy-editing of the Modern WebKit headerdoc
https://bugs.webkit.org/show_bug.cgi?id=133408
Reviewed by Beth Dakin.
A copy-editor suggested some edits to the headerdoc for clarity,
style, and formatting.
I reviewed the edits and accepted about 80% of them.
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
(NS_ENUM):
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKProcessPool.h:
* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKScriptMessageHandler.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2014-05-30 Timothy Horton <timothy_horton@apple.com>
Crash loading skydrive.com (assertion under RemoteLayerTreeDisplayRefreshMonitor)
https://bugs.webkit.org/show_bug.cgi?id=133370
<rdar://problem/17061361>
Reviewed by Darin Adler.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::willDestroyDisplayRefreshMonitor):
(WebKit::RemoteLayerTreeDrawingArea::didUpdate):
Post-landing review comments from Darin noted that checking if the
DrawingArea's m_displayRefreshMonitors contains the monitor in the
list to notify is insufficient, because a new one could have been
added with the same address. Instead, copy the HashSet, removing
at random from it and firing didUpdateLayers, but *also* removing
from it in the willDestroyDisplayRefreshMonitor callback.
This is very similar to what DisplayRefreshMonitor itself does internally
(we don't have to duplicate its code to avoid re-entry because it is
already impossible to re-enter didUpdate).
2014-05-29 Anders Carlsson <andersca@apple.com>
-[WKProcessPoolConfiguration setCachePartitionedURLSchemes:] should do a deep copy
https://bugs.webkit.org/show_bug.cgi?id=133393
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
2014-05-29 Mark Lam <mark.lam@apple.com>
Restoring FloatingPointEnvironment initialization that was accidentally rolled out by r169176.
<https://webkit.org/b/133389>
Rubber stamped by Oliver Hunt.
* Shared/ios/ChildProcessIOS.mm:
(WebKit::ChildProcess::platformInitialize):
2014-05-29 Enrica Casucci <enrica@apple.com>
Need to notify the keyboard about every KeyDown event.
https://bugs.webkit.org/show_bug.cgi?id=133383
<rdar://problem/16633975>
Reviewed by Benjamin Poulain.
A key down will generate most of the time a call to the keyboard to add input or delete.
But the event could be handled by JavaScript and its default prevented.
We need to notify the keyboard in every case to allow updating its internal state about what has been typed.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::doneWithKeyEvent):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _didHandleKeyEvent:]):
2014-05-29 Matthew Hanson <matthew_hanson@apple.com>
Roll out r169439. <rdar://problem/17069364>
2014-05-28 Gavin Barraclough <baraclough@apple.com>
viewStateDidChange should always fully update ViewState
https://bugs.webkit.org/show_bug.cgi?id=133159
Reviewed by Anders Carlson.
Currently WebPageProxy::viewStateDidChange is passed a mask of bits to update.
This has the following negative consequences:
– WKWebView implicitly requires more detailed knowledge of the internal implementation of the PageClient.
– Updates may unnecessarily be split over multiple IPC messages.
– In order to support partial updates we make multiple virtual function calls to PageClient, which then makes duplicate objc calls.
Better to just always update the entire ViewState.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView didMoveToWindow]):
- removed argument to viewStateDidChange.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::viewState):
(WebKit::PageClientImpl::isViewWindowActive): Deleted.
(WebKit::PageClientImpl::isViewFocused): Deleted.
(WebKit::PageClientImpl::isViewVisible): Deleted.
(WebKit::PageClientImpl::isViewInWindow): Deleted.
* UIProcess/API/gtk/PageClientImpl.h:
- merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
* UIProcess/API/mac/WKView.mm:
(-[WKView becomeFirstResponder]):
(-[WKView resignFirstResponder]):
(-[WKView viewDidMoveToWindow]):
(-[WKView _windowDidBecomeKey:]):
(-[WKView _windowDidResignKey:]):
(-[WKView _windowDidMiniaturize:]):
(-[WKView _windowDidDeminiaturize:]):
(-[WKView _windowDidOrderOffScreen:]):
(-[WKView _windowDidOrderOnScreen:]):
(-[WKView _windowDidChangeOcclusionState:]):
(-[WKView viewDidHide]):
(-[WKView viewDidUnhide]):
(-[WKView _activeSpaceDidChange:]):
(-[WKView _setThumbnailView:]):
(-[WKView endDeferringViewInWindowChanges]):
(-[WKView endDeferringViewInWindowChangesSync]):
- removed argument to viewStateDidChange.
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::viewState):
(WebKit::WebView::isViewWindowActive): Deleted.
(WebKit::WebView::isViewFocused): Deleted.
(WebKit::WebView::isViewVisible): Deleted.
(WebKit::WebView::isViewInWindow): Deleted.
* UIProcess/CoordinatedGraphics/WebView.h:
- merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
* UIProcess/PageClient.h:
(WebKit::PageClient::isViewVisibleOrOccluded): Deleted.
(WebKit::PageClient::isVisuallyIdle): Deleted.
- merged isViewVisibleOrOccluded/isVisuallyIdle to subclass viewState methods.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
- updateViewState -> PageClient::viewState
(WebKit::WebPageProxy::viewStateDidChange):
- argument removed; updateViewState -> PageClient::viewState.
(WebKit::WebPageProxy::setCursor):
- call isViewWindowActive on WebPageProxy, rather than PageClient.
(WebKit::WebPageProxy::updateBackingStoreDiscardableState):
- call isViewWindowActive on WebPageProxy, rather than PageClient.
(WebKit::WebPageProxy::updateViewState): Deleted.
- removed - viewState method moved to PageClient.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isViewWindowActive):
- added missing implementation.
(WebKit::WebPageProxy::isViewVisible):
- removed argument to viewStateDidChange.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::windowServerConnectionStateChanged):
- removed argument to viewStateDidChange.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::viewState):
(WebKit::PageClientImpl::isViewWindowActive): Deleted.
(WebKit::PageClientImpl::isViewFocused): Deleted.
(WebKit::PageClientImpl::isViewVisible): Deleted.
(WebKit::PageClientImpl::isViewInWindow): Deleted.
(WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
(WebKit::PageClientImpl::isVisuallyIdle): Deleted.
- merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didMoveToWindow]):
(-[WKContentView _applicationDidEnterBackground:]):
(-[WKContentView _applicationWillEnterForeground:]):
- removed argument to viewStateDidChange.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::viewState):
(WebKit::PageClientImpl::showCorrectionPanel):
(WebKit::PageClientImpl::showDictationAlternativeUI):
(WebKit::PageClientImpl::isViewWindowActive): Deleted.
(WebKit::PageClientImpl::isViewFocused): Deleted.
(WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
(WebKit::PageClientImpl::isVisuallyIdle): Deleted.
- merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
2014-05-29 Dan Bernstein <mitz@apple.com>
[Cocoa] Can’t recover from subframe load errors
https://bugs.webkit.org/show_bug.cgi?id=133385
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
* UIProcess/Cocoa/NavigationState.h: Added flag in m_navigationDelegateMethods struct.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Initialize
webViewNavigationDidFailProvisionalLoadInSubframeWithError flag in the delegate methods
struct.
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame): If the
error occurred in a subframe, invoke the new delegate method.
2014-05-29 Geoffrey Garen <ggaren@apple.com>
Added a missing @result to WKPreferences headerdoc
https://bugs.webkit.org/show_bug.cgi?id=133381
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKPreferences.h:
2014-05-29 Alexey Proskuryakov <ap@apple.com>
[Mac] Always use plug-in sandbox with sandboxed clients
https://bugs.webkit.org/show_bug.cgi?id=133358
<rdar://problem/15637695>
Reviewed by Anders Carlsson.
* PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::initializeSandbox):
Refuse to start if parent process is sandboxed, and plug-in process is not going to be.
None of this should run in normal case, because there are also checks on UI process side.
* Shared/Plugins/PluginModuleInfo.h:
* Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm:
(WebKit::NetscapePluginModule::getPluginInfo):
Added a member to PluginModuleInfo, telling whether the plug-in has a sandbox profile.
* Shared/Plugins/Netscape/mac/PluginInformationMac.mm:
(WebKit::getPlatformPluginModuleInformation): Use the new PluginModuleInfo member,
we no longer need to check the file system here.
* WebKit2.xcodeproj/project.pbxproj:
* Shared/mac/SandboxUtilities.h: Added.
* Shared/mac/SandboxUtilities.cpp: Added. (WebKit::processIsSandboxed):
This code is simple, but include magic is not. Moved it to a separate file to
avoid repeating.
* UIProcess/API/C/mac/WKContextPrivateMac.mm: Removed an unused include.
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
(WebKit::PluginInfoStore::shouldUsePlugin): Don't use unsandboxed plug-ins in
sandboxed applications.
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::platformGetLaunchOptions): Don't ever pass disable-sandbox
from sandboxed processes.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
Use the new shared code in SandboxUtilities.h.
2014-05-29 Timothy Horton <timothy_horton@apple.com>
Crash loading skydrive.com (assertion under RemoteLayerTreeDisplayRefreshMonitor)
https://bugs.webkit.org/show_bug.cgi?id=133370
<rdar://problem/17061361>
Reviewed by Anders Carlsson.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::didUpdate):
Copy the set of refresh monitors so that we don't try to mutate the list we're iterating,
and don't try to fire refresh monitors that were removed in a previous iteration of the loop.
2014-05-29 Timothy Horton <timothy_horton@apple.com>
REGRESSION (iOS WebKit2): Find-in-Page doesn't work in subframes
https://bugs.webkit.org/show_bug.cgi?id=133372
<rdar://problem/17045070>
Reviewed by Simon Fraser.
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindController::willFindString):
(WebKit::FindController::didFailToFindString):
(WebKit::FindController::didHideFindIndicator):
Flip ignoreCompositionSelectionChange and updateAppearanceEnabled on all
frames, not just the main frame, because the found string can be in a subframe.
Ideally we would flip it on/off for each frame as we move the selection between them,
but would require a lot of work (and the overhead of touching each frame shouldn't be significant).
2014-05-29 Dan Bernstein <mitz@apple.com>
WKBundleActivateMacFontAscentHack is unused
https://bugs.webkit.org/show_bug.cgi?id=133379
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleActivateMacFontAscentHack): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
(WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
* WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
(WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::activateMacFontAscentHack): Deleted.
2014-05-29 Alexey Proskuryakov <ap@apple.com>
Add a sandbox profile for com.apple.appstore.CodeRedeemerNetscapePlugin
https://bugs.webkit.org/show_bug.cgi?id=133360
Reviewed by Sam Weinig.
* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Looks like
anyone using camera would need access to CoreMedia preferences.
* Resources/PlugInSandboxProfiles/com.apple.appstore.CodeRedeemerNetscapePlugin.sb: Added.
* WebKit2.xcodeproj/project.pbxproj: Added the profile.
2014-05-29 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add support for HiDPI icons
https://bugs.webkit.org/show_bug.cgi?id=133377
Reviewed by Martin Robinson.
* PlatformGTK.cmake: Compile also the @2x versions for the builtin icons.
2014-05-29 Owen Taylor <otaylor@redhat.com>
[GTK] Add HighDPI support for non-accelerated compositing contents
https://bugs.webkit.org/show_bug.cgi?id=131562
Reviewed by Anders Carlsson.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(deviceScaleFactorChanged): Added this callback to pass scale changes to the page proxy.
(webkitWebViewBaseCreateWebPage): Attach the callback to the notify signal.
* UIProcess/WebPageProxy.cpp:
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::WebPageProxy::setCustomDeviceScaleFactor): Do not set a
custom device scale factor for cairo when it's not supported.
(WebKit::createBackingStoreForGTK): Pass the scale factor to the WebCore backing store.
(WebKit::BackingStore::incorporateUpdate): Ditto.
2014-05-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use GMainLoopSource for idle and timeout sources in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=130081
Reviewed by Martin Robinson.
* Platform/WorkQueue.h:
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::registerSocketEventHandler): Stop pretending it's
possible to register a socket event handler for more than one
descriptor.
(WorkQueue::unregisterSocketEventHandler):
(WorkQueue::dispatch):
(WorkQueue::dispatchAfter):
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::DownloadClient):
(WebKit::DownloadClient::~DownloadClient):
(WebKit::DownloadClient::didReceiveData):
(WebKit::DownloadClient::handleResponse):
(WebKit::DownloadClient::handleResponseLater):
* UIProcess/Plugins/gtk/PluginInfoCache.cpp:
(WebKit::PluginInfoCache::PluginInfoCache):
(WebKit::PluginInfoCache::~PluginInfoCache):
(WebKit::PluginInfoCache::saveToFile):
(WebKit::PluginInfoCache::updatePluginInfo):
* UIProcess/Plugins/gtk/PluginInfoCache.h:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
(WebKit::LayerTreeHostGtk::layerFlushTimerFired):
(WebKit::LayerTreeHostGtk::scheduleLayerFlush):
(WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2014-05-28 Gavin Barraclough <baraclough@apple.com>
viewStateDidChange should always fully update ViewState
https://bugs.webkit.org/show_bug.cgi?id=133159
Reviewed by Anders Carlson.
Currently WebPageProxy::viewStateDidChange is passed a mask of bits to update.
This has the following negative consequences:
– WKWebView implicitly requires more detailed knowledge of the internal implementation of the PageClient.
– Updates may unnecessarily be split over multiple IPC messages.
– In order to support partial updates we make multiple virtual function calls to PageClient, which then makes duplicate objc calls.
Better to just always update the entire ViewState.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView didMoveToWindow]):
- removed argument to viewStateDidChange.
* UIProcess/API/gtk/PageClientImpl.cpp:
(WebKit::PageClientImpl::viewState):
(WebKit::PageClientImpl::isViewWindowActive): Deleted.
(WebKit::PageClientImpl::isViewFocused): Deleted.
(WebKit::PageClientImpl::isViewVisible): Deleted.
(WebKit::PageClientImpl::isViewInWindow): Deleted.
* UIProcess/API/gtk/PageClientImpl.h:
- merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
* UIProcess/API/mac/WKView.mm:
(-[WKView becomeFirstResponder]):
(-[WKView resignFirstResponder]):
(-[WKView viewDidMoveToWindow]):
(-[WKView _windowDidBecomeKey:]):
(-[WKView _windowDidResignKey:]):
(-[WKView _windowDidMiniaturize:]):
(-[WKView _windowDidDeminiaturize:]):
(-[WKView _windowDidOrderOffScreen:]):
(-[WKView _windowDidOrderOnScreen:]):
(-[WKView _windowDidChangeOcclusionState:]):
(-[WKView viewDidHide]):
(-[WKView viewDidUnhide]):
(-[WKView _activeSpaceDidChange:]):
(-[WKView _setThumbnailView:]):
(-[WKView endDeferringViewInWindowChanges]):
(-[WKView endDeferringViewInWindowChangesSync]):
- removed argument to viewStateDidChange.
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::viewState):
(WebKit::WebView::isViewWindowActive): Deleted.
(WebKit::WebView::isViewFocused): Deleted.
(WebKit::WebView::isViewVisible): Deleted.
(WebKit::WebView::isViewInWindow): Deleted.
* UIProcess/CoordinatedGraphics/WebView.h:
- merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
* UIProcess/PageClient.h:
(WebKit::PageClient::isViewVisibleOrOccluded): Deleted.
(WebKit::PageClient::isVisuallyIdle): Deleted.
- merged isViewVisibleOrOccluded/isVisuallyIdle to subclass viewState methods.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
- updateViewState -> PageClient::viewState
(WebKit::WebPageProxy::viewStateDidChange):
- argument removed; updateViewState -> PageClient::viewState.
(WebKit::WebPageProxy::setCursor):
- call isViewWindowActive on WebPageProxy, rather than PageClient.
(WebKit::WebPageProxy::updateBackingStoreDiscardableState):
- call isViewWindowActive on WebPageProxy, rather than PageClient.
(WebKit::WebPageProxy::updateViewState): Deleted.
- removed - viewState method moved to PageClient.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::isViewWindowActive):
- added missing implementation.
(WebKit::WebPageProxy::isViewVisible):
- removed argument to viewStateDidChange.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::windowServerConnectionStateChanged):
- removed argument to viewStateDidChange.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::viewState):
(WebKit::PageClientImpl::isViewWindowActive): Deleted.
(WebKit::PageClientImpl::isViewFocused): Deleted.
(WebKit::PageClientImpl::isViewVisible): Deleted.
(WebKit::PageClientImpl::isViewInWindow): Deleted.
(WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
(WebKit::PageClientImpl::isVisuallyIdle): Deleted.
- merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didMoveToWindow]):
(-[WKContentView _applicationDidEnterBackground:]):
(-[WKContentView _applicationWillEnterForeground:]):
- removed argument to viewStateDidChange.
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::viewState):
(WebKit::PageClientImpl::showCorrectionPanel):
(WebKit::PageClientImpl::showDictationAlternativeUI):
(WebKit::PageClientImpl::isViewWindowActive): Deleted.
(WebKit::PageClientImpl::isViewFocused): Deleted.
(WebKit::PageClientImpl::isViewVisibleOrOccluded): Deleted.
(WebKit::PageClientImpl::isVisuallyIdle): Deleted.
- merged isViewWindowActive/isViewFocused/isViewVisible/isViewInWindow to viewState.
2014-05-28 Jeffrey Pfau <jpfau@apple.com>
Add Obj-C API for cache partitioned URL schemes
https://bugs.webkit.org/show_bug.cgi?id=133361
<rdar://problem/17035415>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _initWithConfiguration:]):
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
(-[_WKProcessPoolConfiguration cachePartitionedURLSchemes]):
(-[_WKProcessPoolConfiguration setCachePartitionedURLSchemes:]):
(-[_WKProcessPoolConfiguration copyWithZone:]):
2014-05-28 Sam Weinig <sam@webkit.org>
[iOS WebKit2] Sometimes Safari gets into a limbo state after web process crash
<rdar://problem/17029526>
https://bugs.webkit.org/show_bug.cgi?id=133362
Reviewed by Dan Bernstein.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
Remove unnecessary initialization of a unique_ptr.
(WebKit::WebPageProxy::reattachToWebProcess):
Move calls to update the view state and activity tokens to after we have swapped in the new process.
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Clear the activity token on process exit.
2014-05-28 Timothy Horton <timothy_horton@apple.com>
Add WKWebView SPI to forcefully kill the associated Web process
https://bugs.webkit.org/show_bug.cgi?id=133357
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _killWebContentProcess]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-05-28 Dan Bernstein <mitz@apple.com>
[Cocoa] Crash when trying to decode an instance of a class inheriting from WKObject
https://bugs.webkit.org/show_bug.cgi?id=133355
Reviewed by Anders Carlsson.
* Shared/Cocoa/WKObject.mm:
(-[WKObject classForCoder]): Override this NSObject method to forward to the
target object.
(-[WKObject classForKeyedArchiver]): Ditto.
2014-05-28 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Improve behavior of position:fixed inside accelerated overflow-scroll
https://bugs.webkit.org/show_bug.cgi?id=133352
Reviewed by Tim Horton.
Pass the correct delta down to descendant nodes.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
2014-05-28 Andy Estes <aestes@apple.com>
[iOS] REGRESSION (r168388): DidNotHandleTapAsClick not sent when commitPotentialTap() fails
https://bugs.webkit.org/show_bug.cgi?id=133349
Reviewed by Benjamin Poulain.
WebPage::commitPotentialTap() fails when a recognized single tap cannot be sent as a synthetic click event.
We should send WebPageProxy::DidNotHandleTapAsClick in these cases.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::commitPotentialTap):
(WebKit::WebPage::commitPotentialTapFailed):
2014-05-28 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r169423.
https://bugs.webkit.org/show_bug.cgi?id=133348
It makes a lot of tests crash in assert (Requested by KaL on
#webkit).
Reverted changeset:
"[GTK] Use GMainLoopSource for idle and timeout sources in
WebKit2"
https://bugs.webkit.org/show_bug.cgi?id=130081
http://trac.webkit.org/changeset/169423
2014-05-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use GMainLoopSource for idle and timeout sources in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=130081
Reviewed by Martin Robinson.
* Platform/WorkQueue.h:
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::registerSocketEventHandler): Stop pretending it's
possible to register a socket event handler for more than one
descriptor.
(WorkQueue::unregisterSocketEventHandler):
(WorkQueue::dispatch):
(WorkQueue::dispatchAfter):
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::DownloadClient::DownloadClient):
(WebKit::DownloadClient::~DownloadClient):
(WebKit::DownloadClient::didReceiveData):
(WebKit::DownloadClient::handleResponse):
(WebKit::DownloadClient::handleResponseLater):
* UIProcess/Plugins/gtk/PluginInfoCache.cpp:
(WebKit::PluginInfoCache::PluginInfoCache):
(WebKit::PluginInfoCache::~PluginInfoCache):
(WebKit::PluginInfoCache::saveToFile):
(WebKit::PluginInfoCache::updatePluginInfo):
* UIProcess/Plugins/gtk/PluginInfoCache.h:
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::LayerTreeHostGtk):
(WebKit::LayerTreeHostGtk::layerFlushTimerFired):
(WebKit::LayerTreeHostGtk::scheduleLayerFlush):
(WebKit::LayerTreeHostGtk::cancelPendingLayerFlush):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2014-05-28 Dan Bernstein <mitz@apple.com>
[Cocoa] Can't use bundle-defined classes for bundle parameters
https://bugs.webkit.org/show_bug.cgi?id=133339
Reviewed by Anders Carlsson.
Ensure that bundle parameters are decoded only after the injected bundle is loaded.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::create): Moved the definition from the header to here, added the
lagacy initializationUserData as a parameter, and made this function set the sandbox
extension and load the bundle.
(WebKit::InjectedBundle::InjectedBundle): Removed call to platformInitialize.
* WebProcess/InjectedBundle/InjectedBundle.h:
(WebKit::InjectedBundle::setSandboxExtension): Deleted.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::initialize): Renamed the load function to this, and added the
creation parameters as a parameter. Moved code to initialize the bundle paramters from
platformInitialize to here. Changed the class passed to -decodeObjectOfClass:forKey: to
NSObject, to allow arbitrary types in the values, and added an assertion that the
top-level object is a dictionary.
(WebKit::InjectedBundle::platformInitialize): Deleted.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess): Changed to pass the legacy initialization user
data to InjectedBundle::create() and removed code to separately set the sandbox extension
and load the bundle, which is now done by create().
2014-05-28 Alberto Garcia <berto@igalia.com>
Unreviewed. Fix warning: unused parameter 'frame'
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didFinishDocumentLoad):
2014-05-27 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Fix behavior of position:sticky inside accelerated overflow-scroll
https://bugs.webkit.org/show_bug.cgi?id=133334
<rdar://problem/16462535>
Reviewed by Tim Horton.
When the scroll position changes in an accelerated overflow-scroll element, we have
to update child nodes in the scrolling tree for position:sticky. That requires a
more generic ability to update the scrolling tree after some arbitrary zoom or
scroll. To do this, we need to know the current fixed position rect, rather than
having it passed in.
So make the fixed position rect available from ScrollingTree, and make it possible
to get the current scrollPosition() from any ScrollingTreeScrollingNode.
Also, implement updateLayersAfterDelegatedScroll() in ScrollingTreeOverflowScrollingNodeIOS,
and have it update descendant layers.
Finally, fix ScrollingTreeOverflowScrollingNode to use the correct rectangle for its
constraints math, using the scroll position of the parent node if appropriate.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::fixedPositionRect):
* UIProcess/Scrolling/RemoteScrollingTree.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterDelegatedScroll):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::customFixedPositionRect):
2014-05-27 Simon Fraser <simon.fraser@apple.com>
Do some renaming in the scrolling tree
https://bugs.webkit.org/show_bug.cgi?id=133333
Reviewed by Tim Horton.
Rename ScrollingTreeNode::parentScrollPositionDidChange() to updateLayersAfterAncestorChange()
since this goes deep and to indicate that it's about layer updating.
Also rename the "viewportRect" parameter to "fixedPositionRect", since on iOS
this is the custom fixed-position rect that changes on zooming.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange):
2014-05-27 Geoffrey Garen <ggaren@apple.com>
Some proof-reading of the WebKit2 API headerdoc
https://bugs.webkit.org/show_bug.cgi?id=133328
Reviewed by Anders Carlsson.
Consistently say "item" to reference back-forward list items.
Consistently say "webpage" instead of "page" or "web page".
Consistently say "navigation" instead of "load".
Plus a few fix-ups for run-on sentences, mismatched verb tense, and
mismatched singular vs plural.
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.h:
* UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKProcessPool.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKWebView.h:
2014-05-27 Timothy Horton <timothy_horton@apple.com>
[wk2] PDFPlugin snapshots are misplaced
https://bugs.webkit.org/show_bug.cgi?id=133323
Reviewed by Simon Fraser.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::paintControlForLayerInContext):
(WebKit::PDFPlugin::snapshot):
Include the scroll offset in the snapshot translation,
and use the whole document size instead of just the view size.
2014-05-27 Sam Weinig <sam@webkit.org>
[WebKit2] Move WebPreferences macro definitions and key names into their own files
https://bugs.webkit.org/show_bug.cgi?id=133315
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* Shared/WebPreferencesDefinitions.h: Copied from Source/WebKit2/Shared/WebPreferencesStore.h.
* Shared/WebPreferencesKeys.cpp: Copied from Source/WebKit2/Shared/WebPreferencesStore.cpp.
* Shared/WebPreferencesKeys.h: Copied from Source/WebKit2/Shared/WebPreferencesStore.h.
* Shared/WebPreferencesStore.cpp:
* Shared/WebPreferencesStore.h:
* UIProcess/WebPreferences.cpp:
* UIProcess/WebPreferences.h:
* UIProcess/mac/WebContextMac.mm:
* UIProcess/mac/WebPreferencesMac.mm:
* UIProcess/mac/WebProcessProxyMac.mm:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebProcess.cpp:
2014-05-27 Gavin Barraclough <baraclough@apple.com>
Add UI process watchdog on iOS to ensure WebProcess connections close
https://bugs.webkit.org/show_bug.cgi?id=133200
<rdar://problem/16997983>
Mountain Lion build fix
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
2014-05-27 Gavin Barraclough <baraclough@apple.com>
importance_assertion -> denap_assertion
https://bugs.webkit.org/show_bug.cgi?id=133294
iOS build fix
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::open):
2014-05-27 Gavin Barraclough <baraclough@apple.com>
Add UI process watchdog on iOS to ensure WebProcess connections close
https://bugs.webkit.org/show_bug.cgi?id=133200
<rdar://problem/16997983>
Reviewed by Darin Adler.
When the WebProcessProxy wants to disconnect from a WebContent process it just drops the connection,
and hopes the connection closes. There is a watchdog thread in the ChildProcess to try to ensure this
happens.
On iOS the process may not be runnable at the time, preventing termination. Instead add a watchdog in
the UI process to make the process runnable, and to terminate if it doesn't quit in a timely fashion.
* Platform/IPC/Connection.h:
- added terminateSoon.
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
- take an assertion to make the process runnable, and start a watchdog timer.
(IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
- if the process hasn't quit by the timer the watchdog fires, kill it.
(IPC::Connection::terminateSoon):
- create a ConnectionTerminationWatchdog.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):
- when disconnecting from a process, first tell it to terminateSoon.
2014-05-26 Gavin Barraclough <barraclough@apple.com>
importance_assertion -> denap_assertion
https://bugs.webkit.org/show_bug.cgi?id=133294
Reviewed by Sam Weinig.
Update in accordance with API change. The importance assertion is used on
Mavericks & newer to ensure the WebContent process wakes from AppNap.
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::open):
- MACH_PORT_IMPORTANCE_RECEIVER -> MACH_PORT_DENAP_RECEIVER
* Platform/IPC/mac/ImportanceAssertion.h:
(IPC::ImportanceAssertion::ImportanceAssertion):
(IPC::ImportanceAssertion::~ImportanceAssertion):
- proc_importance_assertion -> proc_denap_assertion
2014-05-27 Jessie Berlin <jberlin@apple.com>
Revert r169362 since it broke the ML build.
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::ConnectionTerminationWatchdog::createConnectionTerminationWatchdog): Deleted.
(IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog): Deleted.
(IPC::ConnectionTerminationWatchdog::watchdogTimerFired): Deleted.
(IPC::Connection::terminateSoon): Deleted.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):
2014-05-27 Jon Lee <jonlee@apple.com>
Update ENABLE(MEDIA_SOURCE) on Mac
https://bugs.webkit.org/show_bug.cgi?id=133141
Reviewed by Darin Adler.
* Configurations/FeatureDefines.xcconfig:
2014-05-27 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
Remove BLOB guards
https://bugs.webkit.org/show_bug.cgi?id=132863
Reviewed by Csaba Osztrogonác.
* Configurations/FeatureDefines.xcconfig:
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didClose):
(WebKit::NetworkConnectionToWebProcess::blobSize):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
* NetworkProcess/NetworkProcessPlatformStrategies.h:
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
* WebProcess/FileAPI/BlobRegistryProxy.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::canHandleRequest):
2014-05-26 Tim Horton <timothy_horton@apple.com>
[wk2] RemoteLayerBackingStore front buffers should be purgeable when unparented
https://bugs.webkit.org/show_bug.cgi?id=133020
<rdar://problem/16521736>
Reviewed by Simon Fraser.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):
Let the context know whenever a RemoteLayerBackingStore is displayed, so that
RemoteLayerBackingStoreCollection can (if needed) note that the backing store
is active once again (because we only display parented backing store).
(WebKit::RemoteLayerBackingStore::setBufferVolatility):
Ensure that we never have live contexts attached to any buffers when
marking them volatile, because checking isInUse() with live contexts is futile.
* Shared/mac/RemoteLayerBackingStoreCollection.h:
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::RemoteLayerBackingStoreCollection):
(WebKit::RemoteLayerBackingStoreCollection::willFlushLayers):
(WebKit::RemoteLayerBackingStoreCollection::willCommitLayerTree):
(WebKit::RemoteLayerBackingStoreCollection::didFlushLayers):
(WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDestroyed):
(WebKit::RemoteLayerBackingStoreCollection::backingStoreWillBeDisplayed):
(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatileImmediately):
(WebKit::RemoteLayerBackingStoreCollection::markBackingStoreVolatile):
(WebKit::RemoteLayerBackingStoreCollection::backingStoreBecameUnreachable):
(WebKit::RemoteLayerBackingStoreCollection::volatilityTimerFired):
(WebKit::RemoteLayerBackingStoreCollection::scheduleVolatilityTimer):
(WebKit::RemoteLayerBackingStoreCollection::purgeabilityTimerFired): Deleted.
(WebKit::RemoteLayerBackingStoreCollection::schedulePurgeabilityTimer): Deleted.
Rename purgeable->volatile for accuracy.
Keep track of two sets of backing store: those which are active/parented, and
those which are not. Backing store is moved to the inactive set after building
the transaction in which its owning layer is unparented.
When backing store is unparented, try to mark it volatile immediately. Also,
mark the backing store property as dirty on the owning layer so that when
said layer is reparented, we encode the backing store in the commit that reparents it,
as the UI process will throw away its reference to the backing store when
the layer is unparented. Mark the front buffers of unparented layers as volatile,
in addition to the others.
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::layerIDsWithNewlyUnreachableBackingStore):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
(WebKit::RemoteLayerTreeTransaction::setLayerIDsWithNewlyUnreachableBackingStore):
Include the list of layers (by ID) with backing store which just became unreachable in the transaction.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
Clear the contents of layers which now have unreachable backing store.
Otherwise, the UI process would hold a 'use' on the IOSurface, and prevent
the Web process from marking it volatile.
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::backingStoreWillBeDisplayed):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
Give RemoteLayerBackingStoreCollection a shot at the RemoteLayerTreeTransaction,
so that it can fill in layerIDsWithNewlyUnreachableBackingStore.
Also, let it know when the flush begins and ends, so that it can keep track
of which layers were reached in the flush.
2014-05-26 Shivakumar JM <shiva.jm@samsung.com>
[EFL][WK2] Fix EWK2BackForwardListTest test fails.
https://bugs.webkit.org/show_bug.cgi?id=133171
Reviewed by Gyuyoung Kim.
Use local test html pages instead of EWK2UnitTestServer, call ewk_view_url_set() to load test html pages.
Since even after setting no_proxy="localhost,127.0.0.1", still test server was unable to load the test
html pages for ewk2_back_forward_list tests, so changed to use local html pages.
* UIProcess/API/efl/tests/test_ewk2_back_forward_list.cpp:
(TEST_F):
2014-05-26 Shivakumar JM <shiva.jm@samsung.com>
[EFL][WK2] Fix code style check errors in EFL API tests.
https://bugs.webkit.org/show_bug.cgi?id=133170
Reviewed by Gyuyoung Kim.
Omit int when using unsigned modifier, as per coding style rules.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::SetUp):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestEnvironment.h:
(EWK2UnitTest::EWK2UnitTestEnvironment::defaultWidth):
(EWK2UnitTest::EWK2UnitTestEnvironment::defaultHeight):
2014-05-22 Gavin Barraclough <baraclough@apple.com>
Add UI process watchdog on iOS to ensure WebProcess connections close
https://bugs.webkit.org/show_bug.cgi?id=133200
<rdar://problem/16997983>
Reviewed by Darin Adler.
When the WebProcessProxy wants to disconnect from a WebContent process it just drops the connection,
and hopes the connection closes. There is a watchdog thread in the ChildProcess to try to ensure this
happens.
On iOS the process may not be runnable at the time, preventing termination. Instead add a watchdog in
the UI process to make the process runnable, and to terminate if it doesn't quit in a timely fashion.
* Platform/IPC/Connection.h:
- added terminateSoon.
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::ConnectionTerminationWatchdog::ConnectionTerminationWatchdog):
- take an assertion to make the process runnable, and start a watchdog timer.
(IPC::ConnectionTerminationWatchdog::watchdogTimerFired):
- if the process hasn't quit by the timer the watchdog fires, kill it.
(IPC::Connection::terminateSoon):
- create a ConnectionTerminationWatchdog.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::removeWebPage):
- when disconnecting from a process, first tell it to terminateSoon.
2014-05-26 Sam Weinig <sam@webkit.org>
[WebKit2] Add better default preferences while keeping backward compatibility for the C-SPI
https://bugs.webkit.org/show_bug.cgi?id=133289
Reviewed by Anders Carlsson.
* Shared/WebPreferencesStore.h:
Change a few defaults:
- PluginsEnabled -> false
- JavaEnabled -> false
- JavaEnabledForLocalFiles -> false
- StorageBlockingPolicy -> BlockThirdPartyStorage
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesCreate):
(WKPreferencesCreateWithIdentifier):
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::WebPageGroup):
Switch to using WebPreferences::createWithLegacyDefaults().
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::create):
(WebKit::WebPreferences::createWithLegacyDefaults):
* UIProcess/WebPreferences.h:
Move create functions to the cpp file and add createWithLegacyDefaults() which keeps
the old defaults;
* UIProcess/API/C/WKPreferencesRef.h:
Fix the comment.
* UIProcess/API/Cocoa/WKPreferences.h:
Update the comment to reflect the new defaults.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Unconditionally set setShouldDispatchJavaScriptWindowOnErrorEvents() to true. This setting only
exists for legacy WebKit.
2014-05-26 Dan Bernstein <mitz@apple.com>
[Cocoa] Rewrite WK_DESIGNATED_INITIALIZER in installed headers
https://bugs.webkit.org/show_bug.cgi?id=133290
Reviewed by Anders Carlsson.
* Shared/API/Cocoa/WKFoundation.h: When WK_API_AVAILABILITY_ENABLED is defined, don’t
provide definitions of WK_DESIGNATED_INITIALIZER and WK_UNAVAILABLE, since those macros will
be rewritten out of the headers. When WK_API_AVAILABILITY_ENABLED isn’t defined, provide
definitions of the other two macros as appropriate for the target OS.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Removed WK_DESIGNATED_INITIALIZER from a
category method declaration.
* UIProcess/API/Cocoa/WKWebView.h: Mark the superclass designated initializer
-initWithCoder: as unavailable.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithCoder:]): Override this designated initializer of the superclass by
returning nil.
* mac/rewrite-availability-macros.sh: Rewrite WK_DESIGNATED_INITIALIZER to
NS_DESIGNATED_INITIALIZER and WK_UNAVAILABLE to NS_UNAVAILABLE. Also make sure to process
all headers if the script has changed since the last time it was run.
2014-05-26 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r169122.
https://bugs.webkit.org/show_bug.cgi?id=133288
Broke CJK font fallback (Requested by ap on #webkit).
Reverted changeset:
"[Mac] WebProcess doesn't follow localization of UI process
when run as a service"
https://bugs.webkit.org/show_bug.cgi?id=133126
http://trac.webkit.org/changeset/169122
2014-05-26 Anders Carlsson <andersca@apple.com>
Convert a couple of loops over to range-based for
https://bugs.webkit.org/show_bug.cgi?id=133287
Reviewed by Simon Fraser.
* UIProcess/Plugins/PluginInfoStore.cpp:
(WebKit::PluginInfoStore::findPluginForMIMEType):
(WebKit::PluginInfoStore::findPluginForExtension):
(WebKit::PluginInfoStore::infoForPluginWithPath):
* UIProcess/Plugins/mac/PluginProcessManagerMac.mm:
(WebKit::PluginProcessManager::setProcessSuppressionEnabled):
2014-05-26 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebProcess leaked when closing pages with network process enabled
https://bugs.webkit.org/show_bug.cgi?id=129684
Reviewed by Anders Carlsson.
The problem is that the web process is not notified when the UI
process closes the connection, because when close() is called on
the socket by the UI process, the socket is shared by another web
process launched later, preventing the connection from being
shut down. We need to set the CLOEXEC flag on the sockets file
descriptor to make sure they are not exposed to other processes.
* Platform/IPC/Connection.h: Add ConnectionOptions parameter to
createPlatformConnection() with a default value compatible with
existing callers.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::createPlatformConnection): Set the CLOEXEC flag
on the client and server socket file descriptors depending on the
options passed.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess): Use
IPC::Connection::createPlatformConnection() instead of
socketpair() directly, setting the CLOEXEC flag on the server
before spawning the new process and on the client right after
spawning the new process.
2014-05-25 Anders Carlsson <andersca@apple.com>
Initialize WKWebViewConfiguration ivars lazily
https://bugs.webkit.org/show_bug.cgi?id=133270
<rdar://problem/17027606>
Reviewed by Sam Weinig.
Create a LazyInitialized class template and use it to lazily initialize WKWebViewConfiguration properties.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(LazyInitialized::get):
Initialize m_value with the given function if it hasn't been initialized already.
(LazyInitialized::set):
Update m_value and set m_isInitialized to true.
(LazyInitialized::peek):
Return m_value without initializing it.
(-[WKWebViewConfiguration description]):
Use getters so we'll initialize variables if needed.
(-[WKWebViewConfiguration copyWithZone:]):
Ditto.
(-[WKWebViewConfiguration processPool]):
(-[WKWebViewConfiguration setProcessPool:]):
(-[WKWebViewConfiguration preferences]):
(-[WKWebViewConfiguration setPreferences:]):
(-[WKWebViewConfiguration userContentController]):
(-[WKWebViewConfiguration setUserContentController:]):
(-[WKWebViewConfiguration _visitedLinkProvider]):
(-[WKWebViewConfiguration _setVisitedLinkProvider:]):
(-[WKWebViewConfiguration _websiteDataStore]):
(-[WKWebViewConfiguration _setWebsiteDataStore:]):
(-[WKWebViewConfiguration _contentProviderRegistry]):
(-[WKWebViewConfiguration _setContentProviderRegistry:]):
Pass initialization code to all getters.
(-[WKWebViewConfiguration _validate]):
Use getters.
(-[WKWebViewConfiguration init]): Deleted.
2014-05-26 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
Remove WebKit2 framework from generate-forwarding-headers.pl
https://bugs.webkit.org/show_bug.cgi?id=133214
Since renaming WebKit2.framework to WebKit.framework is done and all WebKit2/*.h includes
were renamed to WebKit/*.h, generating forwarding headers for WebKit2/*.h framework style
headers is not necessary anymore.
Reviewed by Darin Adler.
* Scripts/generate-forwarding-headers.pl:
2014-05-26 Zan Dobersek <zdobersek@igalia.com>
WebPage::setComposition(), WebPageProxy::didFindStringMatches() should take Vector parameters by const reference
https://bugs.webkit.org/show_bug.cgi?id=133264
Reviewed by Darin Adler.
Taking the Vector parameters in the two methods (invoked through the IPC message handling)
by value causes unnecessary copies. The methods don't modify the objects and don't want
or need fresh copies, hence they should take in const references to Vector objects.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFindStringMatches):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setComposition):
* WebProcess/WebPage/WebPage.h:
2014-05-25 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] Fix some state reset on crash on the WKWebView
https://bugs.webkit.org/show_bug.cgi?id=133039
Reviewed by Sam Weinig.
This is in no way complete, but this should reduce the undefined states on crash.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _processDidExit]):
If the view is animating, nuke the resize animation. That should be invisible to the user
because the background color is reset to white below.
Reset the contentView frame and scrollview state.
Reset the runtime states. We do not strictly need to reset _needsResetViewStateAfterCommitLoadForMainFrame,
_delayUpdateVisibleContentRects and _hadDelayedUpdateVisibleContentRects but it seems better to have
a clean slate.
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _endAnimatedResize]):
We could have crashes during rotation. To simplify the reset code, the animated resize code
no longer change any state when WKWebView is using a custom content view.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::processDidExit):
Send a _processDidExit on the WKWebView too.
2014-05-25 Anders Carlsson <andersca@apple.com>
Use the right paths for website data
https://bugs.webkit.org/show_bug.cgi?id=133267
<rdar://problem/17027698>
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _initWithConfiguration:]):
Get the path of the absolute URL.
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::databasePath):
Fix spelling error.
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didCacheResource):
Ditto.
2014-05-25 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Use ScrollView's scrollOffset as the unobscuredContentRect
https://bugs.webkit.org/show_bug.cgi?id=133262
Reviewed by Simon Fraser.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::viewportConfigurationChanged):
(WebKit::WebPage::updateVisibleContentRects):
2014-05-25 Sam Weinig <sam@webkit.org>
Build fix 2.
* UIProcess/API/Cocoa/WKPreferences.h:
2014-05-25 Sam Weinig <sam@webkit.org>
Fix build.
* UIProcess/API/Cocoa/WKPreferences.h:
2014-05-24 Sam Weinig <sam@webkit.org>
[WebKit2] Rework WebPreferencesStore to allow easier overriding of defaults
https://bugs.webkit.org/show_bug.cgi?id=133258
Reviewed by Anders Carlsson.
To support changing default values of preferences based on which API you are using (either
the legacy C-SPI or the Objective-C API), overhaul the WebPreferencesStore to use a single
HashMap of String -> Value (where Value is new type that can be a String, bool, uint32_t or double)
instead of four HashMaps. This allows us to use two of these new HashMaps, one for the actual
set values, and one for overridden defaults. This new Value class will also allow easier incremental
updating of preferences in the future.
Other notable changes:
- Removed Float kind of preferences. There were none.
- Move StorageBlockingPolicy preference to the correct group, it's a uint32_t, not bool.
* Shared/WebPreferencesStore.cpp:
* Shared/WebPreferencesStore.h:
2014-05-25 David Kilzer <ddkilzer@apple.com>
Add type-checked casts for TransformOperations
<http://webkit.org/b/133217>
Reviewed by Simon Fraser.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<TransformOperations>::encode):
- Switch to type-checked casts.
2014-05-25 David Kilzer <ddkilzer@apple.com>
Use type-checking FilterOperation casts in CoordinatedGraphicsArgumentCoders.cpp
<http://webkit.org/b/133203>
Reviewed by Simon Fraser.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<WebCore::FilterOperations>::encode):
- Replace static_cast<>() operators with type-checking
FilterOperation casts.
- Replace 'default' statement with 'case' statements so new
filters added later require an explicit decision to be made.
(IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
- Replace 'default' statement with 'case' statements so new
filters added later require an explicit decision to be made.
2014-05-24 Jon Honeycutt <jhoneycutt@apple.com>
Potential null dereference in
WebFrameLoaderClient::dispatchDidFailProvisionalLoad()
<https://bugs.webkit.org/show_bug.cgi?id=133193>
WebFrameLoaderClient::dispatchDidFailProvisionalLoad() calls the
InjectedBundleLoaderClient's didFailProvisionalLoadWithErrorForFrame()
before sending a message to the UI process that a provisional load has
failed. It's possible for the provisional document loader to become
null while calling into the InjectedBundleLoaderClient (as is the case
with the WebKitTestRunner's injected bundle), leading to a null
dereference when trying to send the DidFailProvisionalLoadForFrame
message.
Reviewed by Darin Adler.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFailProvisionalLoad):
Get the navigation ID before calling into the injected bundle.
2014-05-23 Simon Fraser <simon.fraser@apple.com>
Rename ScrollingTreeScrollingNode's m_scrollPosition to make it clear that it's the value committed from the state tree
https://bugs.webkit.org/show_bug.cgi?id=133254
Reviewed by Tim Horton.
Override scrollPosition() on ScrollingTreeOverflowScrollingNodeIOS.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollPosition):
2014-05-24 Chris Fleizach <cfleizach@apple.com>
AX: fix coordinate mapping for iOS accessibility
https://bugs.webkit.org/show_bug.cgi?id=133188
Reviewed by Sam Weinig.
Add in accessibility conversion methods that will check if the methods are present
(if accessibility is not on, they won't be)
and use those to convert points into the right coordinate space that VoiceOver is expecting.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::accessibilityScreenToRootView):
(WebKit::WebPageProxy::rootViewToAccessibilityScreen):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::accessibilityScreenToRootView):
(WebKit::PageClientImpl::rootViewToAccessibilityScreen):
* UIProcess/mac/PageClientImpl.h:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::accessibilityScreenToRootView):
(WebKit::WebChromeClient::rootViewToAccessibilityScreen):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::accessibilityScreenToRootView):
(WebKit::WebPage::rootViewToAccessibilityScreen):
* WebProcess/WebPage/WebPage.h:
2014-05-24 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r165841): Messages sent before the child process is launched are never sent after r165841
https://bugs.webkit.org/show_bug.cgi?id=131675
Reviewed by Anders Carlsson.
Since r165841 the connection is opened after the pending messages
are sent, because connectionWillOpen might send messages that we
want to happen after the ones already pending. The problem is that
Connection::canSendOutgoingMessages() returns false when
connection hasn't been opened. We should ensure no messages are
sent by connectionWillOpen.
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching): Open the
connection before sending pending messages.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::connectionWillOpen): Do not call
VisitedLinkProvider::addProcess() here because it tries to send a
message to the web process, but the connection hasn't be opened yet.
(WebKit::WebPageProxy::processDidFinishLaunching): Call
VisitedLinkProvider::addProcess() here instead.
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didFinishLaunching): Call
WebPageProxy::processDidFinishLaunching() for every web page.
2014-05-23 Ian Henderson <ianh@apple.com>
REGRESSION: Rubberbanding out jumps to top left corner on google.com
https://bugs.webkit.org/show_bug.cgi?id=133253
<rdar://problem/17025664>
Reviewed by Benjamin Poulain.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillEndDragging:withVelocity:targetContentOffset:]):
Avoid deceleration during zooming to work around a UIKit bug.
2014-05-23 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Avoid updating the view from the viewport configuration unnecessarily
https://bugs.webkit.org/show_bug.cgi?id=133255
<rdar://problem/16890926>
Reviewed by Simon Fraser.
All the updates were mostly harmless since they are pretty cheap, but they can be
very annoying for debugging.
This patch skips viewportUpdates in the trivial cases.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setMinimumLayoutSizeOverride:]):
(-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mainFrameDidLayout):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportPropertiesDidChange):
2014-05-23 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] The page scale factor randomly resets to initial scale when editing
https://bugs.webkit.org/show_bug.cgi?id=133244
Reviewed by Enrica Casucci.
We were never telling the WebProcess that zoom is used triggered. As a result, the ViewportConfiguration was free
to reset the scale whenever it felt like it. The fix is to call willStartUserTriggeredZoom before changing the scale.
This patch also split _willStartUserTriggeredScrollingOrZooming from willStartUserTriggeredZoom
and rename it to willStartPanOrPinchGesture. This is just a tiny cleanup since the only thing left in _willStartUserTriggeredScrollingOrZooming
was gesture related.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowScaling:forceScroll:]):
(-[WKWebView scrollViewWillBeginZooming:withView:]):
(-[WKWebView scrollViewWillBeginDragging:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView scrollViewWillBeginDragging:]):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView willStartUserTriggeredZoom]):
(-[WKContentView willStartUserTriggeredScroll]): Deleted.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView willStartPanOrPinchGesture]):
(-[WKContentView _willStartUserTriggeredScrollingOrZooming]): Deleted.
2014-05-23 Tim Horton <timothy_horton@apple.com>
REGRESSION (iOS WebKit2): requestAnimationFrame fires more than once between layer tree commits
https://bugs.webkit.org/show_bug.cgi?id=132794
<rdar://problem/16877909>
Reviewed by Simon Fraser.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createDisplayRefreshMonitor):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::graphicsLayerFactory):
(WebKit::DrawingArea::createDisplayRefreshMonitor):
Plumb the DisplayRefreshMonitor request through to the DrawingArea.
RemoteLayerTreeDrawingArea will implement and return a RemoteLayerTreeDisplayRefreshMonitor.
* WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.h: Added.
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::create):
* WebProcess/WebPage/Cocoa/RemoteLayerTreeDisplayRefreshMonitor.mm: Added.
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::RemoteLayerTreeDisplayRefreshMonitor):
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::~RemoteLayerTreeDisplayRefreshMonitor):
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::requestRefreshCallback):
When requesting a display refresh callback, schedule a layer commit.
It may end up being empty, but will still call us back with a didUpdate,
upon which we'll fire the callback.
(WebKit::RemoteLayerTreeDisplayRefreshMonitor::didUpdateLayers):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::createDisplayRefreshMonitor):
(WebKit::RemoteLayerTreeDrawingArea::willDestroyDisplayRefreshMonitor):
Keep track of the set of DisplayRefreshMonitors.
(WebKit::RemoteLayerTreeDrawingArea::didUpdate):
Fire requestAnimationFrame callbacks once the UI process commits the new layer tree.
2014-05-23 Jeremy Jones <jeremyj@apple.com>
Hide fullscreen immediately when switching tabs.
https://bugs.webkit.org/show_bug.cgi?id=133239
Reviewed by Eric Carlson.
Renamed a function to better describe it's new functionality.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange):
now calls: requestHideAndExitFullscreen
2014-05-23 Enrica Casucci <enrica@apple.com>
REGRESSION (WebKit2): Keyboard disappears/appears automatically between text boxes.
https://bugs.webkit.org/show_bug.cgi?id=133243
<rdar://problem/16761913>
Reviewed by Benjamin Poulain.
We need to ensure that when an element loses focus and another one gets it,
this is handled in one single message in the UI process to avoid seeing
the keyboard animating in and out.
This is accomplished by always postponing the blur notification until all events
have been processed.
If a new node is focused before the delayed blur notification is sent to the UI
process, the message we send includes both blur and focus notification. In this case,
the postponed blur notification is not sent.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::startAssistingNode):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startAssistingNode:userIsInteracting:blurPreviousNode:userObject:]):
(-[WKContentView _startAssistingNode:userIsInteracting:userObject:]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::startAssistingNode):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::elementDidFocus):
(WebKit::WebPage::elementDidBlur):
2014-05-23 Anders Carlsson <andersca@apple.com>
Remove an assertion.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::loadRequest):
2014-05-23 Tim Horton <timothy_horton@apple.com>
[iOS] WKPDFView should have a page indicator
https://bugs.webkit.org/show_bug.cgi?id=133109
<rdar://problem/16383003>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setHasCustomContentView:loadedMIMEType:WTF::]):
(-[WKWebView _setObscuredInsets:]):
Forward obscured insets changes to the custom content view.
(-[WKWebView _updateScrollViewBackground]):
If we have a custom content view, use its background instead of the
(likely nonexistent) page's when updaing the scroll view's background color.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/WKWebViewContentProvider.h:
* UIProcess/Cocoa/WKWebViewContentProviderDelegate.h: Added.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setInsetForOverlaidAccessoryViews:]):
Add SPI for clients to inform us about potential overlaid accessory views
which should be taken into account e.g. for positioning the page indicator.
Add a view that sits fixed on top of the WKWebView, ignores interaction,
but provides the WKWebViewContentProvider a place to install views
that don't scroll along with the content.
* UIProcess/ios/WKPDFPageNumberIndicator.h: Added.
* UIProcess/ios/WKPDFPageNumberIndicator.mm: Added.
(-[WKPDFPageNumberIndicator initWithFrame:]):
(-[WKPDFPageNumberIndicator dealloc]):
(-[WKPDFPageNumberIndicator setCurrentPageNumber:]):
(-[WKPDFPageNumberIndicator setPageCount:]):
(-[WKPDFPageNumberIndicator show]):
(-[WKPDFPageNumberIndicator hide:]):
(-[WKPDFPageNumberIndicator moveToPoint:animated:]):
(-[WKPDFPageNumberIndicator sizeThatFits:]):
(-[WKPDFPageNumberIndicator _updateLabel]):
(-[WKPDFPageNumberIndicator _makeRoundedCorners]):
Add a page number indicator.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView dealloc]):
(-[WKPDFView web_setScrollView:]):
(-[WKPDFView _revalidateViews]):
(-[WKPDFView _offsetForPageNumberIndicator]):
(-[WKPDFView _updatePageNumberIndicator]):
(-[WKPDFView web_setObscuredInsets:]):
(-[WKPDFView web_setInsetForOverlaidAccessoryViews:]):
(-[WKPDFView web_setFixedOverlayView:]):
(-[WKPDFView _computePageAndDocumentFrames]):
Update the page number indicator when the topmost visible page changes.
Move the page number indicator around when the obscured insets change.
* WebKit2.xcodeproj/project.pbxproj:
2014-05-23 Anders Carlsson <andersca@apple.com>
Fix test failures on the bot.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(websiteDataDirectoryURL):
If we have no bundle identifier, use the process name.
2014-05-23 Enrica Casucci <enrica@apple.com>
REGRESSION (iOS WebKit2): Autocorrection is not accurate when changing selection.
https://bugs.webkit.org/show_bug.cgi?id=133237
<rdar://problem/16655776>
Reviewed by Ryosuke Niwa.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView beginSelectionChange]):
(-[WKContentView endSelectionChange]):
When the selection is changed with a gesture in an editable element,
we must notify the keyboard to make sure the autocorrection engine
updates its typing context. WKContentView must implement
beginSelectionChange and endSelectionChange to call into
the keyboard layer.
2014-05-22 Brent Fulgham <bfulgham@apple.com>
[iOS] WK2: Provide implementation for windowFrame
https://bugs.webkit.org/show_bug.cgi?id=133205
<rdar://problem/16894890>
Reviewed by Benjamin Poulain.
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::windowFrame): Added.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::convertToUserSpace): Added.
2014-05-20 Anders Carlsson <andersca@apple.com>
Use a per app directory structure for website data
https://bugs.webkit.org/show_bug.cgi?id=133125
<rdar://problem/16830143>
Reviewed by Dan Bernstein, Sam Weinig and Tim Horton.
Put website data in subdirectories of ~/Library/WebKit/<bundle ID>/WebsiteData.
We use "LocalStorage", "WebSQL", and "IndexedDB" subdirectories.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(websiteDataDirectoryURL):
(-[WKProcessPool _initWithConfiguration:]):
2014-05-23 Dan Bernstein <mitz@apple.com>
[Cocoa] WKNavigationResponsePrivate.h is internal
https://bugs.webkit.org/show_bug.cgi?id=133218
Reviewed by Dean Jackson.
* WebKit2.xcodeproj/project.pbxproj: Promote WKNavigationResponsePrivate.h to private.
2014-05-23 Carlos Garcia Campos <cgarcia@igalia.com>
[UNIX] Reorganize and cleanup main functions of GTK and EFL ports
https://bugs.webkit.org/show_bug.cgi?id=131024
Reviewed by Gustavo Noronha Silva.
Move main function implementation files to <process-dir>/EntryPoint/unix/<ProcessName>Main.cpp
files that are now shared by GTK and EFL ports. These files call a
main method that wraps a new method ChildProcessMain that contains
the common code and uses a helper class for the platform specific
code. GTK+ and EFL ports implement that helper class for every process type.
* NetworkProcess/EntryPoint/unix/NetworkProcessMain.cpp: Renamed from Source/WebKit2/efl/MainEfl.cpp.
(main):
* NetworkProcess/efl/NetworkProcessMainEfl.cpp: Renamed from Source/WebKit2/unix/NetworkMainUnix.cpp.
(WebKit::NetworkProcessMainUnix):
* NetworkProcess/gtk/NetworkProcessMainGtk.cpp: Renamed from Source/WebKit2/NetworkProcess/unix/NetworkProcessMainUnix.cpp.
(WebKit::NetworkProcessMainUnix):
* NetworkProcess/unix/NetworkProcessMainUnix.h:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* PluginProcess/EntryPoint/unix/PluginProcessMain.cpp: Renamed from Source/WebKit2/unix/PluginMainUnix.cpp.
(main):
* PluginProcess/unix/PluginProcessMainUnix.cpp:
(WebKit::webkitXError):
(WebKit::PluginProcessMainUnix):
* PluginProcess/unix/PluginProcessMainUnix.h:
* Shared/unix/ChildProcessMain.cpp: Copied from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
(WebKit::ChildProcessMainBase::parseCommandLine):
* Shared/unix/ChildProcessMain.h: Renamed from Source/WebKit2/WebProcess/gtk/WebProcessMainGtk.h.
(WebKit::ChildProcessMainBase::platformInitialize):
(WebKit::ChildProcessMainBase::platformFinalize):
(WebKit::ChildProcessMainBase::initializationParameters):
(WebKit::ChildProcessMain):
* WebProcess/EntryPoint/unix/WebProcessMain.cpp: Renamed from Source/WebKit2/gtk/MainGtk.cpp.
(main):
* WebProcess/efl/WebProcessMainEfl.cpp:
(WebKit::WebProcessMainUnix):
(dummyExtensionErrorHandler): Deleted.
* WebProcess/gtk/WebProcessMainGtk.cpp:
(WebKit::WebProcessMainUnix):
* WebProcess/unix/WebProcessMainUnix.h: Renamed from Source/WebKit2/WebProcess/efl/WebProcessMainEfl.h.
2014-05-22 Zan Dobersek <zdobersek@igalia.com>
Have the decoded element in VectorArgumentCoder::decode() moved into Vector::append()
https://bugs.webkit.org/show_bug.cgi?id=133082
Reviewed by Andreas Kling.
* Platform/IPC/ArgumentCoders.h: Move the decoded element into the Vector::append() call.
This enforces a move instead of a copy if the decoded element's type is move-constructible.
2014-05-22 Zan Dobersek <zdobersek@igalia.com>
Move the passed-in Vector<Attachment> in MessageDecoder constructor down into ArgumentDecoder
https://bugs.webkit.org/show_bug.cgi?id=133080
Reviewed by Andreas Kling.
* Platform/IPC/MessageDecoder.cpp:
(IPC::MessageDecoder::MessageDecoder): The Vector<Attachment> object was passed in by value.
Move it into the ArgumentDecoder constructor as it is not used elsewhere in this constructor
and produces a copy otherwise.
2014-05-22 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Add support for minimal-ui viewports
https://bugs.webkit.org/show_bug.cgi?id=133162
Reviewed by Simon Fraser.
In the WebKit2 layers, we have two parts to minimal-ui.
-In WebPage, we need to get the values from the UIProcess and setup the ViewportConfiguration.
Another part is freezing the state on page load.
-In the UIProcess, we need to get the right information for layout and styling, and we need to tell
the UI clients about minimal-ui changes.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setUsesMinimalUI:]):
(-[WKWebView _usesMinimalUI]):
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _minimumLayoutSizeOverride]):
(-[WKWebView _setMinimumLayoutSizeOverride:]):
(-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
(-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
(-[WKWebView _largestUnobscuredSizeOverride]):
(-[WKWebView _setMaximumUnobscuredSizeOverride:]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(setViewportConfigurationMinimumLayoutSize): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setUsesMinimalUI):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
(WebKit::WebPageProxy::setMaximumUnobscuredSize):
(WebKit::WebPageProxy::setUsesMinimalUI):
(WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setViewportConfigurationMinimumLayoutSizeForMinimalUI):
(WebKit::WebPage::setMaximumUnobscuredSize):
(WebKit::WebPage::wi