blob: 916ab635d0090818643c8243b90a3f81caeb5dd8 [file] [log] [blame]
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::willFlushLayers):
(WebKit::WebPage::dynamicViewportSizeUpdate):
(WebKit::WebPage::viewportConfigurationChanged):
(WebKit::WebPage::updateViewportSizeForCSSViewportUnits):
(WebKit::WebPage::setMinimumLayoutSizeForMinimalUI): Deleted.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2014-05-22 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Reset the special action-target of WKSyntheticClickTapGestureRecognizer on destruction
https://bugs.webkit.org/show_bug.cgi?id=133165
<rdar://problem/16283914>
Reviewed by Andy Estes.
It is unclear why, but the WKSyntheticClickTapGestureRecognizer sometimes survives its own view
and is reset after WKContentView was destructed.
This patch cleans up the target-action on destruction to avoid accessing a destructed object.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
2014-05-22 Benjamin Poulain <bpoulain@apple.com>
Do not force a layout when changing the FixedLayoutSize in WebPage
https://bugs.webkit.org/show_bug.cgi?id=133167
Reviewed by Andreas Kling.
WebPage::setFixedLayoutSize was forcing a layout immediately after changing the layout size on FrameView.
This is forcing plenty of extra layouts since the fixed layout size is one of many properties updated on the FrameView.
FrameView marks that layout is needed. It is not clear why a layout was performed immediately.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setFixedLayoutSize):
2014-05-22 Andreas Kling <akling@apple.com>
[iOS WebKit2] Web process should try to shrink its memory footprint when going into background.
<https://webkit.org/b/133197>
<rdar://problem/17011561>
Try to free up as much memory as possible before going into background.
Reviewed by Gavin Barraclough.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::processWillSuspend):
2014-05-22 Andreas Kling <akling@apple.com>
Hook up a setting for showing detailed logging during memory pressure relief.
<https://webkit.org/b/133194>
Plumb through the same setting that we used for detailed logging in WK1.
Reviewed by Gavin Barraclough.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-05-22 Andy Estes <aestes@apple.com>
[iOS] Send shareable resources to QuickLook if enabled
https://bugs.webkit.org/show_bug.cgi?id=133189
<rdar://problem/17003995>
Reviewed by Brady Eidson.
Like we do for didReceiveData(), we need to pass an incoming ShareableResource to QuickLook if a QuickLook
handle exists.
* Shared/ShareableResource.cpp:
(WebKit::ShareableResource::Handle::tryWrapInCFData): Return the shared resource in a CFDataRef.
(WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): Implemented in terms of tryWrapInCFData().
* Shared/ShareableResource.h:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResource): If a QuickLook handle exists, send the shareable resource to
it via a CFDataRef.
2014-05-22 Martin Hock <mhock@apple.com>
[iOS] Enable -apple-system- styled elements to respond to system font size changes.
https://bugs.webkit.org/show_bug.cgi?id=133186
<rdar://problem/16583782>
Reviewed by Enrica Casucci.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _contentSizeCategoryDidChange:]):
(-[WKWebView _contentSizeCategory]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::contentSizeCategoryDidChange):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::contentSizeCategoryDidChange):
2014-05-22 Alexey Proskuryakov <ap@apple.com>
[iOS] Add CFBundleAllowMixedLocalizations to WebContentService
https://bugs.webkit.org/show_bug.cgi?id=133187
<rdar://problem/16561084>
Reviewed by Tim Horton.
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-iOS.plist:
We already had it in WebContentService.Development, just not here.
2014-05-22 Alexey Proskuryakov <ap@apple.com>
[iOS][WK2] Application cache is broken
https://bugs.webkit.org/show_bug.cgi?id=133172
<rdar://problem/16994593>
Reviewed by Andy Estes.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultApplicationCacheDirectory): Use a proper
path for application cache database (same as WebKit1).
2014-05-22 Enrica Casucci <enrica@apple.com>
REGRESSION (WebKit2): Keyboard should have Search button in duckduckgo.com.
https://bugs.webkit.org/show_bug.cgi?id=133183
<rdar://problem/17004207>
Reviewed by Geoff Garen.
The keyboard type should be search if the input type is search
or if it is text and it is inside a form with an action and either
name, id or title contain the word search. This matches the
heuristics we have in WK1 for iOS.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):
2014-05-21 Oliver Hunt <oliver@apple.com>
Only enable sandbox extensions on mac.
RS = Alexey.
* WebKit2Prefix.h:
2014-05-21 Oliver Hunt <oliver@apple.com>
[iOS] Enable sandboxing for the database process
https://bugs.webkit.org/show_bug.cgi?id=132963
Reviewed by Alexey Proskuryakov.
Simply ensure that the database process is running in a tight
sandbox. As part of this i've separated out ChildProcessIOS
and ensures that the database process loads a custom sandbox.
* Configurations/WebKit.xcconfig:
* DatabaseProcess/ios/DatabaseProcessIOS.mm:
(WebKit::DatabaseProcess::initializeSandbox):
* DatabaseProcess/ios/com.apple.WebKit.DatabasesIOS.sb: Added.
* Shared/ios/ChildProcessIOS.mm: Added.
Essentially cloned from the Mac version, only all the OSX
specific logic has been stripped.
(WebKit::ChildProcess::setApplicationIsDaemon):
(WebKit::ChildProcess::platformInitialize):
(WebKit::ChildProcess::initializeSandbox):
(WebKit::ChildProcess::setQOS):
* Shared/mac/ChildProcessMac.mm:
Remove all the IOS ifdefs.
(WebKit::ChildProcess::setApplicationIsDaemon):
(WebKit::ChildProcess::platformInitialize):
(WebKit::ChildProcess::initializeSandbox):
(WebKit::ChildProcess::setQOS):
* WebKit2.xcodeproj/project.pbxproj:
2014-05-21 Andy Estes <aestes@apple.com>
[iOS] Create a UIPrintFormatter for WKWebView
https://bugs.webkit.org/show_bug.cgi?id=133005
Reviewed by Tim Horton.
Implemented a UIPrintFormatter subclass to support printing WKWebViews using UIPrintInteractionController.
Overrode -_recalcPageCount: to synchronously ask the web process to lay out for printing and return the number
of page rects. The web process returns the page rects immediately and then starts rendering the page to a PDF,
returning the PDF data to the UI process asynchronously. When UIPrintInteractionController later calls our
overridden -drawInRect:forPageAtIndex:, we block and wait for the PDF data to be returned. Since
UIPrintInteractionController draws each page after a delay, it's possible that the web process has already
returned the PDF data to us by the time we print the first page.
* Shared/WebPreferencesStore.h: Correctly initialized shouldPrintBackgrounds for iOS.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _dataForDisplayedPDF]): Now that WKPDFView vends its CGPDFDocument directly, extract its data here.
(-[WKWebView _printFormatterClass]): Tell UIView which UIPrintFormatter to alloc.
(-[WKWebView _computePageCountAndStartDrawingToPDFWithPrintInfo:WebKit::firstPage:computedTotalScaleFactor:]):
If we're displaying a PDF, return its page count directly. Otherwise, synchronously ask the web process to
compute page rects for printing and then return the number of rects.
(-[WKWebView _endPrinting]): Cleared state and sent the WebPage::EndPrinting message to the web process.
(-[WKWebView _printedDocument]): If we're displaying a PDF, return its data directly. Otherwise, if we haven't
received PDF data from the web process yet, wait for it indefinitely (there's no sensible timeout to use here
since failing to receive the data results in printing some number of blank pages).
(-[WKWebView _setPrintedDocument:]): Set the CGPDFDocument received from the web process.
* UIProcess/API/Cocoa/WKWebViewInternal.h: Declared methods called by WKWebViewPrintFormatter.
* UIProcess/PageClient.h: Declared didFinishDrawingPagesToPDF.
* UIProcess/WKWebViewPrintFormatter.h: Added.
* UIProcess/WKWebViewPrintFormatter.mm: Added.
(-[WKWebViewPrintFormatter dealloc]): Cleared state and called -[WKWebView _endPrinting].
(-[WKWebViewPrintFormatter webView]): Returned the WKWebView for this print formatter.
(-[WKWebViewPrintFormatter _recalcPageCount]): Set up a PrintInfo object given the formatter's content rect
and called -_computePageCountAndStartDrawingToPDFWithPrintInfo:...
(-[WKWebViewPrintFormatter rectForPageAtIndex:]): Called -_recalcIfNecessary and then returned the rect from
-_pageContentRect.
(-[WKWebViewPrintFormatter drawInRect:forPageAtIndex:]): Taught to draw the given page of the printed PDF
document into the given rect and context provided to us.
* UIProcess/WebPageProxy.h: Declared didFinishDrawingPagesToPDF.
* UIProcess/WebPageProxy.messages.in: Added DidFinishDrawingPagesToPDF. Made this a delayed syncrhonous message
so that additoinal work could be performed after sending the response.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didFinishDrawingPagesToPDF): Created a CGPDFDocument from the data sent to us by the
web process and called -[WKWebView _setPrintedDocument:].
* UIProcess/ios/WKPDFView.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView pdfDocument]): Returned the underlying CGPDFDocument.
(-[WKPDFView documentData]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didFinishDrawingPagesToPDF):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::computePagesForPrinting): Changed to call computePagesForPrintingImpl.
(WebKit::WebPage::computePagesForPrintingImpl): Moved the common logic of computePagesForPrinting to here so it
could be called by computePagesForPrintingAndStartDrawingToPDF.
(WebKit::WebPage::drawPagesToPDF): Changed to call drawPagesToPDFImpl
(WebKit::WebPage::drawPagesToPDFImpl): Moved the common logic of drawPagesToPDF to here so it could be called
by computePagesForPrintingAndStartDrawingToPDF.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::computePagesForPrintingAndStartDrawingToPDF): Computed page rects and returned them as a
synchronous response. Afterwards called drawPagesToPDFImpl() and returned the PDF data by sending
WebPageProxy::DidFinishDrawingPagesToPDF.
2014-05-21 Michał Pakuła vel Rutka <m.pakula@samsung.com>
[EFL] Turn on ENABLE_CSS_FILTERS
https://bugs.webkit.org/show_bug.cgi?id=133153
Reviewed by Gyuyoung Kim.
Make WebKit2 compile after r166741 when CSS_FILTERS are enabled.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<WebCore::FilterOperations>::decode):
2014-05-21 Brady Eidson <beidson@apple.com>
Special handling of telephone number detection menu.
<rdar://problem/16967971> and https://bugs.webkit.org/show_bug.cgi?id=133143
Reviewed by Geoff Garen.
Add a bool to ContextMenuContextData to represent telephone number menus:
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::operator=):
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::isTelephoneNumberContext):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::showContextMenu): If the menu is a telephone
number menu then display it using a specific AppKit API.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showTelephoneNumberMenu): Filter the array of menu items
through a new WKSI call, and then show it using a telephone number context.
2014-05-21 Alexey Proskuryakov <ap@apple.com>
[Mac] REGRESSION (Async text input): Asian text input doesn't work in Flash
https://bugs.webkit.org/show_bug.cgi?id=133128
<rdar://problem/16890920>
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView _interpretKeyEvent:completionHandler:]): Added a separate code path for
plug-in input. Before async text input, we used to provide a nil input context due
to having _data->_interpretKeyEventsParameters while this function was executing,
and thus took a shortcut. The new behavior is different from pre-async in that
we don't collect commands at all, but I couldn't find any case where that mattered.
(-[WKView inputContext]): The _collectedKeypressCommands check was not a correct
replacement for _interpretKeyEventsParameters one, because this variable is not
always set within -_interpretKeyEvent:completionHandler:.
* UIProcess/mac/WKTextInputWindowController.mm:
(-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]):
While at it, fixed a separate issue with Cangjie predictive input. We shouldn't
keep prediction pop-up on screen after hiding the bottom input window.
2014-05-16 Martin Robinson <mrobinson@igalia.com>
[CMake] Improve handling of LIB_INSTALL_DIR, EXEC_INSTALL_DIR, and LIBEXEC_INSTALL_DIR
https://bugs.webkit.org/show_bug.cgi?id=132819
Reviewed by Carlos Garcia Campos.
* PlatformEfl.cmake: No need to prefix EXEC_INSTALL_DIR with the prefix any longer.
* PlatformGtk.cmake: No longer use CMAKE_INSTALL_FULL_FOO variables, instead using the WebKit-specific ones.
* efl/EWebKit2Config.cmake.in: Ditto.
* efl/ewebkit2.pc.in: Instead of hard-coding the path to the library installation directory use LIB_INSTALL_DIR.
* webkit2gtk-web-extension.pc.in: No longer use the pkg-config only variables. Instead use
the common CMake ones.
* webkit2gtk.pc.in: Ditto.
2014-05-21 Carlos Garcia Campos <cgarcia@igalia.com>
REGRESSION(r168625): [GTK] Assertion failure in LocalStorageDatabaseTracker
https://bugs.webkit.org/show_bug.cgi?id=133118
Reviewed by Philippe Normand.
Call WebContext::applyPlatformSpecificConfigurationDefaults() to
initialize the WebContextConfiguration before creating the default WebContext.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):
2014-05-21 Shivakumar JM <shiva.jm@samsung.com>
[WebKit2] Cleanup the build from unused variable in WebProcess module
https://bugs.webkit.org/show_bug.cgi?id=133062
Reviewed by Csaba Osztrogonác.
Fix unused parameter by using UNUSED_PARAM macro
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserContentController::addUserScriptMessageHandlers):
(WebKit::WebUserContentController::removeUserScriptMessageHandler):
2014-05-20 Enrica Casucci <enrica@apple.com>
REGRESSION (WK2): Tapping on the input field in duckduckgo.com shows the keyboard but not the caret.
https://bugs.webkit.org/show_bug.cgi?id=133140
<rdar://problem/16980898>
Reviewed by Benjamin Poulain.
When a page focuses a field on load, we receive the call to startAssistingNode
but we don't create a text interaction assistant if the focus is not originated
by a user action. Upon receiving the selection change notification we don't
call the text interaction assistant, since we don't have one, but we do call
the web selection assistant. We don't have any valid rects for web selection
and we clear the selection on the page, causing the caret not to appear and
the typing to have no effect.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _updateChangedSelection]):
2014-05-20 Dean Jackson <dino@apple.com>
[Mac] Allow popup menus to override default appearance
https://bugs.webkit.org/show_bug.cgi?id=133129
Reviewed by Tim Horton.
Add an extra "hideArrows" flag to PlatformPopupMenuData
and replace the call to WKPopupMenuWithSize with WKPopupMenu.
* Shared/PlatformPopupMenuData.cpp: Encode and decode the new data value.
(WebKit::PlatformPopupMenuData::encode):
(WebKit::PlatformPopupMenuData::decode):
* Shared/PlatformPopupMenuData.h: Add hideArrows boolean.
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::showPopupMenu):
* WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
(WebKit::WebPopupMenu::setUpPlatformData): The hideArrows flag is
true if we don't have the default appearance.
2014-05-20 Eric Carlson <eric.carlson@apple.com>
[Mac] do not deactivate an audio session that has running I/O
https://bugs.webkit.org/show_bug.cgi?id=133127
Reviewed by Jer Noble.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Settings::setShouldManageAudioSession renamed to
setShouldManageAudioSessionCategory, deal with it.
2014-05-19 Simon Fraser <simon.fraser@apple.com>
REGRESSION (r169063) Fixed and sticky nodes misplaced on scrolling sometimes
https://bugs.webkit.org/show_bug.cgi?id=133106
<rdar://problem/16967648>
Reviewed by Sam Weinig.
Fix regression from r169063. That commit removed scrolledContentsLayers from
frame scrolling nodes, but they do actually use them.
So put them back; not in the base class, because they have a somewhat different
meaning for overflow scrolling and frame scrolling.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
(ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
(WebKit::RemoteScrollingTreeTextStream::dump):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2014-05-20 Alexey Proskuryakov <ap@apple.com>
[Mac] 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>
<rdar://problem/16561084>
Reviewed by Sam Weinig and Tim Horton.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
(WebKit::handleXPCBootstrap):
(main):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
(WebKit::handleXPCBootstrap):
(main):
Set localization very early in process lifetime (in development builds, that's
even before WebKit framework is loaded).
* UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService):
Pass UI process localization to the service, computing it in the same way we do
for child processes.
2014-05-20 Anders Carlsson <andersca@apple.com>
Fix a header comment
https://bugs.webkit.org/show_bug.cgi?id=133123
<rdar://problem/16973783>
Reviewed by Geoffrey Garen.
* UIProcess/API/Cocoa/WKUserContentController.h:
2014-05-20 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebKitWebPage::send-request always pass a valid pointer for redirected response
https://bugs.webkit.org/show_bug.cgi?id=133119
Reviewed by Sergio Villar Senin.
The problem is that we were checking whether the passed in
WKURLResponseRef is NULL or not, but it's always a valid object
that can contain a NULL WebCore::ResourceResponse.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp:
(willSendRequestForFrame): Pass NULL as redirect-response
parameter of WebKitWebPage::send-request signal when the
WebCore::ResourceResponse of the passed in WKURLResponseRef is NULL.
2014-05-20 Antti Koivisto <antti@apple.com>
Double-tap zoom does not take obscuring insets into account
https://bugs.webkit.org/show_bug.cgi?id=133116
<rdar://problem/16765604>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
Compute the zoom target taking insets into account.
2014-05-19 Gavin Barraclough <baraclough@apple.com>
WebKit2/iOS: parented view should be considered hidden if app is backgrounded
https://bugs.webkit.org/show_bug.cgi?id=133099
radar://16942183
Reviewed by Simon Fraser.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewWindowActive):
- implemented in terms of isViewVisible.
- FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
(WebKit::PageClientImpl::isViewFocused):
- implemented in terms of isViewWindowActive.
- FIXME: https://bugs.webkit.org/show_bug.cgi?id=133098
(WebKit::PageClientImpl::isViewVisible):
- take UIApplication applicationState into account in determining visibility.
(WebKit::PageClientImpl::isViewVisibleOrOccluded):
- implemented in terms of isViewVisible.
(WebKit::PageClientImpl::isVisuallyIdle):
- implemented in terms of isViewVisible.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
- register for UIApplicationDidEnterBackgroundNotification.
(-[WKContentView _applicationDidEnterBackground:]):
(-[WKContentView _applicationWillEnterForeground:]):
- when the application state changes all flags except IsInWindow may be affected.
2014-05-19 Enrica Casucci <enrica@apple.com>
WK2 iOS: Pressing the form navigation button causes the keyboard to be dismissed.
https://bugs.webkit.org/show_bug.cgi?id=133100
<rdar://problem/16808673>
Reviewed by Benjamin Poulain.
The call to focusNextAssistedNode is the result of a user action, since
it is called when the user pressed the form navigation buttons.
Therefore we must set m_userIsInteracting to true before changing the focus
to make sure the focus change is honored.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::focusNextAssistedNode):
2014-05-19 Beth Dakin <bdakin@apple.com>
TelephoneNumberOverlayController should use a modern loop for text quad bounding
boxes
https://bugs.webkit.org/show_bug.cgi?id=133096
Reviewed by Anders Carlsson.
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::textQuadsToBoundingRectForRange):
2014-05-19 Jeremy Jones <jeremyj@apple.com>
PlatformCALayerRemoteCustom properties aren't initialized to match the PlatformLayer
https://bugs.webkit.org/show_bug.cgi?id=133025
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(WebKit::PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
Initialize PlatformCALayerRemote properties from the PlatformLayer.
2014-05-19 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] When a page relayout on dynamic resize, keep the same relative width in view
https://bugs.webkit.org/show_bug.cgi?id=133026
<rdar://problem/16833971>
Reviewed by Simon Fraser.
When a page does not relayout, we keep the same width in view.
When a page relayout, we should keep the same relative width in view.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::isResponsiveDesignWithContentLargerThanLayout):
(WebKit::WebPage::dynamicViewportSizeUpdate):
2014-05-19 Benjamin Poulain <benjamin@webkit.org>
[WK2] Add some missing state reset on crash
https://bugs.webkit.org/show_bug.cgi?id=133036
Reviewed by Sam Weinig.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetState):
The missing reset for m_isTrackingTouchEvents would cause the WebPageProxy to send
touch events when it shouldn't. That would only be for an active touch sequence.
The missing reset m_lastVisibleContentRectUpdate would prevent pushing the new UI state
to the new page on reload, that is very bad.
Also moved m_videoFullscreenManager to be in the same order as initialization, and invalidate
the callbacks for dictation.
2014-05-19 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Move scale noise filtering to the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=133021
Reviewed by Darin Adler.
Filtering in the UIProcess was stupid. It forces to handle a third kind of scale just for updates.
The WebProcess already adjusts the input scale based on the viewport. Changing the input scale at that level
is already supported. It is a better place to have the filtering.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
2014-05-19 Simon Fraser <simon.fraser@apple.com>
Split scrolling tree ScrollingNodes into FrameScrollingNodes and OverflowScrollingNodes
https://bugs.webkit.org/show_bug.cgi?id=133022
Reviewed by Sam Weinig.
In both the scrolling state tree and the scrolling tree, split the "scrolling nodes"
into FrameScrolling and OverflowScrolling nodes.
Move what was the "viewportSize" property onto the base class for the scrolling
nodes, calling it "scrollableAreaSize".
Make minimum/maximumScrollPosition() virtual so we can share more code (and there
is more code sharing to be done in future).
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateFrameScrollingNode>::encode):
(ArgumentCoder<ScrollingStateOverflowScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
(ArgumentCoder<ScrollingStateFrameScrollingNode>::decode):
(ArgumentCoder<ScrollingStateOverflowScrollingNode>::decode):
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::RemoteScrollingTreeTextStream::dump):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createNode):
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollLayer):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateLayersAfterViewportChange):
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::setScrollLayerPosition):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateChildNodesAfterScroll):
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2014-05-19 Alexey Proskuryakov <ap@apple.com>
[Mac] Fix a typo in plug-in sandbox
https://bugs.webkit.org/show_bug.cgi?id=133074
Reviewed by Anders Carlsson.
* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
2014-05-16 Andy Estes <aestes@apple.com>
[WebKit2] Wake up threads blocked in waitForAndDispatchImmediately() if we lose our connection
https://bugs.webkit.org/show_bug.cgi?id=133010
Reviewed by Geoffrey Garen.
If a thread is blocked on m_waitForMessageCondition and we lose our connection, treat that like we do a timeout.
* Platform/IPC/Connection.cpp:
(IPC::Connection::Connection):
(IPC::Connection::waitForMessage):
(IPC::Connection::connectionDidClose):
* Platform/IPC/Connection.h:
2014-05-19 Mark Rowe <mrowe@apple.com>
Build fix after r169023.
* Shared/API/Cocoa/WebKitPrivate.h: Stop including headers that no longer exist.
I hope for weinig's sake that no-one was relying on them.
2014-05-18 Anders Carlsson <andersca@apple.com>
Relax an assertion when creating document loaders
https://bugs.webkit.org/show_bug.cgi?id=133058
Reviewed by Sam Weinig.
When navigating back/forward items recursively, createDocumentLoader will be called
for subframes before main frames so only associate the navigation with main frames.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::createDocumentLoader):
2014-05-18 Zsolt Borbely <zsborbely.u-szeged@partner.samsung.com>
CMake Buildfix after r169023.
Reviewed by Csaba Osztrogonác.
* CMakeLists.txt: Add new files after r168994.
2014-05-18 Sam Weinig <sam@webkit.org>
[WebKit2] Implement ScriptMessageHandlers
https://bugs.webkit.org/show_bug.cgi?id=133053
Reviewed by Anders Carlsson.
* DerivedSources.make:
* Scripts/webkit2/messages.py:
(struct_or_class):
(argument_coder_headers_for_type):
(headers_for_type):
* UIProcess/API/Cocoa/WKScriptMessage.mm:
(-[WKScriptMessage _initWithBody:webView:name:]):
(-[WKScriptMessage body]):
(-[WKScriptMessage webView]):
(-[WKScriptMessage name]):
(-[WKScriptMessage _scriptWorld]): Deleted.
* UIProcess/API/Cocoa/WKScriptMessageInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKScriptMessagePrivate.h.
* UIProcess/API/Cocoa/WKScriptMessagePrivate.h: Removed.
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController addScriptMessageHandler:name:]):
(-[WKUserContentController removeScriptMessageHandlerForName:]):
(-[WKUserContentController _addScriptMessageHandler:name:world:]): Deleted.
(-[WKUserContentController _removeScriptMessageHandlerForName:world:]): Deleted.
* UIProcess/API/Cocoa/WKUserContentControllerInternal.h:
* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Removed.
* UIProcess/API/Cocoa/WKWebView.mm:
(pageToViewMap):
(fromWebPageProxy):
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView dealloc]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/UserContent/WebScriptMessageHandler.cpp: Added.
(WebKit::WebScriptMessageHandlerHandle::encode):
(WebKit::WebScriptMessageHandlerHandle::decode):
(WebKit::generateIdentifier):
(WebKit::WebScriptMessageHandler::create):
(WebKit::WebScriptMessageHandler::WebScriptMessageHandler):
(WebKit::WebScriptMessageHandler::~WebScriptMessageHandler):
* UIProcess/UserContent/WebScriptMessageHandler.h: Added.
(WebKit::WebScriptMessageHandler::Client::~Client):
(WebKit::WebScriptMessageHandler::handle):
(WebKit::WebScriptMessageHandler::identifier):
(WebKit::WebScriptMessageHandler::name):
(WebKit::WebScriptMessageHandler::client):
* UIProcess/UserContent/WebUserContentControllerProxy.cpp:
(WebKit::WebUserContentControllerProxy::addProcess):
(WebKit::WebUserContentControllerProxy::removeProcess):
(WebKit::WebUserContentControllerProxy::addUserScriptMessageHandler):
(WebKit::WebUserContentControllerProxy::removeUserMessageHandlerForName):
(WebKit::WebUserContentControllerProxy::didPostMessage):
* UIProcess/UserContent/WebUserContentControllerProxy.h:
* UIProcess/UserContent/WebUserContentControllerProxy.messages.in: Added.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/UserContent/WebUserContentController.cpp:
(WebKit::WebUserMessageHandlerDescriptorProxy::create):
(WebKit::WebUserMessageHandlerDescriptorProxy::~WebUserMessageHandlerDescriptorProxy):
(WebKit::WebUserMessageHandlerDescriptorProxy::didPostMessage):
(WebKit::WebUserMessageHandlerDescriptorProxy::descriptor):
(WebKit::WebUserMessageHandlerDescriptorProxy::identifier):
(WebKit::WebUserMessageHandlerDescriptorProxy::WebUserMessageHandlerDescriptorProxy):
(WebKit::WebUserContentController::addUserScriptMessageHandlers):
(WebKit::WebUserContentController::removeUserScriptMessageHandler):
* WebProcess/UserContent/WebUserContentController.h:
* WebProcess/UserContent/WebUserContentController.messages.in:
2014-05-18 Rik Cabanier <cabanier@adobe.com>
support for navigator.hardwareConcurrency
https://bugs.webkit.org/show_bug.cgi?id=132588
Reviewed by Filip Pizlo.
* Configurations/FeatureDefines.xcconfig:
2014-05-18 Anders Carlsson <andersca@apple.com>
Implement Navigations for all methods declared returning one
https://bugs.webkit.org/show_bug.cgi?id=133048
<rdar://problem/16830064>
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView goToBackForwardListItem:]):
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
Create and return navigations.
(-[WKWebView _reload]):
Call -[WKWebView reload].
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::createBackForwardNavigation):
Create a back/forward navigation.
(WebKit::NavigationState::createReloadNavigation):
Create a reload navigation.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcessWithItem):
Generate a navigation ID and send it with the GoToBackForwardItem message.
(WebKit::WebPageProxy::reload):
Return a navigation ID.
(WebKit::WebPageProxy::goForward):
Generate a navigation ID and send it with the GoForward message.
(WebKit::WebPageProxy::goBack):
Generate a navigation ID and send it with the GoBack message.
(WebKit::WebPageProxy::goToBackForwardItem):
Generate a navigation ID and send it with the GoToBackForwardItem message.
* UIProcess/WebPageProxy.h:
Return navigation IDs where appropriate.
* UIProcess/cf/WebPageProxyCF.cpp:
(WebKit::WebPageProxy::restoreFromSessionStateData):
Generate a navigation ID and send it with the RestoreSessionAndNavigateToCurrentItem message.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::goForward):
(WebKit::WebPage::goBack):
(WebKit::WebPage::goToBackForwardItem):
Set up the pending navigation ID.
(WebKit::WebPage::restoreSessionAndNavigateToCurrentItem):
Call goToBackForwardItem with a navigation ID.
* WebProcess/WebPage/WebPage.h:
Add navigation IDs.
* WebProcess/WebPage/WebPage.messages.in:
Add navigation IDs.
2014-05-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r169001.
https://bugs.webkit.org/show_bug.cgi?id=133050
We can't expose the C SPI from WKWebView (Requested by
andersca on #webkit).
Reverted changeset:
"Need a way to get a WKPageRef from a WKWebView"
https://bugs.webkit.org/show_bug.cgi?id=133015
http://trac.webkit.org/changeset/169001
2014-05-18 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
[WK2][GTK] Buildfix after r168999.
Reviewed by Csaba Osztrogonác.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
(WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
2014-05-18 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
[WK2][EFL] Buildfix after r168999.
Reviewed by Csaba Osztrogonác.
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory): Renamed from WebKit::WebContext::platformDefaultDatabaseDirectory().
(WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory): Added.
2014-05-18 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
[WK2][cmake] Buildfix after r168994.
Reviewed by Csaba Osztrogonác.
* CMakeLists.txt: Added new files to the build system introduced in r168994.
2014-05-17 Alexey Proskuryakov <ap@apple.com>
REGRESSION (NetworkProcess): Trying to use appcache fallback crashes in ApplicationCacheHost::scheduleLoadFallbackResourceFromApplicationCache
https://bugs.webkit.org/show_bug.cgi?id=133007
<rdar://problem/13702706>
appcache tests often fail on the Mac WebKit2 bot
https://bugs.webkit.org/show_bug.cgi?id=82061
Reviewed by Maciej Stachowiak.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::willSendRequest):
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
(WebKit::WebResourceLoader::didFailResourceLoad):
Perform the same appcache checks that ResourceHandleClient implementation in ResourceLoader
does. We should eventually come up with a way to share the code. Perhaps add a class that
isolates ResourceLoader from networking details? But ResourceLoader was itself supposed
to be the class that isolates DocumentLoader from networking details. So, unsure.
2014-05-17 Jae Hyun Park <jaepark@webkit.org>
[EFL] Remove m_contentPosition from PageViewportControllerClientEfl
https://bugs.webkit.org/show_bug.cgi?id=132774
Reviewed by Anders Carlsson.
m_contentPosition is not used anywhere. So, this patch removes
m_contentPosition and reduces one unnecessary assignment in
setViewportPosition. Also, it renames contentsPoint to contentsPosition.
* UIProcess/PageViewportControllerClient.h:
* UIProcess/efl/PageViewportControllerClientEfl.cpp:
(WebKit::PageViewportControllerClientEfl::setViewportPosition):
* UIProcess/efl/PageViewportControllerClientEfl.h:
2014-05-17 David Kilzer <ddkilzer@apple.com>
Need a way to get a WKPageRef from a WKWebView
<http://webkit.org/b/133015>
Reviewed by Benjamin Poulain.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _pageRef]): Added.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
(-[WKWebView _pageRef]): Added declaration.
2014-05-17 Anders Carlsson <andersca@apple.com>
Give user scripts custom URLs
https://bugs.webkit.org/show_bug.cgi?id=133035
Reviewed by Beth Dakin.
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController addUserScript:]):
Create a user-script:<number> URL for user scripts.
* UIProcess/API/Cocoa/WKUserScript.h:
Move the init method after the properties.
2014-05-17 Anders Carlsson <andersca@apple.com>
Replace WKContextSetDatabaseDirectory with two WKContextConfiguration parameters
https://bugs.webkit.org/show_bug.cgi?id=133033
<rdar://problem/16830143>
Reviewed by Sam Weinig.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
Rename databaseDirectory to webSQLDatabaseDirectory to better indicate the directory type.
* UIProcess/API/C/WKContext.cpp:
(WKContextSetDatabaseDirectory): Deleted.
This is no longer needed.
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationCopyIndexedDBDatabaseDirectory):
(WKContextConfigurationSetIndexedDBDatabaseDirectory):
(WKContextConfigurationCopyWebSQLDatabaseDirectory):
(WKContextConfigurationSetWebSQLDatabaseDirectory):
* UIProcess/API/C/WKContextConfigurationRef.h:
Add setters and getters.
* UIProcess/API/C/WKContextPrivate.h:
Remove WKContextSetDatabaseDirectory.
* UIProcess/APIContextConfiguration.cpp:
(API::ContextConfiguration::webContextConfiguration):
Set m_indexedDBDatabaseDirectory and m_webSQLDatabaseDirectory on the configuration.
* UIProcess/APIContextConfiguration.h:
(API::ContextConfiguration::indexedDBDatabaseDirectory):
(API::ContextConfiguration::setIndexedDBDatabaseDirectory):
(API::ContextConfiguration::webSQLDatabaseDirectory):
(API::ContextConfiguration::setWebSQLDatabaseDirectory):
Add getters and setters to the C++ part of WKContextConfigurationRef.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
Set webSQLDatabaseDirectory and indexedDBDatabaseDirectory.
(WebKit::WebContext::WebContext):
Initialize m_webSQLDatabaseDirectory and m_indexedDBDatabaseDirectory.
(WebKit::WebContext::ensureDatabaseProcess):
Set parameters.indexedDatabaseDirectory from m_indexedDBDatabaseDirectory.
(WebKit::WebContext::createNewWebProcess):
Set parameters.webSQLDatabaseDirectory from m_webSQLDatabaseDirectory.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultWebSQLDatabaseDirectory):
Rename this to indicate that it's about WebSQL databases.
(WebKit::WebContext::platformDefaultIndexedDBDatabaseDirectory):
Add this.
* WebProcess/WebCoreSupport/WebDatabaseManager.cpp:
(WebKit::WebDatabaseManager::initialize):
Update for WebProcessCreationParameters rename.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
Update for WebProcessCreationParameters rename.
2014-05-17 Brent Fulgham <bfulgham@apple.com>
[Phone Number Detection] drop-down menu in the phone number detection box doesn't appear.
https://bugs.webkit.org/show_bug.cgi?id=133024
Reviewed by Sam Weinig.
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::TelephoneNumberOverlayController::drawRect): Don't clear the set of found phone numbers each
time we call drawRect. This gets called ~9 times per screen refresh, so end up with no active
phone numbers to interact with.
2014-05-17 Alexey Proskuryakov <ap@apple.com>
NetworkProcess can repeatedly crash handling Blob messages after any unrelated crash
https://bugs.webkit.org/show_bug.cgi?id=133032
<rdar://problem/16951630>
Reviewed by Geoffrey Garen.
Replaced assertions with runtime checks. This can happen if NetworkProcess previously
crashed for any unrelated reason.
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerBlobURL):
(WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
(WebKit::NetworkBlobRegistry::unregisterBlobURL):
2014-05-17 Anders Carlsson <andersca@apple.com>
-[WKWebView dealloc] should close the page
https://bugs.webkit.org/show_bug.cgi?id=133031
<rdar://problem/16929815>
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView dealloc]):
2014-05-16 Anders Carlsson <andersca@apple.com>
Expose WKUserScript as API
https://bugs.webkit.org/show_bug.cgi?id=133017
<rdar://problem/16948059>
Reviewed by Sam Weinig.
* DerivedSources.make:
Add WebUserContentController.
* Shared/API/Cocoa/WebKit.h:
Add WKUserScript.h
* Shared/API/c/WKSharedAPICast.h:
(WebKit::toUserScriptInjectionTime):
Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
* Shared/API/c/WKUserScriptInjectionTime.h:
Rename WKUserScriptInjectionTime to _WKUserScriptInjectionTime to free up the name for the Objective-C API
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
Encode the user content controller ID.
(WebKit::WebPageCreationParameters::decode):
Decode the user content controller ID.
* Shared/WebPageCreationParameters.h:
Add userContentControllerID.
* UIProcess/API/C/WKPageGroup.cpp:
(WKPageGroupAddUserScript):
Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
* UIProcess/API/C/WKPageGroup.h:
Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
* UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
* UIProcess/API/Cocoa/WKBrowsingContextGroup.mm:
(-[WKBrowsingContextGroup addUserScript:baseURL:whitelistedURLPatterns:blacklistedURLPatterns:injectionTime:mainFrameOnly:]):
Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
* UIProcess/API/Cocoa/WKUserContentController.h:
Add new methods.
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController init]):
Create the WebUserContentControllerProxy object and user scripts array.
(-[WKUserContentController userScripts]):
Return the user scripts array.
(toWebCoreUserScriptInjectionTime):
Helper for converting from a WKUserScriptInjectionTime enum to WebCore::UserScriptInjectionTime.
(-[WKUserContentController addUserScript:]):
Call through to the _userContentControllerProxy object.
(-[WKUserContentController removeAllUserScripts]):
Call through to the _userContentControllerProxy object.
* UIProcess/API/Cocoa/WKUserContentControllerInternal.h: Added.
Add WebUserContentControllerProxy ivar.
* UIProcess/API/Cocoa/WKUserScript.h: Added.
Add new header.
* UIProcess/API/Cocoa/WKUserScript.mm:
(-[WKUserScript initWithSource:injectionTime:forMainFrameOnly:]):
Initialize the WKUserScript object.
(-[WKUserScript source]):
(-[WKUserScript injectionTime]):
(-[WKUserScript isForMainFrameOnly]):
Add getters.
(-[WKUserScript copyWithZone:]):
Since WKUserScript is immutable, just return a retained object.
* UIProcess/API/Cocoa/WKUserScriptInternal.h:
Add ivars.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Set the user content controller from the configuration.
* UIProcess/UserContent/WebUserContentControllerProxy.cpp: Added.
(WebKit::generateIdentifier):
Return a unique identifier.
(WebKit::WebUserContentControllerProxy::create):
Return a new WebUserContentControllerProxy object.
(WebKit::WebUserContentControllerProxy::WebUserContentControllerProxy):
Initialize m_identifier.
(WebKit::WebUserContentControllerProxy::~WebUserContentControllerProxy):
Add destructor.
(WebKit::WebUserContentControllerProxy::addProcess):
Add the process to the m_processes set. If it's the first time doing so, add the user scripts we know about.
(WebKit::WebUserContentControllerProxy::removeProcess):
Remove the process from m_processes.
(WebKit::WebUserContentControllerProxy::addUserScript):
Add the user script and let all the web processes know that it was added.
(WebKit::WebUserContentControllerProxy::removeAllUserScripts):
Remove all user scripts and tell all the web processes about it.
* UIProcess/UserContent/WebUserContentControllerProxy.h:
Add new class.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
If the process is already running, add it to the user content controller.
(WebKit::WebPageProxy::close):
If the process is running, remove it from the user content controller.
(WebKit::WebPageProxy::connectionWillOpen):
Add the process to the user content controller.
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Remove the process from the user content controller.
(WebKit::WebPageProxy::creationParameters):
Pass along the user content controller ID when creating the web page.
* UIProcess/WebPageProxy.h:
Add a WebUserContentControllerProxy object to the web page configuration.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
Update for WKUserScriptInjectionTime -> _WKUserScriptInjectionTime rename.
* WebProcess/UserContent/WebUserContentController.cpp: Added.
New class that manages a WebCore::UserContentController object.
(WebKit::WebUserContentController::getOrCreate):
Look up (or create) a WebUserContentController object given its identifier.
(WebKit::WebUserContentController::WebUserContentController):
Add ourselves as a message receiver.
(WebKit::WebUserContentController::~WebUserContentController):
Remove ourselves as a message receiver.
(WebKit::WebUserContentController::addUserScripts):
Add all passed in user scripts to the WebCore user content controller object.
(WebKit::WebUserContentController::removeAllUserScripts):
Remove all user scripts from the WebCore user content controller object.
* WebProcess/UserContent/WebUserContentController.messages.in: Added.
Add new messages file.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Get a WebUserContentController object and pass it along to WebCore.
* WebProcess/WebPage/WebPage.h:
Add WebUserContentController member.
2014-05-16 Piotr Grad <p.grad@samsung.com>
[GTK] Build break after 168978.
https://bugs.webkit.org/show_bug.cgi?id=133012.
Reviewed by Simon Fraser.
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsConstructed):
2014-05-16 Simon Fraser <simon.fraser@apple.com>
Put back a symbol removed in r168978 that Safari needs, but deprecate it.
Reviewed by Anders Carlsson.
* Shared/API/c/WKDeprecatedFunctions.cpp:
(WKPreferencesSetRegionBasedColumnsEnabled):
(WKPreferencesGetRegionBasedColumnsEnabled):
2014-05-16 Oliver Hunt <oliver@apple.com>
Separate enabling sandbox extensions from the WEB_PROCESS_SANDBOX flag
https://bugs.webkit.org/show_bug.cgi?id=133016
Reviewed by Alexey Proskuryakov.
Add a distinct SANDBOX_EXTENSIONS flag to guard sandbox extensions
and switch over to it in the places that extensions are used.
* Shared/SandboxExtension.h:
* Shared/mac/SandboxExtensionMac.mm:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didChooseFilesForOpenPanel):
* WebKit2Prefix.h:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-05-16 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Add a heuristic to set the right horizontal offset on rotation for responsive websites
https://bugs.webkit.org/show_bug.cgi?id=132937
<rdar://problem/16710097>
Reviewed by Simon Fraser.
When responsive websites have the content size lay out larger than the minimal layout size,
we should not keep the relative horizontal position into view,
many of those websites have all the content on the left.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
2014-05-16 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] On dynamic resize, the content offset is contrained to the old content size
https://bugs.webkit.org/show_bug.cgi?id=132972
Reviewed by Simon Fraser.
When we set the content offset, UIScrollView limits the value to the current valid range for
content size. Since the content size was only updated after the animation, when the first frame
comes in, the content offset would sometimes be limited to a smaller rect that the actual content.
To fix this, set the expected future content size before changing the offset.
During the animation, the content size could have changed arbitrarily. At the end of the animation,
we take the actual frame and set the definite content size.
Any update after that will be regular updates through didCommitLayer.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _endAnimatedResize]):
2014-05-16 Simon Fraser <simon.fraser@apple.com>
Remove "region-based columns" prefs
https://bugs.webkit.org/show_bug.cgi?id=133006
<rdar://problem/16945824>
Reviewed by Dave Hyatt.
Remove "region-based columns" prefs and related code, since this is only
way to render columns now.
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetRegionBasedColumnsEnabled): Deleted.
(WKPreferencesGetRegionBasedColumnsEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-05-16 Brent Fulgham <bfulgham@apple.com>
Work around bug in Silverlight
https://bugs.webkit.org/show_bug.cgi?id=133004
Reviewed by Anders Carlsson.
* PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm:
(WebKit::PluginProcessMainDelegate::doPreInitializationWork): Add low-resolution flag
to user defaults prior to NSApplication invocation. This code was moved from
PluginProcess::platformInitializeProcess.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitializeProcess): Move low-resolution flag
setting to PluginProcessMainDelegate.
2014-05-16 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
[WK2] Change the remaining framework includes from WebKit2 to WebKit
https://bugs.webkit.org/show_bug.cgi?id=132956
Reviewed by Sam Weinig.
* NetworkProcess/unix/NetworkProcessMainUnix.cpp:
* NetworkProcess/unix/NetworkProcessMainUnix.h:
* PluginProcess/unix/PluginProcessMainUnix.h:
* Shared/API/c/cairo/WKImageCairo.h:
* Shared/API/c/cf/WKURLRequestCF.h:
* Shared/API/c/cf/WKURLResponseCF.h:
* Shared/API/c/efl/WKArrayEfl.cpp:
* Shared/API/c/efl/WKArrayEfl.h:
* UIProcess/API/C/CoordinatedGraphics/WKView.h:
* UIProcess/API/C/WKBatteryManager.h:
* UIProcess/API/C/WKBatteryStatus.h:
* UIProcess/API/C/WKGrammarDetail.h:
* UIProcess/API/C/WKTextChecker.h:
* UIProcess/API/C/WKVibration.h:
* UIProcess/API/C/WKViewportAttributes.h:
* UIProcess/API/C/cairo/WKIconDatabaseCairo.h:
* UIProcess/API/C/efl/WKAPICastEfl.h:
* UIProcess/API/C/efl/WKColorPickerResultListener.h:
* UIProcess/API/C/efl/WKEventEfl.h:
* UIProcess/API/C/efl/WKPageEfl.h:
* UIProcess/API/C/efl/WKPopupItem.h:
* UIProcess/API/C/efl/WKPopupMenuListener.h:
* UIProcess/API/C/efl/WKViewEfl.cpp:
* UIProcess/API/C/efl/WKViewEfl.h:
* UIProcess/API/C/gtk/WKFullScreenClientGtk.h:
* UIProcess/API/C/gtk/WKInspectorClientGtk.h:
* UIProcess/API/C/gtk/WKView.h:
* UIProcess/API/C/gtk/WKViewPrivate.h:
* UIProcess/API/C/soup/WKContextSoup.h:
* UIProcess/API/C/soup/WKCookieManagerSoup.h:
* UIProcess/API/C/soup/WKSoupCustomProtocolRequestManager.h:
* UIProcess/API/C/soup/WKSoupRequestManager.h:
* UIProcess/API/Cocoa/WKErrorRecoveryAttempting.h:
* UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
* UIProcess/API/cpp/efl/WKEinaSharedString.cpp:
* UIProcess/API/cpp/efl/WKEinaSharedString.h:
* UIProcess/API/efl/EwkView.cpp:
* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/EwkViewCallbacks.h:
* UIProcess/API/efl/GestureRecognizer.h:
* UIProcess/API/efl/ewk_application_cache_manager_private.h:
* UIProcess/API/efl/ewk_auth_request_private.h:
* UIProcess/API/efl/ewk_back_forward_list_item_private.h:
* UIProcess/API/efl/ewk_back_forward_list_private.h:
* UIProcess/API/efl/ewk_context_menu_item.cpp:
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/ewk_cookie_manager_private.h:
* UIProcess/API/efl/ewk_database_manager_private.h:
* UIProcess/API/efl/ewk_error_private.h:
* UIProcess/API/efl/ewk_favicon_database_private.h:
* UIProcess/API/efl/ewk_file_chooser_request_private.h:
* UIProcess/API/efl/ewk_page_group_private.h:
* UIProcess/API/efl/ewk_popup_menu_item_private.h:
* UIProcess/API/efl/ewk_popup_menu_private.h:
* UIProcess/API/efl/ewk_security_origin_private.h:
* UIProcess/API/efl/ewk_settings_private.h:
* UIProcess/API/efl/ewk_storage_manager_private.h:
* UIProcess/API/efl/ewk_view.cpp:
* UIProcess/API/efl/ewk_view_private.h:
* UIProcess/API/efl/ewk_window_features_private.h:
* UIProcess/API/efl/tests/InjectedBundle/injected_bundle_sample.cpp:
* UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp:
* UIProcess/API/gtk/WebKitDownloadClient.cpp:
* UIProcess/API/gtk/WebKitPrivate.h:
* UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
* UIProcess/efl/BatteryProvider.h:
* UIProcess/efl/ContextHistoryClientEfl.h:
* UIProcess/efl/DownloadManagerEfl.h:
* UIProcess/efl/FindClientEfl.h:
* UIProcess/efl/FormClientEfl.h:
* UIProcess/efl/PageLoadClientEfl.h:
* UIProcess/efl/PagePolicyClientEfl.h:
* UIProcess/efl/PageUIClientEfl.h:
* UIProcess/efl/RequestManagerClientEfl.h:
* UIProcess/efl/TextCheckerClientEfl.h:
* UIProcess/efl/VibrationClientEfl.h:
* UIProcess/efl/ViewClientEfl.cpp:
* UIProcess/efl/ViewClientEfl.h:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
* WebProcess/WebCoreSupport/efl/WebErrorsEfl.cpp:
* WebProcess/WebCoreSupport/gtk/WebErrorsGtk.cpp:
* WebProcess/efl/SeccompFiltersWebProcessEfl.cpp:
* WebProcess/efl/SeccompFiltersWebProcessEfl.h:
* WebProcess/efl/WebProcessMainEfl.cpp:
* WebProcess/efl/WebProcessMainEfl.h:
* WebProcess/gtk/WebGtkInjectedBundleMain.cpp:
* WebProcess/gtk/WebProcessMainGtk.cpp:
* WebProcess/gtk/WebProcessMainGtk.h:
* mac/WKPreferences.h:
2014-05-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL][WK2] Skip failing unit tests
https://bugs.webkit.org/show_bug.cgi?id=132979
Reviewed by Daniel Bates.
* PlatformEfl.cmake: Skip failing unit tests for now.
2014-05-15 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] When zoomed, fixed elements jump at the start of a scroll, and jump back at the end.
https://bugs.webkit.org/show_bug.cgi?id=132978
<rdar://problem/16894428>
Reviewed by Benjamin Poulain.
Move the static function fixedPositionRectFromExposedRect() to a member function on
WebPageProxy so we can call it from more places. Also never give WebCore a customFixedPosition
rect that extends past the document bounds, but allow rubber-banding/pinching in the UI process to
move fixed elements outside the document.
* UIProcess/PageClient.h: Need to expose minimumZoomScale() and contentsSize() to WebPageProxy.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::minimumZoomScale):
(WebKit::PageClientImpl::contentsSize):
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:unobscuredRectInScrollViewCoordinates:scale:minimumScale:inStableState:isChangingObscuredInsetsInteractively:]):
Pass the computeCustomFixedPositionRect(ConstrainedToDocumentRect) to WebCore, but use computeCustomFixedPositionRect()
for the ScrollingCoordinator update.
(adjustedUnexposedEdge): Deleted.
(adjustedUnexposedMaxEdge): Deleted.
(fixedPositionRectFromExposedRect): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::adjustedUnexposedEdge):
(WebKit::adjustedUnexposedMaxEdge):
(WebKit::WebPageProxy::computeCustomFixedPositionRect):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): This fixes some flashing when the scrolling tree
was being updated while scrolling; we now pass the correct rect.
2014-05-15 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/132976> Move discovery of sharing services off the main thread
Discovery of sharing services can require disk access and IPC. Since the interface to
ServicesController is already asynchronous, we can easily perform the discovery on a
background queue. This can eliminate tens to hundreds of milliseconds worth of work
from the main thread when creating the first web process.
Reviewed by Brady Eidson.
* UIProcess/mac/ServicesController.h:
* UIProcess/mac/ServicesController.mm:
(WebKit::ServicesController::ServicesController):
(WebKit::ServicesController::refreshExistingServices): Bail out early if we're already
in the process of refreshing the services. Kick the discovery over to a background queue,
with it hopping back to the main queue to update the actual state and notify any contexts
that were interested.
2014-05-15 Dan Bernstein <mitz@apple.com>
Fixed a typo in a comment and updated previous change log entry.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::elementDidFocus):
2014-05-15 Dan Bernstein <mitz@apple.com>
<rdar://problem/16844952> [iOS] www.wikipedia.org is loading much slower due to FormClient::willBeginInputSession
https://bugs.webkit.org/show_bug.cgi?id=132974
Reviewed by Enrica Casucci.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::elementDidFocus): Don’t call FormClient::willBeginInputSession if the
focus isn’t user-initiated, because in that case the UI process will bail out of
-_startAssistingNode:userIsInteracting:userObject: before creating an input session and
calling the -_webView:didStartInputSession:.
2014-05-15 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] WKWebView sends invalid content offsets at the end of animated resize
https://bugs.webkit.org/show_bug.cgi?id=132941
<rdar://problem/16921557>
Reviewed by Tim Horton.
Since we cannot change the scale and content inset simultaneously while accounting for the obscured insets,
we end up with invalid contentOffsets.
To work around the problem, change the content scale outside of UIScrollView to ensure none of the side effect
happens.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _endAnimatedResize]):
2014-05-15 Tim Horton <timothy_horton@apple.com>
WebKit2 View Gestures (Zoom): Document size changes during zoom gesture cause erratic scrolling
https://bugs.webkit.org/show_bug.cgi?id=132944
<rdar://problem/15769454>
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
If a layer flush occurs and we have an active transient zoom,
re-apply the transient zoom to the relevant platform layers, because
WebCore might have overwritten the relevant layer properties.
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
Reset m_transientZoomScale before flushLayers() so that we don't
re-apply the transient zoom when we're actually trying to commit it.
2014-05-15 Alex Christensen <achristensen@webkit.org>
Add pointer lock to features without enabling it.
https://bugs.webkit.org/show_bug.cgi?id=132961
Reviewed by Sam Weinig.
* Configurations/FeatureDefines.xcconfig:
Added ENABLE_POINTER_LOCK to list of features.
2014-05-15 Simon Fraser <simon.fraser@apple.com>
[UI-side compositing] Fix copying animations between layers, and pausing them
https://bugs.webkit.org/show_bug.cgi?id=132943
<rdar://problem/16906369&16906541>
Reviewed by Tim Horton.
Fix PlatformCAAnimationRemote to support animation copying, and to record
the beginTime for implicitly started animations. This fixes animation pausing,
and copying of animations between layers when they go between tiled and non-tiled.
This requires sending the animation key back through animationDidStart() so that
we can record this beginTime on the PlatformCAAnimationRemote in the web process.
This path doesn't set the "hasExplicitBeginTime" flag.
PlatformCAAnimationRemote also now stores a hash of active animations, so that
it can implement animationForKey(), and record the beginTime.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::animationDidStart): Grovel for the key for this
animation; sadly CA doesn't give us an easier way.
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::acceleratedAnimationDidStart):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(-[WKAnimationDelegate animationDidStart:]):
(WebKit::PlatformCAAnimationRemote::copy):
(WebKit::PlatformCAAnimationRemote::copyTimingFunctionFrom):
(WebKit::PlatformCAAnimationRemote::copyFromValueFrom):
(WebKit::PlatformCAAnimationRemote::copyToValueFrom):
(WebKit::PlatformCAAnimationRemote::copyValuesFrom):
(WebKit::PlatformCAAnimationRemote::copyKeyTimesFrom):
(WebKit::PlatformCAAnimationRemote::copyTimingFunctionsFrom):
(WebKit::addAnimationToLayer):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::addAnimationForKey):
(WebKit::PlatformCALayerRemote::removeAnimationForKey):
(WebKit::PlatformCALayerRemote::animationForKey):
(WebKit::PlatformCALayerRemote::animationStarted):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::animationDidStart):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidStart):
2014-05-14 Simon Fraser <simon.fraser@apple.com>
Clean up "has non-zero begin time" terminology in animations
https://bugs.webkit.org/show_bug.cgi?id=132942
Reviewed by Tim Horton.
Change the "non-zero beginTime" terminology in the platform CA animations
code to "explicit beginTime": this flag really means that we explicitly set
the beginTime of the animation, rather than let CA set the beginTime when
committing the animation. This flag is used for animations with negative
delay, and when pausing.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(-[WKAnimationDelegate animationDidStart:]):
(WebKit::PlatformCAAnimationRemote::Properties::encode):
(WebKit::PlatformCAAnimationRemote::Properties::decode):
(WebKit::PlatformCAAnimationRemote::setBeginTime):
(WebKit::addAnimationToLayer):
2014-05-15 Tim Horton <timothy_horton@apple.com>
[iOS] Incremental updates during scroll-to-top shouldn’t count as “stable” updates
https://bugs.webkit.org/show_bug.cgi?id=132934
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateVisibleContentRects]):
If we're in a scroll-to-top programmatic scroll, the update is not stable.
The last event comes in with _isScrollingToTop false, so we do our stable update.
2014-05-15 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Compile all installed resources as GResources
https://bugs.webkit.org/show_bug.cgi?id=131099
Reviewed by Philippe Normand.
It avoids conflicts with old WebKit versions, and resources are
always found even without installing or using environment variables.
* PlatformGTK.cmake: Add rules to write the xml file with the
resources depending on the configure options and to generate and
build the GResources file.
2014-05-14 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL][WK2] Fix an unit test of ewk_context_url_scheme_register()
https://bugs.webkit.org/show_bug.cgi?id=132902
Reviewed by Anders Carlsson.
This test can be run when CUSTOM_PROTOCOL is enabled. Besides the test needs
to check if registered callback function works well.
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(EWK2ContextTest::schemeRequestCallback):
(TEST_F):
2014-05-14 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Use default context for ewk_view_add
https://bugs.webkit.org/show_bug.cgi?id=132936
Reviewed by Gyuyoung Kim.
Since r146265, ewk_view_add created new context and it's regression.
This patch restores the behavior of ewk_view_add to original one.
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_add):
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
2014-05-14 Maciej Stachowiak <mjs@apple.com>
Database Process crashes after loading html5test.com
https://bugs.webkit.org/show_bug.cgi?id=132938
<rdar://problem/16241419>
Reviewed by Ryosuke Niwa.
* DatabaseProcess/IndexedDB/DatabaseProcessIDBConnection.cpp:
(WebKit::DatabaseProcessIDBConnection::disconnectedFromWebProcess): Expand comment
about the null check.
(WebKit::DatabaseProcessIDBConnection::deleteDatabase): Call disconnectedFromWebProcess
to pick up its null check and to avoid duplicating code.
2014-05-14 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] The top/bottom edges should not be sticky when restoring the scroll position from the dynamic size update history
https://bugs.webkit.org/show_bug.cgi?id=132931
Reviewed by Sam Weinig.
The goal of dynamicSizeUpdateHistory is to make dynamic resize completely reversible.
Because of the stick-to-edges heuristics, this was not true near the top and bottom edges.
For example, start in landscape, scroll the page a bit, then rotate to portrait. Now you have
a lot more vertical space, and the top edge of the document is at the edge of the scrollview.
Rotate back to landscape: the position is restored correct, but it is then overriden by
the stick-to-edges branch.
When we restore the position from history, we should only put it back in the valid bounds, skipping
stick-to-edges entirely.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
2014-05-14 Tim Horton <timothy_horton@apple.com>
Enable IOSurface view snapshots for 10.9+
https://bugs.webkit.org/show_bug.cgi?id=132932
<rdar://problem/16900619>
Reviewed by Dean Jackson.
* UIProcess/mac/ViewSnapshotStore.h:
r166005 unintentionally worked around <rdar://problem/16734031>.
r168689 fixed another bug that caused sometimes randomly white snapshots.
It's safe to turn on IOSurface view snapshots where purgeability is supported.
2014-05-14 Alexey Proskuryakov <ap@apple.com>
Use the correct client in WebPageProxy::unwrapCryptoKey
https://bugs.webkit.org/show_bug.cgi?id=132924
Reviewed by Darin Adler.
* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::unwrapCryptoKey): Match what
we now do in wrapCryptoKey().
2014-05-14 Zalan Bujtas <zalan@apple.com>
Subpixel layout: Change Element.offset* client* scroll* return type to double.
https://bugs.webkit.org/show_bug.cgi?id=132895
Reviewed by Simon Fraser.
This patch changes Element.offset*, Element.client* and Element.scroll* APIs return
type from long to double to match the latest CSSOM View Module spec[1].
Element.offset* and Element.client* do return subpixel values from now on.
Element.scroll* still return integral values as the scrolling code hasn't adopted to subpixel rendering yet.
subpixelCSSOMElementMetricsEnabled setting is added to be able to turn this feature on/off
from WK2 preferences. It toggles the return value from subpixel to floored integral.
It does not change layout/rendering behavior.
Reference list of what other browsers do:
IE: http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx
Blink: http://www.chromestatus.com/features/5497402177880064
Firefox: https://bugzilla.mozilla.org/show_bug.cgi?id=825607
[1] http://www.w3.org/TR/2013/WD-cssom-view-20131217/
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetSubpixelCSSOMElementMetricsEnabled):
(WKPreferencesGetSubpixelCSSOMElementMetricsEnabled):
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-05-14 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Expose the viewport meta tag width on the UIProcess
https://bugs.webkit.org/show_bug.cgi?id=132926
<rdar://problem/16892115>
Reviewed by Sam Weinig.
Safari requires the viewport meta tag width for legacy stuff on WebApps. Just send it
over to the UIProcess when it changes.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _setViewportMetaTagWidth:]):
(-[WKWebView _viewportMetaTagWidth]):
* 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::didChangeViewportMetaTagWidth):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::viewportMetaTagWidthDidChange):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportPropertiesDidChange):
2014-05-13 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Make view debugging easier
https://bugs.webkit.org/show_bug.cgi?id=132892
Reviewed by Tim Horton.
Enhance -[WKCompositingView description] to show WebKit-related information
which is useful when dumping a window's UIView hierarchy.
Also have WKTransformView and WKRemoteView inherit from WKCompositingView,
and thereby get the hitTest:withEvent: override for free, as well as better dumping.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(-[WKCompositingView description]):
(-[WKTransformView hitTest:withEvent:]): Deleted.
(-[WKRemoteView hitTest:withEvent:]): Deleted.
2014-05-14 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Fixed positioned element must relayout correctly before sending resize events to the page
https://bugs.webkit.org/show_bug.cgi?id=132920
<rdar://problem/16836866>
Reviewed by Simon Fraser.
During the dynamic resize operation, we do not update the fixed position elements because
it is a very hard problem on the UI Process side.
When the animation finishes, the fixed positioned rect is recomputed on the UIProcess and pushed
to the WebProcess.
The problem is sending the rect after the animation is too late, the content can observe the fixed
elements layout through JavaScript and would get the old size.
This patch fixes the issue updating the CustomFixedPositionLayoutRect on the WebProcess before
notifying the content of the resize.
First, we layout the content to the new fixed layout size to get the new content size.
Then, we compute the new FixedPositionedLayoutRect with FrameView's viewportConstrainedObjectsRect(),
this use the real content size and our estimated unobscured content rect.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
2014-05-14 Enrica Casucci <enrica@apple.com>
REGRESSION(WK2): Many pages have very wrong text size after rotating.
https://bugs.webkit.org/show_bug.cgi?id=132893
<rdar://problem/16806958>
Reviewed by Benjamin Poulain.
Whenever our viewport width changes we must reset text autosizing
on the renderer.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
(WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
(WebKit::WebPage::resetTextAutosizingBeforeLayoutIfNeeded):
(WebKit::WebPage::dynamicViewportSizeUpdate):
2014-05-14 Alex Christensen <achristensen@webkit.org>
Use references instead of pointers with ResourceLoadTiming.
https://bugs.webkit.org/show_bug.cgi?id=132846
Reviewed by Alexey Proskuryakov.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceResponse>::encode):
(IPC::ArgumentCoder<ResourceResponse>::decode):
Use references instead of pointers and null checks.
2014-05-14 Tibor Meszaros <tmeszaros.u-szeged@partner.samsung.com>
Remove CSS_STICKY_POSITION guards
https://bugs.webkit.org/show_bug.cgi?id=132676
Reviewed by Simon Fraser.
* Configurations/FeatureDefines.xcconfig:
2014-05-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL][WK2] Add ewk_view_fixed_layout_size_set|get()
https://bugs.webkit.org/show_bug.cgi?id=132811
Reviewed by Christophe Dumez.
Some EFL applications need to set size of fixed layout when enabling fixed layout.
This APIs can pass ownership regarding the size of fixed layout to application side.
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_layout_fixed_size_set):
(ewk_view_layout_fixed_size_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
2014-05-13 Simon Fraser <simon.fraser@apple.com>
Fix "ASSERTION FAILED: m_representation == PlatformLayerRepresentation" with UI-side compositing
https://bugs.webkit.org/show_bug.cgi?id=132899
Reviewed by Beth Dakin.
The new InsetClipLayer and ContentShadowLayer members on scrolling nodes
need to be correctly encoded/decoded for UI-side compositing, and dumped
correctly.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
(WebKit::RemoteScrollingTreeTextStream::dump):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
2014-05-13 Anders Carlsson <andersca@apple.com>
Another build fix.
Reviewed by Dan Bernstein.
* Shared/API/Cocoa/WKFoundation.h:
Make sure to include Availability.h
2014-05-13 Beth Dakin <bdakin@apple.com>
REGRESSION (topContentInset): Searching through Facebook Messenger's chat causes
scrolling in News Feed
https://bugs.webkit.org/show_bug.cgi?id=132889
-and corresponding-
<rdar://problem/16715716>
Reviewed by Simon Fraser.
Re-name scrollOffsetRelativeToDocument() to
documentScrollPositionRelativeToViewOrigin().
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::rectsForTextMatches):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
2014-05-13 Dean Jackson <dino@apple.com>
[iOS] Page scale update messages for media controls should only fire at the end of zooming
https://bugs.webkit.org/show_bug.cgi?id=132857
<rdar://problem/16631009>
Reviewed by Simon Fraser.
As the user was zooming, the media controls that responded
to the page scale (and resized themselves) would do so
slightly out of sync with the screen refreshes, and it looked
terrible.
We already know if a pageScale change is happening inside
a gesture using the inStableState property of the visibleContentRectUpdateInfo.
Simply pass this along to WebCore::Page.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects): Pass inStableState onto the
WebCore::Page. Note that we have to send this message even if the
scale has not changed, since the last changing update might not have
been stable.
2014-05-13 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] When the secondary UIScrollView delegates respond to callbacks, delay the state change until both delegates have finished
https://bugs.webkit.org/show_bug.cgi?id=132849
<rdar://problem/16863716>
Reviewed by Anders Carlsson.
When there are two delegates responding to UIScrollView changes, there was often an intermediate invalid
state forwarded to the UIProcess.
For example, on scroll, WKWebView would update the state based on the current obscured insets in response to
delegate callbacks.
After that update, Safari would modify the insets, thus updating the state again.
The first state changed by WKWebView is incomplete, and should never have been set.
This patch works around the issue by delaying visible update rect in those cases.
When the two delegates of WKScrollView respond to the same selector, WKScrollView invokes
[UIWebView _willInvokeUIScrollViewDelegateCallback] on entry, and
[UIWebView _didInvokeUIScrollViewDelegateCallback] on exit.
Between those two calls, WKWebView does not forward the new UI state to the WebProcess.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _willInvokeUIScrollViewDelegateCallback]):
(-[WKWebView _didInvokeUIScrollViewDelegateCallback]):
(-[WKWebView _updateVisibleContentRects]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
* UIProcess/ios/WKScrollView.h:
* UIProcess/ios/WKScrollView.mm:
(-[WKScrollViewDelegateForwarder initWithInternalDelegate:externalDelegate:]):
(-[WKScrollViewDelegateForwarder forwardInvocation:]):
(-[WKScrollView setInternalDelegate:]):
2014-05-13 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Remove the _extendedBackgroundExclusionInsets SPI
https://bugs.webkit.org/show_bug.cgi?id=132848
<rdar://problem/16875093>
Reviewed by Darin Adler.
The SPI is no longer needed by Safari.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _updateScrollViewBackground]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _setObscuredInsets:]):
(-[WKWebView _endAnimatedResize]):
(updateTopAndBottomExtendedBackgroundExclusionIfNecessary): Deleted.
(-[WKWebView _setExtendedBackgroundExclusionInsets:]): Deleted.
(-[WKWebView _extendedBackgroundExclusionInsets]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-05-13 Samuel White <samuel_white@apple.com>
AX: Hit testing not accounting for top content inset.
https://bugs.webkit.org/show_bug.cgi?id=132876
Reviewed by Chris Fleizach.
Updated accessibilityHitTest: to account for top content inset when converting from screen coords to WebKit coords.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2014-05-13 Enrica Casucci <enrica@apple.com>
REGRESSION (WebKit2): Zooming to text field leaves it partially hidden by the form assistant.
https://bugs.webkit.org/show_bug.cgi?id=132879
<rdar://problem/16318049>
Reviewed by Benjamin Poulain.
Adds the heuristics to zoom and scroll to ensure the element being focused
is fully visible and its text readable.
* Shared/AssistedNodeInformation.cpp:
(WebKit::AssistedNodeInformation::encode):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h:
(WebKit::AssistedNodeInformation::AssistedNodeInformation):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _zoomToFocusRect:WebCore::selectionRect:WebCore::fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _zoomToFocusRect:selectionRect:fontSize:minimumScale:maximumScale:allowUserScaling:forceScroll:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView _startAssistingNode:userIsInteracting:userObject:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):
2014-05-13 Simon Fraser <simon.fraser@apple.com>
Fix the iOS Simulator build.
* UIProcess/mac/ViewSnapshotStore.h:
2014-05-13 Tim Horton <timothy_horton@apple.com>
Speculative build fix for iOS.
* UIProcess/ios/WebMemoryPressureHandlerIOS.cpp: Removed.
* UIProcess/ios/WebMemoryPressureHandlerIOS.mm: Added.
(WebKit::WebMemoryPressureHandler::shared):
(WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
* WebKit2.xcodeproj/project.pbxproj:
Make WebMemoryPressureHandlerIOS Obj-C.
2014-05-13 Anders Carlsson <andersca@apple.com>
Another follow-up build fix.
* Shared/API/Cocoa/WKFoundation.h:
2014-05-13 Anders Carlsson <andersca@apple.com>
Another follow-up build fix.
* Shared/API/Cocoa/WKFoundation.h:
2014-05-13 Anders Carlsson <andersca@apple.com>
Follow-up fix.
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction _initWithNavigationActionData:WebKit::]):
(-[WKNavigationAction _isUserInitiated]):
2014-05-13 Anders Carlsson <andersca@apple.com>
Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
https://bugs.webkit.org/show_bug.cgi?id=132880
<rdar://problem/16901354>
Reviewed by Dan Bernstein.
* Shared/API/Cocoa/WKFoundation.h:
Add typedef for older systems.
* UIProcess/API/Cocoa/WKNavigationAction.h:
Add -[WKNavigationAction modifierFlags] and -[WKNavigationAction buttonNumber]
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(toWKNavigationType):
This can be static now.
(toNSEventModifierFlags):
Helper to convert WebEvent::Modifiers to NSEventModifierFlags.
(toNSButtonNumber):
Helper to convert WebMouseEvent::Button to an AppKit button number.
(-[WKNavigationAction initWithNavigationActionData:WebKit::]):
New initializer that takes a NavigationActionData and fills in the relevant ivars from it.
(-[WKNavigationAction _isUserInitiated]):
Return the new ivar.
* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
Remove readwrite overrides.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
Use initWithNavigationActionData:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
Use initWithNavigationActionData:
2014-05-13 Tim Horton <timothy_horton@apple.com>
WebKit2 View Gestures (Swipe): Encode snapshots as JPEG on some platforms
https://bugs.webkit.org/show_bug.cgi?id=127788
<rdar://problem/15928241>
Reviewed by Anders Carlsson.
Allow JPEG snapshots. Compression is done asynchronously.
Enable JPEG snapshots (for now) on all PLATFORM(MAC).
We'll switch back to IOSurface snapshots on 10.9+ after <rdar://problem/16734031> is resolved.
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
Store the image size on the ViewSnapshot.
Move IOSurface-related code to ViewSnapshotStore.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Adopt asLayerContents().
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::retrieveSnapshotForItem):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
Adopt asLayerContents().
Put the snapshot on the right layer (the parent of the snapshot image layer);
if it's on the snapshot image layer itself, if there is no image, the shadow
is displayed on top of the white placeholder.
Only reset snapshot purgeability if we're using IOSurface snapshots.
* UIProcess/mac/ViewSnapshotStore.h:
Add a bunch of macros to allow us to switch the snapshot backing store implementation.
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::~ViewSnapshotStore):
(WebKit::ViewSnapshotStore::recordSnapshot):
If takeViewSnapshot() fails, don't remove the existing snapshot.
(WebKit::createIOSurfaceFromImage):
(WebKit::compressImageAsJPEG):
(WebKit::ViewSnapshotStore::reduceSnapshotMemoryCost):
(WebKit::ViewSnapshotStore::didCompressSnapshot):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::asLayerContents):
Asynchronously compress snapshots - if we're using JPEG snapshots - for a
very large memory win (~20-30x).
2014-05-12 Darin Adler <darin@apple.com>
Make a few icon database improvements
https://bugs.webkit.org/show_bug.cgi?id=132812
Reviewed by Brady Eidson.
* UIProcess/API/C/WKIconDatabase.cpp:
(WKIconDatabaseCopyIconDataForPageURL): Moved the actual implementation of this
out of the bindings into the WebIconDatabase class.
* UIProcess/API/C/WKIconDatabase.h: Fixed argument names that were inconsistent.
* UIProcess/WebIconDatabase.cpp: Removed unneeded includes.
(WebKit::WebIconDatabase::create): Pass a reference instead of a pointer.
(WebKit::WebIconDatabase::WebIconDatabase): Take a reference instead of a pointer.
(WebKit::WebIconDatabase::invalidate): Use nullptr.
(WebKit::WebIconDatabase::setDatabasePath): Use make_unique.
(WebKit::WebIconDatabase::setIconDataForIconURL): Removed unneeded local variable.
(WebKit::WebIconDatabase::imageForPageURL): Use nullptr.
(WebKit::WebIconDatabase::nativeImageForPageURL): Ditto.
(WebKit::WebIconDatabase::didFinishURLImport): Use a modern for loop.
(WebKit::WebIconDatabase::iconDataForPageURL): Added. Moved this here from
WKIconDatabase.cpp, but also changed to use createWithoutCopying to avoid making
another copy of the data for each icon.
* UIProcess/WebIconDatabase.h: Removed unneeded includes. Derive from
IconDatabaseClient privately. Use nullptr. Added iconDataForPageURL member
function. Use a reference for the constructor argument. Use override for
virtual functions. Use unique_ptr instead of OwnPtr.
2014-05-12 Mark Lam <mark.lam@apple.com>
WebKit2 on iOS needs to capture the main thread's floating point environment.
<https://webkit.org/b/132755>
Reviewed by Geoffrey Garen.
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::platformInitialize):
- Call FloatingPointEnv::enableNeededFloatingPointModes() to initialize
the ARMv7 FP env to support denormalized numbers.
- Call FloatingPointEnv::saveMainThreadEnvironment() to capture the main thread
fp env.
2014-05-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[EFL][WK2] Fix ewk_view_navigation test in EWK2ViewTest
https://bugs.webkit.org/show_bug.cgi?id=132817
Reviewed by Dirk Schulze.
To load test html pages, call ewk_view_uri_set() instead of EWK2UnitTestServer.
Besides this patch adds test html page for ewk_view_navigation unit test.
* UIProcess/API/efl/tests/resources/Page1.html: Added.
* UIProcess/API/efl/tests/resources/Page2.html: Added.
* UIProcess/API/efl/tests/resources/Page3.html: Added.
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
2014-05-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Unreviewed, EFL build fix since r168625.
* UIProcess/efl/WebContextEfl.cpp:
(WebKit::WebContext::platformDefaultLocalStorageDirectory): Remove const keyword.
2014-05-12 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Fuzzy tiles on some sites on loading
https://bugs.webkit.org/show_bug.cgi?id=132847
<rdar://problem/16816178>
Reviewed by Benjamin Poulain.
PlatformCALayerRemoteTiledBacking overrode setContentsScale() but not contentsScale(),
causing us to early-return from GraphicsLayerCA::updateContentsScale() and leave the
scale wrong. Fix by overriding contentsScale() also.
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
(WebKit::PlatformCALayerRemoteTiledBacking::contentsScale):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2014-05-12 Tim Horton <timothy_horton@apple.com>
Triple-buffer RemoteLayerBackingStore
https://bugs.webkit.org/show_bug.cgi?id=132786
<rdar://problem/16877498>
Reviewed by Simon Fraser.
We need three buffers because we're currently unable to synchronize
with the render server to swap when they're not in use, so we were
throwing surfaces away far too frequently.
This hugely reduces time spent in IOSurface::create on various repaint benchmarks.
* Shared/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::hasFrontBuffer):
(WebKit::RemoteLayerBackingStore::volatility): Deleted.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::clearBackingStore):
(WebKit::RemoteLayerBackingStore::encode):
(WebKit::RemoteLayerBackingStore::decode):
(WebKit::RemoteLayerBackingStore::swapToValidFrontBuffer):
(WebKit::RemoteLayerBackingStore::display):
(WebKit::RemoteLayerBackingStore::applyBackingStoreToLayer):
(WebKit::RemoteLayerBackingStore::setBufferVolatility):
(WebKit::RemoteLayerBackingStore::Buffer::discard):
(WebKit::RemoteLayerBackingStore::setVolatility): Deleted.
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
(WebKit::RemoteLayerBackingStoreCollection::purgeabilityTimerFired):
Put the ShareableBitmap/IOSurface and a volatility bit in a Buffer struct.
Also factor out "throw away this buffer and put it in the pool" into Buffer::discard().
We keep a volatility bit because querying IOSurface purgeability is expensive,
and we have a guarantee that any changes will happen in the Web process
and go through this class (the lack of this guarantee in most cases is why I'm not
putting this bit in WebCore::IOSurface itself).
Make it so that each buffer's volatility can be adjusted individually
by setBufferVolatility(), and adopt in RemoteLayerBackingStoreCollection.
Add a third buffer, m_secondaryBackBuffer, which will swap with the back buffer
before swapping front and back if the back buffer (soon to be the front buffer)
is still in use by the render server. This means that we will almost never
have to throw away a surface because it's in use (and conversely never need
to make a new surface).
Adjust RemoteLayerBackingStoreCollection to make secondary back surfaces purgeable
more aggressively than others.
2014-05-12 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r165972): Can't type into text fields in Flash
https://bugs.webkit.org/show_bug.cgi?id=132840
<rdar://problem/16671969>
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm: (-[WKView inputContext]): Restore a function that
got accidentally lost when adding async text input code.
2014-05-12 Chris Fleizach <cfleizach@apple.com>
AX: .js dialogs shown in unload while AX is running crash WebKit.
https://bugs.webkit.org/show_bug.cgi?id=123828
Reviewed by Anders Carlsson.
Utilize platform API to inform AX clients when the WebProcess will suspend and resume.
This allows us to avoid having special behavior for accessibility when the WebProcess needs
to wait on a reply.
* Platform/IPC/Connection.cpp:
(IPC::Connection::waitForSyncReply):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::willSendSyncMessage):
(IPC::Connection::didReceiveSyncReply):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
(WebKit::WebChromeClient::print):
(WebKit::WebChromeClient::exceededDatabaseQuota):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
2014-05-12 Alex Christensen <achristensen@webkit.org>
Progress on web timing.
https://bugs.webkit.org/show_bug.cgi?id=132574
Reviewed by Alexey Proskuryakov.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceResponse>::encode):
(IPC::ArgumentCoder<ResourceResponse>::decode):
Transfer ResourceLoadTiming values if they exist.
2014-05-12 Dan Bernstein <mitz@apple.com>
[Cocoa] Expose WebPage::usesEphemeralSession to the bundle
https://bugs.webkit.org/show_bug.cgi?id=132836
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _usesNonPersistentWebsiteDataStore]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
2014-05-12 Carlos Alberto Lopez Perez <clopez@igalia.com>
REGRESSION(168625): [GTK] build broken due to WKContextSetLocalStorageDirectory
https://bugs.webkit.org/show_bug.cgi?id=132831
Unreviewed GTK build fix.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformDefaultLocalStorageDirectory):
This is now a static member function.
2014-05-12 Anders Carlsson <andersca@apple.com>
WKWebViewConfiguration should fill in the blanks
https://bugs.webkit.org/show_bug.cgi?id=132832
<rdar://problem/16886408>
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration init]):
(-[WKWebViewConfiguration _validate]):
* UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h:
2014-05-12 Anders Carlsson <andersca@apple.com>
WKWebView should default to _backgroundExtendsBeyondPage = YES
https://bugs.webkit.org/show_bug.cgi?id=132829
<rdar://problem/16886364>
Reviewed by Beth Dakin.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
2014-05-12 Anders Carlsson <andersca@apple.com>
Pass local storage directory to StorageManager::create
https://bugs.webkit.org/show_bug.cgi?id=132827
Reviewed by Tim Horton.
Since we know the local storage directory at creation time and we know it never changes,
we can get rid of setLocalStorageDirectory and just pass the local storage directory at creation time.
* UIProcess/Storage/LocalStorageDatabaseTracker.cpp:
(WebKit::LocalStorageDatabaseTracker::create):
(WebKit::LocalStorageDatabaseTracker::LocalStorageDatabaseTracker):
(WebKit::LocalStorageDatabaseTracker::~LocalStorageDatabaseTracker):
(WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectory): Deleted.
(WebKit::LocalStorageDatabaseTracker::setLocalStorageDirectoryInternal): Deleted.
* UIProcess/Storage/LocalStorageDatabaseTracker.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::create):
(WebKit::StorageManager::StorageManager):
(WebKit::StorageManager::setLocalStorageDirectory): Deleted.
* UIProcess/Storage/StorageManager.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
2014-05-11 Anders Carlsson <andersca@apple.com>
Replace WKContextSetLocalStorageDirectory with a context configuration getter/setter
https://bugs.webkit.org/show_bug.cgi?id=132809
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKContext.cpp:
(WKContextSetLocalStorageDirectory): Deleted.
* UIProcess/API/C/WKContextConfigurationRef.cpp:
(WKContextConfigurationCopyLocalStorageDirectory):
(WKContextConfigurationSetLocalStorageDirectory):
* UIProcess/API/C/WKContextConfigurationRef.h:
Add getters and setters for the local storage directory.
* UIProcess/API/C/WKContextPrivate.h:
Remove WKContextSetLocalStorageDirectory.
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup initWithInjectedBundleURL:]):
Call WebContext::applyPlatformSpecificConfigurationDefaults.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _initWithConfiguration:]):
Call WebContext::applyPlatformSpecificConfigurationDefaults (for now).
* UIProcess/APIContextConfiguration.cpp:
(API::ContextConfiguration::webContextConfiguration):
Set the local storage. Also, call WebContext::applyPlatformSpecificConfigurationDefaults.
* UIProcess/APIContextConfiguration.h:
(API::ContextConfiguration::injectedBundlePath):
This should be const.
(API::ContextConfiguration::localStorageDirectory):
(API::ContextConfiguration::setLocalStorageDirectory):
Add getter and setter.
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::setLocalStorageDirectory):
ASSERT that the path isn't null.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::applyPlatformSpecificConfigurationDefaults):
New helper function that will fill in platform specific defaults for empty parameters.
(WebKit::WebContext::WebContext):
Get the local storage directory from the configuration.
(WebKit::WebContext::setLocalStorageDirectory): Deleted.
(WebKit::WebContext::localStorageDirectory): Deleted.
These are no longer needed.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultLocalStorageDirectory):
This should be a static member function.
2014-05-12 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
Typo fix in generate-forwarding-headers
https://bugs.webkit.org/show_bug.cgi?id=132820
Reviewed by Anders Carlsson.
* Scripts/generate-forwarding-headers.pl:
(collectFrameworkHeaderPaths):
2014-05-12 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
[EFL] TLSErrors do not cause page load to fail when not ignored
https://bugs.webkit.org/show_bug.cgi?id=131104
Reviewed by Gyuyoung Kim.
Added EFL unit test for the bug https://bugs.webkit.org/show_bug.cgi?id=121548
* UIProcess/API/efl/tests/test_ewk2_ssl.cpp: Added new test: ewk_ssl_bad_cert_redirect_https_to_http
2014-05-11 Gordon Sheridan <gordon_sheridan@apple.com>
Expose a function to copy favicon data without image conversion.
https://bugs.webkit.org/show_bug.cgi?id=132805
Reviewed by Darin Adler.
* UIProcess/API/C/WKIconDatabase.cpp:
(WKIconDatabaseCopyIconDataForPageURL):
Add a function to copy the data from the image of a favicon for an associated page url.
* UIProcess/API/C/WKIconDatabase.h:
Declare WKIconDatabaseCopyIconDataForPageURL.
2014-05-11 Seongjun Kim <isAir@company100.com>
REGRESSION(r168603): [GTK] Build broken.
https://bugs.webkit.org/show_bug.cgi?id=132810
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):
Construct a WebContextConfiguration object and pass it to WebContext::create.
2014-05-11 Anders Carlsson <andersca@apple.com>
Remove local storage directory and sandbox extension from WebProcessCreationParameters
https://bugs.webkit.org/show_bug.cgi?id=132808
Reviewed by Beth Dakin.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-05-11 Jaehun Lim <ljaehun.lim@samsung.com>
Unreviewed, CMake build fix after r168603
Add APIContextConfiguration.cpp and WKContextConfigurationRef.cpp to the source list.
* CMakeLists.txt:
2014-05-11 Anders Carlsson <andersca@apple.com>
Add a WKContextConfigurationRef object and make the injected bundle path part of the configuration
https://bugs.webkit.org/show_bug.cgi?id=132806
<rdar://problem/16830143>
Reviewed by Beth Dakin.
Many setters on WKContextRef really only make sense to set early on, so move to a pattern where we create a
configuration object, a WKContextConfiguration which WKContexts can be created from. Add the injected bundle path
as a configuration property. More setters will follow.
* Shared/API/c/WKBase.h:
Add WKContextConfigurationRef.
* Shared/APIObject.h:
Add ContextConfiguration enum declaration.
* UIProcess/API/C/WKAPICast.h:
Handle WKContextConfigurationRef.
* UIProcess/API/C/WKContext.cpp:
(WKContextCreate):
Create an empty WKContextConfigurationRef object and pass it to WKContextCreateWithConfiguration.
(WKContextCreateWithInjectedBundlePath):
Create a WKContextConfigurationRef object, set its bundle path and pass the configuration to WKContextCreateWithConfiguration.
(WKContextCreateWithConfiguration):
Convert the WKContextConfigurationRef object to a WebContextConfiguration and pass it to WebContext::create.
* UIProcess/API/C/WKContext.h:
Add WKContextCreateWithConfiguration.
* UIProcess/API/C/WKContextConfigurationRef.cpp: Added.
(WKContextConfigurationCreate):
Create an API::ContextConfiguration object.
(WKContextConfigurationCopyInjectedBundlePath):
Return the injected bundle path.
(WKContextConfigurationSetInjectedBundlePath):
Set the injected bundle path.
* UIProcess/API/C/WKContextConfigurationRef.h: Added.
New C SPI header.
* UIProcess/API/Cocoa/WKProcessGroup.mm:
(-[WKProcessGroup initWithInjectedBundleURL:]):
Construct a WebContextConfiguration object and pass it to WebContext::Create.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _initWithConfiguration:]):
Construct a WebContextConfiguration object and pass it to WebContext::Create.
* UIProcess/APIContextConfiguration.cpp: Added.
New API::ContextConfiguration object.
(API::ContextConfiguration::webContextConfiguration):
Construct a WebContextConfiguration struct from our current configuration.
* UIProcess/APIContextConfiguration.h: Added.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::create):
Pass the WebContextConfiguration to the constructor.
(WebKit::WebContext::WebContext):
Set the injected bundle path from the WebContextConfiguration object.
* UIProcess/WebContext.h:
Change the WebContext constructor and create function to take a WebContextConfiguration object.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
2014-05-10 Csaba Osztrogonác <ossy@webkit.org>
[WK2] URTBF after r168585.
* Platform/IPC/Connection.h:
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::terminate):
2014-05-10 Tim Horton <timothy_horton@apple.com>
[WKWebView _updateScrollViewBackground] churns UI-and-CGColors while repainting
https://bugs.webkit.org/show_bug.cgi?id=132793
<rdar://problem/16877870>
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]):
Don't bypass the cache and make a copy of the CGColor just to set its alpha.
Cache the last color and don't bother creating a UIColor nor updating the
color on our views if it hasn't changed.
2014-05-10 Tim Horton <timothy_horton@apple.com>
Implement -forwardingTargetForSelector on WKScrollViewDelegateForwarder
https://bugs.webkit.org/show_bug.cgi?id=132790
<rdar://problem/16877802>
Reviewed by Dan Bernstein.
* UIProcess/ios/WKScrollView.mm:
(-[WKScrollViewDelegateForwarder forwardingTargetForSelector:]):
If only one of the delegates will respond to a selector,
we can return it from forwardingTargetForSelector: to avoid
NSInvocation overhead.
2014-05-10 Dan Bernstein <mitz@apple.com>
[Mac] Some targets that link or soft-link WebKit.framework don't depend on it
https://bugs.webkit.org/show_bug.cgi?id=132776
Reviewed by Darin Adler.
* WebKit2.xcodeproj/project.pbxproj:
2014-05-10 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Move the ownership of EwkSettings from EwkView to EwkPageGroup
https://bugs.webkit.org/show_bug.cgi?id=132771
Reviewed by Gyuyoung Kim.
Moved ownership of EwkSettings from EwkView to EwkPageGroup.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
* UIProcess/API/efl/EwkView.h:
(EwkView::settings): Deleted.
* UIProcess/API/efl/ewk_page_group.cpp:
(EwkPageGroup::EwkPageGroup):
* UIProcess/API/efl/ewk_page_group_private.h:
(EwkPageGroup::settings):
* UIProcess/API/efl/ewk_settings_private.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_settings_get):
2014-05-10 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] REGRESSION (r168493): Canvasmark 2013 benchmark always hits the RELEASE_ASSERT in RemoteLayerTreeDrawingArea::flushLayers()
https://bugs.webkit.org/show_bug.cgi?id=132783
<rdar://problem/16877326>
Reviewed by Anders Carlsson.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
There's a race window between the BackingStoreFlusher sending the new
layer tree to the UI process and updating m_hasFlushed where we can
get a reply back in (on the Web process main thread) from the UI process
that we committed the new layer tree (didUpdate).
This will cause the RELEASE_ASSERT in flushLayers() to fire incorrectly.
Since the RELEASE_ASSERT is there only to avoid painting garbage, move
our code to set m_hasFlushed=true to after we finish calling CGContextFlush
on all of the contexts, instead of after we send the layer tree commit message,
which will remove the race entirely.
2014-05-10 Anders Carlsson <andersca@apple.com>
ASSERTION FAILED: !m_connection under RunJavaScriptAlert
https://bugs.webkit.org/show_bug.cgi?id=132792
<rdar://problem/16691138>
Reviewed by Dan Bernstein.
Detect if someone implementing a UI delegate method with a completion handler never calls the completion
handler and raise an exception instead of asserting.
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::CompletionHandlerCallChecker::create):
(WebKit::CompletionHandlerCallChecker::~CompletionHandlerCallChecker):
(WebKit::CompletionHandlerCallChecker::didCallCompletionHandler):
(WebKit::CompletionHandlerCallChecker::CompletionHandlerCallChecker):
(WebKit::CompletionHandlerCallChecker::classImplementingDelegateMethod):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
2014-05-10 Anders Carlsson <andersca@apple.com>
Use xpc_connection_kill for killing child processes where appropriate
https://bugs.webkit.org/show_bug.cgi?id=132788
<rdar://problem/16664185>
Reviewed by Sam Weinig.
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::kill):
* Platform/IPC/mac/XPCPtr.h:
(IPC::XPCPtr::operator bool):
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::terminate):
2014-05-10 Anders Carlsson <andersca@apple.com>
WebKit2 is leaking an xpc_connection per web process it creates
https://bugs.webkit.org/show_bug.cgi?id=132785
<rdar://problem/14912160>
Reviewed by Sam Weinig.
Introduce an IPC::XPCPtr smart pointer class and use it for XPC connections inside Connection::Identifier and Connection itself.
Make sure we always adopt any connections that are created.
* 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):
(IPC::Connection::xpcConnection):
* Platform/IPC/mac/ConnectionMac.mm:
(IPC::Connection::platformInvalidate):
(IPC::Connection::platformInitialize):
(IPC::Connection::getAuditToken):
* Platform/IPC/mac/XPCPtr.h: Added.
(IPC::XPCPtr::XPCPtr):
(IPC::XPCPtr::~XPCPtr):
(IPC::XPCPtr::get):
(IPC::XPCPtr::operator!):
(IPC::XPCPtr::operator=):
(IPC::adoptXPC):
* PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm:
(WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate):
(PluginServiceInitializer):
* Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm:
(WebKit::BootstrapMain):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate):
(WebKit::XPCServiceInitializer):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::hasEntitlement):
(WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
(WebKit::XPCServiceEventHandler):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceEventHandler):
* UIProcess/Launcher/ProcessLauncher.cpp:
(WebKit::ProcessLauncher::didFinishLaunchingProcess):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm:
(WebContentServiceInitializer):
2014-05-10 Anders Carlsson <andersca@apple.com>
Simplify createDataAvailableSource
https://bugs.webkit.org/show_bug.cgi?id=132782
<rdar://problem/16815202>
Reviewed by Sam Weinig.
* Platform/IPC/mac/ConnectionMac.mm: Renamed from Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp.
Rename to make this Objective-C++ so we get the lambda-to-block conversion.
(IPC::createDataAvailableSource):
Make this a function template and just pass the function directly to dispatch_source_set_event_handler.
(IPC::Connection::open):
Use lambdas instead of WTF::bind, so we'll make sure the connection is kept alive.
* WebKit2.xcodeproj/project.pbxproj:
Update for ConnectionMac.cpp to ConnectionMac.mm rename.
2014-05-10 Anders Carlsson <andersca@apple.com>
Follow-up fix.
Reviewed by Darin Adler.
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKNavigationResponse.mm:
(-[WKNavigationResponse isForMainFrame]):
Use a slightly better name.
2014-05-10 Anders Carlsson <andersca@apple.com>
Make -[WKNavigationResponse frame] SPI and only expose -[WKNavigationResponse isMainFrame]
https://bugs.webkit.org/show_bug.cgi?id=132781
<rdar://problem/16868319>
Reviewed by Darin Adler.
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKNavigationResponse.mm:
(-[WKNavigationResponse description]):
(-[WKNavigationResponse isMainFrameNavigation]):
(-[WKNavigationResponse _frame]):
(-[WKNavigationResponse frame]): Deleted.
(-[WKNavigationResponse setFrame:]): Deleted.
* UIProcess/API/Cocoa/WKNavigationResponseInternal.h:
* UIProcess/API/Cocoa/WKNavigationResponsePrivate.h: Added.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
* WebKit2.xcodeproj/project.pbxproj:
2014-05-09 Dan Bernstein <mitz@apple.com>
[Cocoa] Remove a deprecated bundle form delegate method now that no one implements it
https://bugs.webkit.org/show_bug.cgi?id=132769
Reviewed by Sam Weinig.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]):
2014-05-09 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Fix bugs exposed by r168556
https://bugs.webkit.org/show_bug.cgi?id=132768
Reviewed by Ryosuke Niwa.
Fix two bugs exposed by r168556.
1) We were only changing the page scale factor when the scale was not adjusted by live
resize. The idea was that the scale would either be the same (responsive content)
or that it would be defined by the next viewContentRectUpdate.
Now that we also send resize and scroll events, we must always update the scale since
it affects some APIs observable from JavaScript (like scrolling bounds).
2) Internally, Page's scaleFactor is stored as a float and not double. The rounding error
were causing us to send DynamicViewportUpdateChangedTarget() in cases were there is no change
of target.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::withinEpsilon):
(WebKit::WebPage::dynamicViewportSizeUpdate):
2014-05-09 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Close icondatabase when EwkFaviconDatabase is destroyed
https://bugs.webkit.org/show_bug.cgi?id=132767
Reviewed by Gyuyoung Kim.
IconDatabase should be closed explicitly.
* UIProcess/API/efl/ewk_favicon_database.cpp:
(EwkFaviconDatabase::~EwkFaviconDatabase):
2014-05-09 Anders Carlsson <andersca@apple.com>
Another build fix.
* mac/MigrateHeadersToWebKit2.make:
Don't migrate the WKPreferences.h header, WebKit2 provides its own header.
2014-05-09 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] Reset the scroll position on the first frame after didCommitLoad
https://bugs.webkit.org/show_bug.cgi?id=132765
Reviewed by Tim Horton.
Since WebCore does not update our scroll view on load, we need to do that ourself.
In case where we need to restore the state from the history, RemoteLayerTreeDrawingAreaProxy
will always invoke the scrolling after didCommitLayerTree() (since r167916).
Consequently, it is now safe again to reset the scroll position ourself on the first frame.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLoadForMainFrame]):
(-[WKWebView _didCommitLayerTree:WebKit::]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLoadForMainFrame]):
2014-05-09 Anders Carlsson <andersca@apple.com>
Update availability macros
https://bugs.webkit.org/show_bug.cgi?id=132763
<rdar://problem/15311800>
Reviewed by Dan Bernstein.
* Configurations/WebKit.xcconfig:
* Shared/API/Cocoa/WKBrowsingContextHandle.h:
* Shared/API/Cocoa/WKFoundation.h:
* Shared/API/Cocoa/_WKFrameHandle.h:
* Shared/API/Cocoa/_WKRemoteObjectInterface.h:
* Shared/API/Cocoa/_WKRemoteObjectRegistry.h:
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKBackForwardListPrivate.h:
* UIProcess/API/Cocoa/WKBrowsingContextController.h:
* UIProcess/API/Cocoa/WKBrowsingContextGroup.h:
* UIProcess/API/Cocoa/WKConnection.h:
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
(NS_ENUM):
* UIProcess/API/Cocoa/WKNavigationData.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/API/Cocoa/WKNavigationResponse.h:
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKProcessGroup.h:
* UIProcess/API/Cocoa/WKProcessPool.h:
* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKScriptMessageHandler.h:
* UIProcess/API/Cocoa/WKTypeRefWrapper.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
(NS_OPTIONS):
(NS_ENUM):
* UIProcess/API/Cocoa/WKWindowFeatures.h:
* UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
(NS_ENUM):
* UIProcess/API/Cocoa/_WKDownload.h:
* UIProcess/API/Cocoa/_WKElementAction.h:
(NS_ENUM):
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/_WKScriptWorld.h:
* UIProcess/API/Cocoa/_WKThumbnailView.h:
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInPageGroup.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInScriptWorld.h:
* WebProcess/InjectedBundle/API/mac/WKDOMDocument.h:
* WebProcess/InjectedBundle/API/mac/WKDOMElement.h:
* WebProcess/InjectedBundle/API/mac/WKDOMNode.h:
* WebProcess/InjectedBundle/API/mac/WKDOMRange.h:
* WebProcess/InjectedBundle/API/mac/WKDOMText.h:
* WebProcess/InjectedBundle/API/mac/WKDOMTextIterator.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h:
* mac/rewrite-availability-macros.sh: Added.
2014-05-09 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Allow Remote Inspector to entitlement check UIProcess through WebProcess
https://bugs.webkit.org/show_bug.cgi?id=132409
Reviewed by Timothy Hatcher.
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::parentProcessIdentifier): Deleted.
pid per debuggable is no longer needed.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
Immediately pass the parent process pid and audit_token on
to the RemoteInspector singleton when the process is created
so that it can be sent to webinspectord.
2014-05-09 Enrica Casucci <enrica@apple.com>
REGRESSION (WebKit2): Tapping in search field at wikipedia.org doesn’t bring up the keyboard.
https://bugs.webkit.org/show_bug.cgi?id=132761
<rdar://problem/16857491>
Reviewed by Benjamin Poulain.
The interactionAssistant accessor should never create an instance of
UIWKTextInteractionAssistant, but simply return the value of _textInteractionAssistant.
The text interaction assistant should only be created when needed so that the rest of
the code could reliably check if we are interacting with text or not.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView interactionAssistant]):
2014-05-09 Simon Fraser <simon.fraser@apple.com>
Fix some issues with scrolling tree logging
https://bugs.webkit.org/show_bug.cgi?id=132762
Reviewed by Tim Horton.
Only dump viewport constraints when they change, and dump the primary layer on
scrolling nodes.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingTreeTextStream::dump): Dump the primary layer.
2014-05-09 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Fixed elements can go outside the document on pinching
https://bugs.webkit.org/show_bug.cgi?id=132759
<rdar://problem/16870835>
Reviewed by Benjamin Poulain.
Constrain the rect used to position fixed position objects when pinching (when
the scale goes below the minimumScale). Do so in such a way that there's a smooth
transition between rubber-banding and pinching.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]): Use a nicer form for std::max<>.
(-[WKWebView _updateVisibleContentRects]): Pass the minimum scale.
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _updateVisibleContentRects]): Ditto.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(adjustedUnexposedEdge): Helper to adjust the left/top.
(adjustedUnexposedMaxEdge): Helper to adjust the right/bottom.
(fixedPositionRectFromExposedRect):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:minimumScale:inStableState:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
2014-05-09 Zalan Bujtas <zalan@apple.com>
Subpixel rendering[iOS]: Top bar on apple.com/support jiggles when the swoosh animates.
https://bugs.webkit.org/show_bug.cgi?id=132750
<rdar://problem/16803281>
Reviewed by Simon Fraser.
This patch ensures that GraphicsLayer and RemoteLayerBackingStore have the same dimensions.
Remove integral enclosing when we set the size on RemoteLayerBackingStore. It makes the layer's size
different from the backingstore when the passed value is fractional.
We scale and integral round this value to size the shareable bitmap later. Rounding ensures that
the final size value matches what we calculated at GraphicsLayerCA::updateGeometry()
Currently not testable.
* Shared/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::size):
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::ensureBackingStore):
(WebKit::RemoteLayerBackingStore::setNeedsDisplay): use enclosing here to ensure we cover the entire backing store.
(WebKit::RemoteLayerBackingStore::display):
(WebKit::RemoteLayerBackingStore::drawInContext):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::updateBackingStore):
2014-05-09 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Set up the resize events
https://bugs.webkit.org/show_bug.cgi?id=132726
Reviewed by Darin Adler and Simon Fraser.
Wire the UI Process updates to FrameView to send the resize events appropriately.
* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::isChangingObscuredInsetsInteractively):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateVisibleContentRects]):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:isChangingObscuredInsetsInteractively:]):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]): Deleted.
Pass down the status of the content insets with the view update to main frame's FrameView
when needed.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
On live resize, send the resize event, then the scroll events (if needed).
Since JavaScript now gets two chances to change the content (resize event + scroll event),
we query the actual scroll offset and scale for the DynamicViewportUpdateChangedTarget.
(WebKit::WebPage::viewportConfigurationChanged):
Define the custom size on load before the app gets a chance to send different rects.
If for some reason the app changes its mind about the insets, the content will be notified with a resize event.
(WebKit::WebPage::updateVisibleContentRects):
Send the resize event when the insets are stable.
Also move the scroll event after the resize event for consistency with live resize.
2014-05-09 Benjamin Poulain <benjamin@webkit.org>
[iOS] Switch geolocation to an explicit authorization query model
https://bugs.webkit.org/show_bug.cgi?id=132717
Reviewed by Sam Weinig.
Switch WKGeolocationProviderIOS to use the new API of WebGeolocationCoreLocationProvider.
On WebKit2, the whole logic to track requesters is in WebGeolocationManagerProxy.
Without the warmup sequence, WKGeolocationProviderIOS becomes really dumb: it just provides
the two step authorization and forward the start/stop messages to the WebGeolocationCoreLocationProvider.
* UIProcess/ios/WKGeolocationProviderIOS.mm:
(-[WKGeolocationProviderIOS _stopUpdating]):
(-[WKGeolocationProviderIOS decidePolicyForGeolocationRequestFromOrigin:frame:request:window:]):
(-[WKGeolocationProviderIOS geolocationAuthorizationGranted]):
(-[WKGeolocationProviderIOS geolocationAuthorizationDenied]):
(-[WKWebAllowDenyPolicyListener initWithPermissionRequestProxy:]):
(-[WKWebAllowDenyPolicyListener deny]):
(-[WKGeolocationProviderIOS _stopUpdatingIfPossible]): Deleted.
(-[WKGeolocationProviderIOS geolocationDelegateStarted]): Deleted.
(-[WKGeolocationProviderIOS geolocationDelegateUnableToStart]): Deleted.
(-[WKGeolocationProviderIOS permissionDenied:]): Deleted.
(-[WKWebAllowDenyPolicyListener initWithProvider:permissionRequestProxy:]): Deleted.
2014-05-09 Gordon Sheridan <gordon_sheridan@apple.com>
Expose functions necessary for copying favicon between IconDatabases.
https://bugs.webkit.org/show_bug.cgi?id=132709
Reviewed by Brady Eidson.
* UIProcess/API/C/WKIconDatabase.cpp:
(WKIconDatabaseSetIconURLForPageURL):
Add C API wrapper for WebIconDatabase::setIconURLForPageURL().
(WKIconDatabaseCopyIconURLForPageURL):
Add C API wrapper for WebIconDatabase::synchronousIconURLForPageURL().
* UIProcess/API/C/WKIconDatabase.h:
Added declarations for wrapper functions above.
2014-05-09 Tim Horton <timothy_horton@apple.com>
Fix the iOS DRT build by including CG headers in WKPreferences.h, which uses CGFloat.
* UIProcess/API/Cocoa/WKPreferences.h:
2014-05-09 Brent Fulgham <bfulgham@apple.com>
{TelephoneNumber, Selection}ControllerMac implementations dosn't handle tiled drawing properly.
https://bugs.webkit.org/show_bug.cgi?id=132746
<rdar://problem/16789588>
Reviewed by Tim Horton.
Don't try to draw the detector UI if no part of the selection bounds are inside
the current tile. Don't limit the detector UI to the bounds of this tile, or else
it will attempt to squeeze itself into the possibly small space available. Let it
draw as if it had the whole screen, and rely on the context clip region to
avoid overdrawing.
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::TelephoneNumberOverlayController::drawRect): Correct tiled drawing behavior.
* WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
(WebKit::SelectionOverlayController::drawRect): Ditto.
2014-05-09 Anders Carlsson <andersca@apple.com>
Production build fix.
Reviewed by Dan Bernstein.
* Configurations/BaseTarget.xcconfig:
Add SDKROOT in front of UMBRELLA_FRAMEWORKS_DIR for OS X Production builds.
2014-05-09 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
https://bugs.webkit.org/show_bug.cgi?id=132667
<rdar://problem/15349483>
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
Address a missed review comment about a missing std::move.
2014-05-09 Anders Carlsson <andersca@apple.com>
Rename WebKit2.framework to WebKit.framework
https://bugs.webkit.org/show_bug.cgi?id=132743
<rdar://problem/15920046>
Reviewed by Dan Bernstein.
* Configurations/BaseLegacyProcess.xcconfig:
Change INSTALL_PATH to WebKit.framework.
* Configurations/BaseTarget.xcconfig:
Change WEBKIT2_FRAMEWORKS_DIR to WEBKIT_FRAMEWORKS_DIR and add WEBKIT_LEGACY_PRIVATE_HEADERS_DIR.
* Configurations/BaseXPCService.xcconfig:
Change WebKit2.framework to WebKit.framework.
* Configurations/WebKit.xcconfig: Copied from Source/WebKit2/Configurations/WebKit2.xcconfig.
New configuration file for WebKit.framework. Re-export WebKitLegacy.framework.
* Configurations/WebKit2.xcconfig:
New configuration file for the WebKit2 shim framework. Re-export WebKit.framework.
* NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info-OSX.plist:
Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
* Shared/API/Cocoa/WKBrowsingContextHandle.h:
* Shared/API/Cocoa/WKRenderingProgressEvents.h:
Update header imports.
* Shared/API/Cocoa/WebKit.h: Renamed from Source/WebKit/mac/WebKitLegacy/WebKit.h.
New umbrella header. Imports the modern WebKit API as well as the legacy API.
* Shared/API/Cocoa/WebKit.m: Renamed from Source/WebKit/mac/WebKitLegacy/WebKit.m.
Export install name symbols on iOS.
* Shared/API/Cocoa/WebKitPrivate.h: Renamed from Source/WebKit/mac/WebKitLegacy/WebKitPrivate.h.
New umbrella SPI header. Imports the modern WebKit SPI.
* Many headers:
Change WebKit2 includes to WebKit includes.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm:
(WebKit::XPCServiceEventHandler):
Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm:
(WebKit::XPCServiceEventHandler):
Change bundle identifier from com.apple.WebKit2 to com.apple.WebKit.
* UIProcess/API/Cocoa/WKPreferences.h:
Stop including WKPreferencesRef.h, we have a WebKit2 header that handles this workaround for us now.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::addDYLDEnvironmentAdditions):
(WebKit::connectToService):
(WebKit::createProcess):
(WebKit::ProcessLauncher::launchProcess):
Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::PluginProcessProxy::createPropertyListFile):
Change bundle identifiers from com.apple.WebKit2 to com.apple.WebKit.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformDefaultDiskCacheDirectory):
Change bundle identifier from com.apple.WebKit2 to com.apple.WebKit.
* WebKit2.xcodeproj/project.pbxproj:
Copy the python message scripts to the WebKit2 framework.
Rename WebKit2.framework to WebKit.framework everywhere.
Add a new WebKit2 target that builds the shim WebKit2 framework.
Move the build script phase that migrates WebKitLegacy headers to WebKit.
Add a new build script phase that adds forwarding headers from WebKit2 to WebKit.
* WebProcess/EntryPoint/mac/XPCService/WebContentService/Info-OSX.plist:
Update DYLD_INSERT_LIBRARIES to refer to WebKit.framework.
* mac/MigrateHeadersFromWebKitLegacy.make: Renamed from Source/WebKit/mac/WebKitLegacy/MigrateHeadersFromWebKitLegacy.make.
Move the makefile that migrates WebKitLegacy headers here. On OS X, it copies the header contents and on iOS it creates forarding headers.
* mac/MigrateHeadersToWebKit2.make:
New makefile that creates forwarding headers for the WebKit2 shim framework.
* mac/WKPreferences.h: Added.
Add WebKit2/WKPreferences.h header that imports WebKit2/WKPreferencesref.h.
* mac/WebKit2.m:
Skeleton for the WebKit2 shim framework.
* mac/Info-WebKit2.plist: Added.
New Info.plist file for the WebKit2 shim framework.
2014-05-09 Martin Hodovan <mhodovan.u-szeged@partner.samsung.com>
[WK2] Make generate-forwarding-headers.pl work after WebKit2.framework -> WebKit.framework rename
https://bugs.webkit.org/show_bug.cgi?id=132733
Reviewed by Csaba Osztrogonác.
Rewrite framework's directory name to WebKit2 if the framework is WebKit (former WebKit2)
and then collect headers inside the fixed framework directory and generate forwarding
headers point to the fixed directory.
Leave WebKit2 in @frameworks list during the transition. It can be removed
once <WebKit2/foo.h> style includes were renamed to <WebKit/foo.h> everywhere.
* Scripts/generate-forwarding-headers.pl:
(collectFameworkHeaderPaths):
(createForwardingHeadersForFramework):
2014-05-08 Alexey Proskuryakov <ap@apple.com>
Automatically zip document bundles used via File API
https://bugs.webkit.org/show_bug.cgi?id=132713
<rdar://problem/13397892>
Reviewed by Anders Carlsson.
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: NetworkProcess
now uses FileCoordination (WebProcess already had this allowed).
* Shared/BlobDataFileReferenceWithSandboxExtension.h: Added final to the class.
2014-05-08 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Bottom-relative position:fixed elements are misplaced on page load
https://bugs.webkit.org/show_bug.cgi?id=132719
<rdar://problem/16860837>
Reviewed by Benjamin Poulain.
If we haven't received visible rects from the web process, compute the
fixed position rect, but only after scale has been set.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportConfigurationChanged):
2014-05-08 Jer Noble <jer.noble@apple.com>
[Mac, iOS] Add source application accounting to AVURLAsset.
https://bugs.webkit.org/show_bug.cgi?id=132637
Reviewed by Eric Carlson.
Add accessor for sourceApplicationIdentifier.
* NetworkProcess/RemoteNetworkingContext.h:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::sourceApplicationIdentifier):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::sourceApplicationIdentifier):
2014-05-08 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
​https://bugs.webkit.org/show_bug.cgi?id=132667
<rdar://problem/16861454>
Rubber-stamped by Simon Fraser.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
Add a null check to fix a crash on layers which lose backing store.
2014-05-08 Beth Dakin <bdakin@apple.com>
REGRESSION (r168053): Phone number detection boxes are wrong when scrolled
https://bugs.webkit.org/show_bug.cgi?id=132706
-and corresponding-
<rdar://problem/16787957>
Reviewed by Tim Horton.
We need to paint the boxes in Document coordinates. Range::boundingRect() was
giving us a point that took scroll position into account, and that’s not what we
want. Here we use Range::textQuads() instead so that we can get something in
Document coordinates, and then we need to convert that up to the main Document’s
coordinates.
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::textQuadsToBoundingRectForRange):
(WebKit::TelephoneNumberOverlayController::drawRect):
The telephone click function wants a point in Window coordinates.
(WebKit::TelephoneNumberOverlayController::mouseEvent):
2014-05-08 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Flush RemoteLayerBackingStore contexts on a secondary queue
https://bugs.webkit.org/show_bug.cgi?id=132667
<rdar://problem/15349483>
Reviewed by Darin Adler.
* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::takeFrontContextPendingFlush):
(WebKit::RemoteLayerBackingStore::flush): Deleted.
Add takeFrontContextPendingFlush, which returns the painted-but-not-yet-flushed front context,
and drops our reference to it. This needs to be called on all backing store between paints.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::hasFlushed):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::~RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::create):
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::BackingStoreFlusher):
(WebKit::RemoteLayerTreeDrawingArea::BackingStoreFlusher::flush):
(WebKit::flushBackingStoreChangesInTransaction): Deleted.
Flush backing store and send the layer tree commit to the UI process from a dispatch queue.
We will only ever have a single commit in flight at a time, and there's a new
RELEASE_ASSERT to ensure that is the case.
We package up the commit on the main thread; the queue calls CGContextFlush
on all of the newly painted contexts and then tosses the commit over to the UI process.
This is a win in many cases because the Web process main thread can go ahead
and do other non-painting tasks while the queue is blocked on painting.
2014-05-08 Tim Horton <timothy_horton@apple.com>
[wk2] Don't use the XPC-based plugin process for Adobe Reader
https://bugs.webkit.org/show_bug.cgi?id=132701
<rdar://problem/16792692>
Reviewed by Anders Carlsson.
* UIProcess/Plugins/mac/PluginProcessProxyMac.mm:
(WebKit::shouldUseXPC):
Rename the debugging default to a more modern and accurate name.
Don't use XPC for Adobe Reader.
(WebKit::PluginProcessProxy::platformGetLaunchOptions):
Move the check for plugins that need an executable heap into shouldUseXPC.
2014-05-08 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] Remove an incorrect assertion on asynchronous touch dispatch
https://bugs.webkit.org/show_bug.cgi?id=132660
Reviewed by Enrica Casucci.
This assertion no longer make sense after r168393. Now the asynchronous behavior is maintained
until the last finger leaves the screen.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleTouchEventAsynchronously):
2014-05-08 Alexey Proskuryakov <ap@apple.com>
Make BlobDataFileReference manage its sandbox extension
https://bugs.webkit.org/show_bug.cgi?id=132689
Reviewed by Anders Carlsson.
* CMakeLists.txt:
* PlatformGTK.cmake:
* WebKit2.xcodeproj/project.pbxproj:
Added BlobDataFileReferenceWithSandboxExtension.
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerFileBlobURL):
(WebKit::NetworkBlobRegistry::registerBlobURL):
(WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
(WebKit::NetworkBlobRegistry::unregisterBlobURL):
(WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose):
(WebKit::NetworkBlobRegistry::filesInBlob):
(WebKit::NetworkBlobRegistry::sandboxExtensions): Deleted.
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
We no longer track sandbox extensions here. Instead, provide a way to get files
for a blob, which contain extensions and can allow access to themselves.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
(WebKit::NetworkResourceLoader::consumeSandboxExtensions):
(WebKit::NetworkResourceLoader::invalidateSandboxExtensions):
* NetworkProcess/NetworkResourceLoader.h:
Allow/revoke access to files in blob, just like we do for explicitly passed extensions.
* Shared/BlobDataFileReferenceWithSandboxExtension.cpp: Added.
(WebKit::BlobDataFileReferenceWithSandboxExtension::BlobDataFileReferenceWithSandboxExtension):
(WebKit::BlobDataFileReferenceWithSandboxExtension::~BlobDataFileReferenceWithSandboxExtension):
(WebKit::BlobDataFileReferenceWithSandboxExtension::prepareForFileAccess):
(WebKit::BlobDataFileReferenceWithSandboxExtension::revokeFileAccess):
* Shared/BlobDataFileReferenceWithSandboxExtension.h: Added.
(WebKit::BlobDataFileReferenceWithSandboxExtension::create):
A subclass of BlobDataFileReference that also contains a sandbox extension. NetworkProcess
always uses it in BlobRegistryImpl.
* WebProcess/FileAPI/BlobRegistryProxy.cpp: (WebKit::BlobRegistryProxy::registerFileBlobURL):
* WebProcess/FileAPI/BlobRegistryProxy.h:
Updated for BlobRegistry interface changes. BlobRegistryProxy doesn't really need
a BlobDataFileReference here, as it only uses a path, but it needs to implement the same interface
as BlobRegistryImpl.
2014-05-08 Brady Eidson <beidson@apple.com>
"shouldKeepCurrentBackForwardListItemInList" API should pass clientInfo to the callback
<rdar://problem/16855357> and https://bugs.webkit.org/show_bug.cgi?id=132692
Reviewed by Tim Horton.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/C/WKPageLoaderClient.h:
2014-05-08 Antti Koivisto <antti@apple.com>
[iOS WebKit2] Can't activate text fields on Facebook
https://bugs.webkit.org/show_bug.cgi?id=132682
Reviewed by Enrica Casucci.
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::observedContentChange):
Implement content change observer callback.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleSyntheticClick):
If the event gets canceled by a potential change (a started short-duration timer)
save the position and node so we can continue later.
(WebKit::WebPage::completePendingSyntheticClickForContentChangeObserver):
If it turns out the observed timer changed nothing continue the click event.
(WebKit::WebPage::completeSyntheticClick):
Factored click event dispatch part of handleSyntheticClick here.
2014-05-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[CoordinatedGraphics][WK2] Scale factor and scroll position is not being restored properly in a back/forward load
https://bugs.webkit.org/show_bug.cgi?id=126022
Reviewed by Benjamin Poulain.
Original author : Thiago de Barros Lacerda, and finished by Gyuyoung Kim.
When user is navigating back/forward to a page that has been scrolled and/or scaled, that page must be shown
with its last scroll position and scale factor. However, when fixed layout was enabled with CoordinatedGraphics
and TILED_BACKING_STORE, Page::setPageScaleFactor() doesn't send previous scroll position since r165652 and r165913.
This patch allows the Page::setPageScaleFactor() send stored position to WK2 implementation.
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::didCommitLoadForMainFrame):
2014-05-07 Simon Fraser <simon.fraser@apple.com>
Put a better version of the assertion back, and add one when we ensureBackingStore.
Reviewed by Tim Horton.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
(WebKit::PlatformCALayerRemote::ensureBackingStore):
2014-05-07 Simon Fraser <simon.fraser@apple.com>
This assertion was wrong and fired every time. Remove it.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
2014-05-07 Enrica Casucci <enrica@apple.com>
WK2: Programatic scroll requests during scroll or zoom animation to reveal focused element are ignored.
https://bugs.webkit.org/show_bug.cgi?id=132657
<rdar://problem/16468462>
Reviewed by Benjamin Poulain.
With the scrolling model we use on iOS, a programatic scroll
request can be received while we are still animating to reveal
the focused input element. Changing the scroll offset while animating
leads to unpredictable results. We now cancel the animation if
a programatic scroll request is received.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollToContentOffset:WebCore::]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):
2014-05-07 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Speculative fix for crash in PlatformCALayerRemote::recursiveBuildTransaction
https://bugs.webkit.org/show_bug.cgi?id=132666
Reviewed by Tim Horton.
Crash reports suggest that owner() can be null. Assert and protect
against this.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
2014-05-07 Dan Bernstein <mitz@apple.com>
<rdar://problem/16831276> [iOS] Unparenting a WKWebView that’s loading pauses it
https://bugs.webkit.org/show_bug.cgi?id=132659
Reviewed by Tim Horton.
* UIProcess/Cocoa/NavigationState.h: Added a member variable.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::didChangeIsLoading): When transitioning into loading state,
acquire a background activity token. When transitioning out of loading state, dispose of
the token.
2014-05-07 Jeremy Jones <jeremyj@apple.com>
HTMLMediaElement should exitFullscreen when view is removed from the window.
https://bugs.webkit.org/show_bug.cgi?id=132506
Reviewed by Tim Horton.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange):
Request WebVideoFUllscreenManagerProxy to exitFullscreen when removed from the window.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
Make requestExitFullscreen() public instead of private.
2014-05-07 Alexey Proskuryakov <ap@apple.com>
Make blob size computation lazy
https://bugs.webkit.org/show_bug.cgi?id=132653
Reviewed by Anders Carlsson.
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerBlobURL):
(WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
(WebKit::NetworkBlobRegistry::blobSize):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::registerBlobURL):
(WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
(WebKit::NetworkConnectionToWebProcess::blobSize):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURLForSlice):
(WebKit::BlobRegistryProxy::blobSize):
* WebProcess/FileAPI/BlobRegistryProxy.h:
2014-05-06 Simon Fraser <simon.fraser@apple.com>
Add scrolling tree logging to RemoteLayerTree output
https://bugs.webkit.org/show_bug.cgi?id=132640
Reviewed by Beth Dakin.
Support scrolling tree logging in the RemoteLayerTree log channel
output.
Encode/decode ScrollingStateTree::hasChangedProperties() so we can use
it to avoid logging. Log all the things.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::RemoteScrollingCoordinatorTransaction::encode):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
(WebKit::RemoteScrollingTreeTextStream::RemoteScrollingTreeTextStream):
(WebKit::RemoteScrollingTreeTextStream::increaseIndent):
(WebKit::RemoteScrollingTreeTextStream::decreaseIndent):
(WebKit::RemoteScrollingTreeTextStream::writeIndent):
(WebKit::dumpProperty):
(WebKit::RemoteScrollingTreeTextStream::operator<<):
(WebKit::RemoteScrollingTreeTextStream::dump):
(WebKit::RemoteScrollingTreeTextStream::recursiveDumpNodes):
(WebKit::RemoteScrollingCoordinatorTransaction::description):
(WebKit::RemoteScrollingCoordinatorTransaction::dump):
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
2014-05-07 Hyowon Kim <hw1008.kim@samsung.com>
GraphicsLayer::client() should return a reference.
https://bugs.webkit.org/show_bug.cgi?id=126372
Reviewed by Simon Fraser.
GraphicsLayers always have a GraphicsLayerClient attached,
so make client() a reference and remove some unnecessary branches.
The author of the changes in the mac port is Andreas Kling <akling@apple.com>.
* WebProcess/WebPage/PageOverlayController.cpp:
(WebKit::PageOverlayController::initialize):
(WebKit::PageOverlayController::installPageOverlay):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::createPageOverlayLayer):
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::createGraphicsLayer):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
2014-05-07 Shivakumar JM <shiva.jm@samsung.com>
Cleanup the build from unused parameter in UIProcess Module
https://bugs.webkit.org/show_bug.cgi?id=131969
Reviewed by Csaba Osztrogonác.
Fixed unused parameter by omitting the parameter name
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageFindClient):
* UIProcess/WebFindClient.cpp:
(WebKit::WebFindClient::didFindString):
2014-05-07 Manuel Rego Casasnovas <rego@igalia.com>
[CSS Grid Layout] Remove runtime feature
https://bugs.webkit.org/show_bug.cgi?id=132382
Reviewed by Benjamin Poulain.
Remove cssGridLayoutEnabled setting usage.
* Shared/WebPreferencesStore.h:
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetCSSGridLayoutEnabled): Deleted.
(WKPreferencesGetCSSGridLayoutEnabled): Deleted.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
* UIProcess/API/gtk/WebKitSettings.cpp:
(webKitSettingsConstructed):
* UIProcess/gtk/ExperimentalFeatures.cpp:
* UIProcess/gtk/ExperimentalFeatures.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* mac/WebKit2.order:
2014-05-07 Csaba Osztrogonác <ossy@webkit.org>
URTBF after r168393 to fix !IOS builds.
* Shared/WebEvent.h:
2014-05-06 Brady Eidson <beidson@apple.com>
Followup to "Add WK2 SPI to prevent the previous back/forward item from remaining in the list"
<rdar://problem/16248710> and https://bugs.webkit.org/show_bug.cgi?id=132636
Reviewed by NOBODY (My mistake while addressing previous review feedback)
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient): During review feedback, this client switched from default negative to default
positve, so when the client isn't implemented... return true instead of false.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addItem): Fix nonsensical comments while I'm at it.
2014-05-06 Brady Eidson <beidson@apple.com>
Add WK2 SPI to prevent the previous back/forward item from remaining in the list
<rdar://problem/16248710> and https://bugs.webkit.org/show_bug.cgi?id=132636
Reviewed by Sam Weinig.
Add new PageLoaderClient SPI to keep the current back/forward item from remaining in the list:
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::shouldKeepCurrentBackForwardListItemInList):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::shouldKeepCurrentBackForwardListItemInList):
* UIProcess/WebPageProxy.h:
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::addItem): Use that SPI to determine whether we should insert the new item after
the previous item, or simply replace the previous item.
(WebKit::WebBackForwardList::goToItem): Use that SPI to determine whether the previous item stays or goes.
2014-05-06 Dan Bernstein <mitz@apple.com>
-[WKWebView isLoading] is NO immediately after -loadRequest: until the provisional load starts
https://bugs.webkit.org/show_bug.cgi?id=132639
Reviewed by Darin Adler.
* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::commitChanges): Updated for change from isLoadingState to isLoading.
(WebKit::PageLoadState::isLoading): Renamed from isLoadingState, changed to take Data and
check whether there is a non-null pending API request URL. If so, return true.
* UIProcess/PageLoadState.h:
2014-05-06 Dean Jackson <dino@apple.com>
[Mac] Allow focus rings to redraw themselves if necessary
https://bugs.webkit.org/show_bug.cgi?id=132593
Reviewed by Simon Fraser.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Add DrawFocusRingAtTime and DrawCellFocusRingWithFrameAtTime.
2014-05-06 Benjamin Poulain <benjamin@webkit.org>
<rdar://problem/16833442> [iOS WebKit2]: Keep the order of contentView in _scrollView after rotation
https://bugs.webkit.org/show_bug.cgi?id=132634
Reviewed by Enrica Casucci.
Nice idea of Yongjun.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _endAnimatedResize]):
2014-05-06 Timothy Hatcher <timothy@apple.com>
Take WKView's topContentInset into account when docking Web Inspector to the right.
https://bugs.webkit.org/show_bug.cgi?id=132631
Reviewed by Joseph Pecoraro.
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Subtract topContentInset
from the height of the frame for the Inspector.
2014-05-06 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] WebKit2 does not set CanPreventNativeGestures on the platform events
https://bugs.webkit.org/show_bug.cgi?id=132594
Reviewed by Simon Fraser.
Set CanPreventNativeGestures on the plaform event.
Change the tracking of WKContentView to be similar to WebPageProxy.
* Shared/WebEvent.h:
(WebKit::WebTouchEvent::WebTouchEvent):
(WebKit::WebTouchEvent::canPreventNativeGestures):
(WebKit::WebTouchEvent::setCanPreventNativeGestures):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent):
* Shared/ios/WebTouchEventIOS.cpp:
(WebKit::WebTouchEvent::encode):
(WebKit::WebTouchEvent::decode):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _webTouchEventsRecognized:]):
2014-05-06 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Add tap highlight on the simple UITapGestureRecognizer
https://bugs.webkit.org/show_bug.cgi?id=132623
<rdar://problem/16709507>
Reviewed by Enrica Casucci.
Add a low latency highlight for tap/click.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::commitPotentialTapFailed):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView _showTapHighlightWithColor:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
(-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
(-[WKContentView _finishInteraction]):
(-[WKContentView _highlightLongPressRecognized:]):
(-[WKContentView _singleTapRecognized:]):
(-[WKContentView _singleTapDidReset:]):
(-[WKContentView _commitPotentialTapFailed]):
(-[WKContentView _singleTapCommited:]):
(-[WKContentView _attemptClickAtLocation:]):
* UIProcess/ios/WKSyntheticClickTapGestureRecognizer.h: Added.
* UIProcess/ios/WKSyntheticClickTapGestureRecognizer.m: Added.
(-[WKSyntheticClickTapGestureRecognizer setGestureRecognizedTarget:action:]):
(-[WKSyntheticClickTapGestureRecognizer setResetTarget:action:]):
(-[WKSyntheticClickTapGestureRecognizer setState:]):
(-[WKSyntheticClickTapGestureRecognizer reset]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::potentialTapAtPosition):
(WebKit::WebPageProxy::commitPotentialTap):
(WebKit::WebPageProxy::cancelPotentialTap):
(WebKit::WebPageProxy::tapHighlightAtPosition):
(WebKit::WebPageProxy::commitPotentialTapFailed):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleSyntheticClick):
(WebKit::WebPage::handleTap):
(WebKit::WebPage::sendTapHighlightForNodeIfNecessary):
(WebKit::WebPage::potentialTapAtPosition):
(WebKit::WebPage::commitPotentialTap):
(WebKit::WebPage::cancelPotentialTap):
(WebKit::WebPage::tapHighlightAtPosition):
2014-05-06 Anders Carlsson <andersca@apple.com>
Put WebArchive and WebArchiveResource in the API namespace.
Rubber-stamped by Dan Bernstein.
* Shared/API/c/WKSharedAPICast.h:
* Shared/API/c/mac/WKWebArchive.cpp:
(WKWebArchiveGetTypeID):
(WKWebArchiveCreate):
(WKWebArchiveCreateWithData):
(WKWebArchiveCreateFromRange):
(WKWebArchiveCopyMainResource):
* Shared/API/c/mac/WKWebArchiveResource.cpp:
(WKWebArchiveResourceGetTypeID):
(WKWebArchiveResourceCreate):
* Shared/APIWebArchive.cpp: Renamed from Source/WebKit2/Shared/WebArchive.cpp.
(API::WebArchive::create):
(API::WebArchive::WebArchive):
(API::WebArchive::~WebArchive):
(API::WebArchive::mainResource):
(API::WebArchive::subresources):
(API::WebArchive::subframeArchives):
(API::releaseCFData):
(API::WebArchive::data):
(API::WebArchive::coreLegacyWebArchive):
* Shared/APIWebArchive.h: Renamed from Source/WebKit2/Shared/WebArchive.h.
* Shared/APIWebArchiveResource.cpp: Renamed from Source/WebKit2/Shared/WebArchiveResource.cpp.
(API::WebArchiveResource::create):
(API::WebArchiveResource::WebArchiveResource):
(API::WebArchiveResource::~WebArchiveResource):
(API::releaseCFData):
(API::WebArchiveResource::data):
(API::WebArchiveResource::URL):
(API::WebArchiveResource::MIMEType):
(API::WebArchiveResource::textEncoding):
(API::WebArchiveResource::coreArchiveResource):
* Shared/APIWebArchiveResource.h: Renamed from Source/WebKit2/Shared/WebArchiveResource.h.
* WebKit2.xcodeproj/project.pbxproj:
2014-05-06 Alex Christensen <achristensen@webkit.org>
Removed unnecessary notImplemented.h includes.
https://bugs.webkit.org/show_bug.cgi?id=132587
Reviewed by Anders Carlsson.
* UIProcess/ios/WKContentViewInteraction.mm:
* UIProcess/mac/WebContextMenuProxyMac.mm:
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
* WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp:
Removed notImplemented from list of includes.
2014-05-05 Jeremy Jones <jeremyj@apple.com>
Implement scan backward and forward in video fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=132517
Reviewed by Simon Fraser.
Plumb through scanning/seeking functions.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::fastSeek):
(WebKit::WebVideoFullscreenManagerProxy::beginScanningForward):
(WebKit::WebVideoFullscreenManagerProxy::beginScanningBackward):
(WebKit::WebVideoFullscreenManagerProxy::endScanning):
* WebProcess/ios/WebVideoFullscreenManager.messages.in:
2014-05-05 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Prefetch DNS hostnames on tap highlight
https://bugs.webkit.org/show_bug.cgi?id=132509
Reviewed by Alexey Proskuryakov.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::tapHighlightAtPosition):
2014-05-05 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Flickery scrolling inside overflow-scrolling: touch
https://bugs.webkit.org/show_bug.cgi?id=132591
<rdar://problem/16760466>
Reviewed by Tim Horton.
Avoid triggering layer tree commits that touch the layer's boundsOrigin
while the user is scrolling in the UI process.
Fix the WKOverflowScrollViewDelegate to pass along an "inUserInteration"
flag to the ScrollingTree to say that we're in the middle of a user interaction
(and also to send a final non-interactive update). That gets passed along
to the web process, and turned into "SyncScrollingLayerPosition" update.
AsyncScrollingCoordinator::updateScrollPositionAfterAsyncScroll() consults
this, and uses it to set a flag on the ScrollableArea to say that the scroll
is a user scroll.
RenderLayerBacking then makes use of this (in existing code, shared with WK1)
to avoid triggering layer bounds setting. Instead, it now just calls syncBoundsOrigin(),
which updates the GraphicsLayer without touching platform layers. This is necessary
so that GraphicsLayer geometry is up-to-date (used for tiled layer visibility
computations).
Finally, a hack in GraphicsLayerCA::computeVisibleRect() is conditionalized
for WebKit1 by checking the type of platform layer.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::rootScrollingNodeID):
(WebKit::RemoteScrollingCoordinatorProxy::isPointInNonFastScrollableRegion):
(WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate scrollViewDidScroll:]):
(-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
(-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):
* WebProcess/Scrolling/RemoteScrollingCoordinator.h:
* WebProcess/Scrolling/RemoteScrollingCoordinator.messages.in:
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode):
2014-05-05 Alexey Proskuryakov <ap@apple.com>
Stop using BlobData on client side
https://bugs.webkit.org/show_bug.cgi?id=132582
Reviewed by Sam Weinig.
Update for WebCore changes.
* CMakeLists.txt:
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerFileBlobURL):
(WebKit::NetworkBlobRegistry::registerBlobURL):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::registerFileBlobURL):
(WebKit::NetworkConnectionToWebProcess::registerBlobURL):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* Shared/FileAPI/BlobRegistrationData.cpp: Removed.
* Shared/FileAPI/BlobRegistrationData.h: Removed.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<BlobPart>::encode):
(IPC::ArgumentCoder<BlobPart>::decode):
* Shared/WebCoreArgumentCoders.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerFileBlobURL):
(WebKit::BlobRegistryProxy::registerBlobURL):
* WebProcess/FileAPI/BlobRegistryProxy.h:
2014-05-05 Beth Dakin <bdakin@apple.com>
Need a delegate that informs the UI process when the page's pin state changes
https://bugs.webkit.org/show_bug.cgi?id=132583
-and corresponding-
<rdar://problem/16806231>
Reviewed by Anders Carlsson.
New UIClient function pinnedStateDidChange.
* UIProcess/API/APIUIClient.h:
(API::UIClient::pinnedStateDidChange):
Create WKPageUIClientV3 to add this function.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/C/WKPageUIClient.h:
Change default initialization to true instead of false, which makes more sense for
this API.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::didCommitLoadForFrame):
(WebKit::WebPageProxy::resetState):
(WebKit::WebPageProxy::didChangeScrollOffsetPinningForMainFrame):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2014-05-05 Anders Carlsson <andersca@apple.com>
Add SPI to provide the WebCrypto master key
https://bugs.webkit.org/show_bug.cgi?id=132586
<rdar://problem/16091460>
Reviewed by Dan Bernstein.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::webCryptoMasterKey):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::webCryptoMasterKey):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::wrapCryptoKey):
2014-05-05 Gavin Barraclough <baraclough@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=132522
Clean up ProcessThrottler
Unreviewed: bad build fix. Will work out what the right include is asap.
* UIProcess/ios/WebProcessProxyIOS.mm:
2014-05-05 Sam Weinig <sam@webkit.org>
[Cocoa WebKit2] Add SPI to clear all visited links in a VisitedLinkProvider
https://bugs.webkit.org/show_bug.cgi?id=132573
Reviewed by Dan Bernstein.
* Shared/VisitedLinkTable.cpp:
(WebKit::VisitedLinkTable::VisitedLinkTable):
(WebKit::VisitedLinkTable::clear):
* Shared/VisitedLinkTable.h:
Add functions to clear the visited link table.
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
(-[_WKVisitedLinkProvider removeAll]):
Add SPI.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::removeAll):
* UIProcess/VisitedLinkProvider.h:
A remove all resets the provider and notifies all the attached processes.
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::removeAllVisitedLinks):
* WebProcess/WebPage/VisitedLinkTableController.h:
* WebProcess/WebPage/VisitedLinkTableController.messages.in:
Add message to clear the visited links for a process.
2014-05-05 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] Special case ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture() for image documents
https://bugs.webkit.org/show_bug.cgi?id=132553
Reviewed by Tim Horton.
When collecting the geometry for the smart magnification gesture, always return the image of an image document
on iOS. On iOS, it does not make much sense to return the whole document rect when the gesture is not over the image.
* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
2014-05-02 Gavin Barraclough <baraclough@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=132522
Clean up ProcessThrottler
Reviewed by Geoffrey Garen.
The initial implementation of ProcessThrottler relied on the reply from the
SetViewState message to ensure the page visibility notifications have a chance
to be delivered. This resulted in:
- unnecessarily complicated interface to ProcessThrottler (in VisibilityState class)
- complexity bleeding out into WebPageProxy (handling 'hiding' state).
- for cases other than view hiding, no suspension notification in the WebContent.
To fix these issues add an explicit handshake from the ProcessThrottler to the WebPage.
This gives us two things:
- All previously posted messages (e.g. SetViewState) will be processed before suspension.
- WebContent is always (bar timeout) notified before suspension.
Since this interlock ensures the SetViewState message will be processed, the WKContentView no
longer needs to request a reply from SetViewState, and WebPageProxy can lose all the 'hiding'
state tracking. In turn, we can simplify VisibilityToken to a couple of simpler types, without
the interface to change state - just acquire/release to keep the process runnable or permit
suspension.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
- VisibilityToken -> BackgroundActivityToken
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
- m_visibilityToken -> m_activityToken, remove m_pendingViewStateUpdates
updateVisibilityToken -> updateActivityToken
(WebKit::WebPageProxy::reattachToWebProcess):
- updateVisibilityToken -> updateActivityToken
(WebKit::WebPageProxy::viewStateDidChange):
- remove m_pendingViewStateUpdates, updateActivityToken after sending SetViewState
(WebKit::WebPageProxy::updateActivityToken):
- m_visibilityToken -> m_activityToken, no need to handle 'hiding' state.
(WebKit::WebPageProxy::updateVisibilityToken): Deleted.
- renamed to updateActivityToken
(WebKit::WebPageProxy::didUpdateViewState): Deleted.
- implementation moved back into header.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::didUpdateViewState):
- implementation moved back into header.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
- ProcessThrottler constructor now passed WebProcessProxy.
* UIProcess/WebProcessProxy.h:
- added ProcessWillSuspend/ProcessReadyToSuspend
* UIProcess/WebProcessProxy.messages.in:
- added ProcessWillSuspend/ProcessReadyToSuspend
* UIProcess/ios/ProcessAssertion.h:
(WebKit::ProcessAssertion::state):
- accessor
* UIProcess/ios/ProcessThrottler.h:
(WebKit::ProcessThrottler::VisibilityToken::visibility): Deleted.
(WebKit::ProcessThrottler::VisibilityToken::setVisibility): Deleted.
- removed VisibilityToken class, replaced with ForegroundActivityToken/BackgroundActivityToken.
(WebKit::ProcessThrottler::ProcessThrottler): Deleted.
(WebKit::ProcessThrottler::visibilityToken): Deleted.
(WebKit::ProcessThrottler::didConnnectToProcess): Deleted.
(WebKit::ProcessThrottler::assertionState): Deleted.
(WebKit::ProcessThrottler::updateAssertion): Deleted.
- moved implementations to .mm.
* UIProcess/ios/ProcessThrottler.mm:
(WebKit::ProcessThrottler::ForegroundActivityToken::ForegroundActivityToken):
(WebKit::ProcessThrottler::ForegroundActivityToken::~ForegroundActivityToken):
(WebKit::ProcessThrottler::BackgroundActivityToken::BackgroundActivityToken):
(WebKit::ProcessThrottler::BackgroundActivityToken::~BackgroundActivityToken):
- new, simpler replacement for VisibilityToken. Instantiate to keep a processes running, release to suspend.
(WebKit::ProcessThrottler::ProcessThrottler):
- constructor, now initializes WebProcessProxy pointer & timer mechanism
(WebKit::ProcessThrottler::assertionState):
- select the appropriate AssertionState give current ActivityTokens.
(WebKit::ProcessThrottler::updateAssertionNow):
- update the current ProcessAssertion.
(WebKit::ProcessThrottler::updateAssertion):
- update the current ProcessAssertion, delay running->suspended transitions to give the process a chance to clean up.
(WebKit::ProcessThrottler::didConnnectToProcess):
- moved from header.
(WebKit::ProcessThrottler::suspendTimerFired):
- timeout to prevent processes from running in the background for too long.
(WebKit::ProcessThrottler::processReadyToSuspend):
- handshake from the WebContent process to acknowledge it is ready to suspend.
(WebKit::ProcessThrottler::VisibilityToken::VisibilityToken): Deleted.
(WebKit::ProcessThrottler::VisibilityToken::~VisibilityToken): Deleted.
(WebKit::ProcessThrottler::VisibilityToken::hideTimerFired): Deleted.
(WebKit::ProcessThrottler::VisibilityToken::setVisibilityInternal): Deleted.
- removed VisibilityToken class, replaced with ForegroundActivityToken/BackgroundActivityToken.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didMoveToWindow]):
- no longer necessary to request a response from SetViewState; this interlock is now managed by the ProcessThrottler.
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::sendProcessWillSuspend):
(WebKit::WebProcessProxy::processReadyToSuspend):
- added ProcessWillSuspend/ProcessReadyToSuspend
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::processWillSuspend):
- notification from the WebContent process that we will be suspended; for now just send back an ack.
* WebProcess/WebProcess.h:
- added ProcessWillSuspend/ProcessReadyToSuspend
* WebProcess/WebProcess.messages.in:
- added ProcessWillSuspend/ProcessReadyToSuspend
2014-05-05 Jeremy Jones <jeremyj@apple.com>
Implement beginScrubbing and endScrubbing for video fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=132520
Reviewed by Eric Carlson.
Plumb through beginScrubbing and endScrubbing.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::beginScrubbing):
(WebKit::WebVideoFullscreenManagerProxy::endScrubbing):
* WebProcess/ios/WebVideoFullscreenManager.messages.in:
2014-05-05 Tim Horton <timothy_horton@apple.com>
Use a layer delegate instead of web_disableAllActions wherever possible
https://bugs.webkit.org/show_bug.cgi?id=132560
<rdar://problem/16459284>
Reviewed by Simon Fraser.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setAcceleratedCompositingModeRootLayer:]):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Make use of WebActionDisablingCALayerDelegate where possible.
Also, UIKit disables actions for us, so don't bother doing anything on iOS.
2014-05-05 Martin Hock <mhock@apple.com>
Session-aware plugin autostart data
https://bugs.webkit.org/show_bug.cgi?id=131758
<rdar://problem/15906540>
Reviewed by Alexey Proskuryakov.
* Shared/WebProcessCreationParameters.cpp:
* Shared/WebProcessCreationParameters.h:
* UIProcess/Plugins/PlugInAutoStartProvider.cpp:
(WebKit::PlugInAutoStartProvider::PlugInAutoStartProvider):
(WebKit::PlugInAutoStartProvider::addAutoStartOriginHash):
(WebKit::PlugInAutoStartProvider::autoStartOriginHashesCopy):
(WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy):
(WebKit::PlugInAutoStartProvider::setAutoStartOriginsTableWithItemsPassingTest):
(WebKit::PlugInAutoStartProvider::setAutoStartOriginsArray):
(WebKit::PlugInAutoStartProvider::didReceiveUserInteraction):
* UIProcess/Plugins/PlugInAutoStartProvider.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::addPlugInAutoStartOriginHash):
(WebKit::WebContext::plugInDidReceiveUserInteraction):
* UIProcess/WebContext.h:
* UIProcess/WebContext.messages.in:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::pluginDidReceiveUserInteraction):
* WebProcess/WebCoreSupport/WebPlugInClient.cpp:
(WebKit::WebPlugInClient::didStartFromOrigin):
* WebProcess/WebCoreSupport/WebPlugInClient.h:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::isPlugInAutoStartOriginHash):
(WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
(WebKit::WebProcess::plugInDidStartFromOrigin):
(WebKit::WebProcess::didAddPlugInAutoStartOriginHash):
(WebKit::WebProcess::resetPlugInAutoStartOriginDefaultHashes):
(WebKit::WebProcess::resetPlugInAutoStartOriginHashes):
(WebKit::WebProcess::plugInDidReceiveUserInteraction):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2014-05-05 Andy Estes <aestes@apple.com>
Another iOS build fix after r168260.
Removed an unnecessary 'using namespace WebCore'.
* UIProcess/ios/WebMemoryPressureHandlerIOS.cpp:
2014-05-05 Tim Horton <timothy_horton@apple.com>
Fix the iOS build.
* UIProcess/API/Cocoa/WKWebView.mm:
2014-05-05 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Refactor favicon database APIs
https://bugs.webkit.org/show_bug.cgi?id=132519
Reviewed by Gyuyoung Kim.
ewebkit2 has two options to get favicon.
The first option is ewk_view_favicon_get with "favicon,changed" signal.
It's simple to use but it always adds the callback to EwkView although applications does not use favicon.
The other option is ewk_favicon_database_icon_get with ewk_favicon_database_icon_change_callback_add API.
But the callback doesn't have information about Ewk_Favicon_Database to call ewk_favicon_database_icon_get.
This patch removed ewk_view_favicon_get and "favicon,changed" signal.
In addition, improved ewk_favicon_database_icon_change_callback.
* UIProcess/API/efl/EwkView.cpp: Remove ewk_favicon_database related code.
(EwkView::EwkView):
(EwkView::~EwkView):
(EwkView::informURLChange):
(EwkView::handleFaviconChanged):
(EwkView::createFavicon): Deleted.
* UIProcess/API/efl/EwkViewCallbacks.h:
* UIProcess/API/efl/ewk_favicon_database.cpp:
(EwkFaviconDatabase::iconDataReadyForPageURL):
(EwkFaviconDatabase::didChangeIconForPageURL): Deleted. dead code.
* UIProcess/API/efl/ewk_favicon_database.h:
Refactor Ewk_Favicon_Database_Icon_Change_Cb and improve doxygen.
* UIProcess/API/efl/ewk_favicon_database_private.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_favicon_get): Deleted.
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp:
(EWK2FaviconDatabaseTest::requestFaviconData):
(TEST_F):
2014-05-05 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Swipe snapshots should be taken asynchronously
https://bugs.webkit.org/show_bug.cgi?id=132417
<rdar://problem/16535921>
Reviewed by Anders Carlsson.
Reorganize takeViewSnapshot to return a ViewSnaphot with the image
filled in (the other properties are filled in by ViewSnapshotStore).
Make ViewSnapshotStore use a fixed size instead of count for the snapshot cache.
iOS doesn't use purgeable snapshots, so make the cache much smaller there.
Use CARenderServerCaptureLayerWithTransform to achieve async snapshotting.
Rename WebKit::ViewSnapshotStore::Snapshot to WebKit::ViewSnapshot so that
it can be forward-declared in a bunch of places.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _takeViewSnapshot:]):
Use CARenderServerCaptureLayerWithTransform.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/mac/WKView.mm:
(createIOSurfaceFromImage):
(-[WKView _takeViewSnapshot:]):
Adjust to the new push model.
* 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):
Plumbing.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
Realize an object that can be used as the layer contents from the slot ID.
* UIProcess/ios/WebMemoryPressureHandlerIOS.cpp:
(WebKit::WebMemoryPressureHandler::sharedHandler):
(WebKit::WebMemoryPressureHandler::WebMemoryPressureHandler):
* UIProcess/WebMemoryPressureHandlerIOS.h:
Add a memory pressure handler for the UI process. This does not use
WebCore's platform independent memory pressure handler because that
mechanism only allows for one handler per process, and we don't want to
stomp on any handlers installed by WebKit1 in a process where the WebKits coexist.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _takeViewSnapshot]): Deleted.
Get rid of an unnecessary bounce through WKContentView.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::retrieveSnapshotForItem):
(WebKit::ViewGestureController::endSwipeGesture):
Use the new name, ViewSnapshot.
* UIProcess/mac/ViewSnapshotStore.h:
(WebKit::ViewSnapshot::ViewSnapshot):
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::~ViewSnapshotStore):
(WebKit::ViewSnapshotStore::snapshottingContext):
Use a custom CAContext for snapshotting so that snapshots don't
disappear when the main context is destroyed on hibernation.
(WebKit::ViewSnapshotStore::removeSnapshotImage):
(WebKit::ViewSnapshotStore::pruneSnapshots):
(WebKit::ViewSnapshotStore::recordSnapshot):
(WebKit::ViewSnapshotStore::getSnapshot):
(WebKit::ViewSnapshotStore::discardSnapshots):
(WebKit::ViewSnapshot::clearImage):
(WebKit::ViewSnapshot::hasImage):
(WebKit::createIOSurfaceFromImage): Deleted.
(WebKit::ViewSnapshotStore::Snapshot::clearImage): Deleted.
(WebKit::ViewSnapshotStore::Snapshot::hasImage): Deleted.
Cache by image size instead of counts.
* WebKit2.xcodeproj/project.pbxproj:
2014-05-04 Pratik Solanki <psolanki@apple.com>
Reduce calls to CFURLCacheCopySharedURLCache
https://bugs.webkit.org/show_bug.cgi?id=132464
<rdar://problem/16806694>
Address review comments by collapsing multi-line code into a single ASSERT.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
2014-05-04 Pratik Solanki <psolanki@apple.com>
Shortcircuit shouldUseCredentialStorage callback
https://bugs.webkit.org/show_bug.cgi?id=132308
<rdar://problem/16806708>
Reviewed by Alexey Proskuryakov.
If we are going to return true from the shouldUseCredentialStorage callback then we don't
really need to have CFNetwork/Foundation call us. We can just disable the callback and
CFNetwork will assume true. Add a separate subclass that implements this callback when we
need to return false. We can also eliminate the corresponding async callbacks. This avoids
pingponging between dispatch queue and main thread in the common case.
No new tests because no change in functionality.
* NetworkProcess/NetworkResourceLoader.cpp: Remove shouldUseCredentialStorageAsync() callbacks.
* NetworkProcess/NetworkResourceLoader.h:
2014-05-04 Beth Dakin <bdakin@apple.com>
Top content inset: Margin tiles should not display in the inset area when pinned
to the top of the page
https://bugs.webkit.org/show_bug.cgi?id=132535
-and corresponding-
<rdar://problem/16613039>
Reviewed by Simon Fraser.
Encode and decode the ScrollingStateScrollingNode’s m_topContentInset even though
we don’t use it for anything yet. Since the headerLayer and footerLayer are not
encoded or decoded yet, I did not encode/decode the insetClipLayer yet, which,
like the header and footer layers, would not yet be used.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
2014-05-03 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r168232.
https://bugs.webkit.org/show_bug.cgi?id=132543
broke ~15 tests on WK2 debug (Requested by kling on #webkit).
Reverted changeset:
"Shortcircuit shouldUseCredentialStorage callback"
https://bugs.webkit.org/show_bug.cgi?id=132308
http://trac.webkit.org/changeset/168232
2014-05-03 Tim Horton <timothy_horton@apple.com>
[iOS] REGRESSION (WebKit2): Page isn't clipped properly during back/forward swipe
https://bugs.webkit.org/show_bug.cgi?id=132538
<rdar://problem/16266027>
Reviewed by Simon Fraser.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
* UIProcess/mac/ViewGestureController.h:
Add a clipping layer above the live swipe layer, which explicitly clips to bounds.
2014-05-02 Pratik Solanki <psolanki@apple.com>
Shortcircuit shouldUseCredentialStorage callback
https://bugs.webkit.org/show_bug.cgi?id=132308
<rdar://problem/16806708>
Reviewed by Alexey Proskuryakov.
If we are going to return true from the shouldUseCredentialStorage callback then we don't
really need to have CFNetwork/Foundation call us. We can just disable the callback and
CFNetwork will assume true. Add a separate subclass that implements this callback when we
need to return false. We can also eliminate the corresponding async callbacks. This avoids
pingponging between dispatch queue and main thread in the common case.
No new tests because no change in functionality.
* NetworkProcess/NetworkResourceLoader.cpp: Remove shouldUseCredentialStorageAsync() callbacks.
* NetworkProcess/NetworkResourceLoader.h:
2014-05-02 Pratik Solanki <psolanki@apple.com>
Reduce calls to CFURLCacheCopySharedURLCache
https://bugs.webkit.org/show_bug.cgi?id=132464
<rdar://problem/16806694>
Reviewed by Alexey Proskuryakov.
CFURLCacheCopySharedURLCache grabs a mutex and can sometimes block. Avoid that by stashing
the cache reference in a static.
* NetworkProcess/NetworkResourceLoader.h: Coalesce ifdef'd code.
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer):
(WebKit::NetworkResourceLoader::willCacheResponseAsync): Use more correct ifdef for
Foundation based callback.
2014-05-03 Sam Weinig <sam@webkit.org>
[Cocoa WebKit2] Add basic _WKWebsiteDataStore implementation
https://bugs.webkit.org/show_bug.cgi?id=132526
Reviewed by Anders Carlsson.
- Renames WKSession to _WKWebsiteDataStore to better reflect its intended use (renaming
the implementation object will come later).
- Makes _WKWebsiteDataStore work as a wrapped Objective-C object.
- Adds the ability to set a _WKWebsiteDataStore on the WKWebViewConfiguration.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/Cocoa/WKSession.h:
* UIProcess/API/Cocoa/WKSession.mm:
(-[WKSession dealloc]): Deleted.
(-[WKSession ephemeral]): Deleted.
(-[WKSession API::]): Deleted.
* UIProcess/API/Cocoa/WKSessionInternal.h:
(WebKit::wrapper): Deleted.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _websiteDataStore]):
(-[WKWebViewConfiguration _setWebsiteDataStore:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/API/Cocoa/_WKWebsiteDataStore.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKSession.h.
* UIProcess/API/Cocoa/_WKWebsiteDataStore.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKSession.mm.
(+[_WKWebsiteDataStore nonPersistentDataStore]):
(-[_WKWebsiteDataStore isNonPersistentDataStore]):
(-[WKSession ephemeral]): Deleted.
* UIProcess/API/Cocoa/_WKWebsiteDataStoreInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKSessionInternal.h.
* WebKit2.xcodeproj/project.pbxproj:
2014-05-03 Simon Fraser <simon.fraser@apple.com>
[UI-side compositing] Assertion in PlatformCAFilters::setFiltersOnLayer with animated reference filter
https://bugs.webkit.org/show_bug.cgi?id=132528
<rdar://problem/16671660>
Reviewed by Tim Horton.
Allow PASSTHROUGH filters to be encoded and sent to the UI process; they can be set
on layers as the result of a filter animation using a reference filter, and just get
ignored anyway, but encoding them maintains consistency of the filters list.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<FilterOperation>::encode): Assert during encoding if
we try to encode a NONE or REFERENCE filter (to match the decoding assertions).
(IPC::decodeFilterOperation): Allow decoding of PASSTHROUGH filters. Have
trying to decode a NONE or REFERENCE filter mark the message as invalid.
(IPC::ArgumentCoder<IDBKeyData>::decode): Mark the message invalid when receiving
unexpected key types.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<): Have the logging not crash if
a filter is null (should never happen).
2014-05-02 Dan Bernstein <mitz@apple.com>
[Cocoa] Remove unused WKErrorRecoveryAttempting
https://bugs.webkit.org/show_bug.cgi?id=132503
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(didFailProvisionalLoadWithErrorForFrame):
(didFailLoadWithErrorForFrame):
(createErrorWithRecoveryAttempter): Deleted.
(-[WKBrowsingContextController attemptRecoveryFromError:]): Deleted.
* UIProcess/API/Cocoa/WKErrorRecoveryAttempting.m: Removed.
* UIProcess/API/Cocoa/_WKFormDelegate.h:
* WebKit2.xcodeproj/project.pbxproj:
2014-05-02 Enrica Casucci <enrica@apple.com>
REGRESSION (WebKit2) Need to support reanalyze button for Chinese Traditional.
https://bugs.webkit.org/show_bug.cgi?id=132504
<rdar://problem/16778862>
Reviewed by Benjamin Poulain.
For traditional Chinese we support reanalyzing of the text to perform
transformations on the text based on the selected language and keyboard.
This is done by pressing the Reanalyze button on the system
menu. This patch adds the necessary code to canPerformAction to enable
the button when appropriate as well as the implementation of the action
itself.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _reanalyze:]):
(-[WKContentView canPerformAction:withSender:]):
2014-05-02 Enrica Casucci <enrica@apple.com>
REGRESSION (WebKit2) Need to support transliterate chinese button (简⇄繁) for Traditional Chinese.
https://bugs.webkit.org/show_bug.cgi?id=132500
<rdar://problem/16778870>
Reviewed by Benjamin Poulain.
For traditional Chinese we support the transliterate to simplified Chinese.
This is done by pressing the 简⇄繁 button on the system
menu. This patch adds the necessary code to canPerformAction to enable
the button when appropriate as well as the implementation of the action
itself.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _transliterateChinese:]):
(-[WKContentView canPerformAction:withSender:]):
2014-05-02 Jeremy Jones <jeremyj@apple.com>
Fullscreen UI does not appear after WebProcess has crashed
https://bugs.webkit.org/show_bug.cgi?id=132442
Reviewed by Darin Adler.
Cleanup WebVideoFullscreenManagerProxy after a WebProcess crash.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::reattachToWebProcess):
recreate WebVideoFullscreenManagerProxy after a WebProcess crash.
(WebKit::WebPageProxy::resetState):
invalidate and release WebVideoFullscreenManagerProxy on crash.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
don't assume m_page is valid.
(WebKit::WebVideoFullscreenManagerProxy::invalidate):
do cleanup invalidation in reponse to a WebProcess crash.
2014-05-02 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] More animation madness for when the extendedBackground is modified in an animation block
https://bugs.webkit.org/show_bug.cgi?id=132497
Reviewed by Beth Dakin.
* UIProcess/API/Cocoa/WKWebView.mm:
(updateTopAndBottomExtendedBackgroundExclusionIfNecessary):
Do not early return when _extendedBackgroundExclusionInsets.left is empty. That way, if executed in an animation block,
the top of bottom view will animate from their current size to an empty width.
When creating the layer, set up their height without animation. Otherwise it is possible to see the height animating
while the left inset is animating.
(-[WKWebView _setExtendedBackgroundExclusionInsets:]):
When replacing the scrollview, make sure the frame and color are not animated. Otherwise the transition between
scrollView and _mainExtendedBackgroundView can be visible if _setExtendedBackgroundExclusionInsets: is invoked
in an animation block.
(-[WKWebView _endAnimatedResize]):
Nuke the top and bottom insets when possible. [WKWebView _endAnimatedResize] is unfrequent, so it is a good opportunity
to free the memory.
2014-05-02 Alexey Proskuryakov <ap@apple.com>
Remove Blob contentDisposition handling
https://bugs.webkit.org/show_bug.cgi?id=132490
Reviewed by Sam Weinig.
* Shared/FileAPI/BlobRegistrationData.cpp:
(WebKit::BlobRegistrationData::encode):
(WebKit::BlobRegistrationData::decode):
2014-05-02 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] Adapt the rubberband constraints when the page get smaller than the scrollview - insets
https://bugs.webkit.org/show_bug.cgi?id=132457
Reviewed by Enrica Casucci.
It is quite common for us to have a WKContentView that is scalled smaller than the WKWebView, content
insets included.
In those cases, update the constraints to fit the content properly in the view.
* UIProcess/ios/WKScrollView.mm:
(valuesAreWithinOnePixel):
(-[WKScrollView _rubberBandOffsetForOffset:maxOffset:minOffset:range:outside:]):
2014-05-02 Mark Rowe <mrowe@apple.com>
-[_WKThumbnailView _requestSnapshotIfNeeded] assumes that taking a snapshot will always succeed
<https://webkit.org/b/132489> / <rdar://problem/16704660>
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView _requestSnapshotIfNeeded]): Don't attempt to create a CGImageRef if we failed
to create a ShareableBitmap. This handles both the callback receiving a null Handle and a failure
within ShareableBitmap::create.
2014-05-02 Anders Carlsson <andersca@apple.com>
Clean up FormDataElement
https://bugs.webkit.org/show_bug.cgi?id=132483
Reviewed by Sam Weinig.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::encode):
2014-05-02 Anders Carlsson <andersca@apple.com>
Add and implement KeyedDecoder::decodeBytes
https://bugs.webkit.org/show_bug.cgi?id=132479
Reviewed by Tim Horton.
* Shared/cf/KeyedDecoder.cpp:
(WebKit::KeyedDecoder::decodeBytes):
* Shared/cf/KeyedDecoder.h:
2014-05-02 Joseph Pecoraro <pecoraro@apple.com>
[iOS] WebKit2 File Upload Support
https://bugs.webkit.org/show_bug.cgi?id=132024
Reviewed by Enrica Casucci.
* Configurations/WebKit2.xcconfig:
Include MobileCoreServices on iOS for kUTTypeImage/kUTTypeMovie.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* UIProcess/WebOpenPanelResultListenerProxy.h:
* UIProcess/WebOpenPanelResultListenerProxy.cpp:
(WebKit::filePathsFromFileURLs):
(WebKit::WebOpenPanelResultListenerProxy::chooseFiles):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::runOpenPanel):
(WebKit::WebPageProxy::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
* WebProcess/WebPage/WebOpenPanelResultListener.h:
* WebProcess/WebPage/WebOpenPanelResultListener.cpp:
(WebKit::WebOpenPanelResultListener::didChooseFilesWithDisplayStringAndIcon):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChooseFilesForOpenPanelWithDisplayStringAndIcon):
Message forwarding for choosing files and providing a display string and icon,
leading down to the existing WebCore FileChooser method.
* UIProcess/PageClient.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::handleRunOpenPanel):
Add a default handler for file open panel on iOS.
Forwards to the content view.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView lastInteractionLocation]):
(-[WKContentView _webTouchEventsRecognized:]):
(-[WKContentView _highlightLongPressRecognized:]):
(-[WKContentView _longPressRecognized:]):
(-[WKContentView _singleTapRecognized:]):
(-[WKContentView _doubleTapRecognized:]):
(-[WKContentView _twoFingerDoubleTapRecognized:]):
Keep track of the last interaction location. This matches previous behavior
of showing the file upload popover where the user tapped, to handle
cases where the <input> is hidden.
(-[WKContentView _showRunOpenPanel:resultListener:]):
(-[WKContentView fileUploadPanelDidDismiss:]):
Handle showing the cleaning up after the file upload panel.
* UIProcess/ios/forms/WKFileUploadPanel.h:
* UIProcess/ios/forms/WKFileUploadPanel.mm: Added.
(squareCropRectForSize):
(squareImage):
(thumbnailSizedImageForImage):
(-[_WKFileUploadItem isVideo]):
(-[_WKFileUploadItem fileURL]):
(-[_WKFileUploadItem displayImage]):
(-[_WKImageFileUploadItem initWithFilePath:originalImage:]):
(-[_WKImageFileUploadItem isVideo]):
(-[_WKImageFileUploadItem fileURL]):
(-[_WKImageFileUploadItem displayImage]):
(-[_WKVideoFileUploadItem initWithFilePath:mediaURL:]):
(-[_WKVideoFileUploadItem isVideo]):
(-[_WKVideoFileUploadItem fileURL]):
(-[_WKVideoFileUploadItem displayImage]):
Helper class for each image picker selection. Knows how to get
a file URL and thumbnail display image for the item.
(-[WKFileUploadPanel initWithView:]):
(-[WKFileUploadPanel dealloc]):
(-[WKFileUploadPanel _dispatchDidDismiss]):
(-[WKFileUploadPanel _cancel]):
(-[WKFileUploadPanel _chooseFiles:displayString:iconImage:]):
Lifetime of the upload panel requires that either cancel or choose
must happen as we go through the file picking process.
(-[WKFileUploadPanel presentWithParameters:WebKit::resultListener:WebKit::]):
(-[WKFileUploadPanel dismiss]):
API to show or dismiss the panel.
(-[WKFileUploadPanel _dismissDisplayAnimated:]):
Helper to clean up the UI as it progresses or completes no matter the device idiom.
(-[WKFileUploadPanel _presentPopoverWithContentViewController:animated:]):
(-[WKFileUploadPanel _presentFullscreenViewController:animated:]):
UI presentation for the appropriate idiom.
(-[WKFileUploadPanel _mediaTypesForPickerSourceType:]):
(-[WKFileUploadPanel _showMediaSourceSelectionSheet]):
(-[WKFileUploadPanel _showPhotoPickerWithSourceType:]):
Showing the action sheet or image picker.
(-[WKFileUploadPanel popoverControllerDidDismissPopover:]):
(-[WKFileUploadPanel _willMultipleSelectionDelegateBeCalled]):
(-[WKFileUploadPanel imagePickerController:didFinishPickingMediaWithInfo:]):
(-[WKFileUploadPanel imagePickerController:didFinishPickingMultipleMediaWithInfo:]):
(-[WKFileUploadPanel imagePickerControllerDidCancel:]):
Action sheet or image picker handlers.
(-[WKFileUploadPanel _processMediaInfoDictionaries:successBlock:failureBlock:]):
(-[WKFileUploadPanel _processMediaInfoDictionaries:atIndex:processedResults:processedImageCount:processedVideoCount:successBlock:failureBlock:]):
(-[WKFileUploadPanel _uploadItemFromMediaInfo:successBlock:failureBlock:]):
(-[WKFileUploadPanel _displayStringForPhotos:videos:]):
Processing selections from the image picker to FileUploadItems.
2014-05-01 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Animations on vox.com look wrong
https://bugs.webkit.org/show_bug.cgi?id=132462
<rdar://problem/16731884>
Reviewed by Sam Weinig.
PlatformCALayerRemote was managing animations incorrectly; aninations
would stick around in m_properties.addedAnimations and get added a second
time by mistake.
Animations have to be managed a little differently to other properties,
since they are not steady-state things. A given commit has to send over
the added and removed animations, and then clear the layer properties.
Do this by adding PlatformCALayerRemote::didCommit(), which is called
after the layer properties have been encoded, and have it clear the lists
of added and removed animations.
removeAnimationForKey() also has to remove the animation from addedAnimations
so that an add/remove in the same commit doesn't send the animation to the
UI process.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
(WebKit::PlatformCALayerRemote::didCommit):
(WebKit::PlatformCALayerRemote::removeAnimationForKey):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
2014-05-01 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Can't scroll on gatesnotes.com
https://bugs.webkit.org/show_bug.cgi?id=132459
<rdar://problem/16770909>
Reviewed by Benjamin Poulain.
The custom UIView hit-testing code was finding views that were created by
the compositing code for clipping, above the UIScrollViews. We only ever
need to find UIScrollViews here for touch overflow-scrolling, so constrain
the hit-testing code to only return UIScrollViews.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(-[UIView _recursiveFindDescendantScrollViewAtPoint:withEvent:]):
(-[UIView _findDescendantViewAtPoint:withEvent:]):
(-[UIView _recursiveFindDescendantViewAtPoint:withEvent:]): Deleted.
2014-05-02 Carlos Alberto Lopez Perez <clopez@igalia.com>
REGRESSION(r168118): [GTK] build broken due to shouldTrackVisitedLinks
https://bugs.webkit.org/show_bug.cgi?id=132447
Unreviewed GTK build fix.
shouldTrackVisitedLinks was removed on r168118.
Visited link coloring works as expected after this change.
* UIProcess/gtk/WebContextGtk.cpp:
(WebKit::WebContext::platformInitializeWebProcess): Remove
shouldTrackVisitedLinks parameter.
2014-05-01 Enrica Casucci <enrica@apple.com>
REGRESSION (WebKit2) Need to support Learn button.
https://bugs.webkit.org/show_bug.cgi?id=132454
<rdar://problem/16778889>
Reviewed by Benjamin Poulain.
For traditional Chinese we support the ability to add shortcuts
for typing. This is done by pressing the Learn button on the system
menu. This patch adds the necessary code to canPerformAction to enable
the button when appropriate as well as the implementation of the action
itself.
It also adds a check for the Replace button not to be shown when the
selection only contains CJ characters.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _addShortcut:]):
(-[WKContentView canPerformAction:withSender:]):
2014-05-01 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Tweak the extended background exclusion for MobileSafari
https://bugs.webkit.org/show_bug.cgi?id=132449
Reviewed by Beth Dakin.
Some tweaks for Mobile:
-Use UIViews instead of CALayers to have the same animation timing as the top views.
-The left extended background insets should not exclude the top and bottom insets.
Since this code is in the middle of 2 hot paths, also added some performance tweaks.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
In the normal case, we do not have extended background exclusion. To avoid creating a background view, we use
the scrollview to render the background.
The separate background view is created lazily if needed.
(-[WKWebView _updateScrollViewBackground]):
(-[WKWebView _frameOrBoundsChanged]):
(updateTopAndBottomExtendedBackgroundExclusionIfNecessary):
This create the top and bottom extended background view as needed and update their frames for the current insets.
(-[WKWebView _setObscuredInsets:]):
(-[WKWebView _setExtendedBackgroundExclusionInsets:]):
When an exclusion inset is needed, create a view for it, transfer the color from the ScrollView, and reset the color
of the scrollview.
2014-05-01 Alexey Proskuryakov <ap@apple.com>
Move size computation for Blob constructor into BlobRegistryImpl
https://bugs.webkit.org/show_bug.cgi?id=132439
Reviewed by Sam Weinig.
Plumbing to make this version of registerBlobURL synchronous for now.
I expect to make it async again when data structures on client side are simplified.
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerBlobURL):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::registerBlobURL):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerBlobURL):
* WebProcess/FileAPI/BlobRegistryProxy.h:
2014-05-01 Beth Dakin <bdakin@apple.com>
REGRESSION(168053): Repro crash navigating to another page after selecting phone
numbers on a page
https://bugs.webkit.org/show_bug.cgi?id=132444
-and corresponding-
<rdar://problem/16787285>
Reviewed by Darin Adler.
Missing null-check.
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::TelephoneNumberOverlayController::drawRect):
2014-05-01 Anders Carlsson <andersca@apple.com>
Remove WKBundleSetShouldTrackVisitedLinks and associate code
https://bugs.webkit.org/show_bug.cgi?id=132441
Reviewed by Sam Weinig.
* WebProcess/InjectedBundle/API/c/WKBundle.cpp:
(WKBundleSetShouldTrackVisitedLinks): Deleted.
* WebProcess/InjectedBundle/API/c/WKBundlePrivate.h:
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setShouldTrackVisitedLinks): Deleted.
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::addVisitedLink):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::setShouldTrackVisitedLinks): Deleted.
* WebProcess/WebProcess.h:
(WebKit::WebProcess::shouldTrackVisitedLinks): Deleted.
2014-05-01 Anders Carlsson <andersca@apple.com>
window.testRunner.keepWebHistory() should update the UI process state
https://bugs.webkit.org/show_bug.cgi?id=132440
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKPage.cpp:
(WKPageGetAddsVisitedLinks):
(WKPageSetAddsVisitedLinks):
* UIProcess/API/C/WKPagePrivate.h:
2014-05-01 Filip Pizlo <fpizlo@apple.com>
Roll out r60161.
Rubber stamped by Mark Hahnenberg.
This breaks our debugging workflow.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::decode):
* UIProcess/mac/WebContextMac.mm:
(WebKit::registerUserDefaultsIfNeeded):
(WebKit::WebContext::platformInitializeWebProcess):
2014-05-01 Anders Carlsson <andersca@apple.com>
WKWebView doesn't track visited links (for visited link coloring)
https://bugs.webkit.org/show_bug.cgi?id=132438
<rdar://problem/16704519>
Reviewed by Dan Bernstein.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/APIHistoryClient.h:
(API::HistoryClient::addsVisitedLinks):
(API::HistoryClient::shouldTrackVisitedLinks): Deleted.
* UIProcess/API/C/WKContext.cpp:
(WKContextSetHistoryClient):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _addsVisitedLinks]):
(-[WKWebView _setAddsVisitedLinks:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]):
* UIProcess/Cocoa/HistoryClient.h:
* UIProcess/Cocoa/HistoryClient.mm:
(WebKit::HistoryClient::shouldTrackVisitedLinks): Deleted.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::addVisitedLinkHashFromPage):
* UIProcess/VisitedLinkProvider.h:
* UIProcess/VisitedLinkProvider.messages.in:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::setHistoryClient):
(WebKit::WebContext::createNewWebProcess):
* UIProcess/WebContext.h:
(WebKit::WebContext::processes):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::addsVisitedLinks):
(WebKit::WebPageProxy::setAddsVisitedLinks):
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::addVisitedLink):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2014-05-01 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] The highlight view needs to be in WKWebView coordinates
https://bugs.webkit.org/show_bug.cgi?id=132435
<rdar://problem/16708861>
Reviewed by Tim Horton.
_UIHighlightView needs to be in WKWebView coordinates so that it render unscaled for any page scale factor.
The view needs to be a child of WKContentView so that it moves/scales with the page.
To fix the issue, add an inverse transform root layer for the hightlight, and scale the coordinates to their
inverse scaled counterpart.
The scale is not updated live with the scaling of WKContentView but that should be fine since the view disappear
on any scaling operation (and I would prefer not add live painting during scaling animation).
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
(-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
(-[WKContentView _cancelInteraction]):
2014-05-01 Ryuan Choi <ryuan.choi@samsung.com>
[EFL] There are many warnings with software backend
https://bugs.webkit.org/show_bug.cgi?id=132422
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/EwkView.cpp:
(EwkView::updateCursor):
(EwkView::transformToScreen):
2014-04-30 Alexey Proskuryakov <ap@apple.com>
Roll out fix for https://bugs.webkit.org/show_bug.cgi?id=131637:
Clean up unnecessary methods in the BackForwardClient interface
It broke a regression test and an API test.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
(WebKit::InjectedBundleBackForwardList::clear):
* WebProcess/WebPage/WebBackForwardListProxy.cpp:
(WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
(WebKit::WebBackForwardListProxy::addItem):
(WebKit::WebBackForwardListProxy::goToItem):
(WebKit::WebBackForwardListProxy::itemAtIndex):
(WebKit::WebBackForwardListProxy::backListCount):
(WebKit::WebBackForwardListProxy::forwardListCount):
(WebKit::WebBackForwardListProxy::close):
(WebKit::WebBackForwardListProxy::clear):
* WebProcess/WebPage/WebBackForwardListProxy.h:
(WebKit::WebBackForwardListProxy::create):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Copied from Source/WebKit2/WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm.
2014-04-30 Brady Eidson <beidson@apple.com>
Only reveal selection service UI after a short delay.
<rdar://problem/16777346> and https://bugs.webkit.org/show_bug.cgi?id=132418
Reviewed by Sam Weinig.
* WebProcess/WebPage/SelectionOverlayController.cpp:
(WebKit::SelectionOverlayController::SelectionOverlayController):
(WebKit::SelectionOverlayController::destroyOverlay): Also stop the hover timer.
(WebKit::SelectionOverlayController::selectionRectsDidChange): Mark the highlight as dirty.
(WebKit::SelectionOverlayController::hoverTimerFired): If the mouse is still over the highlight,
set the visible flag and setNeedsDisplay().
* WebProcess/WebPage/SelectionOverlayController.h:
* WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
(WebKit::SelectionOverlayController::drawRect): Recreate the highlight if it exists but
is marked as dirty. After doing that, possibly reset the hover timer.
Also, only performing the actual drawing if the visible flag is set.
(WebKit::SelectionOverlayController::mouseEvent): If the mouse moves on or off the highlight,
start or stop the hover timer accordingly.
(WebKit::SelectionOverlayController::mouseHoverStateChanged): Handle starting/stopping the
hover timer.
(WebKit::SelectionOverlayController::clearHighlight): Deleted.
2014-04-30 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] Animated resize incorrectly assumes the layout width is the same as the view width
https://bugs.webkit.org/show_bug.cgi?id=132373
<rdar://problem/16762178>
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
Fix a couple of bugs when the left/right obscured insets change, and/or when the minimum layout size
is narrower than the view itself.
In order:
-We need to perfom and update if the insets change since the unobscuredRect will also change.
-The min/max zoom scale should be based on the minimum layout size, that's the definition of minimum layout size
in scrollview coordinate :)
-The old web view width in content coordinate could be narrower than the old view bounds if there are left or right
insets.
2014-04-30 Simon Fraser <simon.fraser@apple.com>
Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO
https://bugs.webkit.org/show_bug.cgi?id=132396
Reviewed by Eric Carlson.
Remove ENABLE_PLUGIN_PROXY_FOR_VIDEO and related code.
* Configurations/FeatureDefines.xcconfig:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createMediaPlayerProxyPlugin): Deleted.
(WebKit::WebFrameLoaderClient::hideMediaPlayerProxyPlugin): Deleted.
(WebKit::WebFrameLoaderClient::showMediaPlayerProxyPlugin): Deleted.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-04-30 Brady Eidson <beidson@apple.com>
If there are no services available, do not show the service controls UI
<rdar://problem/16735665> and https://bugs.webkit.org/show_bug.cgi?id=132410
Reviewed by Tim Horton.
Add a lightweight class that lazily polls the appropriate APIs for whether or not appropriate services
are installed and usable on the system:
* UIProcess/mac/ServicesController.h: Added.
(WebKit::ServicesController::imageServicesExist):
(WebKit::ServicesController::selectionServicesExist):
* UIProcess/mac/ServicesController.mm: Added.
(WebKit::ServicesController::shared):
(WebKit::ServicesController::ServicesController):
(WebKit::ServicesController::refreshExistingServices):
(WebKit::ServicesController::refreshExistingServicesTimerFired):
Add "image services exist" and "selection services exist" parameters:
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
(WebKit::WebContext::refreshExistingServices): Called when the context menu proxy realizes that
services no longer exist.
* UIProcess/WebContext.h:
Each WebProcess hangs on to its own copy of the flags for whether or not the services exist:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeWebProcess):
(WebKit::WebProcess::setEnabledServices):
* WebProcess/WebProcess.h:
(WebKit::WebProcess::imageServicesExist):
(WebKit::WebProcess::selectionServicesExist):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu): If the menu creation failed, the set of services
on the system must have changed. So ask the WebContext to refresh them.
* WebProcess/WebPage/SelectionOverlayController.cpp:
(WebKit::SelectionOverlayController::selectionRectsDidChange): If services don't exist, don't create an
overlay (and destroy any existing overlay!)
* WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
(WebKit::SelectionOverlayController::drawRect): If services don't exist, don't draw, and destroy the overlay.
* WebProcess/WebProcess.messages.in:
* WebKit2.xcodeproj/project.pbxproj:
2014-04-30 Gavin Barraclough <baraclough@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=132415
Fix snapshotting on WebKit2
Reviewed by Geoff Garen
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
- Use a VisibilityToken to keep the process runnable.
2014-04-30 Gavin Barraclough <baraclough@apple.com>
Fix PageVisibility on iOS
https://bugs.webkit.org/show_bug.cgi?id=132393
Rubber stamped by Tim Horton
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewWindowActive):
(WebKit::PageClientImpl::isViewFocused):
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::isViewVisibleOrOccluded):
(WebKit::PageClientImpl::isVisuallyIdle):
- m_contentView -> m_webView
2014-04-30 Benjamin Poulain <benjamin@webkit.org>
[iOS][WK2] Add a SPI to exclude the extended background from some areas of WKWebView
https://bugs.webkit.org/show_bug.cgi?id=132406
<rdar://problem/16762197>
Reviewed by Beth Dakin.
Move the extended background to a separate layer bellow the UIScrollView.
The geometry of that layer is then changed based on ExtendedBackgroundExclusionInsets
as needed.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _updateScrollViewBackground]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _setExtendedBackgroundExclusionInsets:]):
(-[WKWebView _extendedBackgroundExclusionInsets]):
(-[WKWebView pageExtendedBackgroundColor]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-04-30 Simon Fraser <simon.fraser@apple.com>
Fix build error when building for iOS simulator.
* UIProcess/ios/ProcessAssertion.mm:
2014-04-30 Alexey Proskuryakov <ap@apple.com>
Move Blob.slice() implementation into BlobRegistryImpl
https://bugs.webkit.org/show_bug.cgi?id=132402
Reviewed by Anders Carlsson.
* NetworkProcess/FileAPI/NetworkBlobRegistry.cpp:
(WebKit::NetworkBlobRegistry::registerBlobURLForSlice):
* NetworkProcess/FileAPI/NetworkBlobRegistry.h:
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::registerBlobURLForSlice):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* WebProcess/FileAPI/BlobRegistryProxy.cpp:
(WebKit::BlobRegistryProxy::registerBlobURLForSlice):
* WebProcess/FileAPI/BlobRegistryProxy.h:
2014-04-30 Beth Dakin <bdakin@apple.com>
Phone number data detection UI is offset for iframes, pages with topContentInset
https://bugs.webkit.org/show_bug.cgi?id=132372
-and corresponding-
<rdar://problem/16651235>
Reviewed by Tim Horton.
Make the overlay an OverlayType::Document, which will keep everything relative to
the main Document’s coordinates.
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
(WebKit::TelephoneNumberOverlayController::createOverlayIfNeeded):
Make frames work by converting to the main document’s coordinate space.
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::TelephoneNumberOverlayController::drawRect):
2014-04-30 Roger Fong <roger_fong@apple.com>
Unreviewed. Unnecessary explicit initialization of LayoutUnit from r167985.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
Darin points out that I can just use “/2” instead of “/LayoutUnit(2.0)”.
2014-04-30 David Hyatt <hyatt@apple.com>
[New Multicolumn] Enable new multi-column mode
https://bugs.webkit.org/show_bug.cgi?id=131825
Reviewed by Simon Fraser.
* Shared/WebPreferencesStore.h:
2014-04-30 Brian J. Burg <burg@cs.washington.edu>
Clean up unnecessary methods in the BackForwardClient interface
https://bugs.webkit.org/show_bug.cgi?id=131637
Reviewed by Andreas Kling.
Remove stubs for iOS-specific methods in the BackForwardClient interface.
Construct a WebBackForwardListProxy directly, and make the WebCore page
own the BackForwardClient instance. Convert uses of backForward().client()
to accept references instead of raw pointers.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/InjectedBundleBackForwardList.cpp:
(WebKit::InjectedBundleBackForwardList::clear):
* WebProcess/WebPage/WebBackForwardListProxy.cpp: Store a reference to
WebCore::Page instead of a pointer.
(WebKit::WebBackForwardListProxy::WebBackForwardListProxy):
(WebKit::WebBackForwardListProxy::create): Deleted.
(WebKit::WebBackForwardListProxy::addItem):
(WebKit::WebBackForwardListProxy::goToItem):
(WebKit::WebBackForwardListProxy::itemAtIndex):
(WebKit::WebBackForwardListProxy::backListCount):
(WebKit::WebBackForwardListProxy::forwardListCount):
(WebKit::WebBackForwardListProxy::close):
(WebKit::WebBackForwardListProxy::clear):
(WebKit::WebBackForwardListProxy::isActive):
* WebProcess/WebPage/WebBackForwardListProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm: Removed.
2014-04-30 Gavin Barraclough <baraclough@apple.com>
Fix PageVisibility on iOS
https://bugs.webkit.org/show_bug.cgi?id=132393
Reviewed by Andreas Kling.
Currently page visibility API doesn't work correctly on WK2 iOS for a few reasons,
the most significant of which being that the moment a WKWebView leaves the window
we'll suspend the content process, which removes the possibility for any notification
to be delivered. This patch addresses this issue, by allowing the process to run for
long enough for the notification to be delivered.
1) Introduce a new class, ProcessThrottler, to encapsulate the process suspension logic.
2) WebPageProxy uses ProcessThrottler::VisibilityToken to communicate visibility to the throttler.
3) WebPageProxy tracks pending didUpdateViewState messages to detect when the view state update in
the web content process has completed.
4) Distiguish between 'Background' and 'Suspended' states in the ProcessAssertion.
* Shared/ChildProcessProxy.h:
- moved m_assertion to NetworkProcessProxy / WebProcessProxy.
* UIProcess/Network/NetworkProcessProxy.h:
- added m_assertion.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
- initialize VisibilityToken state.
(WebKit::WebPageProxy::reattachToWebProcess):
- reinitialize VisibilityToken state.
(WebKit::WebPageProxy::viewStateDidChange):
- update VisibilityToken, increment m_pendingViewStateUpdates as necessary.
(WebKit::WebPageProxy::updateVisibilityToken):
- update the VisibiliyToken based on page visibility, and whether an update is still pending.
(WebKit::WebPageProxy::didUpdateViewState):
- detect when a view state change has completed in the web process, and update throttle state as necessary.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::didUpdateViewState): Deleted.
- moved to .cpp.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::WebProcessProxy):
- initialize m_throttler.
(WebKit::WebProcessProxy::didFinishLaunching):
- notify the PageThrottler of the new connection.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::throttler):
- added accessor.
(WebKit::WebProcessProxy::updateProcessState): Deleted.
- moved trottling login to ProcessThrottler.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewWindowActive):
(WebKit::PageClientImpl::isViewFocused):
(WebKit::PageClientImpl::isViewVisible):
(WebKit::PageClientImpl::isViewVisibleOrOccluded):
- these should only be true when the view is in a window.
(WebKit::PageClientImpl::isVisuallyIdle):
- this should only be true when the view is not in a window.
* UIProcess/ios/ProcessAssertion.h:
* UIProcess/ios/ProcessAssertion.mm:
(WebKit::flagsForState):
- map from enum -> BKSAssertion flags values.
(WebKit::ProcessAssertion::ProcessAssertion):
- use flagsForState (add support for Suspended state).
(WebKit::ProcessAssertion::setState):
- use flagsForState (add support for Suspended state).
* UIProcess/ios/ProcessThrottler.h: Added.
(WebKit::ProcessThrottler::VisibilityToken::visibility):
- accessor.
(WebKit::ProcessThrottler::VisibilityToken::setVisibility):
- update Visibility value; update the token as necessary.
(WebKit::ProcessThrottler::ProcessThrottler):
- constructor; does not take an assention until didConnnectToProcess is called.
(WebKit::ProcessThrottler::visibilityToken):
- create a VisibilityToken.
(WebKit::ProcessThrottler::didConnnectToProcess):
- take an assertion.
(WebKit::ProcessThrottler::weakPtr):
- create a weak pointer, used for references from VisibilityToken to the throttler.
(WebKit::ProcessThrottler::assertionState):
- determine the correct AssertionState for the process, based on current visibility.
(WebKit::ProcessThrottler::updateAssertion):
- update assertion, called in response to visibility change.
* UIProcess/ios/ProcessThrottler.mm: Added.
(WebKit::ProcessThrottler::VisibilityToken::VisibilityToken):
- constructor.
(WebKit::ProcessThrottler::VisibilityToken::~VisibilityToken):
- set visibility to hidden to reset.
(WebKit::ProcessThrottler::VisibilityToken::hideTimerFired):
- automatically decay from Hiding -> Hidden on a timeout.
(WebKit::ProcessThrottler::VisibilityToken::setVisibilityInternal):
- update counters tracking visibility in ProcessThrottler.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didMoveToWindow]):
- This affects all view state flags, not just the 'InWindow' state.
If the view moves out of a window request a reply from the WebContent - we use this
to detect when the page visibility event has completed.
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::updateProcessState): Deleted.
- removed.
* WebKit2.xcodeproj/project.pbxproj:
- added new files.
2014-04-30 Anders Carlsson <andersca@apple.com>
Preemptive header fixes for when WebKit.framework is going to provide the modern API
https://bugs.webkit.org/show_bug.cgi?id=132394
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKBrowsingContextPolicyDelegate.h:
(NS_ENUM):
Delete WKNavigationType for now. Ultimately the entire delegate should be removed.
* UIProcess/API/Cocoa/WKPreferences.h:
Add a header guard so we can avoid importing WKPreferences.h more than once.
* WebKit2.xcodeproj/project.pbxproj:
_WKScriptWorld.h should be private, not public.
WKScriptMessagePrivate.h and WKUserContentControllerPrivate.h should be private, not project.
2014-04-30 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Ensure UIProcess checks in to webinspectord after spawning a WebProcess
https://bugs.webkit.org/show_bug.cgi?id=132389
Reviewed by Timothy Hatcher.
We aggregate WebProcess WebView's under the UIProcess. If the UIProcess
didn't connect to webinspectord these WebViews would have remained
hidden. Always have the UIProcess connect to webinspectord when it
spawns a WebProcess and may have a child process holding views that
it ultimately owns and should display under the UIProcess name.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcess):
2014-04-30 Zalan Bujtas <zalan@apple.com>
[iOS]Subpixel rendering: Extra line of pixels next to the YouTube loading indicator.
https://bugs.webkit.org/show_bug.cgi?id=132391
Reviewed by Simon Fraser.
CG and GraphicsContext clipping should use the same coordinates. Snapping either one
while leaving the other unsnapped results in clipping mismatch and that may produce
unpainted areas.
Not testable.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::drawInContext):
2014-04-30 Alexey Proskuryakov <ap@apple.com>
https://bugs.webkit.org/show_bug.cgi?id=132363
Make Blob RawData immutable
Reviewed by Anders Carlsson.
* Shared/FileAPI/BlobRegistrationData.cpp: (WebKit::BlobRegistrationData::decode):
Create RawData in one step.
2014-04-30 Brady Eidson <beidson@apple.com>
Followup to: Handle selection services menu.
<rdar://problem/16727798> and https://bugs.webkit.org/show_bug.cgi?id=132362
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::setupServicesMenu): Remove an ASSERT from previous version of the patch
that landed. I’d forgotten to add this stray change to my staging area.
2014-04-30 Manuel Rego Casasnovas <rego@igalia.com>
[CSS Grid Layout] Enable runtime feature by default
https://bugs.webkit.org/show_bug.cgi?id=132189
Reviewed by Benjamin Poulain.
* Shared/WebPreferencesStore.h: Remove unneeded changes that
enable/disable the runtime feature depending on the compilation flag.
And set it to true by default.
* UIProcess/gtk/ExperimentalFeatures.cpp: Set it to true by default.
2014-04-30 Roger Fong <roger_fong@apple.com>
Unreviewed. Wrong units used in offset calculation from r167961.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
I accidentally mixed and matches LayoutUnits with Ints in offset calculation here.
It should all just be in LayoutUnits.
2014-04-29 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] When pageScaleFactor * deviceScaleFactor = 1, the tile grid is completely messed up
https://bugs.webkit.org/show_bug.cgi?id=132368
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::PlatformCALayerRemote):
PlatformCALayerRemote always initialized the content scale to 1. Since contentsScale is supposed to reflect
zoomScale * deviceScaleFactor, the value should be 2.
This was causing bugs whenever the page scale factor was 1/2 on retina device (device scale factor = 2).
When the page is initialized, GraphicsLayerCA::updateContentsScale(0.5) computes a contentsScale of 1. There is an early
return on if (contentsScale == m_layer->contentsScale()). Since PlatformCALayerRemote->contentsScale() was incorreclty
returning one, we were leaving the tile backing unmodified.
Later, when the transaction is commited, the tile backing would still be default initialized and would render everything
at the wrong scale.
2014-04-29 Eric Carlson <eric.carlson@apple.com>
[Mac] tag the video layers with descriptive name to aid debugging
https://bugs.webkit.org/show_bug.cgi?id=132371
Reviewed by Darin Adler.
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::enterFullscreenForNode): Set the
fullscreen host layer name in a debug build.
2014-04-29 Brady Eidson <beidson@apple.com>
Handle selection services menu.
<rdar://problem/16727798> and https://bugs.webkit.org/show_bug.cgi?id=132362
Reviewed by Tim Horton.
Add members for the relevant info for showing a service menu for a selection:
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::controlledDataIsEditable):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::controlledSelectionData):
(WebKit::ContextMenuContextData::needsServicesMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::replaceSelectionWithPasteboardData): Changed to allow for multiple types on the overridden pasteboard.
(WebKit::WebPageProxy::showSelectionServiceMenu):
Update the services menu code to know the difference between an image service and a selection service:
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
(-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
(WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
(WebKit::WebContextMenuProxyMac::setupServicesMenu):
(WebKit::WebContextMenuProxyMac::clearServicesMenu):
(WebKit::WebContextMenuProxyMac::populate):
(WebKit::WebContextMenuProxyMac::showContextMenu):
(WebKit::WebContextMenuProxyMac::setupImageServicesMenu): Deleted.
(WebKit::WebContextMenuProxyMac::clearImageServicesMenu): Deleted.
* WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp:
(WebKit::WebPasteboardOverrides::getDataForOverride):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::replaceSelectionWithPasteboardData): Changed to allow for multiple types on the overridden pasteboard.
(WebKit::WebPage::handleSelectionServiceClick): Pass the relevant selection data through to the UIProcess as RTFD data.
* WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm:
(WebKit::SelectionOverlayController::handleClick): Notify the WebPage of the click.
2014-04-29 Dan Bernstein <mitz@apple.com>
<rdar://problem/16745596> [Cocoa] Crash when invoking a method with an unsigned parameter on a remote object
https://bugs.webkit.org/show_bug.cgi?id=132366
Reviewed by Anders Carlsson.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation): Handle the 'I' type code. Interpret the 'q' and 'Q' type codes in an
architecture-independent manner.
(decodeInvocationArguments): Ditto.
2014-04-29 Roger Fong <roger_fong@apple.com>
Don't immediately snapshot plugin to allow for proper dominant plugin detection.
https://bugs.webkit.org/show_bug.cgi?id=132294.
<rdar://problem/16745679>
Reviewed by Dean Jackson.
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::didInitializePlugin):
Instead of immediately setting the display state to DisplaySnapshot,
put it on a timer to let the page fully layout and get hit test properly.
2014-04-28 Roger Fong <roger_fong@apple.com>
Plugins hidden by images should autoplay.
https://bugs.webkit.org/show_bug.cgi?id=132222.
<rdar://problem/16653536>
Reviewed by Jon Lee and Darin Adler.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::determinePrimarySnapshottedPlugIn):
If the image on top of the plugin is similarly sized and similarly positioned as the plugin rect,
set the plugin to autoplay. This is assuming that the previous snapshot checks have passed as well.
2014-04-29 Filip Pizlo <fpizlo@apple.com>
Use LLVM as a backend for the fourth-tier DFG JIT (a.k.a. the FTL JIT)
https://bugs.webkit.org/show_bug.cgi?id=112840
Rubber stamped by Geoffrey Garen.
* Configurations/FeatureDefines.xcconfig:
2014-04-29 Brady Eidson <beidson@apple.com>
Change Image Controls replacement to use selection and paste
<rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
Reviewed by Tim Horton.
Add a "pasteboard override" mechanism which allows WebKit to keep pasteboard content local
to the WebProcess and access it there without having to message up to the UI process:
* WebProcess/WebCoreSupport/WebPasteboardOverrides.cpp: Added.
(WebKit::WebPasteboardOverrides::sharedPasteboardOverrides):
(WebKit::WebPasteboardOverrides::WebPasteboardOverrides):
(WebKit::WebPasteboardOverrides::addOverride):
(WebKit::WebPasteboardOverrides::removeOverride):
(WebKit::WebPasteboardOverrides::overriddenTypes):
(WebKit::WebPasteboardOverrides::getDataForOverride):
* WebProcess/WebCoreSupport/WebPasteboardOverrides.h: Added.
Change the pasteboard strategy to consult the pasteboard overrides before consulting the native pasteboard:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::getTypes):
(WebKit::WebPlatformStrategies::bufferForType):
Add "replaceSelectionWithPasteboardData" which uses the new pasteboard overrides mechanism
and then has WebCore perform the replacement:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::replaceSelectionPasteboardName):
(WebKit::WebPage::replaceSelectionWithPasteboardData):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::replaceSelectionWithPasteboardData):
* UIProcess/mac/WebContextMenuProxyMac.h:
(WebKit::WebContextMenuProxyMac::page):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Use "replaceSelectionWithPasteboardData".
(WebKit::WebContextMenuProxyMac::WebContextMenuProxyMac):
(WebKit::WebContextMenuProxyMac::replaceControlledImage): Deleted.
Remain other remnants of "replaceControlledImage":
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::replaceControlledImage): Deleted.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::replaceControlledImage): Deleted.
* WebProcess/WebPage/WebContextMenu.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::replaceControlledImage): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2014-04-29 Tim Horton <timothy_horton@apple.com>
Build fix.
* DatabaseProcess/ios/DatabaseProcessIOS.mm:
2014-04-29 Alexey Proskuryakov <ap@apple.com>
[WK2] DatabaseProcess should be sandboxed
https://bugs.webkit.org/show_bug.cgi?id=132324
<rdar://problem/15961708>
Reviewed by Darin Adler.
* Configurations/WebKit2.xcconfig: Added the profile to the list of files skipped
on iOS.
* DatabaseProcess/DatabaseProcess.cpp: (WebKit::DatabaseProcess::initializeDatabaseProcess):
Consume a sandbox extension for IndexedDB directory (which we get with initialization
message after entering sandbox).
* DatabaseProcess/ios: Added.
* DatabaseProcess/ios/DatabaseProcessIOS.mm: Copied from Source/WebKit2/DatabaseProcess/mac/DatabaseProcessMac.mm.
Separated from Mac version to match how other processes are implemented.
* DatabaseProcess/mac/DatabaseProcessMac.mm: (WebKit::DatabaseProcess::initializeProcessName):
Removed ifdefs.
* DatabaseProcess/mac/com.apple.WebKit.Databases.sb.in: Added.
* DerivedSources.make: Generate the profile from .sb.in.
* Shared/Databases/DatabaseProcessCreationParameters.cpp:
(WebKit::DatabaseProcessCreationParameters::encode):
(WebKit::DatabaseProcessCreationParameters::decode):
* Shared/Databases/DatabaseProcessCreationParameters.h:
Added a sandbox extension for indexedDatabaseDirectory.
* Shared/SecurityOriginData.h: Added an unrelated FIXME.
* UIProcess/WebContext.cpp: (WebKit::WebContext::ensureDatabaseProcess): Create
a sandbox extension for indexedDatabaseDirectory.
* WebKit2.xcodeproj/project.pbxproj: Added new files.
2014-04-28 Andy Estes <aestes@apple.com>
[iOS] Introduce -didNotHandleTapAsClickAtPoint: to WKUIDelegatePrivate
https://bugs.webkit.org/show_bug.cgi?id=132316
Reviewed by Darin Adler.
One WebKit2 client is interested to know if a tap was not handled by an element that responds to clicks.
Introduce a new, private WKUIDelegate method telling it that a tap at a location was not handled as a click on
an element.
* UIProcess/API/APIUIClient.h:
(API::UIClient::didNotHandleTapAsClick):
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h:
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::didNotHandleTapAsClick):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didNotHandleTapAsClick):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleTap): Sent Messages::WebPageProxy::DidNotHandleTapAsClick if the tap wasn't handled, no
node responded to the click event, or the responding node wasn't an element.
2014-04-29 Zan Dobersek <zdobersek@igalia.com>
[GTK][WK2] Avoid Vector copies in WebViewBaseInputMethodFilter::setPreedit()
https://bugs.webkit.org/show_bug.cgi?id=132323
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp:
(WebKit::WebViewBaseInputMethodFilter::setPreedit): Inline the Vector object construction into
the WebPageProxy::setComposition() call to avoid extra Vector copies and moves.
2014-04-28 Dan Bernstein <mitz@apple.com>
<rdar://problem/16750708> REGRESSION (r159358): Crash in InjectedBundleHitTestResult::frame
https://bugs.webkit.org/show_bug.cgi?id=132318
Reviewed by Andy Estes.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction): Fixed a typo: set
the source frame, not the destination frame.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Changed to get the
frame for the action not from a hit test result, because some link activation actions are
not mouse events, but rather from the event’s target.
2014-04-28 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Restore the scroll position and scale from the HistoryItem (mostly)
https://bugs.webkit.org/show_bug.cgi?id=132307
<rdar://problem/16031704>
Reviewed by Simon Fraser.
Restore the scroll position and scale on back-forward by restoring the values from HistoryItem.
This covers the common cases, see <rdar://problem/16031704>.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _didCommitLoadForMainFrame]): Deleted.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLoadForMainFrame]):
Get rid of the old code restoring the scroll position. This is now done by the WebProcess.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
Update the scrolling tree after invoking didCommitLayerTree() on the WebPageProxy.
WKContentView and WKWebView states are updated in response to didCommitLayerTree(), the content size
and scale in particular are set there.
After that, the content size/scale is in the same state as the layerTree update, and we can scroll
the content as needed.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
(WebKit::WebFrameLoaderClient::restoreViewState):
iOS WebKit1 uses a custom restoreViewState(), do the same for WebKit2 since the generic code is #ifdefed out.
This is also necessary for the main frame's state update.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::restorePageState):
Restore the scale and position of the main frame. For now, we assume m_userHasChangedPageScaleFactor is set otherwise
the initial-scale would override the restored value. We will need to fix that, the value should probably be saved with
the history.
2014-04-28 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] iOS fix after r167867
https://bugs.webkit.org/show_bug.cgi?id=132302
Reviewed by Simon Fraser.
iOS Touch Points uses "phase" for describing the touch points state for historical reasons.
This patch adds state() as a synonym for phase, and revert r167893.
* Shared/WebEvent.h:
(WebKit::WebPlatformTouchPoint::state):
* UIProcess/WebPageProxy.cpp:
(WebKit::areAllTouchPointsReleased):
2014-04-28 Andy Estes <aestes@apple.com>
Fix a transcription error from r167901.
When addressing Darin's review feedback, I moved the iteration of dataArray from
QuickLookDocumentData::append() to WebQuickLookHandleClient::didReceiveDataArray(),
but I forgot to update the context argument to CFArrayApplyFunction() accordingly.
* WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp:
(WebKit::WebQuickLookHandleClient::didReceiveDataArray):
2014-04-28 Enrica Casucci <enrica@apple.com>
[WK2 iOS] Need to show title in the action sheet for images not inside an anchor element.
https://bugs.webkit.org/show_bug.cgi?id=132304
<rdar://problem/16535227>
Reviewed by Benjamin Poulain.
If the image in not inside an anchor tag, we must use the title attribute as
title for the action sheet.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
2014-04-28 Tim Horton <timothy_horton@apple.com>
WebKit2 View Gestures (Swipe): Discard snapshots made with a different view size/pixel density
https://bugs.webkit.org/show_bug.cgi?id=132115
Reviewed by Simon Fraser.
We shouldn't try to use snapshots if they no longer match the destination view size.
To do this, we need an accurate understanding of the topContentInset, both for the Web view,
and for any custom views, because we don't want to include the inset area in the snapshot,
and we don't want to reject snapshots that differ from the current view only because they have an inset or not.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _takeViewSnapshot]):
(-[WKView _setCustomSwipeViewsTopContentInset:]):
Add and plumb through a topContentInset property to apply to the custom swipe views.
For simplicitly's sake in the multi-view case, it is applied in window coordinates,
so clients will have to do conversions if necessary.
Don't include the top content inset in the snapshot that is taken.
* UIProcess/mac/ViewGestureController.h:
(WebKit::ViewGestureController::setCustomSwipeViewsTopContentInset):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::windowRelativeBoundsForCustomSwipeViews):
Apply the aforementioned custom swipe view top content inset.
(WebKit::ViewGestureController::determineSnapshotLayerParent):
(WebKit::ViewGestureController::determineLayerAdjacentToSnapshotForParent):
Factor these out of beginSwipeGesture.
(WebKit::ViewGestureController::retrieveSnapshotForItem):
Don't return a snapshot if the current deviceScaleFactor doesn't match that
at which the snapshot was taken, or if the size of the snapshot doesn't match
the unobscured part of the snapshot layer (the layer's size sans top content inset).
(WebKit::layerGeometryFlippedToRoot): Added.
Determine whether geometry flipping occurs between a layer and the root of the tree it is in.
(WebKit::ViewGestureController::applyDebuggingPropertiesToSwipeViews):
Factor out debugging layer properties, and add some borders and backgrounds to our layers.
I switched to invert instead of blur because blur makes the borders hard to use.
(WebKit::ViewGestureController::beginSwipeGesture):
Add an additional layer, the swipeLayer, which is the parent of the swipeSnapshotLayer.
We use this layer to compensate for geometry flipping, since we don't necessarily
know the structure of the layer tree ahead of time when inserting snapshots into the
client's layer tree, in the custom swipe view case.
The swipe layer is always the full size of the view, including topContentInset, and
has a white background in order to fill in that space. The snapshot layer is the size
of the view *excluding* the topContentInset, which should match the size of the snapshot image
itself (and we reject the image and just paint white if this is not the case).
(WebKit::ViewGestureController::handleSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
Move and remove the new swipeLayer.
* UIProcess/mac/ViewSnapshotStore.h:
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::recordSnapshot):
Store the deviceScaleFactor at the time the snapshot was taken.
Fix a bug where the count of snapshots with live images was too high
because we were failing to decrement it when replacing a snapshot of
an existing item with a fresh one.
2014-04-28 Enrica Casucci <enrica@apple.com>
WK2 iOS: crash when handling a synthetic keyboard event.
https://bugs.webkit.org/show_bug.cgi?id=132296
<rdar://problem/16469726>
Reviewed by Benjamin Poulain.
Adding a null check, since synthetic keyboard events do not
have a corresponding platform event. We already do this on OS X.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleEditingKeyboardEvent):
2014-04-24 Andy Estes <aestes@apple.com>
[iOS] Implement WebQuickLookHandleClient for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=132157
Reviewed by Darin Adler.
* Shared/API/Cocoa/_WKNSFileManagerExtras.h: Added.
* Shared/API/Cocoa/_WKNSFileManagerExtras.mm: Added.
(+[NSFileManager _web_createTemporaryFileForQuickLook:]): Called WebCore::createTemporaryFileForQuickLook().
* Shared/ios/QuickLookDocumentData.cpp: Added.
(WebKit::QuickLookDocumentData::QuickLookDocumentData):
(WebKit::QuickLookDocumentData::append): Appened each CFDataRef to m_data and added their sizes to m_size.
(WebKit::QuickLookDocumentData::decodedData): Returned the combined CFDataRef created by decode().
Named this method 'decodedData' to indicate that it should only be called on objects populated by decode().
(WebKit::QuickLookDocumentData::clear): Cleared m_data and reset m_size to 0.
(WebKit::QuickLookDocumentData::encode): Implemented a custom encoding function to avoid having to combine
m_data into contiguous memory at encoding time. Encoded m_size then sequentially encoded each member of m_data.
(WebKit::QuickLookDocumentData::decode): Decoded the byte stream into a single CFDataRef. Eagerly copied the
decoded data rather than using a DataReference since we know this will outlive the decoder.
* Shared/ios/QuickLookDocumentData.h: Added.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didStartLoadForQuickLookDocumentInMainFrame):
(API::LoaderClient::didFinishLoadForQuickLookDocumentInMainFrame):
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didStartLoadForQuickLookDocumentInMainFrame):
(WebKit::NavigationState::LoaderClient::didFinishLoadForQuickLookDocumentInMainFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didStartLoadForQuickLookDocumentInMainFrame):
(WebKit::WebPageProxy::didFinishLoadForQuickLookDocumentInMainFrame):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
(WebKit::WebFrameLoaderClient::didCreateQuickLookHandle):
* WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.cpp: Added.
(WebKit::WebQuickLookHandleClient::WebQuickLookHandleClient): Sent DidStartLoadForQuickLookDocumentInMainFrame
to WebPageProxy.
(WebKit::WebQuickLookHandleClient::didReceiveDataArray): Appended dataArray to m_data.
(WebKit::WebQuickLookHandleClient::didFinishLoading): Sent DidFinishLoadForQuickLookDocumentInMainFrame to
WebPageProxy and then cleared m_data.
(WebKit::WebQuickLookHandleClient::didFail): Cleared m_data.
* WebProcess/WebCoreSupport/ios/WebQuickLookHandleClient.h: Added.
(WebKit::WebQuickLookHandleClient::create):
2014-04-28 Brady Eidson <beidson@apple.com>
Hide service controls for selection behind a runtime switch
<rdar://problem/16736616> and https://bugs.webkit.org/show_bug.cgi?id=132291
Reviewed by Tim Horton.
* Shared/WebPreferencesStore.h:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectionRectsDidChange): Do nothing if the UI is disabled.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::serviceControlsEnabled):
2014-04-28 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r167853.
https://bugs.webkit.org/show_bug.cgi?id=132288
caused crashes+timeouts+layout test failures described in the
bug (Requested by thorton on #webkit).
Reverted changeset:
"Coalesce responses on network process side"
https://bugs.webkit.org/show_bug.cgi?id=132229
http://trac.webkit.org/changeset/167853
2014-04-28 Simon Fraser <simon.fraser@apple.com>
Fix the iOS buld.
* UIProcess/WebPageProxy.cpp:
(WebKit::areAllTouchPointsReleased):
2014-04-24 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Make subview rebuilding more incremental
https://bugs.webkit.org/show_bug.cgi?id=132162
<rdar://problem/16718916>
Reviewed by Sam Weinig.
Previously we did bulk replacement of subviews, but that triggers
UIKit to send spurious will/DidMoveToWindow messages, which can
interfere with UIScrollView scrolling.
Make _web_setSubviews more incremental, only removing
deleted subviews, adding new ones, and moving existing ones
into the correct order.
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(-[UIView _web_setSubviews:]):
2014-04-24 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] flickery scrolling with overflow-scrolling:touch
https://bugs.webkit.org/show_bug.cgi?id=132150
<rdar://problem/16683006>
Reviewed by Tim Horton.
Maintain a flag that tells us if the user is interacting
with the UIScrollView, and while set, don't clobber the contentOffset
via scrolling tree updates.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate initWithScrollingTreeNode:WebKit::]):
(-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
(-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
(-[WKOverflowScrollViewDelegate scrollViewDidEndDecelerating:]): We need this one,
not scrollViewDidEndScrollingAnimation:, to detect the end of decleration.
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
(-[WKOverflowScrollViewDelegate scrollViewDidEndScrollingAnimation:]): Deleted.
2014-04-28 Krzysztof Wolanski <k.wolanski@samsung.com>
[X11] Add missing case for mime type application/x-webkit-test-netscape
https://bugs.webkit.org/show_bug.cgi?id=132278
Reviewed by Darin Adler.
Case for x-webkit-test-netscape has been omitted along with r167759.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::initialize):
2014-04-28 Zan Dobersek <zdobersek@igalia.com>
[WK2][X11] NetscapePluginModule::scanPlugin() should write UTF-8 strings to stdout
https://bugs.webkit.org/show_bug.cgi?id=132245
Reviewed by Carlos Garcia Campos.
NetscapePluginModule::scanPlugin(), in the helper writeLine function, takes each character
of the given string and writes it out as a UChar, doing two fputc calls for each byte of the
16-bit type.
This fails badly with characters with integer value less than 256 as the most significant byte
of the UChar is written out as a null character. This effectively chops the output that's gathered
in the UIProcess and is parsed in PluginProcessProxy::scanPlugin().
To avoid all this, the UTF-8 encoding of the string is written out in the PluginProcess, and
String::fromUTF8() is called in the UIProcess to properly decode the received string.
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::writeCharacter):
(WebKit::writeLine):
(WebKit::writeByte): Deleted.
* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
(WebKit::PluginProcessProxy::scanPlugin):
2014-04-28 Zan Dobersek <zdobersek@igalia.com>
[GTK][WK2] Missing return statement in webkit_plugin_get_description()
https://bugs.webkit.org/show_bug.cgi?id=132263
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitPlugin.cpp:
(webkit_plugin_get_description): Actually return the data of the cached
plugin description CString.
2014-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Crash in debug build with removing windowed plugin child widgets from the view
https://bugs.webkit.org/show_bug.cgi?id=132252
Reviewed by Philippe Normand.
It crashes due to an assert in HashTable that checks the iterators
validity. The problem is that we are iterating the children map
and the callback called on every iteration might modify the map,
making the iterators invalid. This happens when the WebView is
destroyed, GtkContainer calls gtk_container_foreach() with
gtk_widget_destroy as callback. When a widget inside a container
is destroyed, it's removed from the container, and in our case,
the child widget is removed from the map. This fixes several
crashes when running layout tests in debug bot.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseContainerForall): Use copyKeysToVector() instead
of using a range iterator for the map keys and check in every
iteration that the child widget from the keys vector is still
present in the map before calling the callback.
2014-04-28 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] GObject introspection links to installed libs when using jhbuild
https://bugs.webkit.org/show_bug.cgi?id=132220
Reviewed by Martin Robinson.
The problem is that gobject-introspection is linking the temporary
binaries adding the library paths present LDFLAGS environment
variable first, taking precedence over the libraries in the build
dir. Since the libraries paths of the dependencies are already
correctly deduced by gobject-introspection using ldd, we can
just unset the LDFLAGS variable before calling g-ir-scanner to
make sure the libraries in the build dir take predence.
* PlatformGTK.cmake:
2014-04-27 Tim Horton <timothy_horton@apple.com>
REGRESSION (r164702): Double tap doesn't stay under the new element once the animation finishes
https://bugs.webkit.org/show_bug.cgi?id=132239
<rdar://problem/16192842>
Reviewed by Darin Adler.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scalePage):
The change in r167864 broke iOS animated resize, because it was depending on
the dynamic size update code not running if the scale wasn't going to change.
So, as a band-aid we should bail from doing that work if the scales aren't different.
In the long term we should try to untangle this code and make it less platform dependent.
2014-04-27 Eunmi Lee <eunmi15.lee@samsung.com>
TouchEvent is not handled after releasing any point among touched points.
https://bugs.webkit.org/show_bug.cgi?id=132043
Reviewed by Benjamin Poulain.
Handle TouchEvent until all touched points are released by setting
trackingTouchEvents variable to false when all points are released.
* UIProcess/WebPageProxy.cpp:
(WebKit::areAllTouchPointsReleased):
(WebKit::WebPageProxy::handleTouchEventSynchronously):
(WebKit::WebPageProxy::handleTouchEventAsynchronously):
(WebKit::WebPageProxy::handleTouchEvent):
2014-04-27 Alexey Proskuryakov <ap@apple.com>
Don't use DispatchMessageEvenWhenWaitingForSyncReply for messages from NetworkProcess
https://bugs.webkit.org/show_bug.cgi?id=132144
Reviewed by Darin Adler.
* NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
(WebKit::AsynchronousNetworkLoaderClient::willSendRequest):
(WebKit::AsynchronousNetworkLoaderClient::canAuthenticateAgainstProtectionSpace):
Dont use the IPC::DispatchMessageEvenWhenWaitingForSyncReply flag. It's not needed,
almost never works in NetworkProcess, but may cause trouble if it did.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::NetworkConnectionToWebProcess): Removed
setOnlySendMessagesAsDispatchWhenWaitingForSyncReplyWhenProcessingSuchAMessage()
function call, because there are no more any messages in NetworkProcess it could affect.
* Platform/IPC/Connection.cpp: (IPC::Connection::dispatchMessage): Added a FIXME
for an unrelated bug Anders and myself noticed while looking into this.
2014-04-27 Dan Bernstein <mitz@apple.com>
[Cocoa] -[WKWebProcessPlugInController parameters] returns nil if no parameters have been set yet
https://bugs.webkit.org/show_bug.cgi?id=132223
Reviewed by Sam Weinig.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::bundleParameters): Create the WKWebProcessBundleParameters if
needed.
2014-04-27 Tim Horton <timothy_horton@apple.com>
REGRESSION (r164702): Double tap doesn't stay under the new element once the animation finishes
https://bugs.webkit.org/show_bug.cgi?id=132239
<rdar://problem/16192842>
Reviewed by Sam Weinig.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scalePage):
The early-return added to WebPage::scalePage breaks callers who depend
on being able to call scalePage() with the same scale but a different
origin and having that change take effect.
Page::setPageScaleFactor already has the requisite logic, so move
the early return down after that call, and guard only notification
of page scale changes.
2014-04-25 Andy Estes <aestes@apple.com>
[iOS] Stop creating a WKWebResourceQuickLookDelegate for every WebResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=132215
Reviewed by Dan Bernstein.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Called QuickLookHandle::create() directly.
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/ios/WebResourceLoaderIOS.mm: Removed.
2014-04-27 Sam Weinig <sam@webkit.org>
[iOS WebKit2] Add support for text autosizing
<rdar://problem/16545245>
https://bugs.webkit.org/show_bug.cgi?id=132237
Reviewed by Tim Horton.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::textAutosizingWidth):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
Pass the text autosizing width from the UIProcess to WebProcess.
2014-04-27 Tim Horton <timothy_horton@apple.com>
WebKit2 View Gestures (Zoom): Pages with 'background-attachment: fixed' don't behave correctly when zoomed
https://bugs.webkit.org/show_bug.cgi?id=132225
<rdar://problem/15729975>
Reviewed by Darin Adler.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::layerForTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::shadowLayerForTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::adjustTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
Factor out code to choose which layer (and shadow layer) to apply the transient zoom to.
If we have a contentsContainmentLayer (because we have composited background-attachment: fixed),
it applies page scale, so we should apply the transient zoom to that layer
instead of the RenderView's main GraphicsLayer.
2014-04-27 Pratik Solanki <psolanki@apple.com>
Unreviewed. iOS build fix.
* UIProcess/ios/SmartMagnificationController.h:
2014-04-27 Zan Dobersek <zdobersek@igalia.com>
Move cross-port WebKit2 code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129670
Reviewed by Darin Adler.
Replace uses of OwnPtr, PassOwnPtr in cross-port WebKit2 code with std::unique_ptr.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.h:
* NetworkProcess/NetworkProcess.h:
(WebKit::NetworkProcess::addSupplement):
* NetworkProcess/SynchronousNetworkLoaderClient.cpp:
(WebKit::SynchronousNetworkLoaderClient::didReceiveBuffer):
* NetworkProcess/SynchronousNetworkLoaderClient.h:
* Platform/IPC/Connection.cpp:
(IPC::Connection::dispatchWorkQueueMessageReceiverMessage):
* Platform/IPC/Connection.h:
* Platform/IPC/MessageReceiver.h:
* Platform/Module.h:
* Platform/WorkQueue.h:
* Platform/efl/ModuleEfl.cpp:
(WebKit::Module::load):
* Platform/mac/LayerHostingContext.mm:
* Shared/APIURL.h:
* Shared/Network/CustomProtocols/CustomProtocolManager.h:
* Shared/Plugins/NPRemoteObjectMap.cpp:
* Shared/ShareableBitmap.h:
* UIProcess/DrawingAreaProxyImpl.h:
* UIProcess/InspectorServer/WebSocketServer.cpp:
(WebKit::WebSocketServer::didAcceptConnection):
(WebKit::WebSocketServer::didCloseWebSocketServerConnection):
* UIProcess/InspectorServer/WebSocketServer.h:
* UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp:
(WebKit::connectionCallback):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::createDownloadProxy):
* UIProcess/Network/NetworkProcessProxy.h:
* UIProcess/Notifications/WebNotificationManagerProxy.h:
* UIProcess/Plugins/WebPluginSiteDataManager.cpp:
(WebKit::WebPluginSiteDataManager::getSitesWithData):
(WebKit::WebPluginSiteDataManager::clearSiteData):
(WebKit::WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins):
(WebKit::WebPluginSiteDataManager::didClearSiteDataForAllPlugins):
* UIProcess/Plugins/WebPluginSiteDataManager.h:
* UIProcess/Storage/StorageManager.cpp:
(WebKit::callCallbackFunction):
(WebKit::StorageManager::getOriginsInternal):
* UIProcess/WebPageProxy.cpp:
(WebKit::ExceededDatabaseQuotaRecords::areBeingProcessed):
(WebKit::ExceededDatabaseQuotaRecords::createRecord):
(WebKit::ExceededDatabaseQuotaRecords::add):
(WebKit::ExceededDatabaseQuotaRecords::next):
(WebKit::WebPageProxy::handleMouseEvent):
(WebKit::WebPageProxy::handleWheelEvent):
(WebKit::WebPageProxy::processNextQueuedWheelEvent):
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::createDownloadProxy):
* UIProcess/WebProcessProxy.h:
* WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp:
(WebKit::PluginDestructionProtector::PluginDestructionProtector):
* WebProcess/Plugins/Netscape/NetscapePluginStream.cpp:
(WebKit::NetscapePluginStream::deliverData):
* WebProcess/Plugins/Netscape/NetscapePluginStream.h:
* WebProcess/Plugins/PluginProcessConnectionManager.h:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::initialize):
(WebKit::PluginProxy::didCreatePluginInternal):
(WebKit::PluginProxy::didFailToCreatePluginInternal):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::createWebEvent):
(WebKit::PluginView::handleEvent):
* WebProcess/Plugins/PluginView.h:
* WebProcess/WebCoreSupport/WebPopupMenu.h:
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::EventDispatcher):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::beginPrinting):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebProcess.h:
(WebKit::WebProcess::addSupplement):
2014-04-27 Antti Koivisto <antti@apple.com>
Coalesce responses on network process side
https://bugs.webkit.org/show_bug.cgi?id=132229
Reviewed by Andreas Kling.
To reduce IPC we should coalesce response data in the network process and send it over with single IPC call.
* NetworkProcess/AsynchronousNetworkLoaderClient.cpp:
(WebKit::AsynchronousNetworkLoaderClient::AsynchronousNetworkLoaderClient):
(WebKit::AsynchronousNetworkLoaderClient::didReceiveResponse):
(WebKit::AsynchronousNetworkLoaderClient::didReceiveBuffer):
(WebKit::AsynchronousNetworkLoaderClient::didFinishLoading):
(WebKit::AsynchronousNetworkLoaderClient::didFail):
(WebKit::AsynchronousNetworkLoaderClient::dispatchPartialCoalescedResponse):
(WebKit::AsynchronousNetworkLoaderClient::clearCoalescedResponse):
(WebKit::AsynchronousNetworkLoaderClient::responseCoalesceTimerFired):
Coalesce the response. Completed response is sent on didFinishLoading. If the coalesce timer fires
before that the data accumulated so far is dispatched.
* NetworkProcess/AsynchronousNetworkLoaderClient.h:
* NetworkProcess/NetworkResourceLoader.h:
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveCompleteResponse):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/Network/WebResourceLoader.messages.in:
Add a new message type that covers didReceiveResponse, didReceiveBuffer and didFinishLoading in a single message.
2014-04-26 Tim Horton <timothy_horton@apple.com>
REGRESSION (r167775): Safari crashes in ViewSnapshotStore::pruneSnapshots after loading 20 pages
https://bugs.webkit.org/show_bug.cgi?id=132204
<rdar://problem/16735622>
Reviewed by Dan Bernstein and Sam Weinig.
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::pruneSnapshots):
(WebKit::ViewSnapshotStore::recordSnapshot):
Fix a bug where the count of snapshots with live images was too high
because we were failing to decrement it when replacing a snapshot of
an existing item with a fresh one.
2014-04-26 Dan Bernstein <mitz@apple.com>
[Cocoa] Rename a bundle form delegate method
https://bugs.webkit.org/show_bug.cgi?id=132221
Reviewed by Adele Peterson.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Renamed.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Check for the method
under the old (“new”) name and under the new name.
2014-04-25 Dan Bernstein <mitz@apple.com>
[Cocoa] Synthesized getter for WKNavigationAction's _userInitiated property has the wrong name
https://bugs.webkit.org/show_bug.cgi?id=132219
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
2014-04-25 Simon Fraser <simon.fraser@apple.com>
[iOS] getAssistedNodeInformation crashes getting the bounding box if it doesn't have a renderer
https://bugs.webkit.org/show_bug.cgi?id=132217
<rdar://problem/16671662>
Reviewed by Dean Jackson.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation): Check that m_assistedNode has
a renderer before asking for its bounding box.
2014-04-25 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Add an intermediary view to do the target transform and adjustment transform
https://bugs.webkit.org/show_bug.cgi?id=132175
Reviewed by Enrica Casucci.
Some utility views of WKContentView account for the transforms between the content view
and the utility view.
Since the dynamic resize relies on setting subLayerTransforms, it is getting in the way.
This patch adds a layer in between for the animation. That way the content view remains
unscaled.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _endAnimatedResize]):
2014-04-25 Enrica Casucci <enrica@apple.com>
REGRESSION (iOS WebKit2): Selection is not being repainted during live resize.
https://bugs.webkit.org/show_bug.cgi?id=132216
<rdar://problem/16628819>
Reviewed by Benjamin Poulain.
Since the selection is drawn in the UIProcess on iOS,
we need to update the selection rects and force a repaint
during a live resize.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidLayout):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateSelectionAppearance):
2014-04-25 Brady Eidson <beidson@apple.com>
Add a selection overlay.
<rdar://problem/16727797> and https://bugs.webkit.org/show_bug.cgi?id=132200
Reviewed by David Hyatt.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectionRectsDidChange): Pass the new selection rects on
to the selection overlay controller.
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebPage/SelectionOverlayController.cpp: Added.
(WebKit::SelectionOverlayController::SelectionOverlayController):
(WebKit::SelectionOverlayController::createOverlayIfNeeded):
(WebKit::SelectionOverlayController::destroyOverlay):
(WebKit::SelectionOverlayController::pageOverlayDestroyed):
(WebKit::SelectionOverlayController::willMoveToWebPage):
(WebKit::SelectionOverlayController::didMoveToWebPage):
(WebKit::SelectionOverlayController::selectionRectsDidChange):
(WebKit::SelectionOverlayController::drawRect):
(WebKit::SelectionOverlayController::mouseEvent):
* WebProcess/WebPage/SelectionOverlayController.h: Added.
(WebKit::SelectionOverlayController::create):
* WebProcess/WebPage/mac/SelectionOverlayControllerMac.mm: Added.
(WebKit::SelectionOverlayController::drawRect):
(WebKit::SelectionOverlayController::mouseEvent):
(WebKit::SelectionOverlayController::handleClick):
(WebKit::SelectionOverlayController::clearHighlight):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::selectionOverlayController):
* WebProcess/WebPage/WebPage.h:
2014-04-25 Enrica Casucci <enrica@apple.com>
Remove duplicate member variable in WKAutocorrectionRects and WKAutocorrectionContext.
https://bugs.webkit.org/show_bug.cgi?id=132206
Reviewed by Benjamin Poulain.
* UIProcess/ios/WKContentViewInteraction.mm:
2014-04-25 Dean Jackson <dino@apple.com>
Allow a platform-specific size enumeration to be passed into popup-menu display
https://bugs.webkit.org/show_bug.cgi?id=132195
Reviewed by Brent Fulgham. With some in-person review comments from Sam Weinig.
Platforms like OS X use a set of predefined sizes for built-in controls
used for <select>: normal, small and mini. Expose that information to
the PopupMenuClient via the PopupMenuStyle, allowing it to be passed
into the platform code in WebKitSystemInterface.
* Shared/PlatformPopupMenuData.cpp: Encode and decode the PopupMenuSize enum.
(WebKit::PlatformPopupMenuData::encode):
(WebKit::PlatformPopupMenuData::decode):
* Shared/PlatformPopupMenuData.h: Add PopupMenuSize member variable.
* UIProcess/mac/WebPopupMenuProxyMac.mm:
(WebKit::WebPopupMenuProxyMac::showPopupMenu): Convert the PopupMenuSize
into a WKControlSize, and pass that into WKPopupMenu.
* WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm:
(WebKit::WebPopupMenu::setUpPlatformData): Add the PopupMenuSize to
the PlatformPopupMenuData.
2014-04-25 Tim Horton <timothy_horton@apple.com>
REGRESSION (r167775): Safari crashes in ViewSnapshotStore::pruneSnapshots after loading 20 pages
https://bugs.webkit.org/show_bug.cgi?id=132204
<rdar://problem/16729123>
Reviewed by Anders Carlsson.
* UIProcess/mac/ViewSnapshotStore.h:
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::ViewSnapshotStore):
(WebKit::ViewSnapshotStore::pruneSnapshots):
(WebKit::ViewSnapshotStore::recordSnapshot):
Keep track of the number of snapshots that actually have live images; the
size of the snapshot map no longer represents that.
Also, fix the crash by using the UUID from the current item instead of from
the (potentially null) most distant item; r167775 accidentally typo'd this.
2014-04-25 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Plugin process crashes with GTK2 windowed plugins
https://bugs.webkit.org/show_bug.cgi?id=132127
Reviewed by Martin Robinson.
It happens sometimes because the socket is used before the plug
has been added. A runtime critical warnings is shown and it
sometimes ends up crashing.
* WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp:
(WebKit::NetscapePlugin::platformPostInitializeWindowed): Do not
show the plug widget until the socket is connected.
2014-04-24 Andreas Kling <akling@apple.com>
[iOS WebKit2] Enable optimization to mmap downloaded resources once they become file-backed.
<https://webkit.org/b/132171>
<rdar://problem/16720733>
Implement a CFNetwork-based version of NetworkResourceLoader::willCacheResponseAsync()
and activate the DiskCacheMonitor code path. This means that once resources go into
file system cache, we get notified and mmap them from disk, saving heaps of memory.
Reviewed by Antti Koivisto.
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/mac/DiskCacheMonitor.mm:
* NetworkProcess/mac/NetworkResourceLoaderMac.mm:
(WebKit::NetworkResourceLoader::willCacheResponseAsync):
2014-04-24 Andreas Kling <akling@apple.com>
[iOS WebKit2] RemoteLayerTreeDrawingArea should force CA to garbage collect surfaces.
<https://webkit.org/b/132160>
<rdar://problem/16110687>
Do an empty CATransaction at the end of RemoteLayerTreeDrawingArea::flushLayers()
to get CA to garbage collect its IOSurfaces. This helps clean up unused surfaces
that we'd otherwise end up hanging on to for a long time.
Reviewed by Tim Horton.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::didUpdate):
2014-04-24 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r167700.
https://bugs.webkit.org/show_bug.cgi?id=132142
Incorrectly reverted the change in r167547 for
webkit.org/b/131898 (Requested by rniwa on #webkit).
Reverted changeset:
"Cursor doesn't change back to pointer when leaving the Safari
window"
https://bugs.webkit.org/show_bug.cgi?id=132038
http://trac.webkit.org/changeset/167700
2014-04-24 Brady Eidson <beidson@apple.com>
Rename "IMAGE_CONTROLS" feature to "SERVICE_CONTROLS"
https://bugs.webkit.org/show_bug.cgi?id=132155
Reviewed by Tim Horton.
* Configurations/FeatureDefines.xcconfig:
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::operator=):
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
(WebKit::WebContextMenuProxyMac::populate):
(WebKit::WebContextMenuProxyMac::showContextMenu):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/WebContextMenu.cpp:
* WebProcess/WebPage/WebContextMenu.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2014-04-24 Joseph Pecoraro <pecoraro@apple.com>
[iOS] Add some missing overrides and remove unnecessary virtuals
https://bugs.webkit.org/show_bug.cgi?id=132153
Reviewed by Darin Adler.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
2014-04-24 Tim Horton <timothy_horton@apple.com>
WebKit2 View Gestures: Use a single struct for the snapshot, and pass it around
https://bugs.webkit.org/show_bug.cgi?id=132114
Reviewed by Simon Fraser.
Have only a single map in ViewSnapshotStore, from back-forward item
to ViewSnapshotStore::Snapshot, and return the Snapshot struct when looking
up snapshots (via getSnapshot()), so that future patches can persist additional
information along with the snapshot.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::retrieveSnapshotForItem):
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::endSwipeGesture):
Adopt getSnapshot() instead of snapshotAndRenderTreeSize().
Move retrieveSnapshotForItem out into a separate function (for future use).
* UIProcess/mac/ViewSnapshotStore.h:
(WebKit::ViewSnapshotStore::disableSnapshotting):
(WebKit::ViewSnapshotStore::enableSnapshotting):
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::pruneSnapshots):
(WebKit::ViewSnapshotStore::recordSnapshot):
(WebKit::ViewSnapshotStore::getSnapshot):
(WebKit::ViewSnapshotStore::snapshotAndRenderTreeSize): Deleted.
Make Snapshot struct public.
Get rid of the separate map of back-forward items to render tree sizes.
When evicting, instead of removing the entry, clear out its snapshot image;
this way, we can keep other snapshot metadata around.
2014-04-24 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] Should properly handle focus redirect (keyboard state changes when focus changes).
https://bugs.webkit.org/show_bug.cgi?id=132136
<rdar://problem/16238336>
Reviewed by Benjamin Poulain.
Focusing a field from JavaScript should not make the keyboard or the select picker
appear unless the user has already started interacting with one of the fields in the page.
Adding a parameter to StartAssistingNode to indicate whether the focus change is a result
of a user action.
* 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:userObject:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::startAssistingNode):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::dispatchTouchEvent):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::handleTap):
(WebKit::WebPage::elementDidFocus):
2014-04-24 Myles C. Maxfield <mmaxfield@apple.com>
FontCache::fontCache() never returns nullptr so it can be made to return a reference instead
https://bugs.webkit.org/show_bug.cgi?id=132110
Reviewed by Tim Horton.
Updates callers to use '.' instead of '->'.
No new tests are necessary because there should be no behavior change.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::terminate):
(WebKit::WebProcess::didClose):
(WebKit::WebProcess::getWebCoreStatistics):
2014-04-24 Eric Carlson <eric.carlson@apple.com>
[iOS] Manage AudioSession category according to media type
https://bugs.webkit.org/show_bug.cgi?id=132096
Reviewed by Jer Noble.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Tell WebCore to manage the AudioSession.
2014-04-24 Tim Horton <timothy_horton@apple.com>
[wk2] Provide SPI allowing clients to hand events directly to swipe code, bypassing scrolling
https://bugs.webkit.org/show_bug.cgi?id=132092
<rdar://problem/15948244>
Reviewed by Darin Adler.
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _tryToSwipeWithEvent:ignoringPinnedState:]):
Added. Hand the event directly to ViewGestureController, optionally
ignoring whether or not the WKView is scrollable (always pretending that it is not).
* UIProcess/mac/ViewGestureController.h:
(WebKit::ViewGestureController::shouldIgnorePinnedState):
(WebKit::ViewGestureController::setShouldIgnorePinnedState):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::scrollEventCanBecomeSwipe):
(WebKit::ViewGestureController::handleScrollWheelEvent):
(WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
(WebKit::scrollEventCanBecomeSwipe):
If we're ignoring the view's pinned state, pretend that we're always pinned,
and don't worry about sending events to WebCore.
2014-04-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] wmode='transparent' for flash plugin doesn't work
https://bugs.webkit.org/show_bug.cgi?id=120055
Reviewed by Gustavo Noronha Silva.
Force opaque window mode for flash plugin when wmode='transparent',
since X11 backend doesn't support transparency. We should add
proper transparency support because forcing opaque window mode
doesn't really work. Handle this as a plugin quirk instead of
adding X11 specific code to WebFrameLoaderClient::createPlugin().
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::determineQuirks): Add
ForceFlashWindowlessMode quirk for flash in case of EFL platform
because EFL port doesn't support windowed plugins.
* Shared/Plugins/PluginQuirks.h: Add ForceFlashWindowlessMode X11
plugin quirk.
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::initialize): Modify or add wmode
parameter for flash plugin, to force opaque window mode when
transparent mode is specified or when ForceFlashWindowlessMode
quirk is present.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::createPlugin): Remove X11 specific code.
2014-04-23 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Missing content inside long overflow-scrolling:touch
https://bugs.webkit.org/show_bug.cgi?id=132105
Reviewed by Tim Horton.
PlatformCALayerRemote needs to track bounds origin as well as size,
since iOS uses bounds origin for overflow scrolling.
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer):
* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::updateBackingStore):
(WebKit::PlatformCALayerRemote::bounds):
(WebKit::PlatformCALayerRemote::setBounds):
2014-04-23 Andreas Kling <akling@apple.com>
Remove unused WKPageSetMemoryCacheClientCallsEnabled API.
<https://webkit.org/b/132098>
This API was added to WK2 back in 2011 but never actually used.
Reviewed by Anders Carlsson.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageSetMemoryCacheClientCallsEnabled): Deleted.
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::creationParameters):
(WebKit::WebPageProxy::setMemoryCacheClientCallsEnabled): Deleted.
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setMemoryCacheMessagesEnabled): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2014-04-23 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Make -webkit-overflow-scrolling:touch work
https://bugs.webkit.org/show_bug.cgi?id=132097
Reviewed by Tim Horton.
Scrolling of UIScrollViews in content (for -webkit-overflow-scrolling:touch)
depends on them getting hit-tested correctly. UIKit hit testing assumes
that subviews are enclosed by their ancestors, but this is not true of
web content. In addition, we had a root layer that was zero sized.
Fix by overriding hitTest:withEvent: on our content WKViews to hit
test subviews even if they are not enclosed.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(-[UIView _recursiveFindDescendantViewAtPoint:withEvent:]):
(-[UIView _findDescendantViewAtPoint:withEvent:]):
(-[WKCompositingView hitTest:withEvent:]):
(-[WKTransformView hitTest:withEvent:]):
(-[WKRemoteView hitTest:withEvent:]):
(WebKit::RemoteLayerTreeHost::createLayer):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updatePreferences):
Update debug borders on the root layer.
(WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
Size the root layer to the contents size. This isn't strictly necessary
given the hit testing overrides, but seems sensible to do anyway.
2014-04-23 Simon Fraser <simon.fraser@apple.com>
Nonopaque layers double-paint with UI-side compositing
https://bugs.webkit.org/show_bug.cgi?id=132101
Reviewed by Tim Horton.
The non-IOSurface code path was failing to clear the backing store
before painting.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):
(WebKit::RemoteLayerBackingStore::drawInContext):
2014-04-23 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Image and text documents sometime gets the webpage viewport configuration
https://bugs.webkit.org/show_bug.cgi?id=132099
Reviewed by Tim Horton.
When didReceiveMobileDocType(), if the doctype was not XHTML mobile, we were setting
the viewport configuration to webpageParameters(). This is obviously not correct for
Image and Text documents.
This patch moves the code deciding the default configuration out of WebPage::didCommitLoad()
and use it from WebPage::didCommitLoad() and WebPage::didReceiveMobileDocType().
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::didReceiveMobileDocType):
(WebKit::WebPage::resetViewportDefaultConfiguration):
2014-04-23 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Fix a few mistakes affecting the initial layout and the initial unobscured rect
https://bugs.webkit.org/show_bug.cgi?id=132093
<rdar://problem/16703237>
Reviewed by Tim Horton.
The user of WKWebView can setup a size on device pixels, which can add half a point to the minimum
layout size. By rounding this up before applying the page scale, we ended up with rounding errors
on the layout size and the transitory unobscured content rect.
This patch fixes changes the minimal layout size to float point values to reduce the rounding problems.
* UIProcess/API/Cocoa/WKWebView.mm:
(setViewportConfigurationMinimumLayoutSize):
(-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::setViewportConfigurationMinimumLayoutSize):
(WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didCommitLoad):
Defaulting the content size to the minimum layout size only works if the initial-scale is 1.
ViewportConfiguration knows exactly what to do before the first layout.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setViewportConfigurationMinimumLayoutSize):
(WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
(WebKit::WebPage::dynamicViewportSizeUpdate):
A few fixes here:
-setZoomedOutPageScaleFactor() was incorrectly using the initial scale. 99% of the time, initial scale
and minimum scale are equal, but the page can specify something different with the viewport meta tag.
-Use floating point for manipulating the minimum layout sizes, then round the value.
-minimumLayoutSizeInDocumentCoordinate was scaled the wrong way around.
(WebKit::WebPage::viewportConfigurationChanged):
2014-04-23 Yongjun Zhang <yongjun_zhang@apple.com>
Support encoding/decoding NSUInteger arguments in WKRemoteObjectCoder.
https://bugs.webkit.org/show_bug.cgi?id=132040
Add support for encoding/decoding NSUInteger arguments.
Reviewed by Sam Weinig.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(encodeInvocation):
(decodeInvocationArguments):
2014-04-22 Ryosuke Niwa <rniwa@webkit.org>
Cursor doesn't change back to pointer when leaving the Safari window
https://bugs.webkit.org/show_bug.cgi?id=132038
Reviewed by Alexey Proskuryakov.
Since the cursor type is now updated asynchronously after r147739,
[window windowNumber] != [NSWindow windowNumberAtPoint:[NSEvent mouseLocation] belowWindowWithWindowNumber:0]
evalutes to false depending on how fast cursor is moving.
Instead, check whether the NSWindow of the WebView is the key window or not since
key window appears to control the cursor style in Cocoa as far as I've tested:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/WinPanel/Concepts/ChangingMainKeyWindow.html
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setCursor):
2014-04-22 Yongjun Zhang <yongjun_zhang@apple.com>
Add SPI to expose provisional URL from Frame.
https://bugs.webkit.org/show_bug.cgi?id=132014
Add methods to return the provisional URL from WKWebProcessPlugInFrame.
Reviewed by Dan Bernstein.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame _provisionalURL]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
2014-04-22 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Split iOS touch event dispatch for the regular touch event dispatch
https://bugs.webkit.org/show_bug.cgi?id=132033
Reviewed by Simon Fraser.
The generic touch event dispatching does not work well with iOS gesture recognizers.
Some events are required to be synchronous, while other needs can be asynchronous and
can even use event coalescing. We only need UI callback for the synchronous events.
Previously, that was implemented by changing the property ShouldSendEventsSynchronously
on WebPageProxy. That is causing issues when synchronous events are sent right after asynchronous
events because the responses in WebPageProxy::didReceiveEvent() easily get out of order.
This patch completely split the UIGestureRecognizerDispatching from the normal asynchronous event dispatching.
Synchronous events are sent directly to the WebProcess and report the result to the PageClient right away.
Asynchronous events are sent to the EventDispatcher where they are coalesced until the main thread is free
to process events.
There can be a race where a synchronous event comes before the asynchronous events are processed. In that case,
the synchronous event handler starts by getting the events out of the EventDispatcher and dispatch them first.
* Shared/NativeWebTouchEvent.h:
(WebKit::NativeWebTouchEvent::uniqueId): Deleted.
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::handleSynchronousTouchEvent):
(WebKit::WebPageProxy::sendAsynchronousTouchEvent):
(WebKit::WebPageProxy::didReceiveEvent):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _webTouchEventsRecognized:]):
(-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::EventDispatcher):
(WebKit::EventDispatcher::clearQueuedTouchEventsForPage):
(WebKit::EventDispatcher::getQueuedTouchEventsForPage):
(WebKit::EventDispatcher::touchEvent):
(WebKit::EventDispatcher::dispatchTouchEvents):
* WebProcess/WebPage/EventDispatcher.h:
* WebProcess/WebPage/EventDispatcher.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::dispatchTouchEvent):
(WebKit::WebPage::touchEventSync):
(WebKit::WebPage::touchEvent):
(WebKit::WebPage::touchEventSyncForTesting):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dispatchAsynchronousTouchEventsQueue):
2014-04-22 Chris Fleizach <cfleizach@apple.com>
AX: iOS hit-testing does not work when page is zoomed
https://bugs.webkit.org/show_bug.cgi?id=132013
Reviewed by Simon Fraser.
Implement accessibilityHitTest so that the point can be converted correctly.
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2014-04-22 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r167674.
https://bugs.webkit.org/show_bug.cgi?id=132025
Going a different way with this (Requested by bradee-oh on
#webkit).
Reverted changeset:
"Change Image Controls replacement to use selection and paste"
https://bugs.webkit.org/show_bug.cgi?id=131992
http://trac.webkit.org/changeset/167674
2014-04-22 Joseph Pecoraro <pecoraro@apple.com>
Remove unused local variable
https://bugs.webkit.org/show_bug.cgi?id=132020
Reviewed by Alexey Proskuryakov.
* UIProcess/ios/forms/WKFormSelectPopover.mm:
(-[WKSelectPopover initWithView:hasGroups:]):
2014-04-22 Brady Eidson <beidson@apple.com>
Change Image Controls replacement to use selection and paste
<rdar://problem/16302722> and https://bugs.webkit.org/show_bug.cgi?id=131992
Reviewed by Tim Horton.
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]): Write the
replacement data to a special pasteboard, then replace the current selection from
that pasteboard.
Remove all other code used to support the old replacement mechanism:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::replaceControlledImage): Deleted.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebContextMenuProxyMac.h:
(WebKit::WebContextMenuProxyMac::page):
(WebKit::WebContextMenuProxyMac::replaceControlledImage): Deleted.
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::replaceControlledImage): Deleted.
* WebProcess/WebPage/WebContextMenu.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::replaceControlledImage): Deleted.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2014-04-22 Eunmi Lee <eunmi15.lee@samsung.com>
[EFL][WK2] Remove duplicated code to set size to the DrawingArea.
https://bugs.webkit.org/show_bug.cgi?id=131972
Reviewed by Andreas Kling.
DrawingArea's size is set in the WebView.cpp when EwkView's size is
changed, so we don't have to set again in the PageViewportController.
* UIProcess/CoordinatedGraphics/PageViewportController.cpp:
(WebKit::PageViewportController::didChangeViewportSize):
2014-04-22 Tim Horton <timothy_horton@apple.com>
WKThumbnailView doesn't quite work with topContentInset
https://bugs.webkit.org/show_bug.cgi?id=131976
<rdar://problem/16642127>
Reviewed by Darin Adler.
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView initWithFrame:fromWKView:]):
_WKThumbnailView always needs a layer.
We don't want to use snapshots by default, this was debugging accidentally landed in the last change.
(-[_WKThumbnailView _requestSnapshotIfNeeded]):
Don't request a new snapshot if the scale is the same as the existing one.
Reduce the height of the snapshot by the topContentInset.
Having the origin at (0, 0) is still correct, as the inset content is in negative Y space,
and (0, 0) is the true origin of the content.
(-[_WKThumbnailView setScale:]):
When not snapshotting, we've decided that WKThumbnailView should apply the scale to the WKView layer tree,
instead of depending on clients to do so.
(-[_WKThumbnailView setUsesSnapshot:]):
We *do* need to apply thumbnail scale in the web process even when snapshotting,
because we use the live layer tree temporarily while waiting for the asynchronous
snapshot to return. This was a misstep in the last thumbnail view patch.
2014-04-22 Shivakumar JM <shiva.jm@samsung.com>
[WebKit2] Cleanup the build from unused parameter in WebProcess Module
https://bugs.webkit.org/show_bug.cgi?id=131970
Reviewed by Darin Adler.
Fix a build warning by removing the parameters in function paintLayerContents() to fix build warning.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::paintLayerContents):
2014-04-22 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Crash after getting web view context property with g_object_get
https://bugs.webkit.org/show_bug.cgi?id=131983
Reviewed by Philippe Normand.
The problem is that the getter is using g_value_take_object() and
the default context is destroyed when the caller releases its ref.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewGetProperty): Use g_value_set_object() instead of
g_value_take_object().
2014-04-22 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Remove unnecessary includes in files of Source/WebKit2/UIProcess/API/efl
https://bugs.webkit.org/show_bug.cgi?id=131979
Reviewed by Gyuyoung Kim.
Removed unnecessary includes of header files.
In addition, tried to use forward declarations.
* UIProcess/API/efl/EwkView.cpp:
* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/EwkViewCallbacks.h:
* UIProcess/API/efl/GestureRecognizer.h:
* UIProcess/API/efl/ewk_context_menu_item_private.h:
* UIProcess/API/efl/ewk_context_menu_private.h:
* UIProcess/API/efl/ewk_download_job.cpp:
* UIProcess/API/efl/ewk_download_job_private.h:
* UIProcess/API/efl/ewk_form_submission_request.cpp:
* UIProcess/API/efl/ewk_form_submission_request_private.h:
* UIProcess/API/efl/ewk_navigation_data.cpp:
* UIProcess/API/efl/ewk_navigation_data_private.h:
* UIProcess/API/efl/ewk_page_group_private.h:
* UIProcess/API/efl/ewk_popup_menu_private.h:
* UIProcess/API/efl/ewk_view.cpp:
* UIProcess/API/efl/ewk_window_features_private.h:
* UIProcess/efl/PageUIClientEfl.cpp:
* UIProcess/efl/ViewClientEfl.cpp:
2014-04-21 Tim Horton <timothy_horton@apple.com>
[wk2] Don't send intrinsic content size updates with dirty layout
https://bugs.webkit.org/show_bug.cgi?id=131964
<rdar://problem/14292718>
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea):
(WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
(WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeIfNeeded):
(WebKit::TiledCoreAnimationDrawingArea::flushLayers):
(WebKit::TiledCoreAnimationDrawingArea::updateGeometry):
(WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired): Deleted.
Instead of using a timer (which can fire while layout is dirty) to coalesce
intrinsic content size changes, send them only from flushLayers, just after updating layout.
This ensures that we never get intermediate intrinsic content sizes that won't be painted.
2014-04-21 Tim Horton <timothy_horton@apple.com>
Remove a unnecessary forward-declared class from TiledCoreAnimationDrawingArea.
Rubber-stamped by Simon Fraser.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2014-04-21 Simon Fraser <simon.fraser@apple.com>
Don't try to use a null connection()->xpcConnection()
https://bugs.webkit.org/show_bug.cgi?id=131961
Reviewed by Dan Bernstein.
If running with -WebKit2UseXPCServiceForWebProcess NO, connection()->xpcConnection()
is null and xpc_connection_get_pid() would crash, so null-check the xpcConnection.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didFinishLaunching):
2014-04-21 Dan Bernstein <mitz@apple.com>
WebKit part of <rdar://problem/16631323> Page::setDefersLoading doesn’t do anything when using the Network process
https://bugs.webkit.org/show_bug.cgi?id=131939
Reviewed by David Kilzer.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::setDefersLoading): Added. Forwards the message to
the NetworkResourceLoader.
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in: Added SetDefersLoading message.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::NetworkResourceLoader): Initialize new member variable
m_defersLoading from the new field in the loader parameters.
(WebKit::NetworkResourceLoader::start): Added. Like WebCore::ResourceLoader, if loading is
deferred, keep the request in m_deferredRequest and bail out.
(WebKit::NetworkResourceLoader::setDefersLoading): Added. Similar to
WebCore::ResourceLoader::setDefersLoading.
* NetworkProcess/NetworkResourceLoader.h:
(WebKit::NetworkResourceLoader::defersLoading):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): Initialize new field
defersLoading to false.
(WebKit::NetworkResourceLoadParameters::encode): Encode new field.
(WebKit::NetworkResourceLoadParameters::decode): Decode new field.
* Shared/Network/NetworkResourceLoadParameters.h: Added defersLoading field.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad): Populate defersLoading field in the load
parameters.
(WebKit::WebResourceLoadScheduler::setDefersLoading): Send a message to the Network process.
* WebProcess/Network/WebResourceLoadScheduler.h:
2014-04-21 Anders Carlsson <andersca@apple.com>
Errors passed to delegate methods should have recovery attempters
https://bugs.webkit.org/show_bug.cgi?id=131957
<rdar://problem/16642539>
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.h: Added.
* UIProcess/API/Cocoa/_WKErrorRecoveryAttempting.mm: Added.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::createErrorWithRecoveryAttempter):
(WebKit::NavigationState::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(WebKit::NavigationState::LoaderClient::didFailLoadWithErrorForFrame):
* UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.h: Added.
* UIProcess/Cocoa/WKReloadFrameErrorRecoveryAttempter.mm: Added.
(-[WKReloadFrameErrorRecoveryAttempter initWithWebView:frameHandle:urlString:]):
(-[WKReloadFrameErrorRecoveryAttempter attemptRecovery]):
* WebKit2.xcodeproj/project.pbxproj:
2014-04-21 Eric Carlson <eric.carlson@apple.com>
[Mac] implement WebKitDataCue
https://bugs.webkit.org/show_bug.cgi?id=131799
Reviewed by Dean Jackson.
* Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
2014-04-21 Beth Dakin <bdakin@apple.com>
topContentInset does not play well with fullscreen elements
https://bugs.webkit.org/show_bug.cgi?id=131955
-and corresponding-
<rdar://problem/16651925>
Reviewed by Sam Weinig.
If you take an element (such as a <video>) fullscreen when you have a
topContentInset set, there will be an inset-sized gap at the top of the fullscreen
video.
Save and restore the topContentInset whenever the scroll position is saved and
restored.
* WebProcess/FullScreen/WebFullScreenManager.cpp:
(WebKit::WebFullScreenManager::WebFullScreenManager):
(WebKit::WebFullScreenManager::saveScrollPosition):
(WebKit::WebFullScreenManager::restoreScrollPosition):
* WebProcess/FullScreen/WebFullScreenManager.h:
2014-04-21 Gavin Barraclough <baraclough@apple.com>
Don't use ProcessAssertion on simulator
https://bugs.webkit.org/show_bug.cgi?id=131950
Rubber stamped by Enrica Casucci
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
* UIProcess/ios/ProcessAssertion.h:
2014-04-21 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] support replacements for misspelled words.
https://bugs.webkit.org/show_bug.cgi?id=131827
<rdar://problem/16319657>
Reviewed by Darin Adler.
This is the second a final piece to support replacements.
It adds some entrypoints used by the keyboard code to perform
replacement when reaching the edge of a word using backspace.
I've modified the behavior of replaceSelectedText to work both
with caret or range selections.
* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView isReplaceAllowed]):
(-[WKContentView _characterBeforeCaretSelection]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::editorState):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::replaceSelectedText):
2014-04-21 Gavin Barraclough <baraclough@apple.com>
Don't use ProcessAssertion on simulator
https://bugs.webkit.org/show_bug.cgi?id=131950
Rubber stamped by Benjamin Poulain
* UIProcess/ios/ProcessAssertion.mm:
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::setState):
2014-04-21 Anders Carlsson <andersca@apple.com>
Another build fix.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::checkEntitlements):
2014-04-21 Anders Carlsson <andersca@apple.com>
Build fix.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
(WebKit::XPCServiceInitializer):
2014-04-21 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Implement CSS viewport units
https://bugs.webkit.org/show_bug.cgi?id=131863
<rdar://problem/16279088>
Reviewed by Darin Adler.
* UIProcess/API/Cocoa/WKWebView.mm:
(setMinimumLayoutSizeForMinimalUI):
(-[WKWebView _minimumLayoutSizeOverrideForMinimalUI]):
(-[WKWebView _setMinimumLayoutSizeOverrideForMinimalUI:]):
Add _setMinimumLayoutSizeOverrideForMinimalUI:, which pushes said size
down from the client to WebPageIOS, below.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setMinimumLayoutSizeForMinimalUI):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setMinimumLayoutSizeForMinimalUI):
(WebKit::WebPage::viewportConfigurationChanged):
Update FrameView's viewport size based on the minimum layout size for minimal UI (if we have it)
or the normal minimum layout size, scaled to the page's initial scale.
2014-04-21 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Fix the dynamic viewport update when the viewport's max-scale conflict with the transition
https://bugs.webkit.org/show_bug.cgi?id=131884
Reviewed by Darin Adler.
<rdar://problem/16667291>
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
It is fairly common to have a viewport configuration with min-scale=1 and max-scale=1.
Since we were only changing the minimumScale for the transition, the target scale was affected
by max-scale. This was breaking the transition from portrait to landscale.
2014-04-21 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Make dynamic viewport size update content aware
https://bugs.webkit.org/show_bug.cgi?id=131874
Reviewed by Tim Horton.
When possible, adjust the scroll position based on the content on dynamic viewport resize.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::scalePage):
(WebKit::WebPage::pageDidScroll):
* WebProcess/WebPage/WebPage.h:
The scrolling heuristic are not invertible, especially the content heuristic. To have the right
behavior when doing resize without changing the page, we save the old scroll position and restore
it when the content size and scale is restored.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
On dynamic update, start by finding what node is at the center of the screen. After the layout, put that
node back in the center.
(WebKit::WebPage::updateVisibleContentRects):
2014-04-21 Anders Carlsson <andersca@apple.com>
Need default WKNavigationDelegate behavior
https://bugs.webkit.org/show_bug.cgi?id=131944
<rdar://problem/15949822>
Reviewed by Dan Bernstein.
Port the WebKit1 default delegate behavior over.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
2014-04-21 Dan Bernstein <mitz@apple.com>
[Cocoa] Expose WebPage::setDefersLoading
https://bugs.webkit.org/show_bug.cgi?id=131943
Reviewed by Anders Carlsson, but he doesn’t like this.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _defersLoading]): Added this accessor.
(-[WKWebProcessPlugInBrowserContextController _setDefersLoading:]): Ditto.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
Declared new property _defersLoading.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::defersLoading): Added this getter.
* WebProcess/WebPage/WebPage.h:
2014-04-21 Joseph Pecoraro <pecoraro@apple.com>
Remove unused WebKitSystemInterface functions
https://bugs.webkit.org/show_bug.cgi?id=131938
Reviewed by Alexey Proskuryakov.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2014-04-21 Anders Carlsson <andersca@apple.com>
Check the com.apple.security.network.client entitlement for all processes
https://bugs.webkit.org/show_bug.cgi?id=131942
<rdar://problem/12354188>
Reviewed by Dan Bernstein.
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
(WebKit::XPCServiceInitializerDelegate::checkEntitlements):
2014-04-20 Dan Bernstein <mitz@apple.com>
[Cocoa] Remove interfaces in the To Be Removed groups
https://bugs.webkit.org/show_bug.cgi?id=131925
Reviewed by Darin Adler.
* Shared/API/Cocoa/WKRemoteObjectInterface.h: Removed.
* Shared/API/Cocoa/WKRemoteObjectInterface.mm: Removed.
* Shared/API/Cocoa/WKRemoteObjectRegistry.h: Removed.
* Shared/API/Cocoa/WKRemoteObjectRegistry.mm: Removed.
* UIProcess/API/Cocoa/WKProcessPool.mm:
* UIProcess/API/Cocoa/WKProcessPoolConfiguration.h: Removed.
* UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm: Removed.
* UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h: Removed.
* UIProcess/API/Cocoa/WKProcessPoolToBeRemoved.mm: Removed.
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Removed.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
2014-04-20 Dan Bernstein <mitz@apple.com>
[Cocoa] Crash when setting a bundle parameter to nil
https://bugs.webkit.org/show_bug.cgi?id=131917
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setObject:forBundleParameter:]): If the object is nil, use
-[NSMutableDictionary removeObjectForKey:] rather than -setObject:forKey:.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
(-[WKWebProcessBundleParameters setParameter:forKey:]): Ditto.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::setBundleParameter): Unrelatedly, create m_bundleParameters if
needed, as it may have not been created on intialization if no bundle parameters were set
at the time.
2014-04-20 Dan Bernstein <mitz@apple.com>
[Cocoa] Remove unused -webView:didFinishLoadingNavigation: delegate method
https://bugs.webkit.org/show_bug.cgi?id=131914
Reviewed by Sam Weinig.
* UIProcess/Cocoa/NavigationState.h: Removed flag from m_navigationDelegateMethods struct.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Removed check for whether the method is
implemented.
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame): Stopped calling the method
if implemented.
2014-04-19 Anders Carlsson <andersca@apple.com>
Plug-in process crashes if NP_Initialize returns an error the second time it's called
https://bugs.webkit.org/show_bug.cgi?id=131903
<rdar://problem/14355462>
Reviewed by Sam Weinig.
* Shared/Plugins/Netscape/NetscapePluginModule.cpp:
(WebKit::NetscapePluginModule::decrementLoadCount):
Don't try to unload the plug-in if it hasn't been initialized.
2014-04-19 Simon Fraser <simon.fraser@apple.com>
[UI-side compositing] Implement blend modes
https://bugs.webkit.org/show_bug.cgi?id=131891
<rdar://problem/16490085>
Reviewed by Tim Horton.
Implement blend modes with UI-side compositing.
PlatformCALayer::setBlendMode() becomes pure virtual, and overridden in
PlatformCALayerMac and PlatformCALayerRemote.
PlatformCAFilters::setBlendingFiltersOnLayer() now takes a raw platform
layer, so it can be called from the UI process on a CALayer*.
Add BlendMode to LayerProperties, and initialize, encode and decode it,
as well as adding dumping support for blend modes.
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer):
* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::RemoteLayerTreeTextStream::operator<<):
(WebKit::dumpChangedLayers):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::setBlendMode):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2014-04-19 Joseph Pecoraro <pecoraro@apple.com>
Fix leak of UIScreenEdgePanGestureRecognizer in WKSwipeTransitionController
https://bugs.webkit.org/show_bug.cgi?id=131877
Reviewed by Darin Adler.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(-[WKSwipeTransitionController gestureRecognizerForInteractiveTransition:WithTarget:action:]):
2014-04-19 Dan Bernstein <mitz@apple.com>
Don’t install a source file inside WebProcess.app.
* WebKit2.xcodeproj/project.pbxproj: Removed ViewUpdateDispatcher.messages.in from
WebProcess’s Copy Bundle Resources build phase.
2014-04-19 Darin Adler <darin@apple.com>
[Mac] WebView adjusts the cursor even when another window is in front
https://bugs.webkit.org/show_bug.cgi?id=131898
rdar://problem/14619911
Reviewed by Dan Bernstein.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setCursor:]): Deleted. Moved the code all into PageClientImpl, since none of it
interacts with anything special about a WKView.
* UIProcess/API/mac/WKViewInternal.h: Deleted the _setCursor: method.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::setCursor): Added a check that the window is under the cursor
and do nothing if it's not.
2014-04-19 Dan Bernstein <mitz@apple.com>
Use XPC services in the iOS Simulator, but not in Mountain Lion
https://bugs.webkit.org/show_bug.cgi?id=131894
Reviewed by Anders Carlsson.
* Configurations/NetworkService.Development.xcconfig: Defined INFOPLIST_FILE for the
Simulator.
* Configurations/NetworkService.xcconfig: Ditto.
* Configurations/WebContentService.Development.xcconfig: Ditto.
* Configurations/WebContentService.xcconfig: Ditto.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::systemDirectoryPath): Added this helper function that returns a slash-terminated
path to the System directory in the current runtime.
(WebKit::ProcessLauncher::launchProcess): Changed to use the above function to tell whether
a development version of WebKit2 is being used.
* WebKit2Prefix.h: Set WTF_USE_XPC_SERVICES to 1 when targeting the iOS Simulator, but not
when targeting Mountain Lion.
2014-04-19 Dan Bernstein <mitz@apple.com>
[Cocoa] Crash in -[WKWebProcessPlugInHitTestResult nodeHandle] when nodeHandle() is null
https://bugs.webkit.org/show_bug.cgi?id=131888
Reviewed by Jon Honeycutt.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInHitTestResult.mm:
(-[WKWebProcessPlugInHitTestResult nodeHandle]): Added a null check.
2014-04-19 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Fuzzy layers on sites using perspective and transforms
https://bugs.webkit.org/show_bug.cgi?id=131873
<rdar://problem/16540576>
Reviewed by Sam Weinig.
Always set rasterizationScale on CALayers in the UI process
(as we do for WK1) so that layers are rasterized taking the
device scale into account. We can do unconditionally; this
is benign on layers that CA doesn't rasterize.
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer):
2014-04-18 Simon Fraser <simon.fraser@apple.com>
Use 'override' in GraphicsLayerCA
https://bugs.webkit.org/show_bug.cgi?id=131882
Reviewed by Tim Horton.
Add an 'override'.
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2014-04-19 Darin Adler <darin@apple.com>
Assertion in WebPage::runModal accesses object after it may have been destroyed
https://bugs.webkit.org/show_bug.cgi?id=131875
Reviewed by Anders Carlsson.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::runModal): Ref the WebPage so it's still around so we can
check the m_isRunningModal flag.
2014-04-18 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r167527.
https://bugs.webkit.org/show_bug.cgi?id=131883
Broke 32-bit build (Requested by ap on #webkit).
Reverted changeset:
"[Mac] implement WebKitDataCue"
https://bugs.webkit.org/show_bug.cgi?id=131799
http://trac.webkit.org/changeset/167527
2014-04-18 Eric Carlson <eric.carlson@apple.com>
[Mac] implement WebKitDataCue
https://bugs.webkit.org/show_bug.cgi?id=131799
Reviewed by Dean Jackson.
* Configurations/FeatureDefines.xcconfig: Define ENABLE_DATACUE_VALUE.
2014-04-18 Anders Carlsson <andersca@apple.com>
Keep the WebPageProxy alive for the lifetime of all PageLoadState::Transaction objects
https://bugs.webkit.org/show_bug.cgi?id=131872
<rdar://problem/15758414>
Reviewed by Dan Bernstein.
* UIProcess/PageLoadState.cpp:
(WebKit::PageLoadState::PageLoadState):
(WebKit::PageLoadState::Transaction::Transaction):
(WebKit::PageLoadState::Transaction::~Transaction):
* UIProcess/PageLoadState.h:
(WebKit::PageLoadState::Transaction::Transaction): Deleted.
(WebKit::PageLoadState::Transaction::~Transaction): Deleted.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
2014-04-18 Stephanie Lewis <slewis@apple.com>
We shouldn’t create page throttlers for other pages than WebKit2 pages.
Part of <rdar://problem/16473045> Visibility state counters are often incorrect.
https://bugs.webkit.org/show_bug.cgi?id=131696
Reviewed by Gavin Barraclough.
Page throttlers were being created for SVG images and other page instances that
were not accurately tracking the states that enable and disable page throttling.
Make the throttler an unique ptr and only initialize it for WebKit2.
This also fixes an inefficiency where we would throttle a new page on creation because
we assumed it was visible even if that was not the case.
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: Check page throttler exists.
(WebKit::NPRuntimeObjectMap::evaluate):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize page throttler for WebKit2 views.
(WebKit::WebPage::mouseEvent): Check page throttler exists.
(WebKit::WebPage::wheelEvent): ditto
(WebKit::WebPage::keyEvent): ditto
2014-04-18 Anders Carlsson <andersca@apple.com>
Don't allow app sandboxed apps without the network client entitlement to launch the network process
https://bugs.webkit.org/show_bug.cgi?id=131868
<rdar://problem/12354188>
Reviewed by Dan Bernstein.
* NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm:
(WebKit::NetworkServiceInitializerDelegate::NetworkServiceInitializerDelegate):
Add a new delegate that implements checkEntitlements().
(NetworkServiceInitializer):
Pass the new delegate to XPCServiceInitializer.
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h:
* Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm:
Call checkEntitlements.
(WebKit::XPCServiceInitializerDelegate::checkEntitlements):
Return true.
(WebKit::XPCServiceInitializerDelegate::hasEntitlement):
Helper function that returns whether a client has the given entitlement.
(WebKit::XPCServiceInitializerDelegate::isClientSandboxed):
Helper function that checks whether the client is sandboxed.
2014-04-18 Alice Barraclough <alice.barraclough@webkit.org>
Find on page - extend API by providing highlighted match index
https://bugs.webkit.org/show_bug.cgi?id=131776
Reviewed by Tim Horton.
* Shared/WebFindOptions.h: Add an option for determining match index.
Plumb through the API layers the addition of a parameter for match index.
* UIProcess/API/APIFindClient.h:
(API::FindClient::didFindString):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageFindClient):
* UIProcess/API/Cocoa/WKWebView.mm:
(toFindOptions):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
(NS_OPTIONS):
* UIProcess/API/Cocoa/_WKFindDelegate.h:
* UIProcess/Cocoa/FindClient.h:
* UIProcess/Cocoa/FindClient.mm:
(WebKit::FindClient::setDelegate):
(WebKit::FindClient::didFindString):
* UIProcess/WebFindClient.cpp:
(WebKit::WebFindClient::didFindString):
* UIProcess/WebFindClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFindString):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
The actual tracking of the match index is contained in FindController class.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::FindController): Start out as -1, understood to be an undefined index in this context.
(WebKit::FindController::updateFindUIAfterPageScroll):
Perform the calculation of matchCount if the flag for DetermineMatchIndex is on.
If matchCount exceeds max, keep the match index undefined because otherwise the finding could advance
to a point where the index exceeds the match count, legitimately. If matchCount doesn't exceed the max, then make
sure the match index, which had been being incremented or decremented blindly back in findString(), is normalized
to be less than match count.
(WebKit::FindController::findString):
If there is a user selection existing on the page, the next occurence of the string will be found after that
selection. In that case we still want the index to properly reflect its ordinal position within the entire document.
Use findStringMatchingRanges to provide the match index, and set a flag that prevents the match index from being
blindly incremented or decremented later. After findString() is actually called on the page, increment or decrement
the find index under specific conditions.
(WebKit::FindController::hideFindIndicator): Reset match index when find UI goes away.
* WebProcess/WebPage/FindController.h: Add m_foundStringMatchIndex to private variables.
* WebProcess/WebPage/ios/FindControllerIOS.mm:
(WebKit::FindController::hideFindIndicator): Reset match index when find UI goes away.
2014-04-18 Joseph Pecoraro <pecoraro@apple.com>
Correct some issues small issues in WK2 file upload InjectedBundle APIs
https://bugs.webkit.org/show_bug.cgi?id=131852
Reviewed by Dan Bernstein.
* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h:
(API::InjectedBundle::PageUIClient::shouldGenerateFileForUpload):
The default return value, meaning no, should return the null string. The
result is checked later, and null string is a special value meaning no.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::generateFileForUpload):
Pre-check for the correct client function we will use.
2014-04-18 Andy Estes <aestes@apple.com>
[iOS] REGRESSION (r167039): WebKit incorrectly sets a background process assertion state when displaying a PDF
https://bugs.webkit.org/show_bug.cgi?id=131860
<rdar://problem/16631282>
Reviewed by Tim Horton.
We were basing our process assertion state on whether or not the
process had a WKContentView in a window, but when displaying a PDF
we've removed the WKContentView from the window. Base this decision
instead on whether or not the WKWebView is in the window.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView didMoveToWindow]):
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::isViewInWindow):
2014-04-18 Anders Carlsson <andersca@apple.com>
Address a couple of review comments
https://bugs.webkit.org/show_bug.cgi?id=131856
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/API/Cocoa/WKWebView.h:
2014-04-18 Anders Carlsson <andersca@apple.com>
Handle pluginOrigin being null
https://bugs.webkit.org/show_bug.cgi?id=131849
<rdar://problem/16655898>
Reviewed by Alexey Proskuryakov.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::shouldPlugInAutoStartFromOrigin):
2014-04-18 Dan Bernstein <mitz@apple.com>
[Cocoa] Add a navigation delegate method corresponding to didFinishDocumentLoadForFrame for the main frame
https://bugs.webkit.org/show_bug.cgi?id=131847
Reviewed by Anders Carlsson.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didFinishDocumentLoadForFrame): Added a navigationID parameter.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient): Updated for the above change in paramerers.
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h: Declared new delegate method.
* UIProcess/Cocoa/NavigationState.h: Declare override of didFinishDocumentLoadForFrame.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate): Initialize
webViewNavigationDidFinishDocumentLoad flag in the delegate methods struct.
(WebKit::NavigationState::LoaderClient::didFinishDocumentLoadForFrame): Added override
of the client function which calls the delegate.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::didFinishDocumentLoadForFrame): Get and pass the navigation ID to
the client.
* UIProcess/WebPageProxy.h: Added navigationID parameter.
* UIProcess/WebPageProxy.messages.in: Ditto.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDidFinishDocumentLoad): Get and send the navigation
ID to the UI process.
2014-04-18 Philippe Normand <pnormand@igalia.com>
Remove NETWORK_INFO support
https://bugs.webkit.org/show_bug.cgi?id=131841
Reviewed by Gyuyoung Kim.
* CMakeLists.txt:
* PlatformEfl.cmake:
* Shared/API/c/WKBase.h:
* Shared/APIObject.h:
* Shared/WebNetworkInfo.cpp: Removed.
* Shared/WebNetworkInfo.h: Removed.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKContext.cpp:
(WKContextGetNetworkInfoManager): Deleted.
* UIProcess/API/C/WKContext.h:
* UIProcess/API/C/WKNetworkInfo.cpp: Removed.
* UIProcess/API/C/WKNetworkInfo.h: Removed.
* UIProcess/API/C/WKNetworkInfoManager.cpp: Removed.
* UIProcess/API/C/WKNetworkInfoManager.h: Removed.
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::EwkContext):
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
* UIProcess/WebContext.h:
* UIProcess/WebNetworkInfoManagerProxy.cpp: Removed.
* UIProcess/WebNetworkInfoManagerProxy.h: Removed.
* UIProcess/WebNetworkInfoManagerProxy.messages.in: Removed.
* UIProcess/WebNetworkInfoProvider.cpp: Removed.
* UIProcess/WebNetworkInfoProvider.h: Removed.
* UIProcess/efl/NetworkInfoProvider.cpp: Removed.
* UIProcess/efl/NetworkInfoProvider.h: Removed.
* WebProcess/NetworkInfo/WebNetworkInfoManager.cpp: Removed.
* WebProcess/NetworkInfo/WebNetworkInfoManager.h: Removed.
* WebProcess/NetworkInfo/WebNetworkInfoManager.messages.in: Removed.
* WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp: Removed.
* WebProcess/WebCoreSupport/WebNetworkInfoClient.h: Removed.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
2014-04-17 Daniel Bates <dabates@apple.com>
[iOS] Hook up screen.{availHeight, availWidth, height, width}
https://bugs.webkit.org/show_bug.cgi?id=131821
<rdar://problem/16413795>
Reviewed by Benjamin Poulain and Tim Horton.
Implement WebKit2-specific support infrastructure.
Additionally substitute "screenSize" for "viewporScreenSize" to make the code more understandable.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode): Modified to encode the available screen size
creation parameter.
(WebKit::WebPageCreationParameters::decode): Modified to decode the available screen size
creation parameter.
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::creationParameters): Initialize the available screen size
parameter.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::screenSize): Renamed; formerly named viewportScreenSize.
(WebKit::WebPageProxy::availableScreenSize): Added.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::screenSize): Renamed; formerly named viewportScreenSize.
(WebKit::WebChromeClient::availableScreenSize): Added; turns around and calls WebPage::availableScreenSize().
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Hook up WebKit System Interface function WKGetAvailableScreenSize.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize available screen size instance variable.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::screenSize):
(WebKit::WebPage::availableScreenSize):
2014-04-17 Anders Carlsson <andersca@apple.com>
Remove unused API enums
https://bugs.webkit.org/show_bug.cgi?id=131836
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
2014-04-17 Brent Fulgham <bfulgham@apple.com>
Make RenderLayerBacking get the timingFunction of the correct animation.
https://bugs.webkit.org/show_bug.cgi?id=100632
Reviewed by Simon Fraser.
* Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp:
(IPC::ArgumentCoder<GraphicsLayerAnimation>::decode): Update for new signatures for
FloatAnimationValue, TransformAnimationValue, etc.
2014-04-17 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] support replacements for misspelled words.
https://bugs.webkit.org/show_bug.cgi?id=131827
<rdar://problem/16319657>
Reviewed by Benjamin Poulain.
This is the first part of the work to add support for replacements.
It handles _promptForReplace in canPerformAction to decide
whether to show the Replace button in the menu and add the
implementation of the replace action.
* Shared/EditorState.cpp:
(WebKit::EditorState::encode):
(WebKit::EditorState::decode):
* Shared/EditorState.h:
(WebKit::EditorState::EditorState):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView selectedText]):
(-[WKContentView replaceText:withText:]):
(-[WKContentView _promptForReplace:]):
(-[WKContentView replace:]):
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView selectWordForReplacement]): This is called
by UIKit when the user taps on a mispelled word to select it.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::replaceSelectedText):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::editorState):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture): Removed m_shouldReturnWordForSelection.
We now return always the word corresponding to the caret selection or
the selected text up to a maximum of 200 characters.
(WebKit::WebPage::extendSelection):
(WebKit::WebPage::replaceSelectedText):
2014-04-17 Tim Horton <timothy_horton@apple.com>
[iOS] REGRESSION (r166975): WKPDFView is broken
https://bugs.webkit.org/show_bug.cgi?id=131828
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
Bail from updating the scroll view parameters from the layer tree update
while it's being managed by a custom content view.
We'll get any changes again in the next commit after removing the custom
content view (and painting the new page) anyway, so this should be OK.
2014-04-17 Pratik Solanki <psolanki@apple.com>
_webProcessIdentifier should return 0 if the web process crashed
https://bugs.webkit.org/show_bug.cgi?id=131813
<rdar://problem/16650605>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _hasWebProcess]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-04-17 Darin Adler <darin@apple.com>
Remove use of deprecatedDeleteAllValues in NPRemoteObjectMap::pluginDestroyed
https://bugs.webkit.org/show_bug.cgi?id=122496
Reviewed by Brent Fulgham.
* Shared/Plugins/NPRemoteObjectMap.cpp:
(WebKit::NPRemoteObjectMap::pluginDestroyed): Use new-style code and write the
deprecatedDeleteAllValues function out using a loop. Might be nice to return here
and use unique_ptr instead some day, but I tried that before and got it wrong, so
lets do that another time.
2014-04-17 Darin Adler <darin@apple.com>
Add separate flag for IndexedDatabase in workers since the current implementation is not threadsafe
https://bugs.webkit.org/show_bug.cgi?id=131785
rdar://problem/16003108
Reviewed by Brady Eidson.
* Configurations/FeatureDefines.xcconfig: Added INDEXED_DATABASE_IN_WORKERS.
2014-04-17 Dan Bernstein <mitz@apple.com>
WebKit2 part of <rdar://problem/16601336> [Cocoa] _userInitiated is always NO in WKNavigationAction passed to -webView:createWebViewWithConfiguration:forNavigationAction:windowFeatures:
https://bugs.webkit.org/show_bug.cgi?id=131783
Reviewed by Tim Horton.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow): Set the isProcessingUserGesture field of
the NavigationActionData to the corresponding value in the NavigationAction.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction): Ditto.
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction): Ditto.
2014-04-16 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Fix the DidCommitLoad initial scrolling position
https://bugs.webkit.org/show_bug.cgi?id=131780
Reviewed by Jon Honeycutt.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:]):
That code is older than _obscuredInsets and used the contentInsets as a workaround.
2014-04-16 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Fix annoying scrolling bugs
https://bugs.webkit.org/show_bug.cgi?id=131722
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollToContentOffset:WebCore::]):
We are scrolling at the wrong position when we have the "small obscured insets".
2014-04-16 Gavin Barraclough <baraclough@apple.com>
On iOS keep network process running using a process assertion rather than a boost
https://bugs.webkit.org/show_bug.cgi?id=131779
Reviewed by Benjamin Poulain.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
- No need to leak a boost onto the NetworkProcess on iOS.
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::didFinishLaunching):
- Take a ProcessAssertion on the NetworkProcess.
* UIProcess/Shared/ChildProcessProxy.h:
- Added m_assertion.
* UIProcess/WebProcessProxy.h:
- Removed m_assertion.
* UIProcess/ios/ProcessAssertion.h: Added.
- Added - refactored from WebProcessProxy.h.
* UIProcess/ios/ProcessAssertion.mm: Added.
(WebKit::ProcessAssertion::ProcessAssertion):
(WebKit::ProcessAssertion::setState):
- Added - refactored from WebProcessProxyIOS.mm.
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::updateProcessState):
- Code refactored out to ProcessAssertion.mm.
* WebKit2.xcodeproj/project.pbxproj:
- Added files.
2014-04-16 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Improve the approximation of the scroll position of the dynamic viewport size updates
https://bugs.webkit.org/show_bug.cgi?id=131720
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollToContentOffset:]):
The scrolling tree was forcing scroll at the wrong scale during the transition.
(-[WKWebView _setMinimumLayoutSizeOverride:]):
This was left out by accident. The WebProcess was getting the new layout size twice, making
WebPage::dynamicViewportSizeUpdate() very confused when the content size changes.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
Add scrolling adjustment for the dynamic relayout case:
-Sticky top and bottom like the UIProcess.
-Keep the same relative position of the unobscured rect's center.
Also fix a bug in the horizontal and vertical adjustments: the code was using the exposed rect
instead of the unobscured rect, which made the adjustments off by the size of the obscured insets.
The type is changed from double to float since ARMv7 has a grudge against double.
2014-04-16 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Do not update the visible content rects when setting the same obscured insets multiple times
https://bugs.webkit.org/show_bug.cgi?id=131633
Reviewed by Darin Adler.
We should avoid computing the visible content rects when not needed.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setObscuredInsets:]):
2014-04-16 Zan Dobersek <zdobersek@igalia.com>
Make IPC::Arguments a variadic template
https://bugs.webkit.org/show_bug.cgi?id=131684
Reviewed by Darin Adler.
Make IPC::Arguments a variadic template that uses the template parameter pack to further
define the std::tuple ValueType and is used to define the std::tuple container of the
values passed into the container.
* Platform/IPC/Arguments.h:
(IPC::Arguments::Arguments):
(IPC::Arguments::encode):
(IPC::Arguments::decode):
(IPC::Arguments0::encode): Deleted.
(IPC::Arguments0::decode): Deleted.
(IPC::Arguments1::Arguments1): Deleted.
(IPC::Arguments1::encode): Deleted.
(IPC::Arguments1::decode): Deleted.
(IPC::Arguments2::Arguments2): Deleted.
(IPC::Arguments2::encode): Deleted.
(IPC::Arguments2::decode): Deleted.
(IPC::Arguments3::Arguments3): Deleted.
(IPC::Arguments3::encode): Deleted.
(IPC::Arguments3::decode): Deleted.
(IPC::Arguments4::Arguments4): Deleted.
(IPC::Arguments4::encode): Deleted.
(IPC::Arguments4::decode): Deleted.
(IPC::Arguments5::Arguments5): Deleted.
(IPC::Arguments5::encode): Deleted.
(IPC::Arguments5::decode): Deleted.
(IPC::Arguments6::Arguments6): Deleted.
(IPC::Arguments6::encode): Deleted.
(IPC::Arguments6::decode): Deleted.
(IPC::Arguments7::Arguments7): Deleted.
(IPC::Arguments7::encode): Deleted.
(IPC::Arguments7::decode): Deleted.
(IPC::Arguments8::Arguments8): Deleted.
(IPC::Arguments8::encode): Deleted.
(IPC::Arguments8::decode): Deleted.
(IPC::Arguments10::Arguments10): Deleted.
(IPC::Arguments10::encode): Deleted.
(IPC::Arguments10::decode): Deleted.
* Scripts/webkit2/LegacyMessages-expected.h:
* Scripts/webkit2/Messages-expected.h:
* Scripts/webkit2/messages.py: Clean up the code a bit.
(reply_parameter_type):
(arguments_type):
(reply_type):
(decode_type):
(arguments_type_old): Deleted.
(base_class): Deleted.
(delayed_reply_type): Deleted.
2014-04-16 Tim Horton <timothy_horton@apple.com>
Deduplicate LayerTreeContext
https://bugs.webkit.org/show_bug.cgi?id=131773
Reviewed by Simon Fraser.
There are three identical implementations, one for each platform, for no reason.
* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake:
* Shared/LayerTreeContext.cpp: Renamed from Source/WebKit2/Shared/mac/LayerTreeContextMac.mm.
(WebKit::LayerTreeContext::LayerTreeContext):
(WebKit::LayerTreeContext::~LayerTreeContext):
(WebKit::LayerTreeContext::encode):
(WebKit::LayerTreeContext::decode):
(WebKit::LayerTreeContext::isEmpty):
(WebKit::operator==):
* Shared/LayerTreeContext.h:
(WebKit::operator!=): Deleted.
* Shared/efl/LayerTreeContextEfl.cpp: Removed.
* Shared/gtk/LayerTreeContextGtk.cpp: Removed.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
2014-04-16 Tim Horton <timothy_horton@apple.com>
Don't build LayerTreeHost on Mac (and clean it up)
https://bugs.webkit.org/show_bug.cgi?id=131769
Reviewed by Simon Fraser.
* WebKit2.xcodeproj/project.pbxproj:
Don't include it in the project.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::updatePreferences):
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::updatePreferences):
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::setLayerHostingMode): Deleted.
(WebKit::LayerTreeHost::supportsAcceleratedCompositing): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/ios/WebPageIOS.mm:
Get rid of LayerTreeHost::supportsAcceleratedCompositing, which always returns true everywhere.
Remove some LayerTreeHost.h includes.
Remove LayerTreeHost::setLayerHostingMode, which is PLATFORM(COCOA) and not needed.
2014-04-16 Simon Fraser <simon.fraser@apple.com>
Failing to decode a layer tree commit message resulted in silent and mysterious failure
https://bugs.webkit.org/show_bug.cgi?id=131766
<rdar://problem/16520894>
Reviewed by Sam Weinig.
If the message decode failed, we should have already marked the message as invalid.
Failing to do so indicates in a decode code coding error.
* Platform/IPC/HandleMessage.h:
(IPC::handleMessage):
(IPC::handleMessageVariadic):
(IPC::handleMessageDelayed):
2014-04-16 Tim Horton <timothy_horton@apple.com>
Minor include sanity in WebPage.h
https://bugs.webkit.org/show_bug.cgi?id=131752
Reviewed by Simon Fraser.
* WebProcess/WebPage/WebPage.h:
Remove a bunch of unnecessary includes.
Un-indent some stuff.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebPage/FindController.cpp:
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/mac/WebPageMac.mm:
Add back more specific includes, into implementation files.
* WebProcess/WebPage/WebUndoStep.cpp:
(WebKit::WebUndoStep::~WebUndoStep):
* WebProcess/WebPage/WebUndoStep.h:
Add an out-of-line destructor.
2014-04-16 Gavin Barraclough <baraclough@apple.com>
REGRESSION: PCE.js is 20x slower in WebKit2 because timers are throttled
https://bugs.webkit.org/show_bug.cgi?id=131189
Unreviewed rollout of r166754
This change is no longer necessary.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
2014-04-16 Alexey Proskuryakov <ap@apple.com>
Updating tests after bug 131721, [GTK] Fix unused parameter warnings.
* Scripts/webkit2/LegacyMessageReceiver-expected.cpp:
(WebKit::WebPage::didReceiveWebPageMessage):
(WebKit::WebPage::didReceiveSyncWebPageMessage):
* Scripts/webkit2/MessageReceiver-expected.cpp:
(WebKit::WebPage::didReceiveMessage):
(WebKit::WebPage::didReceiveSyncMessage):
2014-04-16 Brendan Long <b.long@cablelabs.com>
[GTK] Fix unused parameter warnings
https://bugs.webkit.org/show_bug.cgi?id=131721
Reviewed by Darin Adler.
* Scripts/webkit2/messages.py:
(generate_message_handler): Add UNUSED_PARAM() for a couple parameters which aren't always used.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<LinearTimingFunction>::decode): Remove unused parameters.
* WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
(API::InjectedBundle::FormClient::textDidChangeInTextField): Same.
(API::InjectedBundle::FormClient::willSubmitForm): Same.
(API::InjectedBundle::FormClient::willSendSubmitEvent): Same.
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didReceiveSyncMessage): Same.
2014-04-16 Tim Horton <timothy_horton@apple.com>
Accidentally included some style-checker-testing changes in the last commit.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::attemptToUnlockPDF):
(WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
2014-04-16 Tim Horton <timothy_horton@apple.com>
Fix some style checker complaints in PDFPlugin
https://bugs.webkit.org/show_bug.cgi?id=131706
Reviewed by Darin Adler.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:]):
(-[WKPDFPluginAccessibilityObject accessibilityAttributeValue:forParameter:]):
(-[WKPDFPluginAccessibilityObject accessibilityAttributeNames]):
(WebKit::PDFPlugin::attemptToUnlockPDF):
(WebKit::PDFPlugin::updatePageAndDeviceScaleFactors):
(WebKit::PDFPlugin::isEditingCommandEnabled):
(WebKit::PDFPlugin::nextMatchForString):
(WebKit::PDFPlugin::handleWheelEvent):
(WebKit::PDFPlugin::liveData):
2014-04-15 Dan Bernstein <mitz@apple.com>
[Cocoa] Add a form delegate method corresponding to willSubmitForm
https://bugs.webkit.org/show_bug.cgi?id=131718
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setFormDelegate:]): Changed to define and create a FormClient (which derives
from API::FormClient and messages a delegate), and set it as the form client.
* UIProcess/API/Cocoa/_WKFormDelegate.h: Declared new delegate method.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added a
variant of willSubmitForm that returs a user object to pass to the delegate in the UI
process, giving it a temporary name with “new”.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Changed willSubmitForm()
to check for the new bundle delegate method first and encode the user object as user data.
Moved the encoding of an NSObject <NSSecureCoding> as user data into a helper function.
2014-04-15 Hyowon Kim <hw1008.kim@samsung.com>
Make page overlay functionality working on coordinated graphics.
https://bugs.webkit.org/show_bug.cgi?id=131425
Reviewed by Darin Adler.
Page overlay functionality did not work on coordinated graphics since r166975.
This patch removes deprecated code related to the PageOverlay GraphicsLayer management.
and makes CoordinatedLayerTreeHost use PageOverlayController.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::mainFrameContentSizeChanged):
(WebKit::CoordinatedDrawingArea::didInstallPageOverlay): Deleted.
(WebKit::CoordinatedDrawingArea::didUninstallPageOverlay): Deleted.
(WebKit::CoordinatedDrawingArea::setPageOverlayNeedsDisplay): Deleted.
(WebKit::CoordinatedDrawingArea::setPageOverlayOpacity): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.h:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer):
(WebKit::CoordinatedLayerTreeHost::didFlushRootLayer):
(WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged):
(WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay): Deleted.
(WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): Deleted.
(WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): Deleted.
(WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): Deleted.
(WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer): Deleted.
(WebKit::CoordinatedLayerTreeHost::destroyPageOverlayLayer): Deleted.
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
* WebProcess/WebPage/LayerTreeHost.h:
(WebKit::LayerTreeHost::didInstallPageOverlay):
(WebKit::LayerTreeHost::didUninstallPageOverlay):
(WebKit::LayerTreeHost::setPageOverlayNeedsDisplay):
2014-04-15 Dan Bernstein <mitz@apple.com>
Introduce API::FormClient
https://bugs.webkit.org/show_bug.cgi?id=131714
Reviewed by Tim Horton.
* UIProcess/API/APIFormClient.h: Added.
(API::FormClient::~FormClient):
(API::FormClient::willSubmitForm):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageFormClient): Changed to create a WebFormClient and call
WebPageProxy::setFormClient.
* UIProcess/WebFormClient.cpp:
(WebKit::WebFormClient::WebFormClient): Added a constructor from WKPageFormClientBase.
* UIProcess/WebFormClient.h: Added inheritance from API::FormClient, marked overrides as
such.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy): Initialize m_formClient member.
(WebKit::WebPageProxy::setFormClient): Added. Updates m_formClient.
(WebKit::WebPageProxy::close): Updated code to clear m_formClient.
(WebKit::WebPageProxy::willSubmitForm): Updated for type change.
(WebKit::WebPageProxy::initializeFormClient): Deleted.
* UIProcess/WebPageProxy.h:
* WebKit2.xcodeproj/project.pbxproj: Added reference to new file.
2014-04-15 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Pages often blank on first load if page loaded by typing the URL
https://bugs.webkit.org/show_bug.cgi?id=131665
Reviewed by Tim Horton.
The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
was triggering a compositing layer flush when called with a null rootLayer, which happens
for pages going into the page cache. This would trigger a layer flush that would clobber
the root layer for the visible page, resulting in missing content.
Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
was being added to (and then removed from) every single compositing layers.
Fix both these by changing to a pull model, where RenderLayerCompositor requests
the overlay layer via ChromeClient, and gets it at the end of every flush,
adding to the children of the root layer.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::documentOverlayLayerForFrame):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
2014-04-15 Jinwoo Song <jinwoo7.song@samsung.com>
[EFL][WK2] Pass Mouse movement data to WebMouseEvent
https://bugs.webkit.org/show_bug.cgi?id=131663
Reviewed by Gyuyoung Kim.
Currently mouse movement data are not passed to WebMouseEvent. Instead, they are set to 0 as default.
EFL port needs to send the deltaX and deltaY for PointerLock API which will be implemented later.
* Shared/efl/WebEventFactory.cpp:
(WebKit::WebEventFactory::createWebMouseEvent):
2014-04-15 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r167298.
https://bugs.webkit.org/show_bug.cgi?id=131670
Broke CSS filters (17 test crashes) (Requested by ap on
#webkit).
Reverted changeset:
"[iOS WK2] Pages often blank on first load if page loaded by
typing the URL"
https://bugs.webkit.org/show_bug.cgi?id=131665
http://trac.webkit.org/changeset/167298
2014-04-14 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Pages often blank on first load if page loaded by typing the URL
https://bugs.webkit.org/show_bug.cgi?id=131665
Reviewed by Tim Horton.
The document overlay-related code in RemoteLayerTreeDrawingArea::setRootCompositingLayer()
was triggering a compositing layer flush when called with a null rootLayer, which happens
for pages going into the page cache. This would trigger a layer flush that would clobber
the root layer for the visible page, resulting in missing content.
Also, rebuildCompositingLayerTree() is called recursively and the m_documentOverlayRootLayer
was being added to (and then removed from) every single compositing layers.
Fix both these by changing to a pull model, where RenderLayerCompositor requests
the overlay layer via ChromeClient, and gets it at the end of every flush,
adding to the children of the root layer.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::documentOverlayLayerForFrame):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
2014-04-14 Tim Horton <timothy_horton@apple.com>
Fix the 32-bit build.
* UIProcess/mac/ViewGestureControllerMac.mm:
2014-04-14 Simon Fraser <simon.fraser@apple.com>
REGRESSION (WebKit2): Programmatic scrolls in overflow-scrolling:touch don't work
https://bugs.webkit.org/show_bug.cgi?id=131649
Reviewed by Tim Horton.
Update the UIScrollView's contentOffset when we're told that the scroll position
changed.
Also refactor slightly to have a single exception-protected block.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
2014-04-14 Tim Horton <timothy_horton@apple.com>
Fix the 32-bit build.
* UIProcess/mac/ViewGestureControllerMac.mm:
2014-04-14 Tim Horton <timothy_horton@apple.com>
Sometimes-crash under handleSwipeGesture after closing a window or quitting
https://bugs.webkit.org/show_bug.cgi?id=131648
<rdar://problem/15966106>
Reviewed by Simon Fraser.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::~ViewGestureController):
(WebKit::ViewGestureController::trackSwipeGesture):
Keep a Objective C object with a single boolean property, isCancelled, on
the ViewGestureController, and also retained by the swipe-tracking block.
When the ViewGestureController is destroyed, we set isCancelled to YES,
and the next time the block is invoked, we will cancel the swipe without
touching the destroyed ViewGestureController.
(WebKit::ViewGestureController::handleSwipeGesture):
Don't try to handle a swipe gesture if the drawing area is missing.
(WebKit::ViewGestureController::endSwipeGesture):
Clear the swipe cancellation tracker when the gesture completes.
2014-04-14 Enrica Casucci <enrica@apple.com>
REGRESSION(r166027) Menu is shown and immediately hidden after doubletap gesture.
https://bugs.webkit.org/show_bug.cgi?id=131646
<rdar://problem/16614374>
Reviewed by Benjamin Poulain.
This is a problem with every gesture that changes the selection
We don't need to delay updating the selection if the selection is
being changed with a gesture.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _didUpdateBlockSelectionWithTouch:withFlags:growThreshold:shrinkThreshold:]):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
(-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
(-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
(-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
(-[WKContentView _selectionChanged]):
2014-04-14 Dan Bernstein <mitz@apple.com>
Let the bundle form client know whether a change in a text field was initiated by user typing
https://bugs.webkit.org/show_bug.cgi?id=131643
Reviewed by Sam Weinig.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added
initiatedByUserTyping parameter to the delegate method.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Updated overload of
textDidChangeInTextField to take the initiatedByUserTyping parameter and pass it along to
the delegate.
* WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
(API::InjectedBundle::FormClient::textDidChangeInTextField): Added initiatedByUserTyping
parameter.
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
(WebKit::InjectedBundlePageFormClient::textDidChangeInTextField): Maintained the existing
behavior of not calling the C SPI client if the change was not initiated by user typing.
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: Updated for added parameter.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::textDidChangeInTextField): Changed to call the bundle client
function unconditionally, but pass along whether the change was initiated by user typing.
2014-04-14 Dan Bernstein <mitz@apple.com>
[Cocoa] Add a WKWebProcessPlugInFormDelegate method corresponding to willSendSubmitEvent
https://bugs.webkit.org/show_bug.cgi?id=131639
Reviewed by Tim Horton.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared
new delegate method.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added an override
of API::InjectedBundle::FormClient::willSendSubmitEvent which calls the new delegate
method.
2014-04-14 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Change the SPI used when starting the rotation animation
https://bugs.webkit.org/show_bug.cgi?id=131638
Reviewed by Tim Horton.
Having an update block where all the properties are changed is more convenient for Safari.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _beginAnimatedResizeWithUpdates:]):
(-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-04-14 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Hash table assertion closing a tab
https://bugs.webkit.org/show_bug.cgi?id=131640
Reviewed by Tim Horton.
Have RemoteLayerTreeContext keep track of all PlatformCALayerRemotes,
and clear their context pointer when it is being destroyed to avoid
calling into a deleted object later.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::~PlatformCALayerRemote):
(WebKit::PlatformCALayerRemote::addAnimationForKey):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
(WebKit::PlatformCALayerRemote::clearContext):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::~RemoteLayerTreeContext):
(WebKit::RemoteLayerTreeContext::layerWasCreated):
(WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
2014-04-14 Tim Horton <timothy_horton@apple.com>
Allow dynamic changes of WKThumbnailView snapshot scale
https://bugs.webkit.org/show_bug.cgi?id=131628
<rdar://problem/16584156>
Reviewed by Beth Dakin.
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView _requestSnapshotIfNeeded]):
Don't bail from requesting a snapshot just because we already had one; we want to resnapshot.
Keep track of when we bail from requesting a snapshot because we have one in-flight, so we can request it later.
(-[_WKThumbnailView _didTakeSnapshot:]):
Apply the scale to the bitmap size (whoops!).
Make CA always resize the content to fill the thumbnail view's layer, respecting aspect ratio.
Re-snapshot if we previously deferred a snapshot.
(-[_WKThumbnailView setScale:]):
If we get a scale change, request a new snapshot.
(-[_WKThumbnailView setUsesSnapshot:]):
Never apply thumbnail scale to the page if we're using snapshots. It's unnecessary,
because scale will be applied simply when painting the software snapshot.
Apply the thumbnail scale if we're going from usesSnapshot -> !usesSnapshot.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::snapshotAtSize):
Snapshots should use the greater of the two scales, so as to never leave a portion of the snapshot unpainted.
2014-04-14 Tim Horton <timothy_horton@apple.com>
REGRESSION (WebKit2 View Gestures): Double-tap doesn't work properly when there's no element underneath the cursor
https://bugs.webkit.org/show_bug.cgi?id=131629
<rdar://problem/16192821>
Reviewed by Dan Bernstein.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
If there's nothing under the cursor, zoom towards the cursor instead of towards 0,0.
2014-04-14 Simon Fraser <simon.fraser@apple.com>
Run filter animations in the UI process with UI-side compositing
https://bugs.webkit.org/show_bug.cgi?id=131199
<rdar://problem/16479487>
Reviewed by Sam Weinig.
* Shared/WebCoreArgumentCoders.cpp: Removed lots of WebCore::
(IPC::ArgumentCoder<SelectionRect>::decode):
(IPC::ArgumentCoder<PasteboardWebContent>::encode):
(IPC::ArgumentCoder<PasteboardWebContent>::decode):
(IPC::ArgumentCoder<PasteboardImage>::encode):
(IPC::ArgumentCoder<PasteboardImage>::decode):
(IPC::ArgumentCoder<URL>::decode):
(IPC::ArgumentCoder<UserStyleSheet>::encode):
(IPC::ArgumentCoder<UserStyleSheet>::decode):
(IPC::ArgumentCoder<UserScript>::encode):
(IPC::ArgumentCoder<UserScript>::decode):
(IPC::ArgumentCoder<ScrollableAreaParameters>::encode):
(IPC::ArgumentCoder<ScrollableAreaParameters>::decode):
(IPC::ArgumentCoder<FixedPositionViewportConstraints>::encode):
(IPC::ArgumentCoder<FixedPositionViewportConstraints>::decode):
(IPC::ArgumentCoder<StickyPositionViewportConstraints>::encode):
(IPC::ArgumentCoder<StickyPositionViewportConstraints>::decode):
(IPC::ArgumentCoder<FilterOperation>::encode):
(IPC::decodeFilterOperation):
(IPC::ArgumentCoder<FilterOperations>::encode):
(IPC::ArgumentCoder<WebCore::UserStyleSheet>::encode): Deleted.
(IPC::ArgumentCoder<WebCore::UserStyleSheet>::decode): Deleted.
(IPC::ArgumentCoder<WebCore::UserScript>::encode): Deleted.
(IPC::ArgumentCoder<WebCore::UserScript>::decode): Deleted.
(IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::encode): Deleted.
(IPC::ArgumentCoder<WebCore::ScrollableAreaParameters>::decode): Deleted.
(IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::encode): Deleted.
(IPC::ArgumentCoder<WebCore::FixedPositionViewportConstraints>::decode): Deleted.
(IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::encode): Deleted.
(IPC::ArgumentCoder<WebCore::StickyPositionViewportConstraints>::decode): Deleted.
(IPC::encodeFilterOperation): Deleted.
Add encoding/decoding support for FilterOperation.
decodeFilterOperation() has to be a bare function because of the RefPtr
out parameter.
REFERENCE filters should never be encoded, since they have CachedSVGDocumentReferences.
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
Add logging for filter animations to the RemoteLayerTree log output.
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
(WebKit::GraphicsLayerCARemote::addAnimation): Deleted. We can run
filter animations now.
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h:
KeyValues have a RefPtr<WebCore::FilterOperation> now (which can't be part of
the union because we need its constructor to get called).
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm:
(WebKit::PlatformCAAnimationRemote::KeyframeValue::encode): Encode the filter.
(WebKit::PlatformCAAnimationRemote::KeyframeValue::decode): Decode the filter.
(WebKit::PlatformCAAnimationRemote::setFromValue): Implement.
(WebKit::PlatformCAAnimationRemote::setToValue): Implement.
(WebKit::PlatformCAAnimationRemote::setValues): Implement.
(WebKit::animationValueFromKeyframeValue): Handle filters.
2014-04-14 Simon Fraser <simon.fraser@apple.com>
Fix the build.
* UIProcess/mac/PageClientImpl.h:
2014-04-14 Simon Fraser <simon.fraser@apple.com>
[WK2 iOS] Scrolling to anchor links is broken
https://bugs.webkit.org/show_bug.cgi?id=131618
<rdar://problem/16599144>
Reviewed by Tim Horton.
The RemoteScrollingTree implements scrollingTreeNodeRequestsScroll
to get informed about requested scroll position updates, and passes
them along via the RemoteScrollingCoordinatorProxy, WebPageProxy and PageClient
to the WKWebView, which performs a scroll.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _scrollToContentOffset:WebCore::]): Scroll to content offset,
taking page scale and insets into account.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::requestScroll):
* UIProcess/CoordinatedGraphics/WebView.h:
* UIProcess/PageClient.h:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeRequestsScroll):
Pass scrolls along to the WebPageProxy for the root node. We will also need
to handle programmatic scrolls for overflow soon.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::scrollingTreeNodeRequestsScroll):
* UIProcess/Scrolling/RemoteScrollingTree.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::requestScroll):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::canScrollView):
(WebKit::PageClientImpl::requestScroll):
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::requestScroll):
2014-04-12 Antti Koivisto <antti@apple.com>
Keep secondary tile grid for zoomed-out scale
https://bugs.webkit.org/show_bug.cgi?id=131586
Reviewed by Darin Adler.
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
(WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
(WebKit::PlatformCALayerRemoteTiledBacking::customSublayers):
Always request new sublayer list from tile controller.
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2014-04-14 Tim Horton <timothy_horton@apple.com>
Make WK(Web)View magnification setters actually use view-relative positions
https://bugs.webkit.org/show_bug.cgi?id=131611
<rdar://problem/15965239>
Reviewed by Darin Adler.
* UIProcess/API/mac/WKView.mm:
(-[WKView setMagnification:centeredAtPoint:]):
(-[WKView setMagnification:]):
Use scalePageInViewCoordinates instead.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::scalePageInViewCoordinates):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scalePageInViewCoordinates):
(WebKit::WebPage::pageScaleFactor):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Add scalePageInViewCoordinates, which turns the scale centerpoint within the view
into what scalePage expects: a post-scale scroll offset.
2014-04-14 Tim Horton <timothy_horton@apple.com>
Support setting a background color on page overlays
https://bugs.webkit.org/show_bug.cgi?id=131600
Reviewed by Darin Adler.
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::PageOverlay):
(WebKit::PageOverlay::bounds):
(WebKit::PageOverlay::startFadeInAnimation):
(WebKit::PageOverlay::startFadeOutAnimation):
(WebKit::PageOverlay::startFadeAnimation):
(WebKit::PageOverlay::fadeAnimationTimerFired):
Minor style adjustments.
Use more references everywhere.
(WebKit::PageOverlay::setBackgroundColor):
(WebKit::PageOverlay::setNeedsDisplay):
* WebProcess/WebPage/PageOverlay.h:
(WebKit::PageOverlay::backgroundColor):
Keep track of our background color, and push it down to the page overlay controller if we have one.
* WebProcess/WebPage/PageOverlayController.cpp:
(WebKit::updateOverlayGeometry):
(WebKit::PageOverlayController::clearPageOverlay):
Page overlays will always have the right size, and just use drawsContents to determine
whether or not they should tile/have backing store/etc.
(WebKit::PageOverlayController::installPageOverlay):
(WebKit::PageOverlayController::didChangeOverlayBackgroundColor):
Set the background color of the layer.
* WebProcess/WebPage/PageOverlayController.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
References!
2014-04-13 Andy Estes <aestes@apple.com>
[QuickLook] Move file system-related code into WebKit
https://bugs.webkit.org/show_bug.cgi?id=131597
Reviewed by Dan Bernstein.
* WebProcess/Network/WebResourceLoader.h: Made m_quickLookHandle a unique_ptr.
* WebProcess/ios/WebResourceLoaderIOS.mm:
(WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
2014-04-13 Andy Estes <aestes@apple.com>
REGRESSION (r167164): -[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:] _block_invoke can access a deallocated completionHandler
https://bugs.webkit.org/show_bug.cgi?id=131595
Reviewed by Dan Bernstein.
Make a copy of completionHandler and release it after we're done with it.
* Shared/mac/CookieStorageShim.mm:
(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2014-04-13 Pratik Solanki <psolanki@apple.com>
Don't use ImportanceAssertion on iOS
https://bugs.webkit.org/show_bug.cgi?id=131481
<rdar://problem/16575830>
Reviewed by Darin Adler.
We have other API to mark processes as being in use on iOS. No need to use ImportanceAssertion.
* Platform/IPC/MessageDecoder.cpp:
* Platform/IPC/MessageDecoder.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::receiveSourceEventHandler):
* Platform/IPC/mac/ImportanceAssertion.h:
2014-04-13 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r167168 and r167194.
https://bugs.webkit.org/show_bug.cgi?id=131589
Caused massive ASSERTION failures on the GTK Debug bot
(Requested by philn on #webkit).
Reverted changesets:
"[GTK] Add HighDPI support for non-accelerated compositing
contents"
https://bugs.webkit.org/show_bug.cgi?id=131562
http://trac.webkit.org/changeset/167168
"Unreviewed. Fix GTK+ build with recent cairo and GTK+ after
r167168."
http://trac.webkit.org/changeset/167194
2014-04-13 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build with recent cairo and GTK+ after r167168.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseCreateWebPage):
2014-04-12 Andy Estes <aestes@apple.com>
[iOS] Move QuickLookHandle from ResourceLoader to WebResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=131580
Reviewed by Darin Adler.
There's no need to bloat WebKit1's ResourceLoader with a pointer that
only WebKit2's WebResourceLoader cares about.
* WebProcess/Network/WebResourceLoader.cpp:
(WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo):
(WebKit::WebResourceLoader::didReceiveData):
(WebKit::WebResourceLoader::didFinishResourceLoad):
(WebKit::WebResourceLoader::didFailResourceLoad):
* WebProcess/Network/WebResourceLoader.h:
* WebProcess/ios/WebResourceLoaderIOS.mm:
(WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
2014-04-11 Alexey Proskuryakov <ap@apple.com>
[Mac] Crashes when copying or pasting huge images
https://bugs.webkit.org/show_bug.cgi?id=131576
<rdar://problem/12131833>
<rdar://problem/14427398>
Reviewed by Darin Adler.
Added a few null checks for SharedMemory::create() return value in pasteboard code.
Error handling feels a bit sketchy, but
- I'm not sure what it should look like ideally;
- it matches the kind of error handling we already have in these functions;
- it appears to work reasonably well in practice. We get empty content, which
is not nice, but not particularly problematic either. When copying an animated GIF,
we also get the GIF in RTFD flavor, so even pasting into NSTextViews works!
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::createFromVMBuffer):
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::getPasteboardBufferForType):
(WebKit::WebContext::readBufferFromPasteboard):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::setBufferForType):
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::declareAndWriteDragImage):
Also renamed some variables to prevent name collisions with with nested scope.
2014-04-11 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed build fix on the EFL port after r167152
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::bounds):
2014-04-11 Hyowon Kim <hw1008.kim@samsung.com>
[WK2] WebProcess crashes, when closing window after opening page by means of context menu
https://bugs.webkit.org/show_bug.cgi?id=131439
Reviewed by Tim Horton.
CoordinatedGraphicsLayer calls notifyFlushRequired() through its client when destroyed.
When PageOverlayController::notifyFlushRequired() is called, the DrawingArea could be null
because it's destoryed in WebPage::close().
* WebProcess/WebPage/PageOverlayController.cpp:
(WebKit::PageOverlayController::notifyFlushRequired): Add null check of m_webPage->drawingArea().
2014-04-11 Tim Horton <timothy_horton@apple.com>
Lots of compositing test failures after r167152
https://bugs.webkit.org/show_bug.cgi?id=131574
Reviewed by Simon Fraser.
* WebProcess/WebPage/PageOverlayController.h:
Skip page overlay layers in layer tree dumps, for consistency between platforms.
2014-04-11 Beth Dakin <bdakin@apple.com>
Need WK2 API to disable rubber-banding
https://bugs.webkit.org/show_bug.cgi?id=131567
Reviewed by Simon Fraser.
New API allows the client to enable/disable horizontal or vertical rubber-banding.
By default, rubber-banding is enabled.
* UIProcess/API/C/WKPage.cpp:
(WKPageVerticalRubberBandingIsEnabled):
(WKPageSetEnableVerticalRubberBanding):
(WKPageHorizontalRubberBandingIsEnabled):
(WKPageSetEnableHorizontalRubberBanding):
* UIProcess/API/C/WKPage.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setEnableVerticalRubberBanding):
(WebKit::WebPageProxy::verticalRubberBandingIsEnabled):
(WebKit::WebPageProxy::setEnableHorizontalRubberBanding):
(WebKit::WebPageProxy::horizontalRubberBandingIsEnabled):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setEnableVerticalRubberBanding):
(WebKit::WebPage::setEnableHorizontalRubberBanding):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2014-04-11 Tim Horton <timothy_horton@apple.com>
Fix the Mac build.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindIndicator):
2014-04-11 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Find-in-page indicator
https://bugs.webkit.org/show_bug.cgi?id=131510
<rdar://problem/16547777>
Reviewed by Simon Fraser and Enrica Casucci.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
WebKit2 will clear the selection if we reveal it while not enabling selection painting.
So, avoid revealing it.
(WebKit::FindController::findString):
(WebKit::FindController::hideFindIndicator):
(WebKit::FindController::willFindString):
(WebKit::FindController::didFailToFindString):
(WebKit::FindController::didHideFindIndicator):
#if out the cross-platform find indicator code on iOS; it will be replaced
by the code in FindControllerIOS.
* WebProcess/WebPage/FindController.h:
* WebProcess/WebPage/ios/FindControllerIOS.mm: Added.
(highlightColor):
(WebKit::FindIndicatorOverlayClientIOS::drawRect):
Paint the selection (with black text forced on), and the yellow rounded rect
into the indicator page overlay.
(WebKit::FindController::updateFindIndicator):
Create or update a small document-relative page overlay in the selection rect.
(WebKit::FindController::hideFindIndicator):
(WebKit::FindController::willFindString):
(WebKit::FindController::didFailToFindString):
(WebKit::FindController::didHideFindIndicator):
Add willFindString, didFailToFindString, and didHideFindIndicator functions.
They do nothing, except on iOS where they are used to prevent selection change
messages from being dispatched while using find-in-page, and to force
WebCore to compute a selection rect (via updateAppearance) despite the selection not being painted.
* WebProcess/WebPage/ios/FindIndicatorOverlayClientIOS.h:
(WebKit::FindIndicatorOverlayClientIOS::setFrame):
2014-04-11 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 Martin Robinson.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(scaleFactorChanged): Added this callback to pass scale changes to the page proxy.
(webkitWebViewBaseCreateWebPage): Attach the callback to the notify signal.
* UIProcess/cairo/BackingStoreCairo.cpp:
(WebKit::createBackingStoreForGTK): Pass the scale factor to the WebCore backing store.
(WebKit::BackingStore::incorporateUpdate): Ditto.
2014-04-10 Jer Noble <jer.noble@apple.com>
[WK2] Dispatch to main thread's run loop to handle cookie requests.
https://bugs.webkit.org/show_bug.cgi?id=131524
Reviewed by Brady Eidson.
When using synchronous network APIs from the main thread (e.g., -[NSImage
initWithContentsOfURL:]) our cookie shim would attempt to dispath_async
to the main thread to handle the cookie request, and block against the original
request. CFNetwork is still servicing the run loop however, so rather than
dispatch_async to the main queue, use the RunLoop to dispatch to the main thread.
* Shared/mac/CookieStorageShim.mm:
(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2014-04-11 Tim Horton <timothy_horton@apple.com>
Make the stylebot happier with r167154.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/PageClientImplIOS.h:
2014-04-11 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Expose a simplified zoom-to-rect to the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=131563
Reviewed by Simon Fraser.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::zoomToRect):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::zoomToRect):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::zoomToRect):
Add a simple message that calls WKContentView's zoom-to-rect code given just a rect and min/max scale.
We will use the center of the rect as the zoom origin, and will try to show the whole rect.
2014-04-10 Jer Noble <jer.noble@apple.com>
[iOS][WK2] Videos should animate into and out of fullscreen.
https://bugs.webkit.org/show_bug.cgi?id=131497
Reviewed by Simon Fraser.
Pass a starting rect for the enterFullscreen animation and an ending rect
for the exitFullscreen animation.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID): Pass initialFrame.
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::screenRectOfContents): Casts node -> element and returns its screenRect().
(WebKit::WebVideoFullscreenManager::enterFullscreenForNode): Pass initialFrame.
(WebKit::WebVideoFullscreenManager::exitFullscreenForNode): Pass finalFrame.
2014-04-11 Tim Horton <timothy_horton@apple.com>
Support document-relative and custom-frame page overlays
https://bugs.webkit.org/show_bug.cgi?id=131560
<rdar://problem/16595556>
Reviewed by Simon Fraser.
Add "document-relative" overlays, which attach to (and scroll with) the document,
and can be given a frame rect within the document to avoid overallocation of backing store.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didChangeScrollOffset):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mainFrame):
(WebKit::WebPage::mainFrameView):
(WebKit::WebPage::didChangeScrollOffsetForFrame):
* WebProcess/WebPage/WebPage.h:
Let the PageOverlayController know *which* frame scrolled, instead of "any frame".
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
Factor out shared code.
(WebKit::FindController::willMoveToWebPage):
(WebKit::FindController::drawRect):
We can use clearRect() instead of a transparency layer and fillRect().
I've looked through all the other overlay clients I know of and none of them
depend on having a transparency layer at the overlay level.
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::create):
(WebKit::PageOverlay::PageOverlay):
(WebKit::PageOverlay::bounds):
(WebKit::PageOverlay::frame):
(WebKit::PageOverlay::setFrame):
(WebKit::PageOverlay::drawRect):
Add OverlayType, which allows creation of Document or View relative overlays.
All overlays up to this point are View relative, so we default to that.
Document-relative overlays scroll with the page instead of repainting as
the page scrolls. They can also be given an explicit frame, allowing them
to be smaller than the entire document.
* WebProcess/WebPage/PageOverlay.h:
(WebKit::PageOverlay::overlayType):
(WebKit::PageOverlay::webPage):
(WebKit::PageOverlay::client): Deleted.
* WebProcess/WebPage/PageOverlayController.cpp:
(WebKit::PageOverlayController::initialize):
(WebKit::PageOverlayController::installPageOverlay):
(WebKit::PageOverlayController::uninstallPageOverlay):
(WebKit::PageOverlayController::updateForceSynchronousScrollLayerPositionUpdates):
(WebKit::updateOverlayGeometry):
(WebKit::PageOverlayController::setPageOverlayNeedsDisplay):
(WebKit::PageOverlayController::didChangeViewSize):
(WebKit::PageOverlayController::didChangeDocumentSize):
(WebKit::PageOverlayController::didChangeDeviceScaleFactor):
(WebKit::PageOverlayController::didScrollFrame):
(WebKit::PageOverlayController::flushPageOverlayLayers):
(WebKit::PageOverlayController::didChangeOverlayFrame):
Keep two overlay root layers - one for view-relative
and one for document-relative overlays.
Don't force synchronous scrolling if we only have document-relative overlays.
Update the overlay's position as well as its size whenever necessary.
Update document-relative overlay geometry when the document size changes.
Only explicitly flush view-relative overlays; document-relative ones
are plugged into the WebCore layer tree and flushed along with the page.
* WebProcess/WebPage/PageOverlayController.h:
(WebKit::PageOverlayController::documentOverlayRootLayer):
(WebKit::PageOverlayController::viewOverlayRootLayer):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setRootCompositingLayer):
(WebKit::RemoteLayerTreeDrawingArea::mainFrameContentSizeChanged):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged):
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
Let the PageOverlay controller know when the document size changes.
When we set up compositing, push the document overlay root layer
down into WebCore.
2014-04-11 Pratik Solanki <psolanki@apple.com>
[iOS WebKit2]: Share NSURLCache directory for webkit processes
https://bugs.webkit.org/show_bug.cgi?id=131513
<rdar://problem/16420859>
Reviewed by Alexey Proskuryakov.
Use iOS specific NSURLCache API to share the cache directory used by the networking process,
web process and Safari.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-04-11 Alexey Proskuryakov <ap@apple.com>
[Mac] Add IconServices to WebProcess sandbox profile
https://bugs.webkit.org/show_bug.cgi?id=131558
<rdar://problem/16552397>
Reviewed by Brady Eidson.
* WebProcess/com.apple.WebProcess.sb.in:
2014-04-11 Antti Koivisto <antti@apple.com>
Pipe initial scale factor to TileController
https://bugs.webkit.org/show_bug.cgi?id=131521
Reviewed by Tim Horton.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportConfigurationChanged):
2014-04-10 Chris Fleizach <cfleizach@apple.com>
AX: WebProcess at com.apple.WebCore: WebCore::AXObjectCache::rootObject + 18
https://bugs.webkit.org/show_bug.cgi?id=131522
Reviewed by Anders Carlsson.
Protect against documents that have had their render tree destroyed, and no longer return a valid cache.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm:
2014-04-11 Brent Fulgham <bfulgham@apple.com>
[Mac] Prevent crash when exiting fullscreen mode
https://bugs.webkit.org/show_bug.cgi?id=131528
Reviewed by Jer Noble.
* UIProcess/mac/WKFullScreenWindowController.mm:
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
Clean up the _scaleAnimation controller, not just the _fadeAnimation controller.
(-[WKFullScreenWindowController close]): If we are doing an immediate
close of the view, we need to stop animations so we avoid any
final timer events from interacting with invalid window handles.
2014-04-11 Carlos Garcia Campos <cgarcia@igalia.com>
wk2-gtk does not display anything
https://bugs.webkit.org/show_bug.cgi?id=125558
Reviewed by Martin Robinson.
Remove fcntl call to set access mode flags on the duplicated files
descriptor. Those flags are ignored in Linux and make fcntl to
fail in FreeBSD. We should handle the case where the passed
protection is ReadOnly.
Thanks to Raphael Kubo da Costa who proposed the solution.
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::createHandle):
(WebKit::accessModeFile): Deleted.
2014-04-11 Zan Dobersek <zdobersek@igalia.com>
[GTK][WK2] Move Vector objects into WebEditorClient::executePendingEditorCommands() invocations
https://bugs.webkit.org/show_bug.cgi?id=131454
Reviewed by Carlos Garcia Campos.
* WebProcess/WebCoreSupport/WebEditorClient.h:
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp:
(WebKit::WebEditorClient::executePendingEditorCommands): Take a const reference of the Vector
object to avoid unnecessary copies. Also deploy two range-based for loops and efficiently move
the Editor::Command objects into the other Vector.
2014-04-10 Dan Bernstein <mitz@apple.com>
<rdar://problem/16582465> [Cocoa] Avoid casts from CF types to unrelated Objective-C types
https://bugs.webkit.org/show_bug.cgi?id=131529
Reviewed by Mark Rowe.
* Shared/API/c/cf/WKStringCF.mm:
(WKStringCreateWithCFString): Cast the CFStringRef into its toll-free-bridged counterpart,
NSString, then cast the NSString into a WKNSString.
* Shared/API/c/cf/WKURLCF.mm:
(WKURLCreateWithCFURL): Cast the CFURLRef into its toll-free-bridged counterpart, NSURL,
then cast the NSURL into a WKNSURL.
2014-04-10 Dan Bernstein <mitz@apple.com>
BundlePageDiagnosticLoggingClient leaks every string passing through it.
https://bugs.webkit.org/show_bug.cgi?id=130140
Reviewed by Brent Fulgham.
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
(WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage): Don’t copy the
strings passed into the bundle client.
2014-04-10 Benjamin Poulain <bpoulain@apple.com>
Try to fix the debug bots after r167102
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-04-10 Gavin Barraclough <barraclough@apple.com>
Add user default for FTL JIT
https://bugs.webkit.org/show_bug.cgi?id=131520
Reviewed by Benjamin Poulain.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::decode):
* UIProcess/mac/WebContextMac.mm:
(WebKit::registerUserDefaultsIfNeeded):
(WebKit::WebContext::platformInitializeWebProcess):
- D'oh, whitespace.
2014-04-10 Gavin Barraclough <barraclough@apple.com>
Add user default for FTL JIT
https://bugs.webkit.org/show_bug.cgi?id=131520
Reviewed by Benjamin Poulain.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
- pass setting to WebContent process.
* UIProcess/mac/WebContextMac.mm:
(WebKit::registerUserDefaultsIfNeeded):
(WebKit::WebContext::platformInitializeWebProcess):
- read user default.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
- set JSC::Option.
2014-04-10 Dan Bernstein <mitz@apple.com>
[Cocoa] Notify the form delegate when the custom button in the form accessory view is tapped
https://bugs.webkit.org/show_bug.cgi?id=131518
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/_WKFormDelegate.h: Declared new delegate method.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView accessoryAutoFill]): Call the new delegate method.
2014-04-10 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r167097.
https://bugs.webkit.org/show_bug.cgi?id=131519
there was already a mechanism for this, and this was
incomplete anyway (Requested by thorton on #webkit).
Reverted changeset:
"[iOS WebKit2] Disable the find overlay for now"
https://bugs.webkit.org/show_bug.cgi?id=131509
http://trac.webkit.org/changeset/167097
2014-04-10 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Disable the find overlay for now
https://bugs.webkit.org/show_bug.cgi?id=131509
Reviewed by Adele Peterson.
* Shared/WebPreferencesStore.h:
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::FindController):
(WebKit::FindController::hideFindOverlay):
(WebKit::FindController::hideFindUI):
(WebKit::FindController::setShouldShowOverlay):
* WebProcess/WebPage/FindController.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Add a setting allowing us to turn off the find-in-page overlay on iOS.
2014-04-10 Sergio Villar Senin <svillar@igalia.com>
Unreviewed GTK build fix after r167074.
This involves replacing resetDragSession() by
resetCurrentDragInformation() and dragSession().operation by
currentDragOperation().
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDragDataReceived):
(webkitWebViewBaseDragMotion):
(dragExitedCallback):
2014-04-10 Owen Taylor <otaylor@redhat.com>
[Cairo] Implement ShareableBitmap::paint() with scale factor
https://bugs.webkit.org/show_bug.cgi?id=64665
Reviewed by Martin Robinson.
* Shared/cairo/ShareableBitmapCairo.cpp (WebKit::ShareableBitmap::paint):
2014-04-10 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] Support phraseboundary gesture recognizer for CJK.
https://bugs.webkit.org/show_bug.cgi?id=131493
<rdar://problem/16319583>
Reviewed by Benjamin Poulain.
On iOS it is possible with a gesture to change the selection
within the marked text.
Changing the selection triggers also the update of the inline candidates
over the keyboard area.
The patch adds the logic to decide whether the gesture can begin
as well as the code for the movement of
the selection within the marked range.
The gesture is allowed to start within a given radius from the marked
area.
* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* Shared/InteractionInformationAtPosition.h:
(WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
* Shared/ios/GestureTypes.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::editorStateChanged):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView pointIsNearMarkedText:]):
(toGestureType):
(toUIWKGestureType):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::selectWithGesture):
(WebKit::WebPage::getPositionInformation):
2014-04-10 Enrica Casucci <enrica@apple.com>
Unreviewed iOS build fix after http://trac.webkit.org/changeset/167074
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
2014-04-10 Alexey Proskuryakov <ap@apple.com>
Gtk build fix.
* WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction):
2014-04-09 Alexey Proskuryakov <ap@apple.com>
Eliminate DragSession structure
https://bugs.webkit.org/show_bug.cgi?id=131465
Reviewed by Benjamin Poulain.
* Scripts/webkit2/messages.py:
(struct_or_class):
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<DragSession>::encode): Deleted.
(IPC::ArgumentCoder<DragSession>::decode): Deleted.
* Shared/WebCoreArgumentCoders.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView draggingEntered:]):
(-[WKView draggingUpdated:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::didPerformDragControllerAction):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::currentDragOperation):
(WebKit::WebPageProxy::currentDragIsOverFileInput):
(WebKit::WebPageProxy::currentDragNumberOfFilesToBeAccepted):
(WebKit::WebPageProxy::resetCurrentDragInformation):
(WebKit::WebPageProxy::dragSession): Deleted.
(WebKit::WebPageProxy::resetDragSession): Deleted.
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
2014-04-10 Martin Robinson <mrobinson@igalia.com>
[GTK] LayerTreeHostGtk is creating a software scene graph
https://bugs.webkit.org/show_bug.cgi?id=131471
Reviewed by Sergio Villar Senin.
At some point, a regression was introduced that sent the GTK+ WebKit2 scenegraph down the
software route. The rest of the file depends on the fact that the TextureMapper is the OpenGL
variety, so we should force that explicitly. This is causing crashes locally and soon we
should be able to test this directly.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize): Force the use of the OpenGL scenegraph.
2014-04-09 Jeremy Jones <jeremyj@apple.com>
Fix build failure when #if USE(XPC_SERVICES) is false.
https://bugs.webkit.org/show_bug.cgi?id=131474
Reviewed by Dan Bernstein.
Fix build.
* UIProcess/ios/WebProcessProxyIOS.mm:
Add #if around BackgroundTabFlags ForegroundTabFlags to prevent unused variable error.
2014-04-09 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Add API to set preferred languages
https://bugs.webkit.org/show_bug.cgi?id=131435
Reviewed by Gyuyoung Kim.
Add ewk_context_preferred_languages_set to change the list of "Accept-Language".
This list is used to receive alternative version of contents, which is related
to specified languages from the contents provider.
* UIProcess/API/efl/ewk_context.cpp:
(ewk_context_preferred_languages_set):
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(serverCallback):
(TEST_F): Added test case for ewk_context_preferred_languages_set
2014-04-09 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Add the initial WebProcess handling of animated resize for rotation
https://bugs.webkit.org/show_bug.cgi?id=131469
Reviewed by Tim Horton.
Add the basic handling of dynamic resize from the WebProcess.
On animated resize, the UIProcess decides new target rects and scale. The information
is then passed to the WebProcess to update the content.
For various reason, the target rects and scale computed by the UIProcess can be incorrect
(for example, if viewport constraints limit the scale).
In those cases, the WebProcess has all the information to compute a better target. This patch
adds such a basic update mechanism.
Once the new values are computed, they are sent back to the UIProcess. If the rotation animation
is still ongoing, we do not want mess with it. What we do is set a temporary transform on the subviews
and restore the real value after the animation. The key is to have the two matrix multiplying to the end
value so that there is no visual difference.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _dynamicViewportUpdateChangedTargetToScale:position:]):
(setViewportConfigurationMinimumLayoutSize):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _setMinimumLayoutSizeOverride:]):
(-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]):
(-[WKWebView _endAnimatedResize]):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _frameOrBoundsChanged]):
(-[WKView setMinimumLayoutSizeOverride:]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::dynamicViewportUpdateChangedTarget):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView setMinimumLayoutSize:]): Deleted.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dynamicViewportSizeUpdate):
(WebKit::WebPageProxy::dynamicViewportUpdateChangedTarget):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::dynamicViewportSizeUpdate):
2014-04-09 Martin Robinson <mrobinson@igalia.com>
Try to fix the GTK+ build after resetDragOperation rename
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDragDataReceived): Rename resetDragOperation to resetDragSession.
(dragExitedCallback): Ditto.
2014-04-09 Jeremy Jones <jeremyj@apple.com>
Enable fullscreen captions selection
https://bugs.webkit.org/show_bug.cgi?id=131069
Reviewed by Eric Carlson.
Enable media selection in fullscreen.
setLegibleMediaSelectionOptions/setAudioMediaSelectionOptions provide a list of options.
selectAudioMediaOption/selectLegibleMediaOption change the selected option.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
Add selectAudioMediaOption/selectLegibleMediaOption
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
Add selectAudioMediaOption/selectLegibleMediaOption
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::selectAudioMediaOption):
Add selectAudioMediaOption
(WebKit::WebVideoFullscreenManagerProxy::selectLegibleMediaOption):
Add selectLegibleMediaOption
* WebProcess/ios/WebVideoFullscreenManager.h:
Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
* WebProcess/ios/WebVideoFullscreenManager.messages.in:
Add setAudioMediaSelectionOptions/setLegibleMediaSelectionOptions
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::setAudioMediaSelectionOptions):
Add setAudioMediaSelectionOptions
(WebKit::WebVideoFullscreenManager::setLegibleMediaSelectionOptions):
Add setLegibleMediaSelectionOptions
2014-04-09 Alexey Proskuryakov <ap@apple.com>
Rename some dragging functions
https://bugs.webkit.org/show_bug.cgi?id=131460
Reviewed by Tim Horton.
Renamed performDrag to performDragOperation.
Also renamed resetDragOperation to resetDragSession, because it's m_dragSession
that it resets.
* Shared/DragControllerAction.h:
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDragDrop):
* UIProcess/API/mac/WKView.mm:
(-[WKView draggingEntered:]):
(-[WKView draggingExited:]):
(-[WKView performDragOperation:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::performDragOperation):
(WebKit::WebPageProxy::performDrag): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::resetDragSession):
(WebKit::WebPageProxy::resetDragOperation): Deleted.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::performDragControllerAction):
2014-04-09 Gavin Barraclough <baraclough@apple.com>
Update SPI for managing tabs
https://bugs.webkit.org/show_bug.cgi?id=131453
Reviewed by Alexey Proskuryakov.
* Configurations/WebKit2.xcconfig:
- added AssertionServices
* UIProcess/WebProcessProxy.h:
- added m_assertion, m_assertionState.
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::updateProcessState):
- create BKSProcessAssertion to take an assertion.
2014-04-09 Enrica Casucci <enrica@apple.com>
WK2: Dictated words disappear after being inserted.
https://bugs.webkit.org/show_bug.cgi?id=131458
<rdar://problem/16395011>
Reviewed by Benjamin Poulain.
The dictation engine treats selected text as text to be
removed. We need to ensure that the range selected to insert the
new text isn't reflected in the UI process until we are done
inserting the text.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::replaceDictatedText):
2014-04-09 Brady Eidson <beidson@apple.com>
Don't offer "contact" actions in telephone number menus
<rdar://problem/16556907> and https://bugs.webkit.org/show_bug.cgi?id=131451
Reviewed by Tim Horton.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showTelephoneNumberMenu): Skip actions that have to do with contacts,
and skip separators too!
2014-04-09 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r166975.
Do not use WebPage removed API to fix the build. Page overlays are
no broken, see https://bugs.webkit.org/show_bug.cgi?id=131433.
* WebProcess/WebPage/DrawingAreaImpl.cpp:
(WebKit::DrawingAreaImpl::display):
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::initialize):
(WebKit::LayerTreeHostGtk::paintContents):
2014-04-09 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r166965.
* WebProcess/WebCoreSupport/gtk/WebDragClientGtk.cpp:
(WebKit::WebDragClient::startDrag): Rename Clipboard to DataTransfer.
2014-04-08 Hyowon Kim <hw1008.kim@samsung.com>
Fix EFL Build errors since r166975.
https://bugs.webkit.org/show_bug.cgi?id=131421
Reviewed by Gyuyoung Kim.
This patch is just for fixing EFL build errors.
The page overlay functionality is not working yet.
* CMakeLists.txt:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedDrawingArea.cpp:
(WebKit::CoordinatedDrawingArea::display):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost):
(WebKit::CoordinatedLayerTreeHost::paintLayerContents):
* WebProcess/WebPage/PageOverlayController.cpp:
* WebProcess/WebPage/TapHighlightController.cpp:
(WebKit::TapHighlightController::hideHighlight):
2014-04-08 Jon Lee <jonlee@apple.com>
Turn MSE on by default
https://bugs.webkit.org/show_bug.cgi?id=131313
<rdar://problem/16525223>
Reviewed by Jer Noble.
* Configurations/FeatureDefines.xcconfig:
* Shared/WebPreferencesStore.h: Set default to true.
* UIProcess/API/C/WKPreferencesRefPrivate.h:
2014-04-08 Ryosuke Niwa <rniwa@webkit.org>
Fix the typo in the previous commit.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):
2014-04-08 Ryosuke Niwa <rniwa@webkit.org>
REGRESSION(r 166890): Crash inside WebKit::WebEditorClient::textFieldDidEndEditing
https://bugs.webkit.org/show_bug.cgi?id=131409
Reviewed by Anders Carlsson.
Create an empty API::InjectedBundle::FormClient to avoid crashing inside
m_mainFrame->coreFrame()->loader().detachFromParent().
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):
2014-04-08 Tim Horton <timothy_horton@apple.com>
Unify and factor out page overlay implementations
https://bugs.webkit.org/show_bug.cgi?id=131353
Reviewed by Anders Carlsson.
* WebProcess/WebPage/PageOverlayController.cpp:
(WebKit::PageOverlayController::uninstallPageOverlay):
Don't turn fast scrolling back off unless the last overlay is removed.
2014-04-08 Anders Carlsson <andersca@apple.com>
Add a WKNavigationAction property indicating whether it resulted from processing a user gesture
https://bugs.webkit.org/show_bug.cgi?id=131405
<rdar://problem/16535453>
Reviewed by Tim Horton.
* Shared/NavigationActionData.cpp:
(WebKit::NavigationActionData::NavigationActionData):
(WebKit::NavigationActionData::encode):
(WebKit::NavigationActionData::decode):
* Shared/NavigationActionData.h:
* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
* UIProcess/API/Cocoa/WKNavigationActionPrivate.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNewWindowAction):
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
2014-04-08 Tim Horton <timothy_horton@apple.com>
Unify and factor out page overlay implementations
https://bugs.webkit.org/show_bug.cgi?id=131353
Reviewed by Anders Carlsson.
Bring all of the PageOverlay code together in a single cross-platform
PageOverlayController, including hit-testing code from WebPage and painting
and layer-tree manipulation code from the DrawingArea.
This also makes all PageOverlays a single GraphicsLayer tree which can be
flushed and plugged into any DrawingArea in a straightforward manner.
We no longer have to watch for individual layers flipping into/out of tiling,
because they're hidden underneath the root PageOverlay GraphicsLayer.
Additionally, because GraphicsLayer is cross-platform, we can share
all of the fairly trivial but oft-repeated overlay management code.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/PageOverlayController.cpp: Added.
* WebProcess/WebPage/PageOverlayController.h: Added.
(WebKit::PageOverlayController::rootLayer):
Add PageOverlayController.
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
Remove PageOverlay-related code from the DrawingAreas.
* WebProcess/WebPage/PageOverlay.cpp:
(WebKit::PageOverlay::setNeedsDisplay):
(WebKit::PageOverlay::fadeAnimationTimerFired):
(WebKit::PageOverlay::clear):
* WebProcess/WebPage/PageOverlay.h:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::didChangeScrollOffset):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
Use PageOverlayController instead of the DrawingArea/WebPage to manipulate page overlays.
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::pageOverlayController):
Remove PageOverlay-related code from WebPage.
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::outOfTreeLayerWasAdded): Deleted.
(WebKit::RemoteLayerTreeContext::outOfTreeLayerWillBeRemoved): Deleted.
(WebKit::RemoteLayerTreeContext::flushOutOfTreeLayers): Deleted.
Remove the no-longer-necessary out-of-tree layer code.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageInstallPageOverlayWithAnimation):
(WKBundlePageUninstallPageOverlayWithAnimation):
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::highlight):
(WebKit::WebInspectorClient::hideHighlight):
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::updateFindUIAfterPageScroll):
(WebKit::FindController::hideFindUI):
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
(WebKit::TelephoneNumberOverlayController::createOverlayIfNeeded):
(WebKit::TelephoneNumberOverlayController::destroyOverlay):
Make use of the FadeMode enum.
2014-04-08 Anders Carlsson <andersca@apple.com>
Change WebPageProxy::CreateNewPage to take a NavigationActionData object
https://bugs.webkit.org/show_bug.cgi?id=131401
Reviewed by Dan Bernstein.
* UIProcess/API/APIUIClient.h:
(API::UIClient::createNewPage):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(toWKNavigationType):
* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::toWKNavigationType): Deleted.
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIClient::createNewPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::createNewPage):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow):
2014-04-08 Anders Carlsson <andersca@apple.com>
Fix build.
* WebKit2Prefix.h:
2014-04-08 Anders Carlsson <andersca@apple.com>
Use an explicit class when decoding individual bundle parameters
https://bugs.webkit.org/show_bug.cgi?id=131392
<rdar://problem/16213914>
Reviewed by Dan Bernstein.
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::setBundleParameter):
2014-04-08 Anders Carlsson <andersca@apple.com>
Move a Mountain Lion declaration to the WebKit2 prefix header
https://bugs.webkit.org/show_bug.cgi?id=131391
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKProcessPool.mm:
* UIProcess/ios/PageClientImplIOS.mm:
* UIProcess/mac/WebContextMac.mm:
* WebKit2Prefix.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
2014-04-08 Antti Koivisto <antti@apple.com>
Remove exposedRect from TileController
https://bugs.webkit.org/show_bug.cgi?id=131378
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::updateScrolledExposedRect):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updateScrolledExposedRect):
Update the visible rect for pageOverlayLayers by calling flushCompositingState. This way
tile controller visible rect updates always happens via compositing flush (we assert
for this in TileController::setVisibleRect).
2014-04-08 Alexey Proskuryakov <ap@apple.com>
Rename Clipboard to DataTransfer
https://bugs.webkit.org/show_bug.cgi?id=131371
Reviewed by Anders Carlsson.
* WebProcess/WebCoreSupport/WebDragClient.cpp:
(WebKit::WebDragClient::willPerformDragSourceAction):
(WebKit::WebDragClient::startDrag):
* WebProcess/WebCoreSupport/WebDragClient.h:
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::startDrag):
2014-04-08 Alexey Proskuryakov <ap@apple.com>
FlagsChanged events are not delivered to input methods when using async text input
https://bugs.webkit.org/show_bug.cgi?id=131383
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm: (-[WKView _interpretKeyEvent:completionHandler:]):
The early return is no longer needed.
2014-04-08 Tim Horton <timothy_horton@apple.com>
WebKit2 View Gestures (Swipe): Swipe-start hysteresis
https://bugs.webkit.org/show_bug.cgi?id=127393
<rdar://problem/15876822>
Reviewed by Anders Carlsson.
We shouldn't start a swipe immediately upon very small scrolls in the correct direction,
because we don't want to get the user trapped in a swipe when they want to scroll.
We'll accumulate the scroll deltas and wait until the user has scrolled at least 15px horizontally.
In addition, we'll drop the swipe completely if any event has a vertical delta equal to half (or more)
of the horizontal delta.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::ViewGestureController):
(WebKit::ViewGestureController::deltaIsSufficientToBeginSwipe):
(WebKit::ViewGestureController::handleScrollWheelEvent):
(WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
2014-04-07 Jer Noble <jer.noble@apple.com>
[Mac][WK2] Videos do not have access to session cookies
https://bugs.webkit.org/show_bug.cgi?id=129687
Reviewed by Eric Carlson.
Update the CookieStorageShim to track changes in underlying networking stack.
* Shared/mac/CookieStorageShim.mm:
(WebKit::CookieStorageShim::initialize):
(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2014-04-08 Dan Bernstein <mitz@apple.com>
[Cocoa] Add a way to tell whether a WKWebProcessPlugInNodeHandle is a text-type HTML input element
https://bugs.webkit.org/show_bug.cgi?id=131374
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
(-[WKWebProcessPlugInNodeHandle isTextField]): Added this getter. Calls
InjectedBundleNodeHandle::isTextField.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::isTextField): Added. Uses
WebCore::HTMLInputElement::isText, which is consistent with what
WebChromeClient::focusedElementChanged uses to decide whether to call didFocusTextField.
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h:
2014-04-08 Dan Bernstein <mitz@apple.com>
[Cocoa] Add a _certificateChain property to WKWebProcessPlugInFrame
https://bugs.webkit.org/show_bug.cgi?id=131370
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame _certificateChain]): Added this getter, which uses the new
WebFrame::certificateInfo.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::certificateInfo): Added this getter.
* WebProcess/WebPage/WebFrame.h:
2014-04-08 Dan Bernstein <mitz@apple.com>
[Cocoa] Add a bundle form delegate method corresponding to textDidChangeInTextField
https://bugs.webkit.org/show_bug.cgi?id=131369
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared
new delegate method.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added an override
of API::InjectedBundle::FormClient::textDidChangeInTextField which calls the new delegate
method.
2014-04-08 Dan Bernstein <mitz@apple.com>
[Cocoa] Add WKFormDelegate
https://bugs.webkit.org/show_bug.cgi?id=131343
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _formDelegate]): Added this accessor.
(-[WKWebView _setFormDelegate:]): Ditto.
* UIProcess/API/Cocoa/WKWebViewPrivate.h: Declared _formDelegate property.
* UIProcess/API/Cocoa/_WKFormDelegate.h: Added.
* UIProcess/API/Cocoa/_WKFormInputSession.h: Added.
* UIProcess/ios/WKContentView.h: Moved _webView ivar into the @interface…
* UIProcess/ios/WKContentView.mm: …from the @implementation.
* UIProcess/ios/WKContentViewInteraction.h: Added _formInputSession ivar and
formAccessoryView property.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKFormInputSession initWithContentView:userObject:]): Added.
(-[WKFormInputSession dealloc]): Added.
(-[WKFormInputSession userObject]): Added.
(-[WKFormInputSession isValid]): Added.
(-[WKFormInputSession accessoryViewCustomButtonTitle]): Added.
(-[WKFormInputSession setAccessoryViewCustomButtonTitle:]): Added.
(-[WKFormInputSession invalidate]): Added.
(-[WKContentView cleanupInteraction]): Invalidate and release the input session.
(-[WKContentView formAccessoryView]): Added this accessor.
(-[WKContentView _startAssistingNode:userObject:]): Create an input session and message the
form delegate.
(-[WKContentView _stopAssistingNode]): Invalidate and release the input session.
* WebKit2.xcodeproj/project.pbxproj: Added references to new files.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Added
comment.
2014-04-08 Daniel Bates <dabates@apple.com>
Fallback to default storage session when there isn't a valid session ID
https://bugs.webkit.org/show_bug.cgi?id=131326
<rdar://problem/16231679>
Reviewed by Alexey Proskuryakov.
Fixes and issue where we may use the wrong storage session after disabling
a private browsing session.
Currently WebKit1 and WebKit2 without NetworkProcess assume that there
is always a non-null private browsing storage session so long as the page
has a non-default session ID. Instead we should only use the private browsing
storage session when it's non-null and the page has a non-default session ID;
otherwise, we should use the default storage session. This change will make
the behavior in WebKit1 and WebKit2 without NetworkProcess consistent with
the behavior in WebKit2 with NetworkProcess.
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::storageSession):
2014-04-08 Youenn Fablet <youenn.fablet@crf.canon.fr>
[SOUP] Control cookie management according ResourceRequest.allowCookies()
https://bugs.webkit.org/show_bug.cgi?id=131026
Reviewed by Sergio Villar Senin.
Added setting of accept cookies policy for the current soup network session cookie jar and all tracked sessions.
Moved the implementation of cookie policy setting from WebCookieManager to WebFrameNetworkingContext.
* WebProcess/Cookies/soup/WebCookieManagerSoup.cpp:
(WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Moved implementation to WebCookieManager::platformSetHTTPCookieAcceptPolicy.
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
(WebKit::WebFrameNetworkingContext::setCookieAcceptPolicyForAllContexts): Moved implementation from WebCookieManager::platformSetHTTPCookieAcceptPolicy and set the cookie jar accept policy to the cookie jars of all sessions in addition to the default cookie jar.
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h: Added method prototype.
2014-04-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
[WK2] Fix unused parameter compile warning
https://bugs.webkit.org/show_bug.cgi?id=131260
Reviewed by Darin Adler.
Remove the arguments name without UNUSED_PARAM().
* UIProcess/API/APIDownloadClient.h:
(API::DownloadClient::didReceiveData):
(API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
(API::DownloadClient::decideDestinationWithSuggestedFilename):
(API::DownloadClient::didCreateDestination):
* UIProcess/API/APIFindClient.h:
(API::FindClient::didCountStringMatches):
(API::FindClient::didFindString):
* UIProcess/API/APIHistoryClient.h:
(API::HistoryClient::didPerformClientRedirect):
(API::HistoryClient::didPerformServerRedirect):
(API::HistoryClient::didUpdateHistoryTitle):
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didStartProvisionalLoadForFrame):
(API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(API::LoaderClient::didCommitLoadForFrame):
(API::LoaderClient::didFinishLoadForFrame):
(API::LoaderClient::didFailLoadWithErrorForFrame):
(API::LoaderClient::didChangeBackForwardList):
* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNavigationAction):
(API::PolicyClient::decidePolicyForNewWindowAction):
(API::PolicyClient::decidePolicyForResponse):
(API::PolicyClient::unableToImplementPolicy):
2014-04-07 Alexey Proskuryakov <ap@apple.com>
[Mac] Allow com.apple.ViewBridge preferences reading in plug-in sandbox profile
https://bugs.webkit.org/show_bug.cgi?id=131306
<rdar://problem/16359865>
Reviewed by Sam Weinig.
* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb: Do it.
2014-04-07 Stephanie Lewis <slewis@apple.com>
Crash in com.apple.WebKit.Plugin.Development at com.apple.WebKit2: WebKit::PluginControllerProxy::pluginInstanceID
<rdar://problem/16479432>
https://bugs.webkit.org/show_bug.cgi?id=131203
Reviewed by Geoff Garen.
pluginController was being removed before accessing the pluginInstanceID.
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::removePluginControllerProxy):
2014-04-07 Dan Bernstein <mitz@apple.com>
More Mountain Lion build fix.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2014-04-07 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Implement the update of content offset on animated resize
https://bugs.webkit.org/show_bug.cgi?id=131329
Reviewed by Tim Horton.
Compute a reasonable target offset on rotation. This goes in 3 steps:
1) Move the page so that the center does not move during scaling.
2) Limit the range to keep the page in scrollview without rubberbanding.
3) The horizontal content stays the same but the vertical area changes. When on the top or bottom
edge, stick to the edge.
The code is moved inside _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride: so that we can tell
the WebProcess where the scroll position will be at the end of the animation.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _frameOrBoundsChangedFrom:]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]):
2014-04-07 Dan Bernstein <mitz@apple.com>
Mountain Lion build fix.
* UIProcess/ios/PageClientImplIOS.mm:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
2014-04-07 Anders Carlsson <andersca@apple.com>
Handle decoding of nil invocation arguments
https://bugs.webkit.org/show_bug.cgi?id=131335
<rdar://problem/16528449>
Reviewed by Tim Horton.
* Shared/APIArray.h:
Don't crash if the array element is null.
2014-04-07 Dan Bernstein <mitz@apple.com>
Add bundle client function corresponding to startAssistingNode
https://bugs.webkit.org/show_bug.cgi?id=131332
Reviewed by Anders Carlsson.
* UIProcess/PageClient.h: Added userData parameter to startAssistingNode.
* UIProcess/WebPageProxy.h: Added message decoder parameter to startAssistingNode.
* UIProcess/WebPageProxy.messages.in: Added message decoder parameter to StartAssistingNode.
* UIProcess/ios/PageClientImplIOS.h: Updated startAssistingNode override.
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::startAssistingNode): Decode the user data into an NSObject and pass
it on to the content view.
* UIProcess/ios/WKContentViewInteraction.h: Added userObject parameter to
-_startAssitingNode:.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _startAssistingNode:userObject:]): Added userObject parameter. We will pass
it to a future delegate method.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::startAssistingNode): Decode the user data and pass it to the client.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h: Declared new
delegate method.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Added an implementation
of API::InjectedBundle::FormClient::willBeginInputSession which calls the new delegate
method, and encodes the user object into userData.
* WebProcess/InjectedBundle/APIInjectedBundleFormClient.h:
(API::InjectedBundle::FormClient::willBeginInputSession): Added willBeginInputSession.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::elementDidFocus): Call willBeginInputSession and send the user data along
with the StartAssistingNode message to the UI process.
2014-04-07 Jinwoo Song <jinwoo7.song@samsung.com>
Unreviewed. Fixing the EFL build.
* WebProcess/WebPage/CoordinatedGraphics/WebPageCoordinatedGraphics.cpp: Include the Document header from WebCore
to avoid operating on an incomplete type.
2014-04-07 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] WKPDFView fades in tiles, PDFs load very flashily
https://bugs.webkit.org/show_bug.cgi?id=131325
<rdar://problem/16382960>
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewDidScroll:]):
Forward scroll events to the current custom content provider.
* UIProcess/Cocoa/WKWebViewContentProvider.h:
Make content providers UIScrollViewDelegates (though we only forward didScroll for now).
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_setContentProviderData:suggestedFilename:]):
(-[WKPDFView web_setMinimumSize:]):
(-[WKPDFView web_setScrollView:]):
(-[WKPDFView scrollViewDidScroll:]):
(-[WKPDFView _revalidateViews]):
(-[WKPDFView _computePageAndDocumentFrames]):
(-[WKPDFView layoutViews]): Deleted.
Keep track of each UIPDFPage, UIPDFPageView, and its frame (in unscaled/document coordinates).
Compute all the rects up front (and re-compute upon rotation, loading, etc.).
When scrolling, find all the pages that intersect the view (inflated by 1.5x in each
vertical direction), and ensure that pages that are inside that rect have
UIPDFPageViews installed, and ones that are outside that rect do not.
Use setUseBackingLayer to ensure that we have a low-resolution layer behind the
tiled layer to avoid flashiness.
2014-04-07 Dan Bernstein <mitz@apple.com>
Add API::InjectedBundle::FormClient
https://bugs.webkit.org/show_bug.cgi?id=131317
Reviewed by Anders Carlsson.
* WebKit2.xcodeproj/project.pbxproj: Added reference to new file.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetFormClient):
* WebProcess/InjectedBundle/API/c/WKBundlePageFormClient.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _setFormDelegate:]): Changed to define and
create a FormClient (which derives from API::InjectedBundle::FormClient and messages a
delegate), and set it as the form client.
(didFocusTextField): Deleted.
(willSubmitForm): Deleted.
(setUpFormClient): Deleted.
* WebProcess/InjectedBundle/APIInjectedBundleFormClient.h: Added.
(API::InjectedBundle::FormClient::~FormClient):
(API::InjectedBundle::FormClient::didFocusTextField):
(API::InjectedBundle::FormClient::textFieldDidBeginEditing):
(API::InjectedBundle::FormClient::textFieldDidEndEditing):
(API::InjectedBundle::FormClient::textDidChangeInTextField):
(API::InjectedBundle::FormClient::textDidChangeInTextArea):
(API::InjectedBundle::FormClient::shouldPerformActionInTextField):
(API::InjectedBundle::FormClient::willSubmitForm):
(API::InjectedBundle::FormClient::willSendSubmitEvent):
(API::InjectedBundle::FormClient::didAssociateFormControls):
(API::InjectedBundle::FormClient::shouldNotifyOnFormChanges):
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp:
(WebKit::InjectedBundlePageFormClient::InjectedBundlePageFormClient): Added a constructor
from WKBundlePageFormClientBase.
(WebKit::toWKInputFieldActionType): Added helper to convert from internal enum to C SPI
enum.
(WebKit::InjectedBundlePageFormClient::shouldPerformActionInTextField): Use helper.
* WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: Added inheritance from
API::InjectedBundle::FormClient, marked overrides as such.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Removed unused forward
declarations.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::toInputFieldAction): Added helper to convert from C SPI enum to internal enum.
(WebKit::WebEditorClient::doTextFieldCommandFromEvent): Use helper.
(WebKit::WebEditorClient::textWillBeDeletedInTextField): Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialize m_formClient member.
(WebKit::WebPage::setInjectedBundleFormClient): Added. Updates m_formClient.
(WebKit::WebPage::close): Updated code to clear m_formClient.
(WebKit::WebPage::initializeInjectedBundleFormClient): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleFormClient): Updated return type.
2014-04-07 Hyowon Kim <hw1008.kim@samsung.com>
Move to using std::unique_ptr for opengl, texmap, transforms and efl in WebCore/platform/graphics.
https://bugs.webkit.org/show_bug.cgi?id=131276
Reviewed by Darin Adler.
Replace uses of OwnPtr for TextureMapper in LayerTreeHostGtk with std::unique_ptr.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.h:
2014-04-07 Joseph Pecoraro <pecoraro@apple.com>
Make Mac only parts of TelephoneNumberOverlayController PLATFORM(MAC).
Unreviewed build fix for r166881.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showTelephoneNumberMenu): Deleted.
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
(WebKit::TelephoneNumberOverlayController::drawRect):
(WebKit::TelephoneNumberOverlayController::mouseEvent):
* WebProcess/WebPage/TelephoneNumberOverlayController.h:
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
2014-04-07 Zan Dobersek <zdobersek@igalia.com>
Unreviewed. Fixing the GTK build.
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Include the Document header from WebCore
to avoid operating on an incomplete type.
* WebProcess/WebPage/TapHighlightController.cpp: Include the RenderElement instead of RenderObject
to make the RenderObject::style() inline accessible.
* WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp: Include the Document header from WebCore
2014-04-07 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Make back-buffers purgeable when possible
https://bugs.webkit.org/show_bug.cgi?id=131213
<rdar://problem/15373906>
Reviewed by Simon Fraser.
We should make back-buffers volatile when their owning
layer falls out of use (either stops being repainted or
is unparented), as they are inherently recreatable.
* Shared/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::volatility):
(WebKit::RemoteLayerBackingStore::lastDisplayTime):
Add storage and a getter for the backing store's last paint time.
Add setter/getter for volatility of backing store.
Add RemoteLayerTreeContext param to constructor.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore):
Inform the RemoteLayerTreeContext when backing store
is created and destroyed. Since we only have a Context in
the Web process, this will only happen there.
(WebKit::RemoteLayerBackingStore::encode):
(WebKit::RemoteLayerBackingStore::decode):
Move some assertions out of #else blocks which are preceded by returns.
(WebKit::RemoteLayerBackingStore::display):
Update the last display time.
If the backing store was volatile, make it non-volatile.
(WebKit::RemoteLayerBackingStore::setVolatility):
Mark the relevant surfaces as volatile or not.
setVolatility:
- fails and returns false if any surfaces weren't marked
volatile because they were in use
- marks the whole backing store for repaint if the front
surface was purged
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
Make it possible to remove the RemoteLayerBackingStore on layers
that went from drawing contents to not drawing contents.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::ViewSnapshotStore::recordSnapshot):
Adopt the new names from WebCore.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
Clear the backing store if the layer doesn't want to draw contents anymore.
(WebKit::PlatformCALayerRemote::ensureBackingStore):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
(WebKit::RemoteLayerTreeContext::backingStoreCollection):
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::RemoteLayerTreeContext):
(WebKit::RemoteLayerTreeContext::backingStoreWasCreated):
(WebKit::RemoteLayerTreeContext::backingStoreWillBeDestroyed):
Keep a RemoteLayerBackingStoreCollection, which just keeps track
of all backing store (even unparented) created for layers in a
particular context. Forward backing store creation/deletion to it.
Remove a unused m_rootLayer member.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
If any layers had backing store changes, start the timer
on the RemoteLayerBackingStoreCollection that will mark them
purgeable once they are no longer needed.
* Shared/mac/RemoteLayerBackingStoreCollection.mm:
* Shared/mac/RemoteLayerBackingStoreCollection.h:
Keep track of all backing store for our context.
When the timer fires, run through the backing store, finding
backing store that was last painted more than 1 second ago,
and mark them purgeable. If there was more recently-painted
backing store, let the timer fire again in another second;
otherwise, stop it.
2014-04-07 Ryosuke Niwa <rniwa@webkit.org>
Another build fix after r166879.
* WebProcess/WebPage/mac/WebPageMac.mm:
2014-04-07 Dan Bernstein <mitz@apple.com>
Tried to fix the Mac build.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
2014-04-07 Brady Eidson <beidson@apple.com>
Handle clicks on DataDetectors UI for scanned phone numbers
<rdar://problem/16379588> and https://bugs.webkit.org/show_bug.cgi?id=131309
Reviewed by Tim Horton.
WebContextMenuItemDatas never need to know about a ContextMenu, so remove that concept.
Also add the concept of a selection handler for UIProcess-native menu items.
* Shared/WebContextMenuItemData.cpp:
(WebKit::WebContextMenuItemData::WebContextMenuItemData):
(WebKit::WebContextMenuItemData::encode):
(WebKit::kitItems):
(WebKit::WebContextMenuItemData::decode):
* Shared/WebContextMenuItemData.h:
(WebKit::WebContextMenuItemData::selectionHandler):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::internalShowContextMenu): Make the decoder argument optional. Make consulting the client optional.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::showTelephoneNumberMenu):
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKSelectionHandlerWrapper initWithSelectionHandler:std::]):
(-[WKSelectionHandlerWrapper executeSelectionHandler]):
(-[WKMenuTarget forwardContextMenuAction:]):
(WebKit::nsMenuItemVector):
(WebKit::WebContextMenuProxyMac::contextMenuItemSelected): If the represented object is a WKSelectionHandlerWrapper,
execute the selection handler. Do nothing else.
Instead of getting rects from ranges, creating highlights, and storing those highlights,
work in terms of a TelephoneNumberData object that wraps both a range and a highlight.
This makes it easier to track where the mouse is down and to know what phone number we should act on when clicked.
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp:
(WebKit::TelephoneNumberOverlayController::rectsForDrawing): Deleted.
* WebProcess/WebPage/TelephoneNumberOverlayController.h:
(WebKit::TelephoneNumberData::create):
(WebKit::TelephoneNumberData::range):
(WebKit::TelephoneNumberData::highlight):
(WebKit::TelephoneNumberData::TelephoneNumberData):
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm:
(WebKit::TelephoneNumberOverlayController::drawRect):
(WebKit::TelephoneNumberOverlayController::handleTelephoneClick): Pass the phone number text and the point to WebPage.
(WebKit::TelephoneNumberOverlayController::mouseEvent):
(WebKit::TelephoneNumberOverlayController::clearMouseDownInformation):
(WebKit::TelephoneNumberOverlayController::clearHighlights):
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::menuItemsWithUserData):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::handleTelephoneNumberClick): Message the phone number and coordinate to the UIProcess.
2014-04-07 Dan Bernstein <mitz@apple.com>
Introduce API::InjectedBundle::PageUIClient
https://bugs.webkit.org/show_bug.cgi?id=131310
Reviewed by Anders Carlsson.
* WebKit2.xcodeproj/project.pbxproj: Added references to new files.
* WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: Added #include that
became necessary.
* WebProcess/InjectedBundle/API/APIInjectedBundlePageUIClient.h: Added.
(API::InjectedBundle::PageUIClient::~PageUIClient):
(API::InjectedBundle::PageUIClient::willAddMessageToConsole):
(API::InjectedBundle::PageUIClient::willSetStatusbarText):
(API::InjectedBundle::PageUIClient::willRunJavaScriptAlert):
(API::InjectedBundle::PageUIClient::willRunJavaScriptConfirm):
(API::InjectedBundle::PageUIClient::willRunJavaScriptPrompt):
(API::InjectedBundle::PageUIClient::mouseDidMoveOverElement):
(API::InjectedBundle::PageUIClient::pageDidScroll):
(API::InjectedBundle::PageUIClient::shouldGenerateFileForUpload):
(API::InjectedBundle::PageUIClient::generateFileForUpload):
(API::InjectedBundle::PageUIClient::statusBarIsVisible):
(API::InjectedBundle::PageUIClient::menuBarIsVisible):
(API::InjectedBundle::PageUIClient::toolbarsAreVisible):
(API::InjectedBundle::PageUIClient::didReachApplicationCacheOriginQuota):
(API::InjectedBundle::PageUIClient::didExceedDatabaseQuota):
(API::InjectedBundle::PageUIClient::plugInStartLabelTitle):
(API::InjectedBundle::PageUIClient::plugInStartLabelSubtitle):
(API::InjectedBundle::PageUIClient::plugInExtraStyleSheet):
(API::InjectedBundle::PageUIClient::plugInExtraScript):
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKBundlePageSetUIClient): Changed to create an InjectedBundlePageUIClient and set it on
the WebPage.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp:
(WebKit::InjectedBundlePageUIClient::InjectedBundlePageUIClient): Added constructor from
WKBundlePageUIClient.
(WebKit::toUIElementVisibility): Added helper to convert from C SPI enum to internal enum.
(WebKit::InjectedBundlePageUIClient::statusBarIsVisible): Changed to use the above.
(WebKit::InjectedBundlePageUIClient::menuBarIsVisible): Ditto.
(WebKit::InjectedBundlePageUIClient::toolbarsAreVisible): Ditto.
* WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Added inheritance from
API::InjectedBundle::PageUIClient, marked overrides as such.
* WebProcess/Storage/StorageAreaMap.cpp: Added #include that became necessary.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::toolbarsVisible): Updated to use new internal enum.
(WebKit::WebChromeClient::statusbarVisible): Ditto.
(WebKit::WebChromeClient::menubarVisible): Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage): Initialized m_uiClient member.
(WebKit::WebPage::setInjectedBundleUIClient): Added. Updates m_uiClient.
(WebKit::WebPage::close): Updated for change in m_uiClient.
(WebKit::WebPage::pageDidScroll): Ditto.
(WebKit::WebPage::initializeInjectedBundleUIClient): Deleted.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::injectedBundleUIClient): Updated return type.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: Added #include that became
necessary.
2014-04-06 Dan Bernstein <mitz@apple.com>
Clean up WKGestureTypes.h
https://bugs.webkit.org/show_bug.cgi?id=131286
Reviewed by Sam Weinig.
Renamed WKGestureTypes.h to GestureTypes.h, dropped the useless “WK” prefixes and changed
into scoped enums, with the exception of SelectionFlags.
* Shared/ios/GestureTypes.h: Copied from Source/WebKit2/Shared/ios/WKGestureTypes.h.
* Shared/ios/WKGestureTypes.h: Removed.
* UIProcess/API/Cocoa/_WKElementAction.mm:
(copyElement):
(saveImage):
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didUpdateBlockSelectionWithTouch):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _performAction:]):
(toGestureType):
(toUIWKGestureType):
(toSelectionTouch):
(toUIWKSelectionTouch):
(toGestureRecognizerState):
(toUIGestureRecognizerState):
(toUIWKSelectionFlags):
(toSelectionHandlePosition):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKContentView _didUpdateBlockSelectionWithTouch:withFlags:growThreshold:shrinkThreshold:]):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
(-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
(-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
(-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::selectWithGesture):
(WebKit::distanceBetweenRectsForPosition):
(WebKit::computeEdgeCenter):
(WebKit::WebPage::expandedRangeFromHandle):
(WebKit::WebPage::contractedRangeFromHandle):
(WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
(WebKit::shouldExpand):
(WebKit::WebPage::changeBlockSelection):
(WebKit::WebPage::updateBlockSelectionWithTouch):
(WebKit::WebPage::updateSelectionWithTouches):
(WebKit::WebPage::performActionOnElement):
2014-04-06 Sam Weinig <sam@webkit.org>
Document user content related APIs..
Reviewed by Anders Carlsson.
- Also demote WKScriptWorld to SPI.
* UIProcess/API/Cocoa/WKScriptMessage.h:
* UIProcess/API/Cocoa/WKScriptMessage.mm:
(-[WKScriptMessage _scriptWorld]):
(-[WKScriptMessage scriptWorld]): Deleted.
* UIProcess/API/Cocoa/WKScriptMessageHandler.h:
* UIProcess/API/Cocoa/WKScriptMessagePrivate.h: Added.
* UIProcess/API/Cocoa/WKScriptWorld.h: Removed.
* UIProcess/API/Cocoa/WKScriptWorld.mm: Removed.
* UIProcess/API/Cocoa/WKUserContentController.h:
* UIProcess/API/Cocoa/WKUserContentController.mm:
(-[WKUserContentController addScriptMessageHandler:name:]):
(-[WKUserContentController removeScriptMessageHandlerForName:]):
(-[WKUserContentController _addScriptMessageHandler:name:world:]):
(-[WKUserContentController _removeScriptMessageHandlerForName:world:]):
(-[WKUserContentController addScriptMessageHandler:name:world:]): Deleted.
(-[WKUserContentController removeScriptMessageHandlerForName:world:]): Deleted.
* UIProcess/API/Cocoa/WKUserContentControllerPrivate.h: Added.
* UIProcess/API/Cocoa/_WKScriptWorld.h: Copied from WebKit2/UIProcess/API/Cocoa/WKScriptWorld.h.
* UIProcess/API/Cocoa/_WKScriptWorld.mm: Copied from WebKit2/UIProcess/API/Cocoa/WKScriptWorld.mm.
(+[_WKScriptWorld defaultWorld]):
(+[WKScriptWorld defaultWorld]): Deleted.
* WebKit2.xcodeproj/project.pbxproj:
2014-04-04 Brian J. Burg <burg@cs.washington.edu>
Enable WEB_REPLAY for PLATFORM(MAC)
https://bugs.webkit.org/show_bug.cgi?id=130700
Reviewed by Timothy Hatcher.
* Configurations/FeatureDefines.xcconfig:
2014-04-05 Miyoung Shin <myid.m.shin@gmail.com>
[WK2] Fix unused parameter compile warning.
https://bugs.webkit.org/show_bug.cgi?id=131260
Reviewed by Gyuyoung Kim.
fix unused parameter warning in the WebKit2 build.
* UIProcess/API/APIDownloadClient.h:
(API::DownloadClient::didReceiveData):
(API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
(API::DownloadClient::decideDestinationWithSuggestedFilename):
(API::DownloadClient::didCreateDestination):
2014-04-05 Alexey Proskuryakov <ap@apple.com>
REGRESSION (NetworkProcess): Subresources fail to load from AppCache
https://bugs.webkit.org/show_bug.cgi?id=131262
<rdar://problem/15370653>
Reviewed by Sam Weinig.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad): Check application cache,
as done in ResourceLoader::start() for in-process loads.
2014-04-05 Alexey Proskuryakov <ap@apple.com>
Frequent PluginProcess crashes at libsqlite3.dylib: openDatabase
https://bugs.webkit.org/show_bug.cgi?id=131264
<rdar://problem/14165329>
Reviewed by Sam Weinig.
Don't create NSURLCache until after having called setenv.
* PluginProcess/PluginProcess.h: Added m_nsurlCacheDirectory.
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitializePluginProcess): Compute NSURL cache path
on our own. This does not match CFNetwork's result in most cases, but should work
equally well.
(WebKit::PluginProcess::initializeSandbox): Create a cache with our path and best
guess for capacity.
2014-04-04 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed. iOS Build fix after r166818.
These member variables / declarations are accessed by iOS
in shared code in TelephoneNumberOverlayControllerMac.
* WebProcess/WebPage/TelephoneNumberOverlayController.h:
2014-04-04 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed. Rollout r166812, breaks 32-bit Mavericks build.
* Shared/mac/CookieStorageShim.mm:
(WebKit::CookieStorageShim::initialize):
(-[WKNSURLSessionLocal _copyCookiesForRequestUsingAllAppropriateStorageSemantics:]):
2014-04-04 Brady Eidson <beidson@apple.com>
Show DataDetector UI on scanned phone numbers.
<rdar://problem/16379588> and https://bugs.webkit.org/show_bug.cgi?id=131247
Reviewed by Tim Horton.
Add a new PageOverlay for telephone number UI, handle drawing the UI, and
handle mouse clicks on the button in that UI.
Even though clicks are detected, they aren’t acted upon yet.
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::selectedTelephoneNumberRangesChanged): Pass ranges to
the TelephoneNumberController.
* WebProcess/WebCoreSupport/WebEditorClient.h:
This controller handles installing/removing the PageOverlay, drawing the UI elements,
and handling mouse events while any of the UI elements are shown.
There’s also a clumsy attempt to keep platform-specific parts separated out.
* WebProcess/WebPage/TelephoneNumberOverlayController.cpp: Added.
(WebKit::TelephoneNumberOverlayController::TelephoneNumberOverlayController):
(WebKit::TelephoneNumberOverlayController::createOverlayIfNeeded):
(WebKit::TelephoneNumberOverlayController::destroyOverlay):
(WebKit::TelephoneNumberOverlayController::pageOverlayDestroyed):
(WebKit::TelephoneNumberOverlayController::willMoveToWebPage):
(WebKit::TelephoneNumberOverlayController::didMoveToWebPage):
(WebKit::TelephoneNumberOverlayController::rectsForDrawing):
(WebKit::TelephoneNumberOverlayController::selectedTelephoneNumberRangesChanged):
* WebProcess/WebPage/TelephoneNumberOverlayController.h: Added.
(WebKit::TelephoneNumberOverlayController::create):
* WebProcess/WebPage/mac/TelephoneNumberOverlayControllerMac.mm: Added.
(WebKit::TelephoneNumberOverlayController::drawRect):
(WebKit::TelephoneNumberOverlayController::handleTelephoneClick):
(WebKit::TelephoneNumberOverlayController::mouseEvent):
(WebKit::TelephoneNumberOverlayController::clearMouseDownInformation):
(WebKit::TelephoneNumberOverlayController::clearHighlights):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::telephoneNumberOverlayController):
* WebProcess/WebPage/WebPage.h:
* WebKit2.xcodeproj/project.pbxproj:
2014-04-04 Martin Hock <mhock@apple.com>
Include Session ID in WebPageCreationParameters.
https://bugs.webkit.org/show_bug.cgi?id=131239
<rdar://problem/16175483>
Reviewed by Sam Weinig.
* 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):
2014-04-04 Jer Noble <jer.noble@apple.com>
[Mac][WK2] Videos do not have access to session cookies
https://bugs.webkit.org/show_bug.cgi?id=129687
Reviewed by Eric Carlson.
Update the CookieStorageShim to track changes in underlying networking stack.
* Shared/mac/CookieStorageShim.mm:
(WebKit::CookieStorageShim::initialize):
(-[WKNSURLSessionLocal _getCookieHeadersForTask:completionHandler:]):
2014-04-04 Alexey Proskuryakov <ap@apple.com>
Improve error checking in WebPageProxy::didReceiveEvent
https://bugs.webkit.org/show_bug.cgi?id=131243
<rdar://problem/16529207>
Reviewed by Anders Carlsson.
* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveEvent):
2014-04-04 Anders Carlsson <andersca@apple.com>
More documentation
https://bugs.webkit.org/show_bug.cgi?id=131238
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2014-04-04 Raphael Kubo da Costa <raphael.kubo.da.costa@intel.com>
[GTK][CMake] Use a stricter check for the HAVE_GTK_UNIX_PRINTING define
https://bugs.webkit.org/show_bug.cgi?id=131226
Reviewed by Carlos Garcia Campos.
#cmakedefine01 will define HAVE_GTK_UNIX_PRINTING to 0 instead of #undef'ining it. This
means that simple checks like #ifdef HAVE_GTK_UNIX_PRINTING will always be true -- we
actually need to check if the value is set to 1, which is precisely what the HAVE() macro
does, so start using it.
* UIProcess/API/gtk/WebKitPrintOperation.cpp:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::print):
* WebProcess/WebPage/gtk/PrinterListGtk.cpp:
* WebProcess/WebPage/gtk/PrinterListGtk.h:
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
(WebKit::WebPrintOperationGtk::create):
2014-04-03 Chris Fleizach <cfleizach@apple.com>
AX: iOS does not need to spin the run loop on synchronous message calls
https://bugs.webkit.org/show_bug.cgi?id=131195
Reviewed by Dan Bernstein.
On the Mac platform, we need to spin the run loop while making synchronous calls to avoid VoiceOver hanging.
On iOS, this not needed due to architectural differences.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::synchronousMessagesShouldSpinRunLoop):
* WebProcess/WebPage/WebPage.h:
2014-04-03 Andy Estes <aestes@apple.com>
[Cocoa] Add additional WKWebView SPI for clients that interact with PDFs
https://bugs.webkit.org/show_bug.cgi?id=131206
Reviewed by Dan Bernstein.
Add _dataForDisplayedPDF and _suggestedFilenameForDisplayedPDF to
support clients that wish to save a copy of the currently displayed PDF
to disk. Ultimately we should support this use case by exposing something
like WKWebViewContentProvider, but for now let's do something simple.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:data:]):
(-[WKWebView _dataForDisplayedPDF]):
(-[WKWebView _suggestedFilenameForDisplayedPDF]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/WKWebViewContentProvider.h:
* UIProcess/ios/WKPDFView.h:
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView documentData]):
(-[WKPDFView suggestedFilename]):
(-[WKPDFView web_setContentProviderData:suggestedFilename:]):
2014-04-03 Eunmi Lee <eunmi15.lee@samsung.com>
[EFL][WK2] Add API to get contents size of current web page.
https://bugs.webkit.org/show_bug.cgi?id=131148
Reviewed by Gyuyoung Kim.
Application can want to get contents size of current web page without
monitoring "contents,size,changed" signal, so I add API to get contents
size directly.
* UIProcess/API/C/CoordinatedGraphics/WKView.cpp:
(WKViewGetContentsSize): WK API to get contents size from WebView.
* UIProcess/API/C/CoordinatedGraphics/WKView.h:
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_contents_size_get): new API to get contents size.
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
2014-04-03 Jinwoo Song <jinwoo7.song@samsung.com>
[WK2][EFL] Use template method in creating NativeWebMouseEvent
https://bugs.webkit.org/show_bug.cgi?id=131152
Reviewed by Anders Carlsson.
There are three EFL mouse events, such as Evas_Event_Mouse_Down, Evas_Event_Mouse_Up,
and Evas_Event_Mouse_Move. They can be defined as a template method.
* PlatformEfl.cmake: Remove NativeWebMouseEventEfl.cpp
* Shared/NativeWebMouseEvent.h:
(WebKit::NativeWebMouseEvent::NativeWebMouseEvent): Add a template method.
* Shared/efl/NativeWebMouseEventEfl.cpp: Removed.
2014-04-03 Anders Carlsson <andersca@apple.com>
Add WKWebView documentation
https://bugs.webkit.org/show_bug.cgi?id=131190
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKWebView.h:
2014-04-03 Michael Saboff <msaboff@apple.com>
REGRESSION: PCE.js is 20x slower in WebKit2 because timers are throttled
https://bugs.webkit.org/show_bug.cgi?id=131189
Reviewed by Geoffrey Garen.
Elevate the priority of all WebKit2 service processes on iOS, not just the network process.
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
2014-04-03 Simon Fraser <simon.fraser@apple.com>
ASSERT(m_children.isEmpty()) in PlatformCALayerRemote::removeAllSublayers() on time.com
https://bugs.webkit.org/show_bug.cgi?id=131187
Reviewed by Maciej Stachowiak.
After a call to PlatformCALayerRemote::adoptSublayers() when a layer
toggles between tiled and non-tiled, we'd assert in PlatformCALayerRemote::removeAllSublayers()
that not all sublayers had been removed (there was one with a null superlayer).
Fix by ensuring that we don't copy over custom subviews when adoptSublayers()
is called; they'll get added as we update children anyway.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::adoptSublayers):
2014-04-03 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Add SPI to handle animated resize
https://bugs.webkit.org/show_bug.cgi?id=131141
Reviewed by Simon Fraser.
Set up a basic API to handle animated resize. The code does not do much at the moment,
it is mostly to have an interface we can implement later.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView setFrame:]):
(-[WKWebView setBounds:]):
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _frameOrBoundsChangedFrom:]):
(-[WKWebView _beginAnimatedResizeToSize:obscuredInsets:minimumLayoutSizeOverride:]):
(-[WKWebView _endAnimatedResize]):
(-[WKWebView _frameOrBoundsChanged]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-04-03 Simon Fraser <simon.fraser@apple.com>
Pixelated WebView when display is changed from hiDPI to regularDPI
https://bugs.webkit.org/show_bug.cgi?id=131185
<rdar://problem/16512184&16503714>
Reviewed by Tim Horton.
TileController function was renamed.
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
(WebKit::PlatformCALayerRemoteTiledBacking::setContentsScale):
2014-04-03 Sam Weinig <sam@webkit.org>
[WebKit2] Promote user script SPI to API
https://bugs.webkit.org/show_bug.cgi?id=131181
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKScriptMessage.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptMessage.h.
* UIProcess/API/Cocoa/WKScriptMessage.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptMessage.mm.
(-[WKScriptMessage scriptWorld]):
(-[_WKScriptMessage scriptWorld]): Deleted.
* UIProcess/API/Cocoa/WKScriptMessageHandler.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptMessageHandler.h.
* UIProcess/API/Cocoa/WKScriptWorld.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
* UIProcess/API/Cocoa/WKScriptWorld.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.mm.
(+[WKScriptWorld defaultWorld]):
(+[_WKScriptWorld defaultWorld]): Deleted.
* UIProcess/API/Cocoa/WKUserContentController.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentController.h.
* UIProcess/API/Cocoa/WKUserContentController.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKUserContentController.mm.
(-[WKUserContentController addScriptMessageHandler:name:world:]):
(-[WKUserContentController removeScriptMessageHandlerForName:world:]):
(-[_WKUserContentController addScriptMessageHandler:name:world:]): Deleted.
(-[_WKUserContentController removeScriptMessageHandlerForName:world:]): Deleted.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration userContentController]):
(-[WKWebViewConfiguration setUserContentController:]):
(-[WKWebViewConfiguration _userContentController]): Deleted.
(-[WKWebViewConfiguration _setUserContentController:]): Deleted.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKScriptMessage.h: Removed.
* UIProcess/API/Cocoa/_WKScriptMessage.mm: Removed.
* UIProcess/API/Cocoa/_WKScriptMessageHandler.h: Removed.
* UIProcess/API/Cocoa/_WKScriptWorld.h: Removed.
* UIProcess/API/Cocoa/_WKScriptWorld.mm: Removed.
* UIProcess/API/Cocoa/_WKUserContentController.h: Removed.
* UIProcess/API/Cocoa/_WKUserContentController.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:
2014-04-03 Anders Carlsson <andersca@apple.com>
Make download policy decisions SPI for now
https://bugs.webkit.org/show_bug.cgi?id=131179
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/API/Cocoa/WKNavigationDelegatePrivate.h:
(NS_ENUM):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
2014-04-02 Simon Fraser <simon.fraser@apple.com>
Harden FilterOperation type casting
https://bugs.webkit.org/show_bug.cgi?id=131142
Reviewed by Sam Weinig.
DefaultFilterOperation had an error-prone behavior where it set the base class
OperationType to the type of some other filter class, but overrode isDefault().
This made it very easy to write incorrect code that casted incorrectly based on type().
Fix by making adding a DEFAULT filter operation type, and storing the represented
type on DefaultFilterOperation().
Also remove the OperationType argument for constructors of FilterOperations that
can only be of one type, to avoid possible mistakes.
Make the type cast macros a bit more normal, and use them in a few places.
Fixed PlatformCAFiltersMac to handle the default filter case more cleanly.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeFilterOperation):
(IPC::decodeFilterOperation):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
2014-04-03 Alexey Proskuryakov <ap@apple.com>
REGRESSION (Async text input): Controls become unresponsive to mouse events
https://bugs.webkit.org/show_bug.cgi?id=131176
<rdar://problem/16507932>
Reviewed by Tim Horton.
* UIProcess/API/mac/WKView.mm: (NATIVE_MOUSE_EVENT_HANDLER):
Don't confuse event handling machinery by sending events to WebProcess twice.
2014-04-03 Anders Carlsson <andersca@apple.com>
WKWebView should always have a UIDelegate, even when closed
https://bugs.webkit.org/show_bug.cgi?id=131174
<rdar://problem/16389248>
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView UIDelegate]):
(-[WKWebView setUIDelegate:]):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIDelegate::UIDelegate):
(WebKit::UIDelegate::~UIDelegate):
(WebKit::UIDelegate::createUIClient):
(WebKit::UIDelegate::delegate):
(WebKit::UIDelegate::setDelegate):
(WebKit::UIDelegate::UIClient::UIClient):
(WebKit::UIDelegate::UIClient::~UIClient):
(WebKit::UIDelegate::UIClient::createNewPage):
(WebKit::UIDelegate::UIClient::runJavaScriptAlert):
(WebKit::UIDelegate::UIClient::runJavaScriptConfirm):
(WebKit::UIDelegate::UIClient::runJavaScriptPrompt):
(WebKit::UIDelegate::UIClient::actionsForElement):
(WebKit::UIClient::UIClient): Deleted.
(WebKit::UIClient::~UIClient): Deleted.
(WebKit::UIClient::delegate): Deleted.
(WebKit::UIClient::setDelegate): Deleted.
(WebKit::UIClient::createNewPage): Deleted.
(WebKit::UIClient::runJavaScriptAlert): Deleted.
(WebKit::UIClient::runJavaScriptConfirm): Deleted.
(WebKit::UIClient::runJavaScriptPrompt): Deleted.
(WebKit::UIClient::actionsForElement): Deleted.
* UIProcess/ios/WKActionSheetAssistant.mm:
2014-04-02 Anders Carlsson <andersca@apple.com>
Document WKNavigationAction and WKNavigationResponse
https://bugs.webkit.org/show_bug.cgi?id=131138
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKFrameInfo.h:
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationResponse.h:
2014-04-03 Anders Carlsson <andersca@apple.com>
Make actionsForElement a proper API::UIClient member function
https://bugs.webkit.org/show_bug.cgi?id=131171
Reviewed by Sam Weinig.
* UIProcess/API/APIUIClient.h:
(API::UIClient::actionsForElement):
* UIProcess/Cocoa/UIDelegate.h:
* UIProcess/Cocoa/UIDelegate.mm:
(WebKit::UIClient::actionsForElement):
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
2014-04-03 Martin Hodovan <mhodovan@inf.u-szeged.hu>
[WK2] Fix !ENABLE(BLOB) build
https://bugs.webkit.org/show_bug.cgi?id=131164
Reviewed by Alexey Proskuryakov.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::NetworkConnectionToWebProcess::didClose):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
2014-04-03 Anders Carlsson <andersca@apple.com>
Fix iOS build.
* UIProcess/ios/WKActionSheetAssistant.mm:
2014-04-03 Anders Carlsson <andersca@apple.com>
Rename UIClient.{h, mm} to UIDelegate.{h, mm}.
Rubber-stamped by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/Cocoa/UIDelegate.h: Renamed from Source/WebKit2/UIProcess/Cocoa/UIClient.h.
* UIProcess/Cocoa/UIDelegate.mm: Renamed from Source/WebKit2/UIProcess/Cocoa/UIClient.mm.
* WebKit2.xcodeproj/project.pbxproj:
2014-04-03 Andrzej Badowski <a.badowski@samsung.com>
[EFL][WK2] Replacing zoom functionality of MiniBrowser from scale_set to page_zoom_set.
https://bugs.webkit.org/show_bug.cgi?id=130391
Reviewed by Gyuyoung Kim.
Change the implementation of the zoom functionality from ewk_view_scale_set
to ewk_view_page_zoom_set. Adding to the API functions: ewk_view_page_zoom_set and
ewk_view_page_zoom_get to call appropriate WK functions.
* UIProcess/API/efl/ewk_view.cpp:
(ewk_view_page_zoom_set):
(ewk_view_page_zoom_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
2014-04-02 Alexey Proskuryakov <ap@apple.com>
Sandbox violation in NetworkProcess when uploading a bundle
https://bugs.webkit.org/show_bug.cgi?id=131133
Reviewed by Brady Eidson.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::cleanup):
(WebKit::NetworkResourceLoader::didReceiveResponseAsync):
Don't delete the files. It can't work.
2014-04-02 Jinwoo Song <jinwoo7.song@samsung.com>
[WK2][EFL] Remove unnecessary reinterpret_cast<> in unit testcase
https://bugs.webkit.org/show_bug.cgi?id=131143
Reviewed by Gyuyoung Kim.
Ecore_Timer callback requires *Eina_Bool* return type instead of *bool*.
Also, WebKit/EFL port coding style recommends to use *Eina_Bool* in the
callback function for EFL event handler. Additionally, replaced 0 to nullptr.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::CallbackDataTimer::CallbackDataTimer):
(EWK2UnitTest::CallbackDataTimer::setDone):
(EWK2UnitTest::CallbackDataTimer::timeOutCallback):
(EWK2UnitTest::CallbackDataTimer::setTimedOut):
* UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
(EWK2StorageManagerTest::timerCallback):
(TEST_F):
2014-04-02 Tim Horton <timothy_horton@apple.com>
Remove a FIXME that happened.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):
2014-04-02 Tim Horton <timothy_horton@apple.com>
Fix the !USE(IOSURFACE) build... again.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
2014-04-02 Mark Rowe <mrowe@apple.com>
<https://webkit.org/b/131135> Introduce LockHistory and LockBackForwardList enums to use in place of bools.
These arguments are often passed using literals at the call site, where the use of bools severely hinders
the readability of the code.
Reviewed by Andreas Kling.
* WebProcess/Plugins/PDF/PDFPlugin.mm:
(WebKit::PDFPlugin::clickedLink):
2014-04-02 Tim Horton <timothy_horton@apple.com>
Pool IOSurfaces to help with allocation cost
https://bugs.webkit.org/show_bug.cgi?id=131096
<rdar://problem/15373942>
Reviewed by Simon Fraser.
* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::~RemoteLayerBackingStore):
(WebKit::RemoteLayerBackingStore::clearBackingStore):
(WebKit::RemoteLayerBackingStore::display):
When RemoteLayerBackingStore discards a layer, throw it into the pool.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
Disable the pool in the UI process.
2014-04-02 Alice Barraclough <alice.barraclough@apple.com>
Fix a typo causing TestWebKitAPI to timeout when testing Find.
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageFindClient): Test for !functionPointer like
all the other implementations do.
2014-04-02 Dean Jackson <dino@apple.com>
[iOS] Expose geolocation provider on the process pool
https://bugs.webkit.org/show_bug.cgi?id=131125
Reviewed by Dan Bernstein.
Followup comments from Dan Bernstein. Use a class
extension rather than a new category.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _geolocationProvider]):
* UIProcess/API/Cocoa/WKProcessPoolInternal.h:
2014-04-02 Tim Horton <timothy_horton@apple.com>
RemoteLayerBackingStore doesn't need to clear opaque layers
https://bugs.webkit.org/show_bug.cgi?id=131134
Reviewed by Simon Fraser.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):
We don't need to clear opaque layers, because we'll paint
over the whole area. In addition, we should fill opaque layers
with a bright color in debug builds to make it very clear
that we've made a mistake (similar to what FrameView does).
2014-04-02 Anders Carlsson <andersca@apple.com>
Document WKBackForwardList, WKBackForwardListItem and WKWebViewConfiguration
https://bugs.webkit.org/show_bug.cgi?id=131131
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
2014-04-02 Anders Carlsson <andersca@apple.com>
Document WKUIDelegate and WKWindowFeatures
https://bugs.webkit.org/show_bug.cgi?id=131124
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKProcessPool.h:
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKWindowFeatures.h:
2014-04-02 Dean Jackson <dino@apple.com>
[iOS] Expose geolocation provider on the process pool
https://bugs.webkit.org/show_bug.cgi?id=131125
Patch by Sam Weinig.
Reviewed by Dean Jackson.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _geolocationProvider]): Create and initialize WKGeolocationProviderIOS if necessary.
* UIProcess/API/Cocoa/WKProcessPoolInternal.h: Expose _geolocationProvider.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]): Call into WKProcessPool.
2014-04-02 Martin Hock <mhock@apple.com>
Unify private browsing with sessions.
https://bugs.webkit.org/show_bug.cgi?id=130099
Reviewed by Alexey Proskuryakov.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: Change WebPage::isUsingEphemeralSession() to WebPage::usesEphemeralSession().
(WKBundlePageIsUsingEphemeralSession):
* WebProcess/InjectedBundle/InjectedBundle.cpp: Change Settings::setPrivateBrowsingEnabled() to Page::enableLegacyPrivateBrowsing().
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
* WebProcess/Plugins/PluginView.cpp: Change Settings::privateBrowsingEnabled() to Page::usesEphemeralSession().
(WebKit::PluginView::isPrivateBrowsingEnabled):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp: Ditto.
(WebKit::WebFrameNetworkingContext::storageSession):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::usesEphemeralSession): Renamed from isUsingEphemeralSession.
(WebKit::WebPage::setSessionID): Ensure session before setting.
(WebKit::WebPage::updatePreferences): Set session to legacy private session if needed.
(WebKit::WebPage::sessionID): Moved to header.
(WebKit::WebPage::isUsingEphemeralSession): Renamed to usesEphemeralSession.
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::sessionID): Just call down to m_page.
2014-04-02 Alice Barraclough <alice.liu@apple.com>
Adding Objective-C SPI for Find in Page.
https://bugs.webkit.org/show_bug.cgi?id=131000 Need an Objective-C API or SPI for Find in Page
Reviewed by Dan Bernstein.
Find-on-page SPI added to WKWebView, which funnels the messages through the WebPageProxy.
Returning messages are designated by _WKFindDelegate protocol.
Also provide FindDelegate access on WKWebView.
WebPageProxy gets a new-style API::FindClient.
Also had to replicate WKFindOptions as _WKFindOptions in Cocoa SPI. This is unfortunate, but it
does follow the pattern of other options & enums related to classes that are SPI-for-now.
PageClientImplIOS handles setFindIndicator function by forwarding to its WKContentView,
but WKContentView _setFindIndicator remains unimplemented for now.
* UIProcess/API/APIFindClient.h: Added.
(API::FindClient::~FindClient):
(API::FindClient::didCountStringMatches):
(API::FindClient::didFindString):
(API::FindClient::didFailToFindString):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageFindClient):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView _findDelegate]):
(-[WKWebView _setFindDelegate:]):
(toFindOptions):
(-[WKWebView _countStringMatches:options:maxCount:]):
(-[WKWebView _findString:options:maxCount:]):
(-[WKWebView _hideFindUI]):
(-[WKWebView _hostForFindUI]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
(NS_OPTIONS):
* UIProcess/API/Cocoa/_WKFindDelegate.h: Added.
* UIProcess/Cocoa/FindClient.h: Added.
* UIProcess/Cocoa/FindClient.mm: Added.
(WebKit::FindClient::FindClient):
(WebKit::FindClient::delegate):
(WebKit::FindClient::setDelegate):
(WebKit::FindClient::didCountStringMatches):
(WebKit::FindClient::didFindString):
(WebKit::FindClient::didFailToFindString):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setFindClient):
(WebKit::WebPageProxy::close):
(WebKit::WebPageProxy::didCountStringMatches):
(WebKit::WebPageProxy::didFindString):
(WebKit::WebPageProxy::didFailToFindString):
(WebKit::WebPageProxy::initializeFindClient): Deleted.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::findClient):
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setFindIndicator):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _setFindIndicator:WebKit::fadeOut:animate:]):
* WebKit2.xcodeproj/project.pbxproj:
2014-04-02 Anders Carlsson <andersca@apple.com>
Rename -[WKBackForwardListItem originalURL] to -[WKBackForwardListItem initialURL]
https://bugs.webkit.org/show_bug.cgi?id=131116
Reviewed by Antti Koivisto.
* UIProcess/API/Cocoa/WKBackForwardListItem.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.mm:
(-[WKBackForwardListItem initialURL]):
(-[WKBackForwardListItem originalURL]): Deleted.
2014-04-02 Antti Koivisto <antti@apple.com>
Split tile grid out from TileController
https://bugs.webkit.org/show_bug.cgi?id=131102
Reviewed by Simon Fraser.
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
(WebKit::PlatformCALayerRemoteTiledBacking::PlatformCALayerRemoteTiledBacking):
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2014-04-02 Anders Carlsson <andersca@apple.com>
Try a workaround for a crash
https://bugs.webkit.org/show_bug.cgi?id=131112
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView UIDelegate]):
(-[WKWebView setUIDelegate:]):
2014-04-02 Martin Robinson <mrobinson@igalia.com>
REGRESSION(r165704): [GTK] Inspector resources not correctly generated
https://bugs.webkit.org/show_bug.cgi?id=130343
Reviewed by Gustavo Noronha Silva.
* PlatformGTK.cmake: Pass all appropriate directories to the
GResources XML generation script.
2014-04-02 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Move NEWS file to a new location
https://bugs.webkit.org/show_bug.cgi?id=130901
Reviewed by Brent Fulgham.
* gtk/NEWS: Renamed from Source/WebKit/gtk/NEWS.
2014-04-01 Benjamin Poulain <bpoulain@apple.com>
<rdar://problem/16294704> Remove _pageExtendedBackgroundColor entirely
https://bugs.webkit.org/show_bug.cgi?id=131075
Reviewed by Beth Dakin.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _pageExtendedBackgroundColor]): Deleted.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-04-01 Anders Carlsson <andersca@apple.com>
Stub out more WKNavigation properties
https://bugs.webkit.org/show_bug.cgi?id=131080
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigation.mm:
(-[WKNavigation initialRequest]):
(-[WKNavigation response]):
(-[WKNavigation error]):
2014-04-01 Anders Carlsson <andersca@apple.com>
Rename -[WKWebView activeURL] to -[WKWebView URL]
https://bugs.webkit.org/show_bug.cgi?id=131077
Reviewed by Tim Horton.
Keep -[WKWebView activeURL] as SPI until no clients depend on it.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView URL]):
(-[WKWebView activeURL]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::willChangeActiveURL):
(WebKit::NavigationState::didChangeActiveURL):
2014-04-01 Anders Carlsson <andersca@apple.com>
Move -[WKWebView stopLoading:] back to WKIBActions
https://bugs.webkit.org/show_bug.cgi?id=131072
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView stopLoading:]):
2014-04-01 Anders Carlsson <andersca@apple.com>
Migrate more headers
https://bugs.webkit.org/show_bug.cgi?id=131068
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKBackForwardList.h:
Remove a newline.
* WebKit2.xcodeproj/project.pbxproj:
Move files from the "Deprecated" group.
2014-04-01 Manuel Rego Casasnovas <rego@igalia.com>
[CSS Grid Layout] Enable runtime feature if feature flag is enabled
https://bugs.webkit.org/show_bug.cgi?id=130013
Reviewed by Simon Fraser.
Enable CSS Grid Layout runtime feature when ENABLE_CSS_GRID_LAYOUT flag is true.
* Shared/WebPreferencesStore.h:
2014-04-01 Anders Carlsson <andersca@apple.com>
Demote WKBackForwardListDidChangeNotification to SPI
https://bugs.webkit.org/show_bug.cgi?id=131059
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardList.mm:
* UIProcess/API/Cocoa/WKBackForwardListInternal.h:
* UIProcess/API/Cocoa/WKBackForwardListPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListInternal.h.
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::LoaderClient::didChangeBackForwardList):
* WebKit2.xcodeproj/project.pbxproj:
2014-04-01 Andy Estes <aestes@apple.com>
[Cocoa] Add SPI to determine if a WKWebView is displaying a PDF
https://bugs.webkit.org/show_bug.cgi?id=131063
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _isDisplayingPDF]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-04-01 Simon Fraser <simon.fraser@apple.com>
Remove some explicit template instantiations from logging code
https://bugs.webkit.org/show_bug.cgi?id=131065
Reviewed by Tim Horton.
No need to explicitly state template types.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::dumpChangedLayers):
2014-04-01 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Partial repaint is broken
https://bugs.webkit.org/show_bug.cgi?id=131056
Reviewed by Dean Jackson.
* Shared/mac/RemoteLayerBackingStore.mm:
(WebKit::RemoteLayerBackingStore::display):
We need to check if the repaint rects themselves cover the whole
layer's surface, not just their bounds. Otherwise, we'll optimize
out the back->front copy and end up not painting the whole layer.
2014-04-01 Anders Carlsson <andersca@apple.com>
Pass a WKNavigationAction to the create UIDelegate method
https://bugs.webkit.org/show_bug.cgi?id=131053
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/Cocoa/UIClient.h:
* UIProcess/Cocoa/UIClient.mm:
(WebKit::UIClient::setDelegate):
(WebKit::UIClient::createNewPage):
2014-04-01 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Remove the two finger pan gesture recognizer until it is actually implemented
https://bugs.webkit.org/show_bug.cgi?id=131009
Reviewed by Sam Weinig.
The two finger pan should not block the pinch gesture recognizer.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView _twoFingerPanRecognized:]): Deleted.
2014-04-01 Anders Carlsson <andersca@apple.com>
Remove limits from WKBackForwardList getters
https://bugs.webkit.org/show_bug.cgi?id=131052
Reviewed by Beth Dakin.
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardList.mm:
(-[WKBackForwardList backList]):
(-[WKBackForwardList forwardList]):
(-[WKBackForwardList backListCount]): Deleted.
(-[WKBackForwardList forwardListCount]): Deleted.
(-[WKBackForwardList backListWithLimit:]): Deleted.
(-[WKBackForwardList forwardListWithLimit:]): Deleted.
* UIProcess/WebBackForwardList.cpp:
(WebKit::WebBackForwardList::backList):
(WebKit::WebBackForwardList::forwardList):
* UIProcess/WebBackForwardList.h:
2014-04-01 Anders Carlsson <andersca@apple.com>
Stub out the web process -> UI process message SPI
https://bugs.webkit.org/show_bug.cgi?id=131048
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _userContentController]):
(-[WKWebViewConfiguration _setUserContentController:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKScriptMessage.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
* UIProcess/API/Cocoa/_WKScriptMessage.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
(-[_WKScriptMessage body]):
(-[_WKScriptMessage originatingWebView]):
* UIProcess/API/Cocoa/_WKScriptMessageHandler.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
* UIProcess/API/Cocoa/_WKScriptWorld.h:
* UIProcess/API/Cocoa/_WKUserContentController.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/_WKScriptWorld.h.
* UIProcess/API/Cocoa/_WKUserContentController.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h.
(-[_WKUserContentController addScriptMessageHandler:name:world:]):
(-[_WKUserContentController removeScriptMessageHandler:]):
* WebKit2.xcodeproj/project.pbxproj:
2014-04-01 Andreas Kling <akling@apple.com>
Invalidate CFNetwork connection cache on memory pressure.
<https://webkit.org/b/131038>
Stop holding on to cached HTTP connections if we come under memory pressure.
Reviewed by Geoff Malloc-Garen.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformLowMemoryHandler):
2014-04-01 Anders Carlsson <andersca@apple.com>
Tweak WKPreferences API
https://bugs.webkit.org/show_bug.cgi?id=131047
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences init]):
(-[WKPreferences initWithUserDefaultsKeyPrefix:]):
(-[WKPreferences userDefaultsKeyPrefix]):
(-[WKPreferences initWithUserDefaultsPrefixKey:]): Deleted.
(-[WKPreferences userDefaultsPrefixKey]): Deleted.
2014-03-31 Simon Fraser <simon.fraser@apple.com>
Enable WEB_TIMING on Mac and iOS
https://bugs.webkit.org/show_bug.cgi?id=128064
Reviewed by Sam Weinig, Brent Fulgham.
Enable WEB_TIMING.
* Configurations/FeatureDefines.xcconfig:
2014-03-31 Simon Fraser <simon.fraser@apple.com>
[UI-side compositing] Fix animations, and add logging
https://bugs.webkit.org/show_bug.cgi?id=131011
Reviewed by Tim Horton.
UI-side animations were broken because GraphicsLayerCARemote::addAnimation()
never called the superclass, so fix.
Add logging for animations to the layer tree commit output.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::dumpProperty):
(WebKit::RemoteLayerTreeTextStream::operator<<):
(WebKit::dumpChangedLayers):
* WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
(WebKit::GraphicsLayerCARemote::addAnimation):
2014-04-01 Zalan Bujtas <zalan@apple.com>
Build fix after r166582.
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
2014-04-01 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Transition class Image (and its dependencies) from int to float to enable subpixel positioned/sized images.
https://bugs.webkit.org/show_bug.cgi?id=130643
Reviewed by Simon Fraser.
This is in preparation to support subpixel positioned/sized background images. While 1x bitmap images can't take
subpixel sizing on hidpi resolutions, both generated and hidpi images can.
This patch does not change Image behavior in general as both position and size are still snapped to integral values.
No change in behavior.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::encodeImage):
* UIProcess/API/efl/EwkView.cpp:
(EwkView::updateCursor):
2014-04-01 Joonghun Park <jh718.park@samsung.com>
[EFL][WK2] Fix and update the existing test case for ewk_database_manager_origins_async_get API
https://bugs.webkit.org/show_bug.cgi?id=131017
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
Fix memory leaks and errors caused by duplication of Ecore_Timer deletion
as well as update a naming style of local variable.
(EWK2DatabaseManagerTest::databaseOriginsCallback):
(TEST_F):
2014-04-01 Zan Dobersek <zdobersek@igalia.com>
Don't copy the children map in webkitWebViewBaseContainerForall
https://bugs.webkit.org/show_bug.cgi?id=131016
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseContainerForall): Avoid copying the GtkWidget-to-IntRect HashMap object
by transforming the iteration to a range-based for-loop over that HashMap's keys.
2014-04-01 Zan Dobersek <zdobersek@igalia.com>
[GTK] Don't copy the ResourceResponse object in webkitWebViewDecidePolicy
https://bugs.webkit.org/show_bug.cgi?id=131015
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkitWebViewDecidePolicy): Avoid copying the ResourceResponce object returned by webkitURIResponseGetResourceResponse.
That function already returns a reference, so the return value should be stored accordingly.
2014-04-01 Eunmi Lee <eunmi15.lee@samsung.com>
[CoordinatedGraphics] Content scale factor should not be applied to draw contents when fixed layout is not used.
https://bugs.webkit.org/show_bug.cgi?id=130962
Reviewed by Gyuyoung Kim.
Delegating scaling is turned off when fixed layout is not used in the
coordinated graphics, so page scale factor is applied to the contents
directly.
In that case, we should not apply page scale factor to coordinated
graphics to draw contents and calculate visible content rect.
Currently, page scale factor is applied twice to the coordinated
graphics and contents, so result of scaling is abnormal.
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::transformToScene):
(WebKit::WebView::visibleContentsSize):
2014-04-01 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Rename ewk_application_cache_manager_delete{_all}
https://bugs.webkit.org/show_bug.cgi?id=131012
Reviewed by Gyuyoung Kim.
While discussing Bug 130577, we resulted that _clear and _xxx_del is better name for the EFL.
This patch will rename similar API in ewk_application_cache_manager.
In addition, fixed some typos in doxygen.
* UIProcess/API/efl/ewk_application_cache_manager.cpp:
(ewk_application_cache_manager_clear): Renamed from ewk_application_cache_manager_delete_all
(ewk_application_cache_manager_entries_for_origin_del): Renamed from ewk_application_cache_manager_delete
(ewk_application_cache_manager_delete_all): Deleted.
(ewk_application_cache_manager_delete): Deleted.
* UIProcess/API/efl/ewk_application_cache_manager.h:
* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
(TEST_F):
2014-03-31 Zan Dobersek <zdobersek@igalia.com>
Unreviewed GTK build fix after r166553.
* UIProcess/API/gtk/WebKitSettings.cpp:
(_WebKitSettingsPrivate::_WebKitSettingsPrivate): Pass 'WebKit2.' as the second argument to WebPreferences::create().
2014-03-31 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Extract the control of page background out of color_set
https://bugs.webkit.org/show_bug.cgi?id=127539
Reviewed by Gyuyoung Kim.
EFL have a way to change the color using evas_object_color_set and we used it to change background.
But, We should not use it because the alpha value of color_set is used
for the transparancy of object itself including background and contents.
This patch added ewk_view_bg_color_{get|set} to change the background color.
* UIProcess/API/C/efl/WKViewEfl.cpp:
Extracted controls of page background out of color_set.
color_set will be only used for the opacity of whole contents.
(WKViewSetBackgroundColor): Added to share page background color.
(WKViewGetBackgroundColor):
* UIProcess/API/C/efl/WKViewEfl.h:
* UIProcess/API/efl/EwkView.cpp:
(EwkView::handleEvasObjectColorSet):
* UIProcess/API/efl/ewk_view.cpp:
Removed ewk_view_draws_page_background_set which just control whether to draw background.
ewk_view_bg_color_set will conver it.
(ewk_view_bg_color_set):
(ewk_view_bg_color_get):
* UIProcess/API/efl/ewk_view.h:
* UIProcess/API/efl/tests/test_ewk2_view.cpp: Added simple test case.
* UIProcess/efl/WebViewEfl.cpp:
(WebKit::WebViewEfl::setViewBackgroundColor):
(WebKit::WebViewEfl::viewBackgroundColor):
* UIProcess/efl/WebViewEfl.h:
2014-03-31 Joonghun Park <jh718.park@samsung.com>
[EFL][WK2]Implement ewk APIs of web local storage which have deletion functions of the local storage entries
https://bugs.webkit.org/show_bug.cgi?id=130577
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/ewk_storage_manager.cpp:
(ewk_storage_manager_entries_clear):
(ewk_storage_manager_entries_for_origin_del):
* UIProcess/API/efl/ewk_storage_manager.h:
* UIProcess/API/efl/ewk_storage_manager_private.h:
(EwkStorageManager::wkStorageManager):
* UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
adding and updating API unittest and fixing memory leak of the existing test case
(EWK2StorageManagerTest::getStorageOriginsCallback):
(EWK2StorageManagerTest::checkOrigin):
(EWK2StorageManagerTest::getOrigin):
(TEST_F):
2014-03-31 Anders Carlsson <andersca@apple.com>
Rename policy enums to match the delegate methods
https://bugs.webkit.org/show_bug.cgi?id=131002
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
(WebKit::NavigationState::PolicyClient::decidePolicyForResponse):
2014-03-31 Anders Carlsson <andersca@apple.com>
Add more preferences
https://bugs.webkit.org/show_bug.cgi?id=131001
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences isJavaScriptEnabled]):
(-[WKPreferences setJavaScriptEnabled:]):
(-[WKPreferences javaScriptCanOpenWindowsAutomatically]):
(-[WKPreferences setJavaScriptCanOpenWindowsAutomatically:]):
(-[WKPreferences suppressesIncrementalRendering]):
(-[WKPreferences setSuppressesIncrementalRendering:]):
(-[WKPreferences isJavaEnabled]):
(-[WKPreferences setJavaEnabled:]):
(-[WKPreferences arePlugInsEnabled]):
(-[WKPreferences setPlugInsEnabled:]):
2014-03-31 Tim Horton <timothy_horton@apple.com>
Fix the build.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-03-31 Simon Fraser <simon.fraser@apple.com>
Fix the iOS build.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::setLayerID):
(WebKit::RemoteLayerTreeHost::layerID):
(WebKit::RemoteLayerTreeHost::createLayer):
2014-03-31 Anders Carlsson <andersca@apple.com>
Add a couple of iOS specific preferences
https://bugs.webkit.org/show_bug.cgi?id=130999
Reviewed by Simon Fraser.
* Shared/WebPreferencesStore.h:
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences allowsInlineMediaPlayback]):
(-[WKPreferences setAllowsInlineMediaPlayback:]):
(-[WKPreferences mediaPlaybackRequiresUserAction]):
(-[WKPreferences setMediaPlaybackRequiresUserAction:]):
(-[WKPreferences mediaPlaybackAllowsAirPlay]):
(-[WKPreferences setMediaPlaybackAllowsAirPlay:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-03-31 Anders Carlsson <andersca@apple.com>
Add a new -[WKPreferences initWithUserDefaultsPrefixKey:] initializer
https://bugs.webkit.org/show_bug.cgi?id=130996
Reviewed by Simon Fraser.
Add a "key prefix" to the WebKit::WebPreferences create function, so we can use a different
key prefix ("WebKit") for the modern API and not pollute the user defaults namespace with
the old key prefix ("WebKit2.").
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesCreate):
(WKPreferencesCreateWithIdentifier):
* UIProcess/API/Cocoa/WKPreferences.h:
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences init]):
(-[WKPreferences initWithUserDefaultsPrefixKey:]):
(-[WKPreferences userDefaultsPrefixKey]):
* UIProcess/WebPageGroup.cpp:
(WebKit::WebPageGroup::WebPageGroup):
* UIProcess/WebPreferences.cpp:
(WebKit::WebPreferences::WebPreferences):
* UIProcess/WebPreferences.h:
(WebKit::WebPreferences::create):
* UIProcess/mac/WebPreferencesMac.mm:
(WebKit::makeKey):
(WebKit::setStringValueIfInUserDefaults):
(WebKit::setBoolValueIfInUserDefaults):
(WebKit::setUInt32ValueIfInUserDefaults):
(WebKit::setDoubleValueIfInUserDefaults):
(WebKit::WebPreferences::platformInitializeStore):
(WebKit::WebPreferences::platformUpdateStringValueForKey):
(WebKit::WebPreferences::platformUpdateBoolValueForKey):
(WebKit::WebPreferences::platformUpdateUInt32ValueForKey):
(WebKit::WebPreferences::platformUpdateDoubleValueForKey):
(WebKit::WebPreferences::platformUpdateFloatValueForKey):
2014-03-31 Pratik Solanki <psolanki@apple.com>
Remove duplicate entries in Derived Sources.
Rubber-stamped by Anders Carlsson.
* WebKit2.xcodeproj/project.pbxproj:
2014-03-31 Tim Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
2014-03-31 Tim Horton <timothy_horton@apple.com>
Fix the build.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
2014-03-31 Anders Carlsson <andersca@apple.com>
Rename -[WKNavigationAction destinationFrame] to -[WKNavigationAction targetFrame]
https://bugs.webkit.org/show_bug.cgi?id=130994
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKNavigationAction.h:
* UIProcess/API/Cocoa/WKNavigationAction.mm:
(-[WKNavigationAction description]):
(-[WKNavigationAction targetFrame]):
(-[WKNavigationAction setTargetFrame:]):
(-[WKNavigationAction destinationFrame]): Deleted.
(-[WKNavigationAction setDestinationFrame:]): Deleted.
* UIProcess/API/Cocoa/WKNavigationActionInternal.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::PolicyClient::decidePolicyForNavigationAction):
2014-03-31 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Flush all surfaces after painting into all of them, instead of after painting into each one
https://bugs.webkit.org/show_bug.cgi?id=130768
<rdar://problem/16421471>
Reviewed by Benjamin Poulain.
* Shared/mac/RemoteLayerBackingStore.h:
Make RemoteLayerBackingStore noncopyable.
Add flush(), which synchronously flushes painting operations on the underlying backing store.
Add storage for the CGContext that needs to be flushed, and ensure that it is flushed before we paint again.
* Shared/mac/RemoteLayerBackingStore.mm:
(RemoteLayerBackingStore::display):
(RemoteLayerBackingStore::drawInContext):
Don't flush the context immediately after painting.
(RemoteLayerBackingStore::flush):
Flush the current front surface/buffer's context.
Clear the new pending-flush members.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::flushBackingStoreChangesInTransaction):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
Crawl through all of the valid changed backing stores in the transaction and flush them.
Reset changed properties after encoding the commit.
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::resetChangedProperties):
(WebKit::RemoteLayerTreeTransaction::changedLayers):
(WebKit::RemoteLayerTreeTransaction::changedLayerProperties):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
(WebKit::RemoteLayerTreeTransaction::layerPropertiesChanged):
(WebKit::dumpChangedLayers):
Instead of storing a copy of the LayerProperties struct for each changed layer
while building the transaction in the Web process, store a list of changed layers,
and directly encode the commit from those layers' LayerProperties. This provides a few benefits:
- We avoid copying LayerProperties for every changed layer, every commit
- We can make RemoteLayerBackingStore noncopyable
- We can walk the changed layers after building the transaction
in order to flush backing store, and actually affect the layers'
own RemoteLayerBackingStore instead of a copy.
The UI process will still generate a LayerPropertiesMap at decode time.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
Don't copy the LayerProperties struct for the debug overlay. Instead,
adjust the properties which the debug overlay whacks directly on the layer,
after applying the normal LayerProperties.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::recursiveBuildTransaction):
Don't reset changed layer properties in the middle of building a transaction. Instead,
RemoteLayerTreeDrawingArea::flushLayers() will reset all the flags on all changed layers
after the commit is encoded.
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
(WebKit::PlatformCALayerRemote::properties):
2014-03-31 Simon Fraser <simon.fraser@apple.com>
[UI-side compositing] Proxy animations to the UI process
https://bugs.webkit.org/show_bug.cgi?id=130946
Reviewed by Tim Horton.
Add encoding/decoding of TimingFunctions. Add encoding support
for HashSet.
Add PlatformCAAnimationRemote and have PlatformCALayerRemote allow
animations now. PlatformCALayerRemote's properties are defined in the class,
as is the encoding/decoding (much cleaner than having them in the transaction
class I think).
Add support for the "animationDidStart" callback and sending this back to the
web process. This involves a HashMap of layerID->WKAnimationDelegate stored
on the RemoteLayerTreeHost, and a message send via the DrawingArea. On the
other side, RemoteLayerTreeContext stores a HashMap of layerID->PlatformCALayerRemote*
for layers which have just started animations, which is used to get the
PlatformCALayer* to call animationDidStart() on.
This requires that the RemoteLayerTreeHost* be passed down into property application,
and that the RemoteLayerTreeHost have a reference to the drawing area.
To every CALayer in the UI process we -setValue:forKey: to track the PlatformLayerID,
so we can get back to it in order to dispatch "animationDidStart".
Replace some "using namespace WebKit" with "namespace WebKit { }".
* Platform/IPC/ArgumentCoders.h:
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<LinearTimingFunction>::encode):
(IPC::ArgumentCoder<LinearTimingFunction>::decode):
(IPC::ArgumentCoder<CubicBezierTimingFunction>::encode):
(IPC::ArgumentCoder<CubicBezierTimingFunction>::decode):
(IPC::ArgumentCoder<StepsTimingFunction>::encode):
(IPC::ArgumentCoder<StepsTimingFunction>::decode):
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/RemoteLayerBackingStore.mm:
* Shared/mac/RemoteLayerTreePropertyApplier.h:
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer):
(WebKit::RemoteLayerTreePropertyApplier::applyProperties):
* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::layerID):
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::RemoteLayerTreeDrawingAreaProxy):
(WebKit::RemoteLayerTreeDrawingAreaProxy::acceleratedAnimationDidStart):
(WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
* UIProcess/mac/RemoteLayerTreeHost.h:
(WebKit::RemoteLayerTreeHost::animationDelegates):
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::RemoteLayerTreeHost):
(WebKit::RemoteLayerTreeHost::updateLayerTree):
(WebKit::RemoteLayerTreeHost::layerWillBeRemoved):
(WebKit::RemoteLayerTreeHost::animationDidStart):
(WebKit::RemoteLayerTreeHost::layerID):
(WebKit::RemoteLayerTreeHost::createLayer):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/DrawingArea.h:
(WebKit::DrawingArea::acceleratedAnimationDidStart):
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/mac/GraphicsLayerCARemote.cpp:
(WebKit::GraphicsLayerCARemote::createPlatformCAAnimation):
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.h: Added.
* WebProcess/WebPage/mac/PlatformCAAnimationRemote.mm: Added.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(WebKit::PlatformCALayerRemote::recursiveBuildTransaction):
(WebKit::PlatformCALayerRemote::animationStarted):
(WebKit::PlatformCALayerRemote::addAnimationForKey):
(WebKit::PlatformCALayerRemote::removeAnimationForKey):
(WebKit::PlatformCALayerRemote::animationForKey):
(PlatformCALayerRemote::recursiveBuildTransaction): Deleted.
(PlatformCALayerRemote::addAnimationForKey): Deleted.
(PlatformCALayerRemote::removeAnimationForKey): Deleted.
(PlatformCALayerRemote::animationForKey): Deleted.
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.h:
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::layerWillBeDestroyed):
(WebKit::RemoteLayerTreeContext::willStartAnimationOnLayer):
(WebKit::RemoteLayerTreeContext::animationDidStart):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::acceleratedAnimationDidStart):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::commitTransientZoom):
2014-03-31 Tim Horton <timothy_horton@apple.com>
Double-buffer RemoteLayerBackingStore
https://bugs.webkit.org/show_bug.cgi?id=130990
Reviewed by Simon Fraser.
We'll keep a front and back buffer for each surface; the front is generally currently
being displayed in the UI process, and the back is the one we'll paint into.
Swap the two surfaces each time we paint; since we synchronize with the UI process,
the old front surface will generally be out-of-use by the render server by the time
we paint again. However, since render server commits are asynchronous and we have
no way to syncronize with them yet, we have to check if the (swapped to front) back buffer is in use,
and create a new front buffer if it is.
Triple-buffering would solve this problem, as would synchronization with the render server,
as would a pool of surfaces - we will revisit these solutions in future patches.
* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(RemoteLayerBackingStore::ensureBackingStore):
(RemoteLayerBackingStore::clearBackingStore):
Factor clearBackingStore() out of ensureBackingStore() and display().
(RemoteLayerBackingStore::display):
Swap buffers. Since m_backSurface will hold on to the back surface's CGContext,
we don't need to worry about tearing down the image first anymore.
Don't worry about creating a back image (nor copying it into the front image)
if we're going to paint the whole layer.
(RemoteLayerBackingStore::drawInContext):
Fix some names.
(RemoteLayerBackingStore::applyBackingStoreToLayer):
Reduce duplication.
(RemoteLayerBackingStore::createImageForFrontBuffer): Deleted.
2014-03-31 Tim Horton <timothy_horton@apple.com>
Synchronize Web process remote layer tree commits with CoreAnimation commits in the UI process
https://bugs.webkit.org/show_bug.cgi?id=130984
Reviewed by Simon Fraser.
There's no reason for the Web process to paint faster than the UI process
can apply to and commit the CoreAnimation layer tree.
Also, once we get proper double-buffering and purgeable back buffers, we
will need the ability to make some assumptions about in-use surfaces.
Unfortunately, we can't actually tell when the render server commits,
as this is an asynchronous operation in a process we don't control, so
for now, this is only an approximation.
This also means that the assumptions we would like to make won't be
strong guarantees yet.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
When we commit, install a run loop observer to fire immediately after CoreAnimation commits.
(WebKit::RemoteLayerTreeDrawingAreaProxy::showDebugIndicator):
Fix a typo ('cmponents').
(WebKit::coreAnimationDidCommitLayersCallback):
(WebKit::RemoteLayerTreeDrawingAreaProxy::scheduleCoreAnimationLayerCommitObserver):
(WebKit::RemoteLayerTreeDrawingAreaProxy::coreAnimationDidCommitLayers):
When CA commits, send a message to the Web process letting it know that we
swapped to the new backing store.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::RemoteLayerTreeDrawingArea):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
(WebKit::RemoteLayerTreeDrawingArea::didUpdate):
Defer remote layer tree commits until we get didUpdate() from the UI process.
2014-03-31 Dean Jackson <dino@apple.com>
Remove WEB_ANIMATIONS
https://bugs.webkit.org/show_bug.cgi?id=130989
Reviewed by Simon Fraser.
Remove this feature flag until we plan to implement.
* Configurations/FeatureDefines.xcconfig:
2014-03-31 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Hook up scroll events for accelerated overflow:scroll
https://bugs.webkit.org/show_bug.cgi?id=130976
Reviewed by Tim Horton.
When an accelerated overflow:scroll is scrolled in the UI process,
tell the WebProcess that the scroll happened to update RenderLayer
state and fire events.
Add a WKOverflowScrollViewDelegate which is set as the delegate of
UIScrollViews, owned by ScrollingTreeOverflowScrollingNodeIOS, and propagates
-scrollViewDidScroll: messages to ScrollingTree::scrollPositionChangedViaDelegatedScrolling(),
which updates child layers and then, via RemoteScrollingTree::scrollingTreeNodeDidScroll,
tells the RemoteScrollingCoordinator which sends a message to the WebProcess.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::scrollingTreeNodeDidScroll): Name change
to try to reduce confusion.
(WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged): Deleted.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::scrollingTreeNodeDidScroll):
* UIProcess/Scrolling/RemoteScrollingTree.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(-[WKOverflowScrollViewDelegate initWithScrollingTreeNode:WebKit::]):
(-[WKOverflowScrollViewDelegate scrollViewDidScroll:]):
(-[WKOverflowScrollViewDelegate scrollViewWillBeginDragging:]):
(-[WKOverflowScrollViewDelegate scrollViewDidEndDragging:willDecelerate:]):
(-[WKOverflowScrollViewDelegate scrollViewDidEndScrollingAnimation:]):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateBeforeChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::scrollViewDidScroll):
* WebProcess/Scrolling/RemoteScrollingCoordinator.mm:
(WebKit::RemoteScrollingCoordinator::scrollPositionChangedForNode): No need for
rounding.
2014-03-29 Simon Fraser <simon.fraser@apple.com>
Fix scrolling on OS X with UI-side compositing
https://bugs.webkit.org/show_bug.cgi?id=130930
Reviewed by Tim Horton.
On iOS, we rely on visible rect updates to propagate scroll offset
changes to the WebProcess. RemoteScrollingCoordinatorProxy was thus hardcoded
to bail from scrollPositionChanged() when the scrolled node was the root node,
but this broke OS X. Fix by adding a behavior flag to RemoteScrollingCoordinatorProxy.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::RemoteScrollingCoordinatorProxy):
(WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
(WebKit::RemoteScrollingCoordinatorProxy::setPropagatesMainFrameScrolls):
(WebKit::RemoteScrollingCoordinatorProxy::propagatesMainFrameScrolls):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::initializeWebPage):
2014-03-31 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Disable tile cohort retention for now
https://bugs.webkit.org/show_bug.cgi?id=130926
<rdar://problem/16465413>
Reviewed by Simon Fraser.
* Shared/WebPreferencesStore.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
Add a preference for temporary tile cohort retention (essentially, provide a setting
that means that we will never retain tiles at all once they leave the tile coverage rect).
Defaults to true to maintain existing behavior, except for iOS WebKit2, where
it defaults to false because we don't have the requisite support for purgeable tiles yet.
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::updatePreferences):
(WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer):
2014-03-31 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
Buildfix after r166497.
Reviewed by Csaba Osztrogonác.
* UIProcess/API/efl/ewk_context.h: Missing EAPI added.
2014-03-31 Martin Robinson <mrobinson@igalia.com>
[GTK] Use PROJECT_VERSION_* instead of WEBKIT_*_VERSION
https://bugs.webkit.org/show_bug.cgi?id=130936
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitVersion.h.in: Use PROJECT_VERSION_* macros instead of the Autotools ones.
2014-03-31 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
[EFL][WK2] Add ewk APIs to control TLS error policy on WebContext.
https://bugs.webkit.org/show_bug.cgi?id=129740
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake:
Added the new SSL test.
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::ignoreTLSErrors):
(EwkContext::setIgnoreTLSErrors):
(ewk_context_ignore_tls_errors_get):
(ewk_context_ignore_tls_errors_set):
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
Added the API functions.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
(EWK2UnitTestServer::EWK2UnitTestServer):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h:
Extended the unit test server to handle TLS.
* UIProcess/API/efl/tests/test_ewk2_ssl.cpp:
Added tests to check the TLS policy API.
2014-03-31 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK2 plugin process binary name after r166492.
* PlatformGTK.cmake: Fix typo.
2014-03-31 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
Remove hostThisRegister() and hostThisValue()
https://bugs.webkit.org/show_bug.cgi?id=130895
Reviewed by Geoffrey Garen.
Removed hostThisRegister() and hostThisValue() and instead use thisArgumentOffset() and thisValue() respectively.
* WebProcess/Plugins/Netscape/JSNPMethod.cpp:
(WebKit::callMethod):
2014-03-31 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Add support for GTK3 plugins
https://bugs.webkit.org/show_bug.cgi?id=130599
Reviewed by Martin Robinson.
We currently have a gtk2 based plugin process mainly for flash
and a few other plugins that use GTK2, but many other plugins
don't even use gtk at all. This patch builds a lighter plugin
process based on GTK3, used by default for all the plugins expect
the ones requiring GTK2. And of course the default plugin process
supports GTK3 plugins.
* CMakeLists.txt: Add common rules to build the default plugin process.
* PlatformEfl.cmake: Remove common cmake code that is now in CMakeLists.txt.
* PlatformGTK.cmake: Rename WebKitPluginProcess to
WebKitPluginProcess2 and add the platform specific rules to build
the default plugin process.
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin):
Check if the loaded plugin module uses GTK2.
(WebKit::NetscapePluginModule::getPluginInfo): Set requiresGtk2 accordingly.
(WebKit::NetscapePluginModule::scanPlugin): Write "requires-gtk2"
line to stdout if the plugin requires GTK2.
* Shared/Plugins/PluginModuleInfo.h: Add requiresGtk2 boolean member.
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess): Use the
WebKitPluginProcess2 executable when the plugin requires GTK2.
* UIProcess/Plugins/PluginProcessProxy.h: Add requiresGtk2 boolean
member to RawPluginMetaData struct.
* UIProcess/Plugins/gtk/PluginInfoCache.cpp: Bump the cache schema version.
(WebKit::PluginInfoCache::getPluginInfo): Read also requires-gtk2
key from the cache.
(WebKit::PluginInfoCache::updatePluginInfo): Save also
requires-gtk2 key in the cache.
* UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp:
(WebKit::PluginProcessProxy::platformGetLaunchOptions): Add an
extra initialization data parameter if the plugin requires GTK2.
(WebKit::PluginProcessProxy::scanPlugin): Check if "requires-gtk2"
was written to stdout.
2014-03-30 Andy Estes <aestes@apple.com>
[Cocoa] Add an originatingWebView property to _WKDownload
https://bugs.webkit.org/show_bug.cgi?id=130945
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Passed self to WKView's initializer.
* UIProcess/API/Cocoa/_WKDownload.h: Declared originatingWebView as a weak, readonly property.
* UIProcess/API/Cocoa/_WKDownload.mm:
(-[_WKDownload originatingWebView]):
(-[_WKDownload setOriginatingWebView:]):
* UIProcess/API/Cocoa/_WKDownloadInternal.h: Re-declared originatingWebView as readwrite so that
PageClientImpl can call setOriginatingWebView:. Removed some dead code.
* UIProcess/API/mac/WKView.mm:
(-[WKView initWithFrame:context:configuration:webView:]): Updated to accept a webView parameter.
(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Passed nil for the webView parameter.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/Cocoa/DownloadClient.mm:
(WebKit::DownloadClient::decideDestinationWithSuggestedFilename): Ensured allowOverwrite is initialized.
* UIProcess/PageClient.h: Included handleDownloadRequest() on all platforms.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::receivedPolicyDecision): Ditto.
(WebKit::WebPageProxy::handleDownloadRequest): Ditto.
* UIProcess/WebPageProxy.h: Ditto.
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::handleDownloadRequest): Called -[_WKDownload setOriginatingWebView:].
* UIProcess/mac/PageClientImpl.h: Added a m_webView member variable.
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::PageClientImpl): Asserted that m_webView is nil if WK API isn't enabled.
(WebKit::PageClientImpl::handleDownloadRequest): Called -[_WKDownload setOriginatingWebView:].
2014-03-29 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r166434.
https://bugs.webkit.org/show_bug.cgi?id=130938
Caused crashes and other failures on cache tests (Requested by
ap on #webkit).
Reverted changeset:
"Web Replay: add page-level setting to bypass the MemoryCache"
https://bugs.webkit.org/show_bug.cgi?id=130728
http://trac.webkit.org/changeset/166434
2014-03-28 Anders Carlsson <andersca@apple.com>
Uncaught NSExceptions should crash the web process
https://bugs.webkit.org/show_bug.cgi?id=130923
<rdar://problem/16463751>
Reviewed by Dan Bernstein.
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-03-28 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed buildfix after r166441 and r166443.
Missing PLATFORM(COCOA) guards added.
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
(WebKit::NPRuntimeObjectMap::evaluate):
* WebProcess/Plugins/PluginProxy.cpp:
* WebProcess/Plugins/PluginProxy.h:
2014-03-28 Stephanie Lewis <slewis@apple.com>
Don't prevent AppSleep from sync messages.
https://bugs.webkit.org/show_bug.cgi?id=130747.
Reviewed by Anders Carlsson.
We think sync messages only need to happen full throttle when the plugin is visible,
the user is interacting with the plugin, or audio is playing. Since we already
take assertions for all these cases the assertion in sync messages doesn’t provide
any value. Since it can keep the PluginProcess awake in other instances remove it.
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::didReceiveSyncMessage):
2014-03-28 Stephanie Lewis <slewis@apple.com>
Stop waking up the web process in the background because of plugin activity.
Part of <rdar://problem/16061257> PluginProcess should AppNap when no plugins on active tab.
Reviewed by Anders Carlsson.
Plugin activity in the background can constantly wake up web processes. This is only
necessary when audio is playing to support web apps like Pandora and youtube playing
in the background. Use a new api in CoreAudio to see if there is audio playing in
the PluginProcess.
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess): Add a AudioHardwareListener
(WebKit::PluginProcess::createWebProcessConnection): tell web process current state
(WebKit::PluginProcess::audioHardwareDidBecomeActive): respond to audio hardware notifications
(WebKit::PluginProcess::audioHardwareDidBecomeInactive):
* PluginProcess/PluginProcess.h:
* PluginProcess/WebProcessConnection.cpp: tell WebProcess when audio state in PluginProcess
changes.
(WebKit::WebProcessConnection::audioHardwareDidBecomeActive):
(WebKit::WebProcessConnection::audioHardwareDidBecomeInactive):
* PluginProcess/WebProcessConnection.h:
* WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp:
Only invoke pageThrottler activity when playing audio
(WebKit::NPRuntimeObjectMap::evaluate):
* WebProcess/Plugins/Plugin.h: add function to get audio state
(WebKit::Plugin::audioIsPlayingInPluginProcess):
* WebProcess/Plugins/PluginProcessConnection.cpp: store audio state
(WebKit::PluginProcessConnection::PluginProcessConnection):
(WebKit::PluginProcessConnection::didReceiveMessage):
(WebKit::PluginProcessConnection::audioHardwareDidBecomeActive):
(WebKit::PluginProcessConnection::audioHardwareDidBecomeInactive):
* WebProcess/Plugins/PluginProcessConnection.h:
(WebKit::PluginProcessConnection::audioIsPlaying):
* WebProcess/Plugins/PluginProcessConnection.messages.in:
* WebProcess/Plugins/PluginProxy.cpp:
(WebKit::PluginProxy::audioIsPlayingInPluginProcess):
* WebProcess/Plugins/PluginProxy.h:
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::audioIsPlayingInPluginProcess):
* WebProcess/Plugins/PluginView.h:
2014-03-28 Stephanie Lewis <slewis@apple.com>
Have the plugin process track visibility of it’s plugin and sleep when none
are visible.
Part of <rdar://problem/16061257> PluginProcess should AppNap when no plugins on active tab.
https://bugs.webkit.org/show_bug.cgi?id=130694
Reviewed by Anders Carlsson.
Currently AppSleep is enabled on the PluginProcess based on web page visibility.
Add visibility tracking to plugins and move the decision to AppSleep into the the
PluginProcess
* PluginProcess/PluginProcess.cpp:
(WebKit::PluginProcess::PluginProcess): Add a new activity for visible plugins
(WebKit::PluginProcess::pluginsForWebProcessDidBecomeVisible): take an activity
assertion if any web processes have a visible plugin.
(WebKit::PluginProcess::pluginsForWebProcessDidBecomeHidden):
* PluginProcess/PluginProcess.h:
* PluginProcess/WebProcessConnection.cpp:
(WebKit::WebProcessConnection::removePluginControllerProxy): remove plugin from
visible plugins when destroying it
(WebKit::WebProcessConnection::pluginDidBecomeVisible):
(WebKit::WebProcessConnection::pluginDidBecomeHidden): track which plugins are
visible for each web process
* PluginProcess/WebProcessConnection.h:
* PluginProcess/mac/PluginControllerProxyMac.mm:
(WebKit::PluginControllerProxy::windowVisibilityChanged): notify WebProcessConnection
when visibility changed.
* UIProcess/WebContext.h:
* UIProcess/mac/WebContextMac.mm: instead of tracking plugin app sleep state on the web pref.
and visibility state, just use the web pref.
(WebKit::WebContext::updateProcessSuppressionState):
(WebKit::WebContext::processSuppressionPreferenceIsEnabledForAllContexts):
2014-03-28 Brian Burg <bburg@apple.com>
Web Replay: add page-level setting to bypass the MemoryCache
https://bugs.webkit.org/show_bug.cgi?id=130728
Reviewed by Timothy Hatcher.
* UIProcess/APISession.cpp:
(API::generateID): update the base ID for generating unique sessions.
2014-03-28 Cody Krieger <cjk@apple.com>
Add willSubmitForm callback support to WKWebProcessPlugInFormDelegatePrivate.
https://bugs.webkit.org/show_bug.cgi?id=130875
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFormDelegatePrivate.h:
Add -_webProcessPlugInBrowserContextController:willSubmitForm:toFrame:fromFrame:withValues:
to the WKWebProcessPlugInFormDelegatePrivate protocol.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
Wire up the willSubmitForm() callback to the new
WKWebProcessPlugInFormDelegatePrivate method.
2014-03-28 Alexey Proskuryakov <ap@apple.com>
[Mac] Enable async text input implementation
https://bugs.webkit.org/show_bug.cgi?id=130856
Reviewed by Sam Weinig.
* UIProcess/API/mac/WKView.mm: (-[WKView _interpretKeyEvent:completionHandler:]):
Temporarily work around <rdar://16393434>.
2014-03-28 Alexey Proskuryakov <ap@apple.com>
Move sync CancelComposition message under an ifdef
https://bugs.webkit.org/show_bug.cgi?id=130908
Reviewed by Enrica Casucci.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::cancelComposition): Deleted.
* UIProcess/mac/WebPageProxyMac.mm:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
2014-03-28 Alexey Proskuryakov <ap@apple.com>
[iOS] Don't cancel composition on selection change
https://bugs.webkit.org/show_bug.cgi?id=130909
Reviewed by Enrica Casucci.
Fixing a recent regression from bug 130727.
* WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didChangeSelection):
2014-03-28 Peter Molnar <pmolnar.u-szeged@partner.samsung.com>
[WK2] Removed unused method logChannelByName.
https://bugs.webkit.org/show_bug.cgi?id=130897
Reviewed by Anders Carlsson.
* Platform/Logging.cpp:
(WebKit::logChannelByName): Deleted.
* Platform/Logging.h:
2014-03-28 Alexey Proskuryakov <ap@apple.com>
Eliminate a sync cancelComposition call in WebPageProxy::editorStateChanged
https://bugs.webkit.org/show_bug.cgi?id=130727
Reviewed by Enrica Casucci.
Added a separate CompositionWasCanceled IPC call, with which WebProcess can tell
UIProcess that it should notify an input method of canceled composition. There are
a lot of incorrect edge cases where we don't call it correctly, but this was true
in the old implementation too (for different edge cases).
This change only affects iOS and async NSTextInputClient code path on Mac. I don't
want to change sync NSTextInputClient code path unless absolutely necessary.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::editorStateChanged):
(WebKit::WebPageProxy::compositionWasCanceled):
(WebKit::WebPageProxy::resetStateAfterProcessExited):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::insertText):
(WebKit::WebPageProxy::executeKeypressCommands):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChangeSelection):
2014-03-28 Mario Sanchez Prada <mario.prada@samsung.com>
[GTK] Running minibrowser with url crashes in debug build
https://bugs.webkit.org/show_bug.cgi?id=130492
Reviewed by Martin Robinson.
Use the ResourceRequest(const URL& url) constructor, instead of the
one taking a String, to call WebPageProxy::loadRequest(), so we
ensure that the passed URI is correctly constructed.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_load_uri): Create an URL out of a SoupURI and
use that to create a ResourceRequest to pass to loadRequest().
2014-03-27 Pratik Solanki <psolanki@apple.com>
[iOS WebKit2] Tweak cache sizes for iOS
https://bugs.webkit.org/show_bug.cgi?id=130871
Reviewed by Sam Weinig.
Bring over the tweaks we had made to memory cache size for WebKit1 on iOS to WebKit2. These
were made per findings in <rdar://8611638>.
* Shared/CacheModel.cpp:
(WebKit::calculateCacheSizes):
2014-03-27 Jinwoo Song <jinwoo7.song@samsung.com>
[WK2][EFL] Fix wrong parameter name in ewk_view_user_agent_set()
https://bugs.webkit.org/show_bug.cgi?id=130888
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/ewk_view.h:
2014-03-27 Alexey Proskuryakov <ap@apple.com>
Confirm composition in resignFirstResponder, don't cancel it
https://bugs.webkit.org/show_bug.cgi?id=130852
Reviewed by Darin Adler.
* UIProcess/API/mac/WKView.mm: (-[WKView resignFirstResponder]):
2014-03-27 Pratik Solanki <psolanki@apple.com>
[iOS WebKit2] Don't pass disk cache directory path on iOS
https://bugs.webkit.org/show_bug.cgi?id=130862
Reviewed by Sam Weinig.
The diskPath passed to NSURLCache initializer is treated differently on Mac and iOS. Just
pass nil for now until we sort out the API.
* NetworkProcess/cocoa/NetworkProcessCocoa.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-03-27 Pratik Solanki <psolanki@apple.com>
[iOS WebKit2] Share network process code between iOS and Mac
https://bugs.webkit.org/show_bug.cgi?id=130861
Reviewed by Sam Weinig.
Implement network process functions for iOS by moving common code from NetworkProcessMac.mm
to a new shared file NetworkProcessCocoa.mm and sharing between iOS and Mac.
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/cocoa/NetworkProcessCocoa.mm: Added.
(WebKit::NetworkProcess::platformLowMemoryHandler):
(WebKit::NetworkProcess::platformInitializeNetworkProcessCocoa):
Common initialization code for iOS and Mac.
(WebKit::memorySize):
(WebKit::volumeFreeSize):
(WebKit::NetworkProcess::platformSetCacheModel):
* NetworkProcess/ios/NetworkProcessIOS.mm:
(WebKit::NetworkProcess::initializeProcess):
Remove unnecessary #if PLATFORM(IOS).
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
* WebKit2.xcodeproj/project.pbxproj:
2014-03-27 Enrica Casucci <enrica@apple.com>
Add support for AirPlay picker in WK2 for iOS.
https://bugs.webkit.org/show_bug.cgi?id=130855
<rdar://problem/15349859>
Reviewed by Joseph Pecoraro and Benjamin Poulain.
Adds support to display the airplay picker for iPhone and iPad
in WK2.
The picker on iPad is displayed next to the airplay button.
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::showAirPlayRoutePicker):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _showAirPlayRoutePicker:fromRect:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::showAirPlayRoutePicker):
* UIProcess/ios/forms/WKAirPlayRoutePicker.h: Added.
* UIProcess/ios/forms/WKAirPlayRoutePicker.mm: Added.
(-[WKAirPlayRoutePicker initWithView:]):
(-[WKAirPlayRoutePicker dealloc]):
(-[WKAirPlayRoutePicker popoverControllerDidDismissPopover:]):
(-[WKAirPlayRoutePicker _presentAirPlayPopoverAnimated:fromRect:]):
(-[WKAirPlayRoutePicker _windowWillRotate:]):
(-[WKAirPlayRoutePicker _windowDidRotate:]):
(-[WKAirPlayRoutePicker _dismissAirPlayRoutePickerIPad]):
(-[WKAirPlayRoutePicker showAirPlayPickerIPad:fromRect:]):
(-[WKAirPlayRoutePicker showAirPlayPickerIPhone:]):
(-[WKAirPlayRoutePicker show:fromRect:]):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
(WebKit::WebChromeClient::showAirPlayRoutePicker):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::touchEvent):
(WebKit::WebPage::touchEventSyncForTesting):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rectForElementAtInteractionLocation):
(WebKit::WebPage::handleTap):
2014-03-27 Benjamin Poulain <bpoulain@apple.com>
[WK2][iOS] <rdar://problem/16414684> WKWebView should draw a white background before the page loads
https://bugs.webkit.org/show_bug.cgi?id=130873
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
2014-03-27 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Compute a good exposed rect when scaling WKContentView
https://bugs.webkit.org/show_bug.cgi?id=130761
Reviewed by Simon Fraser.
Add a simple heuristic to improve tiling while zooming. In theory we could take the zoom
center and scaleRate to split the speed between scrolling and pinching. In practice,
zoom is transitory and is not as predictable as scrolling, so this patch just does a very
simple heuristic:
-When zooming in, do not expand coverage.
-When zooming out, add half a tile size on every side.
* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::timestamp):
(WebKit::VisibleContentRectUpdateInfo::horizontalVelocity):
(WebKit::VisibleContentRectUpdateInfo::verticalVelocity):
(WebKit::VisibleContentRectUpdateInfo::scaleChangeRate):
* UIProcess/ios/WKContentView.mm:
(WebKit::HistoricalVelocityData::VelocityData::VelocityData):
(WebKit::HistoricalVelocityData::velocityForNewData):
(WebKit::HistoricalVelocityData::append):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::adjustExposedRectForBoundedScale):
When zooming past the maximum size, adjust the exposed rect to continue tiling the area
at maximum size. Otherwise, we tile a tiny area, and have to retile larger when the animation
pull back the view to maximum scale.
(WebKit::adjustVelocityDataForBoundedScale):
Since we do not split the velocity from scrolling from the scaling, just clear the velocity when zooming.
Also clear the scaleChangeRate when the scale is out of bounds. There is no reason to add tiles for
temporary state.
(WebKit::WebPage::updateVisibleContentRects):
2014-03-27 Anders Carlsson <andersca@apple.com>
Add _ prefix to WKRemoteObjectRegistery and WKRemoteObjectInterface
https://bugs.webkit.org/show_bug.cgi?id=130868
Reviewed by Sam Weinig.
* Shared/API/Cocoa/RemoteObjectRegistry.h:
* Shared/API/Cocoa/RemoteObjectRegistry.mm:
(WebKit::RemoteObjectRegistry::RemoteObjectRegistry):
* Shared/API/Cocoa/WKRemoteObject.h:
* Shared/API/Cocoa/WKRemoteObject.mm:
(-[WKRemoteObject _initWithObjectRegistry:interface:]):
* Shared/API/Cocoa/WKRemoteObjectCoder.h:
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(-[WKRemoteObjectDecoder initWithInterface:rootObjectDictionary:WebKit::]):
* Shared/API/Cocoa/WKRemoteObjectInterface.h:
* Shared/API/Cocoa/WKRemoteObjectInterface.mm:
(isContainerClass): Deleted.
(propertyListClasses): Deleted.
(allowedArgumentClassesForMethod): Deleted.
(initializeAllowedArgumentClasses): Deleted.
(-[WKRemoteObjectInterface initWithProtocol:identifier:]): Deleted.
(+[WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]): Deleted.
(-[WKRemoteObjectInterface description]): Deleted.
(classesForSelectorArgument): Deleted.
(-[WKRemoteObjectInterface classesForSelector:argumentIndex:]): Deleted.
(-[WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]): Deleted.
(methodArgumentTypeEncodingForSelector): Deleted.
(-[WKRemoteObjectInterface _methodSignatureForSelector:]): Deleted.
(-[WKRemoteObjectInterface _allowedArgumentClassesForSelector:]): Deleted.
* Shared/API/Cocoa/WKRemoteObjectRegistry.h:
* Shared/API/Cocoa/WKRemoteObjectRegistry.mm:
(-[WKRemoteObjectRegistry registerExportedObject:interface:]): Deleted.
(-[WKRemoteObjectRegistry unregisterExportedObject:interface:]): Deleted.
(-[WKRemoteObjectRegistry remoteObjectProxyWithInterface:]): Deleted.
(-[WKRemoteObjectRegistry _initWithMessageSender:IPC::]): Deleted.
(-[WKRemoteObjectRegistry _invalidate]): Deleted.
(-[WKRemoteObjectRegistry _sendInvocation:interface:]): Deleted.
(-[WKRemoteObjectRegistry WebKit::]): Deleted.
(-[WKRemoteObjectRegistry _invokeMethod:]): Deleted.
(-[WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]): Deleted.
* Shared/API/Cocoa/_WKRemoteObjectInterface.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.h.
* Shared/API/Cocoa/_WKRemoteObjectInterface.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterface.mm.
(isContainerClass):
(propertyListClasses):
(allowedArgumentClassesForMethod):
(initializeAllowedArgumentClasses):
(-[_WKRemoteObjectInterface initWithProtocol:identifier:]):
(+[_WKRemoteObjectInterface remoteObjectInterfaceWithProtocol:]):
(-[_WKRemoteObjectInterface description]):
(classesForSelectorArgument):
(-[_WKRemoteObjectInterface classesForSelector:argumentIndex:]):
(-[_WKRemoteObjectInterface setClasses:forSelector:argumentIndex:]):
(methodArgumentTypeEncodingForSelector):
(-[_WKRemoteObjectInterface _methodSignatureForSelector:]):
(-[_WKRemoteObjectInterface _allowedArgumentClassesForSelector:]):
* Shared/API/Cocoa/_WKRemoteObjectInterfaceInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectInterfaceInternal.h.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.h: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.h.
* Shared/API/Cocoa/_WKRemoteObjectRegistry.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistry.mm.
(-[_WKRemoteObjectRegistry registerExportedObject:interface:]):
(-[_WKRemoteObjectRegistry unregisterExportedObject:interface:]):
(-[_WKRemoteObjectRegistry remoteObjectProxyWithInterface:]):
(-[_WKRemoteObjectRegistry _initWithMessageSender:IPC::]):
(-[_WKRemoteObjectRegistry _invalidate]):
(-[_WKRemoteObjectRegistry _sendInvocation:interface:]):
(-[_WKRemoteObjectRegistry WebKit::]):
(-[_WKRemoteObjectRegistry _invokeMethod:]):
(-[_WKRemoteObjectRegistry _invokeMessageWithInterfaceIdentifier:encodedInvocation:]):
* Shared/API/Cocoa/_WKRemoteObjectRegistryInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKRemoteObjectRegistryInternal.h.
* UIProcess/API/Cocoa/WKBrowsingContextController.mm:
(-[WKBrowsingContextController _remoteObjectRegistry]):
(-[WKBrowsingContextController remoteObjectRegistry]): Deleted.
* UIProcess/API/Cocoa/WKBrowsingContextControllerPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _remoteObjectRegistry]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInBrowserContextControllerToBeRemoved.mm: Copied from Source/WebKit2/Shared/API/Cocoa/WKRemoteObject.h.
(-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(-[WKWebProcessPlugInBrowserContextController _remoteObjectRegistry]):
(-[WKWebProcessPlugInBrowserContextController remoteObjectRegistry]): Deleted.
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextControllerPrivate.h:
2014-03-27 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r166360.
https://bugs.webkit.org/show_bug.cgi?id=130869
Seems to have broken PLT (Requested by ap on #webkit).
Reverted changeset:
"Connection::dispatchOneMessage() can be re-entered while
handling Cmd-key menu"
https://bugs.webkit.org/show_bug.cgi?id=130767
http://trac.webkit.org/changeset/166360
2014-03-27 Sam Weinig <sam@webkit.org>
Support dynamic layer hosting context changes
<rdar://problem/16278019>
https://bugs.webkit.org/show_bug.cgi?id=130863
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView addWindowObserversForWindow:]):
(-[WKView removeWindowObservers]):
(-[WKView _windowDidChangeLayerHosting:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::layerHostingModeDidChange):
* UIProcess/WebPageProxy.h:
2014-03-27 Simon Fraser <simon.fraser@apple.com>
Don't leak the WKBrowsingContextController
https://bugs.webkit.org/show_bug.cgi?id=130815
Reviewed by Tim Horton.
Use adoptNS to avoid leaking the WKBrowsingContextController.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView browsingContextController]):
2014-03-27 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Give WebProcess a proxy application entitlement
https://bugs.webkit.org/show_bug.cgi?id=130806
Reviewed by Timothy Hatcher.
* Configurations/WebContent-iOS.entitlements:
2014-03-27 Anders Carlsson <andersca@apple.com>
Add reload and reloadFromOrigin as API
https://bugs.webkit.org/show_bug.cgi?id=130858
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView reload]):
(-[WKWebView reloadFromOrigin]):
(-[WKWebView validateUserInterfaceItem:]):
(-[WKWebView reload:]):
(-[WKWebView reloadFromOrigin:]):
2014-03-27 Anders Carlsson <andersca@apple.com>
Rename WKFrameHandle to _WKFrameHandle
https://bugs.webkit.org/show_bug.cgi?id=130847
Reviewed by Tim Horton.
* Shared/API/Cocoa/_WKFrameHandle.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandle.h.
* Shared/API/Cocoa/_WKFrameHandle.mm: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandle.mm.
(-[_WKFrameHandle dealloc]):
(-[_WKFrameHandle isEqual:]):
(-[_WKFrameHandle hash]):
(-[_WKFrameHandle _frameID]):
(-[_WKFrameHandle copyWithZone:]):
(+[_WKFrameHandle supportsSecureCoding]):
(-[_WKFrameHandle initWithCoder:]):
(-[_WKFrameHandle encodeWithCoder:]):
(-[_WKFrameHandle API::]):
* Shared/API/Cocoa/_WKFrameHandleInternal.h: Renamed from Source/WebKit2/Shared/API/Cocoa/WKFrameHandleInternal.h.
(WebKit::wrapper):
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(+[WKWebProcessPlugInFrame lookUpFrameFromHandle:]):
(-[WKWebProcessPlugInFrame handle]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
2014-03-27 Alexey Proskuryakov <ap@apple.com>
Connection::dispatchOneMessage() can be re-entered while handling Cmd-key menu
equivalents, ASSERT(!_data->_keyDownEventBeingResent)
https://bugs.webkit.org/show_bug.cgi?id=130767
<rdar://problem/16307487>
Reviewed by Darin Adler.
* Shared/WebKit2Initialize.cpp: (WebKit::InitializeWebKit2): Added NSModalPanelRunLoopMode
to RunLoop event source and timer modes.
2014-03-27 Jae Hyun Park <jaepark@webkit.org>
Remove LayerTreeContextCairo.cpp
https://bugs.webkit.org/show_bug.cgi?id=130807
Reviewed by Martin Robinson.
* Shared/cairo/LayerTreeContextCairo.cpp: Removed.
2014-03-27 Maciej Florek <m.florek@samsung.com>
[EFL][WK2] Add tests of the set process model API
https://bugs.webkit.org/show_bug.cgi?id=130830
Reviewed by Gyuyoung Kim.
Implement unit tests to check, if process model API works
properly. When process model is set to EWK_PROCESS_MODEL_SHARED_SECONDARY,
there should be only one WebProcess. In case of EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
setting, each WebView should have own process, as well as the network process
should exist.
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp:
(EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase):
(EWK2UnitTest::EWK2UnitTestBase::SetUp):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h:
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(EWK2ContextTestMultipleProcesses::EWK2ContextTestMultipleProcesses):
(TEST_F):
2014-03-27 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r166296 and r166331.
https://bugs.webkit.org/show_bug.cgi?id=130822
caused some crashes and frequent assertion failures, and the
fix is going to take a little while (Requested by thorton on
#webkit).
Reverted changesets:
"[iOS WebKit2] Flush all surfaces after painting into all of
them, instead of after painting into each one"
https://bugs.webkit.org/show_bug.cgi?id=130768
http://trac.webkit.org/changeset/166296
"Assertion failure in RemoteLayerBackingStore::flush"
https://bugs.webkit.org/show_bug.cgi?id=130810
http://trac.webkit.org/changeset/166331
2014-03-26 Tim Horton <timothy_horton@apple.com>
Blind speculative iOS build fix.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportConfigurationChanged):
2014-03-26 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] <rdar://problem/16265272> REGRESSION (WebKit2): Some pages appear blank until you scroll
https://bugs.webkit.org/show_bug.cgi?id=130819
Reviewed by Tim Horton.
When loading a new page, we never define the unobscured rect and exposed rect on the new frame.
As a result, there is nothing to render.
It uses to work thanks to dumb luck and a bug in Safari updating the visibleContentRects from
the UIProcess. Now that the bug is gone, "dumb luck" is not reliable enough to get the content rects :)
What this patch does is save if we have ever received new rects from the UI. If we have not, create them
based on the minimum layout size. This works because we know Safari shows the minimum layout size by default
and will tell us if it changes the obscured rects.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::didCommitLoad):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportConfigurationChanged):
(WebKit::WebPage::updateVisibleContentRects):
2014-03-26 Anders Carlsson <andersca@apple.com>
Add a _WKScriptWorld class
https://bugs.webkit.org/show_bug.cgi?id=130817
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/_WKScriptWorld.h: Added.
* UIProcess/API/Cocoa/_WKScriptWorld.mm: Added.
(generateWorldID):
(+[_WKScriptWorld defaultWorld]):
(-[_WKScriptWorld init]):
(-[_WKScriptWorld _initWithWorldID:]):
* WebKit2.xcodeproj/project.pbxproj:
2014-03-26 Anders Carlsson <andersca@apple.com>
Rename a delegate method to -webView:didFinishNavigation:
https://bugs.webkit.org/show_bug.cgi?id=130814
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/Cocoa/NavigationState.h:
* UIProcess/Cocoa/NavigationState.mm:
(WebKit::NavigationState::setNavigationDelegate):
(WebKit::NavigationState::LoaderClient::didFinishLoadForFrame):
2014-03-26 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Crashes on swipe
<rdar://problem/16440867>
Reviewed by Benjamin Poulain.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
Get the IOSurfaceRef from the WebCore::IOSurface.
2014-03-26 Simon Fraser <simon.fraser@apple.com>
Fix the build: include UIKit headers inside the iOS #ifdef.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
2014-03-26 Simon Fraser <simon.fraser@apple.com>
Hook up -webkit-overflow-scrolling:touch for iOS WK2
https://bugs.webkit.org/show_bug.cgi?id=130809
Reviewed by Tim Horton.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h:
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm:
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::updateAfterChildren):
Set the content size of the UIScrollVIew based on the geometry.
* UIProcess/ios/RemoteLayerTreeHostIOS.mm:
(WebKit::RemoteLayerTreeHost::createLayer): Make a UIScrollView if the
layer properties tell us that we have the scrolling behavior.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
We need to allow user interaction in the _rootContentView so that events get to
nested UIScrollViews (this could be optimized in future).
* UIProcess/mac/RemoteLayerTreeHost.h:
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
(WebKit::RemoteLayerTreeHost::createLayer): Need to pass RemoteLayerTreeTransaction::LayerProperties
in so we can get at the custom behavior.
2014-03-26 Anders Carlsson <andersca@apple.com>
Add -[WKWebView stopLoading]
https://bugs.webkit.org/show_bug.cgi?id=130812
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView stopLoading]):
2014-03-26 Tim Horton <timothy_horton@apple.com>
Assertion failure in RemoteLayerBackingStore::flush
https://bugs.webkit.org/show_bug.cgi?id=130810
<rdar://problem/16439276>
Reviewed by Simon Fraser.
* Shared/mac/RemoteLayerBackingStore.mm:
(RemoteLayerBackingStore::flush):
We don't always have backing store to flush, if platformCALayerDrawsContent() is false.
We also can't assert that we have a back surface, because the very first paint will not.
2014-03-26 Andy Estes <aestes@apple.com>
[Cocoa] Expose DownloadClient::didFail() and DownloadClient::didCancel()
https://bugs.webkit.org/show_bug.cgi?id=130805
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/_WKDownloadDelegate.h:
* UIProcess/Cocoa/DownloadClient.h:
* UIProcess/Cocoa/DownloadClient.mm:
(WebKit::DownloadClient::DownloadClient):
(WebKit::DownloadClient::didFail):
(WebKit::DownloadClient::didCancel):
2014-03-26 Cody Krieger <cjk@apple.com>
-[WKWebProcessPlugInNodeHandle HTMLInputElementIsUserEdited] and -HTMLTextAreaElementIsUserEdited do not return the correct values.
https://bugs.webkit.org/show_bug.cgi?id=130804
Reviewed by Dan Bernstein.
The existing implementations of these methods are mis-cased
("HTMLInputELementIsUserEdited" and "HTMLTextAreaELementIsUserEdited" —
note the "EL" in both cases). This results in us getting
auto-synthesized getters for the HTMLInputElementIsUserEdited and
HTMLTextAreaElementIsUserEdited properties, which will return NO
unconditionally.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInNodeHandle.mm:
Fix the capitalization of -HTMLInputElementIsUserEdited and
-HTMLTextAreaElementIsUserEdited.
2014-03-26 Andy Estes <aestes@apple.com>
[Cocoa] Expose DownloadProxy::cancel()
https://bugs.webkit.org/show_bug.cgi?id=130799
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/_WKDownload.h:
* UIProcess/API/Cocoa/_WKDownload.mm:
(-[_WKDownload cancel]):
2014-03-26 Timothy Hatcher <timothy@apple.com>
Propagate the hiddenFromInspector flag on ResourceRequest in
places when a new request a made or passed between processes.
https://bugs.webkit.org/show_bug.cgi?id=130741
Reviewed by Joseph Pecoraro.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRequest): Use updateFromDelegatePreservingOldProperties.
* Shared/WebCoreArgumentCoders.cpp:
(IPC::ArgumentCoder<ResourceRequest>::encode): Added hiddenFromInspector support.
(IPC::ArgumentCoder<ResourceRequest>::decode): Ditto.
* WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp:
(WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame): Ditto.
2014-03-26 Andy Estes <aestes@apple.com>
[Cocoa] Expose DownloadProxy::request()
https://bugs.webkit.org/show_bug.cgi?id=130796
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/_WKDownload.h:
* UIProcess/API/Cocoa/_WKDownload.mm:
(-[_WKDownload request]):
2014-03-26 Anders Carlsson <andersca@apple.com>
Pass a real FrameLoadRequest to Chrome::createWindow
https://bugs.webkit.org/show_bug.cgi?id=130795
Reviewed by Dan Bernstein.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchCreatePage):
2014-03-26 Jeremy Jones <jeremyj@apple.com>
Implement hasLiveStreamingContent property in WebAVPlayerController
https://bugs.webkit.org/show_bug.cgi?id=128684
Reviewed by Simon Fraser.
Plumb through the seekable ranges to the fullscreen interface.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
Add declaration for setSeekableRangesVector()
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
Add interface SetSeekableRangesVector()
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setSeekableRangesVector):
Add setSeekableRangesVector that translates the vector into a TimeRanges and calls setSeekableRanges()
* WebProcess/ios/WebVideoFullscreenManager.h:
Add setSeekableRanges()
* WebProcess/ios/WebVideoFullscreenManager.mm:
(WebKit::WebVideoFullscreenManager::setSeekableRanges):
setSeekableRanges() converts TimeRanges to Vector and calls SetSeekableRangesVector()
2014-03-26 Simon Fraser <simon.fraser@apple.com>
Add a custom behavior flag to GraphicsLayer, piped down to PlatformCALayer, for scrolling layers
https://bugs.webkit.org/show_bug.cgi?id=130778
Reviewed by Tim Horton.
Make it possible to put a "custom behavior" flag on a layer so that,
with UI-side compositing, we know to create a specific type of
layer or view for that GraphicsLayer.
* Shared/mac/RemoteLayerTreeTransaction.h:
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::LayerProperties):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::encode):
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode):
(WebKit::dumpChangedLayers):
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::customBehavior):
(PlatformCALayerRemote::updateCustomBehavior):
* WebProcess/WebPage/mac/PlatformCALayerRemote.h:
2014-03-26 Zoltan Horvath <zoltan@webkit.org>
[CSS Shapes] Remove shape-inside support
https://bugs.webkit.org/show_bug.cgi?id=130698
Reviewed by David Hyatt.
* Configurations/FeatureDefines.xcconfig:
2014-03-26 Tim Horton <timothy_horton@apple.com>
[iOS WebKit2] Flush all surfaces after painting into all of them, instead of after painting into each one
https://bugs.webkit.org/show_bug.cgi?id=130768
<rdar://problem/16421471>
Reviewed by Simon Fraser.
* Shared/mac/RemoteLayerBackingStore.h:
Add flush(), which synchronously flushes painting operations on the underlying backing store.
Factor clearBackingStore() out of ensureBackingStore/display, which releases our reference to underlying backing store.
Add two members for storing the back surface and front buffer context until flush() is called.
- We need to keep the back surface alive because the CGImageRef created from it is referenced by
the front surface's drawing queue, and won't be freed until said queue is flushed. If we release
the back surface (and its associated CGContextRef) *before* the CGImageRef is freed, we will
do an expensive readback of the surface.
- When not using accelerated drawing, we need to keep the front buffer's CGContextRef around
until the flush occurs so that we can avoid re-creating it in order to perform the flush. This
happens automatically in the accelerated drawing case via WebCore::IOSurface.
* Shared/mac/RemoteLayerBackingStore.mm:
(RemoteLayerBackingStore::ensureBackingStore):
(RemoteLayerBackingStore::clearBackingStore):
(RemoteLayerBackingStore::display):
Factor clearBackingStore() out of ensureBackingStore() and display().
Update a comment about the above performance gotcha.
Store the current back surface/front buffer context.
(RemoteLayerBackingStore::drawInContext):
Don't flush the context immediately after painting.
(RemoteLayerBackingStore::applyBackingStoreToLayer):
Move things around to reduce duplicated code.
(RemoteLayerBackingStore::flush):
Flush the current front surface/buffer's context.
Clear the new pending-flush members.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::flushBackingStoreChangesInTransaction):
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
Crawl through all of the valid changed backing stores in the transaction and flush them.
Remove a completely useless assertion.
2014-03-25 Simon Fraser <simon.fraser@apple.com>
Add a new type of scrolling tree node for overflow scrolling
https://bugs.webkit.org/show_bug.cgi?id=130763
Reviewed by Tim Horton.
Prepare for overflow scrolling via the scrolling tree by adding
a new scrolling node type for overflow:scroll nodes. Mostly
this is a new ScrollingNodeType that gets mapped to the same
scrolling state nodes and scrolling nodes, but iOS creates
state and scrolling nodes specific to overflow:scroll.
Change the type checking on nodes to use virtual functions instead
of just checking the node type, to allow the macros to work with
the new scrolling node type.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(WebKit::encodeNodeAndDescendants):
(WebKit::RemoteScrollingCoordinatorTransaction::decode):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/Scrolling/RemoteScrollingTree.cpp:
(WebKit::RemoteScrollingTree::createNode):
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.h: Copied from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h.
* UIProcess/Scrolling/ios/ScrollingTreeOverflowScrollingNodeIOS.mm: Copied from Source/WebCore/page/scrolling/mac/ScrollingTreeFixedNode.h.
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::create):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::ScrollingTreeOverflowScrollingNodeIOS):
(WebKit::ScrollingTreeOverflowScrollingNodeIOS::~ScrollingTreeOverflowScrollingNodeIOS):
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm:
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* WebKit2.xcodeproj/project.pbxproj:
2014-03-26 Zan Dobersek <zdobersek@igalia.com>
Unreviewed. Removing the remaining Automake cruft.
* GNUmakefile.list.am: Removed.
2014-03-25 Pratik Solanki <psolanki@apple.com>
Remove PLATFORM(IOS) from NetworkProcessMac.mm
https://bugs.webkit.org/show_bug.cgi?id=130751
Reviewed by Alexey Proskuryakov.
Code in NetworkProcessMac.mm is guarded by PLATFORM(MAC) and so is not compiled on iOS.
Having PLATFORM(IOS) code in this file is unnecessary and confusing.
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::initializeProcessName):
(WebKit::overrideSystemProxies):
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
2014-03-25 Anders Carlsson <andersca@apple.com>
Add a UI delegate callback for handling window.open
https://bugs.webkit.org/show_bug.cgi?id=130757
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKUIDelegate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/Cocoa/UIClient.h:
* UIProcess/Cocoa/UIClient.mm:
(WebKit::UIClient::setDelegate):
(WebKit::UIClient::createNewPage):
2014-03-25 Anders Carlsson <andersca@apple.com>
Move stopLoading: back for now.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView stopLoading:]):
2014-03-25 Anders Carlsson <andersca@apple.com>
Change toolbarVisibility back to toolbarsVisibility
https://bugs.webkit.org/show_bug.cgi?id=130749
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWindowFeatures.h:
* UIProcess/API/Cocoa/WKWindowFeatures.mm:
(-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
2014-03-25 Anders Carlsson <andersca@apple.com>
Pass the source frame to the CreateNewPage message
https://bugs.webkit.org/show_bug.cgi?id=130752
Reviewed by Tim Horton.
* UIProcess/API/APIUIClient.h:
(API::UIClient::createNewPage):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::createNewPage):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::createWindow):
2014-03-25 Anders Carlsson <andersca@apple.com>
Add a WebFrame::fromCoreFrame static member function and use it where possible
https://bugs.webkit.org/show_bug.cgi?id=130744
Reviewed by Tim Horton.
* WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp:
(WebKit::GeolocationPermissionRequestManager::startRequestForGeolocation):
* WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp:
(WebKit::InjectedBundleNodeHandle::documentFrame):
(WebKit::InjectedBundleNodeHandle::htmlFrameElementContentFrame):
(WebKit::InjectedBundleNodeHandle::htmlIFrameElementContentFrame):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner):
* WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp:
(WebKit::InjectedBundleDOMWindowExtension::frame):
* WebProcess/InjectedBundle/InjectedBundleHitTestResult.cpp:
(WebKit::InjectedBundleHitTestResult::frame):
(WebKit::InjectedBundleHitTestResult::targetFrame):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::webPage):
(WebKit::PluginView::performFrameLoadURLRequest):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::focusedElementChanged):
(WebKit::WebChromeClient::focusedFrameChanged):
(WebKit::WebChromeClient::runBeforeUnloadConfirmPanel):
(WebKit::WebChromeClient::runJavaScriptAlert):
(WebKit::WebChromeClient::runJavaScriptConfirm):
(WebKit::WebChromeClient::runJavaScriptPrompt):
(WebKit::WebChromeClient::print):
(WebKit::WebChromeClient::exceededDatabaseQuota):
(WebKit::WebChromeClient::runOpenPanel):
* WebProcess/WebCoreSupport/WebEditorClient.cpp:
(WebKit::WebEditorClient::textFieldDidBeginEditing):
(WebKit::WebEditorClient::textFieldDidEndEditing):
(WebKit::WebEditorClient::textDidChangeInTextField):
(WebKit::WebEditorClient::textDidChangeInTextArea):
(WebKit::WebEditorClient::doTextFieldCommandFromEvent):
(WebKit::WebEditorClient::textWillBeDeletedInTextField):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::dispatchDecidePolicyForNavigationAction):
(WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent):
(WebKit::WebFrameLoaderClient::dispatchWillSubmitForm):
* WebProcess/WebPage/WebFrame.cpp:
(WebKit::WebFrame::fromCoreFrame):
(WebKit::WebFrame::contentsAsString):
(WebKit::WebFrame::parentFrame):
(WebKit::WebFrame::childFrames):
(WebKit::WebFrame::frameForContext):
(WebKit::WebFrame::webArchiveData):
* WebProcess/WebPage/WebFrame.h:
2014-03-25 Jeffrey Pfau <jpfau@apple.com>
[WK2] Schemes registered as cache partitioned are not properly registered in new web processes
https://bugs.webkit.org/show_bug.cgi?id=130739
Reviewed by Anders Carlsson.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
2014-03-25 Joseph Pecoraro <pecoraro@apple.com>
[iOS] Inspector View Indication Support
https://bugs.webkit.org/show_bug.cgi?id=130709
Reviewed by Simon Fraser.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKInspectorIndicationView initWithFrame:]):
(-[WKContentView isShowingInspectorIndication]):
(-[WKContentView setShowingInspectorIndication:]):
(-[WKContentView _didCommitLayerTree:WebKit::]):
When indicating include a simple tinted UIView over the content.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _showInspectorIndication]):
(-[WKWebView _hideInspectorIndication]):
Have the content view show or hide an indication.
* UIProcess/PageClient.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::showInspectorIndication):
(WebKit::PageClientImpl::hideInspectorIndication):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::showInspectorIndication):
(WebKit::WebPageProxy::hideInspectorIndication):
Pass WebProcess indication message up to the WKWebView.
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::indicate):
(WebKit::WebInspectorClient::hideIndication):
* WebProcess/WebCoreSupport/WebInspectorClient.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::indicate):
(WebKit::WebPage::hideIndication):
Pass WebCore / remote inspector indication message up to UIProcess.
2014-03-25 Anders Carlsson <andersca@apple.com>
Add more properties to WKWindowFeatures
https://bugs.webkit.org/show_bug.cgi?id=130738
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWindowFeatures.h:
* UIProcess/API/Cocoa/WKWindowFeatures.mm:
(-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
(-[WKWindowFeatures menuBarVisibility]):
(-[WKWindowFeatures statusBarVisibility]):
(-[WKWindowFeatures toolbarsVisibility]):
(-[WKWindowFeatures allowsResizing]):
2014-03-25 Anders Carlsson <andersca@apple.com>
Fix iOS build.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
Make WKIBActions OS X only for now.
2014-03-25 Anders Carlsson <andersca@apple.com>
Begin stubbing out a WKWindowFeatures class
https://bugs.webkit.org/show_bug.cgi?id=130733
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWindowFeatures.h: Added.
* UIProcess/API/Cocoa/WKWindowFeatures.mm: Added.
(-[WKWindowFeatures _initWithWindowFeatures:WebCore::]):
(-[WKWindowFeatures x]):
(-[WKWindowFeatures y]):
(-[WKWindowFeatures width]):
(-[WKWindowFeatures height]):
* UIProcess/API/Cocoa/WKWindowFeaturesInternal.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
2014-03-25 Anders Carlsson <andersca@apple.com>
Add goBack: and goForward: IBActions and move stopLoading: to a new WKIBActions category on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=130732
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView goBack]):
(-[WKWebView goForward]):
(-[WKWebView validateUserInterfaceItem:]):
(-[WKWebView goBack:]):
(-[WKWebView goForward:]):
(-[WKWebView stopLoading:]):
2014-03-25 Martin Robinson <mrobinson@igalia.com>
[GTK] Remove the autotools build
https://bugs.webkit.org/show_bug.cgi?id=130717
Reviewed by Anders Carlsson.
* GNUmakefile.am: Removed.
* WebKit2Prefix.h: Removed references to the autotools configure file.
* config.h: Ditto.
2014-03-25 Michał Pakuła vel Rutka <m.pakula@samsung.com>
[EFL][WK2] Add NETWORK_PROCESS build option
https://bugs.webkit.org/show_bug.cgi?id=130131
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake: Add file needed to build with NETWORK_PROCESS enabled.
2014-03-24 Michał Pakuła vel Rutka <m.pakula@samsung.com>
[EFL][WK2] Add an API to set process model
https://bugs.webkit.org/show_bug.cgi?id=130133
Reviewed by Gyuyoung Kim.
Implement an API to set and get process model in ewk_context.
By default process model enum value is set to EWK_PROCESS_MODEL_SHARED_SECONDARY
which keeps current behaviour. Setting EWK_PROCESS_MODEL_MULTIPLE_SECONDARY
will make each web view use separate web process, also enables network process.
* UIProcess/API/efl/ewk_context.cpp:
(toWKProcessModel):
(EwkContext::setProcessModel):
(toEwkProcessModel):
(EwkContext::processModel):
(ewk_context_process_model_set):
(ewk_context_process_model_get):
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
(TEST_F):
2014-03-24 Chris Fleizach <cfleizach@apple.com>
AX: hit-testing doesn't always work correctly with WK2
https://bugs.webkit.org/show_bug.cgi?id=130706
Reviewed by Simon Fraser.
Accessibility code was trying to do screenToRootView itself, and in
some cases with embedded WK2 views that did not work.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2014-03-24 Benjamin Poulain <bpoulain@apple.com>
[WK2] SpinLock are not initialized by default, ViewUpdateDispatcher is missing an initializer
https://bugs.webkit.org/show_bug.cgi?id=130705
Reviewed by Simon Fraser.
* WebProcess/WebPage/ViewUpdateDispatcher.cpp:
(WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
2014-03-24 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] Dictation support.
https://bugs.webkit.org/show_bug.cgi?id=130622
<rdar://problem/15337316>
Reviewed by Benjamin Poulain.
Adding support for dictation on iOS. There are two main types of interactions
with the dictation system:
- initial request for context, which consists in retrieving the selected text
and 5 words before the selection and 5 words after, if available.
- insertion of recognized chunks of text, providing the text
to replace.
* UIProcess/AutoCorrectionCallback.h:
(WebKit::DictationContextCallback::create):
(WebKit::DictationContextCallback::~DictationContextCallback):
(WebKit::DictationContextCallback::performCallbackWithReturnValue):
(WebKit::DictationContextCallback::invalidate):
(WebKit::DictationContextCallback::DictationContextCallback):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView replaceDictatedText:withText:]):
(-[WKContentView requestDictationContext:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::dictationContextCallback):
(WebKit::WebPageProxy::replaceDictatedText):
(WebKit::WebPageProxy::requestDictationContext):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::requestDictationContext):
(WebKit::WebPage::replaceDictatedText):
2014-03-24 Andy Estes <aestes@apple.com>
Yet another iOS build fix, for the 32-bit build this time.
* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::setUpDownloadClient):
2014-03-24 Tim Horton <timothy_horton@apple.com>
REGRESSION (r165872): Double-applying device scale to snapshots
https://bugs.webkit.org/show_bug.cgi?id=130697
<rdar://problem/16396629>
Reviewed by Simon Fraser.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scaledSnapshotWithOptions):
Drive-by, make scaledSnapshotWithOptions respect SnapshotOptionsExcludeDeviceScaleFactor.
(WebKit::WebPage::snapshotAtSize):
Divide the device scale out of the scale factor
* WebProcess/WebPage/WebPage.h:
Rename the scale argument to scaledSnapshotWithOptions to clarify
that it is an additional scale on top of the device scale.
2014-03-24 Brent Fulgham <bfulgham@apple.com>
Activate WebVTT Tests Once Merging is Complete
https://bugs.webkit.org/show_bug.cgi?id=130420
Reviewed by Eric Carlson.
* Configurations/FeatureDefines.xcconfig: Turn on ENABLE(WEBVTT_REGIONS)
2014-03-24 Andy Estes <aestes@apple.com>
Fix the iOS build.
* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::setUpDownloadClient):
* UIProcess/Cocoa/DownloadClient.mm:
2014-03-24 Mark Rowe <mrowe@apple.com>
Build fix after r166186.
* UIProcess/Cocoa/DownloadClient.mm:
2014-03-24 Benjamin Poulain <bpoulain@apple.com>
[WK2] Make updates on ViewUpdateDispatcher less heavy
https://bugs.webkit.org/show_bug.cgi?id=130626
Reviewed by Darin Adler.
* WebProcess/WebPage/ViewUpdateDispatcher.cpp:
(WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
(WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
* WebProcess/WebPage/ViewUpdateDispatcher.h:
2014-03-24 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Micro-optimize view state updates on the UIProcess side
https://bugs.webkit.org/show_bug.cgi?id=130631
Reviewed by Darin Adler.
* UIProcess/API/Cocoa/WKWebView.mm:
(contentZoomScale):
[UIScrollView zoomScale] is not fast enough for -[WKWebView _updateVisibleContentRects]. Since we know what the zoom view is,
make a fast version hardcoding that.
(-[WKWebView _updateScrollViewBackground]):
(-[WKWebView _zoomToPoint:WebCore::atScale:]):
(-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
(-[WKWebView _zoomToRect:WebCore::withOrigin:WebCore::fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
(-[WKWebView _updateVisibleContentRects]):
* UIProcess/ios/WKContentView.mm:
(fixedPositionRectFromExposedRect):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
2014-03-24 Dean Jackson <dino@apple.com>
Remove WebGL asset entitlement
https://bugs.webkit.org/show_bug.cgi?id=130685
Reviewed by Simon Fraser.
No longer necessary on iOS.
* Configurations/WebContent-iOS.entitlements:
2014-03-24 Andy Estes <aestes@apple.com>
[iOS] Download support by CFURLDownloadRef under USE(CFNETWORK).
https://bugs.webkit.org/show_bug.cgi?id=129322
Reviewed by Anders Carlsson.
Based on an original patch by Yongjun Zhang <yongjun_zhang@apple.com>.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* Shared/Downloads/ios/DownloadIOS.mm:
(WebKit::dispatchOnMainThread):
(WebKit::toDownload):
(WebKit::setUpDownloadClient):
(WebKit::Download::startWithHandle):
* UIProcess/API/APIDownloadClient.h:
(API::DownloadClient::~DownloadClient):
* UIProcess/API/C/WKContext.cpp:
(WKContextSetDownloadClient):
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _downloadDelegate]):
(-[WKProcessPool _setDownloadDelegate:]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/API/Cocoa/_WKDownload.h: Added.
* UIProcess/API/Cocoa/_WKDownload.mm: Added.
(WebKit::wrapper):
(WebKit::createAPIDownloadClient):
(-[_WKDownload dealloc]):
(-[_WKDownload API::]):
* UIProcess/API/Cocoa/_WKDownloadDelegate.h: Added.
* UIProcess/API/Cocoa/_WKDownloadInternal.h: Added.
* UIProcess/Cocoa/DownloadClient.h: Added.
* UIProcess/Cocoa/DownloadClient.mm: Added.
* WebKit2.xcodeproj/project.pbxproj:
2014-03-24 Dániel Bátyai <dbatyai.u-szeged@partner.samsung.com>
[EFL][WK2] Buildfix after r166159.
Reviewed by Csaba Osztrogonác.
* UIProcess/API/efl/ewk_settings.cpp:
(ewk_settings_file_access_from_file_urls_allowed_set):
(ewk_settings_file_access_from_file_urls_allowed_get):
2014-03-24 Jinwoo Song <jinwoo7.song@samsung.com>
[EFL][WK2] Use C API inside ewk_settings
https://bugs.webkit.org/show_bug.cgi?id=107820
Reviewed by Gyuyoung Kim.
Use C API inside ewk_settings instead of accessing directly
internal C++ classes, to avoid violating API layering.
Original-author: Christophe Dumez <ch.dumez@sisa.samsung.com>
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
* UIProcess/API/efl/ewk_settings.cpp:
(ewk_settings_fullscreen_enabled_set):
(ewk_settings_fullscreen_enabled_get):
(ewk_settings_javascript_enabled_set):
(ewk_settings_javascript_enabled_get):
(ewk_settings_loads_images_automatically_set):
(ewk_settings_loads_images_automatically_get):
(ewk_settings_developer_extras_enabled_set):
(ewk_settings_developer_extras_enabled_get):
(ewk_settings_file_access_from_file_urls_allowed_set):
(ewk_settings_file_access_from_file_urls_allowed_get):
(ewk_settings_frame_flattening_enabled_set):
(ewk_settings_frame_flattening_enabled_get):
(ewk_settings_dns_prefetching_enabled_set):
(ewk_settings_dns_prefetching_enabled_get):
(ewk_settings_encoding_detector_enabled_set):
(ewk_settings_encoding_detector_enabled_get):
(ewk_settings_preferred_minimum_contents_width_set):
(ewk_settings_preferred_minimum_contents_width_get):
(ewk_settings_offline_web_application_cache_enabled_set):
(ewk_settings_offline_web_application_cache_enabled_get):
(ewk_settings_scripts_can_open_windows_set):
(ewk_settings_scripts_can_open_windows_get):
(ewk_settings_local_storage_enabled_set):
(ewk_settings_local_storage_enabled_get):
(ewk_settings_plugins_enabled_set):
(ewk_settings_plugins_enabled_get):
(ewk_settings_default_font_size_set):
(ewk_settings_default_font_size_get):
(ewk_settings_private_browsing_enabled_set):
(ewk_settings_private_browsing_enabled_get):
(ewk_settings_text_autosizing_enabled_set):
(ewk_settings_text_autosizing_enabled_get):
(ewk_settings_spatial_navigation_enabled_set):
(ewk_settings_spatial_navigation_enabled_get):
(EwkSettings::setDefaultTextEncodingName):
* UIProcess/API/efl/ewk_settings_private.h:
(EwkSettings::EwkSettings):
(EwkSettings::preferences):
2014-03-24 Zan Dobersek <zdobersek@igalia.com>
[GTK][WK2] Guard NetscapePluginModule methods used in PluginInfoCache that are specific to X11 architecture
https://bugs.webkit.org/show_bug.cgi?id=130663
Reviewed by Carlos Garcia Campos.
The two used methods are specific to the X11 plugin architecture and are not declared when building for a
Wayland-only configuration. Guarding them prevents build failures, but does not ensure proper functionality
which isn't a problem anyway since there's no support yet for Netscape plugins on Wayland.
* UIProcess/Plugins/gtk/PluginInfoCache.cpp:
(WebKit::PluginInfoCache::getPluginInfo): Guard NetscapePluginModule::parseMIMEDescription with PLUGIN_ARCHITECTURE(X11).
(WebKit::PluginInfoCache::updatePluginInfo): Ditto for NetscapePluginModule::buildMIMEDescription.
2014-03-24 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Convert some more OwnPtr/PassOwnPtr to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=130662
Reviewed by Gyuyoung Kim.
Replace uses of PassOwnPtr/OwnPtr with std::unique_ptr in remained WebKit2/Efl specific code.
* UIProcess/API/efl/EwkView.h:
* UIProcess/API/efl/ewk_cookie_manager.cpp:
* UIProcess/API/efl/ewk_database_manager.cpp:
(getDatabaseOriginsCallback):
* UIProcess/API/efl/ewk_error_private.h:
* UIProcess/efl/DownloadManagerEfl.cpp:
(WebKit::DownloadManagerEfl::didFail):
* UIProcess/efl/InputMethodContextEfl.h:
(WebKit::InputMethodContextEfl::create):
* UIProcess/efl/PageLoadClientEfl.cpp:
(WebKit::PageLoadClientEfl::didFailLoadWithErrorForFrame):
(WebKit::PageLoadClientEfl::didFailProvisionalLoadWithErrorForFrame):
2014-03-23 Hyowon Kim <hw1008.kim@samsung.com>
Move all EFL typedefs into EflTypedefs.h.
https://bugs.webkit.org/show_bug.cgi?id=130511
Reviewed by Gyuyoung Kim.
* Shared/API/c/efl/WKArrayEfl.h: Remove EFL typedefs.
* UIProcess/API/efl/EwkView.h: Ditto.
2014-03-23 Jinwoo Song <jinwoo7.song@samsung.com>
[WK2] Refine WebKit2 BatteryStatus code
https://bugs.webkit.org/show_bug.cgi?id=130573
Reviewed by Anders Carlsson.
Refinements
- Return PassRef instead of PassRefPtr in create methods
- Use auto instead of iterator
* UIProcess/WebBatteryManagerProxy.cpp:
(WebKit::WebBatteryManagerProxy::create):
* UIProcess/WebBatteryManagerProxy.h:
* UIProcess/efl/BatteryProvider.cpp:
(BatteryProvider::create):
* UIProcess/efl/BatteryProvider.h:
* WebProcess/Battery/WebBatteryManager.cpp:
(WebKit::WebBatteryManager::didChangeBatteryStatus):
(WebKit::WebBatteryManager::updateBatteryStatus):
2014-03-23 Sam Weinig <sam@webkit.org>
Simplify the HTMLConverter interface (Part 2)
https://bugs.webkit.org/show_bug.cgi?id=130654
Reviewed by Darin Adler.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::performDictionaryLookupForRange):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getAttributedSubstringFromRange):
(WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
(WebKit::WebPage::performDictionaryLookupAtLocation):
(WebKit::WebPage::performDictionaryLookupForSelection):
(WebKit::WebPage::performDictionaryLookupForRange):
2014-03-23 David Kilzer <ddkilzer@apple.com>
WebKit::resistanceForDelta() truncates 'scaleDistance' to integer value using abs()
<http://webkit.org/b/130651>
Reviewed by Darin Adler.
Fixes the following build failure with trunk clang:
WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: error: using integer absolute value function 'abs' when argument is of floating point type [-Werror,-Wabsolute-value]
double scaleDistance = abs(limit - currentScale);
^
WebKit2/UIProcess/mac/ViewGestureControllerMac.mm:112:28: note: use function 'fabs' instead
double scaleDistance = abs(limit - currentScale);
^~~
fabs
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::resistanceForDelta): Use fabs() instead of abs().
2014-03-23 Simon Fraser <simon.fraser@apple.com>
Clean up #includes by geometry classes
https://bugs.webkit.org/show_bug.cgi?id=130645
Reviewed by Andreas Kling.
Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
classes brings in a lot of additional headers. Fix by adding a new
GeometryUtilities file so that the basic files don't need Vector,
and including GeometryUtilities.h where necessary.
Also forward declare PrintStream.h and only bring in the header
in implementation files.
* Shared/UpdateInfo.h:
* UIProcess/BackingStore.h:
* UIProcess/CoordinatedGraphics/PageViewportController.h:
* UIProcess/FindIndicator.cpp:
* UIProcess/mac/WKPrintingView.h:
2014-03-23 Simon Fraser <simon.fraser@apple.com>
Clean up #includes by geometry classes
https://bugs.webkit.org/show_bug.cgi?id=130645
Reviewed by Andreas Kling.
Pulling in <wtf/Vector.h> and <wtf/PrintStream.h> in the simple geometry
classes brings in a lot of additional headers. Fix by adding a new
GeometryUtilities file so that the basic files don't need Vector,
and including GeometryUtilities.h where necessary.
Also forward declare PrintStream.h and only bring in the header
in implementation files.
* UIProcess/BackingStore.h:
* UIProcess/FindIndicator.cpp:
* UIProcess/mac/WKPrintingView.h:
2014-03-22 Alexey Proskuryakov <ap@apple.com>
Assertions in WebPage::rangeFromEditingRange when requested range location is NSNotFound
https://bugs.webkit.org/show_bug.cgi?id=130633
<rdar://problem/16397583>
Reviewed by Darin Adler.
* UIProcess/API/mac/WKView.mm:
(-[WKView firstRectForCharacterRange:completionHandler:]):
(-[WKView firstRectForCharacterRange:actualRange:]):
Return NSZeroRect, like NSTextView does for any locations that are out of bounds.
There is no need for a round trip to WebProcess in this case.
2014-03-21 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Reduce the tiling coverage to the current rect and 1 tile size ahead
https://bugs.webkit.org/show_bug.cgi?id=130555
Reviewed by Simon Fraser.
* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::operator==):
* UIProcess/ios/WKContentView.mm:
(WebKit::HistoricalKinematicData::HistoricalKinematicData):
(WebKit::HistoricalKinematicData::velocityForNewData):
(WebKit::HistoricalKinematicData::clear):
(WebKit::HistoricalKinematicData::append):
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
* WebProcess/WebPage/ViewUpdateDispatcher.cpp:
(WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
2014-03-21 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r165356): Predictive Chinese input is broken
https://bugs.webkit.org/show_bug.cgi?id=130619
Reviewed by Enrica Casucci.
* UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::executeKeypressCommands):
Like after insertText, we are no longer in an intermediate state after executeKeypressCommands.
Make sure that we don't call -discardMarkedText the next time we get a non-intermediate
state with closed composition.
2014-03-21 Sam Weinig <sam@webkit.org>
[WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=130528
Reviewed by Tim Horton.
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::getAuditToken):
Expose the audit data if available.
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
Pass the audit data corresponding to the UIProcess.
* Configurations/Network-iOS.entitlements: Copied from Configurations/WebContent-iOS.entitlements.
* Configurations/NetworkProcess.xcconfig:
* Configurations/NetworkService.Development.xcconfig:
* Configurations/NetworkService.xcconfig:
* Configurations/WebContent-iOS.entitlements:
Add entitlement allowing the audit data to be used.
2014-03-21 Tim Horton <timothy_horton@apple.com>
Always retrieve the screen scale factor from WKSI
<rdar://problem/16329679>
Reviewed by Sam Weinig.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
(-[WKContentView _updateForScreen:]):
Use WKGetScreenScaleFactor/WKGetScaleFactorForScreen.
2014-03-21 Yongjun Zhang <yongjun_zhang@apple.com>
[Webkit2] Add APIDownloadClient for download support.
https://bugs.webkit.org/show_bug.cgi?id=130484
Add API::DownloadClient to WebContext and get rid of WebDownloadClient.
Reviewed by Anders Carlsson.
* UIProcess/API/APIDownloadClient.h: Added.
(API::DownloadClient::~DownloadClient):
(API::DownloadClient::didStart):
(API::DownloadClient::didReceiveAuthenticationChallenge):
(API::DownloadClient::didReceiveResponse):
(API::DownloadClient::didReceiveData):
(API::DownloadClient::shouldDecodeSourceDataOfMIMEType):
(API::DownloadClient::decideDestinationWithSuggestedFilename):
(API::DownloadClient::didCreateDestination):
(API::DownloadClient::didFinish):
(API::DownloadClient::didFail):
(API::DownloadClient::didCancel):
(API::DownloadClient::processDidCrash):
* UIProcess/API/C/WKContext.cpp:
(WKContextSetDownloadClient): Move the original WebDownloadClient methods to a local class
DownloadClient and set up the downloadClient for WebContext.
* UIProcess/Downloads/DownloadProxy.cpp:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::setDownloadClient):
* UIProcess/WebContext.h:
(WebKit::WebContext::downloadClient):
* UIProcess/WebDownloadClient.cpp: Removed.
* UIProcess/WebDownloadClient.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:
2014-03-21 Alexey Proskuryakov <ap@apple.com>
ASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
https://bugs.webkit.org/show_bug.cgi?id=130526
<rdar://problem/16371612>
This was fixed yesterday for sync code path, landing the same this for async one.
* UIProcess/API/mac/WKView.mm: (-[WKView performKeyEquivalent:]):
2014-03-21 Pratik Solanki <psolanki@apple.com>
Add callbacks in WebKit2 Cocoa API for page load testing
https://bugs.webkit.org/show_bug.cgi?id=130569
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInLoadDelegate.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm:
(didFirstVisuallyNonEmptyLayoutForFrame):
(didHandleOnloadEventsForFrame):
(setUpPageLoaderClient):
(willSendRequestForFrame):
(didInitiateLoadForResource):
(didFinishLoadForResource):
(didFailLoadForResource):
(setUpResourceLoadClient):
2014-03-21 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Remove Ewk_Error parameter from some async callbacks
https://bugs.webkit.org/show_bug.cgi?id=130567
Reviewed by Gyuyoung Kim.
WebKit2 internally uses GenericCallbacks for several APIs such as WKKeyValueStorageManagerGetKeyValueStorageOrigins.
But only few callbacks really return errors.
This patch removes Ewk_Error parameters from these callbacks not to make
the confusion for application developers.
* UIProcess/API/efl/ewk_cookie_manager.cpp:
(getAcceptPolicyCallback):
(getHostnamesWithCookiesCallback):
* UIProcess/API/efl/ewk_cookie_manager.h:
* UIProcess/API/efl/ewk_database_manager.cpp:
(getDatabaseOriginsCallback):
* UIProcess/API/efl/ewk_database_manager.h:
* UIProcess/API/efl/ewk_storage_manager.cpp:
(getStorageOriginsCallback):
* UIProcess/API/efl/ewk_storage_manager.h:
* UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
(EWK2CookieManagerTest::getAcceptPolicyCallback):
(EWK2CookieManagerTest::getHostnamesWithCookiesCallback):
* UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
(EWK2DatabaseManagerTest::databaseOriginsCallback):
* UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
(EWK2StorageManagerTest::getStorageOriginsCallback):
2014-03-21 Darin Adler <darin@apple.com>
Improve idiom used for string building in a few places
https://bugs.webkit.org/show_bug.cgi?id=130561
Reviewed by Andreas Kling.
* Shared/mac/ChildProcessMac.mm:
(WebKit::ChildProcess::initializeSandbox): Use a more efficient idiom for string
concatenation.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::WebInspectorProxy::createInspectorPage): Use a StringBuilder.
2014-03-20 Hyowon Kim <hw1008.kim@samsung.com>
Move to using std::unique_ptr for EFL objects.
https://bugs.webkit.org/show_bug.cgi?id=129853
Reviewed by Gyuyoung Kim.
EflUniquePtr is a template alias of std::unique_ptr
with a custom deleter for each Efl Objects, which is motivated by GUniquePtr.
This patch replaces uses of OwnPtr and PassOwnPtr for Efl objects with EflUniquePtr.
* Platform/Module.h:
* Platform/efl/ModuleEfl.cpp:
(WebKit::Module::load):
* UIProcess/API/efl/EwkView.cpp:
(EwkView::EwkView):
* UIProcess/API/efl/EwkView.h:
* UIProcess/efl/InputMethodContextEfl.cpp:
(WebKit::InputMethodContextEfl::InputMethodContextEfl):
(WebKit::InputMethodContextEfl::createIMFContext):
* UIProcess/efl/InputMethodContextEfl.h:
(WebKit::InputMethodContextEfl::create):
2014-03-20 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[EFL][GTK] Get CMake to find Freetype2 properly
https://bugs.webkit.org/show_bug.cgi?id=130150
Reviewed by Martin Robinson.
Newer versions of CMake are not able to find Freetype2 correctly.
FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
freetype2 repo, because a completely different version number is found in freetype2.pc.
* PlatformEfl.cmake:
2014-03-20 Martin Robinson <mrobinson@igalia.com>
[GTK] Suppress errors about using gdk_threads_enter gdk_threads_leave
https://bugs.webkit.org/show_bug.cgi?id=130517
Reviewed by Sergio Villar Senin.
* UIProcess/API/gtk/WebKitWebView.cpp: Use GCC suppression to suppress errors about deprecations.
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Ditto.
2014-03-20 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] tests of test_ewk2_cookie_manager are flaky
https://bugs.webkit.org/show_bug.cgi?id=130498
Reviewed by Gyuyoung Kim.
Loaded web page before calling getAcceptPolicy() to guarantee that webprocess
or networkprocess was launched and registered WebCookieManager.
* UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
(TEST_F):
2014-03-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r165985.
https://bugs.webkit.org/show_bug.cgi?id=130551
broke page loading on all cocoa platforms (Requested by
thorton on #webkit).
Reverted changeset:
"[WebKit2] Implement
NetworkingContext::sourceApplicationAuditData() for WebKit2"
https://bugs.webkit.org/show_bug.cgi?id=130528
http://trac.webkit.org/changeset/165985
2014-03-20 Alexey Proskuryakov <ap@apple.com>
Fix a long-standing typo that's now breaking USE(ASYNC_NSTEXTINPUTCLIENT) build.
Rubber-stamped by Tim Horton.
* UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::cancelComposition):
Use a correct type for reply (it's really the same type, but ConfirmComposition
is behind an ifdef, and not available).
2014-03-20 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] typing and deleting text lags behind the caret movement on google.com.
https://bugs.webkit.org/show_bug.cgi?id=130544
<rdar://problem/16380296>
Reviewed by Tim Horton.
On iOS the selection is drawn in the UIProcess. If the WebProcess is
processing multiple requests within the same runloop, the caret could be
updated in the UIProcess before the WebProcess has had a chance to paint.
This change synchronizes the selection drawing with the tile update.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _didCommitLayerTree:WebKit::]):
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _selectionChanged]):
(-[WKContentView _updateChangedSelection]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::didChangeSelection):
2014-03-20 Alexey Proskuryakov <ap@apple.com>
Generalize WebInspector check in maybeInitializeSandboxExtensionHandle().
https://bugs.webkit.org/show_bug.cgi?id=130079
<rdar://problem/16286683>
Reviewed by Anders Carlsson.
* UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::maybeInitializeSandboxExtensionHandle):
Perform an early return for all paths that don't need a sandbox extension due to
access being assumed, not only for WebInspector pages.
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::hasAssumedReadAccessToURL):
(WebKit::WebProcessProxy::checkURLReceivedFromWebProcess):
* UIProcess/WebProcessProxy.h:
Factored out m_localPathsWithAssumedReadAccess iteration to a public function.
2014-03-20 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed buildfix after r165983 for non Cocoa platforms.
* UIProcess/API/C/WKAPICast.h:
* UIProcess/API/C/WKPreferences.cpp:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
2014-03-20 Beth Dakin <bdakin@apple.com>
Implement contentInset for Mac WebKit2
https://bugs.webkit.org/show_bug.cgi?id=130273
Reviewed by Simon Fraser.
This patch adds WKView API for setting a topContentInset(). All of this work gets
that number plumbed down to WebCore.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _setTopContentInset:]):
(-[WKWebView _topContentInset]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _setTopContentInset:]):
(-[WKView _topContentInset]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setTopContentInset):
(WebKit::WebPageProxy::creationParameters):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::topContentInset):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::setTopContentInset):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2014-03-20 Anders Carlsson <andersca@apple.com>
Fix 32-bit build.
* UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm:
2014-03-20 Anders Carlsson <andersca@apple.com>
Make WKProcessPoolConfiguration SPI
https://bugs.webkit.org/show_bug.cgi?id=130537
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKProcessPool.h:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool init]):
(-[WKProcessPool dealloc]):
(-[WKProcessPool description]):
(-[WKProcessPool _configuration]):
(-[WKProcessPool API::]):
(-[WKProcessPool _initWithConfiguration:]):
* UIProcess/API/Cocoa/WKProcessPoolConfiguration.h:
* UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm:
(-[WKProcessPoolConfiguration _injectedBundleURL]):
(-[WKProcessPoolConfiguration _setInjectedBundleURL:]):
* UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h:
* UIProcess/API/Cocoa/WKProcessPoolInternal.h:
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/API/Cocoa/WKProcessPoolToBeRemoved.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolPrivate.h.
(-[WKProcessPool initWithConfiguration:]):
(-[WKProcessPool configuration]):
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h.
* UIProcess/API/Cocoa/_WKProcessPoolConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm.
(-[_WKProcessPoolConfiguration injectedBundleURL]):
(-[_WKProcessPoolConfiguration setInjectedBundleURL:]):
(-[_WKProcessPoolConfiguration description]):
(-[_WKProcessPoolConfiguration copyWithZone:]):
* WebKit2.xcodeproj/project.pbxproj:
2014-03-20 Tim Horton <timothy_horton@apple.com>
Add WebCore::IOSurface wrapper
https://bugs.webkit.org/show_bug.cgi?id=130529
Reviewed by Simon Fraser.
* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
(RemoteLayerBackingStore::encode):
(RemoteLayerBackingStore::decode):
(RemoteLayerBackingStore::display):
(RemoteLayerBackingStore::applyBackingStoreToLayer):
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
(WebKit::ViewGestureController::removeSwipeSnapshot):
* UIProcess/mac/ViewSnapshotStore.h:
* UIProcess/mac/ViewSnapshotStore.mm:
(WebKit::createIOSurfaceFromImage):
(WebKit::ViewSnapshotStore::recordSnapshot):
Adopt WebCore::IOSurface.
2014-03-20 Alexey Proskuryakov <ap@apple.com>
Update iOS input method code to use new cross-platform async functions
https://bugs.webkit.org/show_bug.cgi?id=130530
Reviewed by Enrica Casucci.
Merge identical iOS and cross-platform functions.
Also tightened up ifdefs, and removed stub iOS implementations of sync methods,
which hopefully won't be ever needed. The only tricky case is sync cancelComposition,
will I'll investigate separately.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setMarkedText:selectedRange:]):
(-[WKContentView unmarkText]):
(-[WKContentView insertText:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::cancelComposition):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::cancelComposition):
(WebKit::WebPageProxy::insertDictatedTextAsync):
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
(WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::cancelComposition):
(WebKit::WebPage::insertDictatedTextAsync):
(WebKit::WebPage::attributedSubstringForCharacterRangeAsync):
2014-03-20 Alexey Proskuryakov <ap@apple.com>
ASSERTION FAILED: event == [NSApp currentEvent] hitting Command-+
https://bugs.webkit.org/show_bug.cgi?id=130526
<rdar://problem/16371612>
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm: (-[WKView performKeyEquivalent:]): Cut custom
processing short whenever we are redispatching an event, not just when the event
we are handling is the one being redispatched. There shouldn't be any other unrelated
events here, just the one being redispatched and synthetic ones generated from it by AppKit.
2014-03-20 Anders Carlsson <andersca@apple.com>
Fix build.
Rename WKPreferencesPrivate.h to WKPreferencesRefPrivate.h.
* UIProcess/API/C/WKPreferencesRefPrivate.h: Renamed from Source/WebKit2/UIProcess/API/C/WKPreferencesPrivate.h.
* UIProcess/API/Cocoa/WKPreferencesPrivate.h:
* WebKit2.xcodeproj/project.pbxproj:
2014-03-20 Gavin Barraclough <barraclough@apple.com>
Merge AtomicString, Identifier
https://bugs.webkit.org/show_bug.cgi?id=128624
Unreviewed build fix following r165982.
* WebProcess/Plugins/Netscape/NPJSObject.cpp:
- update includes.
2014-03-20 Sam Weinig <sam@webkit.org>
[WebKit2] Implement NetworkingContext::sourceApplicationAuditData() for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=130528
Reviewed by Anders Carlsson.
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::getAuditToken):
Expose the audit data if available.
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::sourceApplicationAuditData):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::sourceApplicationAuditData):
Pass the audit data corresponding to the UIProcess.
2014-03-20 Sam Weinig <sam@webkit.org>
[Cocoa] Expose preference to enable telephone number detection
https://bugs.webkit.org/show_bug.cgi?id=130524
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKPreferences.mm:
(-[WKPreferences _telephoneNumberDetectionIsEnabled]):
(-[WKPreferences _setTelephoneNumberDetectionIsEnabled:]):
* UIProcess/API/Cocoa/WKPreferencesInternal.h:
* UIProcess/API/Cocoa/WKPreferencesPrivate.h: Added.
* WebKit2.xcodeproj/project.pbxproj:
2014-03-19 Alexey Proskuryakov <ap@apple.com>
[Mac] Support asynchronous NSTextInputClient
https://bugs.webkit.org/show_bug.cgi?id=130479
Reviewed by Anders Carlsson.
The implementation is currently disabled, pending lower level support.
Most of the code is not under compile time guard however, to facilitate cross-platform
reuse, or at least under a PLATFORM(COCOA) guard to share the code with iOS.
* UIProcess/API/mac/WKView.mm: Added a compile time branch for USE(ASYNC_NSTEXTINPUTCLIENT).
We still implement sync NSTextInputClient here, in order to get assertions when
its methods are unexpectedly called.
The new code first sends an event to input method asynchronously, handling any callbacks
that may arrive. During this time, we no longer care about WKViewInterpretKeyEventsParameters
at all. Once done, we interpret key bindings synchronously, collecting them into
a vector.
* UIProcess/API/mac/WKViewInternal.h: We no longer expose _interpretKeyEvent outside
WKView.
* UIProcess/WebPageProxy.cpp:
* UIProcess/WebPageProxy.h:
Added async calls and callbacks. Removed unnecessary and slightly harmful .get() when moving
a callback pointer into map. Moved insertDictatedText() and getAttributedSubstringFromRange()
from PLATFORM(COCOA) to PLATFORM(MAC), because they are unused and unimplemented on
iOS, and unlikely to be needed any time soon. Changed USE(APPKIT) to PLATFORM(MAC),
because that's more accurate in this case (nothing depends on AppKit, it's just code
that we only need on Mac).
* UIProcess/WebPageProxy.messages.in: Added messages for new async IM responses.
* UIProcess/ios/WebPageProxyIOS.mm: Removed insertDictatedText() and getAttributedSubstringFromRange().
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::insertDictatedTextAsync):
(WebKit::WebPageProxy::attributedSubstringForCharacterRangeAsync):
(WebKit::WebPageProxy::attributedStringForCharacterRangeCallback):
Added async calls and callbacks that are Mac only.
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/mac/WebPageMac.mm:
Added async implementations (which are essentially the same as sync ones, sadly).
* WebProcess/WebPage/WebPage.messages.in: Added async messages, moved some messages
under PLATFORM(MAC).
* WebProcess/WebPage/ios/WebPageIOS.mm: More of deleting functions that are Mac only,
and cannot be easily implemented in WebPage.cpp with shared code.
2014-03-20 Martin Robinson <mrobinson@igalia.com>
Remove remaining GTK+ unused parameter warnings from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=130518
Reviewed by Sergio Villar Senin.
Fix almost all unused parameter warnings in the WebKit2GTK+ build.
2014-03-20 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r165962.
https://bugs.webkit.org/show_bug.cgi?id=130512
It broke the build (Requested by Ossy on #webkit).
Reverted changeset:
"[EFL][GTK] Get CMake to find Freetype2 properly"
https://bugs.webkit.org/show_bug.cgi?id=130150
http://trac.webkit.org/changeset/165962
2014-03-20 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[EFL][GTK] Get CMake to find Freetype2 properly
https://bugs.webkit.org/show_bug.cgi?id=130150
Reviewed by Csaba Osztrogonác.
Newer versions of CMake are not able to find Freetype2 correctly.
FindFreetype2.cmake checks for the version number in freetype.h header, since it seems that bug exists in
freetype2 repo, because a completely different version number is found in freetype2.pc.
* PlatformEfl.cmake:
2014-03-20 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] test_ewk2_application_cache_manager is flaky
https://bugs.webkit.org/show_bug.cgi?id=130501
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
(timerCallback): Return ECORE_CALLBACK_CANCEL to clear the timer.
2014-03-19 Tim Horton <timothy_horton@apple.com>
Address late review comment and style nit after r165934.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
2014-03-19 Tim Horton <timothy_horton@apple.com>
[iOS][WebKit2] Back-forward swipe doesn't always complete with fingers down
https://bugs.webkit.org/show_bug.cgi?id=130489
<rdar://problem/16027007>
Reviewed by Simon Fraser.
* UIProcess/ios/ViewGestureControllerIOS.mm:
(WebKit::ViewGestureController::beginSwipeGesture):
In order to have fingers-down swipe completion work correctly, we need
to give UIKit an empty interactive update block.
2014-03-19 Anders Carlsson <andersca@apple.com>
Get rid of two IPC::Connection functions by folding them into lambdas
https://bugs.webkit.org/show_bug.cgi?id=130482
Reviewed by Tim Horton.
* Platform/IPC/Connection.cpp:
(IPC::Connection::addWorkQueueMessageReceiver):
(IPC::Connection::removeWorkQueueMessageReceiver):
* Platform/IPC/Connection.h:
2014-03-19 Simon Fraser <simon.fraser@apple.com>
Expose text and page zoom in WK2 SPI, and hook them up in MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=130476
Reviewed by Anders Carlsson.
Expose page and text zoom as SPI.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _supportsTextZoom]):
(-[WKWebView _textZoomFactor]):
(-[WKWebView _setTextZoomFactor:]):
(-[WKWebView _pageZoomFactor]):
(-[WKWebView _setPageZoomFactor:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-03-19 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Reduce the extended background's opacity when WKContentView is smaller than its WKWebView
https://bugs.webkit.org/show_bug.cgi?id=130436
Reviewed by Beth Dakin.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateScrollViewBackground]):
2014-03-19 Benjamin Poulain <bpoulain@apple.com>
[iOS][WebKit2] <rdar://problem/16330387> Do not use the keyboard rect for computing the general unobscuredRect, only use it for centering
https://bugs.webkit.org/show_bug.cgi?id=130382
Reviewed by Simon Fraser.
Always accumulating the keyboard rect out of the exposedRect caused some issues (see <rdar://problem/16330387>).
This patch split the rect in two: unobscured rect for WebCore, and unobscuredContentRectIncludingKeyboard for centering
UI Elements in view.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
(-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
(-[WKWebView _zoomToRect:WebCore::withOrigin:WebCore::fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
(-[WKWebView _contentRectForUserInteraction]):
(-[WKWebView _updateVisibleContentRects]):
2014-03-19 Anders Carlsson <andersca@apple.com>
Get rid of WKProcessClass
https://bugs.webkit.org/show_bug.cgi?id=130478
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKProcessClass.h: Removed.
* UIProcess/API/Cocoa/WKProcessClass.mm: Removed.
* UIProcess/API/Cocoa/WKProcessClassConfiguration.h: Removed.
* UIProcess/API/Cocoa/WKProcessClassConfiguration.mm: Removed.
* UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h: Removed.
* UIProcess/API/Cocoa/WKProcessClassPrivate.h: Removed.
* UIProcess/API/Cocoa/WKWebViewConfigurationToBeRemoved.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:
2014-03-19 Jer Noble <jer.noble@apple.com>
[Mac][EME] Query whether decoder support exists before creating a new MediaKeys object.
https://bugs.webkit.org/show_bug.cgi?id=130459
Reviewed by Eric Carlson.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface): Initialize the new WCSI method.
2014-03-19 Brady Eidson <beidson@apple.com>
Filter out editable services from image menu for non-contenteditable images
<rdar://problem/16319645> and https://bugs.webkit.org/show_bug.cgi?id=130437
Reviewed by Tim Horton.
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(-[WKSharingServicePickerDelegate setIncludeEditorServices:]):
(-[WKSharingServicePickerDelegate sharingServicePicker:sharingServicesForItems:mask:proposedSharingServices:]):
Filter out editing services based on the includeEditorServices flag.
(WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
(WebKit::WebContextMenuProxyMac::populate):
2014-03-19 Yongjun Zhang <yongjun_zhang@apple.com>
[iOS] WebKit2 Quicklook.
https://bugs.webkit.org/show_bug.cgi?id=130360
For WebKit2 resource loads, if we detect a quicklook content that QLConverter is able to
convert, handle the response data to QLConverter and use its delegate WKWebResourceQuickLookDelegate
to rounte the converted results (HTML) back into WebCore. Thie similiar logic has been in place
for WebKit1.
Reviewed by Tim Horton.
* WebKit2.xcodeproj/project.pbxproj: Add WebResourceLoaderIOS.mm to the project.
* WebProcess/Network/WebResourceLoadScheduler.cpp:
* WebProcess/ios/WebResourceLoaderIOS.mm: Added.
(-[WKWebResourceQuickLookDelegate initWithWebResourceLoader:WebKit::]): WKWebResourceQuickLookDelegate holds
the original WebResourceLoader so that we could send converted result to WebCore.
(-[WKWebResourceQuickLookDelegate connection:didReceiveDataArray:]):
(-[WKWebResourceQuickLookDelegate connection:didReceiveData:lengthReceived:]):
(-[WKWebResourceQuickLookDelegate connectionDidFinishLoading:]):
(-[WKWebResourceQuickLookDelegate connection:didFailWithError:]):
(-[WKWebResourceQuickLookDelegate clearHandle]):
(WebKit::WebResourceLoader::setUpQuickLookHandleIfNeeded):
2014-03-19 Tim Horton <timothy_horton@apple.com>
WebKit2 View Gestures: Swipe gesture can track vertical movement instead of horizontal movement
https://bugs.webkit.org/show_bug.cgi?id=130441
<rdar://problem/16337279>
Reviewed by Simon Fraser.
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::scrollEventCanBecomeSwipe):
Factor logic that determines if a scroll event can become a swipe
out into scrollEventCanBecomeSwipe.
Use <= instead of < when comparing the axes, because we don't want
to start a swipe on a completely diagonal scroll either (because AppKit
can start tracking a vertical swipe in that case).
(WebKit::ViewGestureController::handleScrollWheelEvent):
(WebKit::ViewGestureController::wheelEventWasNotHandledByWebCore):
Make use of scrollEventCanBecomeSwipe.
2014-03-18 Anders Carlsson <andersca@apple.com>
Add new functionality that will be required by the history item decoding
https://bugs.webkit.org/show_bug.cgi?id=130433
Reviewed by Sam Weinig.
* Shared/cf/KeyedDecoder.cpp:
(WebKit::KeyedDecoder::decodeUInt32):
(WebKit::KeyedDecoder::decodeInt32):
(WebKit::KeyedDecoder::decodeFloat):
* Shared/cf/KeyedDecoder.h:
2014-03-19 Tim Horton <timothy_horton@apple.com>
[iOS] WebPDFViewPlaceholder divides-by-zero with an empty document
https://bugs.webkit.org/show_bug.cgi?id=130444
<rdar://problem/15580682>
Reviewed by Sam Weinig.
* UIProcess/ios/WKPDFView.mm:
(-[WKPDFView web_setContentProviderData:]):
Don't make UIPDFPageViews for null pages.
2014-03-18 Tim Horton <timothy_horton@apple.com>
[iOS][WebKit2] Provide generic software-snapshotting API
https://bugs.webkit.org/show_bug.cgi?id=130385
<rdar://problem/16005957>
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _snapshotRect:intoImageOfWidth:completionHandler:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/_WKThumbnailView.mm:
(-[_WKThumbnailView initWithFrame:fromWKView:]):
(-[_WKThumbnailView _requestSnapshotIfNeeded]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::takeSnapshot):
(WebKit::WebPage::scaledSnapshotWithOptions):
(WebKit::WebPage::snapshotAtSize):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Rename TakeThumbnailSnapshot message to TakeSnapshot.
Fill the snapshot image with the FrameView's background color, to avoid
half-pixel alpha around the edges.
Factor snapshotAtSize out of scaledSnapshotWithOptions.
Don't apply both the custom and device scale factor to the base CTM,
only the device scale factor. Custom scale factor should only be
applied to the user CTM.
* Shared/ImageOptions.h:
Add a snapshot option, RespectDrawingAreaTransform, that maps
the rect through the drawing area's root layer transform.
Use this in place of the thumbnail-specific code in TakeThumbnailSnapshot.
Add a snapshot option, ExcludeDeviceScaleFactor, which means that
snapshotting will not factor the device scale in (useful for drawing
to a bitmap at an exact requested size).
2014-03-18 Samuel White <samuel_white@apple.com>
AX: Not able to use arrow keys to read text with VoiceOver before selection is set someplace (anyplace).
https://bugs.webkit.org/show_bug.cgi?id=130250
Reviewed by Chris Fleizach.
Added ability to toggle enhanced accessibility on and off to support tests that require it.
* WebProcess/InjectedBundle/API/c/WKBundlePage.cpp:
(WKAccessibilityEnableEnhancedAccessibility):
(WKAccessibilityEnhancedAccessibilityEnabled):
* WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h:
2014-03-18 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Rename async APIs for better consistency with EFL
https://bugs.webkit.org/show_bug.cgi?id=130319
Reviewed by Gyuyoung Kim.
There are inconsistency with async keyword in several ewebkit2 APIs.
This patch rename them to {module/feature}_async_{verb} for better consistency with EFL.
In addition, added Async keyword into their callback name.
* UIProcess/API/efl/ewk_application_cache_manager.cpp:
(EwkApplicationCacheOriginsAsyncData::EwkApplicationCacheOriginsAsyncData):
(getApplicationCacheOriginsCallback):
(ewk_application_cache_manager_origins_async_get):
* UIProcess/API/efl/ewk_application_cache_manager.h:
* UIProcess/API/efl/ewk_cookie_manager.cpp:
(EwkCookiePolicyAsyncData::EwkCookiePolicyAsyncData):
(getAcceptPolicyCallback):
(ewk_cookie_manager_accept_policy_async_get):
(EwkCookieHostnamesAsyncData::EwkCookieHostnamesAsyncData):
(getHostnamesWithCookiesCallback):
(ewk_cookie_manager_hostnames_with_cookies_async_get):
* UIProcess/API/efl/ewk_cookie_manager.h:
* UIProcess/API/efl/ewk_database_manager.cpp:
(EwkDatabaseOriginsAsyncData::EwkDatabaseOriginsAsyncData):
(getDatabaseOriginsCallback):
(ewk_database_manager_origins_async_get):
* UIProcess/API/efl/ewk_database_manager.h:
* UIProcess/API/efl/ewk_storage_manager.cpp:
(EwkStorageOriginsAsyncData::EwkStorageOriginsAsyncData):
(getStorageOriginsCallback):
(ewk_storage_manager_origins_async_get):
* UIProcess/API/efl/ewk_storage_manager.h:
* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
(timerCallback):
* UIProcess/API/efl/tests/test_ewk2_cookie_manager.cpp:
(EWK2CookieManagerTest::getAcceptPolicy):
(EWK2CookieManagerTest::getHostnamesWithCookies):
* UIProcess/API/efl/tests/test_ewk2_database_manager.cpp:
(EWK2DatabaseManagerTest::timerCallback):
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_storage_manager.cpp:
(EWK2StorageManagerTest::timerCallback):
(TEST_F):
2014-03-18 Tim Horton <timothy_horton@apple.com>
[iOS][WebKit2] Mark layer contents as being opaque if they are
https://bugs.webkit.org/show_bug.cgi?id=130427
<rdar://problem/15540434>
Reviewed by Simon Fraser.
* Shared/mac/RemoteLayerBackingStore.h:
(WebKit::RemoteLayerBackingStore::isOpaque):
* Shared/mac/RemoteLayerBackingStore.mm:
(RemoteLayerBackingStore::RemoteLayerBackingStore):
(RemoteLayerBackingStore::ensureBackingStore):
(RemoteLayerBackingStore::encode):
(RemoteLayerBackingStore::decode):
(RemoteLayerBackingStore::display):
(RemoteLayerBackingStore::applyBackingStoreToLayer):
Move the code to set a RemoteLayerBackingStore as a CALayer's contents
from RemoteLayerTreePropertyApplier to RemoteLayerBackingStore (mostly
as a way to keep the USE(IOSURFACE) #ifs in one place).
Remove the surface() getter, because it's no longer needed, and make
image() private as it can be now (and rename it to createImageForFrontBuffer
for clarity's sake).
Add an isOpaque argument to ensureBackingStore, encode/decode it, and
add a getter. If isOpaque is true when applying backing store to the
CALayer on the UI process side, set CALayer.contentsOpaque to let CA know.
Make opaque bitmaps if not using accelerated drawing. For the IOSurface
case, we can't make opaque IOSurfaces, but telling CA that we have filled
the whole bitmap still enables similar optimizations.
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::applyPropertiesToLayer):
Reset contentsOpaque if the layer loses its backing store.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTextStream::operator<<):
(WebKit::dumpChangedLayers):
Add a bit more logging about RemoteLayerBackingStore's opaqueness
and acceleratedness.
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::updateBackingStore):
(PlatformCALayerRemote::setOpaque):
Invalidate the RemoteLayerBackingStore if layer opaqueness changes.
2014-03-18 Brady Eidson <beidson@apple.com>
Make image controls menu work in WK2
<rdar://problem/16294412> and https://bugs.webkit.org/show_bug.cgi?id=130424
Reviewed by Tim Horton.
* Platform/SharedMemory.h:
* Platform/mac/SharedMemoryMac.cpp:
(WebKit::SharedMemory::Handle::~Handle):
(WebKit::SharedMemory::Handle::clear):
* Platform/unix/SharedMemoryUnix.cpp:
(WebKit::SharedMemory::Handle::~Handle):
(WebKit::SharedMemory::Handle::clear):
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::operator=):
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h:
(WebKit::ContextMenuContextData::controlledImageHandle):
* Shared/ShareableBitmap.cpp:
(WebKit::ShareableBitmap::Handle::clear):
* Shared/ShareableBitmap.h:
* UIProcess/WebContextMenuProxy.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
(WebKit::WebPageProxy::replaceControlledImage):
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebContextMenuProxyEfl.cpp:
(WebKit::WebContextMenuProxyEfl::showContextMenu):
* UIProcess/efl/WebContextMenuProxyEfl.h:
* UIProcess/gtk/WebContextMenuProxyGtk.cpp:
(WebKit::WebContextMenuProxyGtk::showContextMenu):
* UIProcess/gtk/WebContextMenuProxyGtk.h:
Add a sharing service context menu that lives side-by-side with the normal one:
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
(+[WKSharingServicePickerDelegate sharedSharingServicePickerDelegate]):
(-[WKSharingServicePickerDelegate setMenuProxy:WebKit::]):
(-[WKSharingServicePickerDelegate setPicker:]):
(-[WKSharingServicePickerDelegate sharingServicePicker:delegateForSharingService:]):
(-[WKSharingServicePickerDelegate sharingService:willShareItems:]):
(-[WKSharingServicePickerDelegate sharingService:didShareItems:]):
(-[WKSharingServicePickerDelegate sharingService:sourceFrameOnScreenForShareItem:]):
(-[WKSharingServicePickerDelegate sharingService:transitionImageForShareItem:contentRect:]):
(-[WKSharingServicePickerDelegate sharingService:sourceWindowForShareItems:sharingContentScope:]):
(WebKit::WebContextMenuProxyMac::contextMenuItemSelected):
(WebKit::WebContextMenuProxyMac::setupImageServicesMenu):
(WebKit::WebContextMenuProxyMac::clearImageServicesMenu):
(WebKit::WebContextMenuProxyMac::populate):
(WebKit::WebContextMenuProxyMac::showContextMenu):
(WebKit::WebContextMenuProxyMac::window):
(WebKit::WebContextMenuProxyMac::replaceControlledImage):
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
(WebKit::WebContextMenu::replaceControlledImage):
* WebProcess/WebPage/WebContextMenu.h:
Teach the WebProcess how to accept the replaced image.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::replaceControlledImage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
2014-03-18 Anders Carlsson <andersca@apple.com>
Begin cleaning up KeyedDecoder and KeyedEncoder
https://bugs.webkit.org/show_bug.cgi?id=130431
Reviewed by Tim Horton.
* Shared/cf/KeyedDecoder.cpp:
(WebKit::KeyedDecoder::KeyedDecoder):
If we can't parse the property list data, just add an empty dictionary to the stack.
(WebKit::KeyedDecoder::decodeBool):
Remove unneeded m_dictionaryStack.last() null check. m_dictionaryStack would either be empty
or at least have a root element; it would never have a null element.
(WebKit::KeyedDecoder::decodeDouble):
Remove the same check as above and remove the CFNumberGetType checks since CFNumberGetValue will
do the type conversion for us and return false if it's lossy.
(WebKit::KeyedDecoder::decodeInt64):
Remove the m_dictionaryStack.last() check.
(WebKit::KeyedDecoder::decodeUInt32):
Ditto.
(WebKit::KeyedDecoder::decodeString):
Ditto.
(WebKit::KeyedDecoder::beginObject):
Ditto.
(WebKit::KeyedDecoder::beginArray):
Ditto.
(WebKit::KeyedDecoder::beginArrayElement):
Ditto.
* Shared/cf/KeyedDecoder.h:
Sort functions to be in the same logical order as the base class.
* Shared/cf/KeyedEncoder.cpp:
(WebKit::KeyedEncoder::finishEncoding):
Don't check for a non-null CFErrorRef here (which we incidentally never released on error). Instead,
just null check the returned CFDataRef object.
2014-03-18 Joseph Pecoraro <pecoraro@apple.com>
Unreviewed typo build fix for r165846.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::decode):
2014-03-18 Joseph Pecoraro <pecoraro@apple.com>
WebKit2 SPI to disable remote inspection on a WKWebView / WKPage
https://bugs.webkit.org/show_bug.cgi?id=130371
Reviewed by Dan Bernstein.
* Shared/WebPageCreationParameters.h:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
Add allowsRemoteInspection bool.
* UIProcess/API/C/WKPagePrivate.h:
* UIProcess/API/C/WKPage.cpp:
(WKPageGetAllowsRemoteInspection):
(WKPageSetAllowsRemoteInspection):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _allowsRemoteInspection]):
(-[WKWebView _setAllowsRemoteInspection:]):
Getter and setter for allowing remote inspection state.
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::allowsRemoteInspection):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::setAllowsRemoteInspection):
(WebKit::WebPageProxy::creationParameters):
Cached allows remote inspection state, with getter and setter.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setAllowsRemoteInspection):
When setting, call into WebCore to adjust the Page's setting.
2014-03-18 Anders Carlsson <andersca@apple.com>
REGRESSION: Visited link coloring seems to be completely broken in tip of tree
https://bugs.webkit.org/show_bug.cgi?id=130419
<rdar://problem/16337850>
Reviewed by Dan Bernstein.
Make sure to send any queued up messages before calling connectionWillOpen so we'll ensure
FIFO ordering if any messages are sent from within connectionWillOpen.
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
2014-03-18 Joseph Pecoraro <pecoraro@apple.com>
WebPageCreationParameters colorSpace should be MAC not COCOA
https://bugs.webkit.org/show_bug.cgi?id=130414
Reviewed by Dan Bernstein.
The colorSpace param was only set and used on Mac, not iOS.
* Shared/WebPageCreationParameters.h:
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
2014-03-18 Simon Fraser <simon.fraser@apple.com>
Dan says that options should be unsigned, and enums should be signed.
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
(NS_ENUM):
2014-03-17 Alexey Proskuryakov <ap@apple.com>
[WK2] Pass ranges over IPC in a cross-platform manner
https://bugs.webkit.org/show_bug.cgi?id=130376
Reviewed by Anders Carlsson.
Added an EditingRange class for IPC, which automatically converts to and from
NSRanges, knowing the difference between notFound and NSNotFound.
Manually applied the same fix to characterIndexForPoint.
* Scripts/webkit2/messages.py:
(struct_or_class):
* Shared/EditingRange.h: Added.
(WebKit::EditingRange::EditingRange):
(WebKit::EditingRange::isValid):
(WebKit::EditingRange::operator NSRange):
* UIProcess/API/mac/WKView.mm:
(-[WKView insertText:replacementRange:]):
(-[WKView selectedRange]):
(-[WKView hasMarkedText]):
(-[WKView setMarkedText:selectedRange:replacementRange:]):
(-[WKView markedRange]):
(-[WKView attributedSubstringForProposedRange:actualRange:]):
(-[WKView characterIndexForPoint:]):
(-[WKView firstRectForCharacterRange:actualRange:]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setMarkedText:selectedRange:]):
(-[WKContentView insertText:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::insertText):
(WebKit::WebPageProxy::insertDictatedText):
(WebKit::WebPageProxy::getMarkedRange):
(WebKit::WebPageProxy::getSelectedRange):
(WebKit::WebPageProxy::getAttributedSubstringFromRange):
(WebKit::WebPageProxy::firstRectForCharacterRange):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::insertText):
(WebKit::WebPageProxy::insertDictatedText):
(WebKit::WebPageProxy::getMarkedRange):
(WebKit::WebPageProxy::getSelectedRange):
(WebKit::WebPageProxy::getAttributedSubstringFromRange):
(WebKit::WebPageProxy::firstRectForCharacterRange):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::rangeFromEditingRange):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::insertText):
(WebKit::WebPage::insertDictatedText):
(WebKit::WebPage::getMarkedRange):
(WebKit::WebPage::getSelectedRange):
(WebKit::WebPage::getAttributedSubstringFromRange):
(WebKit::WebPage::firstRectForCharacterRange):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::insertText):
(WebKit::WebPage::insertDictatedText):
(WebKit::WebPage::getMarkedRange):
(WebKit::WebPage::getSelectedRange):
(WebKit::WebPage::getAttributedSubstringFromRange):
(WebKit::WebPage::characterIndexForPoint):
(WebKit::WebPage::firstRectForCharacterRange):
2014-03-17 Filip Pizlo <fpizlo@apple.com>
More FTL enabling.
Rubber stamped by Dan Bernstein.
* Configurations/FeatureDefines.xcconfig:
2014-03-17 Simon Fraser <simon.fraser@apple.com>
Renable pagination mode in WK2 MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=130374
Reviewed by Anders Carlsson.
Add SPI for pagination mode.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _paginationMode]):
(-[WKWebView _setPaginationMode:]):
(-[WKWebView _paginationBehavesLikeColumns]):
(-[WKWebView _setPaginationBehavesLikeColumns:]):
(-[WKWebView _pageLength]):
(-[WKWebView _setPageLength:]):
(-[WKWebView _gapBetweenPages]):
(-[WKWebView _setGapBetweenPages:]):
(-[WKWebView _pageCount]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
(NS_ENUM):
2014-03-18 Ryuan Choi <ryuan.choi@samsung.com>
[CMAKE][WK2]Move CoordinatedGraphics related files out of WebKit2/CMakeLists.txt
https://bugs.webkit.org/show_bug.cgi?id=130390
Reviewed by Martin Robinson.
Now, only EFL port use CoordinatedGraphics among CMake based ports.
* CMakeLists.txt:
* PlatformEfl.cmake:
* PlatformGTK.cmake: Removed CoordinatedGraphics related files.
2014-03-18 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Race condition when the socket event source is cancelled
https://bugs.webkit.org/show_bug.cgi?id=130395
Reviewed by Martin Robinson.
In some cases when the socket event source is cancelled the socket
event source callback is called with the condition of the previous
poll instead of 0. This can happen sometimes when the source is
cancelled from the socket event source callback. Once the socket
event source is cancelled, it's dispatched by glib without
polling, so the condition is never reset again and the callback is
called again and again with the previous condition. When the
condition is G_IO_IN, the source is re-scheduled entering into an
infinite loop. We should always check if the source has been
cancelled at the beginning of the callback to destroy the source
instead of relying on the condition being 0.
* Platform/gtk/WorkQueueGtk.cpp:
(WorkQueue::SocketEventSource::isCancelled):
(WorkQueue::SocketEventSource::eventCallback):
2014-03-18 Csaba Osztrogonác <ossy@webkit.org>
[GTK] URTFB after r165789. Stub function added.
* WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
(WebKit::InjectedBundle::setBundleParameter):
2014-03-17 Jaehun Lim <ljaehun.lim@samsung.com>
Unreviewed, EFL build fix after r165789
* WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
(WebKit::InjectedBundle::setBundleParameter): Implemented.
2014-03-17 Jae Hyun Park <jaepark@webkit.org>
[GTK] Build fix for debug build
Unreviewed.
finalizedListItem was actually used in ASSERT. So, use ASSERT_UNUSED
instead of ASSERT.
* UIProcess/API/gtk/WebKitBackForwardListItem.cpp:
(webkitBackForwardListItemFinalized):
2014-03-17 Thiago de Barros Lacerda <thiago.lacerda@openbossa.org>
[WK2] Getting rid of compilation warnings
https://bugs.webkit.org/show_bug.cgi?id=130348
Reviewed by Benjamin Poulain.
* UIProcess/API/APIHistoryClient.h:
(API::HistoryClient::didPerformClientRedirect):
(API::HistoryClient::didPerformServerRedirect):
(API::HistoryClient::didUpdateHistoryTitle):
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::didStartProvisionalLoadForFrame):
(API::LoaderClient::didReceiveServerRedirectForProvisionalLoadForFrame):
(API::LoaderClient::didFailProvisionalLoadWithErrorForFrame):
(API::LoaderClient::didCommitLoadForFrame):
(API::LoaderClient::didFinishLoadForFrame):
(API::LoaderClient::didFailLoadWithErrorForFrame):
(API::LoaderClient::didChangeBackForwardList):
* UIProcess/API/APIPolicyClient.h:
(API::PolicyClient::decidePolicyForNavigationAction):
(API::PolicyClient::decidePolicyForNewWindowAction):
(API::PolicyClient::decidePolicyForResponse):
(API::PolicyClient::unableToImplementPolicy):
* UIProcess/API/APIUIClient.h:
(API::UIClient::exceededDatabaseQuota):
(API::UIClient::saveDataToFileInDownloadsFolder):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/APISession.cpp:
(API::generateID):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::viewStateDidChange):
2014-03-17 Anders Carlsson <andersca@apple.com>
Update the bundle parameters dictionary and send out KVO notifications
https://bugs.webkit.org/show_bug.cgi?id=130379
<rdar://problem/16213914>
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _setObject:forBundleParameter:]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
(-[WKWebProcessBundleParameters setParameter:forKey:]):
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::setBundleParameter):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::setInjectedBundleParameter):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2014-03-17 Tim Horton <timothy_horton@apple.com>
Address some style nits.
* UIProcess/API/Cocoa/_WKThumbnailViewInternal.h:
2014-03-17 Simon Fraser <simon.fraser@apple.com>
Address some style nits.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-03-17 Simon Fraser <simon.fraser@apple.com>
Add transparent window support back into MiniBrowser
https://bugs.webkit.org/show_bug.cgi?id=130363
Reviewed by Anders Carlsson.
Expose SPI for transparent window support.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _drawsTransparentBackground]):
(-[WKWebView _setDrawsTransparentBackground:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-03-17 Alexey Proskuryakov <ap@apple.com>
Undo some accidental Gtk changes from http://trac.webkit.org/changeset/165759
* UIProcess/WebPageProxy.cpp:
* WebProcess/WebPage/WebPage.messages.in:
2014-03-17 Csaba Osztrogonác <ossy@webkit.org>
[WK2] URTBF after r165755 for non Apple platforms, stub functions added.
* WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp:
(WebKit::InjectedBundle::platformInitialize):
* WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp:
(WebKit::InjectedBundle::platformInitialize):
2014-03-17 Alexey Proskuryakov <ap@apple.com>
Move convertToRange() helper to cross-platform WebPage.cpp
https://bugs.webkit.org/show_bug.cgi?id=130365
Reviewed by Tim Horton.
Also renamed it to rangeFromEditingLocationAndLength().
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::rangeFromEditingLocationAndLength):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::insertText):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::insertText):
(WebKit::WebPage::insertDictatedText):
(WebKit::WebPage::getAttributedSubstringFromRange):
(WebKit::WebPage::characterIndexForPoint):
(WebKit::WebPage::firstRectForCharacterRange):
2014-03-17 Anders Carlsson <andersca@apple.com>
Follow-up fix.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
2014-03-17 Enrica Casucci <enrica@apple.com>
WK2: support data detectors driven action sheet..
https://bugs.webkit.org/show_bug.cgi?id=130362
<rdar://problem/16319711>
Reviewed by Benjamin Poulain.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant showDataDetectorsSheet]):
2014-03-17 Anders Carlsson <andersca@apple.com>
Fix 32-bit OS X build.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm:
* WebProcess/InjectedBundle/InjectedBundle.h:
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::platformInitialize):
2014-03-17 Jae Hyun Park <jaepark@webkit.org>
[GTK][CMake] Fix WebKit2 unused parameter warnings
https://bugs.webkit.org/show_bug.cgi?id=130316
Reviewed by Martin Robinson.
* Platform/gtk/WorkQueueGtk.cpp: Fix unused parameter warnings.
* UIProcess/API/gtk/PageClientImpl.cpp: Ditto.
* UIProcess/API/gtk/WebKitBackForwardListItem.cpp: Ditto.
* UIProcess/API/gtk/WebKitContextMenuClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitContextMenuItem.cpp: Ditto.
* UIProcess/API/gtk/WebKitDownloadClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitFaviconDatabase.cpp: Ditto.
* UIProcess/API/gtk/WebKitFindController.cpp: Ditto.
* UIProcess/API/gtk/WebKitFormClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitGeolocationProvider.cpp: Ditto.
* UIProcess/API/gtk/WebKitLoaderClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitPlugin.cpp: Ditto.
* UIProcess/API/gtk/WebKitPolicyClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitTextChecker.cpp: Ditto.
* UIProcess/API/gtk/WebKitUIClient.cpp: Ditto.
* UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebContext.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebInspector.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebView.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto.
* UIProcess/API/gtk/WebKitWebViewBaseAccessible.cpp: Ditto.
* UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Ditto.
* UIProcess/gtk/TextCheckerGtk.cpp: Ditto.
* UIProcess/gtk/WebContextMenuProxyGtk.cpp: Ditto.
* UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Ditto.
* WebProcess/InjectedBundle/API/gtk/WebKitFrame.cpp: Ditto.
* WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: Ditto.
* WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Ditto.
* WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: Ditto.
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Ditto.
2014-03-17 Alexey Proskuryakov <ap@apple.com>
[Mac] Standardize on start/length in text input IPC methods
https://bugs.webkit.org/show_bug.cgi?id=130359
Reviewed by Anders Carlsson.
Some IPC methods used start/length, and others use start/end. This was confusing.
While here, changed WebPageMac.mm to not use NSMakeRange where we don't need it
(I want to move this code to WebPage.cpp, where it could be shared with iOS and
other platforms, as it doesn't depend on Foundation much).
* UIProcess/API/mac/WKView.mm:
(-[WKView insertText:replacementRange:]):
(-[WKView setMarkedText:selectedRange:replacementRange:]):
(-[WKView attributedSubstringForProposedRange:actualRange:]):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::insertText):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setComposition):
(WebKit::WebPageProxy::insertText):
(WebKit::WebPageProxy::insertDictatedText):
(WebKit::WebPageProxy::getAttributedSubstringFromRange):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setComposition):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::insertText):
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::setComposition):
(WebKit::WebPage::insertText):
(WebKit::WebPage::insertDictatedText):
(WebKit::WebPage::getAttributedSubstringFromRange):
(WebKit::convertToRange):
(WebKit::WebPage::firstRectForCharacterRange):
2014-03-17 Tim Horton <timothy_horton@apple.com>
Rename WKThumbnailView to _WKThumbnailView
https://bugs.webkit.org/show_bug.cgi?id=130361
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/_WKThumbnailView.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.h.
* UIProcess/API/Cocoa/_WKThumbnailView.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailView.mm.
(-[_WKThumbnailView initWithFrame:fromWKView:]):
(-[_WKThumbnailView _viewWasUnparented]):
(-[_WKThumbnailView _viewWasParented]):
(-[_WKThumbnailView _requestSnapshotIfNeeded]):
(-[_WKThumbnailView _didTakeSnapshot:]):
(-[_WKThumbnailView viewDidMoveToWindow]):
(-[_WKThumbnailView setScale:]):
(-[_WKThumbnailView setUsesSnapshot:]):
(-[_WKThumbnailView _setThumbnailLayer:]):
(-[_WKThumbnailView _thumbnailLayer]):
* UIProcess/API/Cocoa/_WKThumbnailViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKThumbnailViewInternal.h.
* UIProcess/API/mac/WKView.mm:
(-[WKView _setThumbnailView:]):
(-[WKView _thumbnailView]):
(-[WKView _updateThumbnailViewLayer]):
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/mac/PageClientImpl.mm:
* WebKit2.xcodeproj/project.pbxproj:
2014-03-17 Anders Carlsson <andersca@apple.com>
Add SPI for getting bundle parameters from the injected bundle
https://bugs.webkit.org/show_bug.cgi?id=130355
Reviewed by Dan Bernstein.
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::platformInitializeWebProcess):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.h: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessBundleParameters.mm: Copied from Source/WebKit2/WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h.
(-[WKWebProcessBundleParameters initWithDictionary:]):
(-[WKWebProcessBundleParameters valueForKey:]):
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h:
* WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm:
(-[WKWebProcessPlugInController parameters]):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::InjectedBundle):
* WebProcess/InjectedBundle/InjectedBundle.h:
(WebKit::InjectedBundle::create):
* WebProcess/InjectedBundle/mac/InjectedBundleMac.mm:
(WebKit::InjectedBundle::bundleParameters):
(WebKit::InjectedBundle::platformInitialize):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::initializeWebProcess):
2014-03-17 Brent Fulgham <bfulgham@apple.com>
Provide preference to enable additional AVFoundation options
https://bugs.webkit.org/show_bug.cgi?id=130275
Reviewed by Eric Carlson.
* Shared/WebPreferencesStore.h: Added new preference.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetEnableInheritURIQueryComponent): Added.
(WKPreferencesGetEnableInheritURIQueryComponent): Added.
* UIProcess/API/C/WKPreferencesPrivate.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences): Handle new preference.
2014-03-17 Alexey Proskuryakov <ap@apple.com>
[Mac] getAttributedSubstringFromRange arguments are incorrectly named
https://bugs.webkit.org/show_bug.cgi?id=130349
Reviewed by Tim Horton.
There is a mess of start/end and start/length pairs in IPC. One day we'll fix them
all, but now, let's at least name them correctly.
No behavior change.
* UIProcess/WebPageProxy.h:
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::getAttributedSubstringFromRange):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::getAttributedSubstringFromRange):
2014-03-17 Tim Horton <timothy_horton@apple.com>
WKThumbnailView should support snapshots
https://bugs.webkit.org/show_bug.cgi?id=130335
<rdar://problem/16255139>
Reviewed by Simon Fraser.
Add a mode where WKThumbnailView takes a software snapshot of the web content,
replacing the live layer tree with said snapshot once it returns from the
web process. This may improve animation performance in cases where the
layer tree would otherwise be very complex.
* UIProcess/API/Cocoa/WKThumbnailView.h:
Add a property, usesSnapshot, which determines whether the thumbnail view
should use the live layer tree or a snapshot of the content.
* UIProcess/API/Cocoa/WKThumbnailView.mm:
(-[WKThumbnailView initWithFrame:fromWKView:]):
(-[WKThumbnailView _viewWasUnparented]):
Clear the snapshot when unparented.
(-[WKThumbnailView _viewWasParented]):
Take a snapshot of the web content when parented, if needed.
(-[WKThumbnailView _requestSnapshotIfNeeded]):
If we're using snapshots, and haven't already dispatched an async snapshot request,
and don't already have a snapshot, request a snapshot from the web process.
When it returns, use it as the contents of the WKThumbnailView layer, and
unparent the live layer tree.
(-[WKThumbnailView setScale:]):
(-[WKThumbnailView setUsesSnapshot:]):
(-[WKThumbnailView _setThumbnailLayer:]):
(-[WKThumbnailView _thumbnailLayer]):
* UIProcess/API/Cocoa/WKThumbnailViewInternal.h:
* UIProcess/API/mac/WKView.mm:
(-[WKView _setAcceleratedCompositingModeRootLayer:]):
(-[WKView _acceleratedCompositingModeRootLayer]):
WKView should always keep track of the current root layer, instead of totally
handing control over to WKThumbnailView when it is used.
(-[WKView _setThumbnailView:]):
(-[WKView _updateThumbnailViewLayer]):
(-[WKView _reparentLayerTreeInThumbnailView]):
If needed (either we're not using snapshots, or still waiting for the snapshot to be painted),
push the WKView's live layer tree into the thumbnail view.
* UIProcess/API/mac/WKViewInternal.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::takeThumbnailSnapshot):
Add a message that asynchronously returns a snapshot that respects the
current thumbnail scale and position.
(WebKit::WebPage::scaledSnapshotWithOptions):
Use some nullptr.
* WebProcess/WebPage/DrawingArea.cpp:
(WebKit::DrawingArea::transform):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
Add a getter for the DrawingArea's transform.
Rename it to rootLayerTransform.
2014-03-17 Zan Dobersek <zdobersek@igalia.com>
Use RunLoop objects through references instead of pointers
https://bugs.webkit.org/show_bug.cgi?id=130313
Reviewed by Andreas Kling.
Adjust the code accordingly now that RunLoop::current() and RunLoop::main()
return RunLoop reference instead of a pointer.
* DatabaseProcess/DatabaseProcess.cpp:
(WebKit::DatabaseProcess::didClose):
(WebKit::DatabaseProcess::didReceiveInvalidMessage):
* DatabaseProcess/IndexedDB/UniqueIDBDatabase.cpp:
(WebKit::UniqueIDBDatabase::postMainThreadTask):
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::didClose):
(WebKit::NetworkProcess::didReceiveInvalidMessage):
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::continueWillSendRequest):
* Platform/IPC/Connection.cpp:
(IPC::Connection::SyncMessageState::getOrCreate):
(IPC::Connection::SyncMessageState::SyncMessageState):
(IPC::Connection::SyncMessageState::~SyncMessageState):
(IPC::Connection::SyncMessageState::processIncomingMessage):
(IPC::Connection::SyncMessageState::dispatchMessages):
(IPC::Connection::createServerConnection):
(IPC::Connection::createClientConnection):
(IPC::Connection::Connection):
(IPC::Connection::addWorkQueueMessageReceiver):
(IPC::Connection::removeWorkQueueMessageReceiver):
(IPC::Connection::sendSyncMessage):
(IPC::Connection::sendSyncMessageFromSecondaryThread):
(IPC::Connection::waitForSyncReply):
(IPC::Connection::processIncomingMessage):
(IPC::Connection::connectionDidClose):
(IPC::Connection::dispatchDidReceiveInvalidMessage):
(IPC::Connection::enqueueIncomingMessage):
(IPC::Connection::wakeUpRunLoop):
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::receiveSourceEventHandler):
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::stopRunLoop):
* Shared/Plugins/NPObjectProxy.cpp:
(WebKit::NPObjectProxy::NP_Deallocate):
* UIProcess/Launcher/efl/ProcessLauncherEfl.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp:
(WebKit::ProcessLauncher::launchProcess):
* UIProcess/Launcher/mac/ProcessLauncherMac.mm:
(WebKit::connectToService):
(WebKit::tryPreexistingProcess):
(WebKit::createProcess):
* UIProcess/Storage/StorageManager.cpp:
(WebKit::StorageManager::getOrigins):
(WebKit::StorageManager::getStorageDetailsByOrigin):
* UIProcess/Storage/StorageManager.h:
* WebProcess/Plugins/Netscape/NetscapePlugin.cpp:
(WebKit::NetscapePlugin::pluginThreadAsyncCall):
* WebProcess/Plugins/PluginView.cpp:
(WebKit::PluginView::unprotectPluginFromDestruction):
* WebProcess/WebPage/EventDispatcher.cpp:
(WebKit::EventDispatcher::wheelEvent):
* WebProcess/WebPage/ViewUpdateDispatcher.cpp:
(WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close):
2014-03-17 Giovanni Campagna <gcampagna@src.gnome.org>
[GTK] Don't busy loop when the socket is full
https://bugs.webkit.org/show_bug.cgi?id=129802
Reviewed by Carlos Garcia Campos.
When the socket is full and we see EAGAIN or EWOULDBLOCK
(because the socket is non blocking), don't busy loop by
tring to write again, instead poll() until the socket
becomes writable.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::sendOutgoingMessage):
2014-03-17 Martin Robinson <mrobinson@igalia.com>
[GTK][CMake] Ensure that HAVE_GTK_UNIX_PRINTING is defined when appropriate
https://bugs.webkit.org/show_bug.cgi?id=130155
Reviewed by Philippe Normand.
* PlatformGTK.cmake: Add GTK_UNIX_PRINT flags to the build.
2014-03-17 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Restore cursor when moving mouse into webview
https://bugs.webkit.org/show_bug.cgi?id=130182
Reviewed by Gyuyoung Kim.
We changed mouse cursor when the type of cursor is changed.
But once mouse is moved out of webview, ewebkit will not know whether cursor
is changed or not.
So, this patch added a logic to restore the last applied type of cursor when
mouse is moved into webview again.
* UIProcess/API/efl/EwkView.cpp:
(EwkViewEventHandler<EVAS_CALLBACK_MOUSE_IN>::handleEvent):
Call updateCursor to restore the last applied type of cursor.
(EwkView::EwkView):
(EwkView::updateCursor): Extracted from setCursor.
(EwkView::setCursor):
(EwkView::handleEvasObjectAdd):
* UIProcess/API/efl/EwkView.h:
2014-03-16 Ryuan Choi <ryuan.choi@samsung.com>
[EFL][WK2] Add ewk_application_cache_manager APIs
https://bugs.webkit.org/show_bug.cgi?id=102853
Reviewed by Gyuyoung Kim.
Implemented application cache manager to get list of origins which stores
application cache and remove specified origin or all.
* PlatformEfl.cmake: Added newly added files.
* UIProcess/API/efl/ewk_application_cache_manager.cpp: Added.
(EwkApplicationCacheManager::EwkApplicationCacheManager):
(EwkApplicationCacheManager::~EwkApplicationCacheManager):
(Get_Origins_Data::Get_Origins_Data):
(getApplicationCacheOriginsCallback):
(ewk_application_cache_manager_origins_get):
(ewk_application_cache_origins_free):
(ewk_application_cache_manager_delete_all):
(ewk_application_cache_manager_delete):
* UIProcess/API/efl/ewk_application_cache_manager.h: Added.
* UIProcess/API/efl/ewk_application_cache_manager_private.h: Added.
(EwkApplicationCacheManager::impl):
* UIProcess/API/efl/ewk_context.cpp:
(EwkContext::applicationCacheManager):
(ewk_context_application_cache_manager_get):
* UIProcess/API/efl/ewk_context.h:
* UIProcess/API/efl/ewk_context_private.h:
* UIProcess/API/efl/ewk_security_origin_private.h:
(EwkSecurityOrigin::wkSecurityOrigin):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.cpp:
(EWK2UnitTestServer::port):
* UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestServer.h:
* UIProcess/API/efl/tests/test_ewk2_application_cache_manager.cpp:
Added to test application_cache_manager.
(serverCallback):
(getOriginsCallback):
(timerCallback):
(TEST_F):
* UIProcess/API/efl/tests/test_ewk2_context.cpp:
Added test case to test getter of application_cache_manager.
(TEST_F):
2014-03-16 Zan Dobersek <zdobersek@igalia.com>
Move GTK WebKit2 code to std::unique_ptr
https://bugs.webkit.org/show_bug.cgi?id=129672
Reviewed by Anders Carlsson.
Repace uses of OwnPtr and PassOwnPtr in GTK-specific WebKit2 code with std::unique_ptr.
* Shared/Downloads/Download.h:
* Shared/Downloads/soup/DownloadSoup.cpp:
(WebKit::Download::start):
(WebKit::Download::startWithHandle):
(WebKit::Download::platformInvalidate):
* UIProcess/API/gtk/PageClientImpl.cpp:
* UIProcess/API/gtk/PageClientImpl.h:
* UIProcess/API/gtk/WebKitContextMenuItem.cpp:
(webkitContextMenuItemCreate):
(webkitContextMenuItemCreateForGtkItem):
(webkit_context_menu_item_new):
(webkit_context_menu_item_new_from_stock_action):
(webkit_context_menu_item_new_from_stock_action_with_label):
(webkit_context_menu_item_new_with_submenu):
(webkit_context_menu_item_new_separator):
* UIProcess/API/gtk/WebKitTextChecker.h:
* UIProcess/API/gtk/WebKitWebContext.cpp:
(createDefaultWebContext):
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseConstructed):
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
(WebKit::WebPrintOperationGtk::print):
* WebProcess/gtk/WebGtkExtensionManager.cpp:
(WebKit::WebGtkExtensionManager::initialize):
* WebProcess/soup/WebKitSoupRequestInputStream.cpp:
(webkitSoupRequestInputStreamPendingReadAsyncComplete):
(webkitSoupRequestInputStreamReadAsync):
* WebProcess/soup/WebSoupRequestManager.cpp:
(WebKit::WebSoupRequestManager::send):
* WebProcess/soup/WebSoupRequestManager.h:
2014-03-16 Brian Burg <bburg@apple.com>
Web Inspector: vended backend commands file should be generated as part of the build
https://bugs.webkit.org/show_bug.cgi?id=130110
Reviewed by Timothy Hatcher.
* PlatformGTK.cmake: Copy over generated inspector backend commands files.
2014-03-16 Darin Adler <darin@apple.com>
Try to fix 32-bit Mac build.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: Add missing include.
2014-03-16 Philippe Normand <pnormand@igalia.com>
Unreviewed, GTK build fix after r165692.
* UIProcess/gtk/TextCheckerGtk.cpp:
(WebKit::TextChecker::checkSpellingOfString):
(WebKit::TextChecker::checkGrammarOfString):
2014-03-15 Darin Adler <darin@apple.com>
Remove all uses of deprecatedCharacters from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=130197
Reviewed by Andreas Kling.
* Shared/APIString.h: Rewrote getCharacters to use StringView,
substring, and getCharactersWithUpconvert. Added an 8-bit case
to getUTF8CString.
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::writeByte): Added.
(WebKit::writeCharacter): Added.
(WebKit::writeLine): Added. Uses operator[] instead of characters16 to get
the UTF-16 characters out of the string.
(WebKit::NetscapePluginModule::scanPlugin): Replaced code that writes out
text to stdout with much simpler version using the functions above.
* UIProcess/TextChecker.h: Changed text arguments to use StringView instead
of UChar/int pairs.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu): Updated to pass StringView.
* UIProcess/efl/TextCheckerEfl.cpp:
(WebKit::nextWordOffset): Changed function to use StringView and unsigned.
(WebKit::TextChecker::checkTextOfParagraph): Changed to use StringView and
substring.
(WebKit::TextChecker::checkSpellingOfString): Ditto.
(WebKit::TextChecker::checkGrammarOfString): Ditto.
(WebKit::TextChecker::requestCheckingOfString): Pass in a StringView, so no
need to call deprecatedCharacters.
* UIProcess/ios/TextCheckerIOS.mm:
(WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView.
(WebKit::TextChecker::checkSpellingOfString): Ditto.
(WebKit::TextChecker::checkGrammarOfString): Ditto.
* UIProcess/mac/TextCheckerMac.mm:
(WebKit::TextChecker::checkTextOfParagraph): Changed to take StringView and
use StringView::createNSStringWithoutCopying.
(WebKit::TextChecker::checkSpellingOfString): CHanged to take StringView.
(WebKit::TextChecker::checkGrammarOfString): Ditto.
* WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm:
(WebKit::convertStringToKeyCodes): Changed to take StringView and use
upconvertedCharacters instead of deprecatedCharacters. Also use move instead
of swap.
(WebKit::NetscapePlugin::sendComplexTextInput): Updated to new style for loop.
* WebProcess/WebPage/EncoderAdapter.cpp:
(WebKit::EncoderAdapter::encodeString): Use StringView::upconvertedCharacters
instead of String::deprecatedCharacters.
2014-03-15 David Kilzer <ddkilzer@apple.com>
[iOS] Define SYSTEM_VERSION_PREFIX consistently
<http://webkit.org/b/130293>
<rdar://problem/15926359>
Reviewed by Dan Bernstein.
* Configurations/Version.xcconfig:
(SYSTEM_VERSION_PREFIX): Sync with
Source/WebKit/mac/Version.xcconfig.
2014-03-14 Alexey Proskuryakov <ap@apple.com>
[Mac] Sync extended attribute related rules with AppSandbox profile
https://bugs.webkit.org/show_bug.cgi?id=130263
<rdar://problem/16318965>
Reviewed by Sam Weinig.
Update the fix to use a different syntax in some OS versions.
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
* WebProcess/com.apple.WebProcess.sb.in:
2014-03-14 Ryosuke Niwa <rniwa@webkit.org>
Revert erroneous changes made to UIProcess/API/Cocoa in r165676.
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKBackForwardListItem.h.
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationAction.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationAction.h.
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
(NS_ENUM):
* UIProcess/API/Cocoa/WKNavigationResponse.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKNavigationResponse.h.
* UIProcess/API/Cocoa/WKNavigationTrigger.h: Removed.
* UIProcess/API/Cocoa/WKWebView.h:
2014-03-14 Mark Rowe <mrowe@apple.com>
Fix the production build.
Don't rely on USE_INTERNAL_SDK being set for the Production configuration since UseInternalSDK.xcconfig won't
be at the expected relative path when working from installed source.
* Configurations/Base.xcconfig:
2014-03-14 Maciej Stachowiak <mjs@apple.com>
Replace "Apple Computer, Inc." with "Apple Inc." in copyright headers
https://bugs.webkit.org/show_bug.cgi?id=130276
<rdar://problem/16266927>
Reviewed by Simon Fraser.
* Shared/AsyncRequest.cpp:
* Shared/AsyncRequest.h:
* Shared/ContextMenuContextData.cpp:
* Shared/ContextMenuContextData.h:
* Shared/Databases/DatabaseProcessCreationParameters.h:
* Shared/Databases/IndexedDB/IDBUtilities.cpp:
* Shared/Databases/IndexedDB/IDBUtilities.h:
* Shared/mac/RemoteLayerBackingStore.h:
* Shared/mac/RemoteLayerBackingStore.mm:
* UIProcess/API/Cocoa/WKBackForwardList.h:
* UIProcess/API/Cocoa/WKBackForwardListItem.h: Removed.
* UIProcess/API/Cocoa/WKNavigation.h:
* UIProcess/API/Cocoa/WKNavigationAction.h: Removed.
* UIProcess/API/Cocoa/WKNavigationDelegate.h:
* UIProcess/API/Cocoa/WKNavigationResponse.h: Removed.
* UIProcess/API/Cocoa/WKNavigationTrigger.h: Added.
(NS_ENUM):
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp:
* UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h:
* UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h:
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.cpp:
* WebProcess/Databases/IndexedDB/WebIDBFactoryBackend.h:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.cpp:
* WebProcess/Databases/IndexedDB/WebIDBServerConnection.h:
* WebProcess/Databases/WebToDatabaseProcessConnection.cpp:
* WebProcess/Databases/WebToDatabaseProcessConnection.h:
* WebProcess/WebCoreSupport/WebAlternativeTextClient.h:
* WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
* WebProcess/WebPage/mac/GraphicsLayerCARemote.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:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.cpp:
* WebProcess/WebPage/mac/PlatformCALayerRemoteTiledBacking.h:
2014-03-14 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] background-attachment: fixed renders oddly, moves around
https://bugs.webkit.org/show_bug.cgi?id=130277
<rdar://problem/16332883>
Reviewed by Tim Horton.
Actually send scrolling and counter-scrolling layers to the UI process!
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
2014-03-14 Anders Carlsson <andersca@apple.com>
Try to fix the iOS build.
* UIProcess/mac/WebContextMac.mm:
2014-03-14 Anders Carlsson <andersca@apple.com>
Begin work on the bundle parameter API
https://bugs.webkit.org/show_bug.cgi?id=130267
Reviewed by Dan Bernstein.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool _objectForBundleParameter:]):
(-[WKProcessPool _setObject:forBundleParameter:]):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h:
* UIProcess/WebContext.h:
(WebKit::WebContext::bundleParameters):
* UIProcess/mac/WebContextMac.mm:
(WebKit::WebContext::ensureBundleParameters):
(WebKit::WebContext::platformInitializeWebProcess):
2014-03-14 Alexey Proskuryakov <ap@apple.com>
[Mac] Sync extended attribute related rules with AppSandbox profile
https://bugs.webkit.org/show_bug.cgi?id=130263
<rdar://problem/16318965>
Reviewed by Sam Weinig.
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* Resources/PlugInSandboxProfiles/com.apple.QuickTime Plugin.plugin.sb:
* Resources/PlugInSandboxProfiles/com.apple.WebKit.plugin-common.sb:
* Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
* Resources/PlugInSandboxProfiles/com.macromedia.Flash Player.plugin.sb:
* Resources/PlugInSandboxProfiles/com.microsoft.SilverlightPlugin.sb:
* Resources/PlugInSandboxProfiles/com.oracle.java.JavaAppletPlugin.sb:
* WebProcess/com.apple.WebProcess.sb.in:
2014-03-14 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Improve behavior of fixed elments on zooming
https://bugs.webkit.org/show_bug.cgi?id=130253
Reviewed by Beth Dakin.
Correctly reposition right- and bottom-relative position:fixed
elements on zooming in WK2 iOS by telling the scrolling tree
about zoom-related viewport changes.
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::notePropertiesChanged):
Drive-by cleanup; typedef the flags field to an unsigned, to avoid ugly casting.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::updateScrollingTree): Pass out a flag to say
if the update contained a new fixed or sticky layer.
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
(WebKit::RemoteScrollingCoordinatorProxy::viewportChangedViaDelegatedScrolling):
Call into the new ScrolingTree::viewportChangedViaDelegatedScrolling().
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: If we got a new fixed
or sticky layer, set fixedOrStickyLayerChanged to true.
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers): Ditto.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
Remember both the old zoomScale and the filteredScale, since the fixed position rect
should be computed using the unfiltered scale.
Some FloatRect -> CGRect changes.
Now call viewportChangedViaDelegatedScrolling() on the scrolling coordinator.
(-[WKContentView fixedPositionRectFromExposedRect:scale:]): Call the
FrameView function to compute the iOS fixed position rect.
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree): If the update
got a new fixed or sticky layer, run the scrolling tree logic to make sure
it gets into the right place.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree): If we logged here,
we'd log twice if the tiled scrolling indicator was enabled, so
hoisted the logging out into the caller.
2014-03-14 Landry Breuil <landry@openbsd.org>
Use the correct type in webkitSoupRequestInputStreamNew()'s declaration.
Nhttps://bugs.webkit.org/show_bug.cgi?id=129974
Reviewed by Andreas Kling.
* WebProcess/soup/WebKitSoupRequestInputStream.h:
2014-03-14 Anders Carlsson <andersca@apple.com>
Fix crash when resizing the visited link table
https://bugs.webkit.org/show_bug.cgi?id=130257
<rdar://problem/16328177>
Reviewed by Dan Bernstein.
We're iterating over the old table, so use currentTableSize in the loop termination condition.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::resizeTable):
2014-03-14 Dan Bernstein <mitz@apple.com>
[Cocoa] Expose a way to set the cookie accept policy
https://bugs.webkit.org/show_bug.cgi?id=130251
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(toHTTPCookieAcceptPolicy): Added a helper function that maps from NSHTTPCookieAcceptPolicy
values to WebKit::HTTPCookieAcceptPolicy values.
(-[WKProcessPool _setCookieAcceptPolicy:]): Added. Calls
WebCookieManagerProxy::setHTTPCookieAcceptPolicy.
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Declared new method.
2014-03-14 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebKit2WebExtension GIR can't be used in vala
https://bugs.webkit.org/show_bug.cgi?id=127179
Reviewed by Martin Robinson.
Do not include all WebKit2 gir symbols from WebKit2WebExtension gir
file.
* GNUmakefile.am:
* PlatformGTK.cmake:
2014-03-14 Csaba Osztrogonác <ossy@webkit.org>
[CMake] URTBF after r165619.
* CMakeLists.txt: Add new files.
2014-03-14 Anders Carlsson <andersca@apple.com>
Remove WebContext::addVisitedLink
https://bugs.webkit.org/show_bug.cgi?id=130242
Reviewed by Dan Bernstein.
Fold the function into WKContextAddVisitedLink instead.
* UIProcess/API/C/WKContext.cpp:
(WKContextAddVisitedLink):
* UIProcess/WebContext.cpp:
* UIProcess/WebContext.h:
(WebKit::WebContext::visitedLinkProvider):
2014-03-13 Anders Carlsson <andersca@apple.com>
Move visited link handling to VisitedLinkTableController and VisitedLinkProvider
https://bugs.webkit.org/show_bug.cgi?id=130223
<rdar://problem/16315792>
Reviewed by Dan Bernstein.
* DerivedSources.make:
Generate messages for VisitedLinkProvider and VisitedLinkTableController.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
Set the visited link provider.
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.h:
Add addVisitedLinkWithURL: method.
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm:
(-[_WKVisitedLinkProvider addVisitedLinkWithURL:]):
Compute a link hash from the absolute URL string and pass it to the underlying VisitedLinkProvider object.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::addProcess):
Add the process to the m_processes HashCountedSet. If it's the first time we're adding the process,
add the VisitedLinkProvider object as a message receiver and send the visited link table to the process.
(WebKit::VisitedLinkProvider::removeProcess):
Remove the process from the m_processes HashCountedSet. If we're removing the last reference to the process,
remove ourselves as a message receiver.
(WebKit::VisitedLinkProvider::addVisitedLinkHash):
Rename this from addVisitedLink to better indicate what it's doing.
(WebKit::tableSizeForKeyCount):
Update for constant rename.
(WebKit::VisitedLinkProvider::pendingVisitedLinksTimerFired):
Compute the new pending visited links table size. If it's bigger than our current table, resize the table
by calling resizeTable. Otherwise, simply try to add the pending hashes to our shared hash table. If successful,
add the link hash to the addedVisitedLinks table and eventually send it to all processes associated with the visited link provider.
(WebKit::VisitedLinkProvider::resizeTable):
Create a new shared memory segment, Set it as the table backing store and add all visited links from the old table. Finally,
add our pending visited link hashes and send the new table memory to all processes associated with the visited link provider.
(WebKit::VisitedLinkProvider::sendTable):
Helper function that creates a shared memory handle and sends it to a given web process.
* UIProcess/VisitedLinkProvider.h:
Add new members.
* UIProcess/VisitedLinkProvider.messages.in:
Add messages.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::processDidFinishLaunching):
(WebKit::WebContext::disconnectProcess):
The WebContext no longer needs to inform the visited link provider about the processes coming and going, that's already handled
by the WebPageProxy objects.
(WebKit::WebContext::addVisitedLink):
Call addVisitedLinkHash on the visited link provider.
* UIProcess/WebContext.h:
* UIProcess/WebContext.messages.in:
Remove a message that is now implemented by the visited link provider.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::VisitedLinkTableController::VisitedLinkTableController):
Add the table controller as a message receiver.
(WebKit::VisitedLinkTableController::~VisitedLinkTableController):
Remove the table controller as a message receiver.
(WebKit::VisitedLinkTableController::isLinkVisited):
Check if the link is visited according to the visited link table.
(WebKit::VisitedLinkTableController::addVisitedLink):
Send the link hash to the UI process if it's not already visited.
(WebKit::VisitedLinkTableController::setVisitedLinkTable):
Set the backing store memory and invalidate all styles.
(WebKit::VisitedLinkTableController::visitedLinkStateChanged):
Invalidate the styles for the given links.
(WebKit::VisitedLinkTableController::allVisitedLinkStateChanged):
Invalidate the styles for all links.
* WebProcess/WebPage/VisitedLinkTableController.h:
Add new members.
* WebProcess/WebPage/VisitedLinkTableController.messages.in:
Add new messages.
* WebProcess/WebProcess.cpp:
Remove unused functions; these are handled by VisitedLinkTableController now.
* WebProcess/WebProcess.h:
(WebKit::WebProcess::shouldTrackVisitedLinks):
Add getter.
* WebProcess/WebProcess.messages.in:
Remove messages.
2014-03-12 Sergio Villar Senin <svillar@igalia.com>
Rename DEFINE_STATIC_LOCAL to DEPRECATED_DEFINE_STATIC_LOCAL
https://bugs.webkit.org/show_bug.cgi?id=129612
Reviewed by Darin Adler.
For new code use static NeverDestroyed<T> instead.
* DatabaseProcess/IndexedDB/sqlite/SQLiteIDBCursor.cpp:
(WebKit::getIndexStatement):
(WebKit::getObjectStoreStatement):
* Shared/linux/SeccompFilters/SeccompBroker.cpp:
(WebKit::SeccompBrokerClient::shared):
* UIProcess/InspectorServer/WebInspectorServer.cpp:
(WebKit::WebInspectorServer::didReceiveWebSocketUpgradeHTTPRequest):
2014-03-14 Dan Bernstein <mitz@apple.com>
<rdar://problem/16319722> [Cocoa] WKHistoryDelegate is being called for subframes
https://bugs.webkit.org/show_bug.cgi?id=130228
Reviewed by Mark Rowe.
* UIProcess/Cocoa/HistoryClient.mm:
(WebKit::HistoryClient::didNavigateWithNavigationData): Bail out if the frame is not the
main frame.
(WebKit::HistoryClient::didPerformClientRedirect): Ditto.
(WebKit::HistoryClient::didPerformServerRedirect): Ditto.
(WebKit::HistoryClient::didUpdateHistoryTitle): Ditto.
2014-03-13 Jinwoo Jeong <jw00.jeong@samsung.com>
Refactor Vibration algorithm to use only one timer.
https://bugs.webkit.org/show_bug.cgi?id=130059
Reviewed by Darin Adler.
This patch adds a vibration unit test regression after r161257.
It consists of two short term requests to check
that Vibration could work properly by sequential requests.
Indeed this patch tightens condition of existing tests.
* UIProcess/API/efl/tests/test_ewk2_view.cpp:
(TEST_F):
2014-03-13 Paul Hankes Drielsma <phd@apple.com>
Add SPI to set a custom user agent on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=130164
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _customUserAgent]):
(-[WKWebView _setCustomUserAgent:]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-03-13 Paul Hankes Drielsma <phd@apple.com>
Add SPI to run javascript in main frame on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=130047
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _runJavaScriptInMainFrame:]):
2014-03-13 Benjamin Poulain <bpoulain@apple.com>
The viewport code should not depend on WebKitSystemInterface
https://bugs.webkit.org/show_bug.cgi?id=130218
Reviewed by Tim Horton.
Get the viewport size from the UIProcess when creating a new WebProcess.
From there, the value is stored in WebPage and used whenever we need to update
the viewport parameters.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::viewportScreenSize):
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::viewportScreenSize):
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::viewportScreenSize):
2014-03-13 Beth Dakin <bdakin@apple.com>
Do not show extended background during a pinch gesture on iOS
https://bugs.webkit.org/show_bug.cgi?id=130152
-and corresponding-
<rdar://problem/16303819>
Reviewed by Simon Fraser.
This patch refactors the backgroundColor-setting logic into its own method so that
it can be called from both _didCommitLayerTree and scrollViewDidZoom.
Only set the UIScrollView’s background color when the zoomScale is greater than or
equal to the minimumZoomScale. Also do not set it during the zoom bounce
animation. Otherwise, clear the background color by setting it to nil.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView updateScrollViewBackground]):
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView scrollViewDidZoom:]):
2014-03-13 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] block selection should avoid large blocks.
https://bugs.webkit.org/show_bug.cgi?id=130208
<rdar://problem/16251785>
Reviewed by Benjamin Poulain.
When creating a block selection, we should discard blocks that
are larger than most of the visible portion of the document.
This prevents the accidental selection the entire document, which
is fairly common when tapping over empty areas.
* Shared/InteractionInformationAtPosition.cpp:
(WebKit::InteractionInformationAtPosition::encode):
(WebKit::InteractionInformationAtPosition::decode):
* Shared/InteractionInformationAtPosition.h: Removed selectionRects that was not really needed and
added isSelectable to indicate whether the selection can start.
(WebKit::InteractionInformationAtPosition::InteractionInformationAtPosition):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView hasSelectablePositionAtPoint:]): Now uses isSelectable.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation): Takes into account the userSelect property
to figure out if the element can be selected and discards blocks that are
larger than 97% of the visible area of the document.
2014-03-13 Anders Carlsson <andersca@apple.com>
Rename WKVisitedLinkProvider to _WKVisitedLinkProvider and make it private
https://bugs.webkit.org/show_bug.cgi?id=130207
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKVisitedLinkProviderPrivate.h: Removed.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _visitedLinkProvider]):
(-[WKWebViewConfiguration _setVisitedLinkProvider:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h:
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.h.
* UIProcess/API/Cocoa/_WKVisitedLinkProvider.mm: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProvider.mm.
(-[_WKVisitedLinkProvider init]):
* UIProcess/API/Cocoa/_WKVisitedLinkProviderInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h.
* WebKit2.xcodeproj/project.pbxproj:
2014-03-13 Anders Carlsson <andersca@apple.com>
Remove a commented out member function
https://bugs.webkit.org/show_bug.cgi?id=130204
Reviewed by Tim Horton.
* Shared/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::canSendMessage):
2014-03-13 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] Crash on iPad when displaying a select element with options.
https://bugs.webkit.org/show_bug.cgi?id=130200
<rdar://problem/16316187>
Reviewed by Simon Fraser.
_singleSelectionIndex should be initialized to NSNotFound for multiSelect elements.
* UIProcess/ios/forms/WKFormSelectPopover.mm:
(-[WKSelectTableViewController initWithView:hasGroups:]):
2014-03-13 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Close the connection when we fail to read from the socket for any unhandled error
https://bugs.webkit.org/show_bug.cgi?id=130191
Reviewed by Martin Robinson.
We currently show an error message, but we should close the
connection avoid entering an infinite loop. Also provide more
information in the error message to help when debugging the issue.
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::readyReadHandler):
2014-03-13 Radu Stavila <stavila@adobe.com>
Webkit not building on XCode 5.1 due to garbage collection no longer being supported
https://bugs.webkit.org/show_bug.cgi?id=130087
Reviewed by Mark Rowe.
Disable garbage collection on macosx when not using internal SDK.
* Configurations/Base.xcconfig:
2014-03-10 Darin Adler <darin@apple.com>
Avoid copy-prone idiom "for (auto item : collection)"
https://bugs.webkit.org/show_bug.cgi?id=129990
Reviewed by Geoffrey Garen.
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyProperties): Use auto&.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): Use auto&
even though the type is a scalar. This does no harm and makes it easier
to spot uses that trigger unnecessary copying with grep.
(WebKit::RemoteLayerTreeTransaction::decode): Ditto.
(WebKit::dumpChangedLayers): Ditto.
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree): Ditto.
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::visitedLinkStateChanged): Ditto.
2014-03-12 Brian Burg <bburg@apple.com>
Web Inspector: Remove unused callId parameter from evaluateInWebInspector
https://bugs.webkit.org/show_bug.cgi?id=129744
Reviewed by Timothy Hatcher.
* WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp:
(WKBundleInspectorEvaluateScriptForTest):
* WebProcess/InjectedBundle/API/c/WKBundleInspector.h:
* WebProcess/WebPage/WebInspector.cpp:
(WebKit::WebInspector::evaluateScriptForTest):
* WebProcess/WebPage/WebInspector.h:
2014-03-13 Laszlo Vidacs <lvidacs.u-szeged@partner.samsung.com>
Fix the !ENABLE(SQL_DATABASE) build
https://bugs.webkit.org/show_bug.cgi?id=130130
Reviewed by Csaba Osztrogonác.
Add missing #ifdef guard to typedef.
* UIProcess/API/C/WKDatabaseManager.cpp:
2014-03-12 Dean Jackson <dino@apple.com>
[WebGL] WebKit1 + WebKit2 iOS clients should check load policy
https://bugs.webkit.org/show_bug.cgi?id=130162
Reviewed by Simon Fraser.
Implement webGLPolicyForURL() methods for iOS.
* Configurations/WebContent-iOS.entitlements: Add the MobileAsset asset type.
* Configurations/WebKit2.xcconfig: Add MobileAsset to iOS link list.
* WebProcess/WebPage/WebPage.cpp: Exclude iOS.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::webGLPolicyForURL): Call into WKSI.
(WebKit::WebPage::resolveWebGLPolicyForURL):
2014-03-12 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Disable REMOTE_INSPECTOR in earlier OS X releases
https://bugs.webkit.org/show_bug.cgi?id=130118
Reviewed by Timothy Hatcher.
* Configurations/FeatureDefines.xcconfig:
2014-03-12 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] Crash when trying to select inside a video element with longpress..
https://bugs.webkit.org/show_bug.cgi?id=130095
<rdar://problem/16294534>
Reviewed by Benjamin Poulain.
We only need to set the assisted node for nodes that will receive an
input peripheral (keyboard, picker, popover, etc.).
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::elementDidFocus):
2014-03-12 Simon Fraser <simon.fraser@apple.com>
Have the scrolling tree track the viewport size, not the viewport rect
https://bugs.webkit.org/show_bug.cgi?id=130141
Reviewed by Beth Dakin.
The scrolling tree only needs to know the size of the viewport, not its
origin, since the origin is deduced from the updated scroll position.
* Shared/Scrolling/RemoteScrollingCoordinatorTransaction.cpp:
(ArgumentCoder<ScrollingStateScrollingNode>::encode):
(ArgumentCoder<ScrollingStateScrollingNode>::decode):
2014-03-12 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r165481.
https://bugs.webkit.org/show_bug.cgi?id=130151
That didn't go well. (Requested by kling on #webkit).
Reverted changeset:
https://bugs.webkit.org/show_bug.cgi?id=130140
http://trac.webkit.org/changeset/165481
2014-03-12 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Runtime error when page is closed while print operation is in progress
https://bugs.webkit.org/show_bug.cgi?id=129869
Reviewed by Anders Carlsson.
Sometimes when the page is closed right after printing the web
process aborts with the runtime message "pure virtual method
called terminate called without an active exception".
This happens because the page is closed when the pages have been
printed, but print job is still ongoing sending the data to the
printer. When print job finishes, we try to notify the UI process
sending the print callback message using WebPage::send(), but the
web page object has been destroyed. The virtual method it complains
about is probably MessageSender::messageSenderDestinationID() used
by send(). Since our print operation is always asynchronous, we
need a way to notify the web page when the print operation has
actually finished to clean it up, but also notify the print
operation when the page has been closed to not try to notify the
UI process in that case.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::close): Call disconnectFromPage to notify the
print operation in case there's an ongoing print job.
(WebKit::WebPage::endPrinting): Do not cleanup the print operation
here, since the print opertation might not have finished yet.
(WebKit::WebPage::didFinishPrintOperation): Send
PrintFinishedCallback message to the Ui process and cleanup the
print operation.
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
(WebKit::WebPrintOperationGtk::disconnectFromPage): Set m_webPage
to nullptr.
(WebKit::WebPrintOperationGtk::printDone): Call
didFinishPrintOperation() is the web page hasn't been closed.
* WebProcess/WebPage/gtk/WebPrintOperationGtk.h:
2014-03-12 Andreas Kling <akling@apple.com>
BundlePageDiagnosticLoggingClient leaks every string passing through it.
<https://webkit.org/b/130140>
<rdar://problem/15416838>
Use toAPI() instead of toCopiedAPI() so the receiving end doesn't need
to worry about adopting the WKStringRef.
Reviewed by Anders Carlsson.
* WebProcess/InjectedBundle/InjectedBundlePageDiagnosticLoggingClient.cpp:
(WebKit::InjectedBundlePageDiagnosticLoggingClient::logDiagnosticMessage):
2014-03-12 Tim Horton <timothy_horton@apple.com>
Hook up image controls for WebKit1
https://bugs.webkit.org/show_bug.cgi?id=130062
<rdar://problem/15964809>
Reviewed by Brady Eidson.
* Shared/ContextMenuContextData.cpp:
(WebKit::ContextMenuContextData::ContextMenuContextData):
2014-03-11 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r165356): [Mac] Multi-part key bindings don't work
https://bugs.webkit.org/show_bug.cgi?id=130100
Reviewed by Darin Adler.
Restore the previous behavior, where we only interpreted keydowns (including those
coming through performKeyEquivalent).
In the future, we might send all events to input methods, but not to key bindings.
* UIProcess/API/mac/WKView.mm:
(-[WKView keyUp:]):
(-[WKView flagsChanged:]):
2014-03-11 Beth Dakin <bdakin@apple.com>
_pageExtendedBackgroundColor should not be exposed on WKWebView
https://bugs.webkit.org/show_bug.cgi?id=130093
Reviewed by Simon Fraser.
Added comment indicating that _pageExtendedBackgroundColor is deprecated.
* UIProcess/API/Cocoa/WKViewPrivate.h:
_pageExtendedBackgroundColor now returns nil, but the conversation functionality
is maintained with a convenience method pageExtendedBackgroundColor.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView pageExtendedBackgroundColor]):
(-[WKWebView _didCommitLayerTree:WebKit::]):
(-[WKWebView _pageExtendedBackgroundColor]):
Added comment indicating that _pageExtendedBackgroundColor is deprecated.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Return nil.
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _pageExtendedBackgroundColor]):
2014-03-11 Jae Hyun Park <jaepark@webkit.org>
[GTK][CMake] Add HARFBUZZ_INCLUDE_DIRS to WebKit and WebKit2
https://bugs.webkit.org/show_bug.cgi?id=130070
Reviewed by Martin Robinson.
* PlatformGTK.cmake:
2014-03-10 Dan Bernstein <mitz@apple.com>
[Cocoa] Expose WebPageProxy::close
https://bugs.webkit.org/show_bug.cgi?id=130068
Reviewed by Adele Peterson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _close]):
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
2014-03-10 Benjamin Poulain <bpoulain@apple.com>
[iOS][WebKit 2] Wire the unobscured rect in the WebProcess
https://bugs.webkit.org/show_bug.cgi?id=130058
Reviewed by Simon Fraser.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
2014-03-10 Simon Fraser <simon.fraser@apple.com>
Fix three leaks
https://bugs.webkit.org/show_bug.cgi?id=130048
Reviewed by Anders Carlsson.
* Shared/API/Cocoa/WKRemoteObjectCoder.mm:
(decodeObject): Code is simpler and less leaky without the RetainPtr.
* UIProcess/API/Cocoa/WKNavigationAction.mm: Fix _originalURL leak
by making it a RetainPtr and implementing the getter and setter.
(-[WKNavigationAction _setOriginalURL:]):
(-[WKNavigationAction _originalURL]):
2014-03-10 Beth Dakin <bdakin@apple.com>
Set background color of WK2's UIScrollView to the pageExtendedBackgroundColor
https://bugs.webkit.org/show_bug.cgi?id=129919
Reviewed by Benjamin Poulain.
Make the pageExtendedBackgroundColor part of a RemoteLayerTreeTransaction.
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::pageExtendedBackgroundColor):
(WebKit::RemoteLayerTreeTransaction::setPageExtendedBackgroundColor):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
Set the background color of the UIScrollView based on the
pageExtendedBackgroundColor.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
For the sake of PLATFORM(MAC), continue to support the fact that this color can be
set via a message from the WebProcess or the new RemoteLayerTreeTransaction.
* UIProcess/WebPageProxy.h:
Cache the pageExtendedBackgroundColor as provided by the
RemoteLayerTreeTransaction.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree):
It’s not necessary to do anything here in non-Mac platforms anymore.
* WebProcess/WebCoreSupport/WebChromeClient.cpp:
(WebKit::WebChromeClient::pageExtendedBackgroundColorDidChange):
Include the pageExtendedBackgroundColor in the RemoteLayerTreeTransaction.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willCommitLayerTree):
2014-03-10 Benjamin Poulain <bpoulain@apple.com>
Generalize unobscured rect to all ports
https://bugs.webkit.org/show_bug.cgi?id=130036
Reviewed by Simon Fraser.
* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
(WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm:
(WebKit::TiledCoreAnimationDrawingArea::applyTransientZoomToPage):
2014-03-10 Dan Bernstein <mitz@apple.com>
<rdar://problem/16278716> [Cocoa] Allow setting a custom group identifier on a WKWebView
https://bugs.webkit.org/show_bug.cgi?id=130033
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]): Create a page group with the group identifier
from the configuration, if it’s non-empty.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration _groupIdentifier]): Added this accessor.
(-[WKWebViewConfiguration _setGroupIdentifier:]): Ditto.
* UIProcess/API/Cocoa/WKWebViewConfigurationPrivate.h: Declared _groupIdentifier property.
2014-03-10 Enrica Casucci <enrica@apple.com>
WebKit2: Crash in WebPage::getPositionInformation.
https://bugs.webkit.org/show_bug.cgi?id=129936
<rdar://problem/16264550>
Reviewed by Eric Carlson.
Missing null check on the node renderer in one code path.
If the page body is smaller than the document, hit testing
will return HTMLHtmlElement that has no renderer.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2014-03-10 Martin Robinson <mrobinson@igalia.com>
[GTK] [CMake] Clean up library linking
https://bugs.webkit.org/show_bug.cgi?id=129782
Reviewed by Philippe Normand.
* PlatformGTK.cmake: Use the new macro.
2014-03-10 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] The web process can finish while a print operation is still ongoing
https://bugs.webkit.org/show_bug.cgi?id=129871
Reviewed by Martin Robinson.
This can happen when the last page is closed while the print job
is sending data to the printer.
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: Disable web
process termination when the print job is sending data to the
printer and enable it again when job finishes.
2014-03-09 Jeong Yong-uk <yong@company100.com>
Update comment in NetworkResourceLoader
https://bugs.webkit.org/show_bug.cgi?id=129997
Reviewed by Andreas Kling.
NetworkResourceLoader::resourceHandleStopped() has been renamed to
NetworkResourceLoader::cleanup() but the comment is not updated.
* NetworkProcess/NetworkResourceLoader.cpp:
(WebKit::NetworkResourceLoader::start):
2014-03-09 Alexey Proskuryakov <ap@apple.com>
iOS build fix.
* WebProcess/WebPage/ios/WebPageIOS.mm: Include WebCore/KeyboardEvent.h.
2014-03-06 Alexey Proskuryakov <ap@apple.com>
[Mac] Don't perform a round-trip through WebProcess before interpreting key events
https://bugs.webkit.org/show_bug.cgi?id=129812
Reviewed by Darin Adler.
* Shared/NativeWebKeyboardEvent.h:
* Shared/WebEvent.h:
(WebKit::WebKeyboardEvent::handledByInputMethod):
(WebKit::WebKeyboardEvent::commands):
* Shared/WebEventConversion.cpp:
(WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent):
* Shared/WebKeyboardEvent.cpp:
(WebKit::WebKeyboardEvent::WebKeyboardEvent):
(WebKit::WebKeyboardEvent::~WebKeyboardEvent):
(WebKit::WebKeyboardEvent::encode):
(WebKit::WebKeyboardEvent::decode):
* Shared/mac/NativeWebKeyboardEventMac.mm:
(WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent):
* Shared/mac/WebEventFactory.h:
* Shared/mac/WebEventFactory.mm:
(WebKit::WebEventFactory::createWebKeyboardEvent):
Keyboard events now carry results of interpretation with them.
Ideally, mouse events should also have a handledByInputMethod member, because IMs
can handle events, but that can wait until we have actual bugs caused by not diabling
default processing for these.
* UIProcess/API/mac/WKView.mm:
(-[WKView becomeFirstResponder]): Updated for new NativeWebKeyboardEvent contructor
signature. We don't interpret the event in this code path.
(-[WKView doCommandBySelector:]): Added logging.
(-[WKView performKeyEquivalent:]): Reimplemented Esc and Cmd+period handling to avoid
infinite loops and re-entrancy. These two work in a unique way in AppKit.
Interpret key event before sending it down to WebProcess.
(-[WKView keyUp:]): Interpret key event before sending it down to WebProcess.
We need to tell IMs about the event, but key binding processing is moot, all commands
are executed on keydown.
(-[WKView keyDown:]): Interpret the event.
(-[WKView flagsChanged:]): Ditto.
(-[WKView _interpretKeyEvent:savingCommandsTo:WebCore::]): Added an assertion in
consumedByIM code path.
(-[WKView _executeSavedCommandBySelector:]): Added logging.
* UIProcess/PageClient.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
* UIProcess/mac/WebPageProxyMac.mm:
Removed interpretQueuedKeyEvent/interpretKeyEvent, WebProcess no longer asks UIProcess to do this.
* WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
(WebKit::WebEditorClient::handleKeyboardEvent):
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::handleKeyboardEvent):
(WebKit::WebEditorClient::handleInputMethodKeydown):
WebPage::handleEditingKeyboardEvent is now one function instead of two with a boolean
switch between two behaviors.
* WebProcess/WebPage/WebPage.cpp:(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
Removed m_keyboardEventBeingInterpreted, as we no longer send the event for interpretation.
This means that we sometimes have to pass a null event down to WebCore, but I wasn't
able to find any behavior differences from us doing so.
* WebProcess/WebPage/ios/WebPageIOS.mm: (WebKit::WebPage::handleEditingKeyboardEvent):
Added a FIXME.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::executeKeypressCommandsInternal): When we don't have an event,
use current frame as a target, just like input method messages do.
(WebKit::WebPage::handleEditingKeyboardEvent): This function no longer saves commands,
it only interprets them.
Added a check for Esc, as we don't want to handle it in keydown event handler.
(WebKit::WebPage::insertText): Pass 0 instead of m_keyboardEventBeingInterpreted.
(WebKit::WebPage::insertDictatedText): Ditto.
(WebKit::WebPage::executeKeypressCommands): Ditto.
2014-03-09 Zalan Bujtas <zalan@apple.com>
Subpixel rendering: Pass FloatSize boxsize to transform animations to support device pixel sizing.
https://bugs.webkit.org/show_bug.cgi?id=129985
Reviewed by Simon Fraser.
This is in preparation to stop passing integral positioned boxes to transform animations.
No change in behavior.
* WebProcess/WebPage/mac/GraphicsLayerCARemote.h:
2014-03-08 Simon Fraser <simon.fraser@apple.com>
[iOS Wk2] Can't scroll after going back to page in page cache
https://bugs.webkit.org/show_bug.cgi?id=129989
<rdar://problem/16217588>
Reviewed by Dan Bernstein.
iOS has a special FrameLoader::forceLayoutWithoutRecalculatingStyle()
function that is called instead of FrameView::forceLayout(). This was unimplemented
for the WK2 FrameLoaderClient, so no layout was forced, with the result
that the contentSize was never updated and scrolling was broken.
Fix by renaming the client function to forceLayoutOnRestoreFromPageCache()
and having it return a bool to say whether the default forceLayout()
should be done. WK1 can then continue to have its custom behavior,
and Wk2 will simply do a forceLayout().
Also remove FrameLaoderClient::forceLayout(), which was never called.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
* WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
(WebKit::WebFrameLoaderClient::forceLayoutOnRestoreFromPageCache):
2014-03-08 Simon Fraser <simon.fraser@apple.com>
[iOS WK2] Get position:fixed working slighlty better
https://bugs.webkit.org/show_bug.cgi?id=129988
Reviewed by Dan Bernstein.
iOS uses fixed layout, but does not want fixed elements laid
out relative to the frame.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::setUseFixedLayout):
2014-03-08 Jon Lee <jonlee@apple.com>
iOS broken after r165342
https://bugs.webkit.org/show_bug.cgi?id=129987
Reviewed by Simon Fraser.
* NetworkProcess/ios/NetworkProcessIOS.mm:
(WebKit::NetworkProcess::platformLowMemoryHandler): Add missing stub implementation for
platformLowMemoryHandler().
2014-03-08 Eric Carlson <eric.carlson@apple.com>
[iOS] media preferences not initialized correctly in WebKit2
https://bugs.webkit.org/show_bug.cgi?id=129983
Reviewed by Dan Bernstein.
* Shared/WebPreferencesStore.h: Initialize mediaPlaybackAllowsInline and
mediaPlaybackRequiresUserGesture correctly for iOS.
2014-03-08 Jeremy Jones <jeremyj@apple.com>
Allow media element to supply the video layer after fullscreen transition has already begun.
https://bugs.webkit.org/show_bug.cgi?id=129870
Reviewed by Eric Carlson.
WebVideoFullscreenManager and WebVideoFullscreenManagerProxy do their own remote hosting of the video layer instead of needing the video layer to have already been hosted elsewhere. This allows the removal of the coordination with WebPageProxy via a RemoteLayerTreeTransaction.
* Shared/mac/RemoteLayerTreeTransaction.h:
Remove m_videoLayerIDsPendingFullscreen and accessors.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
Don't encode m_videoLayerIDsPendingFullscreen
(WebKit::RemoteLayerTreeTransaction::decode):
Don't decode m_videoLayerIDsPendingFullscreen
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree):
Don't forward didCommitLayerTree to m_videoFullscreenManager.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
Remove code for synchronizing with the RenderTree.
Add a hosting layer and methods to keep video layer frame and video gravity synchronized.
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
Change IPC interface to fascilitate rehosting video layer with a instead of coordinating with the RenderTree by PlatformLayerID.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
Remove initialization for removed members.
(WebKit::WebVideoFullscreenManagerProxy::enterFullscreenWithID):
Rehost the video layer by id and pass on the layer.
This replaces didCommitLayerTree() and willLendVideoLayerWithID().
(WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
Cleanup the hosting layer.
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerFrame):
Forward on the video layer's frame to keep the hosted layer in sync with the interface.
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerGravity):
Forward the videolayer gravity.
* WebKit2.xcodeproj/project.pbxproj:
Rename WebVideoFullscreenManager.cpp to WebVideoFullscreenManager.mm
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willCommitLayerTree):
Don't invovle the m_videoFullscreenManager in layer tree transactions.
* WebProcess/ios/WebVideoFullscreenManager.h:
Remove code that synchronizes with the render tree via RemoteLayerTreeTransaction.
Instead rehost the video layer directly.
Instead of hoping the WebVideoFullscreenModel has a videoLayer, supply one into which
it can add whatever it likes as needed.
* WebProcess/ios/WebVideoFullscreenManager.messages.in:
No more explicit borrowing and returning video layers.
Add functions to keep video layer bounds and gravity in sync with the UI.
* WebProcess/ios/WebVideoFullscreenManager.mm: Renamed from Source/WebKit2/WebProcess/ios/WebVideoFullscreenManager.cpp.
Removed code for synchronizing via RemoteLAyerTreeTransaction.
(WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
Remove initialization for removed memeber m_sendUnparentVideoLayerTransaction.
(WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
Creates a fullscreen layer, gives it to the WebVideoFullscreenModel to fill in,
and hosts it in a context to send to the UIProcess.
(WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
remove enterFullscreen() and just directly send the IPC message.
(WebKit::WebVideoFullscreenManager::didExitFullscreen):
Clean up the hosting context.
(WebKit::WebVideoFullscreenManager::setVideoLayerGravityEnum):
Forward on the video gravity. Type convert from unsigned to MediaPlayer::VideoGravity.
2014-03-08 Andreas Kling <akling@apple.com>
[WK2] Improve the network process low memory handler.
<https://webkit.org/b/129977>
Split the network process low memory handler into platform-specific
and shared parts. The shared part tells FastMalloc to release freed
pages back to the OS.
For Mac, added a call to purge the in-memory part of CFURLCache.
Remove the malloc_zone_pressure_relief() since that is now taken care
of by the shared MemoryPressureHandler code.
Reviewed by Darin Adler.
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::lowMemoryHandler):
(WebKit::NetworkProcess::platformLowMemoryHandler):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::platformLowMemoryHandler):
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
2014-03-08 Jae Hyun Park <jaepark@webkit.org>
Remove unnecessary casting in NetworkProcessMainUnix.cpp
https://bugs.webkit.org/show_bug.cgi?id=129968
Reviewed by Andreas Kling.
* NetworkProcess/unix/NetworkProcessMainUnix.cpp:
Since socket is an int, int casting is not necessary.
(WebKit::NetworkProcessMain):
2014-03-08 Aaron Golden <golden@inkling.com>
Prevent processes spawned by WebProcess from trying to insert the SecItem shim.
https://bugs.webkit.org/show_bug.cgi?id=129864
Reviewed by Anders Carlsson.
* WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm:
(WebKit::WebContentProcessMainDelegate::doPreInitializationWork):
2014-03-07 Tim Horton <timothy_horton@apple.com>
[WebKit2][iOS] PDF
https://bugs.webkit.org/show_bug.cgi?id=129600
<rdar://problem/15260216>
Reviewed by Anders Carlsson.
Add a single custom content provider which installs a very primitive PDF view
in place of the WKContentView if a PDF is loaded in the main frame.
* Configurations/WebKit2.xcconfig:
Link against CorePDF, for UIPDFPageView.
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm:
(-[WKWebViewContentProviderRegistry init]):
Initialize the registry, using WKPDFView for all PDF MIME types.
* WebKit2.xcodeproj/project.pbxproj:
* UIProcess/ios/WKPDFView.h: Added.
* UIProcess/ios/WKPDFView.mm: Added.
Add a very simple PDF view based on UIPDFPageView. Additional functionality
can come in the future; right now, we just create one view for each page, and
depend on CATiledLayer to only paint the pages that are being displayed.
2014-03-07 Andreas Kling <akling@apple.com>
ArgumentEncoder and ArgumentDecoder should be fastmalloced.
<https://webkit.org/b/129960>
Reviewed by Ryosuke Niwa.
* Platform/IPC/ArgumentDecoder.h:
* Platform/IPC/ArgumentEncoder.h:
2014-03-07 Martin Robinson <mrobinson@igalia.com>
Fix the GTK+ build after the recent iOS merge.
* UIProcess/API/gtk/PageClientImpl.cpp: Make some methods available to non-Cocoa ports and fix some signatures.
* UIProcess/WebPageProxy.h: Ditto.
2014-03-07 Ryuan Choi <ryuan.choi@samsung.com>
Unreviewed. Fix build on the EFL port after r165303
* UIProcess/CoordinatedGraphics/WebView.cpp:
(WebKit::WebView::didCommitLoadForMainFrame): Added new parameters.
* UIProcess/CoordinatedGraphics/WebView.h: Ditto.
* UIProcess/WebPageProxy.h:
* UIProcess/efl/WebViewEfl.cpp: Added dummy didFinishLoadingDataForCustomContentProvider()
(WebKit::WebViewEfl::exitFullScreen):
(WebKit::WebViewEfl::didFinishLoadingDataForCustomContentProvider):
* UIProcess/efl/WebViewEfl.h: Ditto.
2014-03-07 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] Keyboard accessory comes up when I click a link.
https://bugs.webkit.org/show_bug.cgi?id=129949
<rdar://problem/16265305>
Reviewed by Simon Fraser.
We need to create the accessory view only when needed.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView requiresAccessoryView]):
(-[WKContentView inputAccessoryView]):
2014-03-07 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] Long-press on a link shows just "Copy".
https://bugs.webkit.org/show_bug.cgi?id=129938
<rdar://problem/16266054>
Reviewed by Benjamin Poulain.
When adding a FIXME comment, I accidentally removed the ! on
the if (!element) condition.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getPositionInformation):
2014-03-07 Tim Horton <timothy_horton@apple.com>
[WebKit2][iOS] Main-frame custom content providers
https://bugs.webkit.org/show_bug.cgi?id=129809
Reviewed by Dan Bernstein.
Re-introduce custom content providers to WebKit2 (removed in r152841), but
for iOS this time.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
Send the initial MIME types that have custom content providers to the WebProcess.
(-[WKWebView dealloc]):
Unregister our page from the content provider registry.
(-[WKWebView _setHasCustomContentView:loadedMIMEType:]):
Install/uninstall the custom content provider. Create a view, if needed,
based on the class that the registry has associated with the given MIME type.
We unparent the WKContentView while the custom content provider is active,
and re-use the existing WKScrollView to contain the custom content provider.
(-[WKWebView _didFinishLoadingDataForCustomContentProviderWithSuggestedFilename:dataReference:]):
Forward loaded data on to the custom content provider for display.
(-[WKWebView _didCommitLayerTree:WebKit::]):
Assert that we aren't getting layer tree commits while using a custom content provider.
(-[WKWebView viewForZoomingInScrollView:]):
If we're using a custom content provider, its view should be used for zooming
instead of the (unparented) web content view.
(-[WKWebView hasContentView]):
(-[WKWebView scrollViewWillBeginZooming:withView:]):
(-[WKWebView scrollViewWillBeginDragging:]):
(-[WKWebView _didFinishScrolling]):
(-[WKWebView _updateVisibleContentRects]):
If we do not have a parented WKContentView because we are using a custom
content provider, we should not forward scroll view related changes to it.
(-[WKWebView _frameOrBoundsChanged]):
Update the minimum size of the custom content provider if the web view size changes.
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration _contentProviderRegistry]):
(-[WKWebViewConfiguration _setContentProviderRegistry:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationInternal.h: Added.
Add an internal WKWebViewConfiguration property, the WKWebViewContentProviderRegistry.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/Cocoa/WKWebViewContentProvider.h: Added.
A minimal protocol for informing custom content providers of changes to
the size of the view, the represented data, and the owning scroll view.
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.h: Added.
* UIProcess/Cocoa/WKWebViewContentProviderRegistry.mm: Added.
(-[WKWebViewContentProviderRegistry addPage:]):
(-[WKWebViewContentProviderRegistry removePage:]):
(-[WKWebViewContentProviderRegistry registerProvider:forMIMEType:]):
(-[WKWebViewContentProviderRegistry providerForMIMEType:]):
(-[WKWebViewContentProviderRegistry mimeTypesWithContentProviders]):
New class, keeps track of a mapping from MIME types to UIViews that
conform to the WKWebViewContentProvider protocol.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::didCommitLoadForFrame):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/PageClient.h:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
(WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
(WebKit::PageClientImpl::didFinishLoadingDataForCustomContentProvider):
Add parameters to didCommitLoadForMainFrame, indicating if we should use
a custom content provider to display the main frame, and what MIME type
was loaded in said frame, and add didFinishLoadingDataForCustomContentProvider.
On iOS, forward these to the WKWebView.
Also, give PageClientImplIOS a reference to the WKWebView.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFrame.mm:
(-[WKWebProcessPlugInFrame _hasCustomContentProvider]):
* WebProcess/InjectedBundle/API/Cocoa/WKWebProcessPlugInFramePrivate.h:
Expose whether or not a given frame has a custom content provider to the plug-in.
* WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp:
(WebKit::WebFrameLoaderClient::WebFrameLoaderClient):
(WebKit::WebFrameLoaderClient::hasHTMLView):
(WebKit::WebFrameLoaderClient::dispatchDidCommitLoad):
(WebKit::WebFrameLoaderClient::committedLoad):
(WebKit::WebFrameLoaderClient::finishedLoading):
(WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame):
(WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage):
(WebKit::WebFrameLoaderClient::canCachePage):
* WebProcess/WebCoreSupport/WebFrameLoaderClient.h:
(WebKit::WebFrameLoaderClient::frameHasCustomContentProvider):
Restore WebFrameLoaderClient custom representation code, which ensures
that data is routed correctly (to the UI process, and not to WebCore) and
that we don't try to use the page cache for frames with content providers.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::mainFrameHasCustomContentProvider):
(WebKit::WebPage::addMIMETypeWithCustomContentProvider):
(WebKit::WebPage::shouldUseCustomContentProviderForResponse):
(WebKit::WebPage::canShowMIMEType):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
Keep a list of MIME types which can be displayed via custom content providers
in WebPage, which will be pushed down from the registry as new providers
are added. Plug-ins still take precendence over custom content providers.
2014-03-07 Anders Carlsson <andersca@apple.com>
MigrateHeaders.make should remove C SPI includes from WebKit2 headers
https://bugs.webkit.org/show_bug.cgi?id=129937
<rdar://problem/15920020>
Reviewed by Tim Horton.
* WebKit2.xcodeproj/project.pbxproj:
Make WKPreferences.h and all headers it includes public. Update the post processing of WKBase.h
to account for WKBase.h now being a public header again.
2014-03-07 Alexey Proskuryakov <ap@apple.com>
REGRESSION (r164847): Pressing the command key while hovering an element causes it to un-hover
https://bugs.webkit.org/show_bug.cgi?id=129872
Reviewed by Tim Horton.
* UIProcess/API/Cocoa/WKViewPrivate.h: Changes in performDictionaryLookupAtCurrentMouseLocation
were also not correct, because the current event could be a keyboard one (Cmd+Ctrl+D).
But this SPI is unused, and can be simply removed.
* UIProcess/API/mac/WKView.mm: (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]):
locationInWindow is undefined for keyboard events, so we have to use current location.
Thankfully, there is a method that returns the location in appropriate coordinate
space, unlike +[NSEvent mouseLocation] that we used before.
2014-03-07 Andy Estes <aestes@apple.com>
[iOS] Install WebKit2 XPC services to the correct place during iOS Simulator builds
https://bugs.webkit.org/show_bug.cgi?id=129914
Reviewed by Dan Bernstein.
We weren't specifying INSTALL_PATH for iOS Simulator builds in
BaseXPCService.xcconfig, and r164576 changed INSTALL_PATH to
INSTALL_PATH_ACTUAL. This caused XPC services to start being installed
to the root of the iOS Simulator SDK. Fix this by setting
INSTALL_PATH_ACTUAL for iphonesimulator.
* Configurations/BaseXPCService.xcconfig:
2014-03-07 Andreas Kling <akling@apple.com>
[Mac] Notify system malloc of fake memory pressure.
<https://webkit.org/b/129908>
Reviewed by Anders Carlsson.
* NetworkProcess/mac/NetworkProcessMac.mm:
(WebKit::NetworkProcess::platformInitializeNetworkProcess):
Listen for the fake memory pressure notification and respond by
just forwarding to system malloc. We don't do the full WebCore
memory pressure handling here, since that will cause stuff that
the network process doesn't need to get instantiated.
2014-03-07 Dean Jackson <dino@apple.com>
Attempt to fix the iOS build.
* Configurations/WebKit2.xcconfig: Add -framework OpenGLES to linking.
2014-03-07 Simon Fraser <simon.fraser@apple.com>
[iOS] Add an updateID to visibleContentRect updates which is passed back in layer transactions, so we know whether transactions are stale
https://bugs.webkit.org/show_bug.cgi?id=129897
Reviewed by Benjamin Poulain.
In WebKit2 on iOS we need to know when layer updates from the web process
are stale with respect to visible rect updates from the UI process. Do so
by adding an updateID to VisibleContentRectUpdateInfo, and storing it
on each side, returning it in RemoteLayerTreeTransaction.
Did some re-ordering of members and encoding order in RemoteLayerTreeTransaction
to group like data members together.
* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::updateID):
(WebKit::operator==):
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::setLastVisibleContentRectUpdateID):
(WebKit::RemoteLayerTreeTransaction::lastVisibleContentRectUpdateID):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::nextVisibleContentRectUpdateID):
(WebKit::WebPageProxy::lastVisibleContentRectUpdateID):
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::willCommitLayerTree):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
2014-03-07 Roger Fong <roger_fong@apple.com>
Replace setSystemWebGLLoadPolicy API with methods to query for WebGL blocking policy.
https://bugs.webkit.org/show_bug.cgi?id=129873.
Reviewed by Dean Jackson.
Remove setSystemWebGLLoadPolicy API.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::resolveWebGLLoadPolicy):
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageLoaderClient):
* UIProcess/API/C/WKPageLoaderClient.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resolveWebGLPolicyForURL):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::webGLPolicyForURL):
Add API to directly query the WebGL blocking policies from WKSI.
* UIProcess/API/C/mac/WKContextPrivateMac.h:
* UIProcess/API/C/mac/WKContextPrivateMac.mm:
(WKContextShouldBlockWebGL):
(WKContextShouldSuggestBlockWebGL):
2014-03-07 Eric Carlson <eric.carlson@apple.com>
Initialize new WKSI functions for WebKit2
https://bugs.webkit.org/show_bug.cgi?id=129889
Reviewed by Simon Fraser.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2014-03-07 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Use final and override in WebPrintOperationGtk
https://bugs.webkit.org/show_bug.cgi?id=129868
Reviewed by Sergio Villar Senin.
* WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp:
2014-03-06 Alexey Proskuryakov <ap@apple.com>
[Mac] Allow com.apple.GSSCred in WebKit sandbox profiles
https://bugs.webkit.org/show_bug.cgi?id=129777
<rdar://problem/16050832>
Reviewed by Anders Carlsson.
* NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in:
* Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
* WebProcess/com.apple.WebProcess.sb.in:
2014-03-06 Filip Pizlo <fpizlo@apple.com>
If the FTL is build-time enabled then it should be run-time enabled.
Rubber stamped by Geoffrey Garen.
* Shared/WebProcessCreationParameters.cpp:
(WebKit::WebProcessCreationParameters::WebProcessCreationParameters):
(WebKit::WebProcessCreationParameters::encode):
(WebKit::WebProcessCreationParameters::decode):
* Shared/WebProcessCreationParameters.h:
* UIProcess/mac/WebContextMac.mm:
(WebKit::registerUserDefaultsIfNeeded):
(WebKit::WebContext::platformInitializeWebProcess):
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeWebProcess):
2014-03-06 Hyowon Kim <hw1008.kim@samsung.com>
[EFL] Move EvasGL classes from WebKit to WebCore namespace.
https://bugs.webkit.org/show_bug.cgi?id=129797
Reviewed by Gyuyoung Kim.
* UIProcess/API/efl/EwkView.h: namespace changes for EvasGLContext/Surface.
2014-03-06 Simon Fraser <simon.fraser@apple.com>
Remove one more setCustomFixedPositionRect() that I missed.
* UIProcess/DrawingAreaProxy.h:
2014-03-06 Simon Fraser <simon.fraser@apple.com>
Send the fixed position rect to the WebProcess along with the other rects
https://bugs.webkit.org/show_bug.cgi?id=129856
Reviewed by Benjamin Poulain.
Remove the functions that pass the custom fixed position rect through
the DrawingArea, and replace them by adding this rect to the
VisibleContentRectUpdateInfo, along with the "is stable" flag. We
then set the custom fixed position rect in the web process for
stable updates.
* Shared/VisibleContentRectUpdateInfo.cpp:
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h:
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::customFixedPositionRect):
(WebKit::VisibleContentRectUpdateInfo::inStableState):
(WebKit::operator==):
* UIProcess/DrawingAreaProxy.cpp:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/DrawingArea.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
* WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h:
2014-03-06 Simon Fraser <simon.fraser@apple.com>
Remove empty class extension in WKContentViewInteraction
https://bugs.webkit.org/show_bug.cgi?id=129849
Reviewed by Enrica Casucci.
This empty class extension is cruft left over from refactoring.
It can be removed.
* UIProcess/ios/WKContentViewInteraction.mm:
2014-03-06 Simon Fraser <simon.fraser@apple.com>
[iOS] didUpdateVisibleRect: should use fabs, not abs
https://bugs.webkit.org/show_bug.cgi?id=129843
Reviewed by Benjamin Poulain.
When zooming we sent messages to the web process with an unchanging
zoom scale because of use of abs() rather than fabs().
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
2014-03-06 Anders Carlsson <andersca@apple.com>
Remove WebKit1 header includes from WebKit2
https://bugs.webkit.org/show_bug.cgi?id=129824
Reviewed by Dan Bernstein.
* UIProcess/mac/WKFullScreenWindowController.mm:
(makeResponderFirstResponderIfDescendantOfView):
Add a new function instead of calling an NSWindow category method that's defined in WebKit1.
(-[WKFullScreenWindowController enterFullScreen:]):
(-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]):
(-[WKFullScreenWindowController finishedExitFullScreenAnimation:]):
Call makeResponderFirstResponderIfDescendantOfView.
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
Remove unused WebKit1 header import.
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::documentFragmentFromAttributedString):
Change a category to be on NSObject instead of WebResource.
2014-03-06 Jon Lee <jonlee@apple.com>
iOS build fix.
Reviewed by Simon Fraser.
* UIProcess/ios/SmartMagnificationController.mm:
2014-03-06 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Expose the console object in JSContexts to interact with Web Inspector
https://bugs.webkit.org/show_bug.cgi?id=127944
Reviewed by Geoffrey Garen.
* WebProcess/WebCoreSupport/WebChromeClient.h:
Update namespaces.
2014-03-06 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Close the page when the view is disposed instead of when finalized
https://bugs.webkit.org/show_bug.cgi?id=129783
Reviewed by Sergio Villar Senin.
When a GtkWidget is destroyed, the GObject is disposed, but not
finalized if it has additional references. When the destroyed
widget is leaked by the application, we leak the page proxy and
what is more important the web process in multi-process mode.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseDispose): Close the WebPageProxy.
2014-03-05 Chris Fleizach <cfleizach@apple.com>
AX: Support IOS Accessibility in WK2
https://bugs.webkit.org/show_bug.cgi?id=129527
Build fix.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2014-03-05 Chris Fleizach <cfleizach@apple.com>
AX: Support IOS Accessibility in WK2
https://bugs.webkit.org/show_bug.cgi?id=129527
Address review comments from Simon noted in bug.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm:
(-[WKAccessibilityWebPageObject init]):
(-[WKAccessibilityWebPageObject dealloc]):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h:
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm:
(-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
(-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
2014-03-05 Dean Jackson <dino@apple.com>
[WebGL] Use WKSI to see what the system policy for WebGL is
https://bugs.webkit.org/show_bug.cgi?id=129722
<rdar://problem/15790542>
Reviewed by Tim Horton.
Use the WebKitSystemInterface methods WKShouldBlockWebGL
and WKShouldSuggestBlockingWebGL to query what the host
system thinks about the hardware. Tell the client about
the result in a new WebPage method setSystemWebGLPolicy.
* UIProcess/API/APILoaderClient.h:
(API::LoaderClient::setSystemWebGLLoadPolicy): New empty definition.
* UIProcess/API/C/WKAPICast.h:
(WebKit::toAPI): Convert a WebGLLoadPolicy into a WKWebGLLoadPolicy.
* UIProcess/API/C/WKPage.cpp: Call setSystemWebGLLoadPolicy.
(WKPageSetPageLoaderClient):
* UIProcess/API/C/WKPageLoaderClient.h: New typedef and entry in client structure.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::setSystemWebGLPolicy):
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in: Add SetSystemWebGLPolicy.
* Source/WebKit2/Configurations/WebKit2.xcconfig: We have to link against OpenGL now, because WKSI
uses it for hardware detection.
* WebProcess/WebPage/WebPage.cpp: Remove the implementation here, but leave
empty methods for non-Apple platforms.
(WebKit::WebPage::WebPage):
(WebKit::WebPage::webGLPolicyForURL):
(WebKit::WebPage::resolveWebGLPolicyForURL):
* WebProcess/WebPage/WebPage.h: Add m_systemWebGLPolicy.
* WebProcess/WebPage/mac/WebPageMac.mm:
(WebKit::WebPage::webGLPolicyForURL): Moved in from WebPage, but now they call
into WKSI and send the result to the client if necessary.
(WebKit::WebPage::resolveWebGLPolicyForURL):
2014-03-05 Simon Fraser <simon.fraser@apple.com>
Fix a stupid error in r165118 that caused userVisibleString()
to call itself recursively.
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::userVisibleString):
2014-03-05 Benjamin Poulain <bpoulain@apple.com>
[iOS] Rename the various VisibleExtent variations to exposedContentRect
https://bugs.webkit.org/show_bug.cgi?id=129728
Reviewed by Simon Fraser.
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setExposedContentRect):
2014-03-05 Dean Jackson <dino@apple.com>
Unreviewed. Fix the Apple-internal builds.
* Configurations/WebKit2.xcconfig: Add -framework OpenGL.
2014-03-05 Simon Fraser <simon.fraser@apple.com>
ObjC exception when dropping files into a WKView: drag and drop uses code from WebKit.framework
https://bugs.webkit.org/show_bug.cgi?id=129752
Reviewed by Enrica Casucci.
Get WebDragClientMac off of all WebKit headers, and WebEditorClientMac off
all but one by using C functions from WebCoreNSURLExtras.h rather than
the NSURL category.
* WebProcess/WebCoreSupport/mac/WebDragClientMac.mm:
(WebKit::WebDragClient::declareAndWriteDragImage):
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
(WebKit::WebEditorClient::userVisibleString):
(WebKit::WebEditorClient::canonicalizeURL):
(WebKit::WebEditorClient::canonicalizeURLString):
2014-03-05 Martin Hock <mhock@apple.com>
Add support for sessions to MemoryCache.
https://bugs.webkit.org/show_bug.cgi?id=127794
Reviewed by Sam Weinig.
* NetworkProcess/NetworkResourceLoader.h: Add sessionID() method.
(WebKit::NetworkResourceLoader::sessionID):
* NetworkProcess/mac/DiskCacheMonitor.h: Add sessionID member.
* NetworkProcess/mac/DiskCacheMonitor.mm:
(WebKit::DiskCacheMonitor::DiskCacheMonitor): Send sessionID to NetworkProcessConnection::DidCacheResource.
* WebProcess/Network/NetworkProcessConnection.cpp: Add sessionID parameter to didCacheResource and pass to MemoryCache.
(WebKit::NetworkProcessConnection::didCacheResource):
* WebProcess/Network/NetworkProcessConnection.h: Ditto.
* WebProcess/Network/NetworkProcessConnection.messages.in: Ditto.
2014-03-05 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] support multi-select and select with groups for iPhone.
https://bugs.webkit.org/show_bug.cgi?id=129344
<rdar://problem/16206928>
Reviewed by Simon Fraser.
This is the remaining work on select element support on iOS.
This adds multi-select and select with group support with UI
for iPhone that uses UIPickerView.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView resignFirstResponder]):
(-[WKContentView inputAccessoryView]): Removed incorrect early return.
(-[WKContentView _stopAssistingNode]):
* UIProcess/ios/forms/WKFormSelectControl.h:
* UIProcess/ios/forms/WKFormSelectControl.mm:
(adjustedFontSize): Moved here to make it available to both picker and
popover based implementations.
(-[WKFormSelectControl initWithView:]):
* UIProcess/ios/forms/WKFormSelectPicker.mm:
(-[WKOptionPickerCell _isSelectable]):
(-[WKOptionPickerCell initCommon]):
(-[WKOptionPickerCell initWithOptionItem:]):
(-[WKOptionGroupPickerCell initWithOptionItem:]):
(-[WKOptionGroupPickerCell labelWidthForBounds:]):
(-[WKOptionGroupPickerCell layoutSubviews]):
(-[WKMultipleSelectPicker initWithView:]):
(-[WKMultipleSelectPicker dealloc]):
(-[WKMultipleSelectPicker controlView]):
(-[WKMultipleSelectPicker controlBeginEditing]):
(-[WKMultipleSelectPicker controlEndEditing]):
(-[WKMultipleSelectPicker layoutSubviews]):
(-[WKMultipleSelectPicker pickerView:viewForRow:forComponent:reusingView:]):
(-[WKMultipleSelectPicker numberOfComponentsInPickerView:]):
(-[WKMultipleSelectPicker pickerView:numberOfRowsInComponent:]):
(-[WKMultipleSelectPicker findItemIndexAt:]):
(-[WKMultipleSelectPicker pickerView:row:column:checked:]):
(-[WKSelectSinglePicker initWithView:]):
(-[WKSelectSinglePicker controlEndEditing]):
* UIProcess/ios/forms/WKFormSelectPopover.mm:
2014-03-03 Martin Robinson <mrobinson@igalia.com>
[GTK][CMake] Generate documentation for the DOM bindings
https://bugs.webkit.org/show_bug.cgi?id=126211
Reviewed by Carlos Garcia Campos.
* PlatformGTK.cmake: The list of headers for GIR generation has a better name now.
2014-03-04 Benjamin Poulain <bpoulain@apple.com>
Fix the build after r165095
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2014-03-04 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Account for the keyboard when computing the unobscuredRect
https://bugs.webkit.org/show_bug.cgi?id=129660
Reviewed by Enrica Casucci.
Adjust the unobscuredRect when a docked keyboard is on screen.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _updateVisibleContentRectsWithStableState:]):
(-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]):
2014-03-04 Andy Estes <aestes@apple.com>
[iOS][WebKit2] Exclude plug-in sandbox profiles from the build
https://bugs.webkit.org/show_bug.cgi?id=129719
Reviewed by Simon Fraser.
* Configurations/WebKit2.xcconfig:
2014-03-04 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] WKScrollView should be able to cancel touches in content view
https://bugs.webkit.org/show_bug.cgi?id=129711
Reviewed by Simon Fraser.
* UIProcess/ios/WKScrollView.mm:
We should not override UIWebScrollView behavior regarding touch cancellation otherwise we force
other gesture recognizers to fail if delayed touches have been dispatched.
2014-03-04 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Consider the entire view state on update to find if a change is stable or not
https://bugs.webkit.org/show_bug.cgi?id=129721
Reviewed by Simon Fraser.
Changes in scroll, zoom and obscuredRect can happen simultaneously. To compute if the current state
is stable or not, we should consider the complete picture from all the type of updates.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didFinishScrolling]):
(-[WKWebView scrollViewDidScroll:]):
(-[WKWebView scrollViewDidZoom:]):
(-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _updateVisibleContentRects]):
(-[WKWebView _setObscuredInsets:]):
(-[WKWebView _endInteractiveObscuredInsetsChange]):
2014-03-04 Jeremy Jones <jeremyj@apple.com>
WebVideoFullscreen, should make the hand off of the video layer explicit.
https://bugs.webkit.org/show_bug.cgi?id=128844
Reviewed by Simon Fraser.
This change introduces a more explicit hand-off of the video layer and fullscreen transition.
This describes the interactions between WebVideoFullscreenInterface and WebVideoFullscreenModel
WebVideoFullscreenModel <-> WebVideoFullscreenInterface
enterFullScreen(*) ->
<- borrowVideoLayer
willLendVideoLayer ->
didLendVideoLayer ->
<- didEnterFullscreen
...
<- requestExitFullscreen
exitFullscreen ->
<- returnVideoLayer
<- didExitFullscreen
(*) enterFullScreen actually comes from WebVideoFullscreenControllerAVKit.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
Implement WebVideoFullscreenChangeObserver.
Add support for explicit video layer hand-off.
Add m_videoView to retain the videoLayer's UIView.
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
WillLendVideoLayerWithID replaces SetVideoLayerID
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
Adopt new methods for explicit video layer hand-off.
(WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
Observe fullscreen changes.
(WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
Pending fullscreen transition now does didLendVideoLayer instead of calling enter fullscreen.
It also removes the videoView from it's super view now that it is safe to do so.
(WebKit::WebVideoFullscreenManagerProxy::willLendVideoLayerWithID):
This replaces setVideoLayerID. It retains the UIView for the layer to keep it alive before it is unparented.
(WebKit::WebVideoFullscreenManagerProxy::requestExitFullscreen):
Adopt more explicit fullscreen transition.
(WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
Adopt more explicit fullscreen transition.
(WebKit::WebVideoFullscreenManagerProxy::didEnterFullscreen):
Adopt more explicit fullscreen transition.
(WebKit::WebVideoFullscreenManagerProxy::borrowVideoLayer):
Adopt more explicit video layer hand-off.
(WebKit::WebVideoFullscreenManagerProxy::returnVideoLayer):
Adopt more explicit video layer hand-off.
* WebProcess/ios/WebVideoFullscreenManager.cpp:
Manage state of fullscreen transition more competently. Wait till an animation is complete to begin the next one.
(WebKit::WebVideoFullscreenManager::WebVideoFullscreenManager):
Init three new state members.
(WebKit::WebVideoFullscreenManager::enterFullscreenForNode):
Update animation state. Don't procede if animation is in progress.
(WebKit::WebVideoFullscreenManager::exitFullscreenForNode):
Update animation state. Don't procede if animation is in progress.
(WebKit::WebVideoFullscreenManager::willLendVideoLayer):
Adopt more explicit video layer hand-off.
This replaces SetVideoLayer.
(WebKit::WebVideoFullscreenManager::didLendVideoLayer):
This is a no-op as this will be sent through a RemoteLayerTreeTransaction.
(WebKit::WebVideoFullscreenManager::didEnterFullscreen):
Adopt more explicit fullscreen transition.
(WebKit::WebVideoFullscreenManager::didExitFullscreen):
Adopt more explicit fullscreen transition.
* WebProcess/ios/WebVideoFullscreenManager.h:
Adopt more explicit fullscreen transition.
* WebProcess/ios/WebVideoFullscreenManager.messages.in:
Adopt more explicit fullscreen/video layer transition.
2014-03-04 Simon Fraser <simon.fraser@apple.com>
Get position:fixed working slightly better on iOS WK2
https://bugs.webkit.org/show_bug.cgi?id=129714
Reviewed by Benjamin Poulain.
Start telling the RemoteScrollingCoordinatorProxy about scroll position changes
again, so it can update fixed and sticky layers.
Send the scroll position as a FloatPoint, rather than an IntPoint.
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
(WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChangedViaDelegatedScrolling):
(WebKit::RemoteScrollingCoordinatorProxy::scrollPositionChanged):
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.h:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
Tell the RemoteScrollingCoordinatorProxy about the scroll update.
Only update the customFixedPositionRect if we've finished scrolling or zooming.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects): Return a bool indicating
whether the visible rects changed.
2014-03-04 Conrad Shultz <conrad_shultz@apple.com>
WKPage's pageExtendedBackgroundColor API exposed through WKView/WKWebView should support NSColor
https://bugs.webkit.org/show_bug.cgi?id=129704
Reviewed by Beth Dakin.
Add NSColor-returning methods to complement the existing UIColor-returning methods.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _pageExtendedBackgroundColor]):
Return an NSColor created from the pageExtendedBackgroundColor.
* UIProcess/API/Cocoa/WKWebViewPrivate.h:
Declare _pageExtendedBackgroundColor for non-TARGET_OS_IPHONE.
* UIProcess/API/mac/WKView.mm:
(-[WKView _pageExtendedBackgroundColor]):
Return an NSColor created from the pageExtendedBackgroundColor.
2014-03-04 Joseph Pecoraro <pecoraro@apple.com>
Web Inspector: Give WebProcess private RWI entitlement
https://bugs.webkit.org/show_bug.cgi?id=129710
Reviewed by Timothy Hatcher.
* Configurations/WebContent-iOS.entitlements:
Add entitlements to "WebProcess" when code signing.
* Configurations/WebContentProcess.xcconfig:
Add the private RWI entitlement.
2014-03-04 Enrica Casucci <enrica@apple.com>
[iOS WebKit2]: Next/Prev button in the accessory bar do not work.
https://bugs.webkit.org/show_bug.cgi?id=129690
<rdar://problem/16073569>
Reviewed by Simon Fraser.
Adding support for Next and Previous buttons in the accessory bar.
When the request is processed by the WebProcess, we identify the next
focusable node that needs to be assisted and we call focus() on the element
letting the focus changing machinery take care of updating the assisted node.
This change also add support for the Clear button, when appropriate and hooks up
the call to the WebProcess.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView accessoryTab:]):
(-[WKContentView accessoryClear]):
(-[WKContentView _updateAccessory]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::focusNextAssistedNode):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::nextFocusableElement):
(WebKit::hasFocusableElement):
(WebKit::WebPage::focusNextAssistedNode):
(WebKit::WebPage::getAssistedNodeInformation):
2014-03-04 Simon Fraser <simon.fraser@apple.com>
Allow iOS DumpRenderTree crashes to show application-specific information
https://bugs.webkit.org/show_bug.cgi?id=129705
Reviewed by David Kilzer.
Make the WKSI function SetCrashReportApplicationSpecificInformation available
in iOS simulator builds.
* WebProcess/WebCoreSupport/mac/WebSystemInterface.mm:
(InitWebCoreSystemInterface):
2014-03-04 Mark Hahnenberg <mhahnenberg@apple.com>
Merge API shims and JSLock
https://bugs.webkit.org/show_bug.cgi?id=129650
Reviewed by Mark Lam.
JSLock is now taking on all of APIEntryShim's responsibilities since there is never a reason
to take just the JSLock. Ditto for DropAllLocks and APICallbackShim.
* DatabaseProcess/IndexedDB/sqlite/UniqueIDBDatabaseBackingStoreSQLite.cpp:
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::~UniqueIDBDatabaseBackingStoreSQLite):
(WebKit::UniqueIDBDatabaseBackingStoreSQLite::createIndex):
2014-03-03 Enrica Casucci <enrica@apple.com>
[WK2] Selection remains after reload.
https://bugs.webkit.org/show_bug.cgi?id=129648
<rdar://problem/16207547>
Reviewed by Sam Weinig.
We normally clear the selection when resigninig first responder but
that doesn't get called when reloading the page or when navigating with
back/forward buttons. The correct place to do this is when we get
_didCommitLoadForMainFrame where we already stop assisting the node.
The method we call into webselectionassistant is resignedFirstResponder
which takes care of clearing the selection and removing the selection view.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _stopAssistingNode]):
2014-03-04 Hyowon Kim <hw1008.kim@samsung.com>
Move EvasGLContext and EvasGLSurface files into the efl common directory.
https://bugs.webkit.org/show_bug.cgi?id=129603
Reviewed by Gyuyoung Kim.
* PlatformEfl.cmake: Update for removed files.
2014-03-03 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] WebPage::updateVisibleContentRects can set the position directly instead of using programmatic scrolling
https://bugs.webkit.org/show_bug.cgi?id=129649
Reviewed by Sam Weinig.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
Update my workaround from r165003. We should not use programmatic scrolling when the scroll position is changed
from the UI.
2014-03-03 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Update UIScrollView's contentSize when a new layer tree is committed
https://bugs.webkit.org/show_bug.cgi?id=129641
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didCommitLayerTree:WebKit::]):
Previously, we relied on [UIScrollView setZoomScale:] to reset the contentSize for us.
In the cases where we would not go through [UIScrollView setZoomScale:], the UIScrollView's contentSize
did not match the actual WKContentView's area on screen.
2014-03-03 Jeremy Jones <jeremyj@apple.com>
Forward application suspend resume notifications to the web process.
https://bugs.webkit.org/show_bug.cgi?id=129356
Reviewed by Eric Carlson.
Repost UIApplicationWillEnterForegroundNotification,
UIApplicationDidBecomeActiveNotification and
UIApplicationWillResignActiveNotification from UIProcess to WebProcess.
As WebUIApplicationWillEnterForegroundNotification,
WebUIApplicationDidBecomeActiveNotification, and
WebUIApplicationWillResignActiveNotification
* UIProcess/WebPageProxy.h:
Add applicationWillEnterForeground()
applicationWillResignActive()
applicationDidBecomeActive()
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::]):
Observe notifications.
(-[WKContentView dealloc]):
Stop observing notifications.
(-[WKContentView _applicationWillResignActive:]):
Notify WebPageProxy of the event.
(-[WKContentView _applicationWillEnterForeground:]):
Notify WebPageProxy of the event.
(-[WKContentView _applicationDidBecomeActive:]):
Notify WebPageProxy of the event.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applicationWillEnterForeground):
Send corresponding Message to WebPage.
(WebKit::WebPageProxy::applicationWillResignActive):
Send corresponding Message to WebPage.
(WebKit::WebPageProxy::applicationDidBecomeActive):
Send corresponding Message to WebPage.
* WebProcess/WebPage/WebPage.h:
Add applicationWillEnterForeground()
applicationWillResignActive()
applicationDidBecomeActive()
* WebProcess/WebPage/WebPage.messages.in:
Add applicationWillEnterForeground()
applicationWillResignActive()
applicationDidBecomeActive()
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applicationWillResignActive):
Post corresponding NSNotification.
(WebKit::WebPage::applicationWillEnterForeground):
Post corresponding NSNotification.
(WebKit::WebPage::applicationDidBecomeActive):
Post corresponding NSNotification.
2014-03-03 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r165013.
http://trac.webkit.org/changeset/165013
https://bugs.webkit.org/show_bug.cgi?id=129646
New code is not thread safe, asserting on a worker test
(Requested by ap on #webkit).
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/mac/DiskCacheMonitor.h:
* NetworkProcess/mac/DiskCacheMonitor.mm:
(WebKit::DiskCacheMonitor::DiskCacheMonitor):
* WebProcess/Network/NetworkProcessConnection.cpp:
(WebKit::NetworkProcessConnection::didCacheResource):
* WebProcess/Network/NetworkProcessConnection.h:
* WebProcess/Network/NetworkProcessConnection.messages.in:
2014-03-03 Enrica Casucci <enrica@apple.com>
[iOS WebKit2]: Text fields don't zoom in when focused
https://bugs.webkit.org/show_bug.cgi?id=129632
<rdar://problem/16185230>
Reviewed by Benjamin Poulain.
When focusing the node we need to zoom and center it and possibly
scroll to make it visible.
On iPad we only scroll, without zooming.
* Shared/AssistedNodeInformation.cpp:
(WebKit::AssistedNodeInformation::encode):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h:
(WebKit::AssistedNodeInformation::AssistedNodeInformation):
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _scrollToRect:withOrigin:minimumScrollDistance:]):
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView _startAssistingNode:]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::getAssistedNodeInformation):
2014-03-03 Sam Weinig <sam@webkit.org>
Fix ASSERT and leaks introduced in recent "Support IOS Accessibility in WK2" patch
Reviewed by Simon Fraser.
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformInitializeAccessibility):
2014-03-03 Simon Fraser <simon.fraser@apple.com>
Composited masks not working on iOS after r164890
https://bugs.webkit.org/show_bug.cgi?id=129630
Reviewed by Jer Noble.
Fix typo in UIView-related masks code; set the mask layer
on the view, not the maskView.
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyProperties):
2014-02-28 Chris Fleizach <cfleizach@apple.com>
AX: Support IOS Accessibility in WK2
https://bugs.webkit.org/show_bug.cgi?id=129527
Reviewed by Sam Weinig.
Implement enough AX hooks so that accessibility can work in WebKit2.
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::identifier):
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::accessibilityWebProcessTokenReceived):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _updateForScreen:]):
(-[WKContentView _setAccessibilityWebProcessToken:]):
(-[WKContentView _accessibilityRegisterUIProcessTokens]):
(-[WKContentView _didRelaunchProcess]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
(WebKit::WebPageProxy::registerUIProcessAccessibilityTokens):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/Plugins/PDF/PDFPlugin.mm:
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.h: Added.
* WebProcess/WebPage/WKAccessibilityWebPageObjectIOS.mm: Added.
(-[WKAccessibilityWebPageObject init]):
(-[WKAccessibilityWebPageObject _accessibilityCategoryInstalled:]):
(-[WKAccessibilityWebPageObject pageScale]):
(-[WKAccessibilityWebPageObject dealloc]):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::platformInitialize):
(WebKit::WebPage::platformInitializeAccessibility):
(WebKit::WebPage::accessibilityObjectForMainFramePlugin):
(WebKit::WebPage::registerUIProcessAccessibilityTokens):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.h: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectBase.mm: Copied from Source/WebKit2/WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm.
(-[WKAccessibilityWebPageObjectBase accessibilityFocusedUIElement]):
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.h: Added.
* WebProcess/WebPage/mac/WKAccessibilityWebPageObjectMac.mm: Added.
(-[WKAccessibilityWebPageObject accessibilityIsIgnored]):
(-[WKAccessibilityWebPageObject accessibilityAttributeNames]):
(-[WKAccessibilityWebPageObject accessibilityParameterizedAttributeNames]):
(-[WKAccessibilityWebPageObject accessibilityIsAttributeSettable:]):
(-[WKAccessibilityWebPageObject accessibilitySetValue:forAttribute:]):
(-[WKAccessibilityWebPageObject convertScreenPointToRootView:]):
(-[WKAccessibilityWebPageObject accessibilityActionNames]):
(-[WKAccessibilityWebPageObject accessibilityChildren]):
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:]):
(-[WKAccessibilityWebPageObject accessibilityAttributeValue:forParameter:]):
(-[WKAccessibilityWebPageObject accessibilityShouldUseUniqueId]):
(-[WKAccessibilityWebPageObject accessibilityHitTest:]):
* WebProcess/WebPage/mac/WebPageMac.mm:
* WebProcess/cocoa/WebProcessCocoa.mm:
(WebKit::WebProcess::platformInitializeProcess):
2014-03-03 Martin Hock <mhock@apple.com>
Add support for sessions to MemoryCache.
https://bugs.webkit.org/show_bug.cgi?id=127794
Reviewed by Sam Weinig.
* NetworkProcess/NetworkResourceLoader.h: Add sessionID() method.
(WebKit::NetworkResourceLoader::sessionID):
* NetworkProcess/mac/DiskCacheMonitor.h: Add sessionID member.
* NetworkProcess/mac/DiskCacheMonitor.mm:
(WebKit::DiskCacheMonitor::DiskCacheMonitor): Send sessionID to NetworkProcessConnection::DidCacheResource.
* WebProcess/Network/NetworkProcessConnection.cpp: Add sessionID parameter to didCacheResource and pass to MemoryCache.
(WebKit::NetworkProcessConnection::didCacheResource):
* WebProcess/Network/NetworkProcessConnection.h: Ditto.
* WebProcess/Network/NetworkProcessConnection.messages.in: Ditto.
2014-03-03 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Regression: ScrollView's scroll offset is never set after r164702
https://bugs.webkit.org/show_bug.cgi?id=129620
Reviewed by Simon Fraser.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
2014-03-03 Simon Fraser <simon.fraser@apple.com>
Crash when going into video fullscreen on iOS
https://bugs.webkit.org/show_bug.cgi?id=129613
Reviewed by Dean Jackson.
We shouldn't reparent a UIView's layer without unparenting
the view first.
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm:
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
2014-03-03 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] WebKit2WebExtension GIR can't be used in vala
https://bugs.webkit.org/show_bug.cgi?id=127179
Reviewed by Martin Robinson.
Add a different pkg-config file for the web extensions API.
* GNUmakefile.am:
* PlatformGTK.cmake:
* webkit2gtk-web-extension.pc.in: Added.
2014-03-02 Darin Adler <darin@apple.com>
Streamline use of TextIterator, cutting down includes and use of soon-to-be-deleted functions
https://bugs.webkit.org/show_bug.cgi?id=129592
Reviewed by Sam Weinig.
* UIProcess/WebPageProxy.cpp: Added now-needed include.
* WebProcess/WebPage/WebPage.cpp: Ditto.
2014-03-02 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] Keyboard deadlock when accepting/dismissing autocorrection.
https://bugs.webkit.org/show_bug.cgi?id=129594
<rdar://problem/16168978>
Reviewed by Sam Weinig.
As a temporary fix, we are using a synchronous
message to accept autocorrection until we implement
a solution that processes these requests on a thread that
is not the main thread.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::applyAutocorrection):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::applyAutocorrection):
(WebKit::WebPage::syncApplyAutocorrection):
2014-03-02 Dan Bernstein <mitz@apple.com>
Try to fix the 32-bit build.
* UIProcess/ios/forms/WKFormSelectPopover.mm:
(adjustedFontSize):
2014-03-02 Sam Weinig <sam@webkit.org>
Page Cache is not enabled when using the modern WebKit2 API
https://bugs.webkit.org/show_bug.cgi?id=129585
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool initWithConfiguration:]):
Default to CacheModelPrimaryWebBrowser until there is a way to configure it.
2014-03-02 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] Form controls handling
https://bugs.webkit.org/show_bug.cgi?id=129344
<rdar://problem/16053643>
Reviewed by Simon Fraser.
Adding support for select elements on iOS.
There is full support on iPad, while on iPhone it is
still limited to single select with no groups.
The change also fixes the issue of the keyboard appearing
on screen for types of elements that are implemented with
a popover or a picker.
* Scripts/webkit2/messages.py:
* Shared/AssistedNodeInformation.cpp:
(WebKit::WKOptionItem::encode):
(WebKit::WKOptionItem::decode):
(WebKit::AssistedNodeInformation::encode):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h:
(WebKit::WKOptionItem::WKOptionItem):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView inputView]):
(-[WKContentView assistedNodeSelectOptions]):
(-[WKContentView _startAssistingNode:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setAssistedNodeSelectedIndex):
* UIProcess/ios/forms/WKFormSelectControl.h:
* UIProcess/ios/forms/WKFormSelectControl.mm: Added.
(-[WKFormSelectControl initWithView:]):
(+[WKFormSelectControl createPeripheralWithView:]):
(-[WKFormSelectControl assistantView]):
(-[WKFormSelectControl beginEditing]):
(-[WKFormSelectControl endEditing]):
* UIProcess/ios/forms/WKFormSelectPicker.mm: Added.
(-[WKSelectSinglePicker initWithView:]):
(-[WKSelectSinglePicker dealloc]):
(-[WKSelectSinglePicker controlView]):
(-[WKSelectSinglePicker controlBeginEditing]):
(-[WKSelectSinglePicker controlEndEditing]):
(-[WKSelectSinglePicker numberOfComponentsInPickerView:]):
(stringByTrimmingWhitespaceAndNewlines):
(-[WKSelectSinglePicker pickerView:numberOfRowsInComponent:]):
(-[WKSelectSinglePicker pickerView:attributedTitleForRow:forComponent:]):
(-[WKSelectSinglePicker pickerView:didSelectRow:inComponent:]):
* UIProcess/ios/forms/WKFormSelectPopover.mm: Added.
(stringWithWritingDirection):
(adjustedFontSize):
(-[WKSelectTableViewController initWithView:hasGroups:]):
(-[WKSelectTableViewController viewWillAppear:]):
(-[WKSelectTableViewController numberOfSectionsInTableView:]):
(-[WKSelectTableViewController tableView:numberOfRowsInSection:]):
(-[WKSelectTableViewController tableView:titleForHeaderInSection:]):
(-[WKSelectTableViewController populateCell:withItem:]):
(-[WKSelectTableViewController findItemIndexAt:]):
(-[WKSelectTableViewController findItemAt:]):
(-[WKSelectTableViewController tableView:cellForRowAtIndexPath:]):
(-[WKSelectTableViewController tableView:didSelectRowAtIndexPath:]):
(-[WKSelectTableViewController hasText]):
(-[WKSelectTableViewController insertText:]):
(-[WKSelectTableViewController deleteBackward]):
(-[WKSelectPopover initWithView:hasGroups:]):
(-[WKSelectPopover dealloc]):
(-[WKSelectPopover controlView]):
(-[WKSelectPopover controlBeginEditing]):
(-[WKSelectPopover controlEndEditing]):
(-[WKSelectPopover _userActionDismissedPopover:]):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setAssistedNodeSelectedIndex):
(WebKit::innerFrameQuad):
(WebKit::WebPage::getPositionInformation):
(WebKit::hasFocusableNode):
(WebKit::WebPage::getAssistedNodeInformation):
(WebKit::WebPage::elementDidFocus):
2014-03-02 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Pages using tiled compositing layers allocate too many tiles on zoom
https://bugs.webkit.org/show_bug.cgi?id=129471
Reviewed by Simon Fraser.
* WebProcess/WebPage/DrawingArea.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects):
A few interesting changes here:
-Now that we do not use setExposedRect, we can pass the exposed area directly
to the drawing area since everything is now in content coordinates :)
-The scale is now converted to float before being compared to the Page's scaleFactor.
The page's scalefactor being a float, the comparison was failing most of the time.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h:
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::setVisibleExtentContentRect):
2014-03-02 Darin Adler <darin@apple.com>
Change public text iterator API implementations to not depend on 16-bit character pointers
https://bugs.webkit.org/show_bug.cgi?id=129566
Reviewed by Anders Carlsson.
* WebView/WebTextIterator.mm:
(-[WKDOMTextIterator initWithRange:]): Use make_unique instead of adoptPtr.
(-[WKDOMTextIterator advance]): Clear out the upconverted text since we are moving on to the
next text.
(-[WKDOMTextIterator currentTextPointer]): Upconvert if we have 8-bit text.
(-[WKDOMTextIterator currentTextLength]): Call TextIterator::text().length() since we will
probably be removing TextIterator::length eventually.
* WebProcess/WebCoreSupport/WebEditorClient.cpp: Removed unneded include of TextIterator.h.
* WebProcess/WebPage/WebPage.cpp: Ditto.
2014-03-02 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Make impossible to build with <webkit2/webkit2.h> and <webkit2/webkit-web-extension.h> included together
https://bugs.webkit.org/show_bug.cgi?id=129549
Reviewed by Martin Robinson.
Add a compile error to prevent mixing the UI and web process APIs.
* UIProcess/API/gtk/webkit2.h:
* WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h:
2014-03-02 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove the include dir of the C API from the WebKit2 pkg-config file
https://bugs.webkit.org/show_bug.cgi?id=129543
Reviewed by Martin Robinson.
We are not installing the C API headers anymore.
* webkit2gtk.pc.in:
2014-03-01 Tim Horton <timothy_horton@apple.com>
Fix the Mac build.
* UIProcess/mac/ViewGestureController.messages.in:
2014-03-01 Tim Horton <timothy_horton@apple.com>
WebKit2 View Gestures (Smart Magnification): Support for iOS
https://bugs.webkit.org/show_bug.cgi?id=129146
<rdar://problem/16032668>
Reviewed by Benjamin Poulain.
Add support for double-tap smart magnification on iOS.
* DerivedSources.make:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
WKContentView is no longer API, so it can know about WKWebView
and will always have one.
(-[WKWebView contentView:didCommitLayerTree:WebKit::]):
Don't replace the zoom scale if we're currently animating.
(-[WKWebView _takeViewSnapshot]):
Rename.
(-[WKWebView _zoomToPoint:WebCore::atScale:]):
(-[WKWebView _zoomToRect:WebCore::atScale:origin:WebCore::]):
(constrainContentOffset):
(-[WKWebView _scrollToRect:WebCore::origin:WebCore::minimumScrollDistance:]):
(-[WKWebView _zoomOutWithOrigin:]):
(-[WKWebView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
Add _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:
and _zoomOutWithOrigin: as internal API, for use by SmartMagnificationController via WKContentView.
These will use some heuristics to generally center the target rect in the view
in a way that should match WebKit1 fairly closely.
* UIProcess/API/Cocoa/WKWebViewInternal.h:
Don't use the WKContentViewDelegate protocol for things that don't belong there.
* UIProcess/ios/SmartMagnificationController.h: Added.
* UIProcess/ios/SmartMagnificationController.messages.in: Added.
* UIProcess/ios/SmartMagnificationController.mm: Added.
(WebKit::SmartMagnificationController::SmartMagnificationController):
(WebKit::SmartMagnificationController::~SmartMagnificationController):
(WebKit::SmartMagnificationController::handleSmartMagnificationGesture):
(WebKit::SmartMagnificationController::didCollectGeometryForSmartMagnificationGesture):
SmartMagnificationController sits off of WKContentView, and sends/receives
messages to the WebProcess to do the smart magnification hit-testing.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::webView:]):
As before, teach WKContentView about its owning WKWebView.
(-[WKContentView _takeViewSnapshot]):
Rename.
(-[WKContentView _zoomToRect:withOrigin:fitEntireRect:minimumScale:maximumScale:minimumScrollDistance:]):
(-[WKContentView _zoomOutWithOrigin:]):
Forward _zoomToRect:::::: and _zoomOutWithOrigin: to WKWebView.
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView setupInteraction]):
(-[WKContentView _doubleTapRecognized:]):
(-[WKContentView _twoFingerDoubleTapRecognized:]):
Forward double tap to the SmartMagnificationController.
* UIProcess/mac/ViewGestureController.h:
* UIProcess/mac/ViewGestureController.messages.in:
* UIProcess/mac/ViewGestureControllerMac.mm:
(WebKit::ViewGestureController::didCollectGeometryForSmartMagnificationGesture):
Retrieve the minimum/maximum viewport scale from the WebProcess.
* WebKit2.xcodeproj/project.pbxproj:
Add new files.
* WebProcess/WebPage/ViewGestureGeometryCollector.cpp:
(WebKit::ViewGestureGeometryCollector::ViewGestureGeometryCollector):
(WebKit::ViewGestureGeometryCollector::dispatchDidCollectGeometryForSmartMagnificationGesture):
(WebKit::ViewGestureGeometryCollector::collectGeometryForSmartMagnificationGesture):
(WebKit::ViewGestureGeometryCollector::collectGeometryForMagnificationGesture):
Factor out code to send the geometry back to the UI process.
* WebProcess/WebPage/ViewGestureGeometryCollector.h:
* WebProcess/WebPage/ViewGestureGeometryCollector.messages.in:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebPage.h:
We should have a ViewGestureGeometryCollector on iOS too.
2014-03-01 Zan Dobersek <zdobersek@igalia.com>
Unreviewed follow-up to r164905 and r164912.
* Platform/IPC/Connection.h: Only declare setShouldCloseConnectionOnMachExceptions() for the Mac port.
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::didFinishLaunching): Only call setShouldCloseConnectionOnMachExceptions() on the Mac port.
2014-03-01 Gavin Barraclough <barraclough@apple.com>
Split UserActivity/CountedUserActivity
https://bugs.webkit.org/show_bug.cgi?id=129520
Reviewed by Sam Weinig.
UserActivity currently provides an interface allowing counted, nested calls to enable/disable.
In some cases it would be easier to use if it were a simpler boolean enabled/disabled interface.
* PluginProcess/PluginProcess.h:
(WebKit::PluginProcess::connectionActivity):
- UserActivity->CountedUserActivity
* PluginProcess/mac/PluginProcessMac.mm:
(WebKit::PluginProcess::platformInitializeProcess):
- beginActivity->start
* Shared/ActivityAssertion.cpp:
(WebKit::ActivityAssertion::ActivityAssertion):
(WebKit::ActivityAssertion::~ActivityAssertion):
- beginActivity->increment, endActivity->decrement.
* Shared/ActivityAssertion.h:
- UserActivity->CountedUserActivity
* Shared/ChildProcess.cpp:
(WebKit::ChildProcess::setProcessSuppressionEnabled):
- beginActivity->start, endActivity->stop.
* Shared/ChildProcess.h:
- removed processSuppressionEnabled()
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
- beginActivity->start, endActivity->stop.
2014-03-01 Csaba Osztrogonác <ossy@webkit.org>
Unreviewed trivial Linux buildfix after r164905.
setShouldCloseConnectionOnMachExceptions() is defined in the Mac only
Source/WebKit2/Platform/IPC/mac/ConnectionMac.cpp inside !PLATFORM(IOS)
which means PLATFORM(MAC), because nobody else uses this source file.
But ChildProcessProxy.cpp is used by Linux ports too, so we have to
use the most specific #if guard here, which is PLATFORM(MAC).
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
2014-02-28 Simon Fraser <simon.fraser@apple.com>
[iOS] Assertions and bad behavior when zooming into an iframe containing apple.com
https://bugs.webkit.org/show_bug.cgi?id=129537
Reviewed by Benjamin Poulain.
When building RemoteLayerTreeTransactions, the ordering of setting created
layers and doing the recursive tree walk was wrong, such that we failed
to noticed layers created during the recursiveBuildTransaction().
Also harden the UI-side code against Obj-C exceptions thrown when layers
are missing.
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyProperties): Assert when
children are not found, and protect against Obj-C exceptions.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::LayerCreationProperties::LayerCreationProperties):
Initialize the members.
* WebProcess/WebPage/mac/RemoteLayerTreeContext.mm:
(WebKit::RemoteLayerTreeContext::buildTransaction): Do the recursive walk
before setting created and destroyed layers, since the walk can create
layers (especially when swapping into tiled layers).
2014-02-28 Jinwoo Song <jinwoo7.song@samsung.com>
Fix WebKit2 build after r164890
https://bugs.webkit.org/show_bug.cgi?id=129533
Reviewed by Simon Fraser.
LayerRepresentation.h is included to WebPageProxy.h in r164890
but it is not used in non Mac or iOS port.
* UIProcess/WebPageProxy.h:
2014-02-28 Alexey Proskuryakov <ap@apple.com>
[Mac] Extract _data->_thumbnailView checks into a helper function
https://bugs.webkit.org/show_bug.cgi?id=129517
Reviewed by Sam Weinig.
* UIProcess/API/mac/WKView.mm:
(-[WKView shouldIgnoreMouseEvents]):
(-[WKView scrollWheel:]):
(-[WKView mouseMoved:]):
(-[WKView mouseDown:]):
(-[WKView mouseUp:]):
(-[WKView mouseDragged:]):
2014-02-28 Pratik Solanki <psolanki@apple.com>
[iOS][WebKit2] Don't use any of the mach exception handling code on iOS
https://bugs.webkit.org/show_bug.cgi?id=129516
Reviewed by Sam Weinig.
This code is not used on iOS after my fix in r164883. We can just move it all under
!PLATFORM(IOS).
* Platform/IPC/Connection.h:
* Platform/IPC/mac/ConnectionMac.cpp:
(IPC::Connection::platformInvalidate):
(IPC::Connection::platformInitialize):
(IPC::Connection::open):
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
2014-02-28 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] highlight rects should never big bigger than the view
https://bugs.webkit.org/show_bug.cgi?id=129472
<rdar://problem/15673655>
Reviewed by Enrica Casucci.
The unobscuredRect on WebPageProxy is the "true" view rect as seen by the user.
Use that to constrain our highlight rects.
* UIProcess/ios/WKContentViewInteraction.mm:
(highlightedQuadsFitInRect):
(-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
2014-02-28 Simon Fraser <simon.fraser@apple.com>
Make UIViews for compositing layers in the UI process on iOS
https://bugs.webkit.org/show_bug.cgi?id=129508
Reviewed by Sam Weinig.
In order to parent UIScrollViews for -webkit-overflow-scrolling:touch,
we need to use UIViews in the compositing layer hierarchy on iOS.
Make much of the code that currently uses CALayers layer-or-view
agnostic by using a typedef LayerOrView.
Fix RemoteLayerTreePropertyApplier to apply properties to UIViews
or CALayers; on iOS, we need both paths because we have to set properties
on CALayer for remotely hosted content.
Add iOS-specific implementation files for RemoteLayerTreeHost and RemoteScrollingCoordinatorProxy,
since these need to see the UIView implementation. WebVideoFullscreenManagerProxy.cpp also needs
to be come a .mm file.
* Shared/mac/RemoteLayerTreePropertyApplier.h:
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(-[UIView setSubviews:]):
(WebKit::applyPropertiesToLayer):
(WebKit::RemoteLayerTreePropertyApplier::applyProperties):
* UIProcess/Cocoa/LayerRepresentation.h: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
(asLayer):
* UIProcess/PageClient.h:
* UIProcess/Scrolling/RemoteScrollingCoordinatorProxy.cpp:
* UIProcess/WebPageProxy.h:
* UIProcess/ios/LayerRepresentation.mm: Copied from Source/WebKit2/Shared/mac/RemoteLayerTreePropertyApplier.h.
(asLayer):
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
(WebKit::PageClientImpl::acceleratedCompositingRootLayer):
* UIProcess/ios/RemoteLayerTreeHostIOS.mm: Added.
(+[WKTransformView layerClass]):
(-[WKRemoteView initWithFrame:contextID:]):
(+[WKRemoteView layerClass]):
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/ios/RemoteScrollingCoordinatorProxyIOS.mm: Added.
(WebKit::layerRepresentationFromLayerOrView):
(WebKit::RemoteScrollingCoordinatorProxy::connectStateNodeLayers):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _setAcceleratedCompositingRootView:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
* UIProcess/ios/WebVideoFullscreenManagerProxy.mm: Renamed from Source/WebKit2/UIProcess/ios/WebVideoFullscreenManagerProxy.cpp.
(WebKit::WebVideoFullscreenManagerProxy::create):
(WebKit::WebVideoFullscreenManagerProxy::WebVideoFullscreenManagerProxy):
(WebKit::WebVideoFullscreenManagerProxy::~WebVideoFullscreenManagerProxy):
(WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
(WebKit::WebVideoFullscreenManagerProxy::enterFullscreen):
(WebKit::WebVideoFullscreenManagerProxy::requestExitFullScreen):
(WebKit::WebVideoFullscreenManagerProxy::play):
(WebKit::WebVideoFullscreenManagerProxy::pause):
(WebKit::WebVideoFullscreenManagerProxy::togglePlayState):
(WebKit::WebVideoFullscreenManagerProxy::seekToTime):
(WebKit::WebVideoFullscreenManagerProxy::didExitFullscreen):
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::commitLayerTree):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
* UIProcess/mac/RemoteLayerTreeHost.h:
(WebKit::RemoteLayerTreeHost::rootLayer):
* UIProcess/mac/RemoteLayerTreeHost.mm:
(WebKit::RemoteLayerTreeHost::updateLayerTree):
(WebKit::RemoteLayerTreeHost::getLayer):
(WebKit::RemoteLayerTreeHost::createLayer):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::setAcceleratedCompositingRootLayer):
(WebKit::WebPageProxy::acceleratedCompositingRootLayer):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/mac/PlatformCALayerRemote.cpp:
(PlatformCALayerRemote::recursiveBuildTransaction):
2014-02-28 Anders Carlsson <andersca@apple.com>
WebKit2.TerminateTwice test is failing.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Turns out this can be called even when we're in the launching state so don't try to
remove the process from the visited link provider when in that state.
2014-02-28 Chris Fleizach <cfleizach@apple.com>
AX: Crash in WebKit::WebPageProxy::registerWebProcessAccessibilityToken
https://bugs.webkit.org/show_bug.cgi?id=127387
Reviewed by Alexey Proskuryakov.
Speculative fix for crasher. We should check if the connection is still valid before proceeding.
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::registerWebProcessAccessibilityToken):
2014-02-28 Timothy Hatcher <timothy@apple.com>
Properly handle when Test.html is not present in Production builds.
https://bugs.webkit.org/show_bug.cgi?id=129506
Reviewed by Joseph Pecoraro.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::isMainOrTestInspectorPage):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectorTestPageURL):
2014-02-28 Pratik Solanki <psolanki@apple.com>
[iOS][WebKit2] Don't grab mach exception port on iOS
https://bugs.webkit.org/show_bug.cgi?id=129505
<rdar://problem/15972749>
Reviewed by Anders Carlsson.
Don't grab the mach exception port on iOS so we get crash logs for web process and network
process.
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::didFinishLaunching):
2014-02-28 Brent Fulgham <bfulgham@apple.com>
Unreviewed build fix after r164832.
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::updateProcessState): Switch from removed
'isValid' to 'state() != State::Running'
2014-02-28 Anders Carlsson <andersca@apple.com>
VisitedLinkProvider should keep track of processes, not pages
https://bugs.webkit.org/show_bug.cgi?id=129497
Reviewed by Dan Bernstein.
Use a counted set of WebProcessProxy pointers instead of a set of pages.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::~VisitedLinkProvider):
Assert that m_processes is null.
(WebKit::VisitedLinkProvider::addProcess):
Add the process to the set.
(WebKit::VisitedLinkProvider::removeProcess):
Remove the process from the set.
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
If our process is currently running, add it to the visited link provider.
Otherwise it will be added in connectionWillOpen.
(WebKit::WebPageProxy::close):
If our process is running, remove it from the visited link provider.
Otherwise it's either crashed or not yet launched and will not have been added.
(WebKit::WebPageProxy::connectionWillOpen):
Add the process to the visited link provider.
(WebKit::WebPageProxy::resetStateAfterProcessExited):
Remove the process from the visited link provider.
2014-02-27 Alexey Proskuryakov <ap@apple.com>
[Mac] Stop using some deprecated functions in WKView.mm
https://bugs.webkit.org/show_bug.cgi?id=129455
Reviewed by Anders Carlsson.
* UIProcess/API/mac/WKView.mm:
(-[WKView firstRectForCharacterRange:actualRange:]): Use convertRectToScreen,
which is a replacement for convertBaseToScreen. Don't check for window being null,
because isn't that crazy talk?
(-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): Use event's location
in window instead of current mouse location. Using location that is not synced to
event stream rarely makes sense, and it doesn't look like this is one of those cases.
(-[WKView performDictionaryLookupAtCurrentMouseLocation]): Ditto.
2014-02-27 Jaehun Lim <ljaehun.lim@samsung.com>
Unreviewed. Fix build after r164832
* UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp:
(WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState):
2014-02-27 Martin Robinson <mrobinson@igalia.com>
Fix build after r164832
* UIProcess/DrawingAreaProxyImpl.cpp:
(WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState): WebProcessProxy::isLaunching() has been replaced
by WebProcessProxy::state().
2014-02-27 Tim Horton <timothy_horton@apple.com>
Crash in RemoteLayerTreePropertyApplier::applyPropertiesToLayer
https://bugs.webkit.org/show_bug.cgi?id=129456
<rdar://problem/16182676>
Reviewed by Simon Fraser.
* Shared/mac/RemoteLayerTreePropertyApplier.mm:
(WebKit::RemoteLayerTreePropertyApplier::applyPropertiesToLayer):
We were dereferencing the RemoteLayerBackingStore without checking if it exists,
in the accelerated drawing codepath. This case will occur if a layer
previously drew contents, but now does not.
2014-02-27 Anders Carlsson <andersca@apple.com>
Simplify WebProcessProxy state accessors
https://bugs.webkit.org/show_bug.cgi?id=129453
Reviewed by Andreas Kling.
Replace WebProcessProxy::isLaunching() and WebProcessProxy::isValid() with a single
WebProcessProxy::state() that return one of three values: Launching, Running or Terminated.
* Shared/ChildProcessProxy.cpp:
(WebKit::ChildProcessProxy::state):
(WebKit::ChildProcessProxy::sendMessage):
(WebKit::ChildProcessProxy::abortProcessLaunchIfNeeded):
* Shared/ChildProcessProxy.h:
(WebKit::ChildProcessProxy::canSendMessage):
* UIProcess/Databases/DatabaseProcessProxy.cpp:
(WebKit::DatabaseProcessProxy::getDatabaseProcessConnection):
* UIProcess/Network/NetworkProcessProxy.cpp:
(WebKit::NetworkProcessProxy::getNetworkProcessConnection):
* UIProcess/Network/mac/NetworkProcessProxyMac.mm:
(WebKit::NetworkProcessProxy::setProcessSuppressionEnabled):
* UIProcess/Plugins/PluginProcessProxy.cpp:
(WebKit::PluginProcessProxy::getPluginProcessConnection):
(WebKit::PluginProcessProxy::getSitesWithData):
(WebKit::PluginProcessProxy::clearSiteData):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::reattachToWebProcess):
(WebKit::WebPageProxy::waitForDidUpdateViewState):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::requestTermination):
(WebKit::WebProcessProxy::enableSuddenTermination):
(WebKit::WebProcessProxy::disableSuddenTermination):
* UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm:
(WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate):
* UIProcess/mac/WebPageProxyMac.mm:
(WebKit::WebPageProxy::shouldDelayWindowOrderingForEvent):
* UIProcess/mac/WebProcessProxyMac.mm:
(WebKit::WebProcessProxy::updateProcessSuppressionState):
2014-02-27 Simon Fraser <simon.fraser@apple.com>
Crash tapping on play button on video on iOS
https://bugs.webkit.org/show_bug.cgi?id=129452
Reviewed by Benjamin Poulain.
node->computedStyle() can return null. Just use
renderer->style() to get the tap highlight color.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::tapHighlightAtPosition):
2014-02-27 Brian Burg <bburg@apple.com>
Web Inspector: model tests should use a special Test.html inspector page
https://bugs.webkit.org/show_bug.cgi?id=129190
Reviewed by Timothy Hatcher.
Support creating a separate test inspector page, based on the value of
InspectorController::isUnderTest(). Add this as a separate API call for
WebInspectorProxy. Modify the navigation policy to check the URL against
both normal and test inspector pages.
* UIProcess/WebInspectorProxy.cpp:
(WebKit::isMainOrTestInspectorPage):
(WebKit::decidePolicyForNavigationAction):
(WebKit::WebInspectorProxy::createInspectorPageForTest):
* UIProcess/WebInspectorProxy.h:
* UIProcess/WebInspectorProxy.messages.in:
* UIProcess/efl/WebInspectorProxyEfl.cpp:
(WebKit::WebInspectorProxy::inspectorTestPageURL):
* UIProcess/gtk/WebInspectorProxyGtk.cpp:
(WebKit::WebInspectorProxy::inspectorTestPageURL):
* UIProcess/ios/WebInspectorProxyIOS.mm:
(WebKit::WebInspectorProxy::inspectorTestPageURL):
* UIProcess/mac/WebInspectorProxyMac.mm:
(WebKit::WebInspectorProxy::inspectorTestPageURL):
* WebProcess/WebCoreSupport/WebInspectorClient.cpp:
(WebKit::WebInspectorClient::openInspectorFrontend):
* WebProcess/WebPage/WebInspector.cpp: Some drive-by nullptr refactorings.
(WebKit::WebInspector::WebInspector):
(WebKit::WebInspector::createInspectorPage):
(WebKit::WebInspector::createInspectorPageForTest):
(WebKit::WebInspector::destroyInspectorPage):
* WebProcess/WebPage/WebInspector.h:
2014-02-27 Anders Carlsson <andersca@apple.com>
Make WebProcessProxy::pages() return an IteratorRange
https://bugs.webkit.org/show_bug.cgi?id=129440
Reviewed by Dan Bernstein.
* UIProcess/API/C/WKPage.cpp:
(WKPageCopyRelatedPages):
Move the implementation of WebPageProxy::relatedPages here.
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createNewWebProcessRespectingProcessCountLimit):
Use std::min_element here instead of a manual loop.
* UIProcess/WebPageProxy.cpp:
Remove WebPageProxy::relatedPages().
* UIProcess/WebProcessProxy.cpp:
Remove WebProcessProxy::pages().
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::pages):
Make this return an IteratorRange.
(WebKit::WebProcessProxy::pageCount):
New function that returns the page count.
2014-02-27 Alexey Proskuryakov <ap@apple.com>
[Mac][WK2] Remove hardcoded Cmd+B and Cmd+I from WKView.mm
https://bugs.webkit.org/show_bug.cgi?id=129436
Reviewed by Darin Adler.
* UIProcess/API/mac/WKView.mm: Removed a historic WebKit1 behavior that we don't
need to preserve in WebKit2.
2014-02-27 Alexey Proskuryakov <ap@apple.com>
[Mac] Remove unused SPI declarations from WKView.mm
https://bugs.webkit.org/show_bug.cgi?id=129434
Reviewed by Sam Weinig.
* UIProcess/API/mac/WKView.mm:
2014-02-26 Michael Saboff <msaboff@apple.com>
Auto generate bytecode information for bytecode parser and LLInt
https://bugs.webkit.org/show_bug.cgi?id=129181
Reviewed by Mark Lam.
Added ${DERIVED_SOURCES_JAVASCRIPTCORE_DIR} to WebKit2_INCLUDE_DIRECTORIES due to new
generated Bytecodes.h include file.
* CMakeLists.txt:
2014-02-27 Anders Carlsson <andersca@apple.com>
Look up already existing VisitedLinkTableController objects by identifier
https://bugs.webkit.org/show_bug.cgi?id=129431
Reviewed by Dan Bernstein.
* WebProcess/WebPage/VisitedLinkTableController.cpp:
(WebKit::visitedLinkTableControllers):
(WebKit::VisitedLinkTableController::getOrCreate):
(WebKit::VisitedLinkTableController::VisitedLinkTableController):
(WebKit::VisitedLinkTableController::~VisitedLinkTableController):
* WebProcess/WebPage/VisitedLinkTableController.h:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2014-02-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK][WK2] Blocks when fetching plugins information
https://bugs.webkit.org/show_bug.cgi?id=115650
Reviewed by Gustavo Noronha Silva.
Use a persistent cache to store the plugins metadata to avoid
having to load all the plugins everytime a plugin is used for the
first time.
* GNUmakefile.am:
* GNUmakefile.list.am:
* PlatformGTK.cmake:
* Shared/Plugins/Netscape/NetscapePluginModule.h:
* Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp:
(WebKit::NetscapePluginModule::parseMIMEDescription): Make this
method public.
(WebKit::NetscapePluginModule::buildMIMEDescription): Added this
helper to build the MIME description string.
* UIProcess/Plugins/gtk/PluginInfoCache.cpp: Added.
(WebKit::PluginInfoCache::shared):
(WebKit::PluginInfoCache::PluginInfoCache):
(WebKit::PluginInfoCache::~PluginInfoCache):
(WebKit::PluginInfoCache::saveToFileIdleCallback):
(WebKit::PluginInfoCache::saveToFile):
(WebKit::PluginInfoCache::getPluginInfo):
(WebKit::PluginInfoCache::updatePluginInfo):
* UIProcess/Plugins/gtk/PluginInfoCache.h: Added.
* UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp:
(WebKit::PluginInfoStore::getPluginInfo): Check first if we have
metadata of the plugin in the cache and update the cache if we
loaded the plugin to get its metadata.
2014-02-27 Ryan Lortie <desrt@desrt.ca>
need to #include <libgen.h> for basename
https://bugs.webkit.org/show_bug.cgi?id=128597
Reviewed by Carlos Garcia Campos.
* PluginProcess/unix/PluginProcessMainUnix.cpp: include <libgen.h> as required by POSIX for basename
2014-02-27 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Web Inspector doesn't work with network process enabled
https://bugs.webkit.org/show_bug.cgi?id=127651
Reviewed by Sergio Villar Senin.
The problem is that the web inspector loads so many resources,
that when using the network process, a lot of IPC traffic is
generated causing the send buffer of the socket to be full. When
that happens sendmsg() fails with EAGAIN, because we are using non
blocking sockets, and we are not handling neither EAGAIN nor
EWOULDBLOCK errors (we do when reading from the socket, though).
* Platform/IPC/unix/ConnectionUnix.cpp:
(IPC::Connection::readyReadHandler): Add a log message to know
when reading from the socket fails for any unhandled error.
(IPC::Connection::sendOutgoingMessage): Handle EAGAIN and
EWOULDBLOCK errors to try again in those cases. Also add a log
message for unhandled errors.
2014-02-26 Philippe Normand <pnormand@igalia.com>
Unreviewed GTK build fix after r164751.
* GNUmakefile.list.am:
2014-02-26 Dan Bernstein <mitz@apple.com>
iOS build fix.
* UIProcess/ios/forms/WKFormPopover.h:
* UIProcess/ios/forms/WKFormPopover.mm:
2014-02-26 Dan Bernstein <mitz@apple.com>
Replaced use of the EXCLUDED_SOURCE_FILE_NAMES build setting with #if PLATFORM(…) guards in
the files themselves.
Rubber-stamped by Sam Weinig.
* Configurations/WebKit2.xcconfig: Cleared out EXCLUDED_SOURCE_FILE_NAMES_macosx, and left
EXCLUDED_SOURCE_FILE_NAMES_iphoneos containing just the names of resources the should be
excluded from Copy Files build phases.
* NetworkProcess/ios/NetworkProcessIOS.mm:
* NetworkProcess/mac/NetworkProcessMac.mm:
* Shared/Downloads/ios/DownloadIOS.mm:
* Shared/Downloads/mac/DownloadMac.mm:
* Shared/NativeWebTouchEvent.h:
* Shared/WebPlatformTouchPoint.cpp:
* Shared/WebTouchEvent.cpp:
* Shared/ios/NativeWebKeyboardEventIOS.mm:
* Shared/ios/NativeWebTouchEventIOS.mm:
* Shared/ios/WebIOSEventFactory.h:
* Shared/ios/WebIOSEventFactory.mm:
* Shared/mac/PasteboardTypes.h:
* Shared/mac/PasteboardTypes.mm:
* Shared/mac/PrintInfoMac.mm:
* UIProcess/API/C/WKInspector.cpp:
* UIProcess/API/Cocoa/WKThumbnailView.h:
* UIProcess/API/Cocoa/WKThumbnailView.mm:
* UIProcess/API/Cocoa/WKThumbnailViewInternal.h:
* UIProcess/API/ios/WKViewIOS.mm:
* UIProcess/API/mac/WKView.mm:
* UIProcess/Plugins/mac/PluginInfoStoreMac.mm:
* UIProcess/ios/PageClientImplIOS.h:
* UIProcess/ios/PageClientImplIOS.mm:
* UIProcess/ios/TextCheckerIOS.mm:
* UIProcess/ios/ViewGestureControllerIOS.mm:
* UIProcess/ios/WKActionSheet.h:
* UIProcess/ios/WKActionSheet.mm:
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
* UIProcess/ios/WKContentView.mm:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
* UIProcess/ios/WKGeolocationProviderIOS.h:
* UIProcess/ios/WKGeolocationProviderIOS.mm:
* UIProcess/ios/WKGeolocationProviderIOSObjCSecurityOrigin.mm:
* UIProcess/ios/WKScrollView.h:
* UIProcess/ios/WKScrollView.mm:
* UIProcess/ios/WebInspectorProxyIOS.mm:
* UIProcess/ios/WebPageProxyIOS.mm:
* UIProcess/ios/WebProcessProxyIOS.mm:
* UIProcess/ios/forms/WKFormInputControl.h:
* UIProcess/ios/forms/WKFormInputControl.mm:
* UIProcess/ios/forms/WKFormPopover.h:
* UIProcess/ios/forms/WKFormPopover.mm:
* UIProcess/mac/FindIndicatorWindow.h:
* UIProcess/mac/FindIndicatorWindow.mm:
* UIProcess/mac/PageClientImpl.h:
* UIProcess/mac/PageClientImpl.mm:
* UIProcess/mac/TextCheckerMac.mm:
* UIProcess/mac/WKFullKeyboardAccessWatcher.h:
* UIProcess/mac/WKFullKeyboardAccessWatcher.mm:
* UIProcess/mac/WKPrintingView.h:
* UIProcess/mac/WKPrintingView.mm:
* UIProcess/mac/WebContextMenuProxyMac.h:
* UIProcess/mac/WebContextMenuProxyMac.mm:
* UIProcess/mac/WebInspectorProxyMac.mm:
* UIProcess/mac/WebPageProxyMac.mm:
* UIProcess/mac/WebProcessProxyMac.mm:
* WebProcess/WebCoreSupport/WebChromeClient.h:
* WebProcess/WebCoreSupport/ios/WebChromeClientIOS.mm:
* WebProcess/WebCoreSupport/ios/WebDatabaseManagerIOS.mm:
* WebProcess/WebCoreSupport/ios/WebEditorClientIOS.mm:
* WebProcess/WebCoreSupport/ios/WebFrameLoaderClientIOS.mm:
* WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm:
* WebProcess/WebPage/ios/WebBackForwardListProxyIOS.mm:
* WebProcess/WebPage/ios/WebPageIOS.mm:
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.h:
* WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm:
* WebProcess/WebPage/mac/WebPageMac.mm:
2014-02-26 Anders Carlsson <andersca@apple.com>
VisitedLinkProvider should know which pages it belongs to
https://bugs.webkit.org/show_bug.cgi?id=129410
Reviewed by Dan Bernstein.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::~VisitedLinkProvider):
(WebKit::VisitedLinkProvider::addPage):
(WebKit::VisitedLinkProvider::removePage):
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::close):
2014-02-26 Enrica Casucci <enrica@apple.com>
Build fix.
Unexpected line break.
* Configurations/WebKit2.xcconfig:
2014-02-26 Enrica Casucci <enrica@apple.com>
Build fix.
WKFormInputControl.mm and WKFormPopover.mm should be excluded from OS X builds.
* Configurations/WebKit2.xcconfig:
2014-02-26 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] Form controls handling: implement date and time controls.
https://bugs.webkit.org/show_bug.cgi?id=129344
Reviewed by Simon Fraser and Joseph Pecoraro.
This is another step in the implementation of form controls on iOS
for WebKit2. This adds support for date and time input elements supporting
the different look and feel for iPhone and iPad.
WKDateTimePicker implements iPhone UI and
WKDateTimePopover implements iPad UI.
WKFormRotatingAccessoryPopover and WKRotatingPopover are
classes that implement the popover object handling the rotation
and they will be used as base class for the select controls as well.
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _displayFormNodeInputView]):
(-[WKContentView inputView]):
(-[WKContentView _startAssistingNode:]):
(-[WKContentView _stopAssistingNode]):
* UIProcess/ios/WKFormInputControl.h: Added.
* UIProcess/ios/WKFormInputControl.mm: Added.
(-[WKDateTimePicker datePicker]):
(-[WKDateTimePicker initWithView:datePickerMode:]):
(-[WKDateTimePicker dealloc]):
(-[WKDateTimePicker controlView]):
(-[WKDateTimePicker _timeZoneOffsetFromGMT:]):
(-[WKDateTimePicker _sanitizeInputValueForFormatter:]):
(-[WKDateTimePicker _dateChangedSetAsNumber]):
(-[WKDateTimePicker _dateChangedSetAsString]):
(-[WKDateTimePicker _dateChanged]):
(-[WKDateTimePicker _dateChangeHandler:]):
(-[WKDateTimePicker controlBeginEditing]):
(-[WKDateTimePicker controlEndEditing]):
(-[WKFormInputControl initWithView:]):
(+[WKFormInputControl createPeripheralWithView:]):
(-[WKFormInputControl beginEditing]):
(-[WKFormInputControl endEditing]):
(-[WKFormInputControl assistantView]):
(-[WKDateTimePopoverViewController initWithView:datePickerMode:]):
(-[WKDateTimePopoverViewController innerControl]):
(-[WKDateTimePopoverViewController loadView]):
(-[WKDateTimePopover clear:]):
(-[WKDateTimePopover initWithView:datePickerMode:]):
(-[WKDateTimePopover viewController]):
(-[WKDateTimePopover controlBeginEditing]):
(-[WKDateTimePopover controlEndEditing]):
(-[WKDateTimePopover controlView]):
* UIProcess/ios/WKFormPeripheral.h: Added.
* UIProcess/ios/WKFormPopover.h: Added.
* UIProcess/ios/WKFormPopover.mm: Added.
(-[WKFormRotatingAccessoryPopover initWithView:]):
(-[WKFormRotatingAccessoryPopover accessoryDone]):
(-[WKFormRotatingAccessoryPopover popoverArrowDirections]):
(-[WKFormRotatingAccessoryPopover popoverWasDismissed:]):
(-[WKRotatingPopover initWithView:]):
(-[WKRotatingPopover dealloc]):
(-[WKRotatingPopover popoverController]):
(-[WKRotatingPopover setPopoverController:]):
(-[WKRotatingPopover popoverArrowDirections]):
(-[WKRotatingPopover presentPopoverAnimated:]):
(-[WKRotatingPopover dismissPopoverAnimated:]):
(-[WKRotatingPopover willRotate:]):
(-[WKRotatingPopover didRotate:]):
(-[WKRotatingPopover popoverControllerDidDismissPopover:]):
* UIProcess/ios/WKFormSelectControl.h: Added.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::setAssistedNodeValue):
(WebKit::WebPageProxy::setAssistedNodeValueAsNumber):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::setAssistedNodeValue):
(WebKit::WebPage::setAssistedNodeValueAsNumber):
2014-02-26 Pratik Solanki <psolanki@apple.com>
[iOS][Webkit2] Enable codesigning entitlement for web process
https://bugs.webkit.org/show_bug.cgi?id=129401
<rdar://problem/16173873>
Reviewed by Geoffrey Garen.
* Configurations/WebContent-iOS.entitlements:
2014-02-26 Anders Carlsson <andersca@apple.com>
Give VisitedLinkProviders an identifier and send them to the web process
https://bugs.webkit.org/show_bug.cgi?id=129400
Reviewed by Dan Bernstein.
* Shared/WebPageCreationParameters.cpp:
(WebKit::WebPageCreationParameters::encode):
(WebKit::WebPageCreationParameters::decode):
* Shared/WebPageCreationParameters.h:
* UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h:
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::generateIdentifier):
(WebKit::VisitedLinkProvider::VisitedLinkProvider):
* UIProcess/VisitedLinkProvider.h:
(WebKit::VisitedLinkProvider::identifier):
* UIProcess/WebContext.cpp:
(WebKit::WebContext::createWebPage):
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::WebPageProxy):
(WebKit::WebPageProxy::internalShowContextMenu):
* UIProcess/WebPageProxy.h:
2014-02-26 Jinwoo Song <jinwoo7.song@samsung.com>
Unreviewed CMAKE build fix after r164751.
* CMakeLists.txt: Renamed WebVisitedLinkProvider.cpp to VisitedLinkTableController.cpp.
2014-02-26 Anders Carlsson <andersca@apple.com>
Rename WebVisitedLinkProvider to VisitedLinkTableController
https://bugs.webkit.org/show_bug.cgi?id=129396
Reviewed by Dan Bernstein.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/VisitedLinkTableController.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/WebVisitedLinkProvider.cpp.
(WebKit::VisitedLinkTableController::create):
(WebKit::VisitedLinkTableController::VisitedLinkTableController):
(WebKit::VisitedLinkTableController::~VisitedLinkTableController):
(WebKit::VisitedLinkTableController::isLinkVisited):
(WebKit::VisitedLinkTableController::addVisitedLink):
* WebProcess/WebPage/VisitedLinkTableController.h: Renamed from Source/WebKit2/WebProcess/WebPage/WebVisitedLinkProvider.h.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
2014-02-26 Enrica Casucci <enrica@apple.com>
Keyboard keeps showing up when clicking links after being shown once.
https://bugs.webkit.org/show_bug.cgi?id=129392
Reviewed by Benjamin Poulain.
This is a regression introduced by http://trac.webkit.org/changeset/164690.
_requiresKeyboardWhenFirstResponder should always return NO, if there is
no assisted node.
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView _requiresKeyboardWhenFirstResponder]):
2014-02-26 Myles C. Maxfield <mmaxfield@apple.com>
WebProcessProxy::updateProcessState() is causing duplicate symbol linker errors
https://bugs.webkit.org/show_bug.cgi?id=129390
Reviewed by Tim Horton.
Caused by r164737. WebProcessProxy::updateProcessState() is defined in a header, outside of
a class, but isn't inlined.
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::updateProcessState):
2014-02-26 Brian Burg <bburg@apple.com>
Web Replay: route through UserInputBridge when delivering user inputs to WebCore
https://bugs.webkit.org/show_bug.cgi?id=128150
Reviewed by Timothy Hatcher.
When delivering user inputs to WebCore, route calls through the page's UserInputBridge.
This allows us to capture and replay user inputs from WebKit2 solely within WebCore.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::tryClose):
(WebKit::WebPage::loadRequest):
(WebKit::WebPage::stopLoadingFrame):
(WebKit::WebPage::stopLoading):
(WebKit::WebPage::reload):
(WebKit::WebPage::contextMenuAtPointInWindow):
(WebKit::handleContextMenuEvent):
(WebKit::handleMouseEvent):
(WebKit::handleWheelEvent):
(WebKit::handleKeyEvent):
(WebKit::WebPage::scroll):
(WebKit::WebPage::logicalScroll):
2014-02-26 Pratik Solanki <psolanki@apple.com>
[iOS][WebKit2] Adopt SPI for managing tabs
https://bugs.webkit.org/show_bug.cgi?id=129188
<rdar://problem/15939827>
Reviewed by Gavin Barraclough.
Call into assertions SPI to mark tabs as foreground and background.
* Configurations/WebKit2.xcconfig:
* Platform/IPC/Connection.h:
(IPC::Connection::xpcConnection): Expose the xpc_connection_t.
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::viewStateDidChange):
* UIProcess/WebProcessProxy.cpp:
(WebKit::WebProcessProxy::didFinishLaunching):
* UIProcess/WebProcessProxy.h:
(WebKit::WebProcessProxy::updateProcessState):
* UIProcess/ios/WebProcessProxyIOS.mm:
(WebKit::WebProcessProxy::updateProcessState): Added. This goes through the list of
WebPageProxies and sets the process state to foreground if one of them is in a window.
Otherwise, it sets it to background.
2014-02-26 Commit Queue <commit-queue@webkit.org>
Unreviewed, rolling out r164725 and r164731.
http://trac.webkit.org/changeset/164725
http://trac.webkit.org/changeset/164731
https://bugs.webkit.org/show_bug.cgi?id=129382
WebKitTestRunner build is broken on IOS (Requested by smfr on
#webkit).
* UIProcess/API/Cocoa/WKView.h:
* UIProcess/API/ios/WKViewIOS.mm: Added.
(-[WKView initWithCoder:]):
(-[WKView initWithFrame:processGroup:browsingContextGroup:]):
(-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]):
(-[WKView dealloc]):
(-[WKView setFrame:]):
(-[WKView setBounds:]):
(-[WKView scrollView]):
(-[WKView browsingContextController]):
(-[WKView setAllowsBackForwardNavigationGestures:]):
(-[WKView allowsBackForwardNavigationGestures]):
(-[WKView viewForZoomingInScrollView:]):
(-[WKView scrollViewWillBeginZooming:withView:]):
(-[WKView scrollViewWillBeginDragging:]):
(-[WKView _didFinishScrolling]):
(-[WKView scrollViewDidEndDragging:willDecelerate:]):
(-[WKView scrollViewDidEndDecelerating:]):
(-[WKView scrollViewDidScrollToTop:]):
(-[WKView scrollViewDidScroll:]):
(-[WKView scrollViewDidZoom:]):
(-[WKView scrollViewDidEndZooming:withView:atScale:]):
(-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]):
(-[WKView _frameOrBoundsChanged]):
(-[WKView _updateVisibleContentRects]):
(-[WKView _keyboardChangedWithInfo:adjustScrollView:]):
(-[WKView _keyboardWillChangeFrame:]):
(-[WKView _keyboardDidChangeFrame:]):
(-[WKView _keyboardWillShow:]):
(-[WKView _keyboardWillHide:]):
(-[WKView pageRef]):
(-[WKView initWithFrame:contextRef:pageGroupRef:]):
(-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]):
(-[WKView minimumLayoutSizeOverride]):
(-[WKView setMinimumLayoutSizeOverride:]):
(-[WKView _obscuredInsets]):
(-[WKView _setObscuredInsets:]):
(-[WKView _beginInteractiveObscuredInsetsChange]):
(-[WKView _endInteractiveObscuredInsetsChange]):
(-[WKView _pageExtendedBackgroundColor]):
(-[WKView _setBackgroundExtendsBeyondPage:]):
(-[WKView _backgroundExtendsBeyondPage]):
* WebKit2.xcodeproj/project.pbxproj:
2014-02-26 Simon Fraser <simon.fraser@apple.com>
Build fix: ContextMenuContextData.* should not be in the Copy Files
phase.
* WebKit2.xcodeproj/project.pbxproj:
2014-02-26 Simon Fraser <simon.fraser@apple.com>
Fix MiniBrowser/WebKitTestRunner link errors; WKView still
needs to be exported while these tools are using it.
* UIProcess/API/Cocoa/WKView.h:
2014-02-26 Simon Fraser <simon.fraser@apple.com>
Fix the iOS build by wrapping some context menu stuff in #if ENABLE(CONTEXT_MENUS)
* UIProcess/WebPageProxy.h:
2014-02-26 Martin Hock <mhock@apple.com>
Create SessionID value-style class for session IDs.
https://bugs.webkit.org/show_bug.cgi?id=129141
The below changes deal solely with mechanical changes to use the SessionID value class instead of uint64_t except where noted.
Reviewed by Sam Weinig.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::storageSession):
(WebKit::NetworkConnectionToWebProcess::startDownload):
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
(WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
(WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
(WebKit::NetworkConnectionToWebProcess::getRawCookies):
(WebKit::NetworkConnectionToWebProcess::deleteCookie):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::ensurePrivateBrowsingSession):
(WebKit::NetworkProcess::destroyPrivateBrowsingSession):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/RemoteNetworkingContext.h:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
* Shared/Network/NetworkResourceLoadParameters.h:
* Shared/SessionTracker.cpp:
(WebKit::staticSessionMap):
(WebKit::storageSessionToID):
(WebKit::SessionTracker::sessionMap):
(WebKit::SessionTracker::session):
(WebKit::SessionTracker::sessionID):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
* Shared/SessionTracker.h: Move code to SessionID class.
* Shared/WebCoreArgumentCoders.cpp: Add encode and decode for SessionID.
(IPC::ArgumentCoder<SessionID>::encode):
(IPC::ArgumentCoder<SessionID>::decode):
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/CookieStorageShim.mm:
(WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
* UIProcess/APISession.cpp:
(API::generateID):
(API::Session::defaultSession):
(API::Session::legacyPrivateSession):
(API::Session::Session):
(API::Session::isEphemeral):
(API::Session::getID):
* UIProcess/APISession.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
(WebKit::WebContext::createNewWebProcess):
* UIProcess/WebContext.h:
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::sessionID):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::storageSession):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::storageSession):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
* WebProcess/WebPage/WebPage.cpp: Move sessionID to Page to allow WebCore to access it.
(WebKit::WebPage::WebPage):
(WebKit::WebPage::sessionID):
(WebKit::WebPage::isUsingEphemeralSession):
(WebKit::WebPage::setSessionID):
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensurePrivateBrowsingSession):
(WebKit::WebProcess::destroyPrivateBrowsingSession):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2014-02-26 Anders Carlsson <andersca@apple.com>
Get rid of WKViewIOS.mm
https://bugs.webkit.org/show_bug.cgi?id=129378
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKView.h:
* UIProcess/API/ios/WKViewIOS.mm: Removed.
* WebKit2.xcodeproj/project.pbxproj:
2014-02-26 Alexey Proskuryakov <ap@apple.com>
[iOS] Remove some erroneously captured blocks
https://bugs.webkit.org/show_bug.cgi?id=129362
Reviewed by Sam Weinig.
Remove unused captured Objective-C block variables (capturing these doesn't work anyway).
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
2014-02-26 Brady Eidson <beidson@apple.com>
Pipe experimental image controls menu up to WebKit2
https://bugs.webkit.org/show_bug.cgi?id=129339
Reviewed by Simon Fraser.
Add a WebKit object to represent the data from a ContextMenuContext object that can be shared via IPC:
* Shared/ContextMenuContextData.cpp: Added.
(WebKit::ContextMenuContextData::ContextMenuContextData):
(WebKit::ContextMenuContextData::encode):
(WebKit::ContextMenuContextData::decode):
* Shared/ContextMenuContextData.h: Added.
(WebKit::ContextMenuContextData::webHitTestResultData):
(WebKit::ContextMenuContextData::isImageControl):
Update the rest of WK2 to use this object instead of WebHitTestResult::Data directly:
* UIProcess/WebPageProxy.cpp:
(WebKit::WebPageProxy::showContextMenu):
(WebKit::WebPageProxy::internalShowContextMenu): Also make an ENABLE(IMAGE_CONTROLS) change here.
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* WebProcess/WebPage/WebContextMenu.cpp:
(WebKit::WebContextMenu::show):
* CMakeLists.txt:
* GNUmakefile.list.am:
* WebKit2.xcodeproj/project.pbxproj:
2014-02-26 Enrique Ocaña González <eocanha@igalia.com>
WebKitFindOptions shouldn't expose WEBKIT_FIND_OPTIONS_SHOW_{OVERLAY,FIND_INDICATOR,HIGHLIGHT}
https://bugs.webkit.org/show_bug.cgi?id=129263
Reviewed by Sergio Villar Senin.
Avoided the need of WEBKIT_FIND_OPTIONS_SHOW_* fields by changing the semantics
of the findOptions field in WebKitFindOptions.
* UIProcess/API/gtk/WebKitFindController.cpp: Now
_WebKitFindControllerPrivate.findOptions is interpreted as WebKit::FindOptions
instead of WebKitFindOptions like before. Now the conversion has to be done in
both ways.
(toWebKitFindOptions): Added conversion function from WebKit::FindOptions to
WebKitFindOptions.
(webkit_find_controller_get_options):
(webKitFindControllerPerform):
(webkit_find_controller_search):
(webkit_find_controller_search_next):
(webkit_find_controller_search_previous):
(webkit_find_controller_count_matches):
* UIProcess/API/gtk/WebKitFindController.h: Removed values that shouldn't be
exposed.
2014-02-26 Gergo Balogh <gbalogh.u-szeged@partner.samsung.com>
Inspector server should be enabled only when the web sockets is enabled too.
https://bugs.webkit.org/show_bug.cgi?id=129304
Reviewed by Csaba Osztrogonác.
* config.h:
2014-02-26 Carlos Garcia Campos <cgarcia@igalia.com>
Unreviewed. Fix GTK+ build after r164702.
* UIProcess/DrawingAreaProxy.cpp:
2014-02-26 Martin Robinson <mrobinson@igalia.com>
[GTK] generate-gtkdoc can fail with WebKit1 or WebKit2 only builds
https://bugs.webkit.org/show_bug.cgi?id=129319
Reviewed by Carlos Garcia Campos.
* GNUmakefile.am: Do not generate the documentation configuration file if the port
is disabled.
2014-02-25 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Split the rects/scale updates in 3 internally consistent groups
https://bugs.webkit.org/show_bug.cgi?id=129354
Reviewed by Sam Weinig.
During scaling, the scale and rect of UIScrollView, WebPageProxy, DrawingAreaProxy,
DrawingArea and WebPage were in completely inconsistent states.
Some of those disconnect were temporary (like when setting the rect and scale in two different
messages), some were lasting the time of a tile update (like the UIProcess view of the scale).
This was causing various visual glitches.
To fix this, all the updates from the UIProcess are funneled through a single path and the values
are split into 3 different groups/types.
When updating the scale/rects, the UIProcess sends the new information to the WebProcess on a queue
through ViewUpdateDispatcher. There, the updates are accumulated until the MainThread is available.
Once the main thread is "unblocked" from the previous frame, all the data are updated at once from
the last known state in ViewUpdateDispatcher. The new tiles are created for the new converage information
and they are sent to the UIProcess.
At any point, there are 3 types of scale and rects used for different purpose:
-In the UIProcess, there is the UIScrollView scale and rects which represent the "true" state or what
is currently on screen.
That information is mirrored into WebPageProxy for the other classes needing it like DrawingAreaProxy.
-In the WebProcess, there is the last known state. That state is always lagging a little behind the "true"
state.
-Back in the UIProcess, we have the tile states that is attached to RemoteLayerTreeTransaction. It is used
to setup the rendering.
With this change, there are two paths for updating the page scale factor:
-The UI drives the change, the updates goes WKWebView->WKContentView->WebPageProxy->ViewUpdateDispatcher
->WebPage->RemoteLayerTreeDrawingArea->RemoteLayerTreeDrawingAreaProxy->WKContentView->WKWebView.
-If changes in the content force scaling parameters, the updates goes: WebPage->RemoteLayerTreeDrawingArea
->RemoteLayerTreeDrawingAreaProxy->WKContentView->WKWebView.
The two kind of updates frequently conflicts during loading. We differentiate those through the flag
scaleWasSetByUIProcess passed with the updates. In cases of conflicts, the user always wins.
* DerivedSources.make:
* Scripts/webkit2/messages.py:
(struct_or_class):
* Shared/VisibleContentRectUpdateInfo.cpp: Added.
(WebKit::VisibleContentRectUpdateInfo::encode):
(WebKit::VisibleContentRectUpdateInfo::decode):
* Shared/VisibleContentRectUpdateInfo.h: Added.
(WebKit::VisibleContentRectUpdateInfo::VisibleContentRectUpdateInfo):
(WebKit::VisibleContentRectUpdateInfo::exposedRect):
(WebKit::VisibleContentRectUpdateInfo::unobscuredRect):
(WebKit::VisibleContentRectUpdateInfo::scale):
(WebKit::operator==):
* Shared/mac/RemoteLayerTreeTransaction.h:
(WebKit::RemoteLayerTreeTransaction::scaleWasSetByUIProcess):
(WebKit::RemoteLayerTreeTransaction::setScaleWasSetByUIProcess):
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView contentView:didCommitLayerTree:WebKit::]):
(-[WKWebView _didFinishScrolling]):
(-[WKWebView scrollViewDidScroll:]):
(-[WKWebView scrollViewDidZoom:]):
(-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _updateVisibleContentRectsWithStableState:]):
(-[WKWebView _setObscuredInsets:]):
(-[WKWebView _endInteractiveObscuredInsetsChange]):
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _updateVisibleContentRects]):
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::setCustomFixedPositionRect):
* UIProcess/DrawingAreaProxy.h:
(WebKit::DrawingAreaProxy::updateDebugIndicator):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::displayedContentScale):
(WebKit::WebPageProxy::exposedContentRect):
(WebKit::WebPageProxy::unobscuredContentRect):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:inStableState:]):
(-[WKContentView didFinishScrolling]):
(-[WKContentView didZoomToScale:]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateVisibleContentRects):
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.h:
* UIProcess/mac/RemoteLayerTreeDrawingAreaProxy.mm:
(WebKit::RemoteLayerTreeDrawingAreaProxy::scaledExposedRect):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorLocation):
(WebKit::RemoteLayerTreeDrawingAreaProxy::indicatorScale):
(WebKit::RemoteLayerTreeDrawingAreaProxy::updateDebugIndicator):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/ViewUpdateDispatcher.cpp: Added.
(WebKit::ViewUpdateDispatcher::create):
(WebKit::ViewUpdateDispatcher::ViewUpdateDispatcher):
(WebKit::ViewUpdateDispatcher::~ViewUpdateDispatcher):
(WebKit::ViewUpdateDispatcher::initializeConnection):
(WebKit::ViewUpdateDispatcher::visibleContentRectUpdate):
(WebKit::ViewUpdateDispatcher::dispatchVisibleContentRectUpdate):
* WebProcess/WebPage/ViewUpdateDispatcher.h: Added.
* WebProcess/WebPage/ViewUpdateDispatcher.messages.in: Added.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
(WebKit::WebPage::scalePage):
* WebProcess/WebPage/WebPage.h:
(WebKit::WebPage::scaleWasSetByUIProcess):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::tapHighlightAtPosition):
(WebKit::WebPage::updateVisibleContentRects):
(WebKit::WebPage::willStartUserTriggeredZooming):
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):
(WebKit::WebProcess::initializeConnection):
* WebProcess/WebProcess.h:
2014-02-25 Anders Carlsson <andersca@apple.com>
Rename WebCore::VisitedLinkProvider to WebCore::VisitedLinkStore
https://bugs.webkit.org/show_bug.cgi?id=129357
Reviewed by Sam Weinig.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebVisitedLinkProvider.h:
2014-02-25 Enrica Casucci <enrica@apple.com>
[WebKit2] Form controls handling.
https://bugs.webkit.org/show_bug.cgi?id=129344
<rdar://problem/16053643>
Reviewed by Simon Fraser and Joseph Pecoraro.
This is the step toward adding support for
form controls iOS style. It adds the logic to
select the appropriate keyboard type based on the
element type and introduces the AssistedNodeInformation
structure used currently for the keyboard type selection
and that will be used to populate pickers and popovers.
It also provides information to enable/disable next/previous
buttons in the accessory view.
* Scripts/webkit2/messages.py:
(struct_or_class):
* Shared/AssistedNodeInformation.cpp: Added.
(WebKit::AssistedNodeInformation::encode):
(WebKit::AssistedNodeInformation::decode):
* Shared/AssistedNodeInformation.h: Added.
(WebKit::AssistedNodeInformation::AssistedNodeInformation):
* 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 _requiresKeyboardWhenFirstResponder]):
(-[WKContentView _updateAccessory]):
(toUITextAutocapitalize):
(-[WKContentView textInputTraits]):
(-[WKContentView assistedNodeInformation]):
(-[WKContentView _startAssistingNode:]):
(-[WKContentView _stopAssistingNode]):
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::startAssistingNode):
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::isAssistableNode):
(WebKit::hasFocusableNode):
(WebKit::WebPage::getAssistedNodeInformation):
(WebKit::WebPage::elementDidFocus):
2014-02-25 Anders Carlsson <andersca@apple.com>
VisitedLinkProvider should be refcounted
https://bugs.webkit.org/show_bug.cgi?id=129351
Reviewed by Sam Weinig.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::create):
(WebKit::VisitedLinkProvider::~VisitedLinkProvider):
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::processDidFinishLaunching):
(WebKit::WebContext::disconnectProcess):
(WebKit::WebContext::addVisitedLinkHash):
* UIProcess/WebContext.h:
2014-02-25 Anders Carlsson <andersca@apple.com>
Make WebContext handle populating visited links
https://bugs.webkit.org/show_bug.cgi?id=129348
Reviewed by Tim Horton.
This makes it possible to decouple VisitedLinkProvider from WebContext.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::VisitedLinkProvider):
(WebKit::VisitedLinkProvider::processDidFinishLaunching):
* UIProcess/VisitedLinkProvider.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::WebContext):
(WebKit::WebContext::processDidFinishLaunching):
* UIProcess/WebContext.h:
2014-02-25 Anders Carlsson <andersca@apple.com>
DrawingAreaProxy is using WebCore's Timer
https://bugs.webkit.org/show_bug.cgi?id=129347
<rdar://problem/16078133>
Reviewed by Tim Horton.
Use a RunLoop::Timer instead.
* UIProcess/DrawingAreaProxy.cpp:
(WebKit::DrawingAreaProxy::DrawingAreaProxy):
(WebKit::DrawingAreaProxy::exposedRectChangedTimerFired):
* UIProcess/DrawingAreaProxy.h:
2014-02-25 Anders Carlsson <andersca@apple.com>
Add WKVisitedLinkProvider
https://bugs.webkit.org/show_bug.cgi?id=129343
Reviewed by Sam Weinig.
* UIProcess/API/Cocoa/WKVisitedLinkProvider.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
* UIProcess/API/Cocoa/WKVisitedLinkProvider.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
* UIProcess/API/Cocoa/WKVisitedLinkProviderInternal.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
* UIProcess/API/Cocoa/WKVisitedLinkProviderPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKWebViewConfiguration.h.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration visitedLinkProvider]):
(-[WKWebViewConfiguration setVisitedLinkProvider:]):
* WebKit2.xcodeproj/project.pbxproj:
2014-02-25 Anders Carlsson <andersca@apple.com>
Simplify visited link style invalidation
https://bugs.webkit.org/show_bug.cgi?id=129340
Reviewed by Dan Bernstein.
* UIProcess/VisitedLinkProvider.cpp:
(WebKit::VisitedLinkProvider::addVisitedLink):
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::visitedLinkStateChanged):
(WebKit::WebProcess::allVisitedLinkStateChanged):
2014-02-25 Anders Carlsson <andersca@apple.com>
Fix build.
Remove VisitedLinkStrategy.
* NetworkProcess/NetworkProcessPlatformStrategies.cpp:
* NetworkProcess/NetworkProcessPlatformStrategies.h:
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
* WebProcess/WebCoreSupport/WebPlatformStrategies.h:
2014-02-25 Alexey Proskuryakov <ap@apple.com>
Rolling out http://trac.webkit.org/changeset/164611, because it broke
WebKit2.PrivateBrowsingPushStateNoHistoryCallback API test
The change was for:
https://bugs.webkit.org/show_bug.cgi?id=129141
Create SessionID class
2014-02-25 Dan Bernstein <mitz@apple.com>
[Cocoa] Add delegate method for customizing actions on activated elements
https://bugs.webkit.org/show_bug.cgi?id=129290
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKUIDelegatePrivate.h: Added. Declared new delegate method.
* UIProcess/API/Cocoa/_WKActivatedElementInfo.h:
(_WKActivatedElementType): Defined enum of element types.
* UIProcess/API/Cocoa/_WKActivatedElementInfo.mm:
(-[_WKActivatedElementInfo _initWithType:URL:location:title:rect:]): Added type parameter
to the initializer, used to set the new type property.
* UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h:
* UIProcess/Cocoa/UIClient.h:
* UIProcess/Cocoa/UIClient.mm:
(WebKit::UIClient::setDelegate): Initialize webViewActionsForElementDefaultActions member
of m_delegateMethods.
(WebKit::UIClient::actionsForElement): Added. Calls out to the new delegate method if
implemented. Otherwise returns the default actions.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]): Use new _elementInfo ivar
instead of creating element info here.
(-[WKActionSheetAssistant showImageSheet]): Create element info here and assign it to
_elementInfo ivar if presenting a sheet. Call the UI client to get custom actions.
(-[WKActionSheetAssistant showLinkSheet]): Ditto.
(-[WKActionSheetAssistant cleanupSheet]): Clear _elementInfo ivar.
* WebKit2.xcodeproj/project.pbxproj: Added reference to WKUIDelegatePrivate.h.
2014-02-25 Michał Pakuła vel Rutka <m.pakula@samsung.com>
Unreviewed EFL build fix attempt after r164562
* CMakeLists.txt: Added WebVisitedLinkProvider.cpp.
2014-02-25 Sergio Villar Senin <svillar@igalia.com>
[CSS Grid Layout] Add ENABLE flag
https://bugs.webkit.org/show_bug.cgi?id=129153
Reviewed by Simon Fraser.
Added ENABLE_CSS_GRID_LAYOUT feature flag.
* Configurations/FeatureDefines.xcconfig:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::updatePreferences):
2014-02-25 Zan Dobersek <zdobersek@igalia.com>
Unreviewed GTK build fix after r164652.
* GNUmakefile.list.am: Add WebVisitedLinkProvider build targets.
2014-02-24 Anders Carlsson <andersca@apple.com>
Make it possible to set the visited link provider on a per page basis
https://bugs.webkit.org/show_bug.cgi?id=129288
Reviewed by Andreas Kling.
Add WebVisitedLinkProvider which just calls the web process.
* WebKit2.xcodeproj/project.pbxproj:
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::WebPage):
* WebProcess/WebPage/WebVisitedLinkProvider.cpp: Added.
(WebKit::WebVisitedLinkProvider::create):
(WebKit::WebVisitedLinkProvider::WebVisitedLinkProvider):
(WebKit::WebVisitedLinkProvider::~WebVisitedLinkProvider):
(WebKit::WebVisitedLinkProvider::isLinkVisited):
(WebKit::WebVisitedLinkProvider::addVisitedLink):
* WebProcess/WebPage/WebVisitedLinkProvider.h: Added.
2014-02-25 Dan Bernstein <mitz@apple.com>
Build fix for case-sensitive filesystems.
* WebProcess/ios/WebVideoFullscreenManager.cpp:
2014-02-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Mark view source mode methods as deprecated
https://bugs.webkit.org/show_bug.cgi?id=128920
Reviewed by Martin Robinson.
Mark WEBKIT_VIEW_MODE_SOURCE as deprecated in documentation and
only show warnings when set_view_mode is used with WEBKIT_VIEW_MODE_SOURCE.
* UIProcess/API/gtk/WebKitWebView.cpp:
(webkit_web_view_set_view_mode):
(webkit_web_view_get_view_mode):
* UIProcess/API/gtk/WebKitWebView.h:
2014-02-24 Alexey Proskuryakov <ap@apple.com>
[Mac] Stop looking for plug-in profiles in /S/L/Sandbox/Profiles
https://bugs.webkit.org/show_bug.cgi?id=129262
<rdar://problem/16149420>
Reviewed by Sam Weinig.
Remove unused code.
* Shared/Plugins/mac/PluginSandboxProfile.mm:
(WebKit::pluginSandboxProfileDirectory):
(WebKit::pluginSandboxCommonProfile):
(WebKit::pluginSandboxProfile):
(WebKit::pluginHasSandboxProfile):
2014-02-24 Martin Robinson <mrobinson@igalia.com>
[GTK] generate-gtkdoc should not generate documentation for source files for unbuilt source files
https://bugs.webkit.org/show_bug.cgi?id=128417
Reviewed by Carlos Garcia Campos.
* GNUmakefile.am: Generate a config file for generate-gtkdoc.
* PlatformGTK.cmake: Ditto.
2014-02-24 Dan Bernstein <mitz@apple.com>
32-bit build fix.
* UIProcess/API/Cocoa/_WKElementAction.mm:
(+[_WKElementAction elementActionWithType:customTitle:]):
2014-02-24 Dan Bernstein <mitz@apple.com>
[Cocoa] Start adding API for customizing actions on activated elements
https://bugs.webkit.org/show_bug.cgi?id=129284
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/_WKActivatedElementInfo.h: Added. Includes the public interface of what
was WKElementActionInfo.
* UIProcess/API/Cocoa/_WKActivatedElementInfo.m: Added.
(-[_WKActivatedElementInfo _initWithURL:location:title:rect:]): Moved and renamed internal
initializer from WKElementActionInfo.
(-[_WKActivatedElementInfo dealloc]): Moved from WKElementActionInfo.
(-[_WKActivatedElementInfo _boundingRect]): Added private accessor.
(-[_WKActivatedElementInfo _interactionLocation]): Ditto.
* UIProcess/API/Cocoa/_WKActivatedElementInfoInternal.h: Added.
* UIProcess/API/Cocoa/_WKElementAction.h: Added.
(_WKElementActionType): Moved from WKActionSheet.h and turned into a proper NS_ENUM.
* UIProcess/API/Cocoa/_WKElementAction.mm: Added.
(-[_WKElementAction _initWithTitle:actionHandler:type:]): Moved and renamed internal
initializer from WKActionSheet.mm.
(-[_WKElementAction dealloc]): Moved from WKActionSheet.mm.
(+[_WKElementAction elementActionWithTitle:actionHandler:]): Moved and renamed.
(copyElement): Moved from WKActionSheet.mm.
(saveImage): Ditto.
(addToReadingList): Ditto.
(+[_WKElementAction elementActionWithType:customTitle:]): Moved and renamed.
(+[_WKElementAction elementActionWithType:]): Ditto.
(-[_WKElementAction _runActionWithElementInfo:view:]): Moved from WKActionSheet.mm.
* UIProcess/API/Cocoa/WKElementActionInternal.h: Added.
* UIProcess/ios/WKActionSheet.h: Removed declarations that were moved elsewhere.
* UIProcess/ios/WKActionSheet.mm: Removed code that was moved elsewhere.
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]):
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):
* WebKit2.xcodeproj/project.pbxproj: Added references to new files. Changed the Objective-C
class name check to allow _WK as a class name prefix.
2014-02-24 Simon Fraser <simon.fraser@apple.com>
Use RetainPtrs for two WKContentView data members
https://bugs.webkit.org/show_bug.cgi?id=129276
Reviewed by Benjamin Poulain.
The UITextInputTraits were leaked. Fix with RetainPtr goodness.
Rename the obscure _accessory to _formAccessoryView and
make it a RetainPtr.
Rearrange the data members of the WKContentView class extension
for better packing and readability.
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentViewInteraction.h:
* UIProcess/ios/WKContentViewInteraction.mm:
(-[WKContentView cleanupInteraction]):
(-[WKContentView inputAccessoryView]):
(-[WKContentView _updateAccessory]):
(-[WKContentView textInputTraits]):
2014-02-24 Simon Fraser <simon.fraser@apple.com>
Remove WKInteractionView, move code into WKContentView
https://bugs.webkit.org/show_bug.cgi?id=129275
Reviewed by Benjamin Poulain.
WKInteractionView as an interim solution as WebKit2 on iOS was being
brought up, and should be removed.
Move its code into a category on WKContentView, mostly unchanged. The
WKContentView (WKInteraction) categroy now implements the various protocols
that WKInteractionView implemented.
WKContentView is not an API class, so no longer has WK_API_CLASS, and can
have implementation-related data members. WKContentViewInternal.h is removed.
WKContentView now exposes a WebPageProxy* rather than a WKPageRef.
Other changes: WKActionSheetAssistant no longer stores a WebPageProxy,
getting it from the WKContentView instead.
WKAutoCorrectionData and InteractionInformationAtPosition are stored via unique_ptr
to reduce class size, and avoid having to expose their details in the header.
* Configurations/WebKit2.xcconfig:
* UIProcess/API/Cocoa/WKWebViewInternal.h:
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView setAllowsBackForwardNavigationGestures:]):
(-[WKView pageRef]):
(-[WKView _pageExtendedBackgroundColor]):
(-[WKView _setBackgroundExtendsBeyondPage:]):
(-[WKView _backgroundExtendsBeyondPage]):
* UIProcess/ios/PageClientImplIOS.mm:
* UIProcess/ios/WKActionSheet.h:
* UIProcess/ios/WKActionSheet.mm:
(-[WKActionSheet initWithView:]):
(+[WKElementAction customElementActionWithTitle:actionHandler:]):
(copyElement):
(saveImage):
(+[WKElementAction standardElementActionWithType:customTitle:]):
(-[WKElementAction runActionWithElementInfo:view:]):
* UIProcess/ios/WKActionSheetAssistant.h:
* UIProcess/ios/WKActionSheetAssistant.mm:
(-[WKActionSheetAssistant initWithView:]):
(-[WKActionSheetAssistant dealloc]):
(-[WKActionSheetAssistant initialPresentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant presentationRectInHostViewForSheet]):
(-[WKActionSheetAssistant actionSheet:clickedButtonAtIndex:]):
(-[WKActionSheetAssistant _createSheetWithElementActions:showLinkTitle:]):
(-[WKActionSheetAssistant showImageSheet]):
(-[WKActionSheetAssistant showLinkSheet]):
(-[WKActionSheetAssistant showDataDetectorsSheet]):
(-[WKActionSheetAssistant cleanupSheet]):
* UIProcess/ios/WKContentView.h:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView initWithFrame:context:WebKit::configuration:WebKit::]):
(-[WKContentView dealloc]):
(-[WKContentView page]):
(-[WKContentView isAssistingNode]):
(-[WKContentView didFinishScrolling]):
(-[WKContentView willStartZoomOrScroll]):
(-[WKContentView willStartUserTriggeredScroll]):
(-[WKContentView willStartUserTriggeredZoom]):
(-[WKContentView didZoomToScale:]):
(-[WKContentView _didCommitLoadForMainFrame]):
(-[WKContentView _didCommitLayerTree:WebKit::]):
* UIProcess/ios/WKContentViewInteraction.h: Renamed from Source/WebKit2/UIProcess/ios/WKInteractionView.h.
* UIProcess/ios/WKContentViewInteraction.mm: Renamed from Source/WebKit2/UIProcess/ios/WKInteractionView.mm.
(-[WKContentView setupInteraction]):
(-[WKContentView cleanupInteraction]):
(-[WKContentView positionInformation]):
(-[WKContentView setInputDelegate:]):
(-[WKContentView inputDelegate]):
(-[WKContentView isEditable]):
(-[WKContentView canBecomeFirstResponder]):
(-[WKContentView resignFirstResponder]):
(-[WKContentView _webTouchEventsRecognized:]):
(inflateQuad):
(-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
(-[WKContentView _didGetTapHighlightForRequest:color:WebCore::quads:WebCore::topLeftRadius:WebCore::topRightRadius:WebCore::bottomLeftRadius:WebCore::bottomRightRadius:WebCore::]):
(-[WKContentView _cancelLongPressGestureRecognizer]):
(-[WKContentView _didScroll]):
(-[WKContentView _requiresKeyboardResetOnReload]):
(-[WKContentView gestureRecognizer:canPreventGestureRecognizer:]):
(-[WKContentView gestureRecognizer:canBePreventedByGestureRecognizer:]):
(isSamePair):
(-[WKContentView gestureRecognizer:shouldRecognizeSimultaneouslyWithGestureRecognizer:]):
(-[WKContentView _showImageSheet]):
(-[WKContentView _showLinkSheet]):
(-[WKContentView _showDataDetectorsSheet]):
(-[WKContentView _actionForLongPress]):
(-[WKContentView ensurePositionInformationIsUpToDate:]):
(-[WKContentView _updatePositionInformation]):
(-[WKContentView gestureRecognizerShouldBegin:]):
(-[WKContentView _cancelInteraction]):
(-[WKContentView hasSelectablePositionAtPoint:]):
(-[WKContentView pointIsInAssistedNode:]):
(-[WKContentView webSelectionRects]):
(-[WKContentView _highlightLongPressRecognized:]):
(-[WKContentView _longPressRecognized:]):
(-[WKContentView _singleTapRecognized:]):
(-[WKContentView _doubleTapRecognized:]):
(-[WKContentView _twoFingerDoubleTapRecognized:]):
(-[WKContentView _twoFingerPanRecognized:]):
(-[WKContentView _attemptClickAtLocation:]):
(-[WKContentView useSelectionAssistantWithMode:]):
(-[WKContentView clearSelection]):
(-[WKContentView _positionInformationDidChange:]):
(-[WKContentView _willStartScrollingOrZooming]):
(-[WKContentView _willStartUserTriggeredScrollingOrZooming]):
(-[WKContentView _didEndScrollingOrZooming]):
(-[WKContentView inputAccessoryView]):
(-[WKContentView supportedPasteboardTypesForCurrentSelection]):
(-[WKContentView _addShortcut:]):
(-[WKContentView _promptForReplace:]):
(-[WKContentView replace:]):
(-[WKContentView canPerformAction:withSender:]):
(-[WKContentView _resetShowingTextStyle:]):
(-[WKContentView _performAction:]):
(-[WKContentView copy:]):
(-[WKContentView cut:]):
(-[WKContentView paste:]):
(-[WKContentView select:]):
(-[WKContentView selectAll:]):
(-[WKContentView toggleBoldface:]):
(-[WKContentView toggleItalics:]):
(-[WKContentView toggleUnderline:]):
(-[WKContentView _showTextStyleOptions:]):
(-[WKContentView _showDictionary:]):
(-[WKContentView _define:]):
(toWKGestureType):
(toUIWKGestureType):
(toWKSelectionTouch):
(toUIWKSelectionTouch):
(toWKGestureRecognizerState):
(toUIGestureRecognizerState):
(toUIWKSelectionFlags):
(toWKHandlePosition):
(selectionChangedWithGesture):
(selectionChangedWithTouch):
(-[WKContentView _didUpdateBlockSelectionWithTouch:WebKit::withFlags:WebKit::growThreshold:shrinkThreshold:]):
(-[WKContentView changeSelectionWithGestureAt:withGesture:withState:]):
(-[WKContentView changeSelectionWithTouchAt:withSelectionTouch:baseIsStart:]):
(-[WKContentView changeSelectionWithTouchesFrom:to:withGesture:withState:]):
(-[WKContentView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
(-[WKContentView autocorrectionData]):
(-[WKContentView requestAutocorrectionRectsForString:withCompletionHandler:]):
(-[WKContentView textFirstRect]):
(-[WKContentView textLastRect]):
(-[WKContentView applyAutocorrection:toString:withCompletionHandler:]):
(-[WKContentView requestAutocorrectionContextWithCompletionHandler:]):
(-[WKContentView accessoryDone]):
(-[WKContentView accessoryTab:]):
(-[WKContentView accessoryAutoFill]):
(-[WKContentView accessoryClear]):
(-[WKContentView _updateAccessory]):
(-[WKContentView textInRange:]):
(-[WKContentView replaceRange:withText:]):
(-[WKContentView selectedTextRange]):
(-[WKContentView caretRectForPosition:]):
(-[WKContentView selectionRectsForRange:]):
(-[WKContentView setSelectedTextRange:]):
(-[WKContentView hasMarkedText]):
(-[WKContentView markedText]):
(-[WKContentView markedTextRange]):
(-[WKContentView markedTextStyle]):
(-[WKContentView setMarkedTextStyle:]):
(-[WKContentView setMarkedText:selectedRange:]):
(-[WKContentView unmarkText]):
(-[WKContentView beginningOfDocument]):
(-[WKContentView endOfDocument]):
(-[WKContentView textRangeFromPosition:toPosition:]):
(-[WKContentView positionFromPosition:offset:]):
(-[WKContentView positionFromPosition:inDirection:offset:]):
(-[WKContentView comparePosition:toPosition:]):
(-[WKContentView offsetFromPosition:toPosition:]):
(-[WKContentView tokenizer]):
(-[WKContentView positionWithinRange:farthestInDirection:]):
(-[WKContentView characterRangeByExtendingPosition:inDirection:]):
(-[WKContentView baseWritingDirectionForPosition:inDirection:]):
(-[WKContentView setBaseWritingDirection:forRange:]):
(-[WKContentView firstRectForRange:]):
(-[WKContentView closestPositionToPoint:]):
(-[WKContentView closestPositionToPoint:withinRange:]):
(-[WKContentView characterRangeAtPoint:]):
(-[WKContentView deleteBackward]):
(-[WKContentView insertText:]):
(-[WKContentView hasText]):
(-[WKContentView textInputTraits]):
(-[WKContentView interactionAssistant]):
(-[WKContentView webSelectionAssistant]):
(-[WKContentView selectionRange]):
(-[WKContentView rectForNSRange:]):
(-[WKContentView _markedTextNSRange]):
(-[WKContentView selectedDOMRange]):
(-[WKContentView setSelectedDOMRange:affinityDownstream:]):
(-[WKContentView replaceRangeWithTextWithoutClosingTyping:replacementText:]):
(-[WKContentView rectContainingCaretSelection]):
(-[WKContentView requiresKeyEvents]):
(-[WKContentView handleKeyWebEvent:]):
(-[WKContentView _interpretKeyEvent:isCharEvent:]):
(-[WKContentView setBottomBufferHeight:]):
(-[WKContentView automaticallySelectedOverlay]):
(-[WKContentView selectionGranularity]):
(-[WKContentView insertDictationResult:withCorrectionIdentifier:]):
(-[WKContentView metadataDictionariesForDictationResults]):
(-[WKContentView previousUnperturbedDictationResultBoundaryFromPosition:]):
(-[WKContentView nextUnperturbedDictationResultBoundaryFromPosition:]):
(-[WKContentView moveBackward:]):
(-[WKContentView moveForward:]):
(-[WKContentView characterBeforeCaretSelection]):
(-[WKContentView wordContainingCaretSelection]):
(-[WKContentView wordRangeContainingCaretSelection]):
(-[WKContentView setMarkedText:]):
(-[WKContentView hasContent]):
(-[WKContentView selectAll]):
(-[WKContentView textColorForCaretSelection]):
(-[WKContentView fontForCaretSelection]):
(-[WKContentView hasSelection]):
(-[WKContentView isPosition:atBoundary:inDirection:]):
(-[WKContentView positionFromPosition:toBoundary:inDirection:]):
(-[WKContentView isPosition:withinTextUnit:inDirection:]):
(-[WKContentView rangeEnclosingPosition:withGranularity:inDirection:]):
(-[WKContentView takeTraitsFrom:]):
(-[WKContentView _startAssistingKeyboard]):
(-[WKContentView _stopAssistingKeyboard]):
(-[WKContentView _startAssistingNode]):
(-[WKContentView _stopAssistingNode]):
(-[WKContentView _selectionChanged]):
(-[WKContentView shouldIgnoreWebTouch]):
(-[WKContentView isAnyTouchOverActiveArea:]):
(-[WKTextRange _isCaret]):
(-[WKTextRange _isRanged]):
(+[WKTextRange textRangeWithState:isRange:isEditable:startRect:endRect:selectionRects:selectedTextLength:]):
(-[WKTextRange dealloc]):
(-[WKTextRange description]):
(-[WKTextRange start]):
(-[WKTextRange end]):
(-[WKTextRange isEmpty]):
(-[WKTextRange isEqual:]):
(+[WKTextPosition textPositionWithRect:]):
(-[WKTextPosition isEqual:]):
(-[WKTextPosition description]):
(-[WKTextSelectionRect initWithWebRect:]):
(-[WKTextSelectionRect dealloc]):
(+[WKTextSelectionRect textSelectionRectsWithWebRects:]):
(-[WKTextSelectionRect rect]):
(-[WKTextSelectionRect writingDirection]):
(-[WKTextSelectionRect range]):
(-[WKTextSelectionRect containsStart]):
(-[WKTextSelectionRect containsEnd]):
(-[WKTextSelectionRect isVertical]):
(+[WKAutocorrectionRects autocorrectionRectsWithRects:lastRect:]):
(+[WKAutocorrectionContext autocorrectionContextWithData:markedText:selectedText:afterText:selectedRangeInMarkedText:]):
(-[WKAutocorrectionContext dealloc]):
* UIProcess/ios/WKContentViewInternal.h: Removed.
* WebKit2.xcodeproj/project.pbxproj:
2014-02-24 Anders Carlsson <andersca@apple.com>
WKProcessPool should use secondary processes + network process
https://bugs.webkit.org/show_bug.cgi?id=129282
Reviewed by Simon Fraser.
* UIProcess/API/Cocoa/WKProcessPool.mm:
(-[WKProcessPool initWithConfiguration:]):
2014-02-24 Jeremy Jones <jeremyj@apple.com>
WK2 AVKit fullscreen doesn't display video.
https://bugs.webkit.org/show_bug.cgi?id=128564
Reviewed by Simon Fraser.
* Shared/mac/RemoteLayerTreeTransaction.h:
Add a property to track video layer pending fullscreen.
(WebKit::RemoteLayerTreeTransaction::isVideoLayerIDPendingFullscreen):
(WebKit::RemoteLayerTreeTransaction::addVideoLayerIDPendingFullscreen):
Add a property to track video layer pending fullscreen.
* Shared/mac/RemoteLayerTreeTransaction.mm:
(WebKit::RemoteLayerTreeTransaction::encode):
(WebKit::RemoteLayerTreeTransaction::decode):
Encode and decode m_videoLayerIDsPendingFullscreen.
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::didCommitLayerTree):
Let WebVideoFullscreenManagerProxy see the RemoteLayerTreeTransaction.
* UIProcess/ios/WebVideoFullscreenManagerProxy.cpp:
(WebKit::WebVideoFullscreenManagerProxy::didCommitLayerTree):
Look for video layer pending fullscreen on the transaction to initiate
fullscreen.
(WebKit::WebVideoFullscreenManagerProxy::setVideoLayerID):
Start looking for the video layer pending fullscreen in the transaction.
(WebKit::WebVideoFullscreenManagerProxy::enterFullscreen):
Override to prevent fullscreen from happening before the layer
is pending fullscreen.
* UIProcess/ios/WebVideoFullscreenManagerProxy.h:
* UIProcess/ios/WebVideoFullscreenManagerProxy.messages.in:
Pass a more specific videoLayerID in SetVideoLayerID,
i.e. WebCore::GraphicsLayer::PlatformLayerID.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::willCommitLayerTree):
Move webPage specific transaction building here, including,
giving WebVideoFullscreenManager a chance to modify the transaction.
* WebProcess/WebPage/WebPage.h:
Add willCommitLayerTree();
* WebProcess/WebPage/mac/PlatformCALayerRemoteCustom.mm:
(PlatformCALayerRemoteCustom::PlatformCALayerRemoteCustom):
(PlatformCALayerRemoteCustom::~PlatformCALayerRemoteCustom):
Make and break the connection from CALayer to PlatformCALayerRemoteCustom,
the same way it is done for PlatformCALayerMac.
* WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm:
(WebKit::RemoteLayerTreeDrawingArea::flushLayers):
Move WebPage specific transaction building into WebPage::willCommitLayerTree.
* WebProcess/ios/WebVideoFullscreenManager.cpp:
(WebKit::WebVideoFullscreenManager::willCommitLayerTree):
addVideoLayerIDPendingFullscreen on RemoteLayerTreeTransaction when needed.
(WebKit::WebVideoFullscreenManager::setVideoLayer):
Pass along the video layerID.
* WebProcess/ios/WebVideoFullscreenManager.h:
Add willCommitLayerTree() and remove setVideoLayerID().
Add a member to retain the unparented PlatformCALayer.
2014-02-24 Martin Hock <mhock@apple.com>
Create SessionID value-style class for session IDs.
https://bugs.webkit.org/show_bug.cgi?id=129141
The below changes deal solely with mechanical changes to use the SessionID value class instead of uint64_t except where noted.
Reviewed by Brady Eidson.
* NetworkProcess/NetworkConnectionToWebProcess.cpp:
(WebKit::storageSession):
(WebKit::NetworkConnectionToWebProcess::startDownload):
(WebKit::NetworkConnectionToWebProcess::cookiesForDOM):
(WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM):
(WebKit::NetworkConnectionToWebProcess::cookiesEnabled):
(WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue):
(WebKit::NetworkConnectionToWebProcess::getRawCookies):
(WebKit::NetworkConnectionToWebProcess::deleteCookie):
* NetworkProcess/NetworkConnectionToWebProcess.h:
* NetworkProcess/NetworkConnectionToWebProcess.messages.in:
* NetworkProcess/NetworkProcess.cpp:
(WebKit::NetworkProcess::initializeNetworkProcess):
(WebKit::NetworkProcess::ensurePrivateBrowsingSession):
(WebKit::NetworkProcess::destroyPrivateBrowsingSession):
* NetworkProcess/NetworkProcess.h:
* NetworkProcess/NetworkProcess.messages.in:
* NetworkProcess/NetworkResourceLoader.h:
* NetworkProcess/RemoteNetworkingContext.h:
* NetworkProcess/mac/RemoteNetworkingContext.mm:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* NetworkProcess/soup/RemoteNetworkingContextSoup.cpp:
(WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession):
* Shared/Network/NetworkResourceLoadParameters.cpp:
(WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters):
* Shared/Network/NetworkResourceLoadParameters.h:
* Shared/SessionTracker.cpp:
(WebKit::staticSessionMap):
(WebKit::storageSessionToID):
(WebKit::SessionTracker::sessionMap):
(WebKit::SessionTracker::session):
(WebKit::SessionTracker::sessionID):
(WebKit::SessionTracker::setSession):
(WebKit::SessionTracker::destroySession):
* Shared/SessionTracker.h: Move code to SessionID class.
* Shared/WebCoreArgumentCoders.cpp: Add encode and decode for SessionID.
(IPC::ArgumentCoder<SessionID>::encode):
(IPC::ArgumentCoder<SessionID>::decode):
* Shared/WebCoreArgumentCoders.h:
* Shared/mac/CookieStorageShim.mm:
(WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL):
* UIProcess/APISession.cpp:
(API::generateID):
(API::Session::defaultSession):
(API::Session::legacyPrivateSession):
(API::Session::Session):
(API::Session::isEphemeral):
(API::Session::getID):
* UIProcess/APISession.h:
* UIProcess/WebContext.cpp:
(WebKit::WebContext::setAnyPageGroupMightHavePrivateBrowsingEnabled):
(WebKit::WebContext::createNewWebProcess):
* UIProcess/WebContext.h:
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::sessionID):
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::setPrivateBrowsingEnabled):
* WebProcess/Network/WebResourceLoadScheduler.cpp:
(WebKit::WebResourceLoadScheduler::scheduleLoad):
* WebProcess/WebCoreSupport/WebPlatformStrategies.cpp:
(WebKit::WebPlatformStrategies::loadResourceSynchronously):
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h:
* WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::storageSession):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp:
(WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession):
(WebKit::WebFrameNetworkingContext::storageSession):
* WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h:
* WebProcess/WebPage/WebPage.cpp: Move sessionID to Page to allow WebCore to access it.
(WebKit::WebPage::WebPage):
(WebKit::WebPage::sessionID):
(WebKit::WebPage::isUsingEphemeralSession):
(WebKit::WebPage::setSessionID):
(WebKit::WebPage::updatePreferences):
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::ensurePrivateBrowsingSession):
(WebKit::WebProcess::destroyPrivateBrowsingSession):
* WebProcess/WebProcess.h:
* WebProcess/WebProcess.messages.in:
2014-02-24 Simon Fraser <simon.fraser@apple.com>
Remove PDFViewController.*, which is unused
https://bugs.webkit.org/show_bug.cgi?id=129270
Reviewed by Tim Horton.
* UIProcess/mac/PDFViewController.h: Removed.
* UIProcess/mac/PDFViewController.mm: Removed.
2014-02-24 Anders Carlsson <andersca@apple.com>
Rename WKProcessClass to WKProcessPool
https://bugs.webkit.org/show_bug.cgi?id=129268
Reviewed by Dan Bernstein.
Stage this rename by adding back WKProcessClass and WKProcessClassConfiguration as subclasses of the renamed classes.
* Shared/Cocoa/APIObject.mm:
(API::Object::newObject):
* UIProcess/API/Cocoa/WKProcessClass.h:
* UIProcess/API/Cocoa/WKProcessClass.mm:
* UIProcess/API/Cocoa/WKProcessClassConfiguration.h:
* UIProcess/API/Cocoa/WKProcessClassConfiguration.mm:
* UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h:
* UIProcess/API/Cocoa/WKProcessClassPrivate.h:
* UIProcess/API/Cocoa/WKProcessPool.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.h.
* UIProcess/API/Cocoa/WKProcessPool.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClass.mm.
(-[WKProcessPool init]):
(-[WKProcessPool initWithConfiguration:]):
(-[WKProcessPool dealloc]):
(-[WKProcessPool description]):
(-[WKProcessPool configuration]):
(-[WKProcessPool API::]):
(-[WKProcessPool _setAllowsSpecificHTTPSCertificate:forHost:]):
* UIProcess/API/Cocoa/WKProcessPoolConfiguration.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfiguration.h.
* UIProcess/API/Cocoa/WKProcessPoolConfiguration.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfiguration.mm.
(-[WKProcessPoolConfiguration _injectedBundleURL]):
(-[WKProcessPoolConfiguration _setInjectedBundleURL:]):
(-[WKProcessPoolConfiguration description]):
(-[WKProcessPoolConfiguration copyWithZone:]):
* UIProcess/API/Cocoa/WKProcessPoolConfigurationPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassConfigurationPrivate.h.
* UIProcess/API/Cocoa/WKProcessPoolInternal.h: Renamed from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassInternal.h.
(WebKit::wrapper):
* UIProcess/API/Cocoa/WKProcessPoolPrivate.h: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassPrivate.h.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
* UIProcess/API/Cocoa/WKWebViewConfiguration.h:
* UIProcess/API/Cocoa/WKWebViewConfiguration.mm:
(-[WKWebViewConfiguration description]):
(-[WKWebViewConfiguration copyWithZone:]):
(-[WKWebViewConfiguration processPool]):
(-[WKWebViewConfiguration setProcessPool:]):
* UIProcess/API/Cocoa/WKWebViewConfigurationToBeRemoved.mm: Copied from Source/WebKit2/UIProcess/API/Cocoa/WKProcessClassPrivate.h.
(-[WKWebViewConfiguration setProcessClass:]):
(-[WKWebViewConfiguration processClass]):
* UIProcess/API/mac/WKView.mm:
* UIProcess/ios/WKContentView.mm:
(-[WKContentView _decidePolicyForGeolocationRequestFromOrigin:frame:request:]):
* WebKit2.xcodeproj/project.pbxproj:
2014-02-24 Simon Fraser <simon.fraser@apple.com>
Move non-API files out of WebKit2/UIProcess/API/mac
https://bugs.webkit.org/show_bug.cgi?id=129267
Reviewed by Anders Carlsson.
* UIProcess/mac/FindIndicatorWindow.h: Renamed from Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.h.
* UIProcess/mac/FindIndicatorWindow.mm: Renamed from Source/WebKit2/UIProcess/API/mac/FindIndicatorWindow.mm.
* UIProcess/mac/PDFViewController.h: Renamed from Source/WebKit2/UIProcess/API/mac/PDFViewController.h.
* UIProcess/mac/PDFViewController.mm: Renamed from Source/WebKit2/UIProcess/API/mac/PDFViewController.mm.
* UIProcess/mac/WKPrintingView.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKPrintingView.h.
* UIProcess/mac/WKPrintingView.mm: Renamed from Source/WebKit2/UIProcess/API/mac/WKPrintingView.mm.
* UIProcess/mac/WKTextInputWindowController.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.h.
* UIProcess/mac/WKTextInputWindowController.mm: Renamed from Source/WebKit2/UIProcess/API/mac/WKTextInputWindowController.mm.
* WebKit2.xcodeproj/project.pbxproj:
2014-02-24 Simon Fraser <simon.fraser@apple.com>
Move non-API files in the API/ios directory out to UIProcess/ios
https://bugs.webkit.org/show_bug.cgi?id=129264
Reviewed by Anders Carlsson.
* UIProcess/ios/PageClientImplIOS.h: Renamed from Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.h.
* UIProcess/ios/PageClientImplIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/PageClientImplIOS.mm.
* UIProcess/ios/WKActionSheet.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKActionSheet.h.
* UIProcess/ios/WKActionSheet.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKActionSheet.mm.
* UIProcess/ios/WKContentViewInternal.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKContentViewInternal.h.
* UIProcess/ios/WKGeolocationProviderIOS.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.h.
* UIProcess/ios/WKGeolocationProviderIOS.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKGeolocationProviderIOS.mm.
* UIProcess/ios/WKInteractionView.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKInteractionView.h.
* UIProcess/ios/WKInteractionView.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKInteractionView.mm.
* UIProcess/ios/WKScrollView.h: Renamed from Source/WebKit2/UIProcess/API/ios/WKScrollView.h.
* UIProcess/ios/WKScrollView.mm: Renamed from Source/WebKit2/UIProcess/API/ios/WKScrollView.mm.
* WebKit2.xcodeproj/project.pbxproj:
2014-02-24 Simon Fraser <simon.fraser@apple.com>
Rename PageClientImplIOS::m_view to m_contentView
https://bugs.webkit.org/show_bug.cgi?id=129124
Reviewed by Benjamin Poulain.
Simple rename of m_view to m_contentView in preparation for
also holding onto the WKView.
* UIProcess/API/ios/PageClientImplIOS.h:
* UIProcess/API/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::PageClientImpl):
(WebKit::PageClientImpl::createDrawingAreaProxy):
(WebKit::PageClientImpl::viewSize):
(WebKit::PageClientImpl::isViewInWindow):
(WebKit::PageClientImpl::processDidExit):
(WebKit::PageClientImpl::didRelaunchProcess):
(WebKit::PageClientImpl::decidePolicyForGeolocationPermissionRequest):
(WebKit::PageClientImpl::didCommitLoadForMainFrame):
(WebKit::PageClientImpl::interpretKeyEvent):
(WebKit::PageClientImpl::positionInformationDidChange):
(WebKit::PageClientImpl::selectionDidChange):
(WebKit::PageClientImpl::screenToRootView):
(WebKit::PageClientImpl::rootViewToScreen):
(WebKit::PageClientImpl::setAcceleratedCompositingRootLayer):
(WebKit::PageClientImpl::takeViewSnapshot):
(WebKit::PageClientImpl::didGetTapHighlightGeometries):
(WebKit::PageClientImpl::didCommitLayerTree):
(WebKit::PageClientImpl::startAssistingNode):
(WebKit::PageClientImpl::stopAssistingNode):
2014-02-24 Enrique Ocaña González <eocanha@igalia.com>
REGRESSION(r164438): [GTK] Tests /webkit2/WebKitWebView/tls-errors-policy and /webkit2/WebKitWebContext/uri-scheme fail
https://bugs.webkit.org/show_bug.cgi?id=129252
Reviewed by Carlos Garcia Campos.
* UIProcess/API/gtk/WebKitPrivate.cpp: Manage error values generated by the user application and not present in WebCore
(toWebKitError):
(toWebCoreError):
2014-02-24 Alexey Proskuryakov <ap@apple.com>
<rdar://problem/16059894> Update AppleConnect sandbox profile for XPC process names.
Patch by Ivan Krstić, reviewed and landed by me.
* Resources/PlugInSandboxProfiles/com.apple.ist.ds.appleconnect.webplugin.sb:
2014-02-24 Tamas Gergely <tgergely.u-szeged@partner.samsung.com>
Code cleanup: remove leftover ENABLE(WORKERS) macros and support.
https://bugs.webkit.org/show_bug.cgi?id=129255
Reviewed by Csaba Osztrogonác.
ENABLE_WORKERS macro was removed in r159679.
Support is now also removed from xcconfig files.
* Configurations/FeatureDefines.xcconfig:
2014-02-24 Iago Toral Quiroga <itoral@igalia.com>
[GTK] Wrong active context when destroying GL objects.
https://bugs.webkit.org/show_bug.cgi?id=129244
Reviewed by Martin Robinson.
* WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp:
(WebKit::LayerTreeHostGtk::invalidate): make context current before destroying GL objects.
2014-02-24 Koop Mast <kwm@FreeBSD.org>
Remove unused error.h header.
https://bugs.webkit.org/show_bug.cgi?id=126774
Reviewed by Anders Carlsson.
This header doesn't exists on FreeBSD. According to
https://www.gnu.org/software/gnulib/manual/html_node/error_002eh.html
the function that this header implements are not present in the file.
So there isn't any need for this header.
* NetworkProcess/unix/NetworkProcessMainUnix.cpp:
2014-02-24 David Kilzer <ddkilzer@apple.com>
Remove redundant setting in FeatureDefines.xcconfig
* Configurations/FeatureDefines.xcconfig:
2014-02-24 Carlos Garcia Campos <cgarcia@igalia.com>
[GTK] Remove unneeded method webkitWebViewBaseRequestExitFullScreen
https://bugs.webkit.org/show_bug.cgi?id=129245
Reviewed by Sergio Villar Senin.
* UIProcess/API/gtk/WebKitWebViewBase.cpp:
(webkitWebViewBaseKeyPressEvent): Call FullscreenManager::requestExitFullScreen() directly.
* UIProcess/API/gtk/WebKitWebViewBasePrivate.h:
2014-02-23 Dan Bernstein <mitz@apple.com>
<rdar://problem/16144508> [iOS] Some definitions of INSTALL_PATH don’t account for INSTALL_PATH_PREFIX
https://bugs.webkit.org/show_bug.cgi?id=129241
Reviewed by Mark Rowe.
* Configurations/Base.xcconfig: Define INSTALL_PATH here in terms of INSTALL_PATH_ACTUAL.
* Configurations/BaseLegacyProcess.xcconfig: Define only INSTALL_PATH_ACTUAL.
* Configurations/BaseTarget.xcconfig: Simplify the definition of
NORMAL_WEBKIT2_FRAMEWORKS_DIR, now that it shouldn’t include SDKROOT for the Simulator.
* Configurations/BaseXPCService.xcconfig: Define only INSTALL_PATH_ACTUAL.
* Configurations/WebKit2.xcconfig: Ditto.
2014-02-23 Sam Weinig <sam@webkit.org>
Update FeatureDefines.xcconfig
Rubber-stamped by Anders Carlsson.
* Configurations/FeatureDefines.xcconfig:
2014-02-23 Sam Weinig <sam@webkit.org>
[WebKit2] Add C-SPI to enable/disable telephone number detection
https://bugs.webkit.org/show_bug.cgi?id=129239
Reviewed by Dean Jackson.
* UIProcess/API/C/WKPreferences.cpp:
(WKPreferencesSetTelephoneNumberParsingEnabled):
(WKPreferencesGetTelephoneNumberParsingEnabled):
* UIProcess/API/C/WKPreferencesPrivate.h:
2014-02-23 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Change a url parameter type with URL in NavigatorContentUtils
https://bugs.webkit.org/show_bug.cgi?id=129202
Reviewed by Sam Weinig.
It would be good if we use *URL* for url parameters instead of using String.
Merge from blink. https://src.chromium.org/viewvc/blink?view=rev&revision=165458.
* WebProcess/WebCoreSupport/WebNavigatorContentUtilsClient.h:
(WebKit::WebNavigatorContentUtilsClient::isProtocolHandlerRegistered):
(WebKit::WebNavigatorContentUtilsClient::unregisterProtocolHandler):
2014-02-23 Sam Weinig <sam@webkit.org>
Move telephone number detection behind its own ENABLE macro
https://bugs.webkit.org/show_bug.cgi?id=129236
Reviewed by Dean Jackson.
* Configurations/FeatureDefines.xcconfig:
Add ENABLE_TELEPHONE_NUMBER_DETECTION.
2014-02-23 Diego Pino García <dpino@igalia.com>
[GTK] Fix build after Web Inspector code reorganization (r164543)
https://bugs.webkit.org/show_bug.cgi?id=129231
Reviewed by Dean Jackson.
* PlatformGTK.cmake:
Modify paths to Web Inspector code.
2014-02-22 Joseph Pecoraro <pecoraro@apple.com>
Remove some unreachable code (-Wunreachable-code)
https://bugs.webkit.org/show_bug.cgi?id=129220
Reviewed by Eric Carlson.
* WebProcess/InjectedBundle/API/c/WKBundleAPICast.h:
(WebKit::toAPI):
2014-02-22 Dan Bernstein <mitz@apple.com>
[Cocoa] WKUIDelegate.h is a project header
https://bugs.webkit.org/show_bug.cgi?id=129215
Reviewed by Anders Carlsson.
* WebKit2.xcodeproj/project.pbxproj: Make it a public header.
2014-02-22 Dan Bernstein <mitz@apple.com>
<rdar://problem/12500358> [Cocoa] Development variants of XPC services should not be installed in WebKit2.framework/XPCServices
https://bugs.webkit.org/show_bug.cgi?id=129197
Reviewed by Sam Weinig.
* Configurations/BaseXPCService.xcconfig: Made INSTALL_PATH vary based on
WK_XPC_SERVICE_VARIANT. For the Development variant, use an install path outside the
framework. Note that engineering builds using the build action continue to have the
Development variants copied into the framework by a script build phase.
* Configurations/DatabaseService.Development.xcconfig: Set WK_XPC_SERVICE_VARIANT.
* Configurations/DatabaseService.xcconfig: Ditto.
* Configurations/NetworkService.Development.xcconfig: Ditto.
* Configurations/NetworkService.xcconfig: Ditto.
* Configurations/PluginService.32.xcconfig: Ditto.
* Configurations/PluginService.64.xcconfig: Ditto.
* Configurations/PluginService.Development.xcconfig: Ditto.
* Configurations/WebContentService.Development.xcconfig: Ditto.
* Configurations/WebContentService.xcconfig: Ditto.
2014-02-21 Brent Fulgham <bfulgham@apple.com>
Extend media support for WebVTT sources
https://bugs.webkit.org/show_bug.cgi?id=129156
Reviewed by Eric Carlson.
* Configurations/FeatureDefines.xcconfig: Add new feature define for AVF_CAPTIONS
2014-02-21 Enrica Casucci <enrica@apple.com>
[iOS WebKit2] Keyboard appears every time a link is tapped after searching Google
<rdar://problem/16072563>.
Reviewed by Benjamin Poulain.
We need to stop assisting the node if we have
navigated to a different page.
* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView _didCommitLoadForMainFrame]):
2014-02-21 Dan Bernstein <mitz@apple.com>
Made WKWebView implement all WKContentViewDelegate methods.
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView takeViewSnapshotForContentView:]): Moved from WKViewIOS.mm.
* UIProcess/API/ios/WKContentView.h: Made all protocol methods required.
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView _commonInitializationWithContextRef:pageGroupRef:relatedToPage:]): Removed code
to set self as the delegate on the content view.
2014-02-21 Sam Weinig <sam@webkit.org>
<rdar://problem/16073882> Please add _AbandonCoalition key to plugin XPC service Info.plist
Reviewed by Anders Carlsson.
* PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist:
* PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist:
2014-02-21 Jeffrey Pfau <jpfau@apple.com>
[Mac] Cache callbacks for cache partitioning may be passed null
https://bugs.webkit.org/show_bug.cgi?id=129175
Reviewed by Brady Eidson.
* WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp:
(WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback):
2014-02-21 Benjamin Poulain <bpoulain@apple.com>
[iOS][WK2] Update the visible content rects on zoom
https://bugs.webkit.org/show_bug.cgi?id=129174
Reviewed by Simon Fraser.
Generalize _updateVisibleContentRects to also act during the zoom and not only at the end.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewDidZoom:]):
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView scrollViewDidZoom:]):
2014-02-21 Benjamin Poulain <benjamin@webkit.org>
jsDocumentPrototypeFunctionGetElementById should not create an AtomicString for the function argument
https://bugs.webkit.org/show_bug.cgi?id=128893
Reviewed by Darin Adler.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::pageNumberForElementById): Remove the explicit conversion to use the right overload.
2014-02-21 Enrica Casucci <enrica@apple.com>
Support WebSelections in WK2 on iOS.
https://bugs.webkit.org/show_bug.cgi?id=127015
<rdar://problem/15211964>
Reviewed by Benjamin Poulain.
This is the remaining work on block selections for iOS in WK2.
Once a block selection has been created with a long press gesture
on a selectable area, we can interact with it by touching the four
handles at the top, right, bottom and left side of the selection box.
Expanding or shrinking a block selection requires finding the next/previous
block in the direction of the movement, depending on the handle we
are interacting with.
Every time a new block is selected, we compute the thresholds required
to trigger another block change. The thresholds are sent back to the
UIProcess that will use this information to decide when to activate
the new selection, either bigger or smaller.
This patch also fixes a bug in selectWithTwoTouches where the points
were not mapped to the active frame.
* Shared/ios/WKGestureTypes.h:
* UIProcess/API/ios/PageClientImplIOS.h:
* UIProcess/API/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::didUpdateBlockSelectionWithTouches):
* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView _didUpdateBlockSelectionWithTouches:withFlags:growThreshold:shrinkThreshold:]):
* UIProcess/API/ios/WKContentViewInternal.h:
* UIProcess/API/ios/WKInteractionView.h:
* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView hasSelectablePositionAtPoint:]):
(-[WKInteractionView clearSelection]):
(toWKHandlePosition):
(-[WKInteractionView _didUpdateBlockSelectionWithTouches:WebKit::withFlags:WebKit::growThreshold:shrinkThreshold:]):
(-[WKInteractionView changeBlockSelectionWithTouchAt:withSelectionTouch:forHandle:]):
* UIProcess/PageClient.h:
* UIProcess/WebPageProxy.h:
* UIProcess/WebPageProxy.messages.in:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::updateBlockSelectionWithTouches):
(WebKit::WebPageProxy::didUpdateBlockSelectionWithTouches):
* WebProcess/WebPage/WebPage.cpp:
* WebProcess/WebPage/WebPage.h:
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::rangeForWebSelectionAtPosition):
(WebKit::WebPage::rangeForBlockAtPoint):
(WebKit::WebPage::selectWithGesture):
(WebKit::distanceBetweenRectsForPosition):
(WebKit::rectsEssentiallyTheSame):
(WebKit::containsRange):
(WebKit::unionDOMRanges):
(WebKit::computeEdgeCenter):
(WebKit::WebPage::expandedRangeFromHandle):
(WebKit::WebPage::contractedRangeFromHandle):
(WebKit::WebPage::computeExpandAndShrinkThresholdsForHandle):
(WebKit::shouldExpand):
(WebKit::WebPage::changeBlockSelection):
(WebKit::WebPage::updateBlockSelectionWithTouches):
(WebKit::WebPage::clearSelection):
(WebKit::WebPage::selectWithTwoTouches):
(WebKit::WebPage::getPositionInformation):
2014-02-21 Anders Carlsson <andersca@apple.com>
Make sure to invoke the completion handler for JS alerts
https://bugs.webkit.org/show_bug.cgi?id=129158
Reviewed by Alexey Proskuryakov.
* UIProcess/API/C/WKPage.cpp:
(WKPageSetPageUIClient):
2014-02-20 Zalan Bujtas <zalan@apple.com>
Remove redundant deviceScaleFactor() functions and make callers use Document::deviceScaleFactor() when accessible.
https://bugs.webkit.org/show_bug.cgi?id=129137
Reviewed by Simon Fraser.
No change in behavior.
* WebProcess/WebPage/FindController.cpp:
(WebKit::FindController::getFindIndicatorBitmapAndRect):
2014-02-20 Benjamin Poulain <bpoulain@apple.com>
Add a missing piece of r164469
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView scrollViewWillBeginDragging:]):
I forgot to duplicate the change from WKViewIOS in r164469.
2014-02-20 Benjamin Poulain <bpoulain@apple.com>
WKInteractionView always blocks the main thread when sending touch events
https://bugs.webkit.org/show_bug.cgi?id=129059
Reviewed by Enrica Casucci.
Add the asynchronous dispatching to WebKit2.
* Shared/NativeWebTouchEvent.h:
(WebKit::NativeWebTouchEvent::uniqueId):
* Shared/ios/NativeWebTouchEventIOS.mm:
(WebKit::NativeWebTouchEvent::NativeWebTouchEvent):
* UIProcess/API/ios/PageClientImplIOS.mm:
(WebKit::PageClientImpl::doneWithTouchEvent):
* UIProcess/API/ios/WKContentView.h:
* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView willStartUserTriggeredScroll]):
(-[WKContentView willStartUserTriggeredZoom]):
(-[WKContentView _webTouchEvent:WebKit::preventsNativeGestures:]):
* UIProcess/API/ios/WKContentViewInternal.h:
* UIProcess/API/ios/WKInteractionView.h:
* UIProcess/API/ios/WKInteractionView.mm:
(-[WKInteractionView _webTouchEventsRecognized:]):
(-[WKInteractionView _webTouchEvent:WebKit::preventsNativeGestures:]):
(-[WKInteractionView _willStartUserTriggeredScrollingOrZooming]):
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView scrollViewWillBeginDragging:]):
* WebKit2.xcodeproj/project.pbxproj:
2014-02-20 Benjamin Poulain <bpoulain@apple.com>
Start fixing the view states driven by the WKScrollView
https://bugs.webkit.org/show_bug.cgi?id=129140
Reviewed by Tim Horton and Simon Fraser.
WKScrollView creates a "window" over WKContentView with an area that is exposed,
an area that is unobcured and with a certain scale.
Instead of having 3 loosely related paths for updating WKContentView
when the content "window" change, everything is consolidated behind the
single API -[WKContentView didUpdateVisibleRect:unobscuredRect:scale:].
This patch only fixes the content updates from the UI process side to keep things simple.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView _didFinishScrolling]):
(-[WKWebView scrollViewDidEndDragging:willDecelerate:]):
(-[WKWebView scrollViewDidEndDecelerating:]):
(-[WKWebView scrollViewDidScrollToTop:]):
(-[WKWebView scrollViewDidScroll:]):
(-[WKWebView scrollViewDidEndZooming:withView:atScale:]):
(-[WKWebView _frameOrBoundsChanged]):
(-[WKWebView _updateContentWindow]):
(-[WKWebView _setObscuredInsets:]):
* UIProcess/API/ios/WKContentView.h:
* UIProcess/API/ios/WKContentView.mm:
(-[WKContentView didUpdateVisibleRect:unobscuredRect:scale:]):
(-[WKContentView _updateFixedPositionRect]):
(-[WKContentView didFinishScrolling]):
(-[WKContentView didZoomToScale:]):
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView contentView:didCommitLayerTree:]):
(-[WKView _didFinishScrolling]):
(-[WKView scrollViewDidEndDragging:willDecelerate:]):
(-[WKView scrollViewDidEndDecelerating:]):
(-[WKView scrollViewDidScrollToTop:]):
(-[WKView scrollViewDidScroll:]):
(-[WKView scrollViewDidEndZooming:withView:atScale:]):
Scrolling is modified to take into account the view position and the obcured content.
Instead of driving the scrolling position from the UIScrollView delegate callbacks,
we use changes in unobscured rect to find changes in "content visible scroll position".
WebPageProxy::didFinishScrolling() is removed. All the scrollOffset updates now go through
the ScrollingCoordinator.
(-[WKView _frameOrBoundsChanged]):
(-[WKView _updateContentWindow]):
(-[WKView _setObscuredInsets:]):
* UIProcess/WebPageProxy.h:
* UIProcess/ios/WebPageProxyIOS.mm:
(WebKit::WebPageProxy::unobscuredContentRect):
(WebKit::WebPageProxy::setUnobscuredContentRect):
* WebProcess/WebPage/WebPage.messages.in:
* WebProcess/WebPage/ios/WebPageIOS.mm:
2014-02-20 Tim Horton <timothy_horton@apple.com>
Fix a build warning by moving some WKWebView methods from the private category to WKWebView itself.
Reviewed by Anders Carlsson.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView setAllowsBackForwardNavigationGestures:]):
(-[WKWebView allowsBackForwardNavigationGestures]):
2014-02-20 Enrica Casucci <enrica@apple.com>
ASSERT on touches callbacks after r164409 on iOS.
https://bugs.webkit.org/show_bug.cgi?id=129135
Reviewed by Alexey Proskuryakov.
The change used incorrecly true and false in TouchesCallbacks and
ImageCallback. It also reintroduced isMainThread() which doesn't work
for iOS.
* UIProcess/GenericCallback.h:
(WebKit::CallbackBase::generateCallbackID):
(WebKit::ImageCallback::performCallbackWithReturnValue):
(WebKit::ImageCallback::invalidate):
* UIProcess/WebPageProxy.h:
(WebKit::TouchesCallback::performCallbackWithReturnValue):
(WebKit::TouchesCallback::invalidate):
2014-02-20 Anders Carlsson <andersca@apple.com>
We need something like WKPageUIClient in the Obj-C API
https://bugs.webkit.org/show_bug.cgi?id=129123
<rdar://problem/15338439>
Reviewed by Sam Weinig.
* UIProcess/API/APIUIClient.h:
* UIProcess/API/Cocoa/WKUIDelegate.h: Added.
* UIProcess/API/Cocoa/WKWebView.h:
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView initWithFrame:configuration:]):
(-[WKWebView UIDelegate]):
(-[WKWebView setUIDelegate:]):
* UIProcess/Cocoa/UIClient.h: Added.
* UIProcess/Cocoa/UIClient.mm: Added.
(WebKit::UIClient::UIClient):
(WebKit::UIClient::~UIClient):
(WebKit::UIClient::delegate):
(WebKit::UIClient::setDelegate):
(WebKit::UIClient::runJavaScriptAlert):
(WebKit::UIClient::runJavaScriptConfirm):
(WebKit::UIClient::runJavaScriptPrompt):
* UIProcess/WebPageProxy.h:
(WebKit::WebPageProxy::uiClient):
* WebKit2.xcodeproj/project.pbxproj:
2014-02-20 Brady Eidson <beidson@apple.com>
Add very basic image control rendering
https://bugs.webkit.org/show_bug.cgi?id=129080
Reviewed by Tim Horton.
* WebProcess/InjectedBundle/InjectedBundle.cpp:
(WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Expose the
imageControlsEnabled setting to WKTR.
2014-02-20 Tim Horton <timothy_horton@apple.com>
Add magnification and swiping properties to WKWebView
https://bugs.webkit.org/show_bug.cgi?id=129117
Reviewed by Dan Bernstein.
* UIProcess/API/Cocoa/WKViewPrivate.h:
Move allowsBackForwardNavigationGestures out of a Mac-only block.
* UIProcess/API/Cocoa/WKWebView.h:
Add allowsBackForwardNavigationGestures to WKWebView for both platforms.
Add magnification properties to WKWebView for Mac.
* UIProcess/API/Cocoa/WKWebView.mm:
(-[WKWebView contentView:didCommitLayerTree:WebKit::]):
(-[WKWebView setAllowsBackForwardNavigationGestures:]):
(-[WKWebView allowsBackForwardNavigationGestures]):
(-[WKWebView setAllowsMagnification:]):
(-[WKWebView allowsMagnification]):
(-[WKWebView setMagnification:]):
(-[WKWebView magnification]):
(-[WKWebView setMagnification:centeredAtPoint:]):
For iOS, copy implementations from WKViewIOS.
For Mac, forward to the inner WKView.
* UIProcess/API/ios/WKViewIOS.mm:
(-[WKView setAllowsBackForwardNavigationGestures:]):
Fix the logic to tear down the ViewGestureController.
* UIProcess/API/mac/WKView.mm:
(-[WKView setMagnification:centeredAtPoint:]):
(-[WKView setMagnification:]):
(-[WKView magnification]):
Use CG types for API.
== Rolled over to ChangeLog-2014-02-20 ==