2012-03-15 Carlos Garcia Campos [GTK] Implement unicode submenu items https://bugs.webkit.org/show_bug.cgi?id=81117 Reviewed by Martin Robinson. * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::WebEditorClient::shouldShowUnicodeMenu): Implement shouldShowUnicodeMenu() returning always true. When ContextMenu API is implemented for GTK+ the UI process will decide whether to show the unicode menu or not. 2012-03-15 Andras Becsi [Qt][WK2] Fix bounce-back behaviour for panning https://bugs.webkit.org/show_bug.cgi?id=81144 Reviewed by Kenneth Rohde Christiansen. Move the content back to boundaries immediately in response to a tap gesture during the bounce-back animation after panning. * UIProcess/qt/QtPanGestureRecognizer.cpp: (WebKit::QtPanGestureRecognizer::recognize): * UIProcess/qt/QtViewportInteractionEngine.h: Make the ensureContentWithinViewportBoundary function public. (QtViewportInteractionEngine): 2012-03-15 Carlos Garcia Campos [WK2] WebPageProxy::activeURL should return unreachableURL() when it's not empty https://bugs.webkit.org/show_bug.cgi?id=75465 Reviewed by Philippe Normand. * UIProcess/API/gtk/tests/WebViewTest.cpp: (WebViewTest::replaceContent): Return the main frame unreachableURL if it's not empty. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::activeURL): 2012-03-14 Anders Carlsson java/java-and-plugins.html test failing https://bugs.webkit.org/show_bug.cgi?id=81188 Reviewed by Sam Weinig. When we're marshaling NPObjects that wrap plug-in objects, make sure to check that the current plug-in instance is the same as the plug-in instance the object came from and don't pass the unwrapped object ID if that is the case. * Shared/Plugins/NPRemoteObjectMap.cpp: (WebKit::remoteNPObjectID): (WebKit::NPRemoteObjectMap::npVariantToNPVariantData): 2012-03-14 Matt Falkenhagen Allow per-script font settings to be specified in layout tests https://bugs.webkit.org/show_bug.cgi?id=78184 Reviewed by Hajime Morita. This adds per-script font settings to InternalSettings, so it can be used in layout tests instead of the per-script font settings support in DumpRenderTree overridePreference, which has only been implemented for Chromium so far. * win/WebKit2.def: Added symbols. * win/WebKit2CFLite.def: Added symbols. 2012-03-14 Michael Saboff REGRESSION(r110383): ASSERTION failures in JSCell::finishCreation causing multiple tests to "crash" on the Lion Intel Debug Bots https://bugs.webkit.org/show_bug.cgi?id=80993 Reviewed by Mark Rowe. Moved $(BUILT_PRODUCTS_DIR)/usr/local/include to the front of HEADER_SEARCH_PATH to fix builds given the wtf move. * Configurations/BaseTarget.xcconfig: 2012-03-14 Andy Estes Stop shadowing the argument to drawRect: with a local variable. Reviewed by Sam Weinig. * UIProcess/API/mac/WKView.mm: (-[WKView drawRect:]): 2012-03-13 Jon Lee Separate NOTIFICATIONS and LEGACY_NOTIFICATIONS https://bugs.webkit.org/show_bug.cgi?id=80922 Reviewed by Jian Li. You can include either NOTIFICATIONS or LEGACY_NOTIFICATIONS and have a complete API. LEGACY_NOTIFICATIONS should cover all of the previous functionality, and NOTIFICATIONS will cover the new API. Therefore, APIs that are common between the two will have: #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) This patch initially sets both to be exactly the same. As other bugs with patches begin to migrate to the new API, the defines will begin to split. This allows ports to decide which set of APIs to include. Update everything to be #if ENABLE(NOTIFICATIONS) || ENABLE(LEGACY_NOTIFICATIONS) * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: (WebProcessCreationParameters): * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureWebProcess): * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: (WebKit): (WebKit::NotificationPermissionRequestManager::startRequest): (WebKit::NotificationPermissionRequestManager::cancelRequest): (WebKit::NotificationPermissionRequestManager::permissionLevel): (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision): * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit): (WebKit::WebNotificationManager::initialize): (WebKit::WebNotificationManager::didUpdateNotificationDecision): (WebKit::WebNotificationManager::didRemoveNotificationDecisions): (WebKit::WebNotificationManager::policyForOrigin): (WebKit::WebNotificationManager::show): (WebKit::WebNotificationManager::cancel): (WebKit::WebNotificationManager::clearNotifications): (WebKit::WebNotificationManager::didDestroyNotification): (WebKit::WebNotificationManager::didShowNotification): (WebKit::WebNotificationManager::didClickNotification): (WebKit::WebNotificationManager::didCloseNotifications): * WebProcess/Notifications/WebNotificationManager.h: (WebNotificationManager): * WebProcess/WebCoreSupport/WebNotificationClient.cpp: * WebProcess/WebCoreSupport/WebNotificationClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::updatePreferences): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::didReceiveMessage): * WebProcess/WebProcess.h: (WebProcess): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): 2012-03-14 Dinu Jacob [Qt][WK2] Move code common to both ProxyAuthentication and Authentication context objects into a base class https://bugs.webkit.org/show_bug.cgi?id=80627 Reviewed by Kenneth Rohde Christiansen. No impact to QML API. * UIProcess/qt/QtDialogRunner.cpp: (BaseAuthenticationContextObject): (BaseAuthenticationContextObject::BaseAuthenticationContextObject): (HttpAuthenticationDialogContextObject): (HttpAuthenticationDialogContextObject::HttpAuthenticationDialogContextObject): (HttpAuthenticationDialogContextObject::realm): (ProxyAuthenticationDialogContextObject): (ProxyAuthenticationDialogContextObject::ProxyAuthenticationDialogContextObject): (QtDialogRunner::initForAuthentication): 2012-03-14 Anders Carlsson With tiled drawing enabled, clicking a link to a PDF causes a cross-fade https://bugs.webkit.org/show_bug.cgi?id=79247 Reviewed by Sam Weinig. Instead of creating a new CALayer for the WKView when we're in tiled mode, re-use the existing layer that AppKit makes for us. This way, we won't get any implicit animations when we change layer properties (such as sublayers in this case). * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:contextRef:pageGroupRef:]): (-[WKView wantsUpdateLayer]): (-[WKView updateLayer]): 2012-03-14 Alexey Proskuryakov WebProcess sometimes hits an assertion in SandboxExtensionTracker::didCommitProvisionalLoad after running regression tests https://bugs.webkit.org/show_bug.cgi?id=81150 Reviewed by Anders Carlsson. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad): (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad): It's not great, but for now we need to handle this case. Hopefully, some day we'll make both WebKit2 processes better aware of what's going on with loading in WebCore. 2012-03-14 Anders Carlsson Fix UI process crash when a plug-in process crashes with a modal dialog showing https://bugs.webkit.org/show_bug.cgi?id=81139 Reviewed by Dan Bernstein. When a plug-in process crashes, its corresponding PluginProcessProxy object is deleted immediately, which is bad if we're currently running a nested run loop. Fix this by making PluginProcessProxy ref-counted and protecting it before the call to -[NSApp runModalForWindow:]. * UIProcess/Plugins/PluginProcessManager.cpp: (WebKit::PluginProcessManager::pluginProcessWithPath): (WebKit::PluginProcessManager::getOrCreatePluginProcess): * UIProcess/Plugins/PluginProcessManager.h: (PluginProcessManager): * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::create): (WebKit::PluginProcessProxy::pluginProcessCrashedOrFailedToLaunch): * UIProcess/Plugins/PluginProcessProxy.h: (PluginProcessProxy): * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::setModalWindowIsShowing): (WebKit::PluginProcessProxy::beginModal): 2012-03-14 Carlos Garcia Campos [GTK] Handle printing errors in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=77197 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitError.cpp: (webkit_print_error_quark): Add new error domain for print errors. * UIProcess/API/gtk/WebKitError.h: Ad print errors. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkit_print_operation_class_init): Add WebKitPrintOperation::failed signal. (drawPagesForPrintingCompleted): Emit WebKitPrintOperation::failed when the print operation failed with the given error. (webkitPrintOperationPrintPagesForFrame): Use PrintFinishedCallback instead of a VoidCallback. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/TestPrinting.cpp: (testPrintOperationPrint): (testPrintOperationErrors): Test different print errors are correctly reported. (beforeAll): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): Invalidate print finished callbacks map. (WebKit::WebPageProxy::printFinishedCallback): Callback called when the print operation has finished in the web process. (WebKit::WebPageProxy::processDidCrash): Invalidate print finished callbacks map. (WebKit::WebPageProxy::drawPagesForPrinting): Use a PrintFinishedCallback instead of a VoidCallback. * UIProcess/WebPageProxy.h: (WebKit): Delcare PrintFinishedCallback as a generic callback. (WebPageProxy): * UIProcess/WebPageProxy.messages.in: Use PrintFinishedCallback instead of VoidCallback as callback argument of DrawPagesForPrinting message. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::PrintPagesData::PrintPagesData): Mark the data as invalid when there are no pages to print. (PrintPagesData): Add isValid parameter to mark the data struct as invalid. (WebKit::WebPrintOperationGtk::printPagesIdleDone): Call printPagesDone() instead of printDone(). (WebKit::WebPrintOperationGtk::printPagesDone): Renamed. (WebKit::WebPrintOperationGtk::printDone): Notify the UI process that the print operation has finsihed. (WebKit::WebPrintOperationGtk::print): Finish the print if the PrintPagesData struct is not valid. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: 2012-03-13 Jer Noble Lion Intel Debug WebKit2 Tests crashing under [WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:] https://bugs.webkit.org/show_bug.cgi?id=81056 Reviewed by Jessie Berlin. Give the InjectedBundlePageFullScreenClient a first crack at beganEnterFullScreen and beganExitFullScreen: * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::willEnterFullScreen): (WebKit::WebFullScreenManager::willExitFullScreen): And call the client function if it exists; otherwise, continue to message the page: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp: (WebKit::InjectedBundlePageFullScreenClient::beganEnterFullScreen): (WebKit::InjectedBundlePageFullScreenClient::beganExitFullScreen): * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h: Add a custom APIClientTraits for InjectedBundlePageFullScreenClient to handle the API number change. * Shared/APIClientTraits.cpp: * Shared/APIClientTraits.h: 2012-03-14 Andrey Kosyakov Web Inspector: add didCancelFrame timeline event https://bugs.webkit.org/show_bug.cgi?id=80994 Reviewed by Pavel Feldman. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-03-13 Anders Carlsson Find bouncy doesn’t hide when a subframe is scrolled https://bugs.webkit.org/show_bug.cgi?id=81060 Reviewed by Andreas Kling. Instead of hiding the find indicator when pageDidScroll is called, add a check to FindController::drawRect and hide the find indicator there if the find selection bounds have changed since the last call to drawRect. * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::updateFindIndicator): (WebKit::FindController::drawRect): * WebProcess/WebPage/FindController.h: (FindController): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::pageDidScroll): 2012-03-13 Jeff Miller Support loading a WKPage from web archive data https://bugs.webkit.org/show_bug.cgi?id=81044 This code was written by Jessie Berlin. Reviewed by Brady Eidson. * UIProcess/API/C/WKPage.cpp: (WKPageLoadWebArchiveData): Added. * UIProcess/API/C/WKPage.h: Added WKPageLoadWebArchiveData(). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::loadWebArchiveData): Added. * UIProcess/WebPageProxy.h: Added loadWebArchiveData(). * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::loadWebArchiveData): Added. * WebProcess/WebPage/WebPage.h: Added loadWebArchiveData(). * WebProcess/WebPage/WebPage.messages.in: Added LoadWebArchiveData message. 2012-03-13 Adam Barth && Benjamin Poulain Always enable ENABLE(CLIENT_BASED_GEOLOCATION) https://bugs.webkit.org/show_bug.cgi?id=78853 Reviewed by Adam Barth. * Configurations/FeatureDefines.xcconfig: * WebProcess/Geolocation/WebGeolocationManager.cpp: (WebKit::WebGeolocationManager::registerWebPage): (WebKit::WebGeolocationManager::unregisterWebPage): (WebKit::WebGeolocationManager::didChangePosition): (WebKit::WebGeolocationManager::didFailToDeterminePosition): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setGeoLocationPermission): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit): * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): * WebProcess/WebCoreSupport/WebGeolocationClient.cpp: * WebProcess/WebCoreSupport/WebGeolocationClient.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): * mac/WebKit2.order: 2012-03-13 Max Vujovic Add a method to window.internals to enable testing of inspector highlight rects https://bugs.webkit.org/show_bug.cgi?id=80338 Reviewed by Pavel Feldman. * win/WebKit2.def: Export symbols for win. * win/WebKit2CFLite.def: Same as above. 2012-03-13 Allan Sandfeld Jensen [Qt] Set correct device width and height. https://bugs.webkit.org/show_bug.cgi?id=80980 Reviewed by Tor Arne Vestbø. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::computeViewportConstraints): 2012-03-12 Sam Weinig Fix typo in PageClientImpl where we were overriding viewLayerHostingMode with a function called layerHostingMode. Reviewed by Anders Carlsson. * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::viewLayerHostingMode): Update name and add OVERRIDE to catch this in the future. 2012-03-12 Enrica Casucci WebKit2: remove NSPasteboard access for promised data from the WebProcess https://bugs.webkit.org/show_bug.cgi?id=80073 Reviewed by Alexey Proskuryakov. This patch removes the last remaining access to NSPasteboard from the WebProcess. The code in WebDragClient::declareAndWriteDragImage now packages all the data required for the drag and the promised drag types and sends one request to the UI process that will place the data in the NSPasteboard when appropriate. * UIProcess/API/mac/PageClientImpl.h: Added setPromisedData method. * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::setPromisedData): * UIProcess/API/mac/WKView.mm: (matchesExtensionOrEquivalent): Added. (fileExists): Added. (pathWithUniqueFilenameForPath): Added. (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]): (-[WKView pasteboardChangedOwner:]): (-[WKView pasteboard:provideDataForType:]): (-[WKView namesOfPromisedFilesDroppedAtDestination:]): * UIProcess/API/mac/WKViewInternal.h: Added _setPromisedData. * UIProcess/PageClient.h: * UIProcess/WebPageProxy.h: Added method for the new message. * UIProcess/WebPageProxy.messages.in: Added setPromisedData message. * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::setPromisedData): * WebProcess/WebCoreSupport/WebDragClient.cpp: * WebProcess/WebCoreSupport/WebDragClient.h: * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::declareAndWriteDragImage): * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Added SetMetadataURL. 2012-03-12 Andras Becsi [Qt][WK2] Add support for rudimentary scroll indicators in MiniBrowser https://bugs.webkit.org/show_bug.cgi?id=80832 Reviewed by Tor Arne Vestbø. Since the ScrollDecorator QML component requires a Flickable in its API we need to expose the Flickable in QML for now and we also need to add a notifier because we instantiate the internal Flickable only when the WebView component completes construction. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::onComponentComplete): (QQuickWebViewExperimental::flickable): * UIProcess/API/qt/qquickwebview_p.h: 2012-03-11 Timothy Hatcher Update how the Web Inspector resources are loaded. https://bugs.webkit.org/show_bug.cgi?id=80814 rdar://problem/10359959 Reviewed by John Sullivan. * Shared/WebPreferencesStore.h: (WebKit): Added InspectorUsesWebKitUserInterface. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): Removed webInspectorLocalizedStringsPath. (WebKit::WebProcessCreationParameters::decode): Ditto. * Shared/WebProcessCreationParameters.h: Ditto. (WebProcessCreationParameters): Ditto. * UIProcess/API/C/WKContext.cpp: * UIProcess/API/C/WKContextPrivate.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetInspectorUsesWebKitUserInterface): Added. (WKPreferencesGetInspectorUsesWebKitUserInterface): Added. * UIProcess/API/C/WKPreferencesPrivate.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureWebProcess): Removed webInspectorLocalizedStringsPath. * UIProcess/WebContext.h: (WebContext): Ditto. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::inspectorReallyUsesWebKitUserInterface): Added. (WebKit::WebInspectorProxy::createInspectorWindow): Use inspectorReallyUsesWebKitUserInterface to determine if texture should be used. (WebKit::WebInspectorProxy::inspectorPageURL): Choose the right path. (WebKit::WebInspectorProxy::inspectorBaseURL): Ditto. * WebProcess/WebPage/WebInspector.h: * WebProcess/WebPage/mac/WebInspectorMac.mm: (WebKit::inspectorReallyUsesWebKitUserInterface): (WebKit::WebInspector::setInspectorUsesWebKitUserInterface): Added. (WebKit::WebInspector::localizedStringsURL): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::platformPreferencesDidChange): Call WebInspector::setInspectorUsesWebKitUserInterface. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): Removed call to WebInspector::setLocalizedStringsPath. 2012-03-11 Andy Estes Remove unnecessary call to NSSizeToCGSize(). https://bugs.webkit.org/show_bug.cgi?id=80817 Reviewed by Dan Bernstein. There is no need to call NSSizeToCGSize() to convert an IntSize to a CGSize. IntSize defines a conversion function to CGSize that will do this for us implicitly. * UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::backingStoreContext): Do not call NSSizeToCGSize(). 2012-03-11 Dan Bernstein WebKit2 lacks API for obtaining a representation of the RenderLayer tree of a page, like WebRenderLayer Reviewed by Anders Carlsson. * CMakeLists.txt: * GNUmakefile.am: * Shared/API/c/WKBase.h: Added a type definition of WKRenderLayerRef. * Shared/API/c/WKRenderLayer.cpp: Added. (WKRenderLayerGetTypeID): Added. Returns the WKRenderLayer type ID. (WKRenderLayerCopyRendererName): Added this getter wrapper. (WKRenderLayerCopyElementTagName): Ditto. (WKRenderLayerCopyElementID): Ditto. (WKRenderLayerGetElementClassNames): Ditto. (WKRenderLayerGetAbsoluteBounds): Ditto. (WKRenderLayerIsClipping): Ditto. (WKRenderLayerIsClipped): Ditto. (WKRenderLayerIsReflection): Ditto. (WKRenderLayerGetCompositingLayerType): Ditto. (WKRenderLayerGetNegativeZOrderList): Ditto. (WKRenderLayerGetNormalFlowList): Ditto. (WKRenderLayerGetPositiveZOrderList): Ditto. * Shared/API/c/WKRenderLayer.h: Added. * Shared/APIObject.h: Added TypeRenderLayer to the APIObject::Type enum. * Shared/UserMessageCoders.h: (WebKit::UserMessageEncoder::baseEncode): Added WebRenderLayer encoding. (WebKit::UserMessageDecoder::baseDecode): Added WebRenderLayer decoding. * Shared/WebRenderLayer.cpp: Added. (WebKit::WebRenderLayer::create): Added. Creates a WebRenderLayer for the page’s main frame’s root layer. (WebKit::WebRenderLayer::createArrayFromLayerList): Added this helper function. (WebKit::WebRenderLayer::WebRenderLayer): Added. Constructs a WebRenderLayer with the renderer name, element tag, ID and class names, metrics, child lists, and compositing layer properties of the given RenderLayer. * Shared/WebRenderLayer.h: Added. (WebKit::WebRenderLayer::create): (WebKit::WebRenderLayer::negativeZOrderList): (WebKit::WebRenderLayer::normalFlowList): (WebKit::WebRenderLayer::positiveZOrderList): (WebKit::WebRenderLayer::renderObjectName): (WebKit::WebRenderLayer::elementTagName): (WebKit::WebRenderLayer::elementID): (WebKit::WebRenderLayer::elementClassNames): (WebKit::WebRenderLayer::isReflection): (WebKit::WebRenderLayer::isClipping): (WebKit::WebRenderLayer::isClipped): (WebKit::WebRenderLayer::compositingLayerType): (WebKit::WebRenderLayer::absoluteBoundingBox): (WebKit::WebRenderLayer::WebRenderLayer): * Target.pri * UIProcess/API/C/WKAPICast.h: Added a mapping between WKRenderLayerRef and WebRenderLayer. * WebKit2.xcodeproj/project.pbxproj: Added WebRenderLayer.{cpp,h} and WKRenderLayer.{cpp,h}. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageCopyRenderLayerTree): Added this bundle API for getting the layer tree. * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: * win/WebKit2.vcproj: 2012-03-11 Joseph Pecoraro Web Inspector: Crash using released frontendClient when resizing window with closed inspector The WebInspectorFrontendClient reference should be cleared when the WebInspectorClient::closeInspectorFrontend is called. This adds a destroyInspectorPage to mirror createInspectorPage and clear the weak pointers that are no longer valid. Reviewed by Pavel Feldman. * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::closeInspectorFrontend): (WebKit::WebInspectorClient::didResizeMainFrame): * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::destroyInspectorPage): * WebProcess/WebPage/WebInspector.h: 2012-03-11 Viatcheslav Ostapenko [Qt] [WK2] Support threaded renderer in WK2 https://bugs.webkit.org/show_bug.cgi?id=76661 Reviewed by Noam Rosenthal. Implement Qt5 threaded rendering support for Qt WebKit2. Parts of LayerTreeHostProxy which contain layer tree and layer painting objects are moved to separate class called WebLayerTreeRenderer. WebLayerTreeRenderer is thread safe ref counted and referenced by LayerTreeHostProxy and paint node. All layer tree and graphics objects are created, accessed and deallocated from Qt Scenegraph's paint thread only. Layer tree updates from render queue are fetched in updatePaintNode call stack when main thread is locked. Messages from paint thread to web process are passed through MainThreadGuardedInvoker call gate (implemented by Noam Rosenthal and previously reviewed by Kenneth Rohde Christiansen). * Target.pri: * UIProcess/API/qt/qquickwebpage.cpp: (PageProxyNode::PageProxyNode): (PageProxyNode::render): (PageProxyNode::~PageProxyNode): (PageProxyNode::layerTreeRenderer): (PageProxyNode): (PageProxyNode::setScale): (QQuickWebPage::updatePaintNode): (QQuickWebPagePrivate::~QQuickWebPagePrivate): * UIProcess/LayerTreeHostProxy.cpp: Added. (WebKit): (WebKit::LayerTreeHostProxy::LayerTreeHostProxy): (WebKit::LayerTreeHostProxy::~LayerTreeHostProxy): (WebKit::LayerTreeHostProxy::paintToCurrentGLContext): (WebKit::LayerTreeHostProxy::paintToGraphicsContext): (WebKit::LayerTreeHostProxy::updateViewport): (WebKit::LayerTreeHostProxy::dispatchUpdate): (WebKit::LayerTreeHostProxy::createTileForLayer): (WebKit::LayerTreeHostProxy::updateTileForLayer): (WebKit::LayerTreeHostProxy::removeTileForLayer): (WebKit::LayerTreeHostProxy::deleteCompositingLayer): (WebKit::LayerTreeHostProxy::setRootCompositingLayer): (WebKit::LayerTreeHostProxy::syncCompositingLayerState): (WebKit::LayerTreeHostProxy::didRenderFrame): (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage): (WebKit::LayerTreeHostProxy::destroyDirectlyCompositedImage): (WebKit::LayerTreeHostProxy::setVisibleContentsRectForPanning): (WebKit::LayerTreeHostProxy::setVisibleContentsRectForScaling): (WebKit::LayerTreeHostProxy::renderNextFrame): (WebKit::LayerTreeHostProxy::purgeBackingStores): * UIProcess/LayerTreeHostProxy.h: (WebKit): (LayerTreeHostProxy): (WebKit::LayerTreeHostProxy::layerTreeRenderer): * UIProcess/WebLayerTreeRenderer.cpp: Renamed from Source/WebKit2/UIProcess/qt/LayerTreeHostProxyQt.cpp. (WebKit): (MainThreadGuardedInvoker): (WebKit::MainThreadGuardedInvoker::call): (WebKit::MainThreadGuardedInvoker::MainThreadGuardedInvoker): (WebKit::MainThreadGuardedInvoker::invoke): (WebKit::WebLayerTreeRenderer::callOnMainTread): (WebKit::WebLayerTreeRenderer::WebLayerTreeRenderer): (WebKit::WebLayerTreeRenderer::~WebLayerTreeRenderer): (WebKit::WebLayerTreeRenderer::createLayer): (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext): (WebKit::WebLayerTreeRenderer::syncAnimations): (WebKit::WebLayerTreeRenderer::paintToGraphicsContext): (WebKit::WebLayerTreeRenderer::setVisibleContentsRectForScaling): (WebKit::WebLayerTreeRenderer::updateViewport): (WebKit::WebLayerTreeRenderer::syncLayerParameters): (WebKit::WebLayerTreeRenderer::deleteLayer): (WebKit::WebLayerTreeRenderer::ensureLayer): (WebKit::WebLayerTreeRenderer::setRootLayerID): (WebKit::WebLayerTreeRenderer::getBackingStore): (WebKit::WebLayerTreeRenderer::createTile): (WebKit::WebLayerTreeRenderer::removeTile): (WebKit::WebLayerTreeRenderer::updateTile): (WebKit::WebLayerTreeRenderer::createImage): (WebKit::WebLayerTreeRenderer::destroyImage): (WebKit::WebLayerTreeRenderer::assignImageToLayer): (WebKit::WebLayerTreeRenderer::swapBuffers): (WebKit::WebLayerTreeRenderer::flushLayerChanges): (WebKit::WebLayerTreeRenderer::renderNextFrame): (WebKit::WebLayerTreeRenderer::ensureRootLayer): (WebKit::WebLayerTreeRenderer::syncRemoteContent): (WebKit::WebLayerTreeRenderer::purgeGLResources): (WebKit::WebLayerTreeRenderer::purgeBackingStores): (WebKit::WebLayerTreeRenderer::detach): (WebKit::WebLayerTreeRenderer::appendUpdate): * UIProcess/WebLayerTreeRenderer.h: Copied from Source/WebKit2/UIProcess/LayerTreeHostProxy.h. (WebKit): (WebLayerTreeRenderer): (WebKit::WebLayerTreeRenderer::layerByID): (WebKit::WebLayerTreeRenderer::rootLayer): (WebKit::WebLayerTreeRenderer::notifyAnimationStarted): (WebKit::WebLayerTreeRenderer::notifySyncRequired): (WebKit::WebLayerTreeRenderer::showDebugBorders): (WebKit::WebLayerTreeRenderer::showRepaintCounter): (WebKit::WebLayerTreeRenderer::paintContents): 2012-03-09 Jon Lee Rename NotificationPresenter to NotificationClient https://bugs.webkit.org/show_bug.cgi?id=80488 Reviewed by Kentaro Hara. Refactor to use renamed WebCore::NotificationClient. * UIProcess/Notifications/WebNotificationManagerProxy.h: * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: (WebKit::NotificationPermissionRequestManager::startRequest): (WebKit::NotificationPermissionRequestManager::permissionLevel): * WebProcess/Notifications/NotificationPermissionRequestManager.h: (NotificationPermissionRequestManager): * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::policyForOrigin): * WebProcess/Notifications/WebNotificationManager.h: (WebNotificationManager): * WebProcess/WebCoreSupport/WebNotificationClient.cpp: (WebKit::WebNotificationClient::checkPermission): * WebProcess/WebCoreSupport/WebNotificationClient.h: (WebNotificationClient): 2012-03-09 Viatcheslav Ostapenko [Qt] [WK2] Shouldn't use item for clipping rect calculation in paint node. https://bugs.webkit.org/show_bug.cgi?id=80714 Reviewed by Noam Rosenthal. Replace item based clip-rect calculation with clipping-nodes based calculation. This is required for threaded rendering, since we don't have access to the QSGItems from the render thread. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::QQuickWebPage): (QQuickWebPagePrivate::paintToCurrentGLContext): (PageProxyNode::render): (PageProxyNode::clipRect): (PageProxyNode): * UIProcess/API/qt/qquickwebpage_p_p.h: (QQuickWebPagePrivate): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::QQuickWebView): 2012-03-09 Enrica Casucci Move WebNSURLExtras code down to WebCore. https://bugs.webkit.org/show_bug.cgi?id=80611 Reviewed by Alexey Proskuryakov. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2012-03-09 Jeff Miller Add WKPageEndPrinting() to balance WKPageBeginPrinting() https://bugs.webkit.org/show_bug.cgi?id=80739 Reviewed by Dan Bernstein. * UIProcess/API/C/WKPage.cpp: (WKPageEndPrinting): Added. * UIProcess/API/C/WKPagePrivate.h: Added WKPageEndPrinting(). 2012-03-09 Emil A Eklund Add roundedPoint to HitTestResult and change platform code to use it https://bugs.webkit.org/show_bug.cgi?id=80715 Reviewed by James Robinson. Change ports to use roundedPoint to avoid exposing subpixel types to platform code. * WebProcess/WebPage/WebContextMenu.cpp: (WebKit::WebContextMenu::show): 2012-03-09 Alexey Proskuryakov [Mac] Pass sandbox profiles through preprocessor https://bugs.webkit.org/show_bug.cgi?id=80651 Reviewed by Mark Rowe. * DerivedSources.make: Preprocess sandbox profiles. * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb: Removed. * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb.in: Copied from Source/WebKit2/PluginProcess/mac/com.apple.WebKit.PluginProcess.sb. * WebProcess/com.apple.WebProcess.sb: Removed. * WebProcess/com.apple.WebProcess.sb.in: Copied from Source/WebKit2/WebProcess/com.apple.WebProcess.sb. Renamed to avoid make finding the wrong original in default paths. * WebKit2.xcodeproj/project.pbxproj: Copy preprocessed files to Resources, not originals. Also, changed DerivedSources target to use BaseTarget.xcconfig to have correct include paths. 2012-03-09 Jon Lee Add support for ENABLE(LEGACY_NOTIFICATIONS) https://bugs.webkit.org/show_bug.cgi?id=80497 Reviewed by Adam Barth. Prep for b80472: Update API for Web Notifications * Configurations/FeatureDefines.xcconfig: 2012-03-09 Ashod Nakashian Bash scripts should support LF endings only https://bugs.webkit.org/show_bug.cgi?id=79509 Reviewed by David Kilzer. * win/build-generated-files.sh: Added properties svn:executable and svn:eol-style. 2012-03-08 Enrica Casucci REGRESSION (r109022): Files dragged onto input controls cannot be read due to sandbox violation. https://bugs.webkit.org/show_bug.cgi?id=80203 Reviewed by Alexey Proskuryakov. This patch reverts a small part fo r109022, leaving access to NSPasteboard in the WebProcess when retrieving pathnames for files being dragged. This avoid the sandbox violation until we implement a mechanism to provide a sandbox extension to the WebProcess. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::getPathnamesForType): 2012-03-09 Sheriff Bot Unreviewed, rolling out r110191, r110202, and r110279. http://trac.webkit.org/changeset/110191 http://trac.webkit.org/changeset/110202 http://trac.webkit.org/changeset/110279 https://bugs.webkit.org/show_bug.cgi?id=80694 They broke !ENABLE(INSPECTOR) builds (Requested by Ossy on #webkit). * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-03-08 Tor Arne Vestbø [Qt] Use Qt's module system for install rules and depending on QtWebKit Instead of rolling our own install rules we now use the same approach as every other Qt module, by loading qt_module.prf and qt_module_config.prf. This ensures that we follow the same semantics as the rest of Qt on what sort of config options are enabled by default (create_cmake eg.). It also allows us to use QT += webkit instead of the workaround we had with CONFIG += qtwebkit. We do however force Qt to always treat our build as a non-developer build, so the libraries will end up in the WebKit lib directory instead of the qtbase directory (as with a normal developer-build). This allows us to keep the webkit-build self-contained. If Qt is a developer build we still copy the module file manually to Qt, so that you don't have to install WebKit to make it available. For non-developer builds of Qt, it is still possible to use the built WebKit libraries without having to install them, by having the variable QMAKE_EXTRA_MODULE_FORWARDS set in the project's .qmake.cache file, pointing to $WEBKITOUTUTDIR/$CONFIGURATION/modules. https://bugs.webkit.org/show_bug.cgi?id=80590 Reviewed by Simon Hausmann. * UIProcess/API/qt/tests/publicapi/publicapi.pro: * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro: * UIProcess/API/qt/tests/qmltests/WebView.pro: * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp: * UIProcess/API/qt/tests/qquickwebview/qquickwebview.pro: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: * UIProcess/API/qt/tests/tests.pri: * UIProcess/API/qt/tests/util.cpp: * WebProcess.pro: 2012-03-08 No'am Rosenthal [Qt][WK2] Allow transparent WebViews https://bugs.webkit.org/show_bug.cgi?id=80608 Reviewed by Tor Arne Vestbø. Added support for transparentBackground in QQuickWebViewExperimental. This uses the existing drawsTransparentBackground property in WebKit2. Also, changed LayerTreeHostQt to set the contentsOpaque flag when the root layer changes, otherwise the change doesn't take effect. A new API test was added. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::setTransparentBackground): (QQuickWebViewPrivate::transparentBackground): (QQuickWebViewExperimental::transparentBackground): (QQuickWebViewExperimental::setTransparentBackground): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView): (tst_QQuickWebView::transparentWebViews): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::LayerTreeHostQt): (WebKit::LayerTreeHostQt::setRootCompositingLayer): 2012-03-08 Gustavo Noronha Silva GTK+ build fix. Only try to get the backing from the layer in when ACCELERATED_COMPOSITING is enabled. Rubber-stamped by Ryosuke Niwa. * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::screenRectOfContents): 2012-03-08 Ryosuke Niwa Mac build fix for micro data API. * Configurations/FeatureDefines.xcconfig: >>>>>>> .r110352 2012-03-08 Jer Noble Unreviewed Snow Leopard build fix. On Leopard and Snow Leopard, provide an implementation for -[NSWindow convertRectToScreen:]. * UIProcess/mac/WKFullScreenWindowController.mm: (-[NSWindow convertRectToScreen:]): 2012-03-08 Jer Noble Further unreviewed build fix. Add in the WebCore namespace, so that IntRect is pulled in. * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp: * UIProcess/qt/WebFullScreenManagerProxyQt.cpp: * UIProcess/win/WebFullScreenManagerProxyWin.cpp: 2012-03-08 Jer Noble Unreviewed build fix. Add stub implementations of beganEnterFullScreen and beganExitFullScreen to platform-specific WebFullScreenManagerProxy implementations. * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp: (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen): (WebKit::WebFullScreenManagerProxy::beganExitFullScreen): * UIProcess/qt/WebFullScreenManagerProxyQt.cpp: (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen): (WebKit::WebFullScreenManagerProxy::beganExitFullScreen): * UIProcess/win/WebFullScreenManagerProxyWin.cpp: (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen): (WebKit::WebFullScreenManagerProxy::beganExitFullScreen): 2012-03-08 Jer Noble Full Screen Refactor Part 3: Animate into Full Screen mode using new animation classes. https://bugs.webkit.org/show_bug.cgi?id=78928 Reviewed by Anders Carlsson. Boilerplate changes to WebKit2 IPC messages and supporting functions. * UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::setAnimatingFullScreen): Added boilerplate. * UIProcess/WebFullScreenManagerProxy.h: * UIProcess/WebFullScreenManagerProxy.messages.in: * UIProcess/mac/WebFullScreenManagerProxyMac.mm: (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen): Added boilerplate. (WebKit::WebFullScreenManagerProxy::beganExitFullScreen): Added boilerplate. * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::screenRectOfContents): Added. Calculates the screen rect of an element's contents. (WebKit::WebFullScreenManager::enterFullScreenForElement): Use screenRectOfContents() (WebKit::WebFullScreenManager::willEnterFullScreen): Ditto. Do not set the background color. Call new BeganEnterFullScreen XPC message. (WebKit::WebFullScreenManager::didEnterFullScreen): Do not set the background color. (WebKit::WebFullScreenManager::willExitFullScreen): Use screenRectOfContents. Do not set the background color. Call new BeganExitFullScreen XPC message. (WebKit::WebFullScreenManager::didExitFullScreen): Do not set the background color. (WebKit::WebFullScreenManager::setAnimatingFullScreen): Added boilerplate. * WebProcess/FullScreen/WebFullScreenManager.h: * WebProcess/FullScreen/WebFullScreenManager.messages.in: * UIProcess/mac/WKFullScreenWindowController.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController cancelOperation:]): Renamed from _requestExitWithAnimation:. (-[WKFullScreenWindowController applicationDidResignActive:]): Call cancelOperation: instead of _requestExitWithAnimation. (-[WKFullScreenWindowController applicationDidChangeScreenParameters:]): Set the frame of both the full screen window and the background window. (-[WKFullScreenWindowController enterFullScreen:]): Save a rendered image of the current page to use in the placeholder. (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Renamed from beganEnterFullScreenAnimation. (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): No need to swap placeholder views here, as they were already swapped in beganEnter...:. (-[WKFullScreenWindowController exitFullScreen]): (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Renamed from beganExitFullScreenAnimation. (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Swap web view back into place. (-[WKFullScreenWindowController close]): (-[WKFullScreenWindowController animationDidEnd:]): Added. (createBackgroundFullscreenWindow): Added. (windowFrameFromApparentFrames): Added. (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Added. (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): Added. 2012-03-08 Jer Noble Full Screen Refactor Part 2: Remove unnecessary WebKit2 APIs for Full Screen made https://bugs.webkit.org/show_bug.cgi?id=78926 Reviewed by John Sullivan. The following functions (and also their Proxy versions) were removed completely: WebFullScreenManager::enterAcceleratedCompositingMode(const LayerTreeContext&) WebFullScreenManager::exitAcceleratedCompositingMode() WebFullScreenManager::beganEnterFullScreenAnimation() WebFullScreenManager::finishedEnterFullScreenAnimation(bool) WebFullScreenManager::beganExitFullScreenAnimation() WebFullScreenManager::finishedExitFullScreenAnimation(bool) WebFullScreenManager::getFullScreenRect(WebCore::IntRect&) * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/WebFullScreenManagerProxy.h: (WebKit::WebFullScreenManagerProxy::beginEnterFullScreenAnimation): (WebKit::WebFullScreenManagerProxy::beginExitFullScreenAnimation): (WebKit::WebFullScreenManagerProxy::disposeOfLayerClient): (WebFullScreenManagerProxy): * UIProcess/WebFullScreenManagerProxy.messages.in: * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp: * UIProcess/mac/WebFullScreenManagerProxyMac.mm: * UIProcess/qt/WebFullScreenManagerProxyQt.cpp: * UIProcess/win/WebFullScreenManagerProxyWin.cpp: (WebKit::WebFullScreenManagerProxy::finishedExitFullScreenAnimation): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::create): (WebKit::WebFullScreenManager::~WebFullScreenManager): * WebProcess/FullScreen/WebFullScreenManager.h: (WebFullScreenManager): * WebProcess/FullScreen/WebFullScreenManager.messages.in: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::exitFullScreenForElement): * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): Additionally, the platform-specific WebFullScreenManager subclasses were removed, as no platform-specific implementations remained after the above functions were removed: * GNUmakefile.am: * Target.pri: * win/WebKit2.vcproj: * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.cpp: Removed. * WebProcess/FullScreen/gtk/WebFullScreenManagerGtk.h: Removed. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Removed. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: Removed. * WebProcess/FullScreen/qt/WebFullScreenManagerQt.cpp: Removed. * WebProcess/FullScreen/qt/WebFullScreenManagerQt.h: Removed. * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp: Removed. * WebProcess/FullScreen/win/WebFullScreenManagerWin.h: Removed. 2012-03-08 Matt Lilek Don't enable VIDEO_TRACK on all OS X platforms https://bugs.webkit.org/show_bug.cgi?id=80635 Reviewed by Eric Carlson. * Configurations/FeatureDefines.xcconfig: 2012-03-08 Max Vujovic Add a method to window.internals to enable testing of inspector highlight rects https://bugs.webkit.org/show_bug.cgi?id=80338 Reviewed by Pavel Feldman. * win/WebKit2.def: Export symbols for win. * win/WebKit2CFLite.def: Same as above. 2012-03-08 Dinu Jacob [Qt WK2] Remove duplicate code related to dialog handling in QQuickWebView https://bugs.webkit.org/show_bug.cgi?id=80557 Reviewed by Simon Hausmann. Move common code related to running QtDialogRunner into a separate function * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::runJavaScriptAlert): (QQuickWebViewPrivate::runJavaScriptConfirm): (QQuickWebViewPrivate::runJavaScriptPrompt): (QQuickWebViewPrivate::handleAuthenticationRequiredRequest): (QQuickWebViewPrivate::handleProxyAuthenticationRequiredRequest): (QQuickWebViewPrivate::handleCertificateVerificationRequest): (QQuickWebViewPrivate::execDialogRunner): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): 2012-03-07 Dinu Jacob [Qt] Authentication dialog does not work https://bugs.webkit.org/show_bug.cgi?id=79738 Reviewed by Simon Hausmann. QQuickWebView should accept touch events only if there is no active dialog. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::runJavaScriptAlert): (QQuickWebViewPrivate::runJavaScriptConfirm): (QQuickWebViewPrivate::runJavaScriptPrompt): (QQuickWebViewPrivate::handleAuthenticationRequiredRequest): (QQuickWebViewPrivate::handleProxyAuthenticationRequiredRequest): (QQuickWebViewPrivate::handleCertificateVerificationRequest): (QQuickWebView::touchEvent): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): 2012-03-07 Dan Bernstein WebKit2 lacks API for obtaining a representation of the render tree of a page, like WebRenderNode https://bugs.webkit.org/show_bug.cgi?id=80230 Reviewed by Beth Dakin. * CMakeLists.txt: * GNUmakefile.am: * Shared/API/c/WKBase.h: Added a type definition of WKRenderObjectRef. * Shared/API/c/WKRenderObject.cpp: Added. (WKRenderObjectGetTypeID): Added. Returns the WKRenderObject type ID. (WKRenderObjectCopyName): Added this getter wrapper. (WKRenderObjectGetAbsolutePosition): Ditto. (WKRenderObjectGetFrameRect): Ditto. (WKRenderObjectGetChildren): Ditto. * Shared/API/c/WKRenderObject.h: Added. * Shared/APIObject.h: Added TypeRenderObject to the APIObject::Type enum. * Shared/UserMessageCoders.h: (WebKit::UserMessageEncoder::baseEncode): Added WebRenderObject encoding. (WebKit::UserMessageDecoder::baseDecode): Added WebRenderObject decoding. * Shared/WebRenderObject.cpp: Added. (WebKit::WebRenderObject::create): Added. Creates a WebRenderObject for the page’s main frame content renderer. (WebKit::WebRenderObject::WebRenderObject): Added. Constructs a WebRenderObject with the name, metrics and children of the given RenderObject, following the rules used in WebKit1 WebRenderNode. In particular, a RenderWidget representing a frame gets the frame’s content renderer as a child. * Shared/WebRenderObject.h: Added. (WebKit::WebRenderObject::create): (WebKit::WebRenderObject::children): (WebKit::WebRenderObject::name): (WebKit::WebRenderObject::absolutePosition): (WebKit::WebRenderObject::frameRect): (WebKit::WebRenderObject::WebRenderObject): * Target.pri: * UIProcess/API/C/WKAPICast.h: Added a mapping between WKRenderObjectRef and WebRenderObject. * WebKit2.xcodeproj/project.pbxproj: Added WebRenderObject.{cpp,h} and WKRenderObject.{cpp.h}. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageCopyRenderTree): Added this bundle API for getting the render tree. * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: * win/WebKit2.vcproj: 2012-03-07 Kenneth Rohde Christiansen Pinch zoom acts weirdly on nytimes.com while loading https://webkit.org/b/80508 Reviewed by Simon Hausmann. Make sure to suspend the page while doing pinch zooming. If the page is suspended (which happens while pinch zooming) then do not send touch events to the page, even if it has listeners. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleTouchEvent): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::pinchGestureStarted): 2012-03-05 Caio Marcelo de Oliveira Filho [Qt] QWebNavigationRequest 'action' property should have an enum type instead of int https://bugs.webkit.org/show_bug.cgi?id=80164 Reviewed by Simon Hausmann. Use the appropriate enum type instead of int. Make IgnoreRequest have a bigger value that give some room for us to put Experimental values in the middle. This way the Experimental values are in a valid range for the original enumeration. To avoid confusion, the Experimental enumeration was renamed. * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qwebnavigationrequest.cpp: (QWebNavigationRequestPrivate): (QWebNavigationRequest::setAction): (QWebNavigationRequest::action): * UIProcess/API/qt/qwebnavigationrequest_p.h: * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: 2012-03-07 Andras Becsi [WK2] Make it possible to build without geolocation support https://bugs.webkit.org/show_bug.cgi?id=80426 Reviewed by Simon Hausmann. Add missing guards. * UIProcess/GeolocationPermissionRequestManagerProxy.cpp: (WebKit::GeolocationPermissionRequestManagerProxy::didReceiveGeolocationPermissionDecision): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::processDidCrash): * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: 2012-03-06 Raphael Kubo da Costa [CMake] Make the removal of transitive library dependencies work with CMake < 2.8.7. https://bugs.webkit.org/show_bug.cgi?id=80469 Reviewed by Antonio Gomes. * CMakeLists.txt: Manually set the LINK_INTERFACE_LIBRARIES target property on the library being created. 2012-03-06 Hugo Parente Lima MiniBrowser --window-size 480x800 www.nytimes.com doesn't paint bottom tiles. https://bugs.webkit.org/show_bug.cgi?id=80313 Reviewed by Kenneth Rohde Christiansen. Fix the math to get the visible rectangle and add a method to get it. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::visibleContentsRect): (QQuickWebViewFlickablePrivate::_q_commitScaleChange): (QQuickWebViewPrivate::_q_commitPositionChange): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): 2012-03-05 Joseph Pecoraro Web Inspector: Hide dock button when not allowed to dock https://bugs.webkit.org/show_bug.cgi?id=78575 Reviewed by Pavel Feldman. * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::didResizeMainFrame): * WebProcess/WebCoreSupport/WebInspectorClient.h: * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::updateDockingAvailability): * WebProcess/WebPage/WebInspector.h: 2012-03-06 Allan Sandfeld Jensen [Qt] Interaction Engine suspends content during pageload. https://bugs.webkit.org/show_bug.cgi?id=80294 Only suspend content when viewport updates are deferred for a non-instantanious interaction. Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::ViewportUpdateDeferrer::ViewportUpdateDeferrer): (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer): (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::flickableMoveStarted): (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-03-06 Simon Hausmann [Qt] Make QQuickWebView's url property work with a flickable webview Reviewed by Tor Arne Vestbø. QQuickWebViewPrivate::onComponentComplete implements the deferred url loading when the url property is set in the component instantiation. QQuickWebViewFlickablePrivate is the private sub-class used for a flickable webview, which re-implemented onComponentComplete but forgot to call the base implementation. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::onComponentComplete): 2012-03-06 Carlos Garcia Campos [GTK] Fix several documentation issues in WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=80281 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitFindController.cpp: * UIProcess/API/gtk/WebKitNavigationPolicyDecision.cpp: (webkit_navigation_policy_decision_class_init): * UIProcess/API/gtk/WebKitPrintOperation.cpp: * UIProcess/API/gtk/WebKitWebView.h: 2012-03-06 Carlos Garcia Campos [GTK] Use a single signal for script dialogs in WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=80271 Reviewed by Martin Robinson. Add a new signal WebKitWebView::script-dialog that passes a WebKitScriptDialog boxed type that can be used to build the dialog and set the responses. It simplifies the API and makes it bindings friendly. * GNUmakefile.am: * UIProcess/API/gtk/WebKitScriptDialog.cpp: Added. (webkitScriptDialogCopy): Copy method for boxed type. (webkitScriptDialogFree): Free method for boxed type. (webkit_script_dialog_get_dialog_type): Return the type of dialog: alert, confirm or prompt. (webkit_script_dialog_get_message): Return the message of the dialog. (webkit_script_dialog_confirm_set_confirmed): Set whether user confirmed the dialog, for confirm dialogs. (webkit_script_dialog_prompt_get_default_text): Get the default text of prompt dialogs. (webkit_script_dialog_prompt_set_text): Set the text entered by the user, for prompt dialogs. * UIProcess/API/gtk/WebKitScriptDialog.h: Added. * UIProcess/API/gtk/WebKitScriptDialogPrivate.h: Added. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewScriptDialog): Default implementation of WebKitWebView::script-dialog signal. (webkit_web_view_class_init): Add WebKitWebView::script-dialog and remove alert, confirm and propmpt. (webkitWebViewRunJavaScriptAlert): Create a WebKitScriptDialog and emit WebKitWebView::script-dialog signal. (webkitWebViewRunJavaScriptConfirm): Ditto. (webkitWebViewRunJavaScriptPrompt): Ditto. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_script_dialog_get_type(). * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewJavaScriptDialogs): Update javascript dialog test to use the new API. * UIProcess/API/gtk/webkit2marshal.list: * UIProcess/API/gtk/webkit2.h: 2012-03-05 Gavin Barraclough putByIndex should throw in strict mode https://bugs.webkit.org/show_bug.cgi?id=80335 Reviewed by Filip Pizlo. Make the MethodTable PutByIndex trap take a boolean 'shouldThrow' parameter. * WebProcess/Plugins/Netscape/NPJSObject.cpp: (WebKit::NPJSObject::setProperty): 2012-03-05 Joseph Pecoraro Unreviewed rollout of r109858 for restructuring. 2012-03-05 Joseph Pecoraro Web Inspector: Hide dock button when not allowed to dock Reviewed by Timothy Hatcher. * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::updateDockingAvailability): * WebProcess/WebCoreSupport/WebInspectorClient.h: * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::updateDockingAvailability): * WebProcess/WebPage/WebInspector.h: 2012-03-05 Anders Carlsson pinch-to-zoom and double-tap flicker when using the new scrolling model https://bugs.webkit.org/show_bug.cgi?id=80368 Reviewed by Sam Weinig. Add a way for drawing areas to respond to callback based force repaint requests asynchronously. This is currently needed for the tiled drawing area when there might be outstanding scroll updates that are sent from the scrolling thread to the main thread and we need to ensure that they're processed before sending a message back. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::forceRepaintAsync): Add new member function. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::forceRepaint): Try forceRepaintAsync first. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::forceRepaintAndSendMessage): Force the repaint and send the message. (WebKit::dispatchBackToMainThread): Dispatch a call to forceRepaintAndSendMessage to the main thread. (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync): Dispatch a function on the scrolling thread. Its sole purpose is to dispatch a function back to the main thread, ensuring that all previously dispatched functions have been executed. 2012-03-05 Enrica Casucci Can't type on some websites (plug-ins steal key events). When the plugin is disabled, it is necessary to reset _pluginComplexTextInputIdentifier in order to return the correct input context. Failure to do so results in the inputContext method to return the plugin input context instead of the context of the browser view. Reviewed by Sam Weinig. * UIProcess/API/mac/WKView.mm: (-[WKView _setPluginComplexTextInputState:]): (-[WKView _handlePluginComplexTextInputKeyDown:]): 2012-03-05 Anders Carlsson Be more aggressive about repainting page overlays https://bugs.webkit.org/show_bug.cgi?id=80336 Reviewed by Simon Fraser. Whenever we're flushing layers and we have a page overlay, check if the main frame has scrolled or if the main frame root content layer needs to be repainted and force the overlay layer to be repainted if either of those conditions are true. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::flushLayers): (WebKit::TiledCoreAnimationDrawingArea::shouldRepaintPageOverlayLayer): (WebKit): 2012-03-05 Sam Weinig Add support for hosting layers in the window server in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=80310 Reviewed by Anders Carlsson. This currently only works if you are using TiledCoreAnimation drawing model. * Platform/mac/LayerHostingContext.h: Renamed from Source/WebKit2/Platform/mac/RemoteLayerClient.h. * Platform/mac/LayerHostingContext.mm: Renamed from Source/WebKit2/Platform/mac/RemoteLayerClient.mm. (WebKit::LayerHostingContext::createForPort): (WebKit::LayerHostingContext::LayerHostingContext): (WebKit::LayerHostingContext::createForWindowServer): (WebKit::LayerHostingContext::~LayerHostingContext): (WebKit::LayerHostingContext::setRootLayer): (WebKit::LayerHostingContext::rootLayer): (WebKit::LayerHostingContext::contextID): (WebKit::LayerHostingContext::invalidate): Renamed RemoteLayerClient to LayerHostingContext and add ability to use the window server as the remote context. * PluginProcess/PluginControllerProxy.cpp: * PluginProcess/PluginControllerProxy.h: * PluginProcess/mac/PluginControllerProxyMac.mm: Update for new names. * Shared/LayerTreeContext.h: Add LayerHostingMode enum. * UIProcess/PageClient.h: * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::layerHostingMode): (WebKit::PageClientImpl::updateAcceleratedCompositingMode): Add PageClient access points to get the current layer hosting mode, and a hook to tell the underlying view that the layer hosting context has changed. * UIProcess/API/mac/WKViewInternal.h: * UIProcess/API/mac/WKView.mm: (-[WKView _updateAcceleratedCompositingMode:WebKit::]): Implement responding to a new layer hosting context as a simple exit and re-entrance of compositing. * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::layerHostingModeDidChange): (WebKit::DrawingAreaProxy::updateAcceleratedCompositingMode): * UIProcess/DrawingAreaProxy.messages.in: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: (TiledCoreAnimationDrawingAreaProxy): * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::layerHostingModeDidChange): (WebKit::TiledCoreAnimationDrawingAreaProxy::updateAcceleratedCompositingMode): Pipe layer hosting changes around. * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::layerHostingMode): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::viewStateDidChange): Cache the current layer hosting mode so we don't overzealously tell the WebProcess to reset its context. Re-check layer hosting mode each time we are added/removed from a window. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: Update for new names. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setDeviceScaleFactor): (WebKit::DrawingArea::setLayerHostingMode): * WebProcess/WebPage/DrawingArea.messages.in: Pipe layer hosting changes around. * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm: (WebKit::LayerTreeHostCAMac::~LayerTreeHostCAMac): (WebKit::LayerTreeHostCAMac::platformInitialize): (WebKit::LayerTreeHostCAMac::invalidate): Update for new names. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode): Respond to a change in the layer hosting mode by invalidating our old context, making a new one of the right type, and informing the UIProcess of our new context. * WebKit2.xcodeproj/project.pbxproj: Add new files. 2012-03-05 Anders Carlsson Always update the scroll layer position on the main thread when we have an overlay https://bugs.webkit.org/show_bug.cgi?id=80324 Reviewed by Sam Weinig. Call setForceMainThreadScrollLayerPositionUpdates when installing and uninstalling page overlays, so we'll be able to synchronize painting between the tile cache and the page overlays. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay): (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay): 2012-03-05 Timothy Hatcher Change how the Web Inspector Develop menu actions work. This removes the methods used by Safari's Develop menu. They can now be implemented in Safari. https://webkit.org/b/80308 Reviewed by John Sullivan. * UIProcess/API/C/mac/WKInspectorPrivateMac.h: Renamed from Source/WebKit2/UIProcess/API/C/mac/WKInspectorMac.h. * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter inspectorRef]): Added. * WebKit2.xcodeproj/project.pbxproj: Renamed WKInspectorPrivateMac.h to better reflect its private nature. 2012-03-02 Jon Lee Add support for notification replaceId in Mac WebKit and WK2 https://bugs.webkit.org/show_bug.cgi?id=80206 Reviewed by Sam Weinig. * UIProcess/API/C/WKNotification.cpp: Add WK API. (WKNotificationCopyReplaceID): * UIProcess/API/C/WKNotification.h: * UIProcess/Notifications/WebNotification.cpp: (WebKit::WebNotification::WebNotification): * UIProcess/Notifications/WebNotification.h: Add replaceID member. (WebKit::WebNotification::create): (WebKit::WebNotification::replaceID): (WebNotification): * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::show): * UIProcess/Notifications/WebNotificationManagerProxy.h: (WebNotificationManagerProxy): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::showNotification): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: Add replaceID to the showNotification message. * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::show): 2012-03-05 Sheriff Bot Unreviewed, rolling out r109748. http://trac.webkit.org/changeset/109748 https://bugs.webkit.org/show_bug.cgi?id=80296 Made some tests crash, will fix and recommit (Requested by noamr on #webkit). * Target.pri: * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPagePrivate::paintToCurrentGLContext): (PageProxyNode::PageProxyNode): (PageProxyNode): (PageProxyNode::changedStates): (PageProxyNode::render): (PageProxyNode::~PageProxyNode): (QQuickWebPage::updatePaintNode): (QQuickWebPagePrivate::updateSize): (QQuickWebPagePrivate::resetPaintNode): (QQuickWebPagePrivate::~QQuickWebPagePrivate): * UIProcess/API/qt/qquickwebpage_p_p.h: (QQuickWebPagePrivate): * UIProcess/DrawingAreaProxy.h: (WebKit): (WebKit::DrawingAreaProxy::layerTreeHostProxy): (DrawingAreaProxy): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::syncAnimations): (WebKit::LayerTreeHostProxy::updateViewport): (WebKit::LayerTreeHostProxy::syncLayerParameters): (WebKit::LayerTreeHostProxy::flushLayerChanges): (WebKit::LayerTreeHostProxy::ensureRootLayer): (WebKit::LayerTreeHostProxy::syncRemoteContent): (WebKit::LayerTreeHostProxy::dispatchUpdate): (WebKit): (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage): (WebKit::LayerTreeHostProxy::purgeGLResources): * UIProcess/qt/QtWebPageSGNode.cpp: Removed. * UIProcess/qt/QtWebPageSGNode.h: Removed. 2012-03-05 Joone Hur [GTK] zlib link error with --enable-webkit2 https://bugs.webkit.org/show_bug.cgi?id=79877 Reviewed by Martin Robinson. zlib should be linked properly. * GNUmakefile.am: Link $(ZLIB_LIBS) with libwebkit2gtk instead of linking it with WebKitWebProcess. 2012-03-05 Carlos Garcia Campos [WK2] WKPageGetContextMenuFromProposedContextMenuCallback should pass a HitTestResult https://bugs.webkit.org/show_bug.cgi?id=77208 Reviewed by Anders Carlsson. A HitTestResultData is now passed to ShowContextMenu WebPageProxy message instead of the ContextMenuState. ContextMenu client has been updated to pass the HitTestResult to the getContextMenuFromProposedMenu callback. * GNUmakefile.am: Remove ContextMenuState.h. * Shared/APIClientTraits.h: * Shared/ContextMenuState.h: Removed. * Shared/WebHitTestResult.h: (WebKit::WebHitTestResult::Data::Data): Add constructor that takes a WebCore::HitTestResult. * UIProcess/API/C/WKPage.h: Add HitTestResult parameter to getContextMenuFromProposedMenu callback and deprecate the old version. * UIProcess/WebPageContextMenuClient.cpp: (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu): Pass a HitTestResult to getContextMenuFromProposedMenu or use the deprecated one if client version is an old one. * UIProcess/WebPageContextMenuClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::showContextMenu): (WebKit::WebPageProxy::internalShowContextMenu): Save the WebHitTestResult::Data to use it for handling context menu actions. (WebKit::WebPageProxy::contextMenuItemSelected): Use the saved WebHitTestResult::Data. * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebKit2.xcodeproj/project.pbxproj: Remove ContextMenuState.h. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::mouseDidMoveOverElement): Use the new WebHitTestResult::Data constructor that takes a WebCore::HitTestResult. * WebProcess/WebPage/WebContextMenu.cpp: (WebKit::WebContextMenu::show): Create a WebHitTestResult::Data instead of a ContextMenuState and pass it to ShowContextMenu message. * win/WebKit2.vcproj: ContextMenuState.h. 2012-03-05 No'am Rosenthal [Qt] [WK2] Support threaded renderer in WK2 https://bugs.webkit.org/show_bug.cgi?id=76661 Made the appropriate fixes in the UI process code to make rendering thread-safe. - Separated the scenegraph node code to QtWebPageSGNode. QtWebPageSGNode has direct access to LayerTreeHostProxy. - Each function in LayerTreeHostProxy can be either called from the main thread (handling messages from the web process), or from the renderer thread (handling the GL context). The render-queue is locked with a mutex, and messages back to the web process are sent via callOnMainThread. - LayerTreeHostProxy is now ThreadSafeRefCounted. That is done to make sure that the GL resources it creates are only freed when the QtWebPageSGNode is deleted, which can be before or after the owning DrawingAreaProxy is deleted. This ensures that the class is deleted only after its GL resources are freed, otherwise those resources may leak. Based on a patch by Viatcheslav Ostapenko. Reviewed by Kenneth Rohde Christiansen. * Target.pri: Added new files. * UIProcess/API/qt/qquickwebpage.cpp: Moved QtWebPageSGNode out. (QQuickWebPage::updatePaintNode): Call QtWebPageSGNode (QQuickWebPagePrivate::updateSize): Call QtWebPageSGNode (QQuickWebPagePrivate::didDeleteSGWebPageNode): Override QtWebPageSGNode::Client (QQuickWebPagePrivate::~QQuickWebPagePrivate): * UIProcess/API/qt/qquickwebpage_p_p.h: (QQuickWebPagePrivate): * UIProcess/DrawingAreaProxy.h: (WebKit): (WebKit::DrawingAreaProxy::layerTreeHostProxy): Made LayerTreeHostProxy ref-counted. (DrawingAreaProxy): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): * UIProcess/LayerTreeHostProxy.h: (WebKit): (WebKit::LayerTreeHostProxy::create): (LayerTreeHostProxy): * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::paintToCurrentGLContext): (WebKit): (MainThreadGuardedInvoker): A class that allows invoking functions in the main thread, while guarding a ref- counted object. (WebKit::MainThreadGuardedInvoker::call): (WebKit::MainThreadGuardedInvoker::MainThreadGuardedInvoker): (WebKit::MainThreadGuardedInvoker::invoke): (WebKit::LayerTreeHostProxy::syncAnimations): (WebKit::LayerTreeHostProxy::updateViewport): (WebKit::LayerTreeHostProxy::detachDrawingArea): (WebKit::LayerTreeHostProxy::syncLayerParameters): (WebKit::LayerTreeHostProxy::setShouldRenderNextFrame): (WebKit::LayerTreeHostProxy::flushLayerChanges): (WebKit::LayerTreeHostProxy::ensureRootLayer): (WebKit::LayerTreeHostProxy::syncRemoteContent): (WebKit::LayerTreeHostProxy::dispatchUpdate): (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage): (WebKit::LayerTreeHostProxy::purgeGLResources): * UIProcess/qt/QtWebPageSGNode.cpp: Added. * UIProcess/qt/QtWebPageSGNode.h: Added. 2012-03-04 Raphael Kubo da Costa [CMake] Libraries are installed to /usr/lib and not /usr/lib64 on x86_64 https://bugs.webkit.org/show_bug.cgi?id=71507 Reviewed by Antonio Gomes. * CMakeLists.txt: Use ${LIB_INSTALL_DIR} instead of hardcoding "lib". 2012-03-03 Simon Hausmann [Qt] Fix static_libs_as_shared build https://bugs.webkit.org/show_bug.cgi?id=80214 Reviewed by Tor Arne Vestbø. Replace (static) link time dependency to WK1 with entrypoint in the separate WebProcess for activating the QStyle theme if necessary. * Target.pri: * UIProcess/Launcher/ProcessLauncher.h: * WebProcess/qt/WebProcessMainQt.cpp: (WebKit::WebProcessMainQt): * qt/MainQt.cpp: (WebKit): (main): 2012-03-03 Hans Wennborg Implement Speech JavaScript API https://bugs.webkit.org/show_bug.cgi?id=80019 Reviewed by Adam Barth. Add ENABLE_SCRIPTED_SPEECH. * Configurations/FeatureDefines.xcconfig: 2012-03-03 No'am Rosenthal [Qt] Use the existing inheritedOpacity/matrix properties of QSGNode https://bugs.webkit.org/show_bug.cgi?id=79543 Use QSGNode::inheritedOpacity() and QSGNode::matrix(). Also, remove flags from changedStates() that we don't actually touch. This is covered by existing API tests. Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPagePrivate::paintToCurrentGLContext): (PageProxyNode::changedStates): (PageProxyNode::render): * UIProcess/API/qt/qquickwebpage_p_p.h: (QQuickWebPagePrivate): 2012-03-03 Anders Carlsson Fix build with newer versions of clang. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Cast the switch parameter to unsigned to prevent warnings about case values not being part of the enum type. 2012-03-02 Andy Estes Move nsStringFromWebCoreString out of PageClientImpl https://bugs.webkit.org/show_bug.cgi?id=80202 Reviewed by Sam Weinig. nsStringFromWebCoreString() doesn't really belong in PageClientImpl.mm, and it makes us include PageClientImpl.h in places where we shouldn't. Move this function into StringUtilities.{h, mm}. * Platform/mac/StringUtilities.h: Added. * Platform/mac/StringUtilities.mm: Added. (WebKit::nsStringFromWebCoreString): * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: * UIProcess/API/mac/WKView.mm: * UIProcess/mac/WebContextMenuProxyMac.mm: * UIProcess/mac/WebPageProxyMac.mm: * UIProcess/mac/WebPopupMenuProxyMac.mm: * UIProcess/mac/WebPreferencesMac.mm: * WebKit2.xcodeproj/project.pbxproj: 2012-03-02 Andy Estes Remove com.apple.WebKit.PluginProcess.sb from WebKit2.xcodeproj's Headers build phase https://bugs.webkit.org/show_bug.cgi?id=80197 Reviewed by Alexey Proskuryakov. It doesn't belong there, and it makes Xcode consider the project to be invalid, triggering assertions in some builds of Xcode. * WebKit2.xcodeproj/project.pbxproj: 2012-03-02 Tor Arne Vestbø [Qt] Fix spelling mistake in header guard Reviewed by Noam Rosenthal. * UIProcess/API/qt/qwebviewportinfo_p.h: 2012-03-02 Carlos Garcia Campos [GTK] Invalid check in webkit_web_view_set_zoom_level() when zoom-text-only is enabled https://bugs.webkit.org/show_bug.cgi?id=80150 Reviewed by Philippe Normand. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_set_zoom_level): Use webkit_web_view_get_zoom_level() instead of WKPageGetPageZoomFactor() to get the current effective zoom level depending on zoom-text-only setting. 2012-03-02 Allan Sandfeld Jensen Fix build on AppleWebKit after 109548. * mac/WebKit2.order: 2012-03-02 Simon Hausmann [Qt] Fix tests run with WTR not using QStyle theme https://bugs.webkit.org/show_bug.cgi?id=80147 Reviewed by Csaba Osztrogonác. Use an environment variable (set by WTR) to select the QStyle theme. This is a temporary kludge until we rebase the layout tests to use the QStyle independent "mobile" theme. This also temporarily breaks the force_static_libs_as_shared build. * Target.pri: * WebProcess/qt/WebProcessMainQt.cpp: (WebKit::WebProcessMainQt): 2012-03-02 Simon Hausmann [Qt] Compile WebCore without QtWidgets https://bugs.webkit.org/show_bug.cgi?id=80141 Reviewed by Tor Arne Vestbø. * Shared/qt/WebEventFactoryQt.cpp: Removed unnecessary include. * Target.pri: Require widgets for WK2 for the moment, until bug #79458 is fixed. 2012-03-02 Allan Sandfeld Jensen Suspend/Resume API for pausing timers and animations. https://bugs.webkit.org/show_bug.cgi?id=76063 Based on the initial work of Zalan Bujtas , Adds suspend and resume API for WebKit2 and uses it in Qt to suspend animations and DOM timers during panning and zoom. Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::_q_suspend): (QQuickWebViewFlickablePrivate::_q_resume): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::resumeActiveDOMObjectsAndAnimations): (WebKit::WebPageProxy::suspendActiveDOMObjectsAndAnimations): (WebKit::WebPageProxy::processDidCrash): * UIProcess/WebPageProxy.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::suspendActiveDOMObjectsAndAnimations): (WebKit::WebPage::resumeActiveDOMObjectsAndAnimations): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2012-03-02 Joone Hur Unreviewed. Fix WebKit2 GTK+ build. * GNUmakefile.am: allow WebKitWebProcess to link with zlib properly. 2012-03-01 Andras Becsi [Qt][WK2] Make the interaction with the Flickable work on the N9 https://bugs.webkit.org/show_bug.cgi?id=80029 Reviewed by Simon Hausmann. Because the WebView item accepts all touch events it receives and sends them to the web process before propagating them to the gesture recognizers, which is correct behaviour, we can not rely on the touch->mouse conversion of Qt5 when controlling Flickable. Hence we need to convert the received touch events to mouse events in the QtFlickProvider. * UIProcess/qt/QtFlickProvider.cpp: (QtFlickProvider::handleTouchFlickEvent): Do the touch to mouse event conversion for the Flickable. * UIProcess/qt/QtPanGestureRecognizer.cpp: (WebKit::QtPanGestureRecognizer::recognize): A touch begin event should cancel the previous pan gesture and stop the ongoing flick animation. 2012-03-01 Anders Carlsson Assertion failure in pageContainsAnyHorizontalScrollbars() (scrollableArea->isOnActivePage()) when leaving pages with embedded PDFs https://bugs.webkit.org/show_bug.cgi?id=80044 Reviewed by Brady Eidson. Remove the code that would add and remove wheel event handlers since that's not what we want to track. Instead, dynamically add and remove the view as its scrollbars come and go. * WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (WebKit::BuiltInPDFView::updateScrollbars): (WebKit::BuiltInPDFView::initialize): * WebProcess/Plugins/PDF/BuiltInPDFView.h: (BuiltInPDFView): 2012-03-01 Kangil Han [DRT] Remove all PlainTextController usages in existing tests by adding internal API https://bugs.webkit.org/show_bug.cgi?id=78570 Reviewed by Hajime Morita. This patch will remove all PlainTextController usages in existing DRT tests by adding internal API to WebCore/testing/Internals * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-03-01 Nikolas Zimmermann Unreviewed, rolling out r109255. http://trac.webkit.org/changeset/109255 https://bugs.webkit.org/show_bug.cgi?id=79932 Breaks rounded rects with dashed strokes in SVG * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2012-03-01 Sergio Villar Senin [WK2] [GTK] [libsoup] SoupSession should use system CA https://bugs.webkit.org/show_bug.cgi?id=79657 Reviewed by Martin Robinson. SoupSession sould use system CA list to validate SSL certificates. Do not use strict certificate validation though as we want clients to decide whether or not accept/decline invalid certificates (API to be added later). No new tests required as current behaviour does not change at all as we continue to accept invalid certificates by default. * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): 2012-03-01 Carlos Garcia Campos Unreviewed. Fix WebKit2 GTK+ build. * UIProcess/API/gtk/WebKitDefines.h: * UIProcess/API/gtk/WebKitWebView.h: 2012-02-29 Simon Hausmann [Qt][WK2] QQuickWebView::event should lookup faster which events QQuickWebPage can handle https://bugs.webkit.org/show_bug.cgi?id=78047 Reviewed by Kenneth Rohde Christiansen. Replaced double-dispatch of events with direct forwarding of events from QQuickWebView::*Event to QtWebPageEventHandler::handle*Event. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::keyPressEvent): (QQuickWebView::keyReleaseEvent): (QQuickWebView::inputMethodEvent): (QQuickWebView::focusInEvent): (QQuickWebView::focusOutEvent): (QQuickWebView::touchEvent): (QQuickWebView::mousePressEvent): (QQuickWebView::mouseMoveEvent): (QQuickWebView::mouseReleaseEvent): (QQuickWebView::mouseDoubleClickEvent): (QQuickWebView::wheelEvent): (QQuickWebView::hoverEnterEvent): (QQuickWebView::hoverMoveEvent): (QQuickWebView::hoverLeaveEvent): (QQuickWebView::dragMoveEvent): (QQuickWebView::dragEnterEvent): (QQuickWebView::dragLeaveEvent): (QQuickWebView::dropEvent): (QQuickWebView::event): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handleMouseMoveEvent): (QtWebPageEventHandler::handleMousePressEvent): (QtWebPageEventHandler::handleMouseReleaseEvent): (QtWebPageEventHandler::handleWheelEvent): (QtWebPageEventHandler::handleHoverLeaveEvent): (QtWebPageEventHandler::handleHoverMoveEvent): (QtWebPageEventHandler::handleDragEnterEvent): (QtWebPageEventHandler::handleDragLeaveEvent): (QtWebPageEventHandler::handleDragMoveEvent): (QtWebPageEventHandler::handleDropEvent): (QtWebPageEventHandler::handleKeyPressEvent): (QtWebPageEventHandler::handleKeyReleaseEvent): (QtWebPageEventHandler::handleFocusInEvent): (QtWebPageEventHandler::handleFocusOutEvent): (QtWebPageEventHandler::handleInputMethodEvent): (QtWebPageEventHandler::handleTouchEvent): * UIProcess/qt/QtWebPageEventHandler.h: (QtWebPageEventHandler): 2012-03-01 Csaba Osztrogonác [Qt][WK2] Unreviewed buildfix after r109277. * WebProcess/qt/QtBuiltinBundlePage.cpp: (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): 2012-02-29 No'am Rosenthal [Qt][WK2] Get rid of the #ifdef mess in LayerTreeHost[Proxy] https://bugs.webkit.org/show_bug.cgi?id=79501 Use a new UI_SIDE_COMPOSITING flag instead of the several #ifdef flags we currently use. Reviewed by Kenneth Rohde Christiansen. * Shared/WebLayerTreeInfo.cpp: * Shared/WebLayerTreeInfo.h: * UIProcess/DrawingAreaProxy.cpp: (WebKit): * UIProcess/DrawingAreaProxy.h: (DrawingAreaProxy): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): (WebKit): * UIProcess/DrawingAreaProxyImpl.h: (DrawingAreaProxyImpl): * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveMessage): * UIProcess/qt/LayerBackingStore.cpp: * UIProcess/qt/LayerBackingStore.h: * UIProcess/qt/LayerTreeHostProxyQt.cpp: * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: * WebProcess/WebCoreSupport/WebGraphicsLayer.h: * WebProcess/WebPage/DrawingArea.h: (DrawingArea): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit): * WebProcess/WebPage/DrawingAreaImpl.h: (DrawingAreaImpl): * WebProcess/WebPage/LayerTreeHost.cpp: (WebKit::LayerTreeHost::create): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::purgeBackingStores): * WebProcess/WebPage/qt/LayerTreeHostQt.h: (LayerTreeHostQt): 2012-02-28 Brian Weinstein WebKit2: didNewFirstVisuallyNonEmptyLayout should be sent to injected bundle https://bugs.webkit.org/show_bug.cgi?id=79849 Tell the injected bundle about didNewFirstVisuallyNonEmptyLayout (we currently just tell the UI process). Reviewed by Beth Dakin. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Add didNewFirstVisuallyNonEmptyLayout to version 1. * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::didNewFirstVisuallyNonEmptyLayout): Call through to the client. * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: (InjectedBundlePageLoaderClient): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidNewFirstVisuallyNonEmptyLayout): Tell the injected bundle. 2012-02-29 Tim Horton Make use of CG rounded-rect primitives https://bugs.webkit.org/show_bug.cgi?id=79932 Reviewed by Simon Fraser. Add wkCGPathAddRoundedRect. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2012-02-29 Andy Estes CFURLDownloadScheduleWithCurrentMessageQueue only exists on Windows https://bugs.webkit.org/show_bug.cgi?id=79936 Reviewed by Brady Eidson. CFURLDownloadScheduleWithCurrentMessageQueue only exists on Windows platforms. Non-Windows platforms that use CFNetwork-based downloads should omit this call. * WebProcess/Downloads/cfnet/DownloadCFNet.cpp: (WebKit::Download::start): 2012-02-29 Rafael Brandao [Qt][WK2] We should not add NetscapeBrowserFuncs.cpp as header https://bugs.webkit.org/show_bug.cgi?id=79847 Reviewed by Alexey Proskuryakov. * Target.pri: Fix typo, so we can add ".h" file instead. 2012-02-29 Sam Weinig When invoking Lookup while zoomed in, the highlighted word renders out of line Reviewed by Simon Fraser. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::performDictionaryLookupForRange): Make sure to scale the ascent when determining the origin for the overlay. 2012-02-29 Carlos Garcia Campos [GTK] Use text or page zoom factor in WebKitWebView depending on zoom-text-only https://bugs.webkit.org/show_bug.cgi?id=75252 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitWebView.cpp: (zoomTextOnlyChanged): Update text/page zoom factor when zoom-text-only setting changes. (webkitWebViewSetSettings): Helper function to set the settings object for the web view, initializing the settings for the page and connecting to notify::zoom-text-only signal. (webkitWebViewConstructed): Use webkitWebViewSetSettings(). (webkit_web_view_set_settings): Use webkitWebViewSetSettings() and disconnect from the notify::zoom-text-only signal of the previous settings object. (webkit_web_view_set_zoom_level): Set text/page zoom factor depending on WebKitSettings:zoom-text-only property. (webkit_web_view_get_zoom_level): Get text/page zoom factor depending on WebKitSettings:zoom-text-only property. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewZoomLevel): 2012-02-29 Carlos Garcia Campos [GTK] Add zoom-text-only setting to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=75249 Reviewed by Gustavo Noronha Silva. To set whether zoom level of web view should affect only the text or all page contents. It's disabled by default. * UIProcess/API/gtk/WebKitSettings.cpp: (webKitSettingsSetProperty): (webKitSettingsGetProperty): (webkit_settings_class_init): Add WebKitSettings:zoom-text-only property. (webkit_settings_set_zoom_text_only): Set WebKitSettings:zoom-text-only. (webkit_settings_get_zoom_text_only): Get WebKitSettings:zoom-text-only. * UIProcess/API/gtk/WebKitSettings.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: (testWebKitSettings): 2012-02-29 Sergio Villar Senin DidFindString should be emitted even if FindOptionsShowOverlay is not enabled https://bugs.webkit.org/show_bug.cgi?id=76522 Reviewed by Darin Adler. DidFindString message should be issued always even if neither FindOptionsShowOverlay or FindOptionsShowHighlight are provided. The difference is that if any of those flags are present the find operation will look for all the appearances of the text in the web view, otherwise it will just look and report the next occurrence. This patch removes the temporary workaround added in r109222 to the WebKitFindController unit tests. * UIProcess/API/gtk/tests/TestWebKitFindController.cpp: * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::findString): 2012-01-19 Sergio Villar Senin [GTK] [WK2] Add Find API https://bugs.webkit.org/show_bug.cgi?id=76070 Reviewed by Martin Robinson. This patch adds a new public find API for the Gtk+ WK2 port. It defines a new object called WebKitFindController owned by each WebKitWebView. Clients will use this new object to search strings in the WebKitWebView. Changes include also documentation and unit tests for the new public API. * GNUmakefile.am: * UIProcess/API/gtk/WebKitDefines.h: * UIProcess/API/gtk/WebKitFindController.cpp: Added. (didFindString): implementation of the WKPage Find interface. (didFailToFindString): Ditto. (didCountStringMatches): Ditto. (webkit_find_controller_init): (getWKPageFromWebKitWebView): (webkitFindControllerConstructed): (webkitFindControllerGetProperty): (webkitFindControllerSetProperty): (webkitFindControllerFinalize): (webkit_find_controller_class_init): (webkit_find_controller_get_search_text): (webkit_find_controller_get_options): (webkit_find_controller_get_max_match_count): (webkit_find_controller_get_web_view): (webKitFindControllerPerform): (webKitFindControllerSetSearchData): (webkit_find_controller_search): asynchronously looks for the search string in the WebKitWebView. (webkit_find_controller_search_finish): unhighlights text matches. (webkit_find_controller_search_next): (webkit_find_controller_search_previous): (webkit_find_controller_count_matches): asynchronously counts the number of matches of the search string in the WebKitWebView. * UIProcess/API/gtk/WebKitFindController.h: Added. * UIProcess/API/gtk/WebKitPrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_get_find_controller): returns the WebKitFindController instance owned by the WebKitWebView. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: * UIProcess/API/gtk/docs/webkit2gtk.types: * UIProcess/API/gtk/tests/GNUmakefile.am: * UIProcess/API/gtk/tests/TestWebKitFindController.cpp: Added. (testFindControllerTextFound): (testFindControllerTextNotFound): (testFindControllerMatchCount): (testFindControllerMaxMatchCount): (testFindControllerNext): (testFindControllerPrevious): (testFindControllerCountedMatches): (testFindControllerOptions): (testFindControllerInstance): (testFindControllerGetters): (testFindControllerHide): (beforeAll): (afterAll): * UIProcess/API/gtk/webkit2.h: 2012-02-28 Simon Fraser Update WebKitSystemInterface. Reviewed by Sam Weinig. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2012-02-28 Hugo Parente Lima All mouse events after a right click are ignored when they came from WebkitTestRunner https://bugs.webkit.org/show_bug.cgi?id=77350 Reviewed by Chang Shu. Never ignore mouse events when using sync events, even if the context menu is being show but the Ui did replied the ShowContextMenu event with a ContextMenuHidden. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mouseEventSyncForTesting): 2012-02-28 Alexey Proskuryakov More build fix. * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: Check for build platform properly. 2012-02-28 Alexey Proskuryakov Build fix. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Check for build platform properly. 2012-02-28 Enrica Casucci More Pasteboard code cleanup. https://bugs.webkit.org/show_bug.cgi?id=79816 Removing the last references to NSPasteboard. Reviewed by Alexey Proskuryakov. * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: (WebKit::WebEditorClient::setInsertionPasteboard): 2012-02-28 Alexey Proskuryakov [Mac] Add an experimental SPI for plug-ins to enter sandbox https://bugs.webkit.org/show_bug.cgi?id=79709 Reviewed by Anders Carlsson. * PluginProcess/PluginProcess.h: (WebKit::PluginProcess::pluginPath): Exposed plugin path. * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb: Added. * WebKit2.xcodeproj/project.pbxproj: Added new files. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Exposed a function to access sandboxing functions when available. * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h: Added. * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: Added. 2012-02-28 Mahesh Kulkarni [Qt] Allow read/write to the WebView.url property https://bugs.webkit.org/show_bug.cgi?id=77554 Reviewed by Tor Arne Vestbø. Change QML API WebView.url to read/write to reflect either the url requested by the user. Also removed WebView.load(url). Defers setting url (loading page) until onComponentComplete is triggered. Fixed c++ and qml tests to reflect the new API. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::onComponentComplete): (QQuickWebView::setUrl): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_origin.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::loadEmptyPageViewHidden): (tst_QQuickWebView::loadNonexistentFileUrl): 2012-02-28 Jocelyn Turcotte [Qt] Signal and property cleanup in QQuickWebView https://bugs.webkit.org/show_bug.cgi?id=78820 Reviewed by Noam Rosenthal. - Remove parameters from property change notify signals: titleChanged, urlChanged, iconChanged, loadProgressChanged - Rename the parameters of linkHovered to prevent shadoing properties of WebView - Rename navigationStateChanged to navigationHistoryChanged * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::_q_onUrlChanged): (QQuickWebViewPrivate::setIcon): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::loadProgress): * UIProcess/qt/QtWebPageLoadClient.cpp: (QtWebPageLoadClient::didCommitLoadForFrame): (QtWebPageLoadClient::didSameDocumentNavigationForFrame): (QtWebPageLoadClient::didReceiveTitleForFrame): (QtWebPageLoadClient::setLoadProgress): * UIProcess/qt/QtWebPageLoadClient.h: (QtWebPageLoadClient): 2012-02-28 Mario Sanchez Prada [GTK] Add GMainLoop and GMainContext to be handled by GRefPtr https://bugs.webkit.org/show_bug.cgi?id=79496 Reviewed by Martin Robinson. Updated places where raw pointers to GMainLoop and GMainContext were being used, replacing them with GRefPtr-based code. * Platform/WorkQueue.h: (WorkQueue): * Platform/gtk/WorkQueueGtk.cpp: (WorkQueue::platformInitialize): (WorkQueue::platformInvalidate): (WorkQueue::workQueueThreadBody): (WorkQueue::registerEventSourceHandler): (WorkQueue::dispatchOnSource): * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk): (WebKit::WebPopupMenuProxyGtk::showPopupMenu): (WebKit::WebPopupMenuProxyGtk::shutdownRunLoop): * UIProcess/gtk/WebPopupMenuProxyGtk.h: (WebPopupMenuProxyGtk): 2012-02-28 Jocelyn Turcotte [Qt] Initialize QtWebContext as much as we can in its constructor. https://bugs.webkit.org/show_bug.cgi?id=79809 Reviewed by Tor Arne Vestbø. The icon database wouldn't be initialized on the QtWebContext while in WebKitTestRunner since it doesn't call the initialize method on it after creating it. Remove the initialize method, move the download manager and icon database initialization in the constructor and call initializeContextInjectedBundleClient directly in defaultContext to prevent overriding WKTR's injected bundle client. * UIProcess/qt/QtWebContext.cpp: (WebKit::QtWebContext::QtWebContext): (WebKit::QtWebContext::defaultContext): * UIProcess/qt/QtWebContext.h: (QtWebContext): 2012-02-28 Carlos Garcia Campos [GTK] Inconsistent state of WebKitWebView when replacing content in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=79775 Reviewed by Martin Robinson. Use an enum instead of a boolean to track the status of a replace_content() load operation. We need to know when the load of the replace content actually starts to not ignore valid load events of a previous ongoing load operation. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewLoadChanged): Transit to new replace content state when replacing content depending on the load event. (webkitWebViewLoadFailed): Ignore load failed events when replacing content. (webkitWebViewSetEstimatedLoadProgress): Ignore load progress when replacing content. (webkit_web_view_replace_content): Set replace content status to WillReplaceContent. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (replaceContentLoadCallback): (testWebViewReplaceContent): * UIProcess/API/gtk/tests/WebViewTest.cpp: (titleChanged): (WebViewTest::waitUntilTitleChanged): Convenient method to wait until title changes. Use with replaceConent() since load events are not emitted when replacing content. * UIProcess/API/gtk/tests/WebViewTest.h: 2012-02-27 Anders Carlsson Add basic page overlay support to TiledCoreAnimationDrawingArea https://bugs.webkit.org/show_bug.cgi?id=79716 Reviewed by Sam Weinig. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: Make TiledCoreAnimationDrawingArea a GraphicsLayerClient. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay): Create the page overlay layer. (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay): Destroy the page overlay layer. (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay): Mark the page overlay layer as needing display. (WebKit::TiledCoreAnimationDrawingArea::notifyAnimationStarted): (WebKit::TiledCoreAnimationDrawingArea::notifySyncRequired): Add empty GraphisLayerClient member function implementations. (WebKit::TiledCoreAnimationDrawingArea::paintContents): Ask the page overlay to paint itself. (WebKit::TiledCoreAnimationDrawingArea::flushLayers): Flush the page overlay layer. (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): Resize the page overlay layer. (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): If we have a page overlay layer, add it as a sublayer of the root layer. (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): Create the page overlay layer and add it as a sublayer of the root layer. (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer): Remove the page overlay layer and destroy it. 2012-02-28 Carlos Garcia Campos [GTK] Remove virtual methods of WebKitDownload signals in WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=79804 Reviewed by Martin Robinson. That comes from the first patch that followed the approach of the first LoaderClient implementation. With current implementation download signals, except decide-destination, don't need to be true_handled, and they won't have a default handler implementation. Also the download object is not supposed to be inheritable, since instances are created privately by the WebContext, so it's not possible to override the virtual methods in derived classes. * UIProcess/API/gtk/WebKitDownload.cpp: (webkit_download_class_init): (webkitDownloadNotifyProgress): (webkitDownloadFailed): (webkitDownloadFinished): * UIProcess/API/gtk/WebKitDownload.h: (_WebKitDownloadClass): * UIProcess/API/gtk/webkit2marshal.list: 2012-02-28 Caio Marcelo de Oliveira Filho [Qt] Fix build for WK2, do not use enum type if values can be outside the enum https://bugs.webkit.org/show_bug.cgi?id=79800 Reviewed by Csaba Osztrogonác. We have two different enums called NavigationRequestAction. If we use one of them to store the variables, compilers can rightfully warn about comparison with values from other enums. We might revisit the strategy of exposing different enumerations in experimental, but for now, fallback to using int for the 'action' property in QWebNavigationRequest. * UIProcess/API/qt/qwebnavigationrequest.cpp: (QWebNavigationRequestPrivate): (QWebNavigationRequest::setAction): (QWebNavigationRequest::action): * UIProcess/API/qt/qwebnavigationrequest_p.h: * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: 2012-02-27 Caio Marcelo de Oliveira Filho [Qt] API changes to QWebNavigationRequest https://bugs.webkit.org/show_bug.cgi?id=78821 Reviewed by Kenneth Rohde Christiansen. Changes discussed in API review at Szeged: rename 'button' to 'mouseButton', rename 'modifiers' to 'keyboardModifiers', remove 'originatingUrl' and use the enum type for 'action'. * UIProcess/API/qt/qwebnavigationrequest.cpp: (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate): (QWebNavigationRequestPrivate): (QWebNavigationRequest::QWebNavigationRequest): (QWebNavigationRequest::setAction): (QWebNavigationRequest::mouseButton): (QWebNavigationRequest::keyboardModifiers): (QWebNavigationRequest::action): * UIProcess/API/qt/qwebnavigationrequest_p.h: * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml: * UIProcess/qt/QtWebPagePolicyClient.cpp: (QtWebPagePolicyClient::decidePolicyForNavigationAction): * UIProcess/qt/QtWebPagePolicyClient.h: (QtWebPagePolicyClient): 2012-02-28 Shinya Kawanaka Element should be able to have multiple shadow roots. https://bugs.webkit.org/show_bug.cgi?id=77931 Reviewed by Hajime Morita. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-02-28 Hugo Parente Lima [Qt][WK2] Use movementStarted/Ended signals instead of movingChanged on QtViewportInterationEngine https://bugs.webkit.org/show_bug.cgi?id=79521 Reviewed by Kenneth Rohde Christiansen. movingChanged() signal is emitted many times, so the use of movementStarted() and movementEnded() is a better choice. * UIProcess/qt/QtFlickProvider.cpp: (QtFlickProvider::QtFlickProvider): * UIProcess/qt/QtFlickProvider.h: (QtFlickProvider): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-02-27 Shinya Kawanaka Element::removeShadowRoot() and setShadowRoot() should be moved into ShadowTree. https://bugs.webkit.org/show_bug.cgi?id=78313 Reviewed by Hajime Morita. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-02-27 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=79725 doesn't work in WebKit2 Reviewed by Alexey Proskuryakov. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Push the WK2 setting to WebCore::Settings. 2012-02-27 Enrica Casucci WebKit2: implement platform strategy to access Pasteboard in the UI process. https://bugs.webkit.org/show_bug.cgi?id=79253 Reviewed by Alexey Proskuryakov. * UIProcess/WebContext.h: * UIProcess/WebContext.messages.in: Added messages to access NSPasteboard in the UI process. * UIProcess/mac/WebContextMac.mm: Added methods corresponding to the new messages. (WebKit::WebContext::getPasteboardTypes): (WebKit::WebContext::getPasteboardPathnamesForType): (WebKit::WebContext::getPasteboardStringForType): (WebKit::WebContext::getPasteboardBufferForType): (WebKit::WebContext::pasteboardCopy): (WebKit::WebContext::getPasteboardChangeCount): (WebKit::WebContext::getPasteboardUniqueName): (WebKit::WebContext::getPasteboardColor): (WebKit::WebContext::setPasteboardTypes): (WebKit::WebContext::setPasteboardPathnamesForType): (WebKit::WebContext::setPasteboardStringForType): (WebKit::WebContext::setPasteboardBufferForType): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: New implementation of the PasteboardStrategy using message exchange with the UI process. (WebKit::WebPlatformStrategies::getTypes): (WebKit::WebPlatformStrategies::bufferForType): (WebKit::WebPlatformStrategies::getPathnamesForType): (WebKit::WebPlatformStrategies::stringForType): (WebKit::WebPlatformStrategies::copy): (WebKit::WebPlatformStrategies::changeCount): (WebKit::WebPlatformStrategies::uniqueName): (WebKit::WebPlatformStrategies::color): (WebKit::WebPlatformStrategies::setTypes): (WebKit::WebPlatformStrategies::setBufferForType): (WebKit::WebPlatformStrategies::setPathnamesForType): (WebKit::WebPlatformStrategies::setStringForType): 2012-02-27 Dan Bernstein REGRESSION (WebKit2): Non-activating links sometimes don’t work https://bugs.webkit.org/show_bug.cgi?id=79607 Reviewed by Adele Peterson. Test: TestWebKitAPI/Tests/mac/AcceptsFirstMouse.mm This was caused by not mapping the mouse event coordinates from window coordinates to document coordinates. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::performDictionaryLookupAtLocation): Convert the point to main frame coordinates when performing the hit test. (WebKit::WebPage::shouldDelayWindowOrderingEvent): Convert the point to the main or focused frame coordinates when perfomring the hit test. (WebKit::WebPage::acceptsFirstMouse): Ditto. 2012-02-27 Timothy Hatcher Add WKInspector API to know when the Web Inspector is the frontmost window. Also makes the Safari Develop menu items work when the Web Inspector is frontmost. https://webkit.org/b/79649 Reviewed by John Sullivan. * UIProcess/API/C/WKInspector.cpp: (WKInspectorIsFront): Added. Call WebInspectorProxy::isFront. * UIProcess/API/C/WKInspector.h: * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::isFront): Added. Call platformIsFront. * UIProcess/WebInspectorProxy.h: * UIProcess/efl/WebInspectorEfl.cpp: (WebKit::WebInspectorProxy::platformIsFront): Added stub. * UIProcess/gtk/WebInspectorGtk.cpp: (WebKit::WebInspectorProxy::platformIsFront): Added stub. * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter showWebInspector:]): Added. Makes the Develop menu items in Safari work when the Web Inspector window is front. (-[WKWebInspectorProxyObjCAdapter showErrorConsole:]): Added. Ditto. (-[WKWebInspectorProxyObjCAdapter showResources:]): Added. Ditto. (-[WKWebInspectorProxyObjCAdapter viewSource:]): Added. Ditto. (-[WKWebInspectorProxyObjCAdapter toggleDebuggingJavaScript:]): Added. Ditto. (-[WKWebInspectorProxyObjCAdapter toggleProfilingJavaScript:]): Added. Ditto. (-[WKWebInspectorProxyObjCAdapter validateUserInterfaceItem:]): Added. Update the menu item titles. (WebKit::WebInspectorProxy::platformIsFront): Added. Return if visible and the window is main. * UIProcess/qt/WebInspectorProxyQt.cpp: (WebKit::WebInspectorProxy::platformIsFront): Added stub. * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::platformIsFront): Added stub. 2012-02-26 YoungTaeck Song [EFL][WK2] Add InjectedBundleEfl.cpp https://bugs.webkit.org/show_bug.cgi?id=75463 Reviewed by Andreas Kling. Add first version of InjectedBundleEfl.cpp including load() and placeholder for activateMacFontAscentHack(). * WebProcess/InjectedBundle/InjectedBundle.h: * WebProcess/InjectedBundle/efl/InjectedBundleEfl.cpp: (WebKit::InjectedBundle::load): (WebKit::InjectedBundle::activateMacFontAscentHack): 2012-02-26 Shinya Kawanaka Rename ShadowRootList to ShadowTree. https://bugs.webkit.org/show_bug.cgi?id=79342 Reviewed by Hajime Morita. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-02-26 Hajime Morrita Move ChromeClient::showContextMenu() to ContextMenuClient https://bugs.webkit.org/show_bug.cgi?id=79427 Reviewed by Adam Barth. * WebProcess/WebCoreSupport/WebChromeClient.cpp: * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: (WebKit): (WebKit::WebContextMenuClient::showContextMenu): Moved from WebChromeClient * WebProcess/WebCoreSupport/WebContextMenuClient.h: (WebContextMenuClient): * WebProcess/WebPage/WebPage.cpp: (WebKit::handleContextMenuEvent): (WebKit::handleMouseEvent): (WebKit::WebPage::mouseEvent): (WebKit::WebPage::mouseEventSyncForTesting): 2012-02-26 Huang Dongsung Use Functional instead of a MessageQueue for messages to the LayerTreeHostProxy renderer. https://bugs.webkit.org/show_bug.cgi?id=79478 This makes a lot of the broilerplate code for message-passing unnecessary, and results in a much more succinct implementation. Reviewed by Noam Rosenthal. * UIProcess/LayerTreeHostProxy.h: (WebKit): (LayerTreeHostProxy): * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit): (WebKit::LayerTreeHostProxy::updateTile): (WebKit::LayerTreeHostProxy::createImage): (WebKit::LayerTreeHostProxy::syncRemoteContent): (WebKit::LayerTreeHostProxy::dispatchUpdate): (WebKit::LayerTreeHostProxy::createTileForLayer): (WebKit::LayerTreeHostProxy::updateTileForLayer): (WebKit::LayerTreeHostProxy::removeTileForLayer): (WebKit::LayerTreeHostProxy::deleteCompositingLayer): (WebKit::LayerTreeHostProxy::setRootCompositingLayer): (WebKit::LayerTreeHostProxy::syncCompositingLayerState): (WebKit::LayerTreeHostProxy::didRenderFrame): (WebKit::LayerTreeHostProxy::createDirectlyCompositedImage): (WebKit::LayerTreeHostProxy::destroyDirectlyCompositedImage): 2012-02-26 Filip Pizlo Build fix for SL. * Platform/mac/RemoteLayerClient.mm: (WebKit::RemoteLayerClient::RemoteLayerClient): 2012-02-26 Sam Weinig Encapsulate uses of WKSI to setup a remote layer into a new RemoteLayerClient class https://bugs.webkit.org/show_bug.cgi?id=79612 Reviewed by Anders Carlsson. * Platform/mac/RemoteLayerClient.h: * Platform/mac/RemoteLayerClient.mm: (WebKit::RemoteLayerClient::create): (WebKit::RemoteLayerClient::RemoteLayerClient): (WebKit::RemoteLayerClient::~RemoteLayerClient): (WebKit::RemoteLayerClient::clientID): (WebKit::RemoteLayerClient::invalidate): New class that encapsulates calls to WKSI WKCARemoteLayerClient*. For platforms where the use of WKSI is not necessary, due to CARemoteLayerClient being available, stop using WKSI. * PluginProcess/PluginControllerProxy.cpp: * PluginProcess/PluginControllerProxy.h: * PluginProcess/mac/PluginControllerProxyMac.mm: (WebKit::PluginControllerProxy::platformInitialize): (WebKit::PluginControllerProxy::platformDestroy): (WebKit::PluginControllerProxy::remoteLayerClientID): (WebKit::PluginControllerProxy::platformGeometryDidChange): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): (WebKit::WebFullScreenManagerMac::disposeOfLayerClient): * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: (LayerTreeHostCAMac): * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm: (WebKit::LayerTreeHostCAMac::platformInitialize): (WebKit::LayerTreeHostCAMac::invalidate): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Switch to using RemoteLayerClient. * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::platformInitializePluginProcess): Use CARemoteLayerServer directly if available. 2012-02-25 Anders Carlsson Address review feedback from Andreas Kling. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::platformHandleMouseEvent): 2012-02-25 Anders Carlsson Mouse tracking incorrect in Silverlight when using multi monitor with offset arrangement https://bugs.webkit.org/show_bug.cgi?id=79589 Reviewed by Sam Weinig. In the Carbon event model, mouse event coordinates are flipped relative to the first screen, whereas the coordinates we get from the WebMouseEvent are flipped relative to the screen where the containing WKView is on. Instead of passing the global coordinates to NPP_HandleEvent, convert them to the flipped screen coordinate system that the plug-in expects. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::platformHandleMouseEvent): 2012-02-25 Sheriff Bot Unreviewed, rolling out r108900. http://trac.webkit.org/changeset/108900 https://bugs.webkit.org/show_bug.cgi?id=79587 broke some API tests, will investigate and re-commit (Requested by noamr on #webkit). * UIProcess/API/qt/qquickwebpage.cpp: (computeEffectiveOpacity): (QQuickWebPagePrivate::paintToCurrentGLContext): (PageProxyNode::changedStates): (PageProxyNode::render): * UIProcess/API/qt/qquickwebpage_p_p.h: (QQuickWebPagePrivate): 2012-02-25 No'am Rosenthal [Qt] Use the existing inheritedOpacity/matrix properties of QSGNode https://bugs.webkit.org/show_bug.cgi?id=79543 Use QSGNode::inheritedOpacity() and QSGNode::matrix(). Also, remove flags from changedStates() that we don't actually touch. Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPagePrivate::paintToCurrentGLContext): (PageProxyNode::changedStates): (PageProxyNode::render): * UIProcess/API/qt/qquickwebpage_p_p.h: (QQuickWebPagePrivate): 2012-02-25 Sheriff Bot Unreviewed, rolling out r108816. http://trac.webkit.org/changeset/108816 https://bugs.webkit.org/show_bug.cgi?id=79562 It made many tests crash and timeout on Qt-WK2 (Requested by ossy__ on #webkit). * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::setIcon): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::loadProgress): * UIProcess/qt/QtWebPageLoadClient.cpp: (QtWebPageLoadClient::didCommitLoadForFrame): (QtWebPageLoadClient::didSameDocumentNavigationForFrame): (QtWebPageLoadClient::didReceiveTitleForFrame): (QtWebPageLoadClient::setLoadProgress): * UIProcess/qt/QtWebPageLoadClient.h: (QtWebPageLoadClient): 2012-02-24 Andy Estes REGRESSION (r108730): Webkit nightlies fails to start due to WKPreferencesGetSuppressIncrementalRendering renaming https://bugs.webkit.org/show_bug.cgi?id=79515 Reviewed by Alexey Proskuryakov. Some versions of Safari contain call sites to two functions in WebKit2 that were removed in r108730. Restore these two functions so that these versions of Safari can be used with WebKit nightly builds. * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetSuppressIncrementalRendering): (WKPreferencesGetSuppressIncrementalRendering): * UIProcess/API/C/WKPreferences.h: 2012-02-24 Jessie Berlin requestPermission callback not invoked if the WebProcess doesn't have to ask the UI Process about the permission level. https://bugs.webkit.org/show_bug.cgi?id=79494 Reviewed by Jon Honeycutt. Invoke the callback in the case where the permission level is known and no message is sent to the UI Process. * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: (WebKit::NotificationPermissionRequestManager::startRequest): 2012-02-24 Jocelyn Turcotte [Qt] Signal and property cleanup in QQuickWebView https://bugs.webkit.org/show_bug.cgi?id=78820 Reviewed by Simon Hausmann. - Remove parameters from property change notify signals: titleChanged, urlChanged, iconChanged, loadProgressChanged - Rename the parameters of linkHovered to prevent shadoing properties of WebView - Rename navigationStateChanged to navigationHistoryChanged * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::_q_onUrlChanged): (QQuickWebViewPrivate::setIcon): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::loadProgress): * UIProcess/qt/QtWebPageLoadClient.cpp: (QtWebPageLoadClient::didCommitLoadForFrame): (QtWebPageLoadClient::didSameDocumentNavigationForFrame): (QtWebPageLoadClient::didReceiveTitleForFrame): (QtWebPageLoadClient::setLoadProgress): * UIProcess/qt/QtWebPageLoadClient.h: (QtWebPageLoadClient): 2012-02-24 Jocelyn Turcotte [Qt] API: Unify the loading properties and signals. https://bugs.webkit.org/show_bug.cgi?id=79486 Reviewed by Simon Hausmann. - Remove the canReload signal, instead assume that calling reload in those cases won't have any effect. - Replace loadStarted, loadSucceeded and loadFailed by a single signal: loadingChanged. The signal carries an argument with a status and error codes giving the intended context. - Use loadingChanged as the notification signal for the property "loading" instead of navigationStateChanged. Also update all API tests to use the new loading signals and add some utility functions to track the loading since the new API aims to be more adapted to declarative logic and the auto tests are using an imperative logic. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::loadDidSucceed): (QQuickWebViewPrivate::didChangeLoadingState): (QQuickWebViewPrivate::processDidCrash): (QQuickWebViewPrivate::didRelaunchProcess): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/qwebloadrequest.cpp: Added. (QWebLoadRequestPrivate): (QWebLoadRequestPrivate::QWebLoadRequestPrivate): (QWebLoadRequest::QWebLoadRequest): (QWebLoadRequest::~QWebLoadRequest): (QWebLoadRequest::url): (QWebLoadRequest::status): (QWebLoadRequest::errorString): (QWebLoadRequest::errorDomain): (QWebLoadRequest::errorCode): * UIProcess/API/qt/qwebloadrequest_p.h: Added. * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_linkHovered.qml: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_loadHtml.qml: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadFail.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadHtml.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgress.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadProgressSignal.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_properties.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml: * UIProcess/API/qt/tests/qmltests/common/TestWebView.qml: Added. * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::navigationStatusAtStartup): (LoadStartedCatcher::LoadStartedCatcher): (LoadStartedCatcher::onLoadingChanged): (tst_QQuickWebView::stopEnabledAfterLoadStarted): (tst_QQuickWebView::loadEmptyPageViewHidden): (tst_QQuickWebView::loadNonexistentFileUrl): (tst_QQuickWebView::backAndForward): (tst_QQuickWebView::reload): (tst_QQuickWebView::stop): (tst_QQuickWebView::loadProgress): (tst_QQuickWebView::showWebView): (tst_QQuickWebView::multipleWebViewWindows): (tst_QQuickWebView::multipleWebViews): (tst_QQuickWebView::scrollRequest): * UIProcess/API/qt/tests/util.cpp: (LoadSpy): (LoadSpy::LoadSpy): (LoadSpy::onLoadingChanged): (waitForLoadSucceeded): (waitForLoadFailed): * UIProcess/API/qt/tests/util.h: * UIProcess/qt/QtWebError.h: * UIProcess/qt/QtWebPageLoadClient.cpp: (QtWebPageLoadClient::didStartProvisionalLoadForFrame): (QtWebPageLoadClient::dispatchLoadFailed): * UIProcess/qt/QtWebPageLoadClient.h: (QtWebPageLoadClient): 2012-02-24 Simon Hausmann Unreviewed, rolling out r108798. http://trac.webkit.org/changeset/108798 https://bugs.webkit.org/show_bug.cgi?id=78047 Broke too many Qt WK2 tests. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::keyPressEvent): (QQuickWebView::keyReleaseEvent): (QQuickWebView::inputMethodEvent): (QQuickWebView::focusInEvent): (QQuickWebView::focusOutEvent): (QQuickWebView::touchEvent): (QQuickWebView::mousePressEvent): (QQuickWebView::mouseMoveEvent): (QQuickWebView::mouseReleaseEvent): (QQuickWebView::mouseDoubleClickEvent): (QQuickWebView::wheelEvent): (QQuickWebView::hoverEnterEvent): (QQuickWebView::hoverMoveEvent): (QQuickWebView::hoverLeaveEvent): (QQuickWebView::dragMoveEvent): (QQuickWebView::dragEnterEvent): (QQuickWebView::dragLeaveEvent): (QQuickWebView::dropEvent): (QQuickWebView::event): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handleEvent): (QtWebPageEventHandler::handleMouseMoveEvent): (QtWebPageEventHandler::handleMousePressEvent): (QtWebPageEventHandler::handleMouseReleaseEvent): (QtWebPageEventHandler::handleWheelEvent): (QtWebPageEventHandler::handleHoverLeaveEvent): (QtWebPageEventHandler::handleHoverMoveEvent): (QtWebPageEventHandler::handleDragEnterEvent): (QtWebPageEventHandler::handleDragLeaveEvent): (QtWebPageEventHandler::handleDragMoveEvent): (QtWebPageEventHandler::handleDropEvent): (QtWebPageEventHandler::handleKeyPressEvent): (QtWebPageEventHandler::handleKeyReleaseEvent): (QtWebPageEventHandler::handleFocusInEvent): (QtWebPageEventHandler::handleFocusOutEvent): (QtWebPageEventHandler::inputMethodEvent): (QtWebPageEventHandler::touchEvent): * UIProcess/qt/QtWebPageEventHandler.h: (QtWebPageEventHandler): 2012-02-24 Simon Hausmann [Qt][WK2] QQuickWebView::event should lookup faster which events QQuickWebPage can handle https://bugs.webkit.org/show_bug.cgi?id=78047 Reviewed by Kenneth Rohde Christiansen. Replaced double-dispatch of events with direct forwarding of events from QQuickWebView::*Event to QtWebPageEventHandler::handle*Event. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::keyPressEvent): (QQuickWebView::keyReleaseEvent): (QQuickWebView::inputMethodEvent): (QQuickWebView::focusInEvent): (QQuickWebView::focusOutEvent): (QQuickWebView::touchEvent): (QQuickWebView::mousePressEvent): (QQuickWebView::mouseMoveEvent): (QQuickWebView::mouseReleaseEvent): (QQuickWebView::mouseDoubleClickEvent): (QQuickWebView::wheelEvent): (QQuickWebView::hoverEnterEvent): (QQuickWebView::hoverMoveEvent): (QQuickWebView::hoverLeaveEvent): (QQuickWebView::dragMoveEvent): (QQuickWebView::dragEnterEvent): (QQuickWebView::dragLeaveEvent): (QQuickWebView::dropEvent): (QQuickWebView::event): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handleMouseMoveEvent): (QtWebPageEventHandler::handleMousePressEvent): (QtWebPageEventHandler::handleMouseReleaseEvent): (QtWebPageEventHandler::handleWheelEvent): (QtWebPageEventHandler::handleHoverLeaveEvent): (QtWebPageEventHandler::handleHoverMoveEvent): (QtWebPageEventHandler::handleDragEnterEvent): (QtWebPageEventHandler::handleDragLeaveEvent): (QtWebPageEventHandler::handleDragMoveEvent): (QtWebPageEventHandler::handleDropEvent): (QtWebPageEventHandler::handleKeyPressEvent): (QtWebPageEventHandler::handleKeyReleaseEvent): (QtWebPageEventHandler::handleFocusInEvent): (QtWebPageEventHandler::handleFocusOutEvent): (QtWebPageEventHandler::handleInputMethodEvent): (QtWebPageEventHandler::handleTouchEvent): * UIProcess/qt/QtWebPageEventHandler.h: (QtWebPageEventHandler): 2012-02-24 Simon Hausmann [Qt] Use private QSGRenderNode in QQuickWebView for improved Qt Scene Graph integration https://bugs.webkit.org/show_bug.cgi?id=79022 Reviewed by Csaba Osztrogonác. * Target.pri: * UIProcess/API/qt/qquickwebpage.cpp: (PageProxyNode::PageProxyNode): (PageProxyNode::changedStates): (PageProxyNode::render): (PageProxyNode): 2012-02-24 Carlos Garcia Campos [GTK] Encode/decode Null ResourceResponse objects in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=79471 Reviewed by Philippe Normand. * Shared/gtk/WebCoreArgumentCodersGtk.cpp: (CoreIPC::::encode): Check whether ResourceResponse is Null before encoding it. (CoreIPC::::decode): Check whether response is Null and create a Null ResourceResponse object in such case. 2012-02-24 Shinya Kawanaka SpellCheckRequest needs to know the context where the spellcheck happened. https://bugs.webkit.org/show_bug.cgi?id=79320 Reviewed by Hajime Morita. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::requestCheckingOfString): * WebProcess/WebCoreSupport/WebEditorClient.h: 2012-02-23 Kenneth Rohde Christiansen [Qt] Tiling: Improve the method names dealing with moving and scaling. Rubberstamped by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewLegacyPrivate::updateViewportSize): (QQuickWebViewFlickablePrivate::onComponentComplete): (QQuickWebViewFlickablePrivate::updateViewportSize): (QQuickWebViewFlickablePrivate::_q_commitScaleChange): (QQuickWebViewPrivate::_q_commitPositionChange): (QQuickWebViewFlickablePrivate::_q_resume): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): (QQuickWebViewPrivate::_q_commitScaleChange): (QQuickWebViewFlickablePrivate): * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::setVisibleContentsRectForScaling): (WebKit::DrawingAreaProxy::setVisibleContentsRectForPanning): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::setVisibleContentsRectForScaling): (WebKit::DrawingAreaProxyImpl::setVisibleContentsRectForPanning): * UIProcess/DrawingAreaProxyImpl.h: (DrawingAreaProxyImpl): * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::setVisibleContentsRectForPanning): (WebKit::LayerTreeHostProxy::setVisibleContentsRectForScaling): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer): (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate): (WebKit::QtViewportInteractionEngine::wheelEvent): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): * WebProcess/WebPage/LayerTreeHost.h: (WebKit::LayerTreeHost::setVisibleContentsRectForScaling): (WebKit::LayerTreeHost::setVisibleContentsRectForPanning): (WebKit::LayerTreeHost::setVisibleContentsRectForLayer): * WebProcess/WebPage/LayerTreeHost.messages.in: * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::setVisibleContentsRectForScaling): (WebKit::LayerTreeHostQt::setVisibleContentsRectForPanning): * WebProcess/WebPage/qt/LayerTreeHostQt.h: (LayerTreeHostQt): 2012-02-24 Sergio Villar Senin [WK2] [GTK] Destructor not invoked in EditorClientFrameDestructionObserver https://bugs.webkit.org/show_bug.cgi?id=79466 Reviewed by Philippe Normand. Explicitly cast the observer before deleting it instead of just deleting a generic pointer. We must to that in order to get the destructor of the object properly called. * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::EditorClientFrameDestructionObserver::destroyOnClosureFinalization): 2012-02-23 Andy Estes Rename [setS|s]uppressIncrementalRendering to [setS|s]uppressesIncrementalRendering and make it WebPreferences API. https://bugs.webkit.org/show_bug.cgi?id=79433 Reviewed by Dan Bernstein. * Shared/WebPreferencesStore.h: (WebKit): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetSuppressesIncrementalRendering): (WKPreferencesGetSuppressesIncrementalRendering): * UIProcess/API/C/WKPreferences.h: * UIProcess/WebInspectorProxy.cpp: (WebKit::createInspectorPageGroup): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2012-02-23 Mario Sanchez Prada [GTK] Wrong signal name on emission in WebKitWindowProperties.cpp https://bugs.webkit.org/show_bug.cgi?id=79352 Reviewed by Philippe Normand. Emit the signal 'resizable' instead of 'resizable-visible'. * UIProcess/API/gtk/WebKitWindowProperties.cpp: (webkitWindowPropertiesSetResizable): Use right signal name. 2012-02-23 Anders Carlsson Flush layer changes after layout when resizing web page https://bugs.webkit.org/show_bug.cgi?id=79399 Reviewed by Andreas Kling. Flush layer changes after layout, otherwise the scrollbars won't be updated until sometime later which looks bad. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): 2012-02-23 Daniel Bates Add missing "Reviewed by" line to change log entry for changeset r108631 (https://bugs.webkit.org/show_bug.cgi?id=79252) The patch landed in changeset r108631 was reviewed by Martin Robinson. * ChangeLog: 2012-02-23 Patrick Gansterer [CMake] Add WEBKIT_INCLUDE_CONFIG_FILES_IF_EXISTS macro https://bugs.webkit.org/show_bug.cgi?id=79371 Reviewed by Daniel Bates. * CMakeLists.txt: 2012-02-23 Simon Hausmann [Qt] Add support for touch cancellation https://bugs.webkit.org/show_bug.cgi?id=79348 Reviewed by Kenneth Rohde Christiansen. Convert and forward incoming touch cancellation events to the web process. * Shared/qt/WebEventFactoryQt.cpp: (WebKit::webEventTypeForEvent): (WebKit::WebEventFactory::createWebTouchEvent): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::event): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handleEvent): 2012-02-23 Brent Fulgham [WinCairo] Build fix after r108428. * win/WebKit2CFLite.def: Add missing export declaration. 2012-02-23 Simon Hausmann Unreviewed test fix after r108614: Adjust public API after changes. * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: 2012-02-23 Simon Hausmann [Qt] Build fix. Qt WebKit2 can not be compiled due to QtWebPageEventHandler. https://bugs.webkit.org/show_bug.cgi?id=79335 Reviewed by Kenneth Rohde Christiansen. In the upcoming Qt 5 builds the convenient setInputMethodHints method on QQuickItem will be removed. There's no need for us to use it, we can implement passing the hints to the input method right away in our re-implementation of inputMethodQuery, which works with old and newer Qt 5 builds. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::inputMethodQuery): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::updateTextInputState): 2012-02-23 Sergio Villar Senin [WK2][GTK] WebProcess SIGSEVs due to incorrect clipboard handling https://bugs.webkit.org/show_bug.cgi?id=79252 Reviewed by Martin Robinson. Do not execute clipboard callbacks after the Frame associated with it is destroyed. This change is already covered by the TestWebViewEditor unit tests (among others), they hang (because WebProcess dies) without this patch in Debug builds. * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (EditorClientFrameDestructionObserver): (WebKit::EditorClientFrameDestructionObserver::EditorClientFrameDestructionObserver): (WebKit::EditorClientFrameDestructionObserver::frameDestroyed): (WebKit::EditorClientFrameDestructionObserver::destroyOnClosureFinalization): (WebKit): (WebKit::WebEditorClient::setSelectionPrimaryClipboardIfNeeded): 2012-02-23 Kenneth Rohde Christiansen [Qt] Page doesn't get repainted while panning is in progress https://bugs.webkit.org/show_bug.cgi?id=78602 Reviewed by Simon Hausmann. The tiling code needed the current visibleContentsRect in order to be able to create tiles, so we now make sure it gets it. We also needed to make sure to set the trajectory vector while panning and while the flicking engine was animating kinetic scrolling. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::_q_updateVisibleContentRectAndScale): (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged): * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::setVisibleContentRectTrajectoryVector): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::setVisibleContentRectTrajectoryVector): * UIProcess/DrawingAreaProxyImpl.h: (DrawingAreaProxyImpl): * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::setVisibleContentRectTrajectoryVector): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::flickableMovingStateChanged): (WebKit): (WebKit::QtViewportInteractionEngine::panMoveStarted): (WebKit::QtViewportInteractionEngine::panMoveEnded): (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate): (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): * WebProcess/WebPage/LayerTreeHost.h: (WebKit::LayerTreeHost::setVisibleContentRectTrajectoryVector): * WebProcess/WebPage/LayerTreeHost.messages.in: * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::setVisibleContentRectAndScale): (WebKit::LayerTreeHostQt::setVisibleContentRectTrajectoryVector): * WebProcess/WebPage/qt/LayerTreeHostQt.h: (LayerTreeHostQt): 2012-02-23 Patrick Gansterer [CMAKE][WK2] Cleanup WebKit2/CMakeLists.txt. https://bugs.webkit.org/show_bug.cgi?id=76122 Reviewed by Eric Seidel. * CMakeLists.txt: Removed hardcoded WTF_USE_JSC preprocessor definition. 2012-02-23 Simon Hausmann [WK2] Trivial build fix after r108615. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): 2012-02-22 Michael Tyutyunik [Qt][WK2] navigationType is missing in new API https://bugs.webkit.org/show_bug.cgi?id=78867 Reviewed by Simon Hausmann. In QtWebPagePolicyClient::decidePolicyForNavigationAction() navigationType argument is dropped by mistake. Adding it back and make it available through NavigationRequest. * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qwebnavigationrequest.cpp: (QWebNavigationRequestPrivate::QWebNavigationRequestPrivate): (QWebNavigationRequestPrivate): (QWebNavigationRequest::QWebNavigationRequest): (QWebNavigationRequest::navigationType): * UIProcess/API/qt/qwebnavigationrequest_p.h: * UIProcess/qt/QtWebPagePolicyClient.cpp: (QtWebPagePolicyClient::decidePolicyForNavigationAction): (toQuickWebViewNavigationType): * UIProcess/qt/QtWebPagePolicyClient.h: (QtWebPagePolicyClient): 2012-02-22 Anders Carlsson Implement TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange https://bugs.webkit.org/show_bug.cgi?id=79297 Reviewed by Beth Dakin. * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::deviceScaleFactorDidChange): Send a message to the web process. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setDeviceScaleFactor): Add empty stub. * WebProcess/WebPage/DrawingArea.messages.in: Add SetDeviceScaleFactor message. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::setDeviceScaleFactor): Call WebPage::setDeviceScaleFactor. 2012-02-22 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=79279 Synchronous ShouldGoToBackForwardListItem causes lots of WebProcess hangs Reviewed by Anders Carlsson. Anytime the WebProcess sends a sync message up to the UI Process a hang can ensue. In the case of shouldGoToBackForwardListItem it seems many clients want a back/forward notification but don't actually want to make a policy decision. Making it an asynchronous notification instead of a synchronous policy call will remove the possibility of a hang here. If clients later decide it is important to have a policy here we should implement a form of shouldGoToBackForwardListItem in the bundle loader client. Add a notification "willGoToBackForwardListItem" to the WKPageLoaderClient: * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::initializeLoaderClient): Tell the WebProcess whether it should be sending the shouldGoToBackForwardListItem or willGoToBackForwardListItem form of this message. (WebKit::WebPageProxy::shouldGoToBackForwardListItem): (WebKit::WebPageProxy::willGoToBackForwardListItem): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: Add an asynchronous WillGoToBackForwardListItem message Store a flag in the WebProcess - Sent from the UIProcess - to tell the FrameLoaderClient which form of the callback should be used: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::willGoToBackForwardItemCallbackEnabled): (WebKit::WebPage::setWillGoToBackForwardItemCallbackEnabled): * WebProcess/WebPage/WebPage.messages.in: * UIProcess/WebLoaderClient.cpp: (WebKit::WebLoaderClient::shouldGoToBackForwardListItem): Only consider calling this for version 0 clients. (WebKit::WebLoaderClient::willGoToBackForwardListItem): Later clients get this callback. * UIProcess/WebLoaderClient.h: (WebLoaderClient): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem): Send either the synchronous "should" message or the asynchronous "will" message depending on which the WebProcess was last told that the UIProcess expects. There is an edge case where the wrong one might be sent because the WebProcess hasn't received the message about a change in the WKPageLoaderClient yet but that's probably okay; It seems unlikely that a UIProcess client would ever rapidly change between v0 and other versions of the loader client and the UIProcess of WebKit2 is equipped to handle that case if it comes up. 2012-02-16 Jon Lee [WK2] Clearing notifications does not clean up internal state https://bugs.webkit.org/show_bug.cgi?id=78861 Reviewed by Anders Carlsson. * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::clearNotifications): This function was missing removing the notification entries from the other maps. (WebKit::WebNotificationManager::didDestroyNotification): When the notification is destroyed, it should also be removed from the context map. (WebKit::WebNotificationManager::didCloseNotifications): Refactor to pull out the code that removes a provided notification from the context map. (WebKit::WebNotificationManager::removeNotificationFromContextMap): Find the notification in the map, and remove it. If the map is empty, get rid of the entry. * WebProcess/Notifications/WebNotificationManager.h: (WebNotificationManager): 2012-02-22 Jon Lee Code cleanup in WebNotificationManager (79285) https://bugs.webkit.org/show_bug.cgi?id=79285 Reviewed by Anders Carlsson. * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::show): Simplify adding a blank vector to the map using .add(), similar to what is found in WebNotificationClient.mm in WebKit 1. 2012-02-21 Ryosuke Niwa Remove the remaining uses of CSSStyleDeclaration in Editor https://bugs.webkit.org/show_bug.cgi?id=78939 Reviewed by Enrica Casucci. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::shouldApplyStyle): * WebProcess/WebCoreSupport/WebEditorClient.h: (WebEditorClient): 2012-02-22 Martin Robinson [GTK] Clean build is broken when using make -j https://bugs.webkit.org/show_bug.cgi?id=76388 * GNUmakefile.am: Add some WebKit2 sources to global sources lists so that we can refer to them in separate GNUmakefiles. 2012-02-22 Antaryami Pandia [GTK][WK2] Add WebGL WebSetting. https://bugs.webkit.org/show_bug.cgi?id=79217 Reviewed by Martin Robinson. Add a WebSetting to enable/disable Webgl. * UIProcess/API/gtk/WebKitSettings.cpp: (webKitSettingsSetProperty): (webKitSettingsGetProperty): (webkit_settings_class_init): (webkit_settings_set_enable_webaudio): (webkit_settings_get_enable_webgl): (webkit_settings_set_enable_webgl): * UIProcess/API/gtk/WebKitSettings.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: (testWebKitSettings): 2012-02-22 Kenneth Rohde Christiansen [Qt] Disregard previous backing store as soon as possible https://bugs.webkit.org/show_bug.cgi?id=79232 Reviewed by Simon Hausmann and No'am Rosenthal. Between creating the new backing store and painting the content, we do not want to drop the previous one as that might result in briefly seeing flickering as the old tiles may be dropped before something replaces them. But we do need to drop it at some point and we need to make sure to not spike the memory usage before of this. What we now do, is to store the previous backing store as before, but drop all tiles which are not visible and then drop it as soon as the visible rect (which might change due if followed by a quick panning) has been fully covered by tiles. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::setContentsScale): (WebCore::WebGraphicsLayer::updateContentBuffers): 2012-02-22 Michael Brüning [Qt][WK2] Implement proxy authentication handling. https://bugs.webkit.org/show_bug.cgi?id=78792 Reviewed by Simon Hausmann. This patch corrects two bugs with the previous implementation: 1. The signal proxyAuthenticationRequired was not connected to a slot. 2. The slot onProxyAuthenticationRequired had the wrong parameters. * WebProcess/qt/QtNetworkAccessManager.cpp: (WebKit::QtNetworkAccessManager::QtNetworkAccessManager): (WebKit::QtNetworkAccessManager::onProxyAuthenticationRequired): * WebProcess/qt/QtNetworkAccessManager.h: Added include. (QtNetworkAccessManager): 2012-02-22 Kenneth Rohde Christiansen Merge setVisibleRectTrajectoryVector and adjustVisibleRect to the more descriptive coverWithTilesIfNeeded https://bugs.webkit.org/show_bug.cgi?id=79230 Reviewed by Simon Hausmann. Replace use by coverWithTilesIfNeeded(). * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector): (WebCore::WebGraphicsLayer::adjustVisibleRect): (WebCore::WebGraphicsLayer::computeTransformedVisibleRect): 2012-02-22 Zalan Bujtas [Qt][WK2] Add frame flattening setting to QWebPreferences. https://bugs.webkit.org/show_bug.cgi?id=79099 Reviewed by Simon Hausmann. Frame flattening is enabled by default for Qt WebKit2. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): * UIProcess/API/qt/qwebpreferences.cpp: (QWebPreferencesPrivate::testAttribute): (QWebPreferencesPrivate::setAttribute): (QWebPreferences::setNavigatorQtObjectEnabled): (QWebPreferences::frameFlatteningEnabled): (QWebPreferences::setFrameFlatteningEnabled): * UIProcess/API/qt/qwebpreferences_p.h: 2012-02-22 Ryosuke Niwa Remove the remaining uses of CSSStyleDeclaration in Editor https://bugs.webkit.org/show_bug.cgi?id=78939 Reviewed by Enrica Casucci. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::shouldApplyStyle): * WebProcess/WebCoreSupport/WebEditorClient.h: (WebEditorClient): 2012-02-21 Carlos Garcia Campos [GTK] Null ResourceErrors are encoded/decoded as empty ResourceErrors https://bugs.webkit.org/show_bug.cgi?id=79120 Reviewed by Martin Robinson. * Shared/gtk/WebCoreArgumentCodersGtk.cpp: (CoreIPC::::encode): Encode a boolean to indicate whether it's a Null error. (CoreIPC::::decode): Check whether the error is Null and do not continue decoding in such case. 2012-02-21 No'am Rosenthal [Qt][WK2] Draw tiles of previous contents-scale for opaque layers if they don't intersect with previous tiles https://bugs.webkit.org/show_bug.cgi?id=78962 Only avoid painting old-scale tiles in semi-transparent situtations if the old tiles intersect with existing tiles. Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/LayerBackingStore.cpp: (WebKit::LayerBackingStore::paintToTextureMapper): 2012-02-21 No'am Rosenthal [Qt] Previous web page appears outside content rect https://bugs.webkit.org/show_bug.cgi?id=78816 Apply a clip on painted tiles if some of the tiles fall outside of the target rect. Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/LayerBackingStore.cpp: (WebKit::LayerBackingStore::paintToTextureMapper): 2012-02-21 No'am Rosenthal [Qt][WK2] Accelerated animations don't work on Mac https://bugs.webkit.org/show_bug.cgi?id=78963 Problem came from using a non-RunLoop timer. Remove the unused viewportUpdateTimer, and use the existing animationTimer instead. Use a continuous timer that we only stop when animations stop. Reviewed by Kenneth Rohde Christiansen. * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::LayerTreeHostProxy): (WebKit::LayerTreeHostProxy::paintToCurrentGLContext): (WebKit): (WebKit::LayerTreeHostProxy::syncAnimations): 2012-02-21 Sam Weinig Attempt to fix the Snow Leopard build. * Configurations/Base.xcconfig: 2012-02-21 Sam Weinig Use libc++ when building with Clang on Mac https://bugs.webkit.org/show_bug.cgi?id=78981 Reviewed by Dan Bernstein. * Configurations/Base.xcconfig: 2012-02-21 Andras Becsi [Qt][WK2] Get rid of the dependency to QtWidgets https://bugs.webkit.org/show_bug.cgi?id=76276 Reviewed by Simon Hausmann. * Target.pri: * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp: (main): * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: * UIProcess/API/qt/tests/tests.pri: * UIProcess/API/qt/tests/util.h: 2012-02-20 Martin Robinson [UNIX] Plugin information fields are not interpreted as UTF-8 https://bugs.webkit.org/show_bug.cgi?id=78635 Reviewed by Gustavo Noronha Silva. Interpret plugin metadata as UTF8 aways. This matches the behavior of Chromium and the Totem plugin. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin): Use String::fromUTF8. 2012-02-20 Carlos Garcia Campos [GTK] Adding SOUP_TYPE_PROXY_RESOLVER_DEFAULT feature to soup session makes WebProcess to hang https://bugs.webkit.org/show_bug.cgi?id=79036 Reviewed by Martin Robinson. This looks like a bug in gobject. Initializing the WebProcess before creating the soup session seems to fix the problem. It's actually a workaround, but initializing the WebProcess as sson as possible it's a good idea in any case. * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): 2012-02-20 Michael Brüning [Qt][WK2] Implement proxy authentication handling. https://bugs.webkit.org/show_bug.cgi?id=78792 Reviewed by Simon Hausmann. This patch implements the proxy authentication handling for the Qt port in a similar matter to the http authentication implementation. Since there is a need to pass the proxy port, which is of type uint16_t, from the WebProcess to the UIProcess, an encoder and a decoder for this type was added because it did not exist. The message that was added to the WebPageProxy is called synchronously as this is needed by the implementation of the network access manager and has also been implemented this way already for the http authentication. * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::ArgumentDecoder::decodeUInt16): (CoreIPC): * Platform/CoreIPC/ArgumentDecoder.h: (ArgumentDecoder): (CoreIPC::ArgumentDecoder::decode): (CoreIPC): * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::encodeUInt16): (CoreIPC): * Platform/CoreIPC/ArgumentEncoder.h: (ArgumentEncoder): (CoreIPC::ArgumentEncoder::encode): (CoreIPC): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::handleProxyAuthenticationRequiredRequest): (QQuickWebViewExperimental::proxyAuthenticationDialog): (QQuickWebViewExperimental::setProxyAuthenticationDialog): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/PageClient.h: (PageClient): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::proxyAuthenticationRequiredRequest): (WebKit): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * UIProcess/qt/QtDialogRunner.cpp: (ProxyAuthenticationDialogContextObject): (ProxyAuthenticationDialogContextObject::ProxyAuthenticationDialogContextObject): (ProxyAuthenticationDialogContextObject::hostname): (ProxyAuthenticationDialogContextObject::port): (ProxyAuthenticationDialogContextObject::prefilledUsername): (ProxyAuthenticationDialogContextObject::accept): (ProxyAuthenticationDialogContextObject::reject): (QtDialogRunner::initForProxyAuthentication): * UIProcess/qt/QtDialogRunner.h: (QtDialogRunner): * UIProcess/qt/QtPageClient.cpp: (QtPageClient::handleProxyAuthenticationRequiredRequest): * UIProcess/qt/QtPageClient.h: (QtPageClient): * WebProcess/WebPage/DecoderAdapter.cpp: (WebKit::DecoderAdapter::decodeUInt16): (WebKit): * WebProcess/WebPage/DecoderAdapter.h: (DecoderAdapter): * WebProcess/WebPage/EncoderAdapter.cpp: (WebKit::EncoderAdapter::encodeUInt16): (WebKit): * WebProcess/WebPage/EncoderAdapter.h: (EncoderAdapter): * WebProcess/qt/QtNetworkAccessManager.cpp: (WebKit::QtNetworkAccessManager::onProxyAuthenticationRequired): (WebKit): * WebProcess/qt/QtNetworkAccessManager.h: (QtNetworkAccessManager): 2012-02-20 Patrick Gansterer [CMake] Update and sort list of source files. * CMakeLists.txt: 2012-02-20 Martin Robinson Fix WebKit2GTK+ for 'make distcheck'. Instead of conditionally including WebKit2 GNUmakefiles, always include them and conditionally activate the final targets. * GNUmakefile.am: * UIProcess/API/gtk/tests/GNUmakefile.am: 2012-02-20 Martin Robinson [GTK][WK2] WebKit2 does not build if gtk-unix-printing-3.0 is not available https://bugs.webkit.org/show_bug.cgi?id=79011 Fix the build when gtk-unix-printing-3.0 is not present. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialog): (webkitPrintOperationRunDialogForFrame): * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::WebPrintOperationGtk::create): 2012-02-18 Dan Bernstein BackingStore::scroll() unnecessarily copies pixels around https://bugs.webkit.org/show_bug.cgi?id=78976 Reviewed by Anders Carlsson. Rather than move pixels in the backing store in response to scrolling, we can maintain a mapping, for the most recently scrolled rect, from backing store coordinates to view client coordinates. * UIProcess/BackingStore.h: * UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::performWithScrolledRectTransform): Added. Given a block to be performed on a rect, divides the rect into parts such that for each part the mapping from backing store coordinates to client coordinates is a (uniform) translation, and performs the block on that part, passing it the translation that applies to the part. (WebKit::BackingStore::resetScrolledRect): Added. Copies everything in the scrolled rect back to where it should be under the identity map, and resets the scrolled rect and offset. (WebKit::BackingStore::paint): Changed to call through performWithScrolledRectTransform(). (WebKit::BackingStore::incorporateUpdate): Ditto. (WebKit::BackingStore::scroll): Now instead of copying pixels, just updates the scrolled rect and offset. 2012-02-17 No'am Rosenthal [Qt][WK2] Allow opaque tiles https://bugs.webkit.org/show_bug.cgi?id=78809 Apply the SupportsAlpha flag only when the buffers actually have alpha. Reviewed by Kenneth Rohde Christiansen. * Shared/ShareableBitmap.h: (ShareableBitmap): * Shared/qt/ShareableBitmapQt.cpp: * UIProcess/qt/LayerBackingStore.cpp: (WebKit::LayerBackingStoreTile::swapBuffers): 2012-02-17 Adam Roben Clang build fix after r108119 * WebProcess/WebProcess.cpp: (WebKit::randomCrashThread): Annotate this function with NO_RETURN_DUE_TO_CRASH. 2012-02-17 Kalev Lember Remove unused parameters from WTF threading API https://bugs.webkit.org/show_bug.cgi?id=78389 Reviewed by Adam Roben. waitForThreadCompletion() had an out param 'void **result' to get the 'void *' returned by ThreadFunction. However, the implementation in ThreadingWin.cpp ignored the out param, not filling it in. This had led to a situation where none of the client code made use of the param and just ignored it. To clean this up, the patch changes the signature of ThreadFunction to return void instead of void* and drops the the unused 'void **result' parameter from waitForThreadCompletion. Also, all client code is updated for the API change. As mentioned in https://bugs.webkit.org/show_bug.cgi?id=78389 , even though the change only affects internal API, Safari is using it directly and we'll need to keep the old versions around for ABI compatibility. For this, the patch adds compatibility wrappers with the old ABI. * Platform/WorkQueue.h: (WorkQueue): * Platform/gtk/WorkQueueGtk.cpp: (WorkQueue::startWorkQueueThread): * UIProcess/Launcher/mac/ThreadLauncherMac.mm: (WebKit::webThreadBody): * UIProcess/Launcher/qt/ThreadLauncherQt.cpp: (WebKit::webThreadBody): * UIProcess/Launcher/win/ThreadLauncherWin.cpp: (WebKit::webThreadBody): * WebProcess/WebProcess.cpp: (WebKit::randomCrashThread): * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-02-17 Mihnea Ovidenie CSS regions enabled by default https://bugs.webkit.org/show_bug.cgi?id=78525 Reviewed by David Hyatt. Add a runtime preference to enable/disable regions functionality at runtime(WebKitCSSRegionsEnabled). CSSRegions are still enabled by default. In DRT, use layoutTestController.overridePreference("WebKitCSSRegionsEnabled", "0") to disable the css regions functionality. * Shared/WebPreferencesStore.h: (WebKit): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetCSSRegionsEnabled): (WKPreferencesGetCSSRegionsEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2012-02-17 Enrica Casucci Refactor DragData class to use PlatformStrategies in the Mac implementation. https://bugs.webkit.org/show_bug.cgi?id=78768 Reviewed by Darin Adler. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added color() method. (WebKit::WebPlatformStrategies::color): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 2012-02-17 Martin Robinson Fix some warnings encountered during the GTK+ build https://bugs.webkit.org/show_bug.cgi?id=78911 Reviewed by Xan Lopez. * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): Initialize a new member of the loader client struct. 2012-02-17 Carlos Garcia Campos [GTK] Allow printing scaled pages in WebKit2 for printers that don't support it https://bugs.webkit.org/show_bug.cgi?id=78823 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialogUnix): Enable scale option in print dialog. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize manual scale to 1. (WebKit::WebPrintOperationGtk::rotatePageIfNeeded): Renamed and moved the needs rotate check here as an early return. (WebKit::WebPrintOperationGtk::prepareContextToDraw): Scale the page according to the manual scale factor. (WebKit::WebPrintOperationGtk::renderPage): Move rotatePage to prepareContextToDraw. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: 2012-02-17 Carlos Garcia Campos [GTK] Allow printing multiple copies in WebKit2 for printers that don't support it https://bugs.webkit.org/show_bug.cgi?id=78805 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialogUnix): Enable multiple copies and collate options in print dialog. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::PrintPagesData::PrintPagesData): Initialize number of collated and uncolated copies done and total. (WebKit::PrintPagesData::collatedCopiesLeft): Helper function that returns the number of collated copies left to do. (WebKit::PrintPagesData::uncollatedCopiesLeft): Helper function that returns the number of uncollated copies left to do. (WebKit::PrintPagesData::copiesLeft): Helper function that returns the number of collated or uncollated copies left to do. (WebKit::PrintPagesData::incrementPageSequence): Do not finish the print if there are uncollated copies left, and do not increment sheet number if there are collated copies left. (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize m_manualCopies to 1 and m_manualCollateCopies to false. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: 2012-02-17 Carlos Garcia Campos [GTK] Allow printing pages in reverse order in WebKit2 for printers that don't support it https://bugs.webkit.org/show_bug.cgi?id=78799 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialogUnix): Enable printing in reverse order option in print dialog. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::PrintPagesData::PrintPagesData): Initialize sheetNumber and lastPagePosition depending on whether printing is in reverse order or not. (WebKit::PrintPagesData::incrementPageSequence): Use a negative increment step when printing in reverse order. Fix page incrementing when printing only odd/even pages broken in previous commit due to merge conflicts. (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize reverse printing to false. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: 2012-02-17 Carlos Garcia Campos [GTK] Allow printing only odd/even pages in WebKit2 for printers that don't support it https://bugs.webkit.org/show_bug.cgi?id=78793 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialogUnix): Enable print odd/even pages option in print dialog. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::PrintPagesData::PrintPagesData): Add lastPagePosition and initialize it depending on the page set. (WebKit::PrintPagesData::incrementPageSequence): Use 2 step increment when printing only odd/even pages. (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): Initialize m_manualPageSet to GTK_PAGE_SET_ALL. 2012-02-17 Carlos Garcia Campos [GTK] Allow printing multiple pages per sheet in WebKit2 for printers that don't support it https://bugs.webkit.org/show_bug.cgi?id=78715 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialogUnix): Enable multiple pages per sheet options in print dialog. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::PrintPagesData::PrintPagesData): Initialize sheetNumber and numberOfSheets. Move pagePosition to WebPrintOperationGtk. (WebKit::PrintPagesData::incrementPageSequence): Increment current sheet and page position. (WebKit::WebPrintOperationGtk::WebPrintOperationGtk): (WebKit::WebPrintOperationGtk::currentPageIsFirstPageOfSheet): Helper function to check whether current pages is the first one of the current sheet. (WebKit::WebPrintOperationGtk::currentPageIsLastPageOfSheet): Helper function to check whether current pages is the last one of the current sheet. (WebKit::WebPrintOperationGtk::getRowsAndColumnsOfPagesPerSheet): Returns the number of rows and columns of pages per sheet. (WebKit::WebPrintOperationGtk::getPositionOfPageInSheet): Returns the row and column number of the current page in the current sheet. (WebKit::WebPrintOperationGtk::prepareContextToDraw): Translate, scale and rotate accordingly to render every page in the right place of the sheet. (WebKit::WebPrintOperationGtk::renderPage): Call prepareContextToDraw() before drawing the page. * WebProcess/WebPage/gtk/WebPrintOperationGtk.h: (WebKit::WebPrintOperationGtk::setNumberOfPagesToPrint): (WebKit::WebPrintOperationGtk::pagePosition): (WebKit::WebPrintOperationGtk::setPagePosition): (WebKit::WebPrintOperationGtk::numberUp): (WebKit::WebPrintOperationGtk::numberUpLayout): 2012-02-17 Carlos Garcia Campos [GTK] Rename WebKitPrintOperation::done signal to ::finished in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=78893 Reviewed by Gustavo Noronha Silva. And it's not emitted anynmore when the print dialog has been cancelled. Since it's not possible to know whether the print dialog was cancelled or not, the enum WebKitPrintOperationResponse has been added, with Print and Cancel values, and it's used as return value of webkit_print_operation_run_dialog(). * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkit_print_operation_class_init): Rename done as finished. (webkitPrintOperationRunDialogUnix): Return a WebKitPrintOperationResponse instead of bool. (webkitPrintOperationRunDialogWin32): Ditto. (drawPagesForPrintingCompleted): Emit finished instead of done. (webkitPrintOperationRunDialogForFrame): Do not emit finished if the dialog was cancelled and return a WebKitPrintOperationResponse. (webkit_print_operation_run_dialog): Return WebKitPrintOperationResponse. * UIProcess/API/gtk/WebKitPrintOperation.h: Add WebKitPrintOperationResponse enum. * UIProcess/API/gtk/WebKitPrintOperationPrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewPrintFrame): Check whether the dialog has been cancelled or not and connect to finish when the print operation is in progress to release the print operation object when printing finishes. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add WebKitPrintOperationResponse symbol. * UIProcess/API/gtk/tests/TestPrinting.cpp: (testPrintOperationPrintFinished): Use finished instead of done. (testPrintOperationPrint): Ditto. 2012-02-17 Carlos Garcia Campos [GTK] Add webkit_print_operation_print() to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=76536 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationPrintPagesForFrame): Helper function to call WebPageProxy::drawPagesForPrinting using the given GtkPrintSettings and GtkPageSetup. (webkitPrintOperationRunDialogForFrame): Use webkitPrintOperationPrintPagesForFrame(). (webkit_print_operation_print): Print directly using current GtkPrintSettings and GtkPageSetup without showing the print dialog. * UIProcess/API/gtk/WebKitPrintOperation.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/GNUmakefile.am: * UIProcess/API/gtk/tests/TestPrinting.cpp: (testPrintOperationPrintLoadChanged): (testPrintOperationPrintDone): (testPrintOperationPrintPrinter): (testPrintOperationPrint): (beforeAll): (afterAll): 2012-02-17 No'am Rosenthal [Qt][WK2] Allow partial updates https://bugs.webkit.org/show_bug.cgi?id=78824 Instead of using UpdateInfo to fill the entire tile's texture, we use it as a patch that contains only the dirty rectangle of the current paint. This requires a lot less memory for small updates, for example when typing a text in an input field. This shows a significant reduction in overhead when testing on Mac with Instruments. Reviewed by Simon Hausmann. * UIProcess/qt/LayerBackingStore.cpp: (WebKit::LayerBackingStoreTile::swapBuffers): (WebKit::LayerBackingStoreTile::setBackBuffer): (WebKit): (WebKit::LayerBackingStore::updateTile): * UIProcess/qt/LayerBackingStore.h: (LayerBackingStoreTile): * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::updateTileForLayer): * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp: (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer): 2012-02-16 Carlos Garcia Campos [GTK] Make sure print operation object is alive until printing finishes in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=78829 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (drawPagesForPrintingCompleted): Adopt the WebKitPrintOperation reference so that it's released when the callback finishes. (webkitPrintOperationRunDialogForFrame): Pass a reference of WebKitPrintOperation to the printing callback. 2012-02-15 Geoffrey Garen Made Weak single-owner, adding PassWeak https://bugs.webkit.org/show_bug.cgi?id=78740 Reviewed by Sam Weinig. * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::getOrCreateJSObject): Use raw pointer and PassWeak, as required by our new hash map API. 2012-02-16 Sergio Villar Senin [soup] Move important SoupSession feature initialization to WebCore https://bugs.webkit.org/show_bug.cgi?id=68602 Reviewed by Martin Robinson. Moved content sniffer and decoder initialization from the WebProcess to WebCore because network stuff will not work as expected without them. No new tests required as we're just moving stuff from the WebProcess to WebCore. * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): 2012-02-16 Philippe Normand Unreviewed, rolling out r107941. http://trac.webkit.org/changeset/107941 https://bugs.webkit.org/show_bug.cgi?id=68602 Broke 23 http tests on GTK * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): 2012-02-16 No'am Rosenthal [Texmap] Improve the way we deal with BGRA extension https://bugs.webkit.org/show_bug.cgi?id=78822 Get rid of swizzling in the web process. Instead, we moved swizzling back to TextureMapperGL, as we're moving towards a setup where textures are uploaded in the web process. Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/LayerBackingStore.cpp: (WebKit::LayerBackingStoreTile::swapBuffers): * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::createImage): * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp: (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::adoptImageBackingStore): 2012-02-16 Carlos Garcia Campos Unreviewed. Fix WebKit2 GTK+ build after r107947. * UIProcess/API/gtk/WebKitPrintOperation.cpp: (webkitPrintOperationRunDialogForFrame): 2012-02-16 Alexander Færøy [Qt] Fix linking in debug builds on Mac OS X https://bugs.webkit.org/show_bug.cgi?id=78811 Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/tests/bytearraytestdata.h: 2012-02-16 Carlos Garcia Campos [GTK] Page content is incorrectly translated whenh rendering pages for printing in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=78712 Reviewed by Martin Robinson. * WebProcess/WebPage/gtk/WebPrintOperationGtk.cpp: (WebKit::WebPrintOperationGtk::enumeratePrintersFunction): Simplify the code to select the printer. (WebKit::WebPrintOperationGtk::renderPage): Call cairo_save() before rendering the page and cairo_restore() when page has been rendered. 2012-02-16 Carlos Garcia Campos [GTK] Add WebKitPrintOperation to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=76448 Reviewed by Martin Robinson. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitDefines.h: * UIProcess/API/gtk/WebKitPrintOperation.cpp: Added. (webViewDestroyed): Delete the print operation when the view widget associated is destroyed. (webkitPrintOperationConstructed): Connect to destroy signal of associated web view. (webkitPrintOperationGetProperty): (webkitPrintOperationSetProperty): (webkit_print_operation_init): (webkit_print_operation_class_init): (webkitPrintOperationRunDialogUnix): Use GtkPrintUnixDialog to show the printing dialog in UNIX platforms. (webkitPrintOperationRunDialogWin32): Empty, not implemented yet. (drawPagesForPrintingCompleted): Callback called when printing operation has finished in the web process. (webkitPrintOperationRunDialogForFrame): Run the printing dialog and start printing the given frame. (webkit_print_operation_new): Create a new print operation for the given web view. (webkit_print_operation_get_print_settings): (webkit_print_operation_set_print_settings): (webkit_print_operation_get_page_setup): (webkit_print_operation_set_page_setup): (webkit_print_operation_run_dialog): Run the print dialog to print the web view main frame. * UIProcess/API/gtk/WebKitPrintOperation.h: Added. * UIProcess/API/gtk/WebKitPrintOperationPrivate.h: Added. * UIProcess/API/gtk/WebKitUIClient.cpp: (printFrame): Call webkitWebViewPrintFrame. (attachUIClientToView): Add implementation for printFrame callback. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_class_init): Add WebKitWebView::print-requested signal. (webkitWebViewPrintFrame): Emit print-requested and show the print dialog to print the frame when not signal is not handled by user. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitPrintOperation. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/GNUmakefile.am: * UIProcess/API/gtk/tests/TestPrinting.cpp: Added. (testPrintOperationPrintSettings): (webViewPrintRequestedCallback): (testWebViewPrintRequested): (beforeAll): (afterAll): * UIProcess/API/gtk/webkit2.h: Include WebKitPrintOperation.h. 2012-02-16 Simon Hausmann [Gtk][Efl][Qt] Move OpenGLShims out of cairo/ subdirectory https://bugs.webkit.org/show_bug.cgi?id=78800 Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/LayerTreeHostProxyQt.cpp: Adjust to changed OpenGLShims.h location - no more cairo prefix needed. 2012-02-16 No'am Rosenthal [Qt][WK2] Allow opaque tiles https://bugs.webkit.org/show_bug.cgi?id=78809 Set the supportsAlpha flag for TiledBackingStore when the layer has contentsOpaque enabled. Use the flag for ShareableBitmaps created by TiledBackingStore. For now this will not have impact on performance/memory, because we allocate the same type of buffers for opaque and transparent tiles. Reviewed by Kenneth Rohde Christiansen. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::setContentsOpaque): (WebCore::WebGraphicsLayer::setContentsScale): (WebCore::WebGraphicsLayer::createBackingStore): (WebCore): (WebCore::WebGraphicsLayer::updateContentBuffers): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebGraphicsLayer): * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp: (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer): 2012-02-16 Sergio Villar Senin [soup] Move important SoupSession feature initialization to WebCore https://bugs.webkit.org/show_bug.cgi?id=68602 Reviewed by Martin Robinson. Moved content sniffer and decoder initialization from the WebProcess to WebCore because network stuff will not work as expected without them. No new tests required as we're just moving stuff from the WebProcess to WebCore. * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): 2012-02-16 Adenilson Cavalcanti [Qt][WK2] Split QWebPermissionRequest into QWebSecurityOrigin https://bugs.webkit.org/show_bug.cgi?id=73215 Reviewed by Kenneth Rohde Christiansen. Introducing a new class to expose security origin information (port/scheme/etc), useful for inspecting the origin of permission requests. * Target.pri: * UIProcess/API/qt/qtwebsecurityorigin.cpp: Added. (QtWebSecurityOrigin::QtWebSecurityOrigin): (QtWebSecurityOrigin::~QtWebSecurityOrigin): (QtWebSecurityOrigin::host): (QtWebSecurityOrigin::scheme): (QtWebSecurityOrigin::path): (QtWebSecurityOrigin::port): (QtWebSecurityOrigin::setHost): (QtWebSecurityOrigin::setScheme): (QtWebSecurityOrigin::setPath): (QtWebSecurityOrigin::setPort): * UIProcess/API/qt/qtwebsecurityorigin_p.h: Added. * UIProcess/API/qt/tests/qmltests/WebView/tst_origin.qml: Added. * UIProcess/API/qt/qwebpermissionrequest.cpp: (QWebPermissionRequestPrivate::QWebPermissionRequestPrivate): (QWebPermissionRequest::securityOrigin): * UIProcess/API/qt/qwebpermissionrequest_p.h: * UIProcess/API/qt/tests/qmltests/qmltests.pro: 2012-02-16 Patrick Gansterer [CMake] Add missing include directories. * CMakeLists.txt: 2012-02-16 Carlos Garcia Campos [GTK] Document that local paths in html loaded with loadHTML might cause the web process to terminate https://bugs.webkit.org/show_bug.cgi?id=78719 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitWebView.cpp: 2012-02-15 Anders Carlsson Add TiledCoreAnimationDrawingArea::forceRepaint https://bugs.webkit.org/show_bug.cgi?id=78749 Reviewed by Sam Weinig. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::forceRepaint): Force a repaint and synchronize the layer tree to the UI process. 2012-02-15 Enrica Casucci Refactor ClipboardMac class to use PlatformStrategies. https://bugs.webkit.org/show_bug.cgi?id=78554 Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/WebDragClient.h: Changed method signature to reference the pasteboard by name. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: Added new methods. (WebKit::WebPlatformStrategies::changeCount): (WebKit::WebPlatformStrategies::uniqueName): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Ditto. * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: (WebKit::WebDragClient::declareAndWriteDragImage): Changed method signature to reference the pasteboard by name. 2012-02-15 Sadrul Habib Chowdhury Notify ChromeClient when touch-event handlers are installed/removed. https://bugs.webkit.org/show_bug.cgi?id=77440 Reviewed by Darin Fisher and Ryosuke Niwa. * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::numTouchEventHandlersChanged): * WebProcess/WebCoreSupport/WebChromeClient.h: 2012-02-15 Patrick Gansterer [CMake] Move RunLoop to WebCore/platform https://bugs.webkit.org/show_bug.cgi?id=78504 Reviewed by Adam Roben. * CMakeLists.txt: Remove RunLoop.cpp from list of souces. 2012-02-14 Simon Hausmann [Qt] Eliminate first set of QtWidgets dependencies from WebCore https://bugs.webkit.org/show_bug.cgi?id=78611 Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/QtWebPageEventHandler.cpp: Add missing QCursor include to fix compilation. 2012-02-15 Roland Steiner