2014-03-05 Chris Fleizach 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 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 [WebGL] Use WKSI to see what the system policy for WebGL is https://bugs.webkit.org/show_bug.cgi?id=129722 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 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 [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 Unreviewed. Fix the Apple-internal builds. * Configurations/WebKit2.xcconfig: Add -framework OpenGL. 2014-03-05 Simon Fraser 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 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 [iOS WebKit2] support multi-select and select with groups for iPhone. https://bugs.webkit.org/show_bug.cgi?id=129344 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 [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 Fix the build after r165095 * UIProcess/API/Cocoa/WKWebView.mm: (-[WKWebView _keyboardChangedWithInfo:adjustScrollView:]): 2014-03-04 Benjamin Poulain [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 [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 [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 [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 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 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 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 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 [iOS WebKit2]: Next/Prev button in the accessory bar do not work. https://bugs.webkit.org/show_bug.cgi?id=129690 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 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 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 [WK2] Selection remains after reload. https://bugs.webkit.org/show_bug.cgi?id=129648 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 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 [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 [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 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 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 [iOS WebKit2]: Text fields don't zoom in when focused https://bugs.webkit.org/show_bug.cgi?id=129632 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 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 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 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 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 [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 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 [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 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 [iOS WebKit2] Keyboard deadlock when accepting/dismissing autocorrection. https://bugs.webkit.org/show_bug.cgi?id=129594 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 Try to fix the 32-bit build. * UIProcess/ios/forms/WKFormSelectPopover.mm: (adjustedFontSize): 2014-03-02 Sam Weinig 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 [iOS WebKit2] Form controls handling https://bugs.webkit.org/show_bug.cgi?id=129344 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 [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 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 [GTK] Make impossible to build with and 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 [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 Fix the Mac build. * UIProcess/mac/ViewGestureController.messages.in: 2014-03-01 Tim Horton WebKit2 View Gestures (Smart Magnification): Support for iOS https://bugs.webkit.org/show_bug.cgi?id=129146 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 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 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 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 [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 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 [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 [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 [iOS][WK2] highlight rects should never big bigger than the view https://bugs.webkit.org/show_bug.cgi?id=129472 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 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 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 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 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 [iOS][WebKit2] Don't grab mach exception port on iOS https://bugs.webkit.org/show_bug.cgi?id=129505 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 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 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 [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 Unreviewed. Fix build after r164832 * UIProcess/CoordinatedGraphics/CoordinatedDrawingAreaProxy.cpp: (WebKit::CoordinatedDrawingAreaProxy::waitForAndDispatchDidUpdateBackingStoreState): 2014-02-27 Martin Robinson Fix build after r164832 * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::waitForAndDispatchDidUpdateBackingStoreState): WebProcessProxy::isLaunching() has been replaced by WebProcessProxy::state(). 2014-02-27 Tim Horton Crash in RemoteLayerTreePropertyApplier::applyPropertiesToLayer https://bugs.webkit.org/show_bug.cgi?id=129456 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 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 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 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 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 [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 [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 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 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 [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 need to #include for basename https://bugs.webkit.org/show_bug.cgi?id=128597 Reviewed by Carlos Garcia Campos. * PluginProcess/unix/PluginProcessMainUnix.cpp: include as required by POSIX for basename 2014-02-27 Carlos Garcia Campos [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 Unreviewed GTK build fix after r164751. * GNUmakefile.list.am: 2014-02-26 Dan Bernstein iOS build fix. * UIProcess/ios/forms/WKFormPopover.h: * UIProcess/ios/forms/WKFormPopover.mm: 2014-02-26 Dan Bernstein 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 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 Build fix. Unexpected line break. * Configurations/WebKit2.xcconfig: 2014-02-26 Enrica Casucci Build fix. WKFormInputControl.mm and WKFormPopover.mm should be excluded from OS X builds. * Configurations/WebKit2.xcconfig: 2014-02-26 Enrica Casucci [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 [iOS][Webkit2] Enable codesigning entitlement for web process https://bugs.webkit.org/show_bug.cgi?id=129401 Reviewed by Geoffrey Garen. * Configurations/WebContent-iOS.entitlements: 2014-02-26 Anders Carlsson 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 Unreviewed CMAKE build fix after r164751. * CMakeLists.txt: Renamed WebVisitedLinkProvider.cpp to VisitedLinkTableController.cpp. 2014-02-26 Anders Carlsson 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 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 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 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 [iOS][WebKit2] Adopt SPI for managing tabs https://bugs.webkit.org/show_bug.cgi?id=129188 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 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 Build fix: ContextMenuContextData.* should not be in the Copy Files phase. * WebKit2.xcodeproj/project.pbxproj: 2014-02-26 Simon Fraser 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 Fix the iOS build by wrapping some context menu stuff in #if ENABLE(CONTEXT_MENUS) * UIProcess/WebPageProxy.h: 2014-02-26 Martin Hock 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::encode): (IPC::ArgumentCoder::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 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 [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 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 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 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 Unreviewed. Fix GTK+ build after r164702. * UIProcess/DrawingAreaProxy.cpp: 2014-02-26 Martin Robinson [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 [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 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 [WebKit2] Form controls handling. https://bugs.webkit.org/show_bug.cgi?id=129344 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 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 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 DrawingAreaProxy is using WebCore's Timer https://bugs.webkit.org/show_bug.cgi?id=129347 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 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 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 Fix build. Remove VisitedLinkStrategy. * NetworkProcess/NetworkProcessPlatformStrategies.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.h: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 2014-02-25 Alexey Proskuryakov 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 [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 Unreviewed EFL build fix attempt after r164562 * CMakeLists.txt: Added WebVisitedLinkProvider.cpp. 2014-02-25 Sergio Villar Senin [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 Unreviewed GTK build fix after r164652. * GNUmakefile.list.am: Add WebVisitedLinkProvider build targets. 2014-02-24 Anders Carlsson 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 Build fix for case-sensitive filesystems. * WebProcess/ios/WebVideoFullscreenManager.cpp: 2014-02-24 Carlos Garcia Campos [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 [Mac] Stop looking for plug-in profiles in /S/L/Sandbox/Profiles https://bugs.webkit.org/show_bug.cgi?id=129262 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 [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 32-bit build fix. * UIProcess/API/Cocoa/_WKElementAction.mm: (+[_WKElementAction elementActionWithType:customTitle:]): 2014-02-24 Dan Bernstein [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 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 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 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 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 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::encode): (IPC::ArgumentCoder::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 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 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 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 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 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 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 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 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 [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 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 Remove redundant setting in FeatureDefines.xcconfig * Configurations/FeatureDefines.xcconfig: 2014-02-24 Carlos Garcia Campos [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 [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 Update FeatureDefines.xcconfig Rubber-stamped by Anders Carlsson. * Configurations/FeatureDefines.xcconfig: 2014-02-23 Sam Weinig [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 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 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 [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 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 [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 [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 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 [iOS WebKit2] Keyboard appears every time a link is tapped after searching Google . 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 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 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 [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 [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 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 Support WebSelections in WK2 on iOS. https://bugs.webkit.org/show_bug.cgi?id=127015 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 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 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 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 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 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 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 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 We need something like WKPageUIClient in the Obj-C API https://bugs.webkit.org/show_bug.cgi?id=129123 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 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 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 ==