2012-05-21 Gavin Barraclough Disable private names by default in WebCore https://bugs.webkit.org/show_bug.cgi?id=87088 Reviewed by Geoff Garen. r117859 introduced a preliminary implementation of ES6-like private name objects to JSC. These are probably not yet ready to be web-facing, so disabling by default in WebCore. Opting-in for JSC & DumpRenderTree so that we can still run the fast/js/names.html test. * Shared/WebPreferencesStore.h: (WebKit): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetJavaScriptExperimentsEnabled): (WKPreferencesGetJavaScriptExperimentsEnabled): * UIProcess/API/C/WKPreferences.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): - Added JavaScriptExperimentsEnabled to WebPreferences. 2012-05-22 Kenneth Rohde Christiansen [Qt] Clean up internal viewport animation API https://bugs.webkit.org/show_bug.cgi?id=87130 Reviewed by Simon Hausmann. const'ify classes which should be const. There is now only one method which can animate, animateItemRectVisible which is used for also animating the contents back into valid bounds. The valid bounds are computed using a separate method. It is now more clear when an animation is used or not and asserts are added for ensuring no concurrent animations as well as proper update deferring. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::didChangeViewportProperties): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::cssScaleFromItem): (WebKit::QtViewportInteractionEngine::itemScaleFromCSS): (WebKit::QtViewportInteractionEngine::itemCoordFromCSS): (WebKit::QtViewportInteractionEngine::itemRectFromCSS): (WebKit::QtViewportInteractionEngine::innerBoundedCSSScale): (WebKit::QtViewportInteractionEngine::outerBoundedCSSScale): (WebKit::QtViewportInteractionEngine::setItemRectVisible): (WebKit::QtViewportInteractionEngine::animateItemRectVisible): (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged): (WebKit::QtViewportInteractionEngine::nearestValidBounds): (WebKit::QtViewportInteractionEngine::currentCSSScale): (WebKit::QtViewportInteractionEngine::cancelScrollAnimation): (WebKit::QtViewportInteractionEngine::pinchGestureEnded): (WebKit::QtViewportInteractionEngine::itemSizeChanged): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-05-21 Kenneth Rohde Christiansen [Qt] Mini clean ups in the interaction engine https://bugs.webkit.org/show_bug.cgi?id=87013 Reviewed by Simon Hausmann. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::animateItemRectVisible): Assert that we are suspended. (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): Never zoom to any area if suspended which indicates other animation or user interaction. (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): If immediate is set, ignore suspension. (WebKit::QtViewportInteractionEngine::itemSizeChanged): Improve the comment. 2012-05-22 Allan Sandfeld Jensen [Qt] Tap-to-zoom overshoot animation https://bugs.webkit.org/show_bug.cgi?id=87108 Reviewed by Kenneth Rohde Christiansen. Defines a simple animation curve that combines a large ease-out (overshoot) with a small ease-in (correction). Uses that curve for zooming animation. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::physicalOvershoot): (WebKit::QtViewportInteractionEngine::animateItemRectVisible): 2012-05-22 Kenneth Rohde Christiansen [Qt] Make the resizing code more straight forward https://bugs.webkit.org/show_bug.cgi?id=87015 Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::transformToItem): (QQuickWebPagePrivate::updateSize): * UIProcess/API/qt/qquickwebview.cpp: * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewFlickablePrivate): 2012-05-22 Kenneth Rohde Christiansen [Qt] Add UI tests for fit-to-view https://bugs.webkit.org/show_bug.cgi?id=86857 Reviewed by Simon Hausmann. Make sure to always emit contentsScaleCommitted when the contents size changes, so that it can be used for testing. Also add a method to do single taps. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::didChangeContentsSize): * UIProcess/API/qt/qwebkittest.cpp: (touchPoint): (QWebKitTest::touchTap): (QWebKitTest::touchDoubleTap): * UIProcess/API/qt/qwebkittest_p.h: * UIProcess/API/qt/tests/qmltests/WebView/tst_fitToView.qml: Added. 2012-05-21 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=87061 WKPageGetScaleFactor can return 0.0 after a session is restored Reviewed by Beth Dakin. API test WKPageGetScaleFactorNotZero added. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::restoreViewState): Tell the UI Process the scale factor is 1.0 if it has never been manually set. 2012-05-21 Anders Carlsson Flash player buttons do not work when page is zoomed in https://bugs.webkit.org/show_bug.cgi?id=87056 Reviewed by Oliver Hunt. Use the page scale factor when computing the plug-in to root view transform, otherwise we'll compute an incorrect transform for plug-ins inside subframes. Also, make sure that viewGeometryDidChange is called for all plug-ins when scaling the page since otherwise it won't be called unless the scroll position changes. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pageScaleFactorDidChange): (WebKit): (WebKit::PluginView::viewGeometryDidChange): * WebProcess/Plugins/PluginView.h: (PluginView): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::scalePage): 2012-05-15 Gavin Barraclough Add support for private names https://bugs.webkit.org/show_bug.cgi?id=86509 Reviewed by Oliver Hunt. The spec isn't final, but we can start adding support to allow property maps to contain keys that aren't identifiers. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::npIdentifierFromIdentifier): (WebKit::JSNPObject::methodGetter): - Removed PropertyName::impl(), call publicName() to get the string associated with a name. 2012-05-21 Hugo Parente Lima [Qt][WK2] fast/forms/submit-to-blank-multiple-times.html fails https://bugs.webkit.org/show_bug.cgi?id=68309 Reviewed by Alexis Menard. Force focus when the element receives a double click event. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::mouseDoubleClickEvent): 2012-05-21 Marcelo Lira [Qt][WK2] REGRESSION, fix a failing API test in qmltests https://bugs.webkit.org/show_bug.cgi?id=82700 Reviewed by Alexis Menard. The value of a CSS font-family property is expected to have single quotes when white space is present in its name, and no quotes otherwise. Font family names returned by WebView.experimental.preferences never add quotes. Since what matter to the test is only the identity of the font, an auxiliar method to remove single quotes was added. * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml: 2012-05-21 Allan Sandfeld Jensen GCC 4.7 and C++11 https://bugs.webkit.org/show_bug.cgi?id=86465 Reviewed by Darin Adler. Avoid triggering C++11 string literals. * UIProcess/API/qt/tests/inspectorserver/tst_inspectorserver.cpp: 2012-05-21 Allan Sandfeld Jensen Disambiguate WTF::bind and std::bind from C++11 https://bugs.webkit.org/show_bug.cgi?id=86465 Reviewed by Darin Adler. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::SyncMessageState::processIncomingMessage): (CoreIPC::Connection::addQueueClient): (CoreIPC::Connection::removeQueueClient): (CoreIPC::Connection::invalidate): (CoreIPC::Connection::sendMessage): (CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue): (CoreIPC::Connection::connectionDidClose): (CoreIPC::Connection::enqueueIncomingMessage): * Platform/CoreIPC/unix/ConnectionUnix.cpp: (CoreIPC::Connection::open): (CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination): * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::pluginThreadAsyncCall): * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::findString): 2012-05-20 Carlos Garcia Campos [GTK] Add GCancellable parameter to all methods using gio async pattern https://bugs.webkit.org/show_bug.cgi?id=86843 Reviewed by Gustavo Noronha Silva. Add a private macro WEBKIT_DEFINE_ASYNC_DATA_STRUCT() to make it easier to define temporary structs used in async operations. * UIProcess/API/gtk/WebKitCookieManager.cpp: (GetAcceptPolicyAsyncData): (webkitCookieManagerGetAcceptPolicyCallback): (webkit_cookie_manager_get_accept_policy): (webkit_cookie_manager_get_accept_policy_finish): (GetDomainsWithCookiesAsyncData): (webkitCookieManagerGetDomainsWithCookiesCallback): (webkit_cookie_manager_get_domains_with_cookies): (webkit_cookie_manager_get_domains_with_cookies_finish): * UIProcess/API/gtk/WebKitCookieManager.h: * UIProcess/API/gtk/WebKitPrivate.h: * UIProcess/API/gtk/WebKitWebContext.cpp: (webkit_web_context_get_plugins): * UIProcess/API/gtk/WebKitWebResource.cpp: (ResourceGetDataAsyncData): (resourceDataCallback): (webkit_web_resource_get_data): (webkit_web_resource_get_data_finish): * UIProcess/API/gtk/WebKitWebResource.h: * UIProcess/API/gtk/WebKitWebView.cpp: (ValidateEditingCommandAsyncData): (didValidateCommand): (webkit_web_view_can_execute_editing_command): (webkit_web_view_can_execute_editing_command_finish): (RunJavaScriptAsyncData::~RunJavaScriptAsyncData): (RunJavaScriptAsyncData): (webkitWebViewRunJavaScriptCallback): (webkit_web_view_run_javascript): (webkit_web_view_run_javascript_finish): * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/tests/TestCookieManager.cpp: * UIProcess/API/gtk/tests/TestResources.cpp: * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: * UIProcess/API/gtk/tests/TestWebViewEditor.cpp: * UIProcess/API/gtk/tests/WebViewTest.cpp: (WebViewTest::runJavaScriptAndWaitUntilFinished): 2012-05-19 Andy Estes Use USE_APPKIT and USE_SECURITY_FRAMEWORK in a few more places https://bugs.webkit.org/show_bug.cgi?id=86951 Reviewed by Dan Bernstein. * UIProcess/WebProcessProxy.messages.in: Change #if PLATFORM(MAC) to the more specific #if USE(SECURITY_FRAMEWORK). * UIProcess/mac/WebPageProxyMac.mm: Wrap some uses of AppKit classes with #if USE(APPKIT). * UIProcess/mac/WebPopupMenuProxyMac.h: Ditto. * UIProcess/mac/WebPopupMenuProxyMac.mm: Ditto. 2012-05-18 Anders Carlsson REGRESSION (r108181): corruption after scrolling https://bugs.webkit.org/show_bug.cgi?id=86934 Reviewed by Dan Bernstein. Use the flipped Y coordinate when resetting the scrolled rect. * UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::resetScrolledRect): 2012-05-19 Andy Estes Fix build errors found when disabling ENABLE_DRAG_SUPPORT https://bugs.webkit.org/show_bug.cgi?id=86947 Reviewed by Jon Honeycutt. Fix more build errors. * UIProcess/API/mac/WKView.mm: * UIProcess/WebPageProxy.cpp: (WebKit): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/WebPageProxyMac.mm: (WebKit): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: 2012-05-19 Andy Estes Fix build errors found when disabling ENABLE_DRAG_SUPPORT https://bugs.webkit.org/show_bug.cgi?id=86947 Reviewed by Jon Honeycutt. * UIProcess/API/mac/WKView.mm: (createSandboxExtensionsForFileUpload): (-[WKView performDragOperation:]): * WebProcess/WebCoreSupport/WebDragClient.cpp: * WebProcess/WebCoreSupport/WebDragClient.h: * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::shouldDelayWindowOrderingEvent): (WebKit::WebPage::acceptsFirstMouse): 2012-05-19 Andy Estes Plug-in process should only be enabled if Netscape plug-in API is enabled https://bugs.webkit.org/show_bug.cgi?id=86945 Reviewed by Dan Bernstein. * config.h: Only define ENABLE_PLUGIN_PROCESS if ENABLE_NETSCAPE_PLUGIN_API is true. 2012-04-27 Filip Pizlo DFG should have control flow graph simplification https://bugs.webkit.org/show_bug.cgi?id=84553 Reviewed by Oliver Hunt. Merged r115512 from dfgopt. JSValue::toBoolean(ExecState*) -> JSValue::toBoolean() * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant): 2012-05-18 Anders Carlsson Missing plugin msg becomes "insecure plugin version" after Real Player page refresh https://bugs.webkit.org/show_bug.cgi?id=86903 Reviewed by Andreas Kling. Set blocked to false before returning early when the plug-in doesn't exist. * UIProcess/WebContext.cpp: (WebKit::WebContext::getPluginPath): 2012-05-18 Sudarsana Nagineni [GTK] [WK2] Memory leaks in WebKitBackForwardList https://bugs.webkit.org/show_bug.cgi?id=86872 Reviewed by Martin Robinson. Fix memory leaks by adopting WKArray of WebBackForwardListItems allocations using AdoptWK. * UIProcess/API/gtk/WebKitBackForwardList.cpp: (webkit_back_forward_list_get_back_list): (webkit_back_forward_list_get_back_list_with_limit): (webkit_back_forward_list_get_forward_list): (webkit_back_forward_list_get_forward_list_with_limit): 2012-05-18 Anders Carlsson PDF page does not show up when opened in the background https://bugs.webkit.org/show_bug.cgi?id=86890 Reviewed by Andreas Kling. * UIProcess/API/mac/WKView.mm: (-[WKView _updateAcceleratedCompositingMode:WebKit::]): Just set the new render layer if we're already in accelerated compositing mode. 2012-05-18 Tony Chang remove the CSS_GRID_LAYOUT compiler define, but default grid layout to off https://bugs.webkit.org/show_bug.cgi?id=86767 Reviewed by Ojan Vafai. * Configurations/FeatureDefines.xcconfig: * Shared/WebPreferencesStore.h: (WebKit): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetCSSGridLayoutEnabled): (WKPreferencesGetCSSGridLayoutEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2012-05-18 Shezan Baig Expose FrameSelection::absoluteCaretBounds via window.internals https://bugs.webkit.org/show_bug.cgi?id=86390 Reviewed by Ryosuke Niwa. Exports necessary symbols. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-05-18 Carlos Garcia Campos [GTK] Allow to attach/detach the inspector in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=86823 Reviewed by Gustavo Noronha Silva. Also rename WebInspectorGtk.cpp as WebInspectorProxyGtk.cpp since it implements the platform specific methods of WebInspectorProxy. * GNUmakefile.list.am: Add new files to compilation. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseContainerAdd): Allow to add a WebView containing the inspector as an internal child. (webkitWebViewBaseContainerRemove): Check whether the widget removed is the inspector web view. (webkitWebViewBaseContainerForall): When includeInternals is True, add also the inspector web view if it's present. (resizeWebKitWebViewBaseFromAllocation): Allocate space for the inspector web view if it's present. (webkitWebViewBaseSetInspectorViewHeight): Private function used by the inspector proxy to set the height of the inspector web view. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/WebInspectorProxy.h: (WebInspectorProxy): Remove unneeded method windowDestroyed. * UIProcess/gtk/WebInspectorProxyGtk.cpp: Renamed from Source/WebKit2/UIProcess/gtk/WebInspectorGtk.cpp. (WebKit::inspectorFilesBasePath): (WebKit::inspectorWindowClosed): Renamed as inspectorWindowClosed instead of inspectorWindowDestroyed, since this is called when the window manager requests to close the window, and not when the widget is destroyed. Also remove the call to windowDestroyed that has been removed. (WebKit::WebInspectorProxy::platformCreateInspectorPage): (WebKit::WebInspectorProxy::createInspectorWindow): Helper function to create the inspector window and add the inspector view. Also set the inspector window as transient for the inspected view toplevel window. And use a weak pointer to make sure inspector window pointer is NULL when it's destroyed, not only when the window is closed. (WebKit::WebInspectorProxy::platformOpen): Call platformAttach if the inspector is opened attached, or createInspectorWindow otherwise. (WebKit::WebInspectorProxy::platformDidClose): Always set the view inspector pointer to NULL. (WebKit::WebInspectorProxy::platformBringToFront): Implement it by showing the toplevel window where the inspector view is contained. (WebKit::WebInspectorProxy::platformIsFront): Implement it by checking whether the toplevel window where the inspector view is contained is active or not. (WebKit::WebInspectorProxy::platformInspectedURLChanged): Return early if there's no inspector window. (WebKit::WebInspectorProxy::inspectorPageURL): (WebKit::WebInspectorProxy::inspectorBaseURL): (WebKit::WebInspectorProxy::platformInspectedWindowHeight): Return the height of the inpected view. (WebKit::WebInspectorProxy::platformAttach): Remove the view from the current window if there's one, and insert the inspector view into the inspected view. (WebKit::WebInspectorProxy::platformDetach): Remove the inspector view from the inspected view and create a new window for it if it's visible. (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Call webkitWebViewBaseSetInspectorViewHeight(). 2012-05-18 Carlos Garcia Campos Return TRUE for events handled to avoid their propagation. Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseButtonPressEvent): (webkitWebViewBaseButtonReleaseEvent): (webkitWebViewBaseScrollEvent): (webkitWebViewBaseMotionNotifyEvent): 2012-05-18 Hugo Parente Lima [Qt][WK2] fast/events/page-visibility-iframe-move-test.html fails https://bugs.webkit.org/show_bug.cgi?id=86731 Reviewed by Simon Hausmann. Set the page visibility on a single page instead of on all pages from the page group. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetPageVisibilityState): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setPageVisibilityState): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-05-18 MORITA Hajime Yet another unreviewed build fix on r117572, this time for wk2... * WebProcess/WebCoreSupport/WebEditorClient.h: 2012-05-17 Philippe Normand Unreviewed, WebKit2 GTK/Qt build fix attempt after r117516. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didBlockInsecurePluginVersion): 2012-05-17 Anders Carlsson Plug-ins blacklist mechanism can tell clients about plug-in with null identifier https://bugs.webkit.org/show_bug.cgi?id=86788 Reviewed by John Sullivan. Pass along the URL string of the blocked plug-in so we can find the plug-in even if there was no MIME type specified in the or tag. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didBlockInsecurePluginVersion): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): 2012-05-17 Oliver Hunt Endeavour to make the windows test bot actually able to run tests. https://bugs.webkit.org/show_bug.cgi?id=86772 Reviewed by Sam Weinig. Remove the ClassInfo exports from the .def files as we're now using WEBKIT_EXPORT declarations to get expected behaviour on windows. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-05-17 Timothy Hatcher Make the docked Web Inspector use autoresizing masks so the view doesn't jitter when resizing the window. https://webkit.org/b/86765 Reviewed by John Sullivan. * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter close]): Added. Zero out _inspectorProxy. (-[WKWebInspectorProxyObjCAdapter inspectedViewFrameDidChange:]): Perform the work on a delay to prevent interfering with Cocoa's resizing. (WebKit::WebInspectorProxy::createInspectorWindow): Added setAutoresizingMask: call. (WebKit::WebInspectorProxy::platformCreateInspectorPage): Removed setAutoresizingMask: call. createInspectorWindow and platformAttach do this now. (WebKit::WebInspectorProxy::platformDidClose): Call close on WKWebInspectorProxyObjCAdapter. (WebKit::WebInspectorProxy::platformAttach): Added setAutoresizingMask: call. 2012-05-16 Andreas Kling Make PluginInfoStore properly thread-safe. Reviewed by Darin Adler. Deep copy the internal storage of PluginInfoStore after constructing it, as we can be doing this from a secondary thread. * Shared/Plugins/PluginModuleInfo.h: (WebKit::PluginModuleInfo::isolatedCopy): * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::deepIsolatedCopyPluginInfoVector): (WebKit::PluginInfoStore::loadPluginsIfNecessary): (WebKit::PluginInfoStore::plugins): 2012-05-17 Hironori Bono [Refactoring] Move platform-specific code in Editor::respondToChangedSelection to the WebKit layer https://bugs.webkit.org/show_bug.cgi?id=86591 Reviewed by Ryosuke Niwa. This change adds a TextCheckerClient::shouldEraseMarkersAfterChangeSelection function to remove platform-specific code from Editor::respondToChangedSelection function. No new tests, no change in behavior. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection): (WebKit): * WebProcess/WebCoreSupport/WebEditorClient.h: 2012-05-17 Dan Bernstein REGRESSION (r117428): WebKit API/SPI was removed https://bugs.webkit.org/show_bug.cgi?id=86748 Reverted r117428. * win/WebKit2.def: 2012-05-17 Gyuyoung Kim Convert setDomainRelaxationForbiddenForURLScheme to use InternalSettings interface https://bugs.webkit.org/show_bug.cgi?id=86704 Reviewed by Eric Seidel. * win/WebKit2.def: Add setDomainRelaxationForbiddenForURLScheme symbol filter. 2012-05-16 Brent Fulgham [WinCairo] Unreviewed build change after exported symbol updates (r114790) and expansion of CG routines in WebPage PDF output (r114476). * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRectToPDF): Exclude CG use on WinCairo. (WebKit::WebPage::drawPagesToPDF): Exclude CG use on WinCairo. * win/WebKit2CFLite.def: Don't claim to export symbols we don't provide (e.g., full screen API calls). 2012-05-16 Carlos Garcia Campos [GTK] Add API to get plugins to WebKit2 GTK+ https://bugs.webkit.org/show_bug.cgi?id=86356 Reviewed by Martin Robinson. * GNUmakefile.list.am: Add new files to compilation. * UIProcess/API/gtk/WebKitMimeInfo.cpp: Added. (_WebKitMimeInfo): Boxed type to represent MIME type information. (webkitMimeInfoCreate): Ceate a new WebKitMimeInfo. (webkit_mime_info_ref): (webkit_mime_info_unref): (webkit_mime_info_get_mime_type): Return the mime type. (webkit_mime_info_get_description): Return the mime type description. (webkit_mime_info_get_extensions): Return the list of extensions associated to the mime type. * UIProcess/API/gtk/WebKitMimeInfo.h: Added. * UIProcess/API/gtk/WebKitMimeInfoPrivate.h: Added. * UIProcess/API/gtk/WebKitPlugin.cpp: Added. (webkitPluginFinalize): (webkit_plugin_init): (webkit_plugin_class_init): (webkitPluginCreate): Create a new WebKitPlugin for the given PluginModuleInfo. (webkit_plugin_get_name): Return the plugin name. (webkit_plugin_get_description): Return the plugin description. (webkit_plugin_get_path): Return the path where the plugin is installed. (webkit_plugin_get_mime_info_list): Return the list of mime types handled by the plugin. * UIProcess/API/gtk/WebKitPlugin.h: Added. * UIProcess/API/gtk/WebKitPluginPrivate.h: Added. * UIProcess/API/gtk/WebKitWebContext.cpp: (webkit_web_context_set_additional_plugins_directory): Set an additional directory to be scanned for plugins. (GetPluginsAsyncData): Helper struct used to asynchronously get the list of plugins. (getPluginsAsyncDataCreate): Create a GetPluginsAsyncData struct. (getPluginsAsyncDataDestroy): Destroy a GetPluginsAsyncData struct. (webkitWebContextGetPluginThread): Thread body to get the list of plugins installed. (webkit_web_context_get_plugins): Asynchronously get the list of plugins installed. (webkit_web_context_get_plugins_finish): Finish async operation started by webkit_web_context_get_plugins() returning a list of WebKitPlugin. * UIProcess/API/gtk/WebKitWebContext.h: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitPlugin. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add new types. * UIProcess/API/gtk/tests/GNUmakefile.am: * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp: (testWebContextGetPlugins): (beforeAll): * UIProcess/API/gtk/webkit2.h: 2012-05-16 Brady Eidson https://bugs.webkit.org/show_bug.cgi?id=86638 Bump the version number on the WKBundlePageLoaderClient Reviewed by Dan Bernstein. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: s/1/2/ * Shared/APIClientTraits.cpp: Update client traits for the BundlePageLoaderClient * Shared/APIClientTraits.h: Update client traits for the BundlePageLoaderClient * ChangeLog: Change a confusing ChangeLog entry to reflect the actual client that was changed. 2012-05-16 Dinu Jacob Add didFinishProgress BundlePageLoaderClient callback https://bugs.webkit.org/show_bug.cgi?id=86541 Reviewed by Kenneth Rohde Christiansen. Added didFinishProgress BundleUIClient callback needed by WebKitTestRunner. This callback is invoked in postProgressFinishedNotification. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::didFinishProgress): (WebKit): * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: (InjectedBundlePageLoaderClient): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::postProgressFinishedNotification): * WebProcess/qt/QtBuiltinBundlePage.cpp: (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): 2012-05-16 Keishi Hattori [chromium] Add WebKit API to access inner text value of input element https://bugs.webkit.org/show_bug.cgi?id=85353 Reviewed by Kent Tamura. * win/WebKit2.def: Added HTMLInputElement::setEditingValue * win/WebKit2CFLite.def: Added HTMLInputElement::setEditingValue 2012-05-16 Zalan Bujtas [Qt][WK2] Move WebFrameNetworkingContext to WebKit namespace. https://bugs.webkit.org/show_bug.cgi?id=86590 Reviewed by Simon Hausmann. * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp: (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext): (WebKit::WebFrameNetworkingContext::create): * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.h: (WebKit): (WebFrameNetworkingContext): (WebKit::WebFrameNetworkingContext::originatingObject): (WebKit::WebFrameNetworkingContext::~WebFrameNetworkingContext): (WebKit::WebFrameNetworkingContext::networkAccessManager): (WebKit::WebFrameNetworkingContext::mimeSniffingEnabled): (WebKit::WebFrameNetworkingContext::thirdPartyCookiePolicyPermission): 2012-05-16 Andras Becsi [WTR] Visited link tracking is not disabled properly https://bugs.webkit.org/show_bug.cgi?id=76699 Reviewed by Jocelyn Turcotte. If PLATFORM_STRATEGIES is enabled visited link tracking is done through VisitedLinkProvider and not through PageGroup. InjectedBundle sets the shouldTrackVisitedLinks flag on the PageGroup, thus the shared VisitedLinkTable does get populated with visited links regardless of the flag. The WebProcess should only track visited links if tracking is specifically enabled for a test through WTR's LayoutTestController. This patch fixes several flacky and failing layout tests on Qt-WK2. * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setShouldTrackVisitedLinks): Let the WebProcess know about visited link tracking. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::setShouldTrackVisitedLinks): (WebKit::WebProcess::addVisitedLink): * WebProcess/WebProcess.h: (WebProcess): 2012-05-15 Caio Marcelo de Oliveira Filho Fix Qt5/Mac build after r117212 by adding missing NETSCAPE_PLUGIN_API guards https://bugs.webkit.org/show_bug.cgi?id=86577 Reviewed by Andy Estes. * Shared/Plugins/Netscape/NetscapePluginModuleNone.cpp: * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: (WebKit::PluginInfoStore::getPluginInfo): * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp: 2012-05-15 Andy Estes WebKit2 would fail to build on Windows if Netscape plug-ins were disabled. * UIProcess/Plugins/win/PluginInfoStoreWin.cpp: (WebKit::PluginInfoStore::getPluginInfo): Return false if ENABLE_NETSCAPE_PLUGIN_API is false. 2012-05-15 Andy Estes Guard Netscape plug-in code with ENABLE(NETSCAPE_PLUGIN_API) https://bugs.webkit.org/show_bug.cgi?id=86496 Reviewed by Sam Weinig. Ensure that WebKit2 can compile with ENABLE_NETSCAPE_PLUGIN_API disabled. * Shared/Plugins/Netscape/NetscapePluginModule.cpp: * Shared/Plugins/Netscape/NetscapePluginModule.h: * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: (WebKit::PluginInfoStore::getPluginInfo): * WebProcess/Plugins/Netscape/JSNPMethod.cpp: * WebProcess/Plugins/Netscape/JSNPMethod.h: * WebProcess/Plugins/Netscape/JSNPObject.cpp: * WebProcess/Plugins/Netscape/JSNPObject.h: * WebProcess/Plugins/Netscape/NPJSObject.cpp: * WebProcess/Plugins/Netscape/NPJSObject.h: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp: * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h: * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: * WebProcess/Plugins/Netscape/NetscapePluginStream.h: * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h: * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: * WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp: * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: * WebProcess/Plugins/PluginController.h: (PluginController): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::Stream::didFinishLoading): (WebKit::PluginView::PluginView): (WebKit::PluginView::~PluginView): (WebKit::PluginView::scriptObject): (WebKit): * WebProcess/Plugins/PluginView.h: (PluginView): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::getSitesWithPluginData): (WebKit::WebProcess::clearPluginSiteData): 2012-05-15 Michael Brüning [Qt][WK2] http/tests/security/xss-DENIED-xsl-document-securityOrigin.xml crashes https://bugs.webkit.org/show_bug.cgi?id=80209 Reviewed by Kenneth Rohde Christiansen. This patch adds a method isOpen to WebIconDatabase to be able to check whether the database has already been opened. This helps preventing problems when reusing a WebContext to create another view, as e.g. WebKitTestRunner does it in the Qt port. * UIProcess/WebIconDatabase.cpp: (WebKit::WebIconDatabase::setDatabasePath): (WebKit::WebIconDatabase::isOpen): Added. (WebKit): * UIProcess/WebIconDatabase.h: (WebIconDatabase): * UIProcess/qt/QtWebIconDatabaseClient.cpp: (WebKit::QtWebIconDatabaseClient::QtWebIconDatabaseClient): 2012-05-15 Anders Carlsson Use unaccelerated scrolling deltas when rubber-banding https://bugs.webkit.org/show_bug.cgi?id=86503 Reviewed by Sam Weinig. * Shared/WebEvent.h: (WebWheelEvent): (WebKit::WebWheelEvent::scrollCount): (WebKit::WebWheelEvent::unacceleratedScrollingDelta): Add scroll count and unaccelerated scrolling delta. * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): Initialize scroll count and unaccelerated scrolling deltas. * Shared/WebWheelEvent.cpp: (WebKit::WebWheelEvent::WebWheelEvent): Initialize scroll count and unaccelerated scrolling deltas. (WebKit::WebWheelEvent::encode): (WebKit::WebWheelEvent::decode): Encode and decode scroll count and unaccelerated scrolling deltas. * Shared/mac/WebEventFactory.mm: (WebKit::WebEventFactory::createWebWheelEvent): Initialize the scroll count and unaccelerated scrolling deltas from the underlying NSEvent. * UIProcess/WebPageProxy.cpp: (WebKit::coalesce): Coalesce unaccelerated scrolling deltas as well. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Init new WKSI functions. 2012-05-15 Sheriff Bot Unreviewed, rolling out r117095. http://trac.webkit.org/changeset/117095 https://bugs.webkit.org/show_bug.cgi?id=86511 broke Qt Mac build (Requested by estes on #webkit). * Shared/Plugins/Netscape/NetscapePluginModule.cpp: * Shared/Plugins/Netscape/NetscapePluginModule.h: * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: (WebKit::PluginInfoStore::getPluginInfo): * WebProcess/Plugins/Netscape/JSNPMethod.cpp: * WebProcess/Plugins/Netscape/JSNPMethod.h: * WebProcess/Plugins/Netscape/JSNPObject.cpp: * WebProcess/Plugins/Netscape/JSNPObject.h: * WebProcess/Plugins/Netscape/NPJSObject.cpp: * WebProcess/Plugins/Netscape/NPJSObject.h: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp: * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h: * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp: * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: * WebProcess/Plugins/Netscape/NetscapePluginStream.h: * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h: * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: * WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp: * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: 2012-05-15 Alexey Proskuryakov [WK2] Crash when dropping a reference to a non-existing file https://bugs.webkit.org/show_bug.cgi?id=86505 Reviewed by Darin Adler. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): Check that extension handle actually has a non-null extension. Extensions for non-existent files can not exist, so they are passed as null ones. 2012-05-15 Andy Estes Add WTF_USE_SECURITY_FRAMEWORK and use it in place of the less specific PLATFORM(MAC) https://bugs.webkit.org/show_bug.cgi?id=86508 Reviewed by Sam Weinig. * Shared/cf/ArgumentCodersCF.cpp: (CoreIPC::typeFromCFTypeRef): (CoreIPC::encode): (CoreIPC::decode): (CoreIPC): * Shared/cf/ArgumentCodersCF.h: (CoreIPC): * Shared/mac/KeychainAttribute.cpp: * Shared/mac/KeychainAttribute.h: * Shared/mac/SecKeychainItemRequestData.cpp: * Shared/mac/SecKeychainItemRequestData.h: * Shared/mac/SecKeychainItemResponseData.cpp: * Shared/mac/SecKeychainItemResponseData.h: * UIProcess/WebProcessProxy.h: (WebKit): (WebProcessProxy): * WebProcess/mac/WebProcessMac.mm: 2012-05-15 Andreas Kling Deep copy PluginModuleInfo before passing across thread boundary. Reviewed by Anders Carlsson. Since the vector of PluginModuleInfo objects returned by PluginInfoStore::plugins() can end up being passed to another thread, we should clone it to make sure it's safe to do so. No new tests, speculative use-after-free fix. * Shared/Plugins/PluginModuleInfo.h: (PluginModuleInfo): (WebKit::PluginModuleInfo::isolatedCopy): * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::PluginInfoStore::plugins): 2012-05-15 Andy Estes Guard Netscape plug-in code with ENABLE(NETSCAPE_PLUGIN_API) https://bugs.webkit.org/show_bug.cgi?id=86496 Reviewed by Dan Bernstein. * Shared/Plugins/Netscape/NetscapePluginModule.cpp: * Shared/Plugins/Netscape/NetscapePluginModule.h: * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: (WebKit::PluginInfoStore::individualPluginPaths): (WebKit::PluginInfoStore::getPluginInfo): * WebProcess/Plugins/Netscape/JSNPMethod.cpp: * WebProcess/Plugins/Netscape/JSNPMethod.h: * WebProcess/Plugins/Netscape/JSNPObject.cpp: * WebProcess/Plugins/Netscape/JSNPObject.h: * WebProcess/Plugins/Netscape/NPJSObject.cpp: * WebProcess/Plugins/Netscape/NPJSObject.h: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: * WebProcess/Plugins/Netscape/NPRuntimeUtilities.cpp: * WebProcess/Plugins/Netscape/NPRuntimeUtilities.h: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h: * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp: * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: * WebProcess/Plugins/Netscape/NetscapePluginStream.h: * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h: * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: * WebProcess/Plugins/Netscape/qt/PluginProxyQt.cpp: * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: 2012-05-14 Andy Estes Guard some AppKit-specific code in WebKit2 with USE(APPKIT) https://bugs.webkit.org/show_bug.cgi?id=86444 Reviewed by Sam Weinig. * Shared/NativeWebKeyboardEvent.h: (NativeWebKeyboardEvent): (WebKit::NativeWebKeyboardEvent::nativeEvent): * Shared/NativeWebMouseEvent.h: (NativeWebMouseEvent): (WebKit::NativeWebMouseEvent::nativeEvent): * Shared/NativeWebWheelEvent.h: (NativeWebWheelEvent): (WebKit::NativeWebWheelEvent::nativeEvent): * Shared/mac/ArgumentCodersMac.h: (CoreIPC): * Shared/mac/ArgumentCodersMac.mm: (CoreIPC::typeFromObject): (CoreIPC::encode): (CoreIPC::decode): * Shared/mac/WebEventFactory.mm: * WebProcess/WebCoreSupport/mac/WebPopupMenuMac.mm: (WebKit::WebPopupMenu::setUpPlatformData): * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): 2012-05-15 Dinu Jacob [Qt][WK2] fast/loader/create-frame-in-DOMContentLoaded.html crashes https://bugs.webkit.org/show_bug.cgi?id=83578 Retrieve and save page ID only for a valid page in WebFrameNetworkingContext. The page will be null if the frame was detached from the page. Reviewed by Simon Hausmann. * WebProcess/WebCoreSupport/qt/WebFrameNetworkingContext.cpp: (WebCore::WebFrameNetworkingContext::WebFrameNetworkingContext): 2012-05-15 Allan Sandfeld Jensen [Qt][WK2] Fix scrolling in touch mode https://bugs.webkit.org/show_bug.cgi?id=75006 Reviewed by Kenneth Rohde Christiansen. Only handle mouse-wheel events in WebCore to avoid double scrolling, and scale pixels scrolled by wheel events according to viewport transformation. * Shared/qt/WebEventFactoryQt.cpp: (WebKit::WebEventFactory::createWebWheelEvent): * UIProcess/qt/QtViewportInteractionEngine.cpp: * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handleWheelEvent): 2012-05-15 Kenneth Rohde Christiansen [Qt] Add infra for testing double-tap to zoom functionality etc https://bugs.webkit.org/show_bug.cgi?id=86474 Reviewed by Simon Hausmann. Rename the WebViewportInfo class to QWebKitTest in preparation of becoming a separate module. Adapt the use API. Modify the API to work better for testing and make sure the signals are emitted the right places. Also add a method for simulating a double tap. Work around issue with animations not running when the item doesn't have focus. Create an example test for double-tap to zoom, showing how we can now create UI tests using QML. * Target.pri: * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::setContentsSize): (QQuickWebPage::setContentsScale): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::didChangeViewportProperties): (QQuickWebViewFlickablePrivate::_q_contentViewportChanged): (QQuickWebViewFlickablePrivate::didChangeContentsSize): (QQuickWebViewExperimental::QQuickWebViewExperimental): (QQuickWebViewExperimental::test): (QQuickWebView::mouseDoubleClickEvent): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/qwebkittest.cpp: Renamed from Source/WebKit2/UIProcess/API/qt/qwebviewportinfo.cpp. (QWebKitTest::QWebKitTest): (QWebKitTest::~QWebKitTest): (QWebKitTest::touchDoubleTap): (QWebKitTest::contentsSize): (QWebKitTest::contentsScale): (QWebKitTest::devicePixelRatio): (QWebKitTest::initialScale): (QWebKitTest::minimumScale): (QWebKitTest::maximumScale): (QWebKitTest::isScalable): (QWebKitTest::layoutSize): * UIProcess/API/qt/qwebkittest_p.h: Renamed from Source/WebKit2/UIProcess/API/qt/qwebviewportinfo_p.h. * UIProcess/API/qt/tests/qmltests/WebView/tst_doubleTapToZoom.qml: Added. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::animateItemRectVisible): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-05-15 Michael Brüning [Qt][WK2] http/tests/navigation/https-in-page-cache.html fails with timeout https://bugs.webkit.org/show_bug.cgi?id=83576 Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::handleCertificateVerificationRequest): (QQuickWebView::allowAnyHTTPSCertificateForLocalHost): Added. (QQuickWebView::setAllowAnyHTTPSCertificateForLocalHost): Added. * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): Added bool m_allowAnyHTTPSCertificateForLocalHost. 2012-05-14 Shinya Kawanaka document.execCommand('Indent') in the direct child of ShadowRoot causes a crash. https://bugs.webkit.org/show_bug.cgi?id=86341 Reviewed by Ryosuke Niwa. Exports necessary symbols. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-05-14 Luke Macpherson Introduce ENABLE_CSS_VARIABLES compile flag. https://bugs.webkit.org/show_bug.cgi?id=86338 Reviewed by Dimitri Glazkov. Add a configuration option for CSS Variables support, disabling it by default. * Configurations/FeatureDefines.xcconfig: 2012-05-14 Michael Saboff Enh: Add the Ability to Disable / Enable JavaScript GC Timer https://bugs.webkit.org/show_bug.cgi?id=86382 Reviewed by Darin Adler. Plumbing to set / clear JS GC activity timer enable flag. * UIProcess/API/C/WKContext.cpp: (WKContextSetJavaScriptGarbageCollectorTimerEnabled): * UIProcess/API/C/WKContext.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::setJavaScriptGarbageCollectorTimerEnabled): * UIProcess/WebContext.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::setJavaScriptGarbageCollectorTimerEnabled): * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: 2012-05-14 Anders Carlsson The "plug-in was blocked" callback needs to include enough info to uniquely identify the plug-in + version https://bugs.webkit.org/show_bug.cgi?id=86395 Reviewed by John Sullivan. Add the plug-in identifier and version string to the didFail client callback. * UIProcess/API/C/WKPage.h: * UIProcess/WebLoaderClient.cpp: (WebKit::WebLoaderClient::didFailToInitializePlugin): Pass a null plug-in identifier and version here since we don't have the plug-in information here. (WebKit::WebLoaderClient::didBlockInsecurePluginVersion): * UIProcess/WebLoaderClient.h: (WebLoaderClient): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didBlockInsecurePluginVersion): 2012-05-14 Andreas Kling REGRESSION(r116796): Assertion failure in API tests Reviewed by Anders Carlsson. Invalidate the plugin work queue in ~WebContext to avoid hitting the !m_isValid assertion in ~WorkQueue later on. * UIProcess/WebContext.cpp: (WebKit::WebContext::~WebContext): 2012-05-14 Sheriff Bot Unreviewed, rolling out r116969. http://trac.webkit.org/changeset/116969 https://bugs.webkit.org/show_bug.cgi?id=86386 i accidentally the icondatabase (Requested by kling on #webkit). * UIProcess/WebContext.cpp: (WebKit::WebContext::~WebContext): 2012-05-14 Andreas Kling REGRESSION(r116796): Assertion failure in API tests Reviewed by Anders Carlsson. Invalidate the plugin work queue in ~WebContext to avoid hitting the !m_isValid assertion in ~WorkQueue later on. * UIProcess/WebContext.cpp: (WebKit::WebContext::~WebContext): 2012-05-14 Csaba Osztrogonác [Qt][WK2] Unreviewed trivial buildfix after r116958. * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro: 2012-05-14 Tor Arne Vestbø [Qt] Simplify OTHER_FILES for QML tests project files Reviewed by Jocelyn Turcotte. * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro: * UIProcess/API/qt/tests/qmltests/WebView.pro: 2012-05-14 Carlos Garcia Campos Unreviewed. Fix make distcheck. * GNUmakefile.am: Explicitly link WebProcess to libjavascriptcoregtk to make sure it uses the non installed library. * GNUmakefile.list.am: Add missing header file. 2012-05-14 Sudarsana Nagineni [GTK] [WK2] Memory leaks in WebKitWebSettings https://bugs.webkit.org/show_bug.cgi?id=86365 Reviewed by Martin Robinson. Fix memory leaks in WebKitWebSettings by adopting allocations using adoptWK. * UIProcess/API/gtk/WebKitSettings.cpp: (webkit_settings_init): (webkit_settings_set_serif_font_family): 2012-05-14 Allan Sandfeld Jensen [Qt] Doesn't build with ENABLE_INSPECTOR=0 https://bugs.webkit.org/show_bug.cgi?id=85056 Reviewed by Tor Arne Vestbø. * Target.pri: * UIProcess/qt/QtWebContext.cpp: (WebKit::initInspectorServer): 2012-05-11 Tor Arne Vestbø [Qt] Make sure dialogs have their parent and attached properties set before Component.onCompleted https://bugs.webkit.org/show_bug.cgi?id=86222 The WebView QML api for dialogs is based on delegates for each dialog, which are implemented as components. Since there's no explicit API to show the dialog, the natural place to allow the dialog to choose how to display itself is in Component.onCompleted. The issue was that we were using QQmlComponent::create() when instantiating the component, at which point the component did not have a parent or it's attached WebView property set. That meant that we had to do some ugly workaround in our test, using a 1ms timer, to get a callback once the parent was there. We now use the QQmlComponent::beginCreate() -> QQmlComponent::completeCreate() pair, which allows us to set the relevant properties before triggering the Component.onCompleted callback. We were already doing this for the context menus (except for setting the parent, which we did afterwards). Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/tests/qmltests/WebView/tst_javaScriptDialogs.qml: * UIProcess/qt/QtDialogRunner.cpp: * UIProcess/qt/QtDialogRunner.h: * UIProcess/qt/WebPopupMenuProxyQt.cpp: 2012-05-11 Gavin Barraclough Introduce PropertyName class https://bugs.webkit.org/show_bug.cgi?id=86241 Reviewed by Geoff Garen. Replace 'const Identifier&' arguments to functions accessing object properties with a new 'PropertyName' type. This change paves the way to allow for properties keyed by values that are not Identifiers. This change is largely a mechanical find & replace. It also changes JSFunction's constructor to take a UString& instead of an Identifier& (since in some cases we can no longer guarantee that we'lll have an Identifier), and unifies Identifier's methods to obtain array indices onto PropertyName. The new PropertyName class retains the ability to support .impl() and .ustring(), but in a future patch we may need to rework this, since not all PropertyNames should be equal based on their string representation. * WebProcess/Plugins/Netscape/JSNPMethod.cpp: (WebKit::JSNPMethod::finishCreation): * WebProcess/Plugins/Netscape/JSNPMethod.h: (WebKit::JSNPMethod::create): (JSNPMethod): * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::npIdentifierFromIdentifier): (WebKit::JSNPObject::getOwnPropertySlot): (WebKit::JSNPObject::getOwnPropertyDescriptor): (WebKit::JSNPObject::put): (WebKit::JSNPObject::deleteProperty): (WebKit::JSNPObject::propertyGetter): (WebKit::JSNPObject::methodGetter): * WebProcess/Plugins/Netscape/JSNPObject.h: (JSNPObject): 2012-05-11 Sudarsana Nagineni [GTK] [WK2] Memory leak in PluginProcessProxy::scanPlugin https://bugs.webkit.org/show_bug.cgi?id=86240 Reviewed by Martin Robinson. Free the output received from the g_spawn_sync(). * UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp: (WebKit::PluginProcessProxy::scanPlugin): 2012-05-11 Andreas Kling WK2/Plugins: Move enumeration of plugins to a secondary UIProcess thread. Reviewed by Anders Carlsson. To avoid spins beneath PluginInfoStore::getPluginInfo(), do this work on a secondary thread in the UIProcess. * Shared/APIObject.h: Made APIObject a ThreadSafeRefCounted. In the context of this patch, this is to be able to dispatch bound Functions on WebContext. * WebProcess/mac/KeychainItemShimMethods.mm: (WebKit::responseMap): * WebProcess/mac/SecItemShimMethods.mm: (WebKit::responseMap): * WebKit2.xcodeproj/project.pbxproj: * Shared/BlockingResponseMap.h: (BlockingResponseMap): (BlockingResponseMap::waitForResponse): (BlockingResponseMap::didReceiveResponse): Renamed from Source/WebKit2/WebProcess/mac/KeychainShimResponseMap.h. Generalize this somewhat since it's useful in more than just the keychain scenario. This can/should be generalized further, but that's a topic for another patch. * UIProcess/Plugins/PluginInfoStore.h: * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::PluginInfoStore::plugins): (WebKit::PluginInfoStore::findPluginForMIMEType): (WebKit::PluginInfoStore::findPluginForExtension): (WebKit::PluginInfoStore::findPlugin): (WebKit::PluginInfoStore::infoForPluginWithPath): Slap a mutex on the PluginInfoStore since it can now be called from both the main thread (via WKFrameCanShowMIMEType) and the GetPlugin work queue. * UIProcess/WebContext.messages.in: * UIProcess/WebContext.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): (WebKit::WebContext::~WebContext): (WebKit::WebContext::processDidFinishLaunching): (WebKit::WebContext::sendDidGetPlugins): (WebKit::WebContext::handleGetPlugins): (WebKit::WebContext::getPlugins): (WebKit::WebContext::didReceiveMessageOnConnectionWorkQueue): Make GetPlugins a DispatchOnConnectionQueue message and execute it on a new plug-in work queue. This effectively makes the GetPlugin call asynchronous. On Mac, the built-in PDF reader is still registered on the main thread as that ends up calling into localizedString(). * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didGetPlugins): * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: Add a DidGetPlugins message to WebProcess. This is passed directly to the handler in WebPlatformStrategies.cpp. * WebProcess/WebCoreSupport/WebPlatformStrategies.h: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::responseMap): (WebKit::handleDidGetPlugins): (WebKit::generateRequestID): (WebKit::WebPlatformStrategies::populatePluginCache): Use a BlockingResponseMap to block the WebProcess main thread until the UIProcess responds with DidGetPlugins. 2012-05-11 Gustavo Noronha Silva REGRESSION(r116205): [GTK]: build no longer supports thin archives https://bugs.webkit.org/show_bug.cgi?id=86207 * GNUmakefile.am: link libWebCoreModules to the webkit2gtk shared library; tell the linker to ignore internal unresolved symbols for PluginProcess and avoid linking libWebCoreModules. 2012-05-11 Hajime Morrita Unreviewed build fix attempt. * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: (WebKit::WebPopupMenu::setUpPlatformData): 2012-05-11 Carlos Garcia Campos [SOUP] Allow sending URI request data in chunks https://bugs.webkit.org/show_bug.cgi?id=85880 Reviewed by Martin Robinson. The API to handle custom URI schemes will receive an input stream to read from. Current code requires to buffer the whole stream before sending it to the WebProcess. This patch allows to send the data in chunks while it's read from the stream. * GNUmakefile.list.am: Add new files to compilation * UIProcess/API/C/soup/WKSoupRequestManager.cpp: (WKSoupRequestManagerRegisterURIScheme): Use toWTFString() to convert from WKString to WTFString. (WKSoupRequestManagerDidHandleURIRequest): Use didHandleURIRequest as it has been renamed. (WKSoupRequestManagerDidReceiveURIRequestData): New method to send more data for the uri request to the web process. * UIProcess/API/C/soup/WKSoupRequestManager.h: * UIProcess/soup/WebSoupRequestManagerProxy.cpp: (WebKit::WebSoupRequestManagerProxy::didHandleURIRequest): HandleURIRequest has been renamed to DidHandleURIRequest. (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequestData): Send DidReceiveURIRequestData message to the web process. (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequest): Use didHandleURIRequest as it has been renamed. * UIProcess/soup/WebSoupRequestManagerProxy.h: (WebSoupRequestManagerProxy): * WebProcess/soup/WebKitSoupRequestInputStream.cpp: Added. (AsyncReadData::AsyncReadData): Helper struct to store information about pending async read operations. (_WebKitSoupRequestInputStreamPrivate): (webkitSoupRequestInputStreamReadAsyncResultComplete): Read the data from the memory input stream and complete the async read operation. (webkitSoupRequestInputStreamReadAsync): Read the data from the memory input stream and complete the async read operation if there's data to read, or save the async result to be completed when more data is added to the stream. (webkitSoupRequestInputStreamReadFinish): Finish an async read started with webkitSoupRequestInputStreamReadAsync. (webkitSoupRequestInputStreamFinalize): (webkit_soup_request_input_stream_init): (webkit_soup_request_input_stream_class_init): (webkitSoupRequestInputStreamNew): Create a new input stream with a fixed size or 0 if content length is not known. (webkitSoupRequestInputStreamAddData): Add more data to the stream and complete any pending async read. (webkitSoupRequestInputStreamFinished): Whether all data expected by the stream has been received. * WebProcess/soup/WebKitSoupRequestInputStream.h: Added. * WebProcess/soup/WebSoupRequestManager.cpp: (WebKit::WebSoupRequestManager::didHandleURIRequest): Create a WebKitSoupRequestInputStream if we haven't received all the request data in the HandleURIRequest message. Otherwise just create a memory input stream with all the data. (WebKit::WebSoupRequestManager::didReceiveURIRequestData): Add the data received to the WebKitSoupRequestInputStream associated to the given request identifier. * WebProcess/soup/WebSoupRequestManager.h: * WebProcess/soup/WebSoupRequestManager.messages.in: Add contentLength parameter to DidHandleURIRequest message and add DidReceiveURIRequestData message. 2012-05-10 MORITA Hajime ElementShadow should minimize the usage of "ShadowRoot" name https://bugs.webkit.org/show_bug.cgi?id=85970 Reviewed by Dimitri Glazkov. Removed symbols which no longer exists * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-05-10 Gyuyoung Kim Move resumeAnimations to use Internals interface https://bugs.webkit.org/show_bug.cgi?id=86063 Reviewed by Alexey Proskuryakov. * win/WebKit2.def: Add a symbol filter for resumeAnimations. 2012-05-10 Anders Carlsson PDF files won't scroll in Safari when using Adobe plug-in https://bugs.webkit.org/show_bug.cgi?id=86167 Reviewed by Sam Weinig. Add a way to whitelist plug-ins that we know will process wheel events correctly. Add the new Adobe Reader plug-in to this whitelist. Only send wheel events to plug-ins that are in the whitelist. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::wantsWheelEvents): (WebKit): * PluginProcess/PluginControllerProxy.h: (PluginControllerProxy): * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::createPlugin): * PluginProcess/WebProcessConnection.h: (WebProcessConnection): * PluginProcess/WebProcessConnection.messages.in: * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::determineQuirks): * Shared/Plugins/PluginQuirks.h: * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::wantsWheelEvents): (WebKit): * WebProcess/Plugins/Netscape/NetscapePlugin.h: (NetscapePlugin): * WebProcess/Plugins/PDF/BuiltInPDFView.h: (BuiltInPDFView): * WebProcess/Plugins/PDF/BuiltInPDFView.mm: (WebKit::BuiltInPDFView::wantsWheelEvents): (WebKit): * WebProcess/Plugins/Plugin.h: (Plugin): * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::PluginProxy): (WebKit::PluginProxy::initialize): (WebKit::PluginProxy::wantsWheelEvents): (WebKit): * WebProcess/Plugins/PluginProxy.h: (PluginProxy): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::initializePlugin): (WebKit::PluginView::wantsWheelEvents): (WebKit): (WebKit::PluginView::handleEvent): * WebProcess/Plugins/PluginView.h: (PluginView): 2012-05-10 Anders Carlsson WebKit2: Add a way to blacklist specific plug-ins/plug-in versions https://bugs.webkit.org/show_bug.cgi?id=86164 Reviewed by Sam Weinig. * Shared/API/c/WKError.h: Add kWKErrorCodeInsecurePlugInVersion error code. * Shared/APIClientTraits.cpp: Update now that didFailToInitializePlugin is deprecated. * UIProcess/API/C/WKPage.h: Deprecate didFailToInitializePlugin and replace it with the more generic pluginDidFail. Also, deprecate missingPluginButtonClicked and replace it with unavailablePluginButtonClicked. * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::PluginInfoStore::shouldBlockPlugin): Non-Mac version, always return false. * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: (WebKit::PluginInfoStore::shouldBlockPlugin): Call WKShouldBlockPlugin. * UIProcess/WebContext.cpp: (WebKit::WebContext::getPluginPath): Check if the plug-in should be blocked. * UIProcess/WebContext.messages.in: GetPluginPath now takes an additional out parameter, a boolean that determines whether the plug-in should be blocked from loading or not. * UIProcess/WebLoaderClient.cpp: (WebKit::WebLoaderClient::didFailToInitializePlugin): Call m_client.pluginDidFail. (WebKit::WebLoaderClient::didBlockInsecurePluginVersion): Ditto. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::unavailablePluginButtonClicked): Call the loader client. (WebKit::WebPageProxy::didBlockInsecurePluginVersion): Ditto. * UIProcess/WebPageProxy.messages.in: Rename MissingPluginButtonClicked to UnavailablePluginButtonClicked and add a new DidBlockInsecurePluginVersion message. * UIProcess/WebUIClient.cpp: (WebKit::WebUIClient::unavailablePluginButtonClicked): Call missingPluginButtonClicked and unavailablePluginButtonClicked. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton): (WebKit::WebChromeClient::unavailablePluginButtonClicked): Handle RenderEmbeddedObject::InsecurePluginVersion. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createPlugin): WebPage::createPlugin now takes the plug-in element. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): If the plug-in is blocked, set the appropriate unavailability reason. * WebProcess/WebProcess.cpp: (WebKit::canPluginHandleResponse): Update now that GetPluginPath returns a blocked parameter as well. 2012-05-10 Anders Carlsson Rename the missing plug-in indicator to the unavailable plug-in indicator https://bugs.webkit.org/show_bug.cgi?id=86136 Reviewed by Sam Weinig. Update for WebCore changes. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginProcessCrashed): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::shouldUnavailablePluginMessageBeButton): (WebKit::WebChromeClient::unavailablePluginButtonClicked): * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): 2012-05-10 Carlos Garcia Campos [GTK] Test /webkit2/WebKitWebView/resources times out https://bugs.webkit.org/show_bug.cgi?id=86088 Reviewed by Martin Robinson. * UIProcess/API/gtk/tests/TestResources.cpp: (testWebViewResources): Use webkit_web_view_reload_bypass_cache() instead of webkit_web_view_reload() to make sure resources are not read from the cache. 2012-05-10 Simon Pena [GTK] WK2 misses WebKitSettings for media playback requiring user gestures and inline playback https://bugs.webkit.org/show_bug.cgi?id=85999 Reviewed by Martin Robinson. Expose WebKitSettings for media playback requiring user gesture and media playback allows inline to GTK side. This adds two properties (mediaPlaybackRequiresUserGesture and mediaPlaybackAllowsInline), with their setters and getters, to WebKitSettings. It also updates the WebKitSettings tests so these two properties are checked, and includes the new methods in the documentation. * UIProcess/API/gtk/WebKitSettings.cpp: added the new properties and their accessors (webKitSettingsSetProperty): (webKitSettingsGetProperty): (webkit_settings_class_init): (webkit_settings_set_media_playback_requires_user_gesture): (webkit_settings_get_media_playback_requires_user_gesture): (webkit_settings_set_media_playback_allows_inline): (webkit_settings_get_media_playback_allows_inline): * UIProcess/API/gtk/WebKitSettings.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: included the new methods in the documentation * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: tested the newly added methods (testWebKitSettings): 2012-05-10 Simon Pena [GTK] Missing field initializers for WKPageLoaderClient https://bugs.webkit.org/show_bug.cgi?id=86005 Reviewed by Martin Robinson. Initialize willGoToBackForwardListItem and interactionOccurredWhileProcessUnresponsive fields of WKPageLoaderClient. * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): 2012-05-10 Kenneth Rohde Christiansen [Qt] Double tap to zoom is considered a user interaction https://bugs.webkit.org/show_bug.cgi?id=86094 Reviewed by Simon Hausmann. This makes it so that the content size change doesn't change scale after a double tap to zoom. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): 2012-05-10 Kent Hansen [Qt] Rename QDeclarative* to QQml* https://bugs.webkit.org/show_bug.cgi?id=86089 Reviewed by Simon Hausmann. The QtDeclarative module was deprecated in favor of QtQml. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::_q_onReceivedResponseFromDownload): (QQuickWebViewExperimental::alertDialog): (QQuickWebViewExperimental::setAlertDialog): (QQuickWebViewExperimental::confirmDialog): (QQuickWebViewExperimental::setConfirmDialog): (QQuickWebViewExperimental::promptDialog): (QQuickWebViewExperimental::setPromptDialog): (QQuickWebViewExperimental::authenticationDialog): (QQuickWebViewExperimental::setAuthenticationDialog): (QQuickWebViewExperimental::proxyAuthenticationDialog): (QQuickWebViewExperimental::setProxyAuthenticationDialog): (QQuickWebViewExperimental::certificateVerificationDialog): (QQuickWebViewExperimental::setCertificateVerificationDialog): (QQuickWebViewExperimental::itemSelector): (QQuickWebViewExperimental::setItemSelector): (QQuickWebViewExperimental::filePicker): (QQuickWebViewExperimental::setFilePicker): (QQuickWebViewExperimental::databaseQuotaDialog): (QQuickWebViewExperimental::setDatabaseQuotaDialog): (QQuickWebViewExperimental::schemeDelegates_At): (QQuickWebViewExperimental::schemeDelegates_Append): (QQuickWebViewExperimental::schemeDelegates_Count): (QQuickWebViewExperimental::schemeDelegates_Clear): (QQuickWebViewExperimental::schemeDelegates): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/qwebiconimageprovider.cpp: (QWebIconImageProvider::QWebIconImageProvider): * UIProcess/API/qt/qwebiconimageprovider_p.h: * UIProcess/API/qt/qwebviewportinfo_p.h: * UIProcess/API/qt/tests/tests.pri: * UIProcess/qt/QtDialogRunner.h: (QtDialogRunner): * UIProcess/qt/WebPopupMenuProxyQt.h: (WebPopupMenuProxyQt): 2012-05-10 Jocelyn Turcotte [Qt] Fix sites with a viewport meta tag when devicePixelRatio isn't explicitely set on the WebView https://bugs.webkit.org/show_bug.cgi?id=86002 Reviewed by Kenneth Rohde Christiansen. The preference was recently changed to a double ratio, but was still left under FOR_EACH_WEBKIT_UINT32_PREFERENCE and was initialized to inf instead of 1.0. This would cause the viewport constraints to apply a multi-millionaire device pixel ratio and make the contents invisible. This moves it with other double preferences under FOR_EACH_WEBKIT_DOUBLE_PREFERENCE. * Shared/WebPreferencesStore.h: (WebKit): 2012-05-10 Kenneth Rohde Christiansen [Qt] Implement fit-to-width behaviour https://bugs.webkit.org/show_bug.cgi?id=86085 Reviewed by Simon Hausmann. We don't restrict the minimum scale to the layout viewport anymore, but instead update the minimum scale when the content size changes. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::didChangeViewportProperties): (QQuickWebViewFlickablePrivate::didChangeContentsSize): * UIProcess/API/qt/qwebviewportinfo.cpp: (QWebViewportInfo::minimumScale): (QWebViewportInfo::maximumScale): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-05-07 Tor Arne Vestbø WebPageProxy::activeURL() should return the pending API request, even when there's no main frame https://bugs.webkit.org/show_bug.cgi?id=85806 The m_pendingAPIRequestURL member is used (presumably) to mask over the async nature of WebKit2, so that starting a load of a URL will reflect that URL immedeatly from activeURL, even if the request has not been passed over to the web process yet and reflected there. This works well, except in the case of the initial request, where the main frame creation happens on the web process side and is notified back to the UI process. Until we've recived the notification we don't know about the main frame, and this race condition will potentially give us an empty url instead of the pending request. To solve this we always return the pending API request if it's set, even when there's no mainframe yet (that we known about). Reviewed by Simon Hausmann. * UIProcess/WebPageProxy.cpp: 2012-05-09 Gyuyoung Kim Move suspendAnimations to use Internals interface. https://bugs.webkit.org/show_bug.cgi?id=85986 Reviewed by Ryosuke Niwa. * win/WebKit2.def: Add a symbol filter for suspendAnimations. 2012-05-09 Carlos Garcia Campos [GTK] Split WebKit2 Makefile moving source code listings to GNUmakefile.list.am https://bugs.webkit.org/show_bug.cgi?id=85985 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: * GNUmakefile.list.am: Copied from Source/WebKit2/GNUmakefile.am. 2012-05-09 Carlos Garcia Campos [GTK] Use independent version numbers for public libraries https://bugs.webkit.org/show_bug.cgi?id=85984 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Use LIBWEBKIT2GTK_VERSION for library version. 2012-05-09 Allan Sandfeld Jensen [Qt] Tap-to-zoom zooms to wrong area. https://bugs.webkit.org/show_bug.cgi?id=85982 Reviewed by Kenneth Rohde Christiansen. Fix computation and take more care when to use CSS scale and when to use Item scale. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): 2012-05-09 Zalan Bujtas [Qt][WK2] Define clear split between QtWebPageLoadClient and QQuickWebViewPrivate for loading tasks. https://bugs.webkit.org/show_bug.cgi?id=84527#c3 Reviewed by Simon Hausmann. Moving loading related code and signal emission from QtWebPageLoadClient to QQuickWebViewPrivate. It puts the loading code that implements an API right where the API is defined, including signal emission as well as translation of WebPageProxy internals to public Qt API with correct types. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::provisionalLoadDidStart): (QQuickWebViewPrivate::loadDidCommit): (QQuickWebViewPrivate::didSameDocumentNavigation): (QQuickWebViewPrivate::titleDidChange): (QQuickWebViewPrivate::loadProgressDidChange): (QQuickWebViewPrivate::backForwardListDidChange): (QQuickWebViewPrivate::loadDidFail): (QQuickWebViewPrivate::processDidCrash): (QQuickWebView::loadProgress): * UIProcess/API/qt/qquickwebview_p_p.h: (WebKit): (QQuickWebViewPrivate): (QQuickWebViewPrivate::didChangeViewportProperties): (QQuickWebViewPrivate::loadProgress): (QQuickWebViewFlickablePrivate): * UIProcess/qt/QtWebError.cpp: (WebKit::QtWebError::isCancellation): (WebKit): * UIProcess/qt/QtWebError.h: * UIProcess/qt/QtWebPageLoadClient.cpp: (WebKit::QtWebPageLoadClient::QtWebPageLoadClient): (WebKit): (WebKit::QtWebPageLoadClient::didStartProvisionalLoad): (WebKit::QtWebPageLoadClient::didCommitLoad): (WebKit::QtWebPageLoadClient::didSameDocumentNavigation): (WebKit::QtWebPageLoadClient::didReceiveTitle): (WebKit::QtWebPageLoadClient::didChangeProgress): (WebKit::QtWebPageLoadClient::didChangeBackForwardList): (WebKit::QtWebPageLoadClient::dispatchLoadFailed): (WebKit::QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame): (WebKit::QtWebPageLoadClient::didFailLoadWithErrorForFrame): (WebKit::QtWebPageLoadClient::didStartProgress): (WebKit::QtWebPageLoadClient::didFinishProgress): * UIProcess/qt/QtWebPageLoadClient.h: (WebKit): (QtWebPageLoadClient): 2012-05-09 Zalan Bujtas [Qt][WK2] Remove delayed loadDidSucceed() signaling and m_deferedUrlToLoad from QQuickWebViewPrivate https://bugs.webkit.org/show_bug.cgi?id=85906 Reviewed by Kenneth Rohde Christiansen. Deferred loading activies were introduced to work around the delayed Flickable construction at onComponentComplete(). QQuickWebView inherits from QQuickFlickable now, so no need for the workaround anymore. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate): (QQuickWebViewFlickablePrivate::onComponentComplete): (QQuickWebView::setUrl): (QQuickWebView::componentComplete): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate::onComponentComplete): (QQuickWebViewPrivate): (QQuickWebViewFlickablePrivate): 2012-05-08 Jon Lee Unreviewed build fix. * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: (LayerTreeHostCAWin): 2012-05-08 Anders Carlsson DrawingAreaProxyImpl doesn't work with window server hosting https://bugs.webkit.org/show_bug.cgi?id=85947 Reviewed by Andreas Kling. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::updateAcceleratedCompositingMode): Update the layer tree context and call WebPage::updateAcceleratedCompositingMode. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::setLayerHostingMode): If setting the layer hosting mode changed the layer tree context, send back an UpdateAcceleratedCompositingMode message with the new context. * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: (WebKit::LayerTreeHostCA::initialize): platformInitialize no longer takes a context. * WebProcess/WebPage/ca/LayerTreeHostCA.h: (LayerTreeHostCA): Make m_layerTreeContext protected instead. * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm: (WebKit::LayerTreeHostCAMac::platformInitialize): Assign to m_layerTreeContext directly. (WebKit::LayerTreeHostCAMac::setLayerHostingMode): Set m_layerTreeContext.contextID. * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp: (WebKit::LayerTreeHostCAWin::platformInitialize): Assign to m_layerTreeContext directly. 2012-05-08 Jon Lee Safari warns that it needs to resend the form in an iFrame when going back https://bugs.webkit.org/show_bug.cgi?id=82658 Reviewed by Darin Adler. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Add wkCFURLRequestAllowAllPostCaching. 2012-05-08 Anders Carlsson Can't scroll PDF in subframe https://bugs.webkit.org/show_bug.cgi?id=85932 Reviewed by Sam Weinig. * WebProcess/Plugins/PDF/BuiltInPDFView.h: * WebProcess/Plugins/PDF/BuiltInPDFView.mm: (WebKit::BuiltInPDFView::updateScrollbars): Trigger a layout when scrollbars come and go so the non fast scrollable region gets recomputed. (WebKit::BuiltInPDFView::scrollableAreaBoundingBox): Implement this by calling out to the PluginView. 2012-05-06 Jon Lee [WK2] Push wheel events if there are too many in queue https://bugs.webkit.org/show_bug.cgi?id=85747 Reviewed by Anders Carlsson. It is possible that a whole bunch of messages added to the message queue, or a series of long-running messages, cause unresponsiveness. The reason for this is that we have a scroll event waiting for acknowledgment from the web process before it sends the next event. And in the time between the user has scrolled, causing a large backlog of scroll events to be held in the UI process. We should push new scroll events if the queue accumulates too many of them. * UIProcess/WebPageProxy.h: The vector m_currentlyProcessedWheelEvents used to hold the series of wheel events that were coalesced and sent as a single wheel event to the web process. When the web process acknowledges this with didReceiveEvent, the UI process cleared that vector, then tried to coalesce the next wheel event to send. Now we might have multiple sets of coalesced wheel events that we are sending to the web process. To keep track of these sets, m_currentlyProcessedWheelEvents now is a queue of Vectors. (WebPageProxy): * UIProcess/WebPageProxy.cpp: Add new constant wheelEventQueueSizeThreshold representing the threshold of scroll events to look for before we start pushing events. (WebKit::canCoalesce): Move static function so that handleWheelEvent() has access. No changes. (WebKit::coalesce): Move static function so that handleWheelEvent() has access. No changes. (WebKit::coalescedWheelEvent): Move static function so that handleWheelEvent() has access. No changes. (WebKit::WebPageProxy::handleWheelEvent): If we are currently waiting for acknowledgment from the web process that a wheel event has been handled, we add it to the queue. We check to see that the queue size is within our threshold before we return early. Otherwise we will start pushing events in the queue. Refactor the rest of the function into processNextQueuedWheelEvent() and sendWheelEvent(). If we are not currently waiting for acknowledgment, nor have events in the queue, then we send the current wheel event. (WebKit::WebPageProxy::processNextQueuedWheelEvent): Try to coalesce events based on the wheel event at the head of the queue, and send that event to the web process. (WebKit::WebPageProxy::sendWheelEvent): Refactored from handleWheelEvent(). (WebKit::WebPageProxy::didReceiveEvent): Instead of clearing m_currentlyProcessedWheelEvents, which contained the set of one coalesced wheel event, we pull the head Vector, which contains the same set of events. Refactor to use processNextQueuedWheelEvent(). 2012-05-08 Timothy Hatcher Fix the SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL macro so it passes the full path to dlopen. Reviewed by Mark Rowe. * UIProcess/mac/WebInspectorProxyMac.mm: Pass A to SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL for the version. * WebProcess/WebPage/mac/WebInspectorMac.mm: Ditto. 2012-05-08 Jesus Sanchez-Palencia [WK2] Integrate Page Visibility state change and WK2 Suspend/Resume API https://bugs.webkit.org/show_bug.cgi?id=85650 Reviewed by Kenneth Rohde Christiansen. This patch uses state changes of the Page Visibility API to trigger the automatic suspension/resume of animations on the WebPage and its main frame, in the same fashion of what is used by the Suspend/Resume API of WebKit2. By telling the WebPage it will move off/on the screen and the FrameView to hide/show, this patch is suspending/resuming animations (animated painting) but not timers and other active DOM objects. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setVisibilityState): 2012-05-08 Kenneth Rohde Christiansen [Qt] Add QML/WK2 evaluateJavaScript experimental API https://bugs.webkit.org/show_bug.cgi?id=85496 Reviewed by Simon Hausmann. This is an initial patch adding support for strings, numbers and bools as return values. Test: qmltests/WebView/tst_evaluateJavaScript.qml * UIProcess/API/qt/qquickwebview.cpp: (JSCallbackClosure): (toQString): (toQJSValue): (buildQJSValue): (javaScriptCallback): (QQuickWebViewExperimental::evaluateJavaScript): (QQuickWebView::runJavaScriptInMainFrame): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/tests/qmltests/WebView/tst_evaluateJavaScript.qml: Added. 2012-05-07 Alexis Menard [Qt] Unbreak debugging of WebKit2. https://bugs.webkit.org/show_bug.cgi?id=85839 Reviewed by Simon Hausmann. When you attach GDB to a running process, it stops it. http://trac.webkit.org/changeset/115958 introduced a pause() call to wait the debugger to be attached to then continue the execution of the WebProcess. Unfortunately the pause() function does not return unless a signal handler is called. This patch introduce an event handler to exit from the paused state when the debugger send the signal SIGCONT. The old code works with older version of GDB (<7.0) but not with newer versions where the behavior of pause() is correct. * qt/MainQt.cpp: (sigcontHandler): (main): 2012-05-07 Julien Chaffraix Refactor windowClipRectForLayer to remove the explicit RenderLayer dependency https://bugs.webkit.org/show_bug.cgi?id=84090 Reviewed by David Hyatt. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::clipRectInWindowCoordinates): Updated after windowClipRectForLayer name and signature change. 2012-05-07 Andy Estes ENABLE_IFRAME_SEAMLESS should be part of FEATURE_DEFINES. * Configurations/FeatureDefines.xcconfig: 2012-05-07 Eric Seidel Add ENABLE_IFRAME_SEAMLESS so Apple can turn off SEAMLESS if needed https://bugs.webkit.org/show_bug.cgi?id=85822 Reviewed by Adam Barth. * Configurations/FeatureDefines.xcconfig: 2012-05-07 Alexis Menard Unreviewed Qt build fix in Debug. We need some system includes here for getpid() to be recognized. * qt/MainQt.cpp: 2012-05-07 Sheriff Bot Unreviewed, rolling out r116299, r116301, and r116303. http://trac.webkit.org/changeset/116299 http://trac.webkit.org/changeset/116301 http://trac.webkit.org/changeset/116303 https://bugs.webkit.org/show_bug.cgi?id=85795 Build is still broken (Requested by Ossy on #webkit). * qt/MainQt.cpp: (main): 2012-05-07 Balazs Kelemen [Qt] Add test specific platform plugin to achieve unified layout test results https://bugs.webkit.org/show_bug.cgi?id=80996 Reviewed by Simon Hausmann. Initialize the test platform plugin before initializing the web process if we are in a WTR run. It is necessary to place this initialization here as we cannot control wich platform plugin will be used after the instantiation of the QApplication. * qt/MainQt.cpp: (initializeTestPlatformPluginForWTRIfRequired): (main): 2012-05-06 MORITA Hajime https://bugs.webkit.org/show_bug.cgi?id=85265 [Shadow DOM] ShadowTree needs a better name Reviewed by Dimitri Glazkov. * win/WebKit2.def: Updated exported symbol names according to the rename. * win/WebKit2CFLite.def: Updated exported symbol names according to the rename. 2012-05-06 Gyuyoung Kim Convert isPageBoxVisible to use Internals interface. https://bugs.webkit.org/show_bug.cgi?id=85692 Reviewed by Darin Adler. * win/WebKit2.def: Add isPageBoxVisible symbol filter. 2012-05-05 Dean Jackson Add new Setting/Preference to disable requestAnimationFrame https://bugs.webkit.org/show_bug.cgi?id=85693 Reviewed by Simon Fraser. Exposes a new WebPreference: WebKitRequestAnimationFrameEnabled. The default value is true. The majority of applications will leave it this way. * Shared/WebPreferencesStore.h: (WebKit): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetRequestAnimationFrameEnabled): (WKPreferencesGetRequestAnimationFrameEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2012-05-04 Jon Lee [WK2] Incoming events may be processed out-of-order https://bugs.webkit.org/show_bug.cgi?id=85696 Reviewed by Maciej Stachowiak. All messages go to a single queue that gets iterated over by dispatchMessages(). If an input event arrives in the middle of a flood of messages, all of them will be dispatched before the input event is dispatched. In other words, the first dispatchMessages() call will process all of the messages in the queue, and all subsequent dispatchMessages() calls will act as no-ops, since there is nothing in the queue. To fix this, we rename dispatchMessages to dispatchOneMessage, and only process one message at a time. * Platform/CoreIPC/Connection.h: Rename dispatchMessages() to dispatchOneMessage(). * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::enqueueIncomingMessage): Dispatch a call to dispatchOneMessage() on the run loop. (CoreIPC::Connection::dispatchOneMessage): Remove the while(true) loop. 2012-05-04 Gustavo Noronha Silva [GTK] Simplify how libWebCoreModules is linked in, and fix WebKit2 build https://bugs.webkit.org/show_bug.cgi?id=85691 * GNUmakefile.am: no longer link libWebCoreModules, and remove -no- fast-install and -no-install from link flags, since we want those programs installed. 2012-05-04 Mark Rowe Fix a leak in WebProcess when it is used to launch the UI process. Rubber-stamped by Anders Carlsson. * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): Destory the attributes and file actions after spawning the subprocess. 2012-05-02 Jer Noble Flash of white when exiting full screen HTML5 video https://bugs.webkit.org/show_bug.cgi?id=85438 Reviewed by Maciej Stachowiak. Force a repaint before displaying the newly exited WebView window. This gives the window a chance to seamlessly repaint before enabling screen updates. Also, send the WebProcess the didExitFullScreen and setAnimatingFullScreen(false) messages after swapping the WebView back into its original window. Doing otherwise seems to cause forceRepaint to paint a white frame. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): (completeFinishExitFullScreenAnimationAfterRepaint): 2012-05-04 Anders Carlsson Set the right device scale factor when creating the web page https://bugs.webkit.org/show_bug.cgi?id=85667 Reviewed by Oliver Hunt. * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:contextRef:pageGroupRef:]): Set the scale factor before initializing the page, to ensure that the WebPageCreationParameters struct gets the right scale factor. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setIntrinsicDeviceScaleFactor): This can now be called with a null drawing area. Also, remove the isValid() check since we still want to update the scale factor even if the web process has crashed. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Set the device scale factor from the creation parameters. 2012-05-02 Jer Noble Taking a visibility:hidden element full screen causes full screen window to disappear. https://bugs.webkit.org/show_bug.cgi?id=85432 Reviewed by Maciej Stachowiak. When given an initial or final frame with a zero width or height, return a rect representing the entire screen, rather than a rect with a zero or infinite size. Doing otherwise will confuse the window server when it's instructed to scale the full screen window to that size. * UIProcess/mac/WKFullScreenWindowController.mm: (windowFrameFromApparentFrames): 2012-04-30 Jer Noble Full screen will exit during a provisional load of a non-ancestor iframe. https://bugs.webkit.org/show_bug.cgi?id=85230 Reviewed by Maciej Stachowiak . Only exit full screen mode if the frame being loaded contains the full screen element: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad): Move the full screen exiting logic up into WebFrameLoaderClient in the WebProcess: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Add a WebFullScreenManager "close" method & message: * UIProcess/WebFullScreenManagerProxy.messages.in: * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::close): * WebProcess/FullScreen/WebFullScreenManager.h: Add support for this new message to the WKBundlePage and client: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp: (WebKit::InjectedBundlePageFullScreenClient::closeFullScreen): * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h: 2012-05-04 Anders Carlsson TiledCoreAnimationDrawingArea should handle visibility changes https://bugs.webkit.org/show_bug.cgi?id=85645 Reviewed by Oliver Hunt. Replicate the visibility handling logic from DrawingAreaImpl and LayerTreeHostCAMac. * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: (TiledCoreAnimationDrawingAreaProxy): * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::visibilityDidChange): (WebKit): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::suspendPainting): (WebKit): (WebKit::TiledCoreAnimationDrawingArea::resumePainting): 2012-05-04 Nate Chapin Don't require FrameLoaderClient to manufacture a commitData() call for empty documents. https://bugs.webkit.org/show_bug.cgi?id=85533 Reviewed by Alexey Proskuryakov. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::finishedLoading): 2012-05-04 Kent Hansen [Qt] Update Qt bridge after changes to QMetaMethod https://bugs.webkit.org/show_bug.cgi?id=85478 Reviewed by Tor Arne Vestbø. QMetaMethod::signature() has been renamed to methodSignature() and returns a QByteArray. The new function QMetaMethod::name() gives direct access to a method's name. returnType(), parameterCount(), and parameterType() give direct access to type information. Ported the custom QtConnectionObject meta-object to revision 7; revision 6 and below aren't supported (and don't compile) with Qt5. * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: (gatherAPI): 2012-05-04 Tor Arne Vestbø [Qt] Don't pass viewport-create function to quick_test_main. https://bugs.webkit.org/show_bug.cgi?id=85478 Reviewed by Csaba Osztrogonác. * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp: (main): 2012-05-04 Csaba Osztrogonác [Qt] Buildfix for newer Qt5 https://bugs.webkit.org/show_bug.cgi?id=85478 Reviewed by Tor Arne Vestbø. * Shared/qt/ProcessExecutablePathQt.cpp: (WebKit::executablePath): * UIProcess/API/qt/qwebiconimageprovider_p.h: 2012-05-03 Alexis Menard [Qt] Enable fullscreen API for WebKit2. https://bugs.webkit.org/show_bug.cgi?id=85498 Reviewed by Simon Hausmann. Enable the fullscreen API for Qt port. It is only supported on WebKit2. It adds experimental settings to enable it and also add two experimental signals so the API user can react when the fullscreen is requested (e.g hide the urlbar of a browser and change the state of the window to be fullscreen). * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qwebpreferences.cpp: (QWebPreferencesPrivate::testAttribute): (QWebPreferencesPrivate::setAttribute): (QWebPreferences::fullScreenEnabled): (QWebPreferences::setFullScreenEnabled): * UIProcess/API/qt/qwebpreferences_p.h: * UIProcess/API/qt/qwebpreferences_p_p.h: * UIProcess/WebFullScreenManagerProxy.h: (WebKit): * UIProcess/qt/WebFullScreenManagerProxyQt.cpp: (WebKit::WebFullScreenManagerProxy::enterFullScreen): (WebKit::WebFullScreenManagerProxy::exitFullScreen): 2012-05-04 Simon Hausmann [Qt] Images are scaled badly in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=85610 Reviewed by Jocelyn Turcotte. Enable smooth pixmap transforms for WK2 bitmaps. * Shared/qt/ShareableBitmapQt.cpp: (WebKit::ShareableBitmap::createGraphicsContext): 2012-05-03 Ojan Vafai Histogram total allocated bytes in the arena in addition to the render tree size https://bugs.webkit.org/show_bug.cgi?id=85537 Reviewed by Eric Seidel. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::renderTreeSize): 2012-05-03 Raphael Kubo da Costa [CMake] Rewrite FindCairo.cmake. https://bugs.webkit.org/show_bug.cgi?id=84895 Reviewed by Daniel Bates. The old approach relied on pkg-config for finding Cairo (which introduced a dependency on pkg-config that could be avoided), used the LibFindMacros code that we should probably remove in the future and did not use the FindPackageHandleStandardArguments module. Change all that by rewriting the module. - Use the pkg-config output optionally instead of requiring it like LibFindMacros did. - Remove the implicit dependency on FreeType which often found it the wrong way via pkg-config and without considering CMAKE_PREFIX_PATH. - Retrieve the Cairo version by looking at cairo-version.h instead of relying on pkg-config. It requires some additional code for checking if the desired version has been found, but that will not be needed once we start depending on CMake 2.8.3 or later. The only downside is that FPHSA sets _FOUND instead of _FOUND, and to keep things consistent Cairo_LIBRARIES and Cairo_INCLUDE_DIRS have become CAIRO_LIBRARIES and CAIRO_INCLUDE_DIRS. * PlatformEfl.cmake: Use CAIRO_FOO instead of Cairo_FOO. 2012-05-03 Tobias Netzel Bugs in WebFullScreenController https://bugs.webkit.org/show_bug.cgi?id=85388 Reviewed by Alexey Proskuryakov. Leopard specific fixes: NSWindow doesn't respond to isOnActiveSpace so find out first. Values passed to SetSystemUIMode were swapped. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): (-[WKFullScreenWindowController _updateMenuAndDockForFullScreen]): 2012-04-18 Jon Honeycutt WebFrameLoaderClient::dispatchWillSendSubmitEvent() needs to be implemented for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=84304 Reviewed by Jessie Berlin. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Declare willSendSubmitEvent on WKBundlePageFormClient. * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp: (WebKit::InjectedBundlePageFormClient::willSendSubmitEvent): From the String pair vector, create a map from control name to value. Call the client's willSendSubmitEvent. * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: Declare willSendSubmitEvent. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchWillSendSubmitEvent): Call the injected bundle form client's willSendSubmitEvent. * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Un-stub willSendSubmitEvent. * Shared/APIClientTraits.cpp: (WebKit): Set the interface sizes for WKBundlePageFormClient; version 1 includes willSendSubmitEvent. * Shared/APIClientTraits.h: Declare a specialization for WKBundlePageFormClient. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Bump the WKBundlePageFormClient version number. 2012-05-03 Fady Samuel Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport https://bugs.webkit.org/show_bug.cgi?id=70609 Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/qwebviewportinfo.cpp: (QWebViewportInfo::layoutSize): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::sendViewportAttributesChanged): (WebKit::WebPage::viewportConfigurationAsText): 2012-05-03 Michael Brüning [Qt][WK2] Also update Qt::ImEnabled flag when updating the input method. https://bugs.webkit.org/show_bug.cgi?id=85495 Reviewed by Simon Hausmann. QInputMethod only issues a new inputMethodQuery if the Qt::ImEnabled flag got updated as well. * UIProcess/qt/QtWebPageEventHandler.cpp: (WebKit::QtWebPageEventHandler::updateTextInputState): (WebKit::QtWebPageEventHandler::doneWithGestureEvent): 2012-05-03 Allan Sandfeld Jensen [Qt] Tap-highlight blinks when activated. https://bugs.webkit.org/show_bug.cgi?id=85481 Reviewed by Kenneth Rohde Christiansen. Set the opacity on the page-overlay the first time it is requested to be drawn. Otherwiser it will start fully opaque before fading in. * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::setNeedsDisplay): 2012-05-03 Kenneth Rohde Christiansen Document the QML WebViewExperimental API devicePixelRatio. Rubberstamped by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: 2012-05-03 Tor Arne Vestbø [Qt] Allow the web process and WTR to be paused on startup Makes it easier to debug the web process or run-webkit-tests -2, as you have ample time to attach gdb to the process. Reviewed by Simon Hausmann. * WebProcess/qt/WebProcessMainQt.cpp: (WebKit::WebProcessMainQt): * qt/MainQt.cpp: (main): 2012-05-03 Alexander Færøy Rename deviceDPI to devicePixelRatio https://bugs.webkit.org/show_bug.cgi?id=85049 Reviewed by Kenneth Rohde Christiansen. This patch fixes an API test regression from r115948 in tst_QQuickWebView::scrollRequest() by setting the device pixel ratio for the test WebView to 1.5. * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::newWebView): 2012-05-03 Stephanie Lewis https://bugs.webkit.org/show_bug.cgi?id=85450 unbounded growth of JSDOMWindowShells loading pages in the same window REGRESSION (r115083): PLT3 shows linear memory growth and gets slower with each run Reviewed by Brady Eidson. The API added for DOMWindowExtension, didCreateGlobalObjectForFrame, would create a global object for every world, even those that did not need the callback. This had the side effect of creating a JSDOMWindowShell that the associated world didn't necessarily know to clean up. Instead of creating unnecessary objects change the API to globalObjectIsAvailableForFrame and do not pass the global object in the API. The object can be accessed later by those worlds which require it. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::globalObjectIsAvailableForFrame): rename API and remove globalObject parameter * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: (InjectedBundlePageLoaderClient): ditto * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable): ditto 2012-05-02 Alexander Færøy Rename deviceDPI to devicePixelRatio https://bugs.webkit.org/show_bug.cgi?id=85049 Reviewed by Kenneth Rohde Christiansen. Add experimental QML API to set and get the device pixel ratio. * Shared/WebPreferencesStore.h: (WebKit): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::updateViewportSize): (QQuickWebViewExperimental::devicePixelRatio): (QQuickWebViewExperimental::setDevicePixelRatio): * UIProcess/API/qt/qquickwebview_p.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::sendViewportAttributesChanged): (WebKit::WebPage::updatePreferences): 2012-05-02 Jon Lee Migrate permission functions to Notification from NotificationCenter https://bugs.webkit.org/show_bug.cgi?id=80485 Reviewed by Jian Li. * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: (WebKit::NotificationPermissionRequestManager::startRequest): Add version to support both kinds of callbacks. (WebKit::NotificationPermissionRequestManager::cancelRequest): (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision): * WebProcess/Notifications/NotificationPermissionRequestManager.h: Add another map for new callback type. (NotificationPermissionRequestManager): * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::show): Add #ifdef to use replaceId() or tag() depending on which feature has been enabled. In the case where both are enabled, we prefer tag() since that is in the latest spec. * WebProcess/WebCoreSupport/WebNotificationClient.cpp: (WebKit::WebNotificationClient::requestPermission): * WebProcess/WebCoreSupport/WebNotificationClient.h: Implement both client functions to request permissions. 2012-05-02 Sheriff Bot Unreviewed, rolling out r115907. http://trac.webkit.org/changeset/115907 https://bugs.webkit.org/show_bug.cgi?id=85458 It broke all viewport tests on Qt and on GTK (Requested by Ossy on #webkit). * UIProcess/API/qt/qwebviewportinfo.cpp: (QWebViewportInfo::layoutSize): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::sendViewportAttributesChanged): (WebKit::WebPage::viewportConfigurationAsText): 2012-05-02 Eric Seidel Sort ENABLE_ defines in FeatureDefines.xcconfig files to make them easier to compare with one another (and easier to autogenerate) https://bugs.webkit.org/show_bug.cgi?id=85433 Reviewed by Adam Barth. I have a script which can autogenerate these xcconfig files as well as the vsprops files (and soon the Chromium, cmake, gnumake and qmake) feature lists from a central feature list file. In preparation for posting such a tool, I'm re-sorting these xcconfig files to be alphabetically ordered (currently they're close, but not quite). There is also at least one inconsistency between these files (CSS_LEGACY_PREFIXES) which I will fix in a second pass. I will also sort the FEATURE_DEFINES = line in a follow-up patch. * Configurations/FeatureDefines.xcconfig: 2012-04-18 Jon Honeycutt FrameLoaderClient::dispatchWillSendSubmitEvent() should be given more information about the form being submitted https://bugs.webkit.org/show_bug.cgi?id=84297 Reviewed by Andy Estes. * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: (WebFrameLoaderClient): Updated method declaration. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebFrameLoaderClient::willSendSubmitEvent): Stubbed. 2012-05-01 Jon Honeycutt Make Page::setDefersLoading() have a call count so that each time loading is deferred, it must be balanced with a call to resume. https://bugs.webkit.org/show_bug.cgi?id=84522 Reviewed by Andy Estes. * Shared/WebPreferencesStore.h: Use the macro to declare the new preference. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Set the setting from the WebPreferencesStore's value. 2012-05-02 Ojan Vafai Add a histogram for rendertree size https://bugs.webkit.org/show_bug.cgi?id=85226 Reviewed by Eric Seidel. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::renderTreeSize): Move the renderTreeSize code into Page.cpp, so it can be reused. 2012-05-02 Anders Carlsson PDF page does not show up when opened in the background https://bugs.webkit.org/show_bug.cgi?id=85427 Reviewed by Sam Weinig. Ensure that the accelerated hosting view is always the bottom view so it won't obscure subviews that are before it. * UIProcess/API/mac/WKView.mm: (-[WKView _enterAcceleratedCompositingMode:]): 2012-05-02 Fady Samuel Removing line in computeViewportAttributes that enforces a minimum scale factor to never allow zooming out more than viewport https://bugs.webkit.org/show_bug.cgi?id=70609 Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/qwebviewportinfo.cpp: (QWebViewportInfo::layoutSize): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::viewportConfigurationAsText): 2012-05-02 Emil A Eklund Fix usage of layout types in platform code https://bugs.webkit.org/show_bug.cgi?id=85392 Reviewed by Eric Seidel. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect): Use enclosingIntRect to convert visible rect for transform results to line up with device pixels. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState): Use pixelSnapped rect for editor rect calculation as it represents a device coordinate. 2012-05-02 Tor Arne Vestbø Revert r115191 - "Make the web view's url property follow the active url" It uncovered/caused issues in the icon-implementation that can't be easily fixed, so rolling out instead. https://bugs.webkit.org/show_bug.cgi?id=77554 Rubber-stamped by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::onComponentComplete): (QQuickWebView::reload): (QQuickWebView::url): (QQuickWebView::setUrl): (QQuickWebView::loadHtml): * 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.pro: * UIProcess/API/qt/tests/qmltests/WebView.pro: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: * UIProcess/API/qt/tests/qmltests/common/link.html: Removed. * UIProcess/API/qt/tests/qmltests/common/redirect.html: Removed. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::activeURL): * UIProcess/qt/QtWebPageLoadClient.cpp: (WebKit::QtWebPageLoadClient::QtWebPageLoadClient): (WebKit::QtWebPageLoadClient::didCommitLoad): (WebKit::QtWebPageLoadClient::didSameDocumentNavigation): (WebKit::QtWebPageLoadClient::dispatchLoadFailed): (WebKit::QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame): (WebKit::QtWebPageLoadClient::didFailLoadWithErrorForFrame): * UIProcess/qt/QtWebPageLoadClient.h: (QtWebPageLoadClient): 2012-05-02 Anders Carlsson When viewing a PDF, the Safari Status Bar shows other text https://bugs.webkit.org/show_bug.cgi?id=85395 Reviewed by Beth Dakin. Set the layer contents placement for the WKView so that its layer will get masksToBounds set. * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:contextRef:pageGroupRef:]): 2012-05-02 Mahesh Kulkarni Unreviewed. Build fix for Qt port on mac. * UIProcess/API/qt/qwebnavigationhistory_p.h: 2012-05-02 Tor Arne Vestbø Make ShareableSurface's ref-counting thread-safe Fixes assert when threaded rendering is enabled for the Qt scene-graph. https://bugs.webkit.org/show_bug.cgi?id=85381 Reviewed by Noam Rosenthal. * Shared/ShareableSurface.h: 2012-05-02 No'am Rosenthal [Texmap] Enable css filters in TextureMapperGL https://bugs.webkit.org/show_bug.cgi?id=75778 Add the plumbing in the ui-side compositing code in Qt to support filters. Serialize the filter operations for a layer when it's changed. Reviewed by Jocelyn Turcotte. * Shared/WebCoreArgumentCoders.cpp: (CoreIPC): (CoreIPC::::encode): (CoreIPC::::decode): * Shared/WebCoreArgumentCoders.h: (WebCore): * UIProcess/LayerTreeHostProxy.cpp: (WebKit): (WebKit::LayerTreeHostProxy::setCompositingLayerFilters): * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): * UIProcess/LayerTreeHostProxy.messages.in: * UIProcess/WebLayerTreeRenderer.cpp: (WebKit): (WebKit::WebLayerTreeRenderer::setLayerFilters): * UIProcess/WebLayerTreeRenderer.h: (WebLayerTreeRenderer): * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore): (WebCore::WebGraphicsLayer::didChangeFilters): (WebCore::WebGraphicsLayer::setFilters): (WebCore::WebGraphicsLayer::syncFilters): (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebGraphicsLayerClient): (WebGraphicsLayer): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit): (WebKit::LayerTreeHostQt::syncLayerFilters): * WebProcess/WebPage/qt/LayerTreeHostQt.h: (LayerTreeHostQt): 2012-05-02 Simon Hausmann [Qt] Fix vkb showing incorrect flags/keys when content changes Reviewed by Tor Arne Vestbø. When the editor state changes we have to inform the input method about changed properties so that it can issue a new input method query. Otherwise it may use old values from other QQuickItems or other incorrectly initialized data. Also use isActiveFocus() instead of hasFocus() to detect whether we're actively focused. This is also what QQuick uses internally to determine whether it can make calls to the input method or not. * UIProcess/qt/QtWebPageEventHandler.cpp: (WebKit::QtWebPageEventHandler::inputPanelVisibleChanged): (WebKit::QtWebPageEventHandler::updateTextInputState): (WebKit::QtWebPageEventHandler::doneWithGestureEvent): 2012-05-02 Kenneth Rohde Christiansen [Qt] Add initial QML documentation https://bugs.webkit.org/show_bug.cgi?id=85370 Reviewed by Simon Hausmann. Add initial documentation which also serves as an example on how it should be done. * UIProcess/API/qt/qquickwebview.cpp: * UIProcess/API/qt/qwebloadrequest.cpp: 2012-05-02 Zalan Bujtas [Qt][WK2] Remove redundant updateViewportArguments() call from HTMLBodyElement::didNotifyDescendantInseretions() https://bugs.webkit.org/show_bug.cgi?id=84241 Reviewed by Kenneth Rohde Christiansen. Add ASSERT to ensure at least one viewport argument change call is dispatched to WebPage per main frame. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout): 2012-05-02 Lars Knudsen [Qt] Make DeviceMotion and DeviceOrientation work with WebKit2 https://bugs.webkit.org/show_bug.cgi?id=64595 Reviewed by Kenneth Rohde Christiansen. Adding support for DeviceOrientation in WK2 WebPage * Target.pri: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): 2012-05-02 Zalan Bujtas [Qt][WK2] Minibrowser's progress bar should reset when WebProcess crashes while loading. https://bugs.webkit.org/show_bug.cgi?id=84445 Reviewed by Jocelyn Turcotte. Progress value needs resetting, when WebProcess crashes. This patch moves crash logic for loading to QtWebPageLoadClient. It also simplifies the callback function names in QtWebPageLoadClient, as they all valid only for main frames. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::processDidCrash): (QQuickWebViewFlickablePrivate::loadDidSucceed): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate::didChangeViewportProperties): (QQuickWebViewPrivate): * UIProcess/qt/QtWebPageLoadClient.cpp: (WebKit::QtWebPageLoadClient::QtWebPageLoadClient): (WebKit::QtWebPageLoadClient::completeLoadWhenProcessDidCrashIfNeeded): (WebKit): (WebKit::QtWebPageLoadClient::didStartProvisionalLoad): (WebKit::QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoad): (WebKit::QtWebPageLoadClient::didCommitLoad): (WebKit::QtWebPageLoadClient::didSameDocumentNavigation): (WebKit::QtWebPageLoadClient::didReceiveTitle): (WebKit::QtWebPageLoadClient::didFirstVisuallyNonEmptyLayout): (WebKit::QtWebPageLoadClient::didStartProvisionalLoadForFrame): (WebKit::QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame): (WebKit::QtWebPageLoadClient::didCommitLoadForFrame): (WebKit::QtWebPageLoadClient::didSameDocumentNavigationForFrame): (WebKit::QtWebPageLoadClient::didReceiveTitleForFrame): (WebKit::QtWebPageLoadClient::didFirstVisuallyNonEmptyLayoutForFrame): * UIProcess/qt/QtWebPageLoadClient.h: (WebKit): (QtWebPageLoadClient): 2012-05-02 Simon Hausmann [Qt] QQuickWebView does not allow for input from virtual keyboard https://bugs.webkit.org/show_bug.cgi?id=85350 Reviewed by Kenneth Christiansen. It is necessary to set the ItemAcceptsInputMethod flag on the QQuickWebView if we have editable content, in order for the input method to recognize that we can handle input method events. Analyzed by Michael Brüning. * UIProcess/API/qt/qquickwebview.cpp: Add simple hook for executing JS as private C++ API. (JSCallbackClosure): (javaScriptCallback): (QQuickWebView::runJavaScriptInMainFrame): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/tests/html/inputmethod.html: Added. * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView): (tst_QQuickWebView::runJavaScript): Simple helper for running JS. (tst_QQuickWebView::inputMethod): Added simple test for ItemAcceptsInputMethod toggling. * UIProcess/qt/QtWebPageEventHandler.cpp: (WebKit::QtWebPageEventHandler::updateTextInputState): Set ItemAcceptsInputMethod as soon as we have editable content. 2012-05-01 Anders Carlsson inspectorReallyUsesWebKitUserInterface should be more robust against missing files https://bugs.webkit.org/show_bug.cgi?id=85327 Reviewed by Timothy Hatcher. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::inspectorReallyUsesWebKitUserInterface): * WebProcess/WebPage/mac/WebInspectorMac.mm: (WebKit::inspectorReallyUsesWebKitUserInterface): 2012-05-01 Jeffrey Pfau Support for web content filter delegate for filtering https content https://bugs.webkit.org/show_bug.cgi?id=85300 Reviewed by Alexey Proskuryakov. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2012-05-01 Ryosuke Niwa *Command.h files shouldn't be exported to WebKit layer https://bugs.webkit.org/show_bug.cgi?id=74778 Reviewed by Eric Seidel. * WebProcess/WebPage/WebPage.cpp: 2012-05-01 Anders Carlsson Use the new barrier function in TiledCoreAnimationDrawingArea::forceRepaintAsync https://bugs.webkit.org/show_bug.cgi?id=85313 Reviewed by Sam Weinig. Use the new dispatchAfterEnsuringUpdatedScrollPosition function in forceRepaintAsync to ensure that the scroll position is up to date. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync): 2012-05-01 Kenneth Rohde Christiansen [Qt] Add an experimental extension to set the min. contents width https://bugs.webkit.org/show_bug.cgi?id=85281 Reviewed by Antonio Gomes. Add the experimental property preferredMinimumContentsWidth: which can be used to set the minimum contents width when not overriden by the page itself. Default value is set to 0, which defines normal [desktop] behaviour. * Shared/WebPreferencesStore.h: (WebKit): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewExperimental::preferredMinimumContentsWidth): (QQuickWebViewExperimental::setPreferredMinimumContentsWidth): * UIProcess/API/qt/qquickwebview_p.h: 2012-05-01 Kenneth Rohde Christiansen [Qt] Stop repeating timers which should only fire once https://bugs.webkit.org/show_bug.cgi?id=85277 Reviewed by Antonio Gomes. The TapGestureRecognizer uses QBasicTimers which are repeating timers, so stop then when they fire. * UIProcess/qt/QtTapGestureRecognizer.cpp: (WebKit::QtTapGestureRecognizer::highlightTimeout): (WebKit::QtTapGestureRecognizer::singleTapTimeout): (WebKit::QtTapGestureRecognizer::tapAndHoldTimeout): 2012-04-30 Anders Carlsson Crash when opening plug-ins in background tabs https://bugs.webkit.org/show_bug.cgi?id=85255 Reviewed by Dan Bernstein. * PluginProcess/mac/PluginControllerProxyMac.mm: (WebKit::PluginControllerProxy::setLayerHostingMode): m_layerHostingContext can be null for plug-ins that don't use the Core Animation drawing model, so check for that. 2012-04-30 Yael Aharon [Qt][WK2] Fixed layers are shaking when zoom level is not 1.0 due to a rounding error. https://bugs.webkit.org/show_bug.cgi?id=84306 Reviewed by Noam Rosenthal. When zooming, we need to be careful about how to convert the visible rect from float to int. Using toAlignedRect can produce inconsistent width and height when we are scrolling. This patch carefully modifies each piece of the visible rect, to avoid such rounding errors. In addition, the TransformationMatrix we use for painting, needs to be adjusted for the same rounding error. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::visibleContentsRect): (QQuickWebViewFlickablePrivate::_q_contentViewportChanged): * UIProcess/DrawingAreaProxy.h: (WebCore): (WebKit::DrawingAreaProxy::setVisibleContentsRect): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect): * UIProcess/DrawingAreaProxyImpl.h: (DrawingAreaProxyImpl): * UIProcess/LayerTreeHostProxy.cpp: (WebKit::LayerTreeHostProxy::setVisibleContentsRect): * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext): (WebKit::WebLayerTreeRenderer::setVisibleContentsRect): * UIProcess/WebLayerTreeRenderer.h: (WebLayerTreeRenderer): 2012-04-30 Anders Carlsson ScrollingCoordinator::requestScrollPositionUpdate should not update the main frame scroll position https://bugs.webkit.org/show_bug.cgi?id=85240 Reviewed by Sam Weinig. The find machinery should cope with asynchronous scroll position updates. * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::updateFindUIAfterPageScroll): Split the code that handles updating the find indicator and find overlay out into a separate function. (WebKit::FindController::findString): Call updateFindUIAfterPageScroll once we know that the scroll position has been updated. 2012-04-30 Anders Carlsson Add a way to asynchronously call a function once the scroll position of a page has been updated https://bugs.webkit.org/show_bug.cgi?id=85237 Reviewed by Sam Weinig. Add DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition, which will call the given function object after making sure that the scroll position has been updated correctly. This is important for TiledCoreAnimationDrawingArea, which updates the scrolling position asynchronously. * WebProcess/WebPage/DrawingArea.cpp: (WebKit::DrawingArea::dispatchAfterEnsuringUpdatedScrollPosition): Since scroll position updates are synchronous by default, just call function directly. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition): Commit the layer tree state and then use ScrollingThread::dispatchBarrier to make sure that the function is called when any scroll position changes have been made. If possible, freeze the layer tree to make sure that the update is atomic. 2012-04-30 Anders Carlsson Fix ALL the build failures! * UIProcess/API/mac/WKView.mm: (-[WKView WebKit::]): * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: 2012-04-30 Anders Carlsson Build fix. * Shared/DrawingAreaInfo.h: 2012-04-30 Emil A Eklund [gtk, qt, chromium, win] Fix usage of LayoutUnits and rounding in platform code https://bugs.webkit.org/show_bug.cgi?id=85222 Reviewed by Eric Seidel. Update platform code to use the pixel snapped values for painting rects to line up with device pixels and change platform specific hit testing code to use roundedPoint as hit testing is still mostly done on integer bounds. * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: (WebKit::WebPopupMenu::setUpPlatformData): 2012-04-30 Anders Carlsson Put all of TiledCoreAnimationDrawingArea in #if ENABLE(THREADED_SCROLLING) https://bugs.webkit.org/show_bug.cgi?id=85232 Reviewed by Sam Weinig. Stop pretending that TiledCoreAnimationDrawingArea works without threaded scrolling. * WebProcess/WebPage/DrawingArea.cpp: (WebKit::DrawingArea::create): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea): (WebKit::dispatchBackToMainThread): (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync): (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay): (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay): (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): 2012-04-30 Benjamin Poulain Add String::startsWith() and endsWith() for string literals https://bugs.webkit.org/show_bug.cgi?id=85154 Reviewed by Darin Adler. Update WebKit2 to use String::endsWith(UChar). * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::pathExtension): 2012-04-30 Alexey Proskuryakov Validate keypress command names https://bugs.webkit.org/show_bug.cgi?id=85204 Reviewed by Darin Adler. * UIProcess/API/mac/WKView.mm: (-[WKView doCommandBySelector:]): (-[WKView insertText:replacementRange:]): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::registerKeypressCommandName): (WebKit::WebPageProxy::isValidKeypressCommandName): * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::executeSavedCommandBySelector): 2012-04-30 Mario Sanchez Prada [GTK] Implement WebUIClient's runOpenPanel in WebKit2GTK+ https://bugs.webkit.org/show_bug.cgi?id=78491 Reviewed by Martin Robinson. Add a new public class to the API, WebKitFileChooserRequest, to be emitted along with a new WebKitWebView::run-file-chooser signal to let client applications to provide their own file chooser dialog when the use interacts with HTML Input elements of type 'file'. * GNUmakefile.am: Added new source files and headers. * UIProcess/API/gtk/WebKitFileChooserRequest.cpp: Added. (_WebKitFileChooserRequestPrivate): (webkit_file_chooser_request_init): (webkitFileChooserRequestFinalize): (webkitFileChooserRequestGetProperty): (webkit_file_chooser_request_class_init): (webkitFileChooserRequestCreate): (webkit_file_chooser_request_get_mime_types): (webkit_file_chooser_request_get_mime_types_filter): (webkit_file_chooser_request_get_select_multiple): (webkit_file_chooser_request_select_files): (webkit_file_chooser_request_get_selected_files): (webkit_file_chooser_request_cancel): * UIProcess/API/gtk/WebKitFileChooserRequest.h: Added. (_WebKitFileChooserRequest): (_WebKitFileChooserRequestClass): * UIProcess/API/gtk/WebKitFileChooserRequestPrivate.h: Added, containing the prototype of webkitFileChooserRequestCreate. Provide private API to make a file chooser request from the WebView, and provide a default handler for it. * UIProcess/API/gtk/WebKitWebView.cpp: (fileChooserDialogResponseCallback): Handler for the 'response' signal for the GtkFileChooserDialog used in the default handler. It will call to webkit_file_chooser_request_select_files or webkit_file_chooser_request_cancel as needed. (webkitWebViewRunFileChooser): Default handler for the new 'run-file-chooser' signal. It will create a GtkFileChooserDialog, connect to the 'response' signal and show it. (webkit_web_view_class_init): Connect the 'run-file-chooser' signal to the default handler, webkitWebViewRunFileChooser. (webkitWebViewRunFileChooserRequest): * UIProcess/API/gtk/WebKitWebView.h: (_WebKitWebViewClass): Added prototype for the handler of the new 'run-file-chooser' signal. * UIProcess/API/gtk/WebKitWebViewPrivate.h: Added prototype for private new function webkitWebViewRunFileChooserRequest. Provide an implementation for runOpenPanel in WebKitUIClient. * UIProcess/API/gtk/WebKitUIClient.cpp: (runOpenPanel): New, implements runOpenPanel by creating an instance of WebKitFileChooserRequest and asking the WebView to emit the 'run-file-chooser' signal with it. (attachUIClientToView): Reference the new runOpenPanel function. Added the new publich header to the main header. * UIProcess/API/gtk/webkit2.h: Added WebKitFileChooserRequest.h. New unit tests for the new WebKitFileChooserRequest API. Also, extended the WebViewTest class to allow simulating mouse clicks. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (checkMimeTypeForFilter): New, checks whether a GtkFileFilter filters a given MIME type, as specified by RFC 2046. (testWebViewFileChooserRequest): New unit test. (beforeAll): Add the new unit test as an UIClientTest. * UIProcess/API/gtk/tests/WebViewTest.cpp: (WebViewTest::clickMouseButton): New public function to simulate a mouse click through GdkEvents, as the combination of a 'press' and a 'release' event. Used from the new unit test to simulate the user pressing in the button rendered for a HTML Input element. (WebViewTest::executeMouseButtonEvent): New private function to simulate a mouse event through GdkEvents. * UIProcess/API/gtk/tests/WebViewTest.h: Updated documentation related files with the new API. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added new API. * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Added new section. * UIProcess/API/gtk/docs/webkit2gtk.types: Added get_type function. 2012-04-28 Yury Semikhatsky Unreviewed. Added new exported symbols after r115553. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-04-27 Geoffrey Garen Made WeakSet::allocate() static and removed its JSGlobalData argument https://bugs.webkit.org/show_bug.cgi?id=85128 Reviewed by Anders Carlsson. Mechanically removed JSGlobalData arguments from PassWeak and Weak allocation. * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::getOrCreateJSObject): 2012-04-27 Yael Aharon [Qt][WK2] Don't call syncRemoteContents from WebLayerTreeRenderer::paintToCurrentGLContext https://bugs.webkit.org/show_bug.cgi?id=85088 Reviewed by Noam Rosenthal. Remove the call to syncRemoteContents from WebLayerTreeRenderer::paintToCurrentGLContext, since it was moved to QQuickWebPage::updatePaintNode. To make sure that we always sync before painting, this patch also calls page->update() when the viewport changes. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::_q_contentViewportChanged): * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext): 2012-04-27 Gavin Peters Add new ENABLE_LINK_PRERENDER define to control the Prerendering API https://bugs.webkit.org/show_bug.cgi?id=84871 Reviewed by Adam Barth. Prerendering is currently covered by the ENABLE_LINK_PREFETCH macro, but the new Prerendering API separates it from prefetching. Having separate include guards lets ports enable prefetching, a relatively easy change, without needing to build the infrastructure for prerendering, which is considerably more complicated. 2012-04-27 Yael Aharon [Qt][WK2] setVisibleContentsRect is not thread safe https://bugs.webkit.org/show_bug.cgi?id=85060 Reviewed by Noam Rosenthal. Don't call WebLayerTreeRenderer::setVisibleContentsRect directly. Use bind() instead. * UIProcess/LayerTreeHostProxy.cpp: (WebKit::LayerTreeHostProxy::setVisibleContentsRect): 2012-04-26 Carlos Garcia Campos [SOUP] Add a way to register custom uri schemes in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=84130 Reviewed by Martin Robinson. * GNUmakefile.am: Add new files to compilation. * Platform/CoreIPC/MessageID.h: Add MessageClassWebSoupRequestManager and MessageClassWebSoupRequestManagerProxy message types to identify WebSoupRequestManager messages. * Shared/API/c/WKBase.h: Include WKBaseSoup.h when building with soup network backend. * Shared/API/c/soup/WKBaseSoup.h: Added. * Shared/APIObject.h: Add SoupRequestManager type when using soup. * UIProcess/API/C/WKAPICast.h: Include WKAPICastSoup.h when building with soup network backend. * UIProcess/API/C/soup/WKAPICastSoup.h: Added. (WebKit): Map WKSoupRequestManagerRef to WebSoupRequestManagerProxy. * UIProcess/API/C/soup/WKContextSoup.cpp: Added. (WKContextGetSoupRequestManager): Return WKSoupRequestManagerRef associated to the context. * UIProcess/API/C/soup/WKContextSoup.h: Added. * UIProcess/API/C/soup/WKSoupRequestManager.cpp: Added. (WKSoupRequestManagerGetTypeID): Return the WebSoupRequestManagerProxy API type. (WKSoupRequestManagerSetClient): Set the WKSoupRequestManagerClient. (WKSoupRequestManagerRegisterURIScheme): Call WebSoupRequestManagerProxy::registerURIScheme(). (WKSoupRequestManagerHandleURIRequest): Call WebSoupRequestManagerProxy::handleURIRequest(). * UIProcess/API/C/soup/WKSoupRequestManager.h: Added. * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): Initialize m_soupRequestManagerProxy when using soup. (WebKit::WebContext::~WebContext): Invalidate and clear the m_soupRequestManagerProxy when using soup. (WebKit::WebContext::disconnectProcess): Invalidate the m_soupRequestManagerProxy when using soup. (WebKit::WebContext::didReceiveMessage): Forward the message to m_soupRequestManagerProxy if it's a MessageClassWebSoupRequestManagerProxy message. * UIProcess/WebContext.h: (WebKit::WebContext::soupRequestManagerProxy): Return m_soupRequestManagerProxy. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveMessage): Forward message to the web context if it's a MessageClassWebSoupRequestManagerProxy message. * UIProcess/soup/WebSoupRequestManagerClient.cpp: Added. (WebKit::WebSoupRequestManagerClient::didReceiveURIRequest): Call didReceiveURIRequest callback if it has an implementation. * UIProcess/soup/WebSoupRequestManagerClient.h: Added. * UIProcess/soup/WebSoupRequestManagerProxy.cpp: Added. (WebKit::WebSoupRequestManagerProxy::create): Create a new WebSoupRequestManagerProxy. (WebKit::WebSoupRequestManagerProxy::WebSoupRequestManagerProxy): (WebKit::WebSoupRequestManagerProxy::~WebSoupRequestManagerProxy): (WebKit::WebSoupRequestManagerProxy::invalidate): (WebKit::WebSoupRequestManagerProxy::initializeClient): (WebKit::WebSoupRequestManagerProxy::didReceiveMessage): (WebKit::WebSoupRequestManagerProxy::registerURIScheme): Send RegisterURIScheme message to the WebProcess to register the given URI scheme. (WebKit::WebSoupRequestManagerProxy::handleURIRequest): Send HandleURIRequest message to the WebProcess with the given data and data type. (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequest): Call didReceiveURIRequest callback to allow the user to handle the request. * UIProcess/soup/WebSoupRequestManagerProxy.h: Added. * UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Added. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): Initialize m_soupRequestManager when using soup. (WebKit::WebProcess::didReceiveMessage): Forward the message to m_soupRequestManager if it's a MessageClassWebSoupRequestManager message. * WebProcess/WebProcess.h: (WebKit::WebProcess::soupRequestManager): Return m_soupRequestManager. * WebProcess/soup/WebKitSoupRequestGeneric.cpp: Added. (webkitSoupRequestGenericFinalize): (webkit_soup_request_generic_init): (webkitSoupRequestGenericSendAsync): Create a GSimpleAsyncResult to handle the request and pass it to the WebSoupRequestManager. (webkitSoupRequestGenericSendFinish): Finish the async operation started by webkitSoupRequestGenericSendAsync() and return the contents of the request as returned by WebSoupRequestManager. (webkitSoupRequestGenericGetContentLength): Get the request contents length. (webkitSoupRequestGenericGetContentType): Get the request mime type. (webkit_soup_request_generic_class_init): (webkitSoupRequestGenericSetContentLength): Set the request contents length. (webkitSoupRequestGenericSetContentType): Set the request mime type. * WebProcess/soup/WebKitSoupRequestGeneric.h: Added. * WebProcess/soup/WebSoupRequestManager.cpp: Added. (WebKit::generateSoupRequestID): Helper function to generate a unique request identifier. (WebKit::WebSoupRequestManager::WebSoupRequestManager): (WebKit::WebSoupRequestManager::~WebSoupRequestManager): (WebKit::WebSoupRequestManager::didReceiveMessage): (WebKit::WebSoupRequestManager::registerURIScheme): Add the scheme to the schemes array and add a new WebKitSoupRequestGeneric feature with the new scheme list to the SoupRequester feature. (WebKit::WebSoupRequestManager::handleURIRequest): Complete the async operation by creating a GInputStream with the request data, or setting an error in case of failure. (WebKit::WebSoupRequestManager::send): Send DidReceiveURIRequest message to the UI process. (WebKit::WebSoupRequestManager::finish): Return the GInputStream containing the request data. * WebProcess/soup/WebSoupRequestManager.h: Added. * WebProcess/soup/WebSoupRequestManager.messages.in: Added. 2012-04-26 No'am Rosenthal [Qt][WK2] A GraphicsSurface instance is created with every update https://bugs.webkit.org/show_bug.cgi?id=85014 Reviewed by Kenneth Rohde Christiansen. Keep a copy of the GraphicsSurface in the UI process, and reuse it for subsequent updates. This ensure that the texture and other data associated with the GraphicsSurface does not need to be reconstructed. * Shared/ShareableSurface.h: (Handle): (WebKit::ShareableSurface::Handle::graphicsSurfaceToken): * UIProcess/LayerTreeHostProxy.cpp: (WebKit::LayerTreeHostProxy::updateTileForLayer): * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): 2012-04-26 Martin Robinson [Cairo] Wrap cairo surfaces in a class when storing native images https://bugs.webkit.org/show_bug.cgi?id=83611 Reviewed by Alejandro G. Castro. * Shared/gtk/ArgumentCodersGtk.cpp: Updated to reflect the addition of NativeImageCairo. 2012-04-26 Jon Lee [WK2] AlternativeTextClient leaks when the page is destroyed https://bugs.webkit.org/show_bug.cgi?id=84307 Reviewed by Enrica Casucci. * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: Implement pageDestroyed(), as in EditorClient. (WebAlternativeTextClient): * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp: (WebKit::WebAlternativeTextClient::pageDestroyed): Deletes itself. 2012-04-26 Jer Noble Full Screen mode does not preserve CALayer ordering after exiting. https://bugs.webkit.org/show_bug.cgi?id=83931 Reviewed by Eric Carlson. Further corrections to r114567. When swapping view for otherView, give the correct relative view to -[NSView addSubview:positioned:relativeTo:]. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController _swapView:with:]): 2012-04-25 Jer Noble Placeholder view is immediately removed from hosting window upon entering full screen. https://bugs.webkit.org/show_bug.cgi?id=84916 Reviewed by Darin Adler. Correct a mistake added in r114567. When swapping view for otherView, add otherView and remove view (rather than adding otherView and removing otherView). * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController _swapView:with:]): 2012-04-26 Carlos Garcia Campos [GTK] Build and run TestWebKitAPI WebKit2 unit tests https://bugs.webkit.org/show_bug.cgi?id=84446 Reviewed by Philippe Normand. * UIProcess/API/C/WKNativeEvent.h: Define WKNativeEventPtr as GdkEvent for the GTK+ port. 2012-04-26 Andras Becsi [Qt][WK2] Tap highlight should have a delay not to interfere with panning https://bugs.webkit.org/show_bug.cgi?id=84948 Reviewed by Kenneth Rohde Christiansen. Start the tap highlight animation after a slight delay so that pan gestures do not result in flashing highlight rects which slow down flicking, especially during continuous pan gestures. * UIProcess/qt/QtTapGestureRecognizer.cpp: (WebKit::QtTapGestureRecognizer::update): (WebKit::QtTapGestureRecognizer::highlightTimeout): (WebKit): (WebKit::QtTapGestureRecognizer::reset): (WebKit::QtTapGestureRecognizer::timerEvent): * UIProcess/qt/QtTapGestureRecognizer.h: (QtTapGestureRecognizer): * UIProcess/qt/QtWebPageEventHandler.cpp: (WebKit::QtWebPageEventHandler::doneWithTouchEvent): 2012-04-26 Lars Knudsen Make it possible to use accelerated compositing for page overlay fading https://bugs.webkit.org/show_bug.cgi?id=82336 Reviewed by Noam Rosenthal. Page overlay fading will use AC where possible. Otherwise, it will fall back to the previous method of redrawing each frame in the animation. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setPageOverlayOpacity): (DrawingArea): (WebKit::DrawingArea::pageOverlayShouldApplyFadeWhenPainting): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::setPageOverlayOpacity): (WebKit): (WebKit::DrawingAreaImpl::pageOverlayShouldApplyFadeWhenPainting): * WebProcess/WebPage/DrawingAreaImpl.h: (DrawingAreaImpl): * WebProcess/WebPage/LayerTreeHost.h: (WebKit::LayerTreeHost::setPageOverlayOpacity): (WebKit::LayerTreeHost::pageOverlayShouldApplyFadeWhenPainting): * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::PageOverlay): (WebKit::PageOverlay::setPage): (WebKit::PageOverlay::fadeAnimationTimerFired): * WebProcess/WebPage/PageOverlay.h: * WebProcess/WebPage/TapHighlightController.cpp: (WebKit::TapHighlightController::drawRect): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::setPageOverlayOpacity): (WebKit): * WebProcess/WebPage/qt/LayerTreeHostQt.h: (LayerTreeHostQt): (WebKit::LayerTreeHostQt::pageOverlayShouldApplyFadeWhenPainting): 2012-04-26 Alexander Færøy [Qt] r115300 broke the Qt build on Mac OS X. This patch adds guards around the createPluginContainer and windowedPluginGeometryDidChange member functions in WebPageProxy. Unreviewed build fix. * UIProcess/qt/WebPageProxyQt.cpp: (WebKit): 2012-04-26 Carlos Garcia Campos [GTK][WebKit2] Initial windowed plugins implementation https://bugs.webkit.org/show_bug.cgi?id=61065 Reviewed by Philippe Normand. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::createPluginContainer): (WebKit::PluginControllerProxy::windowedPluginGeometryDidChange): * PluginProcess/PluginControllerProxy.h: * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseContainerAdd): Implement GtkContainer::add(). (webkitWebViewBaseContainerRemove): Implement GtkContainer::remove(). (webkitWebViewBaseContainerForall): Implement GtkContainer::forall(). (webkitWebViewBaseChildMoveResize): Set a new geometry for a child widget. (webkitWebViewBaseChildAllocate): Allocate a child widget. (resizeWebKitWebViewBaseFromAllocation): Allocate child widgets. (webkit_web_view_base_class_init): * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Add webkitWebViewBaseSizeAllocate(). * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: Add createPluginContainer and windowedPluginGeometryDidChange messages. * UIProcess/gtk/WebPageProxyGtk.cpp: (WebKit::pluginWindowMap): (WebKit::pluginContainerPlugRemoved): Remove the socket from the hash map when its plug is removed. (WebKit::WebPageProxy::createPluginContainer): Create a GtkSocket as container widget for windowed plugins. (WebKit::WebPageProxy::windowedPluginGeometryDidChange): Call webkitWebViewBaseSizeAllocate() to update the plugin widget geometry. * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::createPluginContainer): (WebKit::WebPageProxy::windowedPluginGeometryDidChange): * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::socketPlugRemovedCallback): Return TRUE to avoid the socket to be destroyed, since we need to reuse it. (WebKit::NetscapePlugin::platformPostInitializeWindowed): Ask the ui process to create a plugin container. (WebKit::NetscapePlugin::platformPostInitializeWindowless): (WebKit::NetscapePlugin::platformPostInitialize): (WebKit::NetscapePlugin::platformGeometryDidChange): For windowed plugins notify the ui process that the plugin geometry has changed. (WebKit::NetscapePlugin::platformPaint): Do nothing for windowed plugins, the caller already calls callSetWindow(). * WebProcess/Plugins/PluginController.h: * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::createPluginContainer): (WebKit::PluginProxy::windowedPluginGeometryDidChange): * WebProcess/Plugins/PluginProxy.h: * WebProcess/Plugins/PluginProxy.messages.in: * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::createPluginContainer): (WebKit::PluginView::windowedPluginGeometryDidChange): * WebProcess/Plugins/PluginView.h: 2012-04-26 Chris Fleizach2 CrashTracer: [USER] 157 crashes in WebProcess at com.apple.WebCore: WebCore::AccessibilityRenderObject::isAttachment const + 29 https://bugs.webkit.org/show_bug.cgi?id=84463 Reviewed by Darin Adler. * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: (WebKit): 2012-04-25 Benjamin Poulain Add a version of StringImpl::find() without offset https://bugs.webkit.org/show_bug.cgi?id=83968 Update the symbols files. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-04-25 Mark Hahnenberg WebCore shouldn't call collectAllGarbage directly https://bugs.webkit.org/show_bug.cgi?id=84897 Reviewed by Geoffrey Garen. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didClose): Changed to call garbageCollectSoon. This is the function that causes us to do so much collection on page navigation. 2012-04-25 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=84909 Background tabs are fuzzy until repaint when deviceScaleFactor > 1 -and corresponding- Rubber-stamped by Darin Adler. Re-order the parameters of paintBitmapContext to match paintImage. * Platform/cg/CGUtilities.cpp: (WebKit::paintBitmapContext): * Platform/cg/CGUtilities.h: (WebKit): * UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::resetScrolledRect): (WebKit::BackingStore::paint): (WebKit::BackingStore::backingStoreContext): 2012-04-25 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=84909 Background tabs are fuzzy until repaint when deviceScaleFactor > 1 -and corresponding- Reviewed by Darin Adler. BackingStoreMac paints into a Bitmap instead of a CGLayer when there is no containing window. That bitmap is used for the initial paint when a background tab first comes to he foreground, so it needs to be HiDPI-aware. paintBitmapContext() now takes a scale factor that it passes along to paintImage rather than hardcoding a scale factor of 1 for paintImage. * Platform/cg/CGUtilities.cpp: (WebKit::paintBitmapContext): * Platform/cg/CGUtilities.h: (WebKit): When these functions fall into the bitmap case, they need to adopt the device scale factor, which means they need to scale in size by the scale factor, and also scale their context. * UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::resetScrolledRect): (WebKit::BackingStore::paint): (WebKit::BackingStore::backingStoreContext): 2012-04-25 Enrica Casucci REGRESSION (r110494): Dragging images from Safari to Finder results in .webloc rather than image file https://bugs.webkit.org/show_bug.cgi?id=84878 In WebKit2, it could happen to try to start the drag twice, given the asynchronous nature of the communication between the UI process and the WebProcess. We need to guarantee that we don't do that, otherwise on OS X the pasteboard ownership gets changed which affects the promised file types. The fix for the problem is in WebCore and we can now remove the guard on _setDragImage. Reviewed by Alexey Proskuryakov. * UIProcess/API/mac/WKView.mm: (-[WKView mouseDown:]): (-[WKView _setDragImage:at:linkDrag:]): 2012-04-18 Tor Arne Vestbø [Qt] Make the web view's url property follow the active url https://bugs.webkit.org/show_bug.cgi?id=77554 The url property of the webview now reflects the 'active' url of the page, which maps to either the currently loading url, in the case of an ongoing load, or the result of a load, even when the load failed. In practice this means that setting the url though QML, or navigating to a new url in the page by e.g clicking, will both instantly change the url-property of the webview to the target url. This differs from earlier behavior, where we would update the url when the load committed. An optional argument is added to loadHtml(), to allow setting the unreachable url when providing replacement content for failed loads. A slight change in the activeUrl() implementation is also done, where we now favour the url of an pending API request, even when we don't have a mainframe yet. Finally, the location bar in the minibrowser is updated to behave a bit more like normal browsers in terms of when the url will change and how active focus is handled. Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::onComponentComplete): (QQuickWebView::reload): (QQuickWebView::url): (QQuickWebView::setUrl): (QQuickWebView::loadHtml): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro: * UIProcess/API/qt/tests/qmltests/WebView.pro: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: * UIProcess/API/qt/tests/qmltests/common/link.html: Added. * UIProcess/API/qt/tests/qmltests/common/redirect.html: Added. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::activeURL): * UIProcess/qt/QtWebPageLoadClient.cpp: (QtWebPageLoadClient::QtWebPageLoadClient): (QtWebPageLoadClient::didStartProvisionalLoadForFrame): (QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame): (QtWebPageLoadClient::didCommitLoadForFrame): (QtWebPageLoadClient::dispatchLoadFailed): (QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame): (QtWebPageLoadClient::didFailLoadWithErrorForFrame): * UIProcess/qt/QtWebPageLoadClient.h: (QtWebPageLoadClient): 2012-04-25 Allan Sandfeld Jensen [Qt] Zoom back can overscroll document edges. https://bugs.webkit.org/show_bug.cgi?id=84851 Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): 2012-04-18 Tor Arne Vestbø [Qt] Make the web view's url property follow the active url https://bugs.webkit.org/show_bug.cgi?id=77554 The url property of the webview now reflects the 'active' url of the page, which maps to either the currently loading url, in the case of an ongoing load, or the result of a load, even when the load failed. In practice this means that setting the url though QML, or navigating to a new url in the page by e.g clicking, will both instantly change the url-property of the webview to the target url. This differs from earlier behavior, where we would update the url when the load committed. An optional argument is added to loadHtml(), to allow setting the unreachable url when providing replacement content for failed loads. A slight change in the activeUrl() implementation is also done, where we now favour the url of an pending API request, even when we don't have a mainframe yet. Finally, the location bar in the minibrowser is updated to behave a bit more like normal browsers in terms of when the url will change and how active focus is handled. Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::onComponentComplete): (QQuickWebView::reload): (QQuickWebView::url): (QQuickWebView::setUrl): (QQuickWebView::loadHtml): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro: * UIProcess/API/qt/tests/qmltests/WebView.pro: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: * UIProcess/API/qt/tests/qmltests/common/link.html: Added. * UIProcess/API/qt/tests/qmltests/common/redirect.html: Added. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::activeURL): * UIProcess/qt/QtWebPageLoadClient.cpp: (QtWebPageLoadClient::QtWebPageLoadClient): (QtWebPageLoadClient::didStartProvisionalLoadForFrame): (QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame): (QtWebPageLoadClient::didCommitLoadForFrame): (QtWebPageLoadClient::dispatchLoadFailed): (QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame): (QtWebPageLoadClient::didFailLoadWithErrorForFrame): * UIProcess/qt/QtWebPageLoadClient.h: (QtWebPageLoadClient): 2012-04-24 Enrica Casucci REGRESSION (r109022) Safari not placing service data on pasteboard. https://bugs.webkit.org/show_bug.cgi?id=84766 The support for OS X services requires that the write operations to the pasteboard occur synchronously. This behavior was changed with r109022. This change removes the original synchronous call to the WebProcess to perform the pasteboard write that had become asynchronous after r109022. It implements instead a synchronous call to retrive the content to be placed in the pasteboard. Reviewed by Alexey Proskuryakov. * UIProcess/API/mac/WKView.mm: (-[WKView writeSelectionToPasteboard:types:]): Uses new methods. * UIProcess/WebPageProxy.h: * UIProcess/mac/WebPageProxyMac.mm: Removed writeSelectionToPasteboard. (WebKit::WebPageProxy::getStringSelectionForPasteboard): Added. (WebKit::WebPageProxy::getBufferSelectionForPasteboard): Added. * WebProcess/WebPage/WebPage.h: Added support for the new messages and removed old message. * WebProcess/WebPage/WebPage.messages.in: Ditto. * WebProcess/WebPage/mac/WebPageMac.mm: Ditto. (WebKit::WebPage::readSelectionFromPasteboard): Added. (WebKit::WebPage::getBufferSelectionForPasteboard): Added. 2012-04-24 Brady Eidson Fix Windows build. * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h: (~InjectedBundleDOMWindowExtension): VS doesn't like OVERRIDE on d'tor's 2012-04-24 Jesus Sanchez-Palencia [Qt] Unreviewed build fix after r115083 * WebProcess/qt/QtBuiltinBundlePage.cpp: (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): 2012-04-24 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=82664 Need DOMWindow mechanism to supplement UserScripts for page cache notifications Reviewed by Sam Weinig. - Adds a new API object WKBundleDOMWindowExtension - Exposes callbacks about the lifetime of DOMWindowExtensions through BundlePageLoaderClient Add new API casts: * Shared/API/c/WKBase.h: * Shared/APIClientTraits.cpp: * Shared/APIObject.h: * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: Add API for the new DOMWindowExtension object: * WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.cpp: Added. (WKBundleDOMWindowExtensionGetTypeID): (WKBundleDOMWindowExtensionCreate): (WKBundleDOMWindowExtensionGetFrame): (WKBundleDOMWindowExtensionGetScriptWorld): * WebProcess/InjectedBundle/API/c/WKBundleDOMWindowExtension.h: Added. Add implementation for that API which wraps the WebCore::DOMWindowExtension: * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp: Added. (WebKit::allExtensions): (WebKit::InjectedBundleDOMWindowExtension::create): (WebKit::InjectedBundleDOMWindowExtension::get): (WebKit::InjectedBundleDOMWindowExtension::InjectedBundleDOMWindowExtension): (WebKit::InjectedBundleDOMWindowExtension::~InjectedBundleDOMWindowExtension): (WebKit::InjectedBundleDOMWindowExtension::frame): (WebKit::InjectedBundleDOMWindowExtension::world): * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h: Added. (InjectedBundleDOMWindowExtension): (WebKit::InjectedBundleDOMWindowExtension::type): Add new BundlePageLoaderClient methods: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::didCreateGlobalObjectForFrame): (WebKit::InjectedBundlePageLoaderClient::willDisconnectDOMWindowExtensionFromGlobalObject): (WebKit::InjectedBundlePageLoaderClient::didReconnectDOMWindowExtensionToGlobalObject): (WebKit::InjectedBundlePageLoaderClient::willDestroyGlobalObjectForDOMWindowExtension): * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: (InjectedBundlePageLoaderClient): Implement the 4 new callbacks from WebCore which notify the BundlePageLoaderClient: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchGlobalObjectAvailable): (WebKit::WebFrameLoaderClient::dispatchWillDisconnectDOMWindowExtensionFromGlobalObject): (WebKit::WebFrameLoaderClient::dispatchDidReconnectDOMWindowExtensionToGlobalObject): (WebKit::WebFrameLoaderClient::dispatchWillDestroyGlobalObjectForDOMWindowExtension): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: Project Files: * CMakeLists.txt: * GNUmakefile.am: * Target.pri: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: 2012-04-24 Andras Becsi [Qt][WK2] Implement axis locking on the WebView for pan gestures https://bugs.webkit.org/show_bug.cgi?id=84350 Reviewed by Kenneth Rohde Christiansen. If a pan gesture has sufficient velocity along one axis the WebView should automatically lock the page movement to that axis. This locking should be maintained until the ongoing pan gesture ends. This patch implements a simple axis locker which adjusts the positions sent to the Flickable to the initial reference position according to the direction an velocity information it gathered from incoming touch events. The FlickableAxisLocker makes use of the velocity information of the touch point if available, else an approximate velocity of the incoming event is calculated. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::FlickableAxisLocker::FlickableAxisLocker): (QQuickWebViewPrivate::FlickableAxisLocker::touchVelocity): (QQuickWebViewPrivate::FlickableAxisLocker::update): (QQuickWebViewPrivate::FlickableAxisLocker::setReferencePosition): (QQuickWebViewPrivate::FlickableAxisLocker::reset): (QQuickWebViewPrivate::FlickableAxisLocker::adjust): (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebView::touchEvent): (QQuickWebView::handleFlickableMousePress): (QQuickWebView::handleFlickableMouseMove): (QQuickWebView::handleFlickableMouseRelease): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): 2012-04-24 Allan Sandfeld Jensen [Qt] Tap-to zoom should navigate when appropiate https://bugs.webkit.org/show_bug.cgi?id=84602 Reviewed by Simon Hausmann. When a zoomable area is returned and has the same zoom-level as the current, examine if the using this target would expose currently unexposed parts of the zoom-target. If it does, pan to that area instead of zooming back. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): 2012-04-24 Carlos Garcia Campos [GTK] Add WebKitCookieManager::changed signal to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=82598 Reviewed by Philippe Normand. * UIProcess/API/gtk/WebKitCookieManager.cpp: (webkitCookieManagerFinalize): Stop observing cookie changes. (webkit_cookie_manager_class_init): Add WebKitCookieManager::changed signal. (cookiesDidChange): Emit WebKitCookieManager::changed signal. (webkitCookieManagerCreate): Implement WKCookieManagerClient and start observing cookie changes. * UIProcess/API/gtk/tests/TestCookieManager.cpp: (testCookieManagerCookiesChanged): (beforeAll): 2012-04-24 Allan Sandfeld Jensen [Qt] Restore x-position when restoring previous zoom-level. https://bugs.webkit.org/show_bug.cgi?id=84591 Reviewed by Simon Hausmann. Tap-to-zoom fits content to width, therefore it is essentional that the content is refitted to width when zooming out. This patch pairs horizontal position and scale on the zoom-out stack. Additionally it fixes a problem with not detecting zoom-out properly due to floating point errors. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::fuzzyCompare): (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): * UIProcess/qt/QtViewportInteractionEngine.h: (WebKit::QtViewportInteractionEngine::ScaleStackItem::ScaleStackItem): (QtViewportInteractionEngine): 2012-04-24 Allan Sandfeld Jensen [Qt] Incomplete interaction-engine reset. https://bugs.webkit.org/show_bug.cgi?id=84594 Reviewed by Simon Hausmann. Reset a few values forgotten in the reset function. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::reset): 2012-04-23 Andreas Kling [Mac] WebProcess should empty cache on a background thread/block. Reviewed by Anders Carlsson. Move the removeAllCachedResponses call to a dispatch queue and wait for it on exit. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): * WebProcess/WebProcess.h: (WebProcess): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformClearResourceCaches): (WebKit::WebProcess::platformTerminate): 2012-04-23 Allan Sandfeld Jensen [Qt][WK2] Convert touch-point area. https://bugs.webkit.org/show_bug.cgi?id=84434 Reviewed by Kenneth Rohde Christiansen. Missed WebKit2 conversion in commit r106470. * Shared/qt/WebEventFactoryQt.cpp: (WebKit::WebEventFactory::createWebTouchEvent): 2012-04-23 Balazs Kelemen [Qt] Add desktop zooming support for QQuickWebView https://bugs.webkit.org/show_bug.cgi?id=82337 Reviewed by Simon Hausmann. Add private C++ API for programmatic zooming. This is important on desktop where we don't have any way to zoom currently. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewLegacyPrivate::zoomFactor): (QQuickWebViewLegacyPrivate::setZoomFactor): (QQuickWebView::zoomFactor): (QQuickWebView::setZoomFactor): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate::zoomFactor): (QQuickWebViewPrivate::setZoomFactor): (QQuickWebViewPrivate): (QQuickWebViewLegacyPrivate): 2012-04-23 Zalan Bujtas [Qt][WK2] Move non-api classes to WebKit namespace at WebKit2/UiProcess/qt https://bugs.webkit.org/show_bug.cgi?id=84528 Reviewed by Simon Hausmann. Fix namespace usage in non-api classes for Qt. * UIProcess/API/qt/qquickwebpage.cpp: * UIProcess/API/qt/qquickwebpage_p.h: (WebKit): * UIProcess/API/qt/qquickwebpage_p_p.h: (WebKit): (QQuickWebPagePrivate): * UIProcess/API/qt/qquickwebview.cpp: * UIProcess/API/qt/qquickwebview_p.h: (WebKit): * UIProcess/API/qt/qquickwebview_p_p.h: (WebKit): (QQuickWebViewPrivate::viewportInteractionEngine): (QQuickWebViewPrivate): (QQuickWebViewFlickablePrivate::viewportInteractionEngine): (QQuickWebViewFlickablePrivate): * UIProcess/API/qt/qwebdownloaditem_p.h: (WebKit): * UIProcess/API/qt/qwebviewportinfo.cpp: * UIProcess/qt/LayerBackingStore.cpp: * UIProcess/qt/LayerBackingStore.h: (WebKit): * UIProcess/qt/QtDialogRunner.cpp: (WebKit): * UIProcess/qt/QtDialogRunner.h: (WebKit): * UIProcess/qt/QtDownloadManager.cpp: * UIProcess/qt/QtDownloadManager.h: (WebKit): * UIProcess/qt/QtGestureRecognizer.cpp: * UIProcess/qt/QtGestureRecognizer.h: (WebKit): * UIProcess/qt/QtPageClient.cpp: (WebKit): * UIProcess/qt/QtPageClient.h: (WebKit): (QtPageClient): * UIProcess/qt/QtPanGestureRecognizer.cpp: * UIProcess/qt/QtPanGestureRecognizer.h: * UIProcess/qt/QtPinchGestureRecognizer.cpp: * UIProcess/qt/QtPinchGestureRecognizer.h: * UIProcess/qt/QtTapGestureRecognizer.h: (WebKit): * UIProcess/qt/QtViewportInteractionEngine.cpp: * UIProcess/qt/QtViewportInteractionEngine.h: * UIProcess/qt/QtWebContext.cpp: * UIProcess/qt/QtWebContext.h: * UIProcess/qt/QtWebError.cpp: (WebKit): * UIProcess/qt/QtWebError.h: (WebKit): * UIProcess/qt/QtWebIconDatabaseClient.cpp: (WebKit): * UIProcess/qt/QtWebIconDatabaseClient.h: (WTF): (WebKit): (QtWebIconDatabaseClient): * UIProcess/qt/QtWebPageEventHandler.cpp: (WebKit): * UIProcess/qt/QtWebPageEventHandler.h: (WebCore): (WebKit): * UIProcess/qt/QtWebPageLoadClient.cpp: (WebKit): * UIProcess/qt/QtWebPageLoadClient.h: (WebKit): * UIProcess/qt/QtWebPagePolicyClient.cpp: (WebKit): * UIProcess/qt/QtWebPagePolicyClient.h: (WebKit): * UIProcess/qt/QtWebPageSGNode.cpp: * UIProcess/qt/QtWebPageSGNode.h: (WebKit): * UIProcess/qt/QtWebPageUIClient.cpp: * UIProcess/qt/QtWebPageUIClient.h: (WebKit): * UIProcess/qt/QtWebUndoController.cpp: (WebKit): * UIProcess/qt/QtWebUndoController.h: (WebKit): * UIProcess/qt/WebContextMenuProxyQt.cpp: * UIProcess/qt/WebContextQt.cpp: * UIProcess/qt/WebFullScreenManagerProxyQt.cpp: * UIProcess/qt/WebGeolocationProviderQt.cpp: (WebKit): * UIProcess/qt/WebGeolocationProviderQt.h: (WebKit): * UIProcess/qt/WebPopupMenuProxyQt.cpp: (WebKit): * UIProcess/qt/WebPopupMenuProxyQt.h: 2012-04-23 Kent Tamura Add test function to get placeholder string https://bugs.webkit.org/show_bug.cgi?id=84536 Reviewed by Ryosuke Niwa. * win/WebKit2.def: Expose HTMLNames::inputTag, HTMLTextFormControlElement::placeholderShouldBeVisible(), and Node::textContent. * win/WebKit2CFLite.def: ditto. 2012-04-22 Sriram Neelakandan [Gtk] Added MOZ_X11 build flag for TARGET_X11 [Qt] Added MOZ_X11 build flag for !embedded https://bugs.webkit.org/show_bug.cgi?id=40785 Reviewed by Anders Carlsson. * GNUmakefile.am: * Target.pri: 2012-04-22 Jon Lee Remove notifications support on Mac Lion. https://bugs.webkit.org/show_bug.cgi?id=84554 Reviewed by Sam Weinig. * Configurations/FeatureDefines.xcconfig: 2012-04-22 Allan Sandfeld Jensen [Qt] Multi-level tap-to-zoom. https://bugs.webkit.org/show_bug.cgi?id=84456 Reviewed by Kenneth Rohde Christiansen. Replace tap-to-zoomed flag with a stack of progressively higher zoom levels, and zoom out to last zoom-level when attempting to zoom to current level. Additionally detect a series of tap-to-zoom gestures on the same level and continue to zoom out. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-04-20 Jon Lee Add Notification constructor https://bugs.webkit.org/show_bug.cgi?id=80477 Reviewed by Jian Li. * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::show): If the notification doesn't get shown, we should return false, since it will not go through a setPendingActivity cycle. (WebKit::WebNotificationManager::clearNotifications): When clearing notifications, finalize them so that they can be cleaned up by the GC. 2012-04-20 Timothy Hatcher Make the Web Inspector be the first responder when opening docked. Reviewed by Brian Weinstein. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformAttach): Call makeFirstResponder: on the window and pass the Inspector's WKView. 2012-04-06 Jer Noble apple.com top navigation bar appears inside video during full screen exit animation https://bugs.webkit.org/show_bug.cgi?id=83095 Reviewed by Eric Carlson. Add new WebCore symbols needed by DumpRenderTree to exported symbol list. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-04-19 Carlos Garcia Campos [GTK] Ignore resources while replacing content in WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=79777 Reviewed by Philippe Normand. * UIProcess/API/gtk/WebKitResourceLoadClient.cpp: (didSendRequestForResource): Return early if resources is Null. (didReceiveResponseForResource): Ditto. (didReceiveContentLengthForResource): Ditto. (didFinishLoadForResource): Ditto. (didFailLoadForResource): Ditto. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewLoadChanged): Clear resources before checking whether we are replacing content. (webkitWebViewIsReplacingContentOrDidReplaceContent): Helper function to check whether view is replacing content or current content is replaced. (webkitWebViewResourceLoadStarted): Do not create resources when replacing content. (webkitWebViewGetLoadingWebResource): Ignore when replacing content. Also add an assert when getting a loading resources to make sure we only return Null when replacing content. (webkitWebViewRemoveLoadingWebResource): Ditto. (webkitWebViewResourceLoadFinished): Ditto. * UIProcess/API/gtk/tests/TestResources.cpp: (replacedContentResourceLoadStartedCallback): (testWebViewResourcesReplacedContent): (beforeAll): 2012-04-19 Viatcheslav Ostapenko [Qt] ASSERT(m_thread == currentThread()) on Mac when threaded rendering is enabled for the Qt scenegraph https://bugs.webkit.org/show_bug.cgi?id=84278 Reviewed by Noam Rosenthal. Delete the whole layer tree on UI side when paint node is deleted and force resync of the layers when page becomes visible again. * UIProcess/LayerTreeHostProxy.cpp: (WebKit::LayerTreeHostProxy::purgeBackingStores): * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::WebLayerTreeRenderer): (WebKit::WebLayerTreeRenderer::purgeGLResources): (WebKit::WebLayerTreeRenderer::appendUpdate): (WebKit::WebLayerTreeRenderer::setActive): (WebKit): * UIProcess/WebLayerTreeRenderer.h: (WebLayerTreeRenderer): * UIProcess/qt/QtWebPageSGNode.cpp: (WebKit::ContentsSGNode::ContentsSGNode): * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::purgeBackingStores): 2012-04-19 Vivek Galatage DevTools: assertion failure upon devtools window reopen. https://bugs.webkit.org/show_bug.cgi?id=53493 Reviewed by Pavel Feldman. The pointers pointed to by WebInspector must be reset explicitly in WebInspector::didClose() method * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::closeInspectorFrontend): * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::didClose): 2012-04-19 Zalan Bujtas [Qt][WK2] Zoom out on the second double click does not always scale right. https://bugs.webkit.org/show_bug.cgi?id=84332 Reviewed by Simon Hausmann. Zoom out to the minimum scale value instead of the fixed 1. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): 2012-04-18 Jer Noble Full Screen mode does not preserve CALayer ordering after exiting. https://bugs.webkit.org/show_bug.cgi?id=83931 Reviewed by Eric Carlson. When swapping the placeholder and web views, use -[NSView addSubview:positioned:relativeTo:] instead of -[NSView replaceSubview:with:], as the latter does not preserve the relative order of the view's backing CALayers. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController _swapView:with:]): 2012-04-18 Alexey Proskuryakov [WK2] Sandbox violations prevent attaching files to gmail messages https://bugs.webkit.org/show_bug.cgi?id=84263 Reviewed by Oliver Hunt. * WebProcess/WebCoreSupport/WebDragClient.cpp: (WebKit::WebDragClient::willPerformDragDestinationAction): Prepare to the possibility that file data will be read. This needs to happen on every drop with files, not just after event dispatch. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mayPerformUploadDragDestinationAction): * WebProcess/WebPage/WebPage.h: Renamed performUploadDragDestinationAction to mayPerformUploadDragDestinationAction. We don't know if an upload will actually happen, it's up to JavaScript code to decide. 2012-04-18 Allan Sandfeld Jensen Clean-up WheelEvent Conversion. https://bugs.webkit.org/show_bug.cgi?id=84243 Reviewed by Simon Hausmann. * Shared/qt/WebEventFactoryQt.cpp: (WebKit::WebEventFactory::createWebWheelEvent): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::wheelEvent): 2012-04-18 Zalan Bujtas [Qt][WK2] Minibrowser asserts on startup at QtViewportInteractionEngine::ensureContentWithinViewportBoundary() https://bugs.webkit.org/show_bug.cgi?id=84172 Reviewed by Simon Hausmann. After the viewport computing refactor, ensureContentWithinViewportBoundary() can be called with resumed page. QtViewportInteractionEngine::ensureContentWithinViewportBoundary() functionality does not necessarily require the page to be suspended. It's the caller's context that determines whether the page needs to be suspended, so it's the caller's responsibility to enforce the ASSERT(). Remove the invalid ASSERT on m_suspendCount at QtViewportInteractionEngine::ensureContentWithinViewportBoundary() * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): 2012-04-17 Alexey Proskuryakov [Mac] USPS Shipping label prints without barcode https://bugs.webkit.org/show_bug.cgi?id=84099 Reviewed by Sam Weinig. Use PDFDocuemnt instead of CGPDFDocument when printing PDFs, because PDFKit knows how to draw PDF buttons, and CG does not. * Shared/mac/PDFKitImports.h: Added. * Shared/mac/PDFKitImports.mm: Added. * UIProcess/API/mac/WKPrintingView.mm: Moved code for dealing with dynamically loaded PDFKit from WKPrintingView, as we now also need it elsewhere. * WebKit2.xcodeproj/project.pbxproj: Added * WebProcess/Plugins/PDF/BuiltInPDFView.cpp: Rebamed to .mm. * WebProcess/Plugins/PDF/BuiltInPDFView.h: Changed m_pdfDocument to PDFDocument. * WebProcess/Plugins/PDF/BuiltInPDFView.mm: Copied from Source/WebKit2/WebProcess/Plugins/PDF/BuiltInPDFView.cpp. (WebKit::BuiltInPDFView::pdfDocumentDidLoad): (WebKit::BuiltInPDFView::calculateSizes): (WebKit::BuiltInPDFView::paintContent): Changed m_pdfDocument to PDFDocument, and updated for the changes. We still use CGPDF when drawing to screen though, because that doesn't affect USPS. * WebProcess/Plugins/Plugin.h: (WebKit::Plugin::pdfDocumentForPrinting): Updated the type, and changed ifsed from CG to MAC, as we're now fully dependent on Cocoa. * WebProcess/Plugins/PluginView.h: (WebKit::PluginView::pdfDocumentForPrinting): Ditto. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::pdfDocumentForPrintingFrame): (WebKit::WebPage::beginPrinting): (WebKit::WebPage::computePagesForPrinting): (WebKit::WebPage::drawRectToPDF): (WebKit::WebPage::drawPagesToPDF): * WebProcess/WebPage/WebPage.h: Moved PDF document printing code to WebPageMac.mm, as it's now Objective C. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::computePagesForPrintingPDFDocument): (WebKit::roundCGFloat): (WebKit::drawPDFPage): While moving, also fixed a logic error in calculating the box (it used to intersect with an empty box). (WebKit::WebPage::drawRectToPDFFromPDFDocument): (WebKit::WebPage::drawPagesToPDFFromPDFDocument): 2012-04-17 Anders Carlsson Need a client callback for when the user tires to interact with an already unresponsive page https://bugs.webkit.org/show_bug.cgi?id=84201 Reviewed by Andreas Kling. Add a interactionOccurredWhileProcessUnresponsive callback that's called when the unresponsiveness timer fires while it's already unresponsive. * UIProcess/API/C/WKPage.h: * UIProcess/ResponsivenessTimer.cpp: (WebKit): (WebKit::ResponsivenessTimer::timerFired): (WebKit::ResponsivenessTimer::start): * UIProcess/ResponsivenessTimer.h: (Client): * UIProcess/WebLoaderClient.cpp: (WebKit::WebLoaderClient::processDidBecomeUnresponsive): (WebKit): (WebKit::WebLoaderClient::interactionOccurredWhileProcessUnresponsive): * UIProcess/WebLoaderClient.h: (WebLoaderClient): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::interactionOccurredWhileProcessUnresponsive): (WebKit): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::interactionOccurredWhileUnresponsive): (WebKit): * UIProcess/WebProcessProxy.h: (WebProcessProxy): 2012-04-17 Anders Carlsson Make sure that the layer hosting mode is kept up to date if it changes before the plug-in is initialized https://bugs.webkit.org/show_bug.cgi?id=84180 Reviewed by Andreas Kling. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::setLayerHostingMode): 2012-04-17 Jer Noble Exiting full screen video brings the wrong Safari window to the foreground https://bugs.webkit.org/show_bug.cgi?id=83936 Reviewed by Adele Peterson. Tell the original webView's window to makeKeyAndOrderFront once the exit animation completes. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): 2012-04-17 Michał Pakuła vel Rutka [EFL][WK2] Fix build break when FULLSCREEN_API is enabled. https://bugs.webkit.org/show_bug.cgi?id=84142 Reviewed by Martin Robinson. Create a cpp file needed to build EFL port with FULLSCREEN_API. * PlatformEfl.cmake: Added WebFullScreenManagerProxyEfl.cpp to build list. * UIProcess/WebFullScreenManagerProxy.h: (WebKit): * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp: Added. (WebKit): (WebKit::WebFullScreenManagerProxy::invalidate): (WebKit::WebFullScreenManagerProxy::close): (WebKit::WebFullScreenManagerProxy::isFullScreen): (WebKit::WebFullScreenManagerProxy::enterFullScreen): (WebKit::WebFullScreenManagerProxy::exitFullScreen): (WebKit::WebFullScreenManagerProxy::beganEnterFullScreen): (WebKit::WebFullScreenManagerProxy::beganExitFullScreen): 2012-04-17 Andras Becsi [Qt][WK2] Refactor the gesture recognizers https://bugs.webkit.org/show_bug.cgi?id=83044 Reviewed by Kenneth Rohde Christiansen and Simon Hausmann. This patch implements a simple decision tree in the web page event handler on the basis of how many active touch points the current touch event has. Active touch points are pressed, moved or stationary and the number of these fully determine which gesture recognizer should be updated, cancelled or finished. This new structure makes the internal states of the pinch and pan gesture recognizers independent from the event type, thus makes it possible to handle the transitions between these gestures in one centralized place which reduces code duplication and complexity and fixes some issues regarding incorrectly handled transitions. * UIProcess/qt/QtPanGestureRecognizer.cpp: (WebKit::QtPanGestureRecognizer::update): (WebKit::QtPanGestureRecognizer::finish): (WebKit): (WebKit::QtPanGestureRecognizer::cancel): * UIProcess/qt/QtPanGestureRecognizer.h: (QtPanGestureRecognizer): * UIProcess/qt/QtPinchGestureRecognizer.cpp: (WebKit): (WebKit::QtPinchGestureRecognizer::update): (WebKit::QtPinchGestureRecognizer::finish): * UIProcess/qt/QtPinchGestureRecognizer.h: (QtPinchGestureRecognizer): * UIProcess/qt/QtTapGestureRecognizer.cpp: (WebKit::QtTapGestureRecognizer::withinDistance): (WebKit::QtTapGestureRecognizer::update): (WebKit::QtTapGestureRecognizer::cancel): (WebKit): (WebKit::QtTapGestureRecognizer::singleTapTimeout): (WebKit::QtTapGestureRecognizer::tapAndHoldTimeout): (WebKit::QtTapGestureRecognizer::reset): * UIProcess/qt/QtTapGestureRecognizer.h: (QtTapGestureRecognizer): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::resetGestureRecognizers): (QtWebPageEventHandler::doneWithTouchEvent): 2012-04-17 Allan Sandfeld Jensen REGRESSION(r113172) Wheel events are scrolling inversed. https://bugs.webkit.org/show_bug.cgi?id=84156 Reviewed by Simon Hausmann. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::wheelEvent): 2012-04-17 Balazs Kelemen [Qt] Unreviewed ARM build fix * PluginProcess/qt/PluginProcessMainQt.cpp: (WebKit::PluginProcessMain): Export this function. 2012-04-17 Allan Sandfeld Jensen [Qt] Zoom out on second double-tap. https://bugs.webkit.org/show_bug.cgi?id=84145 Reviewed by Simon Hausmann. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-04-17 Mariusz Grzegorczyk [EFL][WK2] Fix build break when CONTEXT_MENUS is disabled. https://bugs.webkit.org/show_bug.cgi?id=83285 Reviewed by Ryosuke Niwa. Surround code related to context menu with ENABLE(CONTEXT_MENUS) macro. Add dummy functions for public API implementation related to context menu. * Shared/API/c/WKContextMenuItem.cpp: (WKContextMenuItemGetTypeID): (WKContextMenuItemCreateAsAction): (WKContextMenuItemCreateAsCheckableAction): (WKContextMenuItemCreateAsSubmenu): (WKContextMenuItemSeparatorItem): (WKContextMenuItemGetTag): (WKContextMenuItemGetType): (WKContextMenuItemCopyTitle): (WKContextMenuItemGetEnabled): (WKContextMenuItemGetChecked): (WKContextMenuCopySubmenuItems): (WKContextMenuItemGetUserData): (WKContextMenuItemSetUserData): * Shared/WebContextMenuItem.cpp: * Shared/WebContextMenuItem.h: * Shared/WebContextMenuItemData.cpp: * Shared/WebContextMenuItemData.h: * UIProcess/API/C/WKPage.cpp: (WKPageSetPageContextMenuClient): * UIProcess/WebPageContextMenuClient.cpp: * UIProcess/WebPageContextMenuClient.h: * UIProcess/WebPageProxy.cpp: (WebKit): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetContextMenuClient): * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.cpp: * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h: * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: * WebProcess/WebCoreSupport/WebContextMenuClient.h: * WebProcess/WebCoreSupport/efl/WebContextMenuClientEfl.cpp: * WebProcess/WebPage/WebContextMenu.cpp: * WebProcess/WebPage/WebContextMenu.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit): (WebKit::handleMouseEvent): (WebKit::WebPage::mouseEvent): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: 2012-04-16 Ryuan Choi [EFL][WK2] Add missing files to build webkit2/Efl. https://bugs.webkit.org/show_bug.cgi?id=76139 Reviewed by Ryosuke Niwa. Add missing files needed to build webkit2/Efl. * Shared/efl/PlatformCertificateInfo.h: Added. (WebKit): (PlatformCertificateInfo): (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): (WebKit::PlatformCertificateInfo::encode): (WebKit::PlatformCertificateInfo::decode): * UIProcess/Launcher/efl/ThreadLauncherEfl.cpp: Added. (WebKit): (WebKit::ThreadLauncher::createWebThread): 2012-04-16 Brady Eidson Followup to http://trac.webkit.org/changeset/114323 For more correctness, actually include an autorelease pool instead of cleverly trying to avoid its use. Reviewed by Mark Rowe. * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): 2012-04-16 Brady Eidson Leak in Plugin Process when launched 32-bit Reviewed by Jessie Berlin. * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): alloc/init an NSDictionary then release it, instead of leaking an autoreleased one. 2012-04-16 Anders Carlsson Nightly Back/Forward no longer calls plug-in's NPP_NewStream https://bugs.webkit.org/show_bug.cgi?id=83805 Reviewed by Simon Fraser. When a page with a full-frame plug-in is restored from the page cache, it needs to re-fetch the plug-in stream. Fix this by breaking the assumption that a plug-in will always get its data from WebCore if it's a full-frame plug-in; instead it only get its data from WebCore if it's a full-frame plug-in that's not being restored from the page cache. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): Rename m_loadManually to m_shouldUseManualLoader. (WebKit::NetscapePlugin::initialize): Get the mode from parameters.isFullFramePlugin instead. (WebKit::NetscapePlugin::manualStreamDidReceiveResponse): (WebKit::NetscapePlugin::manualStreamDidReceiveData): (WebKit::NetscapePlugin::manualStreamDidFinishLoading): (WebKit::NetscapePlugin::manualStreamDidFail): Rename m_loadManually to m_shouldUseManualLoader. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Rename m_loadManually to m_shouldUseManualLoader. * WebProcess/Plugins/Plugin.cpp: (WebKit::Plugin::Parameters::encode): (WebKit::Plugin::Parameters::decode): * WebProcess/Plugins/Plugin.h: (Parameters): Add an extra isFullFramePlugin parameter, and rename loadManually to shouldUseManualLoader. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::WebFrameLoaderClient): Initialize m_frameCameFromPageCache. (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): Set m_frameCameFromPageCache to true. (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Set m_frameCameFromPageCache to false. (WebKit::WebFrameLoaderClient::createPlugin): Initialize isFullFramePlugin and shouldUseManualLoader. 2012-04-16 Alexey Proskuryakov EndPrinting message should be sent synchronously when printing was initiated from DOM. https://bugs.webkit.org/show_bug.cgi?id=84049 Reviewed by Oliver Hunt. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::printFrame): When printing is initiated by WebProcess, all messages from UI process are sent synchronously to avoid being queued, and so should EndPrinting. 2012-04-16 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=84050 WebKit2 back/forward items in the page cache are never removed when the page is closed Reviewed by Jessie Berlin and unofficially reviewed by Jon Lee. Individual WebBackForwardListProxy's had no idea which items are associated with them. This adds that association and makes sure the proxy removes all associated items from the PageCache when it closes. * WebProcess/WebPage/WebBackForwardListProxy.cpp: (WebKit::WebBackForwardListProxy::removeItem): Remove the item from the PageCache in case it was in it. (WebKit::WebBackForwardListProxy::addItem): Add the item ID to this back/forward list's set of associated IDs. (WebKit::WebBackForwardListProxy::close): Remove each associated item from the PageCache. * WebProcess/WebPage/WebBackForwardListProxy.h: 2012-04-16 Michał Pakuła vel Rutka [EFL][WK2] Fix build break in PageClientImpl.cpp. https://bugs.webkit.org/show_bug.cgi?=id=84034 Reviewed by Kenneth Rohde Christiansen. Fixes typo in didChangeViewportProperites definition. * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::didChangeViewportProperties): 2012-04-16 Yael Aharon [Qt][WK2] Fixed elements position is wrong after zooming. https://bugs.webkit.org/show_bug.cgi?id=83981 Reviewed by Kenneth Rohde Christiansen. Turn on the flag setFixedElementsLayoutRelativeToFrame. This causes fixed elements position to be calculated based on visibleWidth and visibleHeight. When zoom level grows, the visibleWidth and visibleHeight become smaller. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setResizesToContentsUsingLayoutSize): 2012-04-16 Kenneth Rohde Christiansen [Qt] Clean up how the interaction engine is making use of ViewportAttributes https://bugs.webkit.org/show_bug.cgi?id=83895 Reviewed by Simon Hausmann. Refactor how the interaction engine is using the ViewportAttributes and get rid of the Contraints subclass. Push the ViewportAttributes through to the QQuickWebViewPrivate class and add some default values in the case the Legacy view is used. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewLegacyPrivate::QQuickWebViewLegacyPrivate): (QQuickWebViewFlickablePrivate::didChangeViewportProperties): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/qwebviewportinfo.cpp: (QWebViewportInfo::QWebViewportInfo): (QWebViewportInfo::~QWebViewportInfo): (QWebViewportInfo::currentScale): (QWebViewportInfo::devicePixelRatio): (QWebViewportInfo::initialScale): (QWebViewportInfo::minimumScale): (QWebViewportInfo::maximumScale): (QWebViewportInfo::isScalable): (QWebViewportInfo::layoutSize): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::cssScaleFromItem): (WebKit::QtViewportInteractionEngine::itemScaleFromCSS): (WebKit::QtViewportInteractionEngine::itemCoordFromCSS): (WebKit::QtViewportInteractionEngine::innerBoundedCSSScale): (WebKit::QtViewportInteractionEngine::outerBoundedCSSScale): (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): (WebKit::QtViewportInteractionEngine::setCSSScaleBounds): (WebKit::QtViewportInteractionEngine::setCSSScale): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate): (WebKit::QtViewportInteractionEngine::pinchGestureEnded): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::hadUserInteraction): (WebKit::QtViewportInteractionEngine::setAllowsUserScaling): (WebKit::QtViewportInteractionEngine::setContentToDevicePixelRatio): 2012-04-15 Carlos Garcia Campos [GTK] Use GRefPtr to delete the default web context in WebKit2 GTK+ https://bugs.webkit.org/show_bug.cgi?id=83752 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitWebContext.cpp: (createDefaultWebContext): 2012-04-13 Jer Noble Video at apple.com gets standard controls in addition to custom controls after returning from full screen https://bugs.webkit.org/show_bug.cgi?id=83939 Reviewed by Eric Carlson. So that the media controls don't show up momentarily during full screen animations, call setAnimatingFullScreen(true) before calling will{Enter,Exit}FullScreen(), so that the CSS rule for full screen animation will be in effect immediately. Similarly, call setAnimatingFullScreen(false) after calling did{Enter,Exit}FullScreen, so that the full screen media controls don't momentarily appear at the end of an animation. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController exitFullScreen]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): 2012-04-13 Anders Carlsson Make sure that we're using the right compiler for generating derived sources. Rubber-stamped by Dan Bernstein. * WebKit2.xcodeproj/project.pbxproj: 2012-04-13 Anders Carlsson Include the error if we fail to initialize the web process sandbox https://bugs.webkit.org/show_bug.cgi?id=83927 Reviewed by Alexey Proskuryakov. * WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): 2012-04-13 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=83600 Need WebKit2 API to notify whether history loads are in the page cache - Add a new WKBundlePageLoaderClient callback allowing the bundle to be notified of back/forward navigations (and deny them if it chooses) - Add a new API to WKBundleBackForwardListItem to probe if the item is in the page cache. Reviewed by Darin Adler. Add the new WKBundleBackForwardListItem API: * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp: (WKBundleBackForwardListItemIsInPageCache): * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h: * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h: (WebKit::InjectedBundleBackForwardListItem::isInPageCache): Update the UI page loader client to allow for a user data object to be passed from the bundle: * UIProcess/API/C/WKPage.h: * UIProcess/WebLoaderClient.cpp: (WebKit::WebLoaderClient::shouldGoToBackForwardListItem): Update a comment typo. (WebKit::WebLoaderClient::willGoToBackForwardListItem): Update for the user data field. * UIProcess/WebLoaderClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::willGoToBackForwardListItem): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: Add the new callback to the bundle loader client: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::shouldGoToBackForwardListItem): * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: (InjectedBundlePageLoaderClient): Call the bundle client before doing anything else, possibly canceling the navigation: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::shouldGoToHistoryItem): * WebProcess/qt/QtBuiltinBundlePage.cpp: (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage) Adopt new bundle client interface. 2012-04-13 Dinu Jacob [Qt][WK2] Title in MiniBrowser is not updated for a page with no title https://bugs.webkit.org/show_bug.cgi?id=82483 Reviewed by Noam Rosenthal. This fixes API tests broken by r113715. * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_titleChanged.qml: 2012-04-13 Sheriff Bot Unreviewed, rolling out r113714. http://trac.webkit.org/changeset/113714 https://bugs.webkit.org/show_bug.cgi?id=83887 It is behaving strange on the bots and needs more investigation. (Requested by jeez_ on #webkit). * UIProcess/qt/QtPageClient.cpp: (QtPageClient::isViewWindowActive): 2012-04-12 Jocelyn Turcotte [Qt] Use QQuickFlickable::setPixelAligned instead of doing pixel-alignment when rendering. https://bugs.webkit.org/show_bug.cgi?id=83770 Reviewed by Kenneth Rohde Christiansen. - Do the alignment on the highest level as possible: the QQuickFlickable content item position. It already supports this with setPixelAligned which rounds the content item's position. - Also move the setClip(true) to the common constructor as this constructor is currently only used by WTR. - Remove setFlags(QQuickItem::ItemClipsChildrenToShape) as it is redundant with setClip(true). * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebView::QQuickWebView): 2012-04-12 Alexey Proskuryakov Preprocessing text files with modern clang treats double slashes in comments https://bugs.webkit.org/show_bug.cgi?id=83827 Reviewed by Mark Rowe. * DerivedSources.make: Pass appropriate flags to both llvm and gcc. 2012-04-12 Brent Fulgham [WinCairo] Build fix after Windows export definition file change. * win/WebKit2CFLite.def: This file needs to be kept in sync with WebKit2.def (aside from the WebKitInterface exports.) 2012-04-12 Bear Travis [CSS Exclusions] Add flag to enable / disable exclusions at runtime https://bugs.webkit.org/show_bug.cgi?id=83313 Reviewed by Ryosuke Niwa. Adding windows symbols * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-04-12 Yael Aharon [Qt][WK2] Nested fixed elements scroll too fast https://bugs.webkit.org/show_bug.cgi?id=83720 Reviewed by Noam Rosenthal. Set the fixedToViewport flag on the fixed position layers and adjust to the new function name for setting scrollPositionDelta. * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::adjustPositionForFixedLayers): (WebKit::WebLayerTreeRenderer::setLayerState): 2012-04-12 Kenneth Rohde Christiansen Move viewport meta handling to the web process side https://bugs.webkit.org/show_bug.cgi?id=83771 Reviewed by Simon Hausmann. Instead of computing the viewport attributes on both sides, we now do everything on the web process side, and just send over the computed result. * Scripts/webkit2/messages.py: (struct_or_class): (headers_for_type): * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/WebCoreArgumentCoders.h: (WebCore): * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::didChangeViewportProperties): * UIProcess/API/efl/PageClientImpl.h: (PageClientImpl): * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::didChangeViewportProperties): * UIProcess/API/gtk/PageClientImpl.h: (PageClientImpl): * UIProcess/API/mac/PageClientImpl.h: (PageClientImpl): * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::didChangeViewportProperties): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::didRelaunchProcess): (QQuickWebViewFlickablePrivate::didChangeViewportProperties): (QQuickWebViewFlickablePrivate::updateViewportSize): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate::didChangeViewportProperties): (QQuickWebViewPrivate): (QQuickWebViewFlickablePrivate): * UIProcess/PageClient.h: (WebCore): (PageClient): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didChangeViewportProperties): * UIProcess/WebPageProxy.h: (WebCore): (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::didChangeViewportProperties): * UIProcess/qt/QtPageClient.h: (QtPageClient): * UIProcess/win/WebView.cpp: (WebKit::WebView::didChangeViewportProperties): * UIProcess/win/WebView.h: (WebView): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange): (WebKit): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::sendViewportAttributesChanged): (WebKit): (WebKit::WebPage::setViewportSize): * WebProcess/WebPage/WebPage.h: (WebPage): 2012-04-12 Zalan Bujtas [Qt][WK2] Zoom gesture with double tap crashes on iframe when main frame has scroll offset. https://bugs.webkit.org/show_bug.cgi?id=83428 Reviewed by Kenneth Rohde Christiansen. When delegate scrolling is on, the frame view needs to ignore scrolling offset when converting coordinates. It is already done at ScrollView base class and this patch copies the logic to the FrameView subclass. Also make sure that TouchAdjustment's findBest*() functions' return value are not ignored by the caller. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::highlightPotentialActivation): (WebKit::WebPage::findZoomableAreaForPoint): 2012-04-11 Andy Estes Remove an autorelease pool made redundant by r113923. https://bugs.webkit.org/show_bug.cgi?id=83730 Reviewed by Dan Bernstein. Remove flushLayer()'s autorelease pool, since one now exists in the call frame above it (in LayerFlushScheduler::runLoopObserverCallback()). * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm: (WebKit::LayerTreeHostCAMac::flushLayers): 2012-04-11 Carlos Garcia Campos [GTK] Initial cookies API for WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=82441 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitCookieManager.cpp: Added. (webkit_cookie_manager_init): (webkitCookieManagerFinalize): (webkit_cookie_manager_class_init): (webkitCookieManagerCreate): Create a new WebKitCookieManager for the given WKCookieManagerRef. (webkit_cookie_manager_set_accept_policy): Set the cookie acceptance policy. (webkitCookieManagerGetAcceptPolicyCallback): Callback called by the C API when the cookie acceptance policy has been received. (webkit_cookie_manager_get_accept_policy): Asynchronously get the cookie acceptance policy. (webkit_cookie_manager_get_accept_policy_finish): Finish async operation started by webkit_cookie_manager_get_accept_policy() returning the cookie acceptance policy. (webkitCookieManagerGetDomainsWithCookiesCallback): Callback called by the C API when the list of hostnames with cookies has been received. (webkit_cookie_manager_get_domains_with_cookies): Asynchronously get the list of domains with cookies. (webkit_cookie_manager_get_domains_with_cookies_finish): Finish async operation started by webkit_cookie_manager_get_domains_with_cookies() returning the list of domains. (webkit_cookie_manager_delete_cookies_for_domain): Delete all cookies for the given domain. (webkit_cookie_manager_delete_all_cookies): Delete all cookies. * UIProcess/API/gtk/WebKitCookieManager.h: Added. * UIProcess/API/gtk/WebKitCookieManagerPrivate.h: Added. * UIProcess/API/gtk/WebKitWebContext.cpp: (webkit_web_context_get_cookie_manager): Get the WebKitCookieManager associated with the web context. * UIProcess/API/gtk/WebKitWebContext.h: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new chapter for WebKitCookieManager. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_cookie_manager_get_type. * UIProcess/API/gtk/tests/GNUmakefile.am: * UIProcess/API/gtk/tests/TestCookieManager.cpp: Added. (testCookieManagerAcceptPolicy): (testCookieManagerDeleteCookies): (serverCallback): (beforeAll): (afterAll): * UIProcess/API/gtk/webkit2.h: Include WebKitCookieManager.h. 2012-04-10 Jocelyn Turcotte [Qt] InspectorServer: Add an API level auto test https://bugs.webkit.org/show_bug.cgi?id=83594 Reviewed by Kenneth Rohde Christiansen. This tests InspectorServer and WebSocketServer. * UIProcess/API/qt/tests/inspectorserver/inspectorserver.pro: Added. * UIProcess/API/qt/tests/inspectorserver/tst_inspectorserver.cpp: Added. (tst_InspectorServer): (tst_InspectorServer::tst_InspectorServer): (tst_InspectorServer::prepareWebViewComponent): (tst_InspectorServer::newWebView): (tst_InspectorServer::init): (tst_InspectorServer::cleanup): (tst_InspectorServer::webView): (tst_InspectorServer::fetchPageList): (tst_InspectorServer::testPageList): This tests that pages with developerExtrasEnabled appear available for inspection. (tst_InspectorServer::testRemoteDebuggingMessage): This tests a web socket connection using a raw inspector command. (tst_InspectorServer::openRemoteDebuggingSession): This tests the whole pipeline by starting a remote inspection session. * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView): (tst_QQuickWebView::prepareWebViewComponent): * UIProcess/API/qt/tests/tests.pri: * UIProcess/API/qt/tests/util.cpp: (LoadStartedCatcher::LoadStartedCatcher): (LoadStartedCatcher::onLoadingChanged): * UIProcess/API/qt/tests/util.h: (LoadStartedCatcher): 2012-04-10 Jocelyn Turcotte [Qt] InspectorServer: Improve the JSON page list's parameter names https://bugs.webkit.org/show_bug.cgi?id=83592 Reviewed by Simon Hausmann. - Add "id" that would be needed to build the URL when using local front-end resources (and will be used by tests) - Rename description to "title", the description contains both the title and URL on the final list - Rename inspectorLocation to "inspectorUrl" to match with the url parameter. * UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp: (WebKit::WebInspectorServer::buildPageList): * qt/Resources/inspectorPageIndex.html: 2012-04-10 Jocelyn Turcotte [Qt] Fix issues when using the WebView as ShaderEffectSource https://bugs.webkit.org/show_bug.cgi?id=83587 Reviewed by Noam Rosenthal. Qt is going to mirror the projection matrix when the shader effect source is grabbed. Detect that the matrix is mirrored and pass on this information to TextureMapper so that it can do the same. * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext): * UIProcess/WebLayerTreeRenderer.h: (WebLayerTreeRenderer): * UIProcess/qt/QtWebPageSGNode.cpp: (WebKit::ContentsSGNode::render): 2012-04-10 Jocelyn Turcotte [Qt] Remove unnecessary rendering code https://bugs.webkit.org/show_bug.cgi?id=83591 Reviewed by Noam Rosenthal. - Remove code that isn't needed since the introduction of WebLayerTreeRenderer - Remove TextureMapper::bindSurface(0) calls following beginPainting, which calls it itself. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPagePrivate::paint): * UIProcess/API/qt/qquickwebpage_p_p.h: (QQuickWebPagePrivate): * UIProcess/DrawingAreaProxy.h: * UIProcess/DrawingAreaProxyImpl.cpp: * UIProcess/DrawingAreaProxyImpl.h: (DrawingAreaProxyImpl): * UIProcess/LayerTreeHostProxy.cpp: * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext): (WebKit::WebLayerTreeRenderer::paintToGraphicsContext): 2012-04-10 Carlos Garcia Campos Unreviewed. Fix make distcheck issues. * GNUmakefile.am: Add missing header file. 2012-04-10 Mark Rowe WebKit2 should log to both ASL and stderr Replace direct calls to fprintf stderr with calls to WTFLogAlways. Reviewed by Sam Weinig. * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::checkURLReceivedFromWebProcess): (WebKit::WebProcessProxy::didReceiveInvalidMessage): * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: (WebKit::InjectedBundle::load): * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: (readSandboxProfile): (WKN_EnterSandbox): * WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): 2012-04-10 Yael Aharon Unreviewed build fix after r113791. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::WebGraphicsLayer): 2012-04-10 Yael Aharon Initial support for fixed position elements in Qt WebKit2 https://bugs.webkit.org/show_bug.cgi?id=81786 Reviewed by Noam Rosenthal. Turn on the flag acceleratedCompositingForFixedPositionEnabled when using fixed layout. As we scroll, we keep track of the delta in scroll position between the UI and web processes, and adjust the position of all the fixed layers by that delta. When WebLayerTreeRenderer receives a new scroll position from the web process, it keeps it as pending, and commit the new scroll position in flushLayerChanges. This patch does not address scrolling overshoot and it does not fix the wrong positioning that occurs when we zoom. These issues will be addressed in future patches. * Shared/WebLayerTreeInfo.h: * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPagePrivate::updateSize): * UIProcess/LayerTreeHostProxy.cpp: (WebKit::LayerTreeHostProxy::setContentsSize): (WebKit): (WebKit::LayerTreeHostProxy::renderNextFrame): (WebKit::LayerTreeHostProxy::didChangeScrollPosition): * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): * UIProcess/LayerTreeHostProxy.messages.in: * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::boundedScrollPosition): (WebKit): (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext): (WebKit::WebLayerTreeRenderer::setContentsSize): (WebKit::WebLayerTreeRenderer::adjustPositionForFixedLayers): (WebKit::WebLayerTreeRenderer::didChangeScrollPosition): (WebKit::WebLayerTreeRenderer::syncLayerParameters): (WebKit::WebLayerTreeRenderer::deleteLayer): (WebKit::WebLayerTreeRenderer::flushLayerChanges): * UIProcess/WebLayerTreeRenderer.h: (WebLayerTreeRenderer): * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::WebGraphicsLayer): (WebCore::WebGraphicsLayer::syncCompositingState): (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebGraphicsLayerClient): (WebCore::WebGraphicsLayer::fixedToViewport): (WebCore::WebGraphicsLayer::setFixedToViewport): (WebGraphicsLayer): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setResizesToContentsUsingLayoutSize): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::LayerTreeHostQt): (WebKit::LayerTreeHostQt::didSyncCompositingStateForLayer): (WebKit::updateOffsetFromViewportForSelf): (WebKit): (WebKit::updateOffsetFromViewportForLayer): (WebKit::LayerTreeHostQt::syncFixedLayers): (WebKit::LayerTreeHostQt::setVisibleContentsRect): * WebProcess/WebPage/qt/LayerTreeHostQt.h: (LayerTreeHostQt): 2012-04-10 Anders Carlsson Fix fast/images/exif-orientation.html WebKitTestRunner failure https://bugs.webkit.org/show_bug.cgi?id=83627 Reviewed by Sam Weinig. Handle overriding the WebKitShouldRespectImageOrientation preference. * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): 2012-04-10 No'am Rosenthal [Qt][WK2] Manage graphics buffers in the web process https://bugs.webkit.org/show_bug.cgi?id=78675 Added ShareableSurface, a class allowing the use of GPU-enabled surfaces for bitmap transfer between the web and UI processes. Since GraphicsSurfaces may not always be available, ShareableSurface uses a standard ShareableBitmap as a fallback backend. The necessary plumbing was added in WebKit2 for passing updates via ShareableSurfaces instead of ShareableBitmaps. SurfaceUpdateInfo was added, as to not make UpdateInfo more complicated. Reviewed by Kenneth Rohde Christiansen. * Shared/ShareableSurface.cpp: Added. * Shared/ShareableSurface.h: Added. * Shared/SurfaceUpdateInfo.cpp: Added. * Shared/SurfaceUpdateInfo.h: Added. * Target.pri: * UIProcess/LayerTreeHostProxy.cpp: (WebKit::LayerTreeHostProxy::createTileForLayer): (WebKit::LayerTreeHostProxy::updateTileForLayer): * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): * UIProcess/LayerTreeHostProxy.messages.in: * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::updateTile): * UIProcess/WebLayerTreeRenderer.h: (TileUpdate): (WebKit::WebLayerTreeRenderer::TileUpdate::TileUpdate): * UIProcess/qt/LayerBackingStore.cpp: (WebKit::LayerBackingStoreTile::swapBuffers): (WebKit::LayerBackingStoreTile::setBackBuffer): (WebKit::LayerBackingStore::updateTile): * UIProcess/qt/LayerBackingStore.h: (LayerBackingStoreTile): (LayerBackingStore): * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::beginContentUpdate): (WebCore::WebGraphicsLayer::createTile): (WebCore::WebGraphicsLayer::updateTile): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebGraphicsLayerClient): (WebGraphicsLayer): * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp: (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer): * WebProcess/WebPage/TiledBackingStoreRemoteTile.h: (WebKit): (TiledBackingStoreRemoteTileClient): * WebProcess/WebPage/UpdateAtlas.cpp: (WebKit::UpdateAtlas::UpdateAtlas): (WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer): * WebProcess/WebPage/UpdateAtlas.h: (WebKit::UpdateAtlas::surface): (WebKit::UpdateAtlas::size): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::createTile): (WebKit::LayerTreeHostQt::updateTile): (WebKit::LayerTreeHostQt::beginContentUpdate): * WebProcess/WebPage/qt/LayerTreeHostQt.h: (LayerTreeHostQt): 2012-04-10 Patrick Gansterer [CMake] Enable USE_FOLDERS property https://bugs.webkit.org/show_bug.cgi?id=83571 Reviewed by Daniel Bates. Setting the FOLDER property on targets gives more structure to the generated Visual Studio solutions. This does not affect other CMake generators. * CMakeLists.txt: 2012-04-10 Dinu Jacob [Qt][WK2] Assertion failure on loading new page after panning/zooming https://bugs.webkit.org/show_bug.cgi?id=83049 Reviewed by Kenneth Rohde Christiansen. When handling contents size change, set the visible content rectangle immediately, instead of animating to it. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::itemSizeChanged): 2012-04-10 Dinu Jacob [Qt][WK2] Title in MiniBrowser is not updated for a page with no title https://bugs.webkit.org/show_bug.cgi?id=82483 Reviewed by Kenneth Rohde Christiansen. titleChanged signal is not emitted on comitting a new load. * UIProcess/API/qt/tests/html/basic_page.html: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView): (tst_QQuickWebView::titleUpdate): * UIProcess/qt/QtWebPageLoadClient.cpp: (QtWebPageLoadClient::didCommitLoadForFrame): 2012-04-10 Jesus Sanchez-Palencia [Qt][WK2] Implement PageClient::isViewWindowActive() https://bugs.webkit.org/show_bug.cgi?id=81143 Reviewed by Kenneth Rohde Christiansen. This patch implements PageClient::isViewWindowActive() now that QQuickCanvas::isActive() is available (from QWindow). * UIProcess/qt/QtPageClient.cpp: (QtPageClient::isViewWindowActive): 2012-04-10 Philippe Normand and Carlos Garcia Campos [WK2][GTK] FullScreen signals https://bugs.webkit.org/show_bug.cgi?id=76166 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/C/gtk/WKFullScreenClientGtk.cpp: (WKViewSetFullScreenClientGtk): Initialize WebKitWebViewBase fullscreen client. * UIProcess/API/C/gtk/WKFullScreenClientGtk.h: * UIProcess/API/gtk/WebKitFullscreenClient.cpp: Added. (willEnterFullScreen): Call webkitWebViewEnterFullScreen(). (willExitFullScreen): Call webkitWebViewLeaveFullScreen(). (attachFullScreenClientToView): Initialize FullScreenClient adding implementations for willEnterFullScreen and willExitFullScreen callbacks. * UIProcess/API/gtk/WebKitFullscreenClient.h: Added. * UIProcess/API/gtk/WebKitPrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewConstructed): Attach fullscreen client to view. (webkit_web_view_class_init): Add WebKitWebView::enter-fullscreen and WebKitWebView::leave-fullscreen signals. (webkitWebViewEnterFullScreen): Emit WebKitWebView::enter-fullscreen signal. (webkitWebViewLeaveFullScreen): Emit WebKitWebView::leave-fullscreen signal. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseKeyPressEvent): Only return early when leaving fullscreen, otherwise let the view process the key pressed. (webkitWebViewBaseEnterFullScreen): Return early if willEnterFullScreen callback is handled and returns false. (webkitWebViewBaseExitFullScreen): Return early if willExitFullScreen callback is handled and returns false. (webkitWebViewBaseInitializeFullScreenClient): Initialize the fullscreen client. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewFullScreen): (beforeAll): * UIProcess/API/gtk/tests/WebViewTest.cpp: (WebViewTest::keyStroke): Helper function to synthesize key press/release events. * UIProcess/API/gtk/tests/WebViewTest.h: * UIProcess/API/gtk/webkit2marshal.list: * UIProcess/gtk/WebFullScreenClientGtk.cpp: (WebKit::WebFullScreenClientGtk::willEnterFullScreen): Call willEnterFullScreen callback if defined. (WebKit::WebFullScreenClientGtk::willExitFullScreen): Call willExitFullScreen callback if defined. * UIProcess/gtk/WebFullScreenClientGtk.h: 2012-04-10 Patrick Gansterer [CMake] Add missing source files to build system * CMakeLists.txt: 2012-04-09 No'am Rosenthal [WK2] Enable using a single ShareableBitmap for multiple updates https://bugs.webkit.org/show_bug.cgi?id=83424 Reviewed by Kenneth Rohde Christiansen. Enabled creating a GraphicsContext that references a rect inside ShareableBitmap. Added bitmapOffset to UpdateInfo, to allow updates to reference an offset inside the bitmap. Added UpdateAtlas, a class that manages available rects in a larger ShareableBitmap. In this iteration, UpdateAtlas has a simple behavior where a rect inside the bitmap is either available or used. When the buffers are swapped, all used buffers become available again. A future enhancement might allow triple-buffering, where available rects can be updated while other rects from the same atlas are in use. Added the necessary plumbing to allow Qt's UI-side compositing to take advantage of UpdateAtlas. LayerTreeHostQt creates an atlas per type of bitmap (i.e. one opaque and one alpha-enabled atlas). When a tile wants to update and there's no available scratch-buffer, the update would be postponed to the next frame, creating a tiling-artifact in low memory situations. * Shared/UpdateInfo.cpp: (WebKit::UpdateInfo::encode): (WebKit::UpdateInfo::decode): * Shared/UpdateInfo.h: (UpdateInfo): * Target.pri: * UIProcess/LayerTreeHostProxy.cpp: (WebKit::LayerTreeHostProxy::updateTileForLayer): * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::syncLayerParameters): (WebKit::WebLayerTreeRenderer::updateTile): (WebKit::WebLayerTreeRenderer::createImage): * UIProcess/WebLayerTreeRenderer.h: (TileUpdate): (WebKit::WebLayerTreeRenderer::TileUpdate::TileUpdate): (WebLayerTreeRenderer): * UIProcess/qt/LayerBackingStore.cpp: (WebKit::LayerBackingStoreTile::swapBuffers): (WebKit::LayerBackingStoreTile::setBackBuffer): (WebKit::LayerBackingStore::createTile): * UIProcess/qt/LayerBackingStore.h: (LayerBackingStoreTile): (LayerBackingStore): * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::tiledBackingStoreBackgroundColor): (WebCore::WebGraphicsLayer::beginContentUpdate): (WebCore): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebGraphicsLayerClient): (WebGraphicsLayer): * WebProcess/WebPage/TiledBackingStoreRemoteTile.cpp: (WebKit::TiledBackingStoreRemoteTile::updateBackBuffer): * WebProcess/WebPage/TiledBackingStoreRemoteTile.h: (TiledBackingStoreRemoteTileClient): * WebProcess/WebPage/UpdateAtlas.cpp: Added. (WebKit): (WebKit::UpdateAtlas::UpdateAtlas): (WebKit::nextPowerOfTwo): (WebKit::UpdateAtlas::buildLayoutIfNeeded): (WebKit::UpdateAtlas::findAvailableIndex): (WebKit::UpdateAtlas::didSwapBuffers): (WebKit::UpdateAtlas::acquireScratchBuffer): (WebKit::UpdateAtlas::offsetForIndex): * WebProcess/WebPage/UpdateAtlas.h: Added. (WebCore): (WebKit): (UpdateAtlas): (WebKit::UpdateAtlas::bitmap): (WebKit::UpdateAtlas::size): (WebKit::UpdateAtlas::flags): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::adoptImageBackingStore): (WebKit::LayerTreeHostQt::renderNextFrame): (WebKit::LayerTreeHostQt::purgeBackingStores): (WebKit): (WebKit::LayerTreeHostQt::getAtlas): (WebKit::LayerTreeHostQt::beginContentUpdate): * WebProcess/WebPage/qt/LayerTreeHostQt.h: (LayerTreeHostQt): 2012-04-09 No'am Rosenthal [Qt][WK2] Sync the layer's state and the layer's children separately https://bugs.webkit.org/show_bug.cgi?id=82534 Reviewed by Kenneth Rohde Christiansen. Switched the WebLayerInfo struct, which includes a single layer's state, to use only POD types that can be serialized via SimpleArgumentCoder. To allow POD-serialization, we serialize the children IDs in a seperate message (SetLayerChildren), and only when the tree layout has actually been modified. * Shared/WebLayerTreeInfo.cpp: (WebKit::WebLayerInfo::encode): (WebKit::WebLayerInfo::decode): * Shared/WebLayerTreeInfo.h: (WebKit::WebLayerInfo::WebLayerInfo): * UIProcess/LayerTreeHostProxy.cpp: (WebKit::LayerTreeHostProxy::setCompositingLayerState): (WebKit): (WebKit::LayerTreeHostProxy::setCompositingLayerChildren): * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): * UIProcess/LayerTreeHostProxy.messages.in: * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::setLayerChildren): (WebKit): (WebKit::WebLayerTreeRenderer::setLayerState): * UIProcess/WebLayerTreeRenderer.h: (WebLayerTreeRenderer): * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::didChangeLayerState): (WebCore): (WebCore::WebGraphicsLayer::didChangeChildren): (WebCore::WebGraphicsLayer::didChangeGeometry): (WebCore::WebGraphicsLayer::WebGraphicsLayer): (WebCore::WebGraphicsLayer::setChildren): (WebCore::WebGraphicsLayer::addChild): (WebCore::WebGraphicsLayer::addChildAtIndex): (WebCore::WebGraphicsLayer::addChildAbove): (WebCore::WebGraphicsLayer::addChildBelow): (WebCore::WebGraphicsLayer::replaceChild): (WebCore::WebGraphicsLayer::removeFromParent): (WebCore::WebGraphicsLayer::setDrawsContent): (WebCore::WebGraphicsLayer::setContentsOpaque): (WebCore::WebGraphicsLayer::setBackfaceVisibility): (WebCore::WebGraphicsLayer::setOpacity): (WebCore::WebGraphicsLayer::setContentsRect): (WebCore::WebGraphicsLayer::setContentsToImage): (WebCore::WebGraphicsLayer::setMaskLayer): (WebCore::WebGraphicsLayer::setReplicatedByLayer): (WebCore::WebGraphicsLayer::setNeedsDisplayInRect): (WebCore::WebGraphicsLayer::id): (WebCore::WebGraphicsLayer::syncChildren): (WebCore::WebGraphicsLayer::syncLayerState): (WebCore::WebGraphicsLayer::syncImageBackingStore): (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly): (WebCore::WebGraphicsLayer::setRootLayer): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebGraphicsLayerClient): (WebGraphicsLayer): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::syncLayerState): (WebKit): (WebKit::LayerTreeHostQt::syncLayerChildren): * WebProcess/WebPage/qt/LayerTreeHostQt.h: (LayerTreeHostQt): 2012-04-09 No'am Rosenthal [Qt][WK2] Accelerated and non-accelerated animations need to be synchronized https://bugs.webkit.org/show_bug.cgi?id=75780 Reviewed by Kenneth Rohde Christiansen. Remove the ui-side animation code, and return false from addAnimation so that web-side animations kick in. * Shared/WebLayerTreeInfo.cpp: (WebKit): * Shared/WebLayerTreeInfo.h: (WebLayerInfo): * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::paintToCurrentGLContext): (WebKit::WebLayerTreeRenderer::setLayerState): * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::didChangeGeometry): (WebCore::WebGraphicsLayer::syncLayerState): (WebCore::WebGraphicsLayer::computeTransformedVisibleRect): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebGraphicsLayer): 2012-04-09 No'am Rosenthal [Qt][WK2] Don't synchronize WebGraphicsLayers to the UI process if the actual layer information wasn't changed https://bugs.webkit.org/show_bug.cgi?id=82522 Reviewed by Kenneth Rohde Christiansen. Currently we set the m_modified flags for all of the descendants of a layer that has changed its geometry. This causes unnecessary layer sync messages. Instead, we only sync when the actual layer has changed, and add a flag called m_shouldUpdateVisibleRect that applies to descendants of a layer that has a modified geometry. * Shared/WebLayerTreeInfo.h: * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::didChangeChildren): (WebCore): (WebCore::WebGraphicsLayer::setShouldUpdateVisibleRect): (WebCore::WebGraphicsLayer::didChangeGeometry): (WebCore::WebGraphicsLayer::WebGraphicsLayer): (WebCore::WebGraphicsLayer::setPosition): (WebCore::WebGraphicsLayer::setAnchorPoint): (WebCore::WebGraphicsLayer::setSize): (WebCore::WebGraphicsLayer::setTransform): (WebCore::WebGraphicsLayer::setChildrenTransform): (WebCore::WebGraphicsLayer::setPreserves3D): (WebCore::WebGraphicsLayer::setContentsToImage): (WebCore::WebGraphicsLayer::setNeedsDisplayInRect): (WebCore::WebGraphicsLayer::syncImageBackingStore): (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly): (WebCore::WebGraphicsLayer::tiledBackingStorePaintBegin): (WebCore::WebGraphicsLayer::setRootLayer): (WebCore::WebGraphicsLayer::setVisibleContentRectTrajectoryVector): (WebCore::WebGraphicsLayer::setContentsScale): (WebCore::WebGraphicsLayer::effectiveContentsScale): (WebCore::WebGraphicsLayer::adjustContentsScale): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebGraphicsLayer): 2012-04-09 No'am Rosenthal [Qt][WK2] Remove all USE(TILED_BACKING_STORE) defines from code that contains UI_SIDE_COMPOSITING https://bugs.webkit.org/show_bug.cgi?id=82533 Reviewed by Kenneth Rohde Christiansen. No change in behavior, removing some #defines. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::setShouldUpdateVisibleRect): (WebCore::WebGraphicsLayer::adjustContentsScale): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebGraphicsLayer): * WebProcess/WebPage/LayerTreeHost.h: (LayerTreeHost): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::LayerTreeHostQt): (WebKit::LayerTreeHostQt::detachLayer): 2012-04-09 No'am Rosenthal [Qt][WK2] Disable the content-scaling and visible contents rect when the layer's transform is not affine https://bugs.webkit.org/show_bug.cgi?id=82523 Reviewed by Kenneth Rohde Christiansen. Always use contentsScale of 1 and a full visibleContentsRect when the layer's transform is not affine. That's because layer's with complex transform would not gain from the benefit of contents scaling, and might also create unexpected layer content sizes. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::createBackingStore): (WebCore): (WebCore::WebGraphicsLayer::tiledBackingStorePaint): (WebCore::WebGraphicsLayer::tiledBackingStorePaintEnd): (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect): (WebCore::WebGraphicsLayer::updateTile): (WebCore::WebGraphicsLayer::removeTile): (WebCore::WebGraphicsLayer::updateContentBuffers): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebGraphicsLayer): 2012-04-09 Zalan Bujtas [Qt][WK2] Fail to activate links after double tap gesture. https://bugs.webkit.org/show_bug.cgi?id=83468 Reviewed by Kenneth Rohde Christiansen. After a recognized double tap gesture, QtTapGestureRecognizer gets stuck in the double-tap state. Only tapping outside of the double tap radius cancels it. Call reset() to set the default state back. * UIProcess/qt/QtTapGestureRecognizer.cpp: (WebKit::QtTapGestureRecognizer::recognize): ManualTests/link-activation-fails-after-double-tap-gesture.html: Added. 2012-04-07 Patrick Gansterer [CMake] Cleanup WTF include directories https://bugs.webkit.org/show_bug.cgi?id=82716 Reviewed by Eric Seidel. * CMakeLists.txt: 2012-04-06 Jon Lee Build fix for Windows bots. * win/WebKit2.def: Add missing export symbol. 2012-04-06 Hironori Bono REGRESSION: Cannot write a word with Korean double consonant https://bugs.webkit.org/show_bug.cgi?id=81186 Reviewed by Dan Bernstein. WebKit change r103859 posts fake mouse-move events when the keyboard status is changed. Unfortunately, these mouse events go to input methods and confuse a Korean input method. This change directly calls handleMouseEvent() instead of -mouseMoved: to prevent sending these fake events to input methods. * UIProcess/API/mac/WKView.mm: (-[WKView _postFakeMouseMovedEventForFlagsChangedEvent:]): 2012-04-06 Alexey Proskuryakov [Mac] Adopt a different method of telling AppKit when inline input isn't supported https://bugs.webkit.org/show_bug.cgi?id=83408 Reviewed by Adele Peterson. * UIProcess/API/mac/WKTextInputWindowController.mm: (-[WKTextInputView validAttributesForMarkedText]): (-[WKTextInputPanel init]): (-[WKTextInputPanel _interpretKeyEvent:usingLegacyCocoaTextInput:string:]): Added a comment about old approach. 2012-04-06 Jer Noble WebFullScreenManagerProxy::isFullScreen() will create an empty full screen window; steal focus. https://bugs.webkit.org/show_bug.cgi?id=83388 Reviewed by Geoffrey Garen. Calling WebFullScreenManagerProxy::isFullScreen() will create a WKFullScreenWindowController if one does not already exist, since the -[WKView fullScreenWindowController] method will create-on-access. Add a new call, -[WKView hasFullScreenWindowController], which does not auto-create the controller and add that check to WebFullScreenManagerProxy::isFullScreen(). * UIProcess/API/mac/WKView.mm: (-[WKView hasFullScreenWindowController]): * UIProcess/API/mac/WKViewInternal.h: * UIProcess/mac/WebFullScreenManagerProxyMac.mm: (WebKit::WebFullScreenManagerProxy::isFullScreen): 2012-04-06 Tim Horton Add autodetection of image orientation from EXIF information https://bugs.webkit.org/show_bug.cgi?id=19688 and Original patch by David Carson and Eric Seidel. Reviewed by Simon Fraser. Add a preference, ShouldRespectImageOrientation, which will cause WebCore to respect EXIF orientation in all images. * Shared/WebPreferencesStore.h: (WebKit): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetShouldRespectImageOrientation): (WKPreferencesGetShouldRespectImageOrientation): * UIProcess/API/C/WKPreferences.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2012-04-06 Dan Bernstein HiDPI: Have canvas use a hidpi backing store, but downsample upon access Reviewed by Sam Weinig. * Configurations/FeatureDefines.xcconfig: Added ENABLE_HIGH_DPI_CANVAS. 2012-04-05 Anders Carlsson Crash when switching to a tab with plug-ins https://bugs.webkit.org/show_bug.cgi?id=83339 Reviewed by Oliver Hunt. Add an additional check so we don't try to call into plug-ins that haven't yet been initialized. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::setLayerHostingMode): 2012-04-05 Dean Jackson [mac] requestAnimationFrame sometimes stuck when page loads in a background tab https://bugs.webkit.org/show_bug.cgi?id=76105 Unreviewed build fix for Windows. windowIsVisible() is PLATFORM(MAC) only. This means a Page might start requestAnimationFrame-based animations even when it isn't visible. This should only happen when a Page is opened in the background though. The regular hide and show should still pause animations. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::resumePainting): 2012-04-05 Dean Jackson [mac] requestAnimationFrame sometimes stuck when page loads in a background tab https://bugs.webkit.org/show_bug.cgi?id=76105 Reviewed by Simon Fraser. When we are resuming painting only start the scripted animations if we're a visible window. This can happen when tabs are opened in the background. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::resumePainting): 2012-04-05 Patrick Gansterer [Qt] Correct include paths. https://bugs.webkit.org/show_bug.cgi?id=83270 Reviewed by Eric Seidel. Modify the #include declerations so that the wtf types are included using the full path. * Shared/qt/QtNetworkReplyData.cpp: * UIProcess/WebLayerTreeRenderer.cpp: * UIProcess/qt/LayerBackingStore.h: * UIProcess/qt/QtViewportInteractionEngine.cpp: * UIProcess/qt/QtViewportInteractionEngine.h: * UIProcess/qt/QtWebPageSGNode.h: * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: 2012-04-05 Jia Pu Move correction panel related functions from EditorClient into separated AlternativeTextClient class. https://bugs.webkit.org/show_bug.cgi?id=82970 Reviewed by Enrica Casucci. Move correction panel related functions from WebEditorClient to the new WebAlternativeTextClient. See WebCore/ChangeLog for details. * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/mac/PageClientImpl.h: (PageClientImpl): * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::recordAutocorrectionResponse): * UIProcess/API/qt/qquickwebview.cpp: * UIProcess/PageClient.h: (PageClient): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::recordAutocorrectionResponse): * UIProcess/mac/CorrectionPanel.h: * UIProcess/mac/CorrectionPanel.mm: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp: Added. (WebKit): (WebKit::WebAlternativeTextClient::WebAlternativeTextClient): (WebKit::WebAlternativeTextClient::~WebAlternativeTextClient): (WebKit::WebAlternativeTextClient::showCorrectionAlternative): (WebKit::WebAlternativeTextClient::dismissAlternative): (WebKit::WebAlternativeTextClient::dismissAlternativeSoon): (WebKit::WebAlternativeTextClient::recordAutocorrectionResponse): * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: Added. (WebKit): (WebAlternativeTextClient): * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: (WebKit): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): 2012-04-05 Csaba Osztrogonác [Qt] Fix includes after QtDeclarative -> QtQML renaming https://bugs.webkit.org/show_bug.cgi?id=82195 Relanding r112651, because Qt5 is updated everywhere. * UIProcess/API/qt/qquicknetworkreply_p.h: * UIProcess/API/qt/qquicknetworkrequest_p.h: * UIProcess/API/qt/qquickwebview.cpp: * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qwebiconimageprovider_p.h: * UIProcess/API/qt/qwebnavigationhistory.cpp: * UIProcess/API/qt/qwebnavigationhistory_p.h: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: * UIProcess/qt/QtDialogRunner.cpp: (QtDialogRunner::initForAlert): (QtDialogRunner::initForConfirm): (QtDialogRunner::initForPrompt): (QtDialogRunner::initForAuthentication): (QtDialogRunner::initForProxyAuthentication): (QtDialogRunner::initForCertificateVerification): (QtDialogRunner::initForFilePicker): (QtDialogRunner::initForDatabaseQuotaDialog): (QtDialogRunner::createDialog): * UIProcess/qt/WebPopupMenuProxyQt.cpp: (WebKit::WebPopupMenuProxyQt::createItem): (WebKit::WebPopupMenuProxyQt::createContext): 2012-04-04 Hayato Ito Remove ReifiedTreeTraversal. https://bugs.webkit.org/show_bug.cgi?id=83110 Reviewed by Dimitri Glazkov. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-04-04 Shinya Kawanaka Shadow DOM is exposed in JS. https://bugs.webkit.org/show_bug.cgi?id=82607 Reviewed by Hajime Morita. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-04-04 Anders Carlsson Text input doesn't work for some Flash forms https://bugs.webkit.org/show_bug.cgi?id=83232 Reviewed by Alexey Proskuryakov. If a plug-in is instantiated when the WKView is not focused, text input wouldn't work. The reason for this is that WebPage::windowIsFocused() would only return true if the window and the WKView are both focused. Rename this member function to windowAndWebPageAreFocused, add a new windowIsFocused member function that does the right thing and change WebPage::focusedWebPage to use windowAndWebPageAreFocused. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::windowIsFocused): (WebKit): (WebKit::WebPage::windowAndWebPageAreFocused): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::focusedWebPage): 2012-03-15 Jer Noble Full Screen mode should cancel before navigation. https://bugs.webkit.org/show_bug.cgi?id=81295 Reviewed by Anders Carlsson. When a provisional load is started, if the page is currently in full screen mode, instruct the full screen controller to close the full screen window immediately. Close the full screen window controller, if present and in full screen mode: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didStartProvisionalLoadForFrame): Add boilerplate to support passing through isFullScreen() and close() methods from the WebPageProxy to the WKFullScreenWindowController: * UIProcess/WebFullScreenManagerProxy.h: * UIProcess/mac/WKFullScreenWindowController.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController isFullScreen]): Added simple accessor. * UIProcess/mac/WebFullScreenManagerProxyMac.mm: (WebKit::WebFullScreenManagerProxy::close): Pass through to the WKFullScreenWindowController. (WebKit::WebFullScreenManagerProxy::isFullScreen): Ditto. 2012-04-04 Jesus Sanchez-Palencia WKTR needs to implement layoutTestController.setPageVisibility() https://bugs.webkit.org/show_bug.cgi?id=69554 Reviewed by Simon Fraser. This patch implements the setPageVisibilityState through InjectedBundle so WKTR supports the Page Visibility API and can set the visibility state directly to Page. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetPageVisibilityState): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit): (WebKit::InjectedBundle::setPageVisibilityState): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-04-04 Alexis Menard Animation related classes should use CSSPropertyId rather than integers when manipulating CSS property ids. https://bugs.webkit.org/show_bug.cgi?id=83050 Reviewed by Simon Fraser. The property of the Animation is a CSSPropertyID. It's ok to cast it here as an int for IPC transmission. * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): 2012-04-04 Allan Sandfeld Jensen [Qt] Entire page highlighted on panning. https://bugs.webkit.org/show_bug.cgi?id=83158 Reviewed by Kenneth Rohde Christiansen. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::highlightPotentialActivation): 2012-04-04 Jesus Sanchez-Palencia [Qt][WK2] QtWebKit2 should support Page Visibility API https://bugs.webkit.org/show_bug.cgi?id=81164 Reviewed by Kenneth Rohde Christiansen. Implementing the last bits needed for getting the expected behavior for Page Visibility API, according to its spec. The only missing part in Qt was a way to check whether the view was exposed or not. * UIProcess/qt/QtPageClient.cpp: (QtPageClient::isViewVisible): 2012-04-04 Jesus Sanchez-Palencia [WK2] Add Page Visibility API support https://bugs.webkit.org/show_bug.cgi?id=81154 Reviewed by Kenneth Rohde Christiansen. Use WebPageProxy::viewStateDidChange to correctly define the page's visibilityState and then set it to the WebProcess. The WebKit2's based ports just need to implement the related PageClient functions in order to get this API enabled and working properly. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::initializeWebPage): (WebKit::WebPageProxy::viewStateDidChange): * WebProcess/WebPage/WebPage.cpp: (WebKit): (WebKit::WebPage::setVisibilityState): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: 2012-04-04 Kenneth Rohde Christiansen [Qt] Further improvements of the tap gesture recognizer https://bugs.webkit.org/show_bug.cgi?id=83149 Reviewed by Zoltan Herczeg. Ignore single tap while finger is still pressed. Some renaming to make the states more clear. A pan further than the maxPanDistance can now invalidate double-taps as well. * UIProcess/qt/QtTapGestureRecognizer.cpp: (WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer): (WebKit::QtTapGestureRecognizer::recognize): (WebKit::QtTapGestureRecognizer::singleTapTimeout): (WebKit::QtTapGestureRecognizer::tapAndHoldTimeout): (WebKit::QtTapGestureRecognizer::reset): * UIProcess/qt/QtTapGestureRecognizer.h: 2012-04-04 Andras Becsi [Qt][WK2] Make the WebView a subclass of Flickable https://bugs.webkit.org/show_bug.cgi?id=83033 Reviewed by Kenneth Rohde Christiansen. Hitherto, the experiment of a QML WebView with an internal Flickable instance showed that the approach of hiding the Flickable raises more problems than it solves. One set of problems arose because the internal Flickable was a separate item which received and reacted on automatically synthesized mouse events send by the canvas, this interfered with the gesture recognizers of the WebView. Other issues were related to orientation and the integration of the WebView item with other QML items and components (like scroll indicators) which require a larger set of the Flickable API or the Flickable object itself (e.g. ScrollDecorator). These disadvantages of an internal Flickable instance outweigh the benefits of controlling the exposed API, therefore the experiment had the conclusion that there is no way around the public inheritance from QQuickFlickable. This patch removes the QtFlickProvider class, inherits QQuickWebView from QQuickFlickable and adjusts the viewport interaction engine and the gesture recognizers to use the Flickable API of the WebView to keep the same behaviour as before. * Target.pri: * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::QQuickWebPage): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewFlickablePrivate::initialize): (QQuickWebViewFlickablePrivate::pageItemPos): (QQuickWebViewFlickablePrivate::updateContentsSize): (QQuickWebViewFlickablePrivate::onComponentComplete): (QQuickWebViewFlickablePrivate::updateViewportSize): (QQuickWebViewExperimental::useDefaultContentItemSize): (QQuickWebViewExperimental::setUseDefaultContentItemSize): (QQuickWebView::QQuickWebView): (QQuickWebView::inputMethodQuery): (QQuickWebView::geometryChanged): (QQuickWebView::componentComplete): (QQuickWebView::event): (QQuickWebView::contentPos): (QQuickWebView::setContentPos): (QQuickWebView::handlePress): (QQuickWebView::handleMove): (QQuickWebView::handleRelease): * UIProcess/API/qt/qquickwebview_p.h: (WebKit): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::scrollRequest): * UIProcess/API/qt/tests/tests.pri: * UIProcess/qt/QtFlickProvider.cpp: Removed. * UIProcess/qt/QtFlickProvider.h: Removed. * UIProcess/qt/QtPanGestureRecognizer.cpp: (WebKit::QtPanGestureRecognizer::recognize): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::setItemRectVisible): (WebKit::QtViewportInteractionEngine::flickableMoveStarted): (WebKit::QtViewportInteractionEngine::flickableMoveEnded): (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate): (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged): (WebKit::QtViewportInteractionEngine::wheelEvent): (WebKit::QtViewportInteractionEngine::reset): (WebKit::QtViewportInteractionEngine::scrollAnimationActive): (WebKit::QtViewportInteractionEngine::panGestureActive): (WebKit::QtViewportInteractionEngine::panGestureStarted): (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate): (WebKit::QtViewportInteractionEngine::panGestureEnded): (WebKit::QtViewportInteractionEngine::panGestureCancelled): (WebKit::QtViewportInteractionEngine::cancelScrollAnimation): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate): (WebKit::QtViewportInteractionEngine::pinchGestureEnded): (WebKit::QtViewportInteractionEngine::scaleContent): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::doneWithTouchEvent): 2012-04-04 Allan Sandfeld Jensen [Qt] Unable to zoom to some areas. https://bugs.webkit.org/show_bug.cgi?id=83144 Reviewed by Kenneth Rohde Christiansen. Remember to convert touch-area to touch-point radius. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::findZoomableAreaForPoint): 2012-04-04 Kenneth Rohde Christiansen [Qt] Improve the tap gesture recognizer https://bugs.webkit.org/show_bug.cgi?id=83135 Reviewed by Simon Hausmann. Clean up the code and make sure that the first single tap event, as part of a double tap gesture, is ignored. * UIProcess/qt/QtTapGestureRecognizer.cpp: (WebKit::QtTapGestureRecognizer::withinDistance): (WebKit): (WebKit::QtTapGestureRecognizer::recognize): (WebKit::QtTapGestureRecognizer::singleTapTimeout): (WebKit::QtTapGestureRecognizer::tapAndHoldTimeout): (WebKit::QtTapGestureRecognizer::reset): * UIProcess/qt/QtTapGestureRecognizer.h: (QtTapGestureRecognizer): 2012-04-03 Geoffrey Garen Fixed some WebKit2 crashes seen on the buildbot after my last patch. Reviewed by Beth Dakin. * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::finalize): Don't try to get our value out of the map, since Weak returns NULL during finalization. Instead, use the handle we've been passed for finalization. 2012-03-29 Geoffrey Garen First step toward incremental Weak finalization https://bugs.webkit.org/show_bug.cgi?id=82670 Reviewed by Filip Pizlo. Updated for API change. * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::finalize): 2012-04-03 Keishi Hattori Disable ENABLE_DATALIST for now https://bugs.webkit.org/show_bug.cgi?id=82871 Reviewed by Kent Tamura. * Configurations/FeatureDefines.xcconfig: Disabled ENABLE_DATALIST. 2012-04-03 Yael Aharon [Qt][WK2] Assert on startup after r113090 https://bugs.webkit.org/show_bug.cgi?id=83111 Reviewed by Noam Rosenthal. Add willBeDestroyed to to WebGraphicsLayer. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::~WebGraphicsLayer): (WebCore): (WebCore::WebGraphicsLayer::willBeDestroyed): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebGraphicsLayer): 2012-04-03 Sam Weinig Allow the old WebKit2 drawing model to host layers in the window server https://bugs.webkit.org/show_bug.cgi?id=83101 Reviewed by Anders Carlsson. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::layerHostingModeDidChange): * UIProcess/DrawingAreaProxyImpl.h: (DrawingAreaProxyImpl): * WebProcess/WebPage/DrawingArea.h: (DrawingArea): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::setLayerHostingMode): * WebProcess/WebPage/DrawingAreaImpl.h: (DrawingAreaImpl): * WebProcess/WebPage/LayerTreeHost.h: (LayerTreeHost): (WebKit::LayerTreeHost::setLayerHostingMode): * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: (LayerTreeHostCAMac): * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm: (WebKit::LayerTreeHostCAMac::platformInitialize): (WebKit::LayerTreeHostCAMac::setLayerHostingMode): Pipe layer hosting mode to the old drawing area. 2012-04-03 Jia Pu Rename SpellingCorrectionController to AlternativeTextController. https://bugs.webkit.org/show_bug.cgi?id=82942 Reviewed by Enrica Casucci. These changes are simply for adopting new class names. * UIProcess/API/mac/PageClientImpl.h: (PageClientImpl): * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::showCorrectionPanel): (WebKit::PageClientImpl::dismissCorrectionPanel): (WebKit::PageClientImpl::dismissCorrectionPanelSoon): * UIProcess/API/mac/WKView.mm: (-[WKView handleCorrectionPanelResult:]): * UIProcess/PageClient.h: (PageClient): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::pageDidScroll): (WebKit::WebPageProxy::processDidCrash): (WebKit::WebPageProxy::showCorrectionPanel): (WebKit::WebPageProxy::dismissCorrectionPanel): (WebKit::WebPageProxy::dismissCorrectionPanelSoon): (WebKit::WebPageProxy::handleAlternativeTextUIResult): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/mac/CorrectionPanel.h: (CorrectionPanel): * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): (WebKit::CorrectionPanel::CorrectionPanel): (WebKit::CorrectionPanel::~CorrectionPanel): (WebKit::CorrectionPanel::show): (WebKit::CorrectionPanel::dismiss): (WebKit::CorrectionPanel::dismissInternal): (WebKit::CorrectionPanel::handleAcceptedReplacement): * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: (WebKit::WebEditorClient::showCorrectionPanel): (WebKit::WebEditorClient::dismissCorrectionPanel): (WebKit::WebEditorClient::dismissCorrectionPanelSoon): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::handleAlternativeTextUIResult): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: 2012-04-03 Zalan Bujtas [Qt][WK2] Remove #if !USE(TILED_BACKING_STORE) from WebFrameLoaderClient::transitionToCommittedForNewPage() https://bugs.webkit.org/show_bug.cgi?id=83070 Reviewed by Andreas Kling. It is preventing m_frameHasCustomRepresentation to be set properly and not in sync with WebFrameLoaderClient::transitionToCommittedFromCachedFrame() * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): 2012-04-03 Jer Noble ESC key in full screen does not result in webkitFullScreenChange event. https://bugs.webkit.org/show_bug.cgi?id=82755 Reviewed by Eric Carlson. Instead of exiting full screen directly, ask the document to initiate exiting full screen. This ensures that the entire full screen element stack is cleared and that webkitFullScreenChange events are sent out correctly. Because the WebProcess may be stalled or hung, add a watchdog timer which will force an exit of full screen if the WebProcess does not respond in a timely manner (defaults to 1s). Add a new method, requestExitFullScreen, which calls through to the WebProcess and Document: * UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::requestExitFullScreen): * UIProcess/WebFullScreenManagerProxy.h: * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::requestExitFullScreen): * WebProcess/FullScreen/WebFullScreenManager.h: * WebProcess/FullScreen/WebFullScreenManager.messages.in: Request that the document exits full screen when the ESC key is pressed: * UIProcess/mac/WKFullScreenWindowController.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController cancelOperation:]): (-[WKFullScreenWindowController exitFullScreen]): 2012-04-03 Balazs Kelemen [Qt][WK2] ASSERT(!(outputBytes.size() % sizeof(UChar))) in PluginProcessProxyQt.cpp https://bugs.webkit.org/show_bug.cgi?id=83034 Reviewed by Zoltan Herczeg. Don't allow the plugin to pollute the standard output. Reinvent StdOutDevNullRedirector which was removed in r112889 for this purpose. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (StdoutDevNullRedirector): (WebKit): (WebKit::StdoutDevNullRedirector::StdoutDevNullRedirector): (WebKit::StdoutDevNullRedirector::~StdoutDevNullRedirector): (WebKit::NetscapePluginModule::scanPlugin): 2012-04-02 Jocelyn Turcotte Enable and connect the WebInspectorServer with WebKit2 pages. https://bugs.webkit.org/show_bug.cgi?id=73094 Reviewed by Simon Hausmann. Pages are registered/unregistered as they are created/destroyed, if they have developer extras enabled. The server is run on the UI process and communicates with the web process through IPC for each message between the inspector controller and the remote frontend. Includes the server spawning logic for the Qt port, the server is started through an environment variable specifying the interface and port to bind the server to, by default on 127.0.0.1. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::WebInspectorProxy): (WebKit::WebInspectorProxy::invalidate): (WebKit): (WebKit::WebInspectorProxy::enableRemoteInspection): (WebKit::WebInspectorProxy::remoteFrontendConnected): (WebKit::WebInspectorProxy::remoteFrontendDisconnected): (WebKit::WebInspectorProxy::dispatchMessageFromRemoteFrontend): (WebKit::WebInspectorProxy::sendMessageToRemoteFrontend): * UIProcess/WebInspectorProxy.h: (WebInspectorProxy): * UIProcess/WebInspectorProxy.messages.in: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::initializeWebPage): (WebKit::WebPageProxy::preferencesDidChange): * UIProcess/qt/QtWebContext.cpp: (WebKit::initInspectorServer): (WebKit): (WebKit::globalInitialization): (WebKit::QtWebContext::create): * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::sendMessageToFrontend): * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::WebInspector): (WebKit): (WebKit::WebInspector::sendMessageToRemoteFrontend): (WebKit::WebInspector::dispatchMessageFromRemoteFrontend): (WebKit::WebInspector::remoteFrontendConnected): (WebKit::WebInspector::remoteFrontendDisconnected): * WebProcess/WebPage/WebInspector.h: (WebInspector): (WebKit::WebInspector::hasRemoteFrontendConnected): * WebProcess/WebPage/WebInspector.messages.in: 2012-03-29 Joseph Pecoraro and Jocelyn Turcotte WebInspectorServer for WebKit2. https://bugs.webkit.org/show_bug.cgi?id=73855 Reviewed by Simon Hausmann. The server uses WebSocket for communication with the remote client and normal HTTP requests are handled to optionally send the frontend on the wire. Those decision are handled per platform and Qt currently maps: - "/" to a static listing page. - "/pagelist.json" to the page list for the listing page or tools. - anything else, for example "/inspector.js" to the file with the same name in the dynamic libraries built resources. Invalid files should return a 404. * Target.pri: * UIProcess/InspectorServer/WebInspectorServer.cpp: Added. (WebKit): (WebKit::pageIdFromRequestPath): (WebKit::WebInspectorServer::server): (WebKit::WebInspectorServer::WebInspectorServer): (WebKit::WebInspectorServer::~WebInspectorServer): (WebKit::WebInspectorServer::registerPage): (WebKit::WebInspectorServer::unregisterPage): (WebKit::WebInspectorServer::sendMessageOverConnection): (WebKit::WebInspectorServer::didReceiveUnrecognizedHTTPRequest): (WebKit::WebInspectorServer::didReceiveWebSocketUpgradeHTTPRequest): (WebKit::WebInspectorServer::didEstablishWebSocketConnection): (WebKit::WebInspectorServer::didReceiveWebSocketMessage): (WebKit::WebInspectorServer::didCloseWebSocketConnection): (WebKit::WebInspectorServer::closeConnection): * UIProcess/InspectorServer/WebInspectorServer.h: Added. (WebKit): (WebInspectorServer): * UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp: Added. (WebKit): (WebKit::WebInspectorServer::platformResourceForPath): (WebKit::WebInspectorServer::buildPageList): * WebKit2.qrc: Added. * qt/Resources/inspectorPageIndex.html: Added. 2012-03-29 Joseph Pecoraro and Jocelyn Turcotte Add a Generic WebSocket Server. https://bugs.webkit.org/show_bug.cgi?id=73093 Reviewed by Simon Hausmann. The Inspector Server will be a WebSocket Server that also responds to non-WebSocket-Upgrade HTTP Requests. This is a generic WebSocket server that passes on what it doesn't know on to its client for extended functionality. This code is wrapped in a new ENABLE(INSPECTOR_SERVER) flag. There are no tests yet for a built-in WebSocket server. This will be covered by API level tests in a later patch. * Target.pri: WebSocketServer is a simple server. Calling listen, or close, multiple times is safe. Subclassing is expected. * UIProcess/InspectorServer/WebSocketServer.cpp: Added. (WebKit): (WebKit::WebSocketServer::WebSocketServer): (WebKit::WebSocketServer::~WebSocketServer): (WebKit::WebSocketServer::listen): (WebKit::WebSocketServer::close): (WebKit::WebSocketServer::didAcceptConnection): (WebKit::WebSocketServer::didCloseWebSocketServerConnection): * UIProcess/InspectorServer/WebSocketServer.h: Added. (WebKit): (WebCore): (WebSocketServer): * UIProcess/InspectorServer/WebSocketServerClient.h: Added. (WebCore): (WebKit): (WebSocketServerClient): (WebKit::WebSocketServerClient::~WebSocketServerClient): (WebKit::WebSocketServerClient::didReceiveUnrecognizedHTTPRequest): (WebKit::WebSocketServerClient::didReceiveWebSocketUpgradeHTTPRequest): (WebKit::WebSocketServerClient::didEstablishWebSocketConnection): (WebKit::WebSocketServerClient::didReceiveWebSocketMessage): (WebKit::WebSocketServerClient::didCloseWebSocketConnection): Each WebSocketConnection: - Passes unknown HTTP Requests to the server's client. - Handles WebSocket Upgrade Requests. - First ask the client if it is okay. - Later notify the client about a success. - Once upgraded the connection parses and passes WebSocket frames to the client. * UIProcess/InspectorServer/WebSocketServerConnection.cpp: Added. (WebKit): (WebKit::WebSocketServerConnection::WebSocketServerConnection): (WebKit::WebSocketServerConnection::~WebSocketServerConnection): (WebKit::WebSocketServerConnection::shutdownNow): (WebKit::WebSocketServerConnection::shutdownAfterSendOrNow): meant to shutdown after an HTTP response. Ensure all platforms work as expected. (WebKit::WebSocketServerConnection::sendWebSocketMessage): send a text message (WebSocket message) over the connection. (WebKit::WebSocketServerConnection::sendHTTPResponseHeader): (WebKit::WebSocketServerConnection::sendRawData): send raw data (HTTP message) over the connection. (WebKit::WebSocketServerConnection::didCloseSocketStream): handle socket closing scenarios. (WebKit::WebSocketServerConnection::didReceiveSocketStreamData): parse the incoming data in HTTP / WebSocket modes. (WebKit::WebSocketServerConnection::didFailSocketStream): log errors. (WebKit::WebSocketServerConnection::readHTTPMessage): when starting, a web socket connection reads an HTTP message. (WebKit::WebSocketServerConnection::upgradeToWebSocketServerConnection): (WebKit::WebSocketServerConnection::readWebSocketFrames): parse our buffer for as many frames as possible. (WebKit::WebSocketServerConnection::readWebSocketFrame): parse an individual frame. * UIProcess/InspectorServer/WebSocketServerConnection.h: Added. (WebCore): (WebKit): (WebSocketServerConnection): (WebKit::WebSocketServerConnection::identifier): (WebKit::WebSocketServerConnection::setIdentifier): Qt specific implementation. * UIProcess/InspectorServer/qt/WebSocketServerQt.cpp: Added. (WebKit): (WebKit::WebSocketServer::platformInitialize): (WebKit::WebSocketServer::platformListen): (WebKit::WebSocketServer::platformClose): (WebKit::QtTcpServerHandler::QtTcpServerHandler): (WebKit::QtTcpServerHandler::handleNewConnection): (WebKit::QtTcpServerHandler::listen): (WebKit::QtTcpServerHandler::close): * UIProcess/InspectorServer/qt/WebSocketServerQt.h: Added. (WebKit): (QtTcpServerHandler): * WebKit2.pri: * config.h: Add ENABLE(INSPECTOR_SERVER) for WebKit2. 2012-04-03 Jocelyn Turcotte [Qt] Add developerExtrasEnabled to QWebPreferences. https://bugs.webkit.org/show_bug.cgi?id=83018 Reviewed by Kenneth Rohde Christiansen. This is required to allow inspecting pages. * UIProcess/API/qt/qwebpreferences.cpp: (QWebPreferencesPrivate::testAttribute): (QWebPreferencesPrivate::setAttribute): (QWebPreferences::developerExtrasEnabled): (QWebPreferences::setDeveloperExtrasEnabled): * UIProcess/API/qt/qwebpreferences_p.h: * UIProcess/API/qt/qwebpreferences_p_p.h: 2012-04-03 Allan Sandfeld Jensen [Qt] Tap highlight attempted hidden several times https://bugs.webkit.org/show_bug.cgi?id=82903 Reviewed by Kenneth Rohde Christiansen. Do not reset GestureRecognizer if already reset, and do not disable tap-highlight on touch-end if already reset. * UIProcess/qt/QtTapGestureRecognizer.cpp: (WebKit::QtTapGestureRecognizer::recognize): (WebKit::QtTapGestureRecognizer::reset): 2012-04-03 Allan Sandfeld Jensen [Qt] Tap highlight still showing when tap gesture has timed out https://bugs.webkit.org/show_bug.cgi?id=82902 Reviewed by Kenneth Rohde Christiansen. Disable highlight of potential tap, when tap-and-hold state replaces potential tap state. * UIProcess/qt/QtTapGestureRecognizer.cpp: (WebKit::QtTapGestureRecognizer::tapAndHoldTimeout): 2012-04-02 Zalan Bujtas [Qt][WK2] Set viewport size back, when WebProcess is relaunched. https://bugs.webkit.org/show_bug.cgi?id=82936 Reviewed by Andreas Kling. Fixed layout requires viewport size set properly on the WebProcess side. Make sure it is set, when WebProcess is relaunched. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::didRelaunchProcess): 2012-04-02 Anders Carlsson Call NPP_SetValue with WKNVCALayerRenderServerPort when a WKView is moved from a buffered to an unbuffered window, or vice versa https://bugs.webkit.org/show_bug.cgi?id=82951 Reviewed by Sam Weinig. * PluginProcess/mac/PluginControllerProxyMac.mm: (WebKit::PluginControllerProxy::setLayerHostingMode): Call Plugin::setLayerHostingMode). * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.h: Move WKNVCALayerRenderServerPort to the header file. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): Initialize m_layerHostingMode. (WebKit::NetscapePlugin::initialize): Set m_layerHostingMode from the parameters struct. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::compositingRenderServerPort): Return MACH_PORT_NULL when hosted in the window server. (WebKit::NetscapePlugin::platformPostInitialize): Move the code that gets the layer out into a separate function, updatePluginLayer. (WebKit::NetscapePlugin::setLayerHostingMode): Let the plug-in know that the layer hosting mode changed and update the plug-in layer if setting the new compositing port was successful. 2012-04-02 Jesus Sanchez-Palencia [Qt][WK2] ResourceError::isCancellation() is always returning false https://bugs.webkit.org/show_bug.cgi?id=82917 Reviewed by Noam Rosenthal. We were missing the encoding of a boolean in ArgumentCoder and, therefore, we were getting always "false" for ResourceError::isCancellation() for errors being sent through the IPC. * Shared/qt/WebCoreArgumentCodersQt.cpp: (CoreIPC::::encode): (CoreIPC::::decode): 2012-03-29 Sam Weinig Add setting to disable Java for local files even if it is otherwise enabled https://bugs.webkit.org/show_bug.cgi?id=82685 Reviewed by Anders Carlsson. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetJavaEnabledForLocalFiles): (WKPreferencesGetJavaEnabledForLocalFiles): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Add pref as SPI and forward to WebCore. 2012-04-02 Balazs Kelemen [Qt][WK2] Set up plugin process on Unix https://bugs.webkit.org/show_bug.cgi?id=72121 Reviewed by Simon Hausmann. Setup plugin process for Qt and move the task of querying the plugins to this process in order to avoid crashes due to plugin bugs or library incompatibility. * GNUmakefile.am: * PluginProcess.pro: Added. * PluginProcess/gtk/PluginProcessMainGtk.cpp: (WebKit::PluginProcessMainGtk): * PluginProcess/qt/PluginProcessMainQt.cpp: (WebKit::messageHandler): (WebKit::initializeGtk): (WebKit): (WebKit::PluginProcessMain): Implement entry point of the plugin process. Handle -scanPlugin command line switch: produce meta data of plugin on standard output and terminate. Move Gtk initialization hack to there. * Shared/Plugins/Netscape/NetscapePluginModule.cpp: (WebKit::NetscapePluginModule::tryLoad): Get rid of the Gtk initialization hack. We do not nead it here anymore. * Shared/Plugins/Netscape/NetscapePluginModule.h: (WebKit): (NetscapePluginModule): * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::parseMIMEDescription): (WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin): (WebKit): (WebKit::NetscapePluginModule::getPluginInfo): Get plugin meta data via PluginProcessproxy. If a failure happened we ignore to use the plugin. Remove the concept of stdout redirection since we can control it when launching the process. (WebKit::NetscapePluginModule::determineQuirks): (WebKit::truncateToSingleLine): (WebKit::NetscapePluginModule::scanPlugin): Produce plugin meta data on standard output. * Shared/ProcessExecutablePath.h: Added. (WebKit): * Shared/gtk/ProcessExecutablePathGtk.cpp: Added. (findWebKitProcess): (executablePathOfWebProcess): (executablePathOfPluginProcess): * Shared/qt/ProcessExecutablePathQt.cpp: Copied from Source/WebKit2/UIProcess/Plugins/qt/PluginProcessProxyQt.cpp. (WebKit): (WebKit::executablePath): (WebKit::executablePathOfWebProcess): (WebKit::executablePathOfPluginProcess): Factored the executable path determination into free functions to avoid code duplication. * Shared/qt/ShareableBitmapQt.cpp: (WebKit::ShareableBitmap::paint): Added implementation for the override with the scale factor because it is called from PluginProxy. It does not actually handle the case when the scale factor is not 1. However it's ok because it can only happen on Mac in the moment. * Target.pri: * UIProcess/Launcher/ProcessLauncher.h: (ProcessLauncher): * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: (WebKit::ProcessLauncher::launchProcess): Use the new functions to determine the executable path. * UIProcess/Plugins/PluginProcessProxy.h: (WebKit): (RawPluginMetaData): (PluginProcessProxy): * UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp: (WebKit::PluginProcessProxy::platformInitializePluginProcess): (WebKit): (WebKit::PluginProcessProxy::scanPlugin): * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: (WebKit): (WebKit::PluginProcessProxy::platformInitializePluginProcess): (WebKit::PluginProcessProxy::scanPlugin): Launch plugin process and parse it's output to get the meta data for the plugin. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Changed according to the removing of the flash hack. Do not try to decide whether the plugin needs Gtk by it's name but instead always get back the expected Gtk version (2). Only Gtk plugins should ask for this anyway. * qt/PluginMainQt.cpp: Copied from Source/WebKit2/UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp. (WebKit): (main): 2012-04-02 Sheriff Bot Unreviewed, rolling out r112868, r112879, and r112881. http://trac.webkit.org/changeset/112868 http://trac.webkit.org/changeset/112879 http://trac.webkit.org/changeset/112881 https://bugs.webkit.org/show_bug.cgi?id=82901 "Build fail on bots." (Requested by kbalazs on #webkit). * GNUmakefile.am: * PluginProcess.pro: Removed. * PluginProcess/gtk/PluginProcessMainGtk.cpp: (WebKit::PluginProcessMainGtk): * PluginProcess/qt/PluginProcessMainQt.cpp: (WebKit::PluginProcessMain): * Shared/Plugins/Netscape/NetscapePluginModule.cpp: (WebKit::NetscapePluginModule::tryLoad): * Shared/Plugins/Netscape/NetscapePluginModule.h: (NetscapePluginModule): * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (StdoutDevNullRedirector): (WebKit): (WebKit::StdoutDevNullRedirector::StdoutDevNullRedirector): (WebKit::StdoutDevNullRedirector::~StdoutDevNullRedirector): (WebKit::initializeGTK): (WebKit::NetscapePluginModule::applyX11QuirksBeforeLoad): (WebKit::NetscapePluginModule::setMIMEDescription): (WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin): (WebKit::NetscapePluginModule::getPluginInfo): (WebKit::NetscapePluginModule::determineQuirks): * Shared/ProcessExecutablePath.h: Removed. * Shared/gtk/ProcessExecutablePathGtk.cpp: Removed. * Shared/qt/ProcessExecutablePathQt.cpp: Removed. * Shared/qt/ShareableBitmapQt.cpp: (WebKit::ShareableBitmap::paint): * Target.pri: * UIProcess/Launcher/ProcessLauncher.h: (ProcessLauncher): * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit): (WebKit::findWebKitProcess): (WebKit::ProcessLauncher::launchProcess): * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Plugins/PluginProcessProxy.h: (WebKit): (PluginProcessProxy): * UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp: (WebKit::PluginProcessProxy::platformInitializePluginProcess): * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: (WebKit::PluginProcessProxy::platformInitializePluginProcess): * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): * qt/PluginMainQt.cpp: Removed. 2012-04-02 Balazs Kelemen One more try to fix Qt build after r112868. It's a misery why I don't have these build failures locally. * PluginProcess.pro: 2012-04-02 Balazs Kelemen Fix Qt build after r112868. * PluginProcess.pro: Add WTF into includepath. 2012-04-02 Zalan Bujtas [Qt][WK2] Call resize on frameview in WebPage::resizeToContentsIfNeeded only when the size changes. https://bugs.webkit.org/show_bug.cgi?id=82892 Reviewed by Kenneth Rohde Christiansen. Check against the expanded size before calling resize on frameview. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setFixedVisibleContentRect): (WebKit::WebPage::resizeToContentsIfNeeded): 2012-04-02 Balazs Kelemen [Qt][WK2] Set up plugin process on Unix https://bugs.webkit.org/show_bug.cgi?id=72121 Reviewed by Simon Hausmann. Setup plugin process for Qt and move the task of querying the plugins to this process in order to avoid crashes due to plugin bugs or library incompatibility. * GNUmakefile.am: * PluginProcess.pro: Added. * PluginProcess/gtk/PluginProcessMainGtk.cpp: (WebKit::PluginProcessMainGtk): * PluginProcess/qt/PluginProcessMainQt.cpp: (WebKit::messageHandler): (WebKit::initializeGtk): (WebKit): (WebKit::PluginProcessMain): Implement entry point of the plugin process. Handle -scanPlugin command line switch: produce meta data of plugin on standard output and terminate. Move Gtk initialization hack to there. * Shared/Plugins/Netscape/NetscapePluginModule.cpp: (WebKit::NetscapePluginModule::tryLoad): Get rid of the Gtk initialization hack. We do not nead it here anymore. * Shared/Plugins/Netscape/NetscapePluginModule.h: (WebKit): (NetscapePluginModule): * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::parseMIMEDescription): (WebKit::NetscapePluginModule::getPluginInfoForLoadedPlugin): (WebKit): (WebKit::NetscapePluginModule::getPluginInfo): Get plugin meta data via PluginProcessproxy. If a failure happened we ignore to use the plugin. Remove the concept of stdout redirection since we can control it when launching the process. (WebKit::NetscapePluginModule::determineQuirks): (WebKit::truncateToSingleLine): (WebKit::NetscapePluginModule::scanPlugin): Produce plugin meta data on standard output. * Shared/ProcessExecutablePath.h: Added. (WebKit): * Shared/gtk/ProcessExecutablePathGtk.cpp: Added. (findWebKitProcess): (executablePathOfWebProcess): (executablePathOfPluginProcess): * Shared/qt/ProcessExecutablePathQt.cpp: Copied from Source/WebKit2/UIProcess/Plugins/qt/PluginProcessProxyQt.cpp. (WebKit): (WebKit::executablePath): (WebKit::executablePathOfWebProcess): (WebKit::executablePathOfPluginProcess): Factored the executable path determination into free functions to avoid code duplication. * Shared/qt/ShareableBitmapQt.cpp: (WebKit::ShareableBitmap::paint): Added implementation for the override with the scale factor because it is called from PluginProxy. It does not actually handle the case when the scale factor is not 1. However it's ok because it can only happen on Mac in the moment. * Target.pri: * UIProcess/Launcher/ProcessLauncher.h: (ProcessLauncher): * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: (WebKit::ProcessLauncher::launchProcess): Use the new functions to determine the executable path. * UIProcess/Plugins/PluginProcessProxy.h: (WebKit): (RawPluginMetaData): (PluginProcessProxy): * UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp: (WebKit::PluginProcessProxy::platformInitializePluginProcess): (WebKit): (WebKit::PluginProcessProxy::scanPlugin): * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: (WebKit): (WebKit::PluginProcessProxy::platformInitializePluginProcess): (WebKit::PluginProcessProxy::scanPlugin): Launch plugin process and parse it's output to get the meta data for the plugin. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Changed according to the removing of the flash hack. Do not try to decide whether the plugin needs Gtk by it's name but instead always get back the expected Gtk version (2). Only Gtk plugins should ask for this anyway. * qt/PluginMainQt.cpp: Copied from Source/WebKit2/UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp. (WebKit): (main): 2012-03-16 Philippe Normand [GTK][WK2] Initial FullScreen support https://bugs.webkit.org/show_bug.cgi?id=75553 Reviewed by Martin Robinson. Full screen display support in WebKitWebViewBase. Two functions have been added to handle this. They're called by the WebFullScreenManagerProxy when full screen display needs to be managed for an HTML element. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (_WebKitWebViewBasePrivate): (webkitWebViewBaseCreateWebPage): (onFullscreenGtkKeyPressEvent): (webkitWebViewBaseEnterFullScreen): (webkitWebViewBaseExitFullScreen): * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/WebFullScreenManagerProxy.h: (WebKit): * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp: (WebKit::WebFullScreenManagerProxy::enterFullScreen): (WebKit::WebFullScreenManagerProxy::exitFullScreen): 2012-04-02 Sheriff Bot Unreviewed, rolling out r112651. http://trac.webkit.org/changeset/112651 https://bugs.webkit.org/show_bug.cgi?id=82887 It doesn't work with older Qt5 (Requested by Ossy on #webkit). * UIProcess/API/qt/qquicknetworkreply_p.h: * UIProcess/API/qt/qquicknetworkrequest_p.h: * UIProcess/API/qt/qquickwebview.cpp: * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qwebiconimageprovider_p.h: * UIProcess/API/qt/qwebnavigationhistory.cpp: * UIProcess/API/qt/qwebnavigationhistory_p.h: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: * UIProcess/qt/QtDialogRunner.cpp: (QtDialogRunner::initForAlert): (QtDialogRunner::initForConfirm): (QtDialogRunner::initForPrompt): (QtDialogRunner::initForAuthentication): (QtDialogRunner::initForProxyAuthentication): (QtDialogRunner::initForCertificateVerification): (QtDialogRunner::initForFilePicker): (QtDialogRunner::initForDatabaseQuotaDialog): (QtDialogRunner::createDialog): * UIProcess/qt/QtFlickProvider.cpp: * UIProcess/qt/QtFlickProvider.h: (QtFlickProvider): * UIProcess/qt/WebPopupMenuProxyQt.cpp: (WebKit::WebPopupMenuProxyQt::createItem): (WebKit::WebPopupMenuProxyQt::createContext): 2012-04-02 Hayato Ito [Shadow DOM] Introduce ComposedShadowTreeWalker as a successor of ReifiedTreeTraversal APIs https://bugs.webkit.org/show_bug.cgi?id=82009 Reviewed by Dimitri Glazkov. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-04-01 Jon Lee Rename notification properties and functions https://bugs.webkit.org/show_bug.cgi?id=80482 Reviewed by Kentaro Hara. Rename APIs to use tag. * UIProcess/API/C/WKNotification.cpp: (WKNotificationCopyTag): * UIProcess/API/C/WKNotification.h: * UIProcess/Notifications/WebNotification.cpp: (WebKit::WebNotification::WebNotification): * UIProcess/Notifications/WebNotification.h: (WebKit::WebNotification::create): (WebKit::WebNotification::tag): (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: * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::show): 2012-03-31 Timothy Hatcher Prevent opening external URLs in the Web Inspector's WebView. All URLs not handled by the Inspector's JavaScript are now opened in the inspected WebView. https://webkit.org/b/82812 rdar://problem/9488558 Reviewed by Joseph Pecoraro. * UIProcess/WebInspectorProxy.cpp: (WebKit::decidePolicyForNavigationAction): Added. Only allow non-main frame and the inspector page. All other URLs will be opened in the inspected page. (WebKit::WebInspectorProxy::createInspectorPage): Set the policy client and use decidePolicyForNavigationAction. * UIProcess/WebInspectorProxy.h: Made inspectorPageURL and inspectorBaseURL public for decidePolicyForNavigationAction. 2012-03-31 Anders Carlsson 32-bit plug-ins need to opt into magnified mode https://bugs.webkit.org/show_bug.cgi?id=82837 Reviewed by Simon Fraser. * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): 2012-03-30 Timothy Hatcher Stop creating the Web Inspector's NSWindow when detaching on close. This fixes a UI process crash that would happen when detaching because of a Web Process crash. https://webkit.org/b/82820 rdar://problem/11085467 Reviewed by Dan Bernstein. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformDetach): Moved the creation and showing code to the end and added an early return if we are not visible in the middle. 2012-03-30 Emil A Eklund Change WebKit/WebKit2 platform code to use pixel snapped values https://bugs.webkit.org/show_bug.cgi?id=82549 Change WebKit and WebKit2 platform code to use rounded locations and pixel snapped rects and sizes. This largely avoids having to expose the fractional layout types to the platform code. Reviewed by Eric Seidel. * Shared/WebRenderObject.cpp: (WebKit::WebRenderObject::WebRenderObject): * UIProcess/win/WebPopupMenuProxyWin.cpp: (WebKit::WebPopupMenuProxyWin::calculatePositionAndSize): * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::InjectedBundleNodeHandle::renderRect): * WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (WebKit::BuiltInPDFView::invalidateScrollbarRect): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::characterIndexForPoint): 2012-03-30 Anders Carlsson Fix Lion build. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): 2012-03-30 Mark Pilgrim GEOLOCATION should be implemented as Page Supplement https://bugs.webkit.org/show_bug.cgi?id=82228 Reviewed by Adam Barth. Geolocation is now a Supplement in Page so the interface has changed for setting up the page's geolocation client initially and accessing the controller later. * WebProcess/Geolocation/WebGeolocationManager.cpp: (WebKit::WebGeolocationManager::didChangePosition): (WebKit::WebGeolocationManager::didFailToDeterminePosition): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setGeoLocationPermission): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): 2012-03-30 Anders Carlsson Show a scrolling indicator light when compositing borders are turned on https://bugs.webkit.org/show_bug.cgi?id=82758 Reviewed by Andreas Kling. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::updatePreferences): Add a hook for letting drawing area subclasses know when preferences change. * WebProcess/WebPage/WebPage.cpp: Call DrawingArea::updatePreferences. (WebKit::WebPage::updatePreferences): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Call updatePreferences. (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): If compositing borders are enabled, create a debug root layer and tell the scrolling tree about it. (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): If we have a debug root layer, make sure it's in front. 2012-03-30 Allan Sandfeld Jensen [Qt] Find zoomable area using area-based hit-testing https://bugs.webkit.org/show_bug.cgi?id=82609 Reviewed by Kenneth Rohde Christiansen. Add area to findZoomableAreaForPoint and use new TOUCH_ADJUSTMENT code-path to find the best zoomable area. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::findZoomableAreaForPoint): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handleDoubleTapEvent): * WebProcess/WebPage/WebPage.cpp: (WebKit): (WebKit::WebPage::findZoomableAreaForPoint): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: 2012-03-30 Keishi Hattori Change ENABLE_INPUT_COLOR to ENABLE_INPUT_TYPE_COLOR and enable it for chromium https://bugs.webkit.org/show_bug.cgi?id=80972 Reviewed by Kent Tamura. * Configurations/FeatureDefines.xcconfig: 2012-03-29 Ádám Kallai [Qt] Build fix by renameing QtDeclarative to QtQml in header calls. https://bugs.webkit.org/show_bug.cgi?id=82195 Reviewed by Simon Hausmann. * UIProcess/API/qt/qquicknetworkreply_p.h: * UIProcess/API/qt/qquicknetworkrequest_p.h: * UIProcess/API/qt/qquickwebview.cpp: * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qwebiconimageprovider_p.h: * UIProcess/API/qt/qwebnavigationhistory.cpp: * UIProcess/API/qt/qwebnavigationhistory_p.h: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: * UIProcess/qt/QtDialogRunner.cpp: (QtDialogRunner::initForAlert): (QtDialogRunner::initForConfirm): (QtDialogRunner::initForPrompt): (QtDialogRunner::initForAuthentication): (QtDialogRunner::initForProxyAuthentication): (QtDialogRunner::initForCertificateVerification): (QtDialogRunner::initForFilePicker): (QtDialogRunner::initForDatabaseQuotaDialog): (QtDialogRunner::createDialog): * UIProcess/qt/QtFlickProvider.cpp: * UIProcess/qt/QtFlickProvider.h: (QtFlickProvider): * UIProcess/qt/WebPopupMenuProxyQt.cpp: (WebKit::WebPopupMenuProxyQt::createItem): (WebKit::WebPopupMenuProxyQt::createContext): 2012-03-29 No'am Rosenthal [Qt][WK2] Direct composited image assignment doesn't work https://bugs.webkit.org/show_bug.cgi?id=82525 Reviewed by Kenneth Rohde Christiansen. We don't need to check whether the image or contentsRect are updated, since assignImageToLayer is a cheap operation after the LayerBackingStore refactor. * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::setLayerChildren): (WebKit::WebLayerTreeRenderer::setLayerState): (WebKit::WebLayerTreeRenderer::renderNextFrame): 2012-03-29 Sheriff Bot Unreviewed, rolling out r112553. http://trac.webkit.org/changeset/112553 https://bugs.webkit.org/show_bug.cgi?id=82638 It made all tests crash on Qt WK2 (Requested by Ossy_away on #webkit). * WebProcess/Geolocation/WebGeolocationManager.cpp: (WebKit::WebGeolocationManager::didChangePosition): (WebKit::WebGeolocationManager::didFailToDeterminePosition): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setGeoLocationPermission): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): 2012-03-29 Caio Marcelo de Oliveira Filho HashMap<>::add should return a more descriptive object https://bugs.webkit.org/show_bug.cgi?id=71063 Reviewed by Ryosuke Niwa. Update code to use AddResult instead of a pair. * Platform/CoreIPC/ArgumentCoders.h: * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::SyncMessageState::getOrCreate): * Shared/MutableDictionary.cpp: (WebKit::MutableDictionary::add): (WebKit::MutableDictionary::set): * Shared/UserMessageCoders.h: (WebKit::UserMessageDecoder::baseDecode): * Shared/mac/CommandLineMac.cpp: (WebKit::CommandLine::parse): * UIProcess/API/mac/WKPrintingView.mm: (pageDidDrawToPDF): * UIProcess/API/mac/WKView.mm: (-[WKView validateUserInterfaceItem:]): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::addBackForwardItem): * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::InjectedBundleNodeHandle::getOrCreate): * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: (WebKit::InjectedBundleRangeHandle::getOrCreate): * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::show): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::createWebPage): (WebKit::WebProcess::webPageGroup): 2012-03-29 Mark Pilgrim GEOLOCATION should be implemented as Page Supplement https://bugs.webkit.org/show_bug.cgi?id=82228 Reviewed by Adam Barth. Geolocation is now a Supplement in Page so the interface has changed for setting up the page's geolocation client initially and accessing the controller later. * WebProcess/Geolocation/WebGeolocationManager.cpp: (WebKit::WebGeolocationManager::didChangePosition): (WebKit::WebGeolocationManager::didFailToDeterminePosition): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setGeoLocationPermission): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): 2012-03-28 Anders Carlsson Fix a crash and an assertion when recovering from a web process crash https://bugs.webkit.org/show_bug.cgi?id=82559 Reviewed by Mark Rowe. * UIProcess/API/mac/WKView.mm: (-[WKView _processDidCrash]): If we're currently in accelerated compositing mode, exit. (-[WKView updateLayer]): Guard against a null drawing area. 2012-03-28 Nate Chapin Remove dispatchDidLoadMainResource callback, since no port implements it. https://bugs.webkit.org/show_bug.cgi?id=82539 Reviewed by Alexey Proskuryakov. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 2012-03-28 Anders Carlsson Massive lag opening a link in a new background tab https://bugs.webkit.org/show_bug.cgi?id=82542 Reviewed by Sam Weinig. Defer waiting for the web process to update the page size until we're actually going to display the layer. This matches what we do in the non-tiled code path. * UIProcess/API/mac/WKView.mm: (-[WKView setFrameSize:]): (-[WKView updateLayer]): * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate): * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: (TiledCoreAnimationDrawingAreaProxy): * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::sizeDidChange): (WebKit): (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate): 2012-03-28 Anders Carlsson REGRESSION (r109826): Can't type into Flash text fields https://bugs.webkit.org/show_bug.cgi?id=82488 Reviewed by Sam Weinig. This was caused by the fix in r109826. Revert that change and fix the original bug by notifying the UI process that the plug-in lost focus when it's destroyed. This will correctly reset the text input state (merely setting the text input state to PluginComplexTextInputDisabled doesn't reset the state correctly). * UIProcess/API/mac/WKView.mm: (-[WKView _setPluginComplexTextInputState:]): (-[WKView _handlePluginComplexTextInputKeyDown:]): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::~PluginView): 2012-03-28 Balazs Kelemen [Qt] Fix QWARN in test_loadIgnoreEmptyUrl API test. Rubber-stamped by Csaba Osztrogonác. * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: There is no load() API of the view, we have to use the url property. 2012-03-27 YoungTaeck Song [EFL][WK2] Add RunLoopEfl and WorkQueueEfl https://bugs.webkit.org/show_bug.cgi?id=62777 Reviewed by Hajime Morita. Add initial version WorkQueueEfl for WebKit2 Efl. * Platform/CoreIPC/Connection.h: * Platform/CoreIPC/unix/ConnectionUnix.cpp: (CoreIPC::Connection::platformInvalidate): (CoreIPC::Connection::open): * Platform/PlatformProcessIdentifier.h: (WebKit): * Platform/WorkQueue.h: (WorkQueue): * Platform/efl/WorkQueueEfl.cpp: Added. (TimerWorkItem): (TimerWorkItem::TimerWorkItem): (TimerWorkItem::~TimerWorkItem): (TimerWorkItem::function): (TimerWorkItem::queue): (TimerWorkItem::timerID): (WorkQueue::platformInitialize): (WorkQueue::platformInvalidate): (WorkQueue::performWork): (WorkQueue::performFdWork): (WorkQueue::sendMessageToThread): (WorkQueue::workQueueThread): (WorkQueue::registerSocketEventHandler): (WorkQueue::unregisterSocketEventHandler): (WorkQueue::dispatch): (WorkQueue::timerFired): (WorkQueue::dispatchAfterDelay): * PlatformEfl.cmake: 2012-03-27 Anders Carlsson Plug-ins using the Core Animation drawing model should work when hosting the layer tree in the window server https://bugs.webkit.org/show_bug.cgi?id=82387 Reviewed by Sam Weinig. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::PluginControllerProxy): (WebKit::PluginControllerProxy::initialize): Remove m_pluginCreationParameters; it was used by the old NPRuntime short-circuit code. Make platformInitialize take creation parameters. * PluginProcess/PluginControllerProxy.messages.in: Add SetLayerHostingMode message. * PluginProcess/gtk/PluginControllerProxyGtk.cpp: (WebKit::PluginControllerProxy::platformInitialize): Make platformInitialize take creation parameters. * PluginProcess/mac/PluginControllerProxyMac.mm: (WebKit::PluginControllerProxy::platformInitialize): Call updateLayerHostingContext. (WebKit::PluginControllerProxy::setLayerHostingMode): Call updateLayerHostingContext and send back the new context ID. (WebKit::PluginControllerProxy::updateLayerHostingContext): Create a new LayerHostingContext given the layer hosting mode. * PluginProcess/qt/PluginControllerProxyQt.cpp: (WebKit::PluginControllerProxy::platformInitialize): Make platformInitialize take creation parameters. * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::setLayerHostingMode): Add stub. * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: (WebKit::makeRenderLayer): Add helper function for creating a new render layer. (WebKit::PluginProxy::pluginLayer): Call makeRenderLayer. (WebKit::PluginProxy::setLayerHostingMode): Send a message to the plug-in process. (WebKit::PluginProxy::setLayerHostingContextID): Update the context ID and make a new render layer. * WebProcess/Plugins/PDF/BuiltInPDFView.cpp: (WebKit::BuiltInPDFView::setLayerHostingMode): Add stub. * WebProcess/Plugins/PDF/BuiltInPDFView.h: * WebProcess/Plugins/Plugin.cpp: (WebKit::Plugin::Parameters::encode): (WebKit::Plugin::Parameters::decode): * WebProcess/Plugins/Plugin.h: Add the layer hosting mode as a parameter. Add a new setLayerHostingMode pure virtual member function. * WebProcess/Plugins/PluginProxy.messages.in: Add a SetLayerHostingContextID message. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::setLayerHostingMode): Call down to the plug-in. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createPlugin): Set the layer hosting mode of the page. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Initialize m_layerHostingMode to false. * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::layerHostingMode): Add m_layerHostingMode and a getter. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode): Call WebPage::setLayerHostingMode. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::setLayerHostingMode): Tell all plug-ins that the layer hosting mode changed. 2012-03-27 Timothy Hatcher Make WebKit properly load a staged framework when soft linking. https://webkit.org/b/82371 rdar://problem/11125989 Reviewed by Dan Bernstein. * UIProcess/mac/WebInspectorProxyMac.mm: Use SOFT_LINK_STAGED_FRAMEWORK_OPTIONAL to properly load the WebInspector framework. * WebProcess/WebPage/mac/WebInspectorMac.mm: Ditto. 2012-03-27 Anders Carlsson Don't update the layer hosting state unless the WKView is added to a window https://bugs.webkit.org/show_bug.cgi?id=82359 Reviewed by Sam Weinig. This avoids thrashing the layer hosting state when switching tabs. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::viewStateDidChange): 2012-03-27 Carlos Garcia Campos Implement WebFrameNetworkingContext for soup in WebKit2 [SOUP] Implement WebFrameNetworkingContext for soup in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=82081 Reviewed by Martin Robinson. * GNUmakefile.am: Add new files to compilation * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp: Copied from Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h. (WebKit::WebFrameNetworkingContext::soupSession): Return the default SoupSession. * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h: Renamed from Source/WebKit2/WebProcess/WebCoreSupport/gtk/WebFrameNetworkingContext.h. (WebKit): (WebFrameNetworkingContext): (WebKit::WebFrameNetworkingContext::create): Create a new WebFrameNetworkingContext(). (WebKit::WebFrameNetworkingContext::WebFrameNetworkingContext): 2012-03-27 Yael Aharon [Qt][WK2] Merge setVisibleContentsRect with setFixedVisibleContentRect https://bugs.webkit.org/show_bug.cgi?id=82289 Reviewed by Kenneth Rohde Christiansen. As we scroll, we constantly send 2 messages. Those 2 messages can be merged into one. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::_q_contentViewportChanged): * UIProcess/WebPageProxy.cpp: (WebKit): * UIProcess/WebPageProxy.h: (WebPageProxy): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::setVisibleContentsRect): 2012-03-27 Carlos Garcia Campos [SOUP] Implement missing methods in CookieJarSoup https://bugs.webkit.org/show_bug.cgi?id=82082 Reviewed by Martin Robinson. * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp: (WebKit::WebCookieManager::platformSetHTTPCookieAcceptPolicy): Use soupCookieJar() instead of defaultCookieJar(). (WebKit::WebCookieManager::platformGetHTTPCookieAcceptPolicy): Ditto. 2012-03-27 Carlos Garcia Campos [GTK] Add method webkit_web_resource_get_data() to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=79667 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitWebResource.cpp: (webkitWebResourceCreate): Add isMainResource parameter indication whether the resource is the main one of the frame. (resourceDataCallback): C API callback called when resource data is available. (webkit_web_resource_get_data): Asynchronously get the raw data of the resource. (webkit_web_resource_get_data_finish): Finish asynchronous operation started by webkit_web_resource_get_data(). * UIProcess/API/gtk/WebKitWebResource.h: * UIProcess/API/gtk/WebKitWebResourcePrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewResourceLoadStarted): Pass isMainResource parameter to webkitWebResourceCreate(). * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/TestResources.cpp: (testWebResourceGetData): (serverCallback): (beforeAll): 2012-03-27 Carlos Garcia Campos [GTK] Add resources API to WebKit2 GTK+ https://bugs.webkit.org/show_bug.cgi?id=79477 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitResourceLoadClient.cpp: Added. (didInitiateLoadForResource): Call webkitWebViewResourceLoadStarted() so that view will create the resource and emit WebKitWebView::resource-load-started. (didSendRequestForResource): Call webkitWebResourceSentRequest() with the given request and response. (didReceiveResponseForResource): Call webkitWebResourceSetResponse() with the given response. (didReceiveContentLengthForResource): Call webkitWebResourceNotifyProgress(). (didFinishLoadForResource): Call webkitWebResourceFinished(). (didFailLoadForResource): Create a GError for the given WKError and call webkitWebResourceFailed(). (attachResourceLoadClientToView): Add callbacks for the WKPageResourceLoadClient. * UIProcess/API/gtk/WebKitResourceLoadClient.h: Added. * UIProcess/API/gtk/WebKitWebResource.cpp: Added. (webkitWebResourceGetProperty): (webkit_web_resource_init): (webkit_web_resource_class_init): (webkitWebResourceUpdateURI): Update the active URI every time a new request is sent to the server. (webkitWebResourceCreate): Create a WebResource for the given frame. (webkitWebResourceSentRequest): Update uri and emit WebKitWebResource::sent-request. (webkitWebResourceSetResponse): Set the response property. (webkitWebResourceNotifyProgress): Emit WebKitWebResource::received-data. (webkitWebResourceFinished): Emit WebKitWebResource::finished. (webkitWebResourceFailed): Emit WebKitWebResource::failed and then WebKitWebResource::finished. (webkit_web_resource_get_uri): Return the currentr active URI. (webkit_web_resource_get_response): Return the response received from the server. * UIProcess/API/gtk/WebKitWebResource.h: Added. * UIProcess/API/gtk/WebKitWebResourcePrivate.h: Added. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewConstructed): Attach the resource load client to the view. (webkit_web_view_class_init): Add WebKitWebView::resource-load-started signal. (webkitWebViewLoadChanged): Clear loading resources map when a new load starts and loaded resources map when the new load has been committed. (webkitWebViewResourceLoadStarted): Create a resource for the given identifier, add it to the loading resources map and emit WebKitWebView::resource-load-started signal. (webkitWebViewGetLoadingWebResource): Return the resource that is being loaded corresponding to the given identifier. (webkitWebViewRemoveLoadingWebResource): Remove the resouurce corresponfing to the given identifier from the loading resources map. (webkitWebViewResourceLoadFinished): Move the resource from the loading resources map to the loaded resources map. (webkit_web_view_get_main_resource): Return the main resource. (webkit_web_view_get_subresources): Return the list of subresources. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitWebResource. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_web_resource_get_type. * UIProcess/API/gtk/tests/GNUmakefile.am: Add new test for resources. * UIProcess/API/gtk/tests/TestDownloads.cpp: (testDownloadLocalFile): Use getWebKit1TestResoucesDir() from Test. (testDownloadLocalFileError): Ditto. (serverCallback): Ditto. * UIProcess/API/gtk/tests/TestMain.h: (Test::getWebKit1TestResoucesDir): Moed from TestDownloads so that it can be used by other tests. (Test): Add information about leaked objects. * UIProcess/API/gtk/tests/TestResources.cpp: Added. (testWebViewResources): (testWebResourceLoading): (testWebResourceResponse): (testWebResourceActiveURI): (addCacheHTTPHeadersToResponse): (serverCallback): (beforeAll): (afterAll): * UIProcess/API/gtk/webkit2.h: Include WebKitWebResource.h * UIProcess/API/gtk/webkit2marshal.list: 2012-03-26 Pratik Solanki Fix typo in method name - WebCore::miminumValueForLength should be WebCore::minimumValueForLength https://bugs.webkit.org/show_bug.cgi?id=82254 Reviewed by Benjamin Poulain. * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: (WebKit::WebPopupMenu::setUpPlatformData): 2012-03-26 Dinu Jacob [Qt][WK2] Support multi-file upload https://bugs.webkit.org/show_bug.cgi?id=81589 Reviewed by Simon Hausmann. Added 'allowMutipleFiles' property to filePicker context property to indicate whether to allow multiple file selections. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::chooseFiles): * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_multiFileUpload.qml: Added. * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_singleFileUpload.qml: * UIProcess/API/qt/tests/qmltests/common/multifileupload.html: Added. * UIProcess/API/qt/tests/qmltests/common/singlefileupload.html: * UIProcess/API/qt/tests/qmltests/common/titleupdate.js: Added. (updateTitle): * UIProcess/qt/QtDialogRunner.cpp: (FilePickerContextObject): (FilePickerContextObject::FilePickerContextObject): (FilePickerContextObject::allowMultipleFiles): (FilePickerContextObject::accept): (QtDialogRunner::initForFilePicker): * UIProcess/qt/QtDialogRunner.h: (QtDialogRunner): 2012-03-26 Adam Barth FrameLoader::shouldAllowNavigation uses Frame for context rather than Document https://bugs.webkit.org/show_bug.cgi?id=81020 Reviewed by Eric Seidel. Update call site to new function name. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm): 2012-03-26 Anders Carlsson Never remove root compositing layers in the web process https://bugs.webkit.org/show_bug.cgi?id=82255 Reviewed by Sam Weinig. Since we never leave accelerated compositing mode when using tiled drawing, we should never remove root compositing layers in the web process. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): 2012-03-26 Rafael Brandao [Qt][WK2] default families are not set in QWebPreferences https://bugs.webkit.org/show_bug.cgi?id=81933 This is a build-fix after r112116. Reviewed by Tor Arne Vestbø. * UIProcess/API/qt/qwebpreferences_p_p.h: 2012-03-26 Pierre Rossi [Qt][WK2] default families are not set in QWebPreferences https://bugs.webkit.org/show_bug.cgi?id=81933 This would result in an attempt to create FontPlatformData with the -webkit- prefixed family name. Logic adapted from QWebSettings. Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/qwebpreferences.cpp: (QWebPreferencesPrivate::createPreferences): (QWebPreferencesPrivate::initFontDefaults): * UIProcess/API/qt/qwebpreferences_p_p.h: 2012-03-26 Dinu Jacob [Qt WK2] Disable/enable mouse events when displaying dialogs only for desktop view https://bugs.webkit.org/show_bug.cgi?id=80542 Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewLegacyPrivate::enableMouseEvents): (QQuickWebViewLegacyPrivate::disableMouseEvents): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate::enableMouseEvents): (QQuickWebViewPrivate::disableMouseEvents): (QQuickWebViewLegacyPrivate): 2012-03-26 Jocelyn Turcotte [Qt] Make sure that purged directly composited images are re-created before a layer's sync. https://bugs.webkit.org/show_bug.cgi?id=81771 Reviewed by Noam Rosenthal. This fixes a regression in tst_qquickwebview introduced by r111567. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly): (WebCore::WebGraphicsLayer::updateContentBuffers): 2012-03-26 Simon Hausmann [WK2][Qt] Fix compilation without QtWidgets https://bugs.webkit.org/show_bug.cgi?id=79458 Reviewed by Tor Arne Vestbø. * Shared/qt/WebEventFactoryQt.cpp: (WebKit::WebEventFactory::createWebWheelEvent): Replace use of QApplication::wheelScrollLines() with the constant that is actually used and usually not changed anyway. * Target.pri: Remove widgets from Qt variable. * UIProcess/qt/QtWebPageEventHandler.cpp: Remove unecessary include. * WebProcess.pro: Use widgets for the process (for the time being). * WebProcess/qt/WebProcessMainQt.cpp: Delegate QApplication creation to the caller. (WebKit::WebProcessMainQt): * qt/MainQt.cpp: Create QApplication here. (WebKit): (main): 2012-03-26 Andras Becsi Be more careful with git gui usage Unreviewed typo fix. * UIProcess/qt/QtViewportInteractionEngine.cpp: Remove additional line committed by accident. (WebKit::QtViewportInteractionEngine::pinchGestureEnded): 2012-03-26 Allan Sandfeld Jensen [Qt] Taps are sometimes not highlighted. https://bugs.webkit.org/show_bug.cgi?id=82188 Reviewed by Kenneth Rohde Christiansen. Highlight any focusable parent element, or if none is found at least the element returned by bestClickableNodeForTouchPoint. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::highlightPotentialActivation): 2012-03-26 Sheriff Bot Unreviewed, rolling out r111993. http://trac.webkit.org/changeset/111993 https://bugs.webkit.org/show_bug.cgi?id=82184 It broke layout and API tests and made WTR crash (Requested by Ossy on #webkit). * UIProcess/qt/QtPageClient.cpp: (QtPageClient::isViewWindowActive): 2012-03-25 Hayato Ito [Shadow DOM] Add Reified DOM Tree traversal internal APIs. https://bugs.webkit.org/show_bug.cgi?id=79197 Reviewed by Dimitri Glazkov. Add internal APIs which can be used to traverse Reified DOM tree, which is a result of node distribution algorithm explained in Shadow DOM spec. https://dvcs.w3.org/hg/webcomponents/raw-file/tip/spec/shadow/index.html Every public functions defined in ReifiedTreeTraversal are static functions and are named in a similar way to ones defined in WebCore::Node class. The only difference is that ReifiedTreeTraversal APIs consider shadow hosts and also traverse nodes is Shadow DOM subtrees, crossing shadow's upper and lower boundary transparently. There is no actual client which uses these APIs. Follow-up patches for FocusNavigation and EventDispatcher will use the APIs so that they can traverse node in reified tree order. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-03-25 Alexander Færøy Unreviewed build fix for QtWebKit on Mac OS X. * UIProcess/API/qt/tests/bytearraytestdata.cpp: (ByteArrayTestData::~ByteArrayTestData): * UIProcess/API/qt/tests/bytearraytestdata.h: 2012-03-24 Jesus Sanchez-Palencia [Qt][WK2] Implement PageClient::isViewWindowActive() https://bugs.webkit.org/show_bug.cgi?id=81143 Reviewed by Kenneth Rohde Christiansen. This patch implements PageClient::isViewWindowActive() now that QQuickCanvas::isActive() is available (from QWindow). * UIProcess/qt/QtPageClient.cpp: (QtPageClient::isViewWindowActive): 2012-03-23 Alexey Proskuryakov [Mac] No need for platform-specific ENABLE_BLOB values https://bugs.webkit.org/show_bug.cgi?id=82102 Reviewed by David Kilzer. * Configurations/FeatureDefines.xcconfig: 2012-03-23 Sheriff Bot Unreviewed, rolling out r108851. http://trac.webkit.org/changeset/108851 https://bugs.webkit.org/show_bug.cgi?id=82098 "Revert the addition of unnecessary, deprecated functions in WKPreferences.h" (Requested by estes on #webkit). * UIProcess/API/C/WKPreferences.cpp: * UIProcess/API/C/WKPreferences.h: 2012-03-23 Brent Fulgham [WinCairo] Unreviewed build fix. * win/WebKit2CFLite.def: Add missing export symbols so that other tools can link properly. 2012-03-23 Dean Jackson Disable CSS_SHADERS in Apple builds https://bugs.webkit.org/show_bug.cgi?id=81996 Reviewed by Simon Fraser. Remove ENABLE_CSS_SHADERS from FeatureDefines. It's now in Platform.h. * Configurations/FeatureDefines.xcconfig: 2012-03-23 Dave Michael Relanding(r111754): HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called https://bugs.webkit.org/show_bug.cgi?id=80428 Reviewed by Eric Seidel and Ryosuke Niwa. * win/WebKit2.def: Export a symbol for InspectorCounters::counterValue * win/WebKit2CFLite.def: Export a symbol for InspectorCounters::counterValue 2012-03-23 Sheriff Bot Unreviewed, rolling out r111855. http://trac.webkit.org/changeset/111855 https://bugs.webkit.org/show_bug.cgi?id=82053 It broke 30+ tests (Requested by Ossy on #webkit). * UIProcess/qt/QtPageClient.cpp: (QtPageClient::isViewWindowActive): 2012-03-23 Jesus Sanchez-Palencia [Qt][WK2] Implement PageClient::isViewWindowActive() https://bugs.webkit.org/show_bug.cgi?id=81143 Reviewed by Kenneth Rohde Christiansen. This patch implements PageClient::isViewWindowActive() now that QQuickCanvas::isActive() is available (from QWindow). * UIProcess/qt/QtPageClient.cpp: (QtPageClient::isViewWindowActive): 2012-03-23 Andras Becsi [Qt][WK2] Disable the flickable when pinching. Reviewed by Kenneth Rohde Christiansen. Set the interactivity of the internal flickable to false when pinching so that it does not react to mouse events which might break pinch zoom. This is a temporal workaround and needed until the event propagation in QtQuick is fixed. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): (WebKit::QtViewportInteractionEngine::pinchGestureEnded): 2012-03-23 Ryosuke Niwa REGRESSION(r111754): plugins/reloadplugins-and-pages.html fails on all platforms https://bugs.webkit.org/show_bug.cgi?id=82035 * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-03-22 Anders Carlsson Remove the Flash NPRuntime short-circuit hacks https://bugs.webkit.org/show_bug.cgi?id=81997 Reviewed by Sam Weinig. This code was added to help speed up Flash plug-in instantiation by reducing the number of synchronous API calls from the plug-in process to the web process during instantiation. However, there was no real indication that this actually improved performance. Furthermore, it seems to have introduced crashers when misbehaving plug-ins would make NPRuntime calls after a plug-in had been destroyed. Since Flash is now 64-bit like the rest of WebKit launch time has improved since we don't have to bring in all of the 32-bit system frameworks, so the time has come to rip out this egregious hack. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::evaluate): * PluginProcess/PluginControllerProxy.h: (PluginControllerProxy): * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::determineQuirks): * Shared/Plugins/PluginQuirks.h: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_Invoke): * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: * WebProcess/Plugins/Netscape/NetscapePlugin.h: (NetscapePlugin): * WebProcess/Plugins/Plugin.cpp: (WebKit::Plugin::Parameters::encode): (WebKit::Plugin::Parameters::decode): * WebProcess/Plugins/Plugin.h: (Parameters): * WebProcess/Plugins/PluginController.h: (PluginController): * WebProcess/Plugins/PluginView.cpp: * WebProcess/Plugins/PluginView.h: (PluginView): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createPlugin): 2012-03-22 Raphael Kubo da Costa [CMake] Unreviewed build fix after r111778. * CMakeLists.txt: Replace ${JAVASCRIPTCORE_DIR}/wtf includes with ${WTF_DIR}/wtf ones. 2012-03-22 Csaba Osztrogonác Actually move WTF files to their new home https://bugs.webkit.org/show_bug.cgi?id=81844 [Qt] Unreviewed buildfix after r111778. * UIProcess/API/qt/qquicknetworkrequest_p.h: * WebKit2.pri: 2012-03-22 Dave Michael HTMLPluginElement is not destroyed on reload or navigation if getNPObject is called https://bugs.webkit.org/show_bug.cgi?id=80428 Reviewed by Eric Seidel. Test: plugins/netscape-dom-access-and-reload.html * win/WebKit2.def: Export a symbol for InspectorCounters::counterValue * win/WebKit2CFLite.def: Export a symbol for InspectorCounters::counterValue 2012-03-22 Pierre Rossi Revert back the device DPI to 160. This corresponds to a device pixel ratio of 1, which is nicer on the eye in many cases. Rubber-stamped by Kenneth Rohde Christiansen. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::computeViewportConstraints): 2012-03-22 Alexander Færøy [Qt][WK2] Remember to initialize databaseQuotaDialog https://bugs.webkit.org/show_bug.cgi?id=81942 Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): 2012-03-22 Alexander Færøy [Qt][WK2] Pass Origin information to the DatabaseQuotaDialogContextObject https://bugs.webkit.org/show_bug.cgi?id=81910 Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::exceededDatabaseQuota): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/qt/QtDialogRunner.cpp: (DatabaseQuotaDialogContextObject): (DatabaseQuotaDialogContextObject::DatabaseQuotaDialogContextObject): (DatabaseQuotaDialogContextObject::securityOrigin): (QtDialogRunner::initForDatabaseQuotaDialog): * UIProcess/qt/QtDialogRunner.h: (QtDialogRunner): * UIProcess/qt/QtWebPageUIClient.cpp: (QtWebPageUIClient::exceededDatabaseQuota): * UIProcess/qt/QtWebPageUIClient.h: 2012-03-22 Jocelyn Turcotte [Qt] Don't resume the suspended page if the user is continuously flicking. https://bugs.webkit.org/show_bug.cgi?id=81895 Reviewed by Kenneth Rohde Christiansen. Create an additional suspend deferrer between TouchBegin and TouchEnd to relay with the one kept while the flick animation is running. This allows the page to be suspended when a pan gesture starts and stay that way until the last flick animation ends. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::touchBegin): (WebKit): (WebKit::QtViewportInteractionEngine::touchEnd): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::doneWithTouchEvent): 2012-03-22 Carlos Garcia Campos [GTK] Use the angle-bracket form to include wtf headers https://bugs.webkit.org/show_bug.cgi?id=81884 Reviewed by Eric Seidel. Use #include instead of #include . * UIProcess/API/gtk/tests/TestMain.h: * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: 2012-03-22 No'am Rosenthal [Qt][WK2] The background appears to have one extra pixel from the contents https://bugs.webkit.org/show_bug.cgi?id=81830 Reviewed by Kenneth Rohde Christiansen. The clip-polygon from the scenegraph uses floats, not integers. This could cause 1-offset clipping problems in some cases. * UIProcess/qt/QtWebPageSGNode.cpp: (WebKit::ContentsSGNode::clipRect): 2012-03-21 Alexander Færøy [Qt][WK2] Add QML API for handling database quotas https://bugs.webkit.org/show_bug.cgi?id=81827 Reviewed by Simon Hausmann. Patch by Pierre Rossi and Alexander Færøy. This patch adds a QML API for handling database quotas. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::exceededDatabaseQuota): (QQuickWebViewExperimental::databaseQuotaDialog): (QQuickWebViewExperimental::setDatabaseQuotaDialog): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/qt/QtDialogRunner.cpp: (DatabaseQuotaDialogContextObject): (DatabaseQuotaDialogContextObject::DatabaseQuotaDialogContextObject): (DatabaseQuotaDialogContextObject::databaseName): (DatabaseQuotaDialogContextObject::displayName): (DatabaseQuotaDialogContextObject::currentQuota): (DatabaseQuotaDialogContextObject::currentOriginUsage): (DatabaseQuotaDialogContextObject::currentDatabaseUsage): (DatabaseQuotaDialogContextObject::expectedUsage): (DatabaseQuotaDialogContextObject::accept): (DatabaseQuotaDialogContextObject::reject): (QtDialogRunner::initForDatabaseQuotaDialog): * UIProcess/qt/QtDialogRunner.h: (QtDialogRunner): (QtDialogRunner::databaseQuota): (QtDialogRunner::onDatabaseQuotaAccepted): * UIProcess/qt/QtWebPageUIClient.cpp: (QtWebPageUIClient::QtWebPageUIClient): (QtWebPageUIClient::exceededDatabaseQuota): * UIProcess/qt/QtWebPageUIClient.h: * UIProcess/qt/WebContextQt.cpp: (WebKit::WebContext::platformDefaultDatabaseDirectory): 2012-03-21 Tim Horton Make use of CG rounded-rect primitives https://bugs.webkit.org/show_bug.cgi?id=79932 Reviewed by Simon Fraser. Portions of patch by Nikolas Zimmermann and Mustafizur Rahaman. Add wkCGPathAddRoundedRect. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2012-03-21 Jocelyn Turcotte [Qt] WebGraphicsLayer: Untie the layer updates and tile updates. https://bugs.webkit.org/show_bug.cgi?id=81771 Reviewed by Kenneth Rohde Christiansen. The DidRenderFrame message needs to be sent for every UpdateTileForLayer message, but this currently has to be triggered by m_shouldSyncFrame which is only set after sending a SyncCompositingLayerState message. This patch makes sure that tile updates won't trigger sending the whole layer info if it didn't change, and send the DidRenderFrame message directly. It also makes sure that the layer info is sent before any tile update so that the layer can be created on the UI process before any tile update is handled. * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::getBackingStore): * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly): (WebCore::WebGraphicsLayer::tiledBackingStorePaint): (WebCore::WebGraphicsLayer::createTile): (WebCore::WebGraphicsLayer::updateTile): (WebCore::WebGraphicsLayer::removeTile): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::createTile): (WebKit::LayerTreeHostQt::updateTile): (WebKit::LayerTreeHostQt::removeTile): 2012-03-21 Jocelyn Turcotte [Qt] Don't clip the contents rendering to the contents size. https://bugs.webkit.org/show_bug.cgi?id=81770 Reviewed by Kenneth Rohde Christiansen. The original bug was caused by the contents size updates having to go through the UI process before being applied on the TiledBackingStore of the non composited contents layer. With this bug being fixed, the clipping isn't necessary anymore. * UIProcess/qt/LayerBackingStore.cpp: (WebKit::LayerBackingStore::paintToTextureMapper): 2012-03-21 Jocelyn Turcotte [Qt] Apply tile removals at the same time as update buffer swaps. https://bugs.webkit.org/show_bug.cgi?id=81768 Reviewed by Kenneth Rohde Christiansen. When committing the scale, we have to remove old tiles once the tiles for the new scale are rendered. This should however wait until those tiles gets their buffer swapped (following the DidRenderFrame message) to make sure that there is no rendered gap between the removals and updates swap. This patch continues rendering the removed tiles until the DidRenderFrame message is received to discard the old contents and show the new contents at the same frame. * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::commitTileUpdates): (WebKit::WebLayerTreeRenderer::flushLayerChanges): * UIProcess/WebLayerTreeRenderer.h: (WebLayerTreeRenderer): * UIProcess/qt/LayerBackingStore.cpp: (WebKit::LayerBackingStore::removeTile): (WebKit::LayerBackingStore::commitTileUpdates): * UIProcess/qt/LayerBackingStore.h: (LayerBackingStore): 2012-03-21 Jocelyn Turcotte [Qt] Trigger scene graph repaints only for relevant layer updates. https://bugs.webkit.org/show_bug.cgi?id=81765 Reviewed by Kenneth Rohde Christiansen. Tile updates and removal shouldn't re-render the scene all by themselves since they need a buffer swap before having any effect on the framebuffer. * UIProcess/LayerTreeHostProxy.cpp: (WebKit::LayerTreeHostProxy::dispatchUpdate): (WebKit::LayerTreeHostProxy::deleteCompositingLayer): (WebKit::LayerTreeHostProxy::setRootCompositingLayer): (WebKit::LayerTreeHostProxy::didRenderFrame): 2012-03-21 Jocelyn Turcotte [Qt] Don't go through the UI process to update a layer's contents size. https://bugs.webkit.org/show_bug.cgi?id=81764 Reviewed by Kenneth Rohde Christiansen. It's happening when navigating pages that contents from the old page is still present on the tiles until the contents size is shrunk to cut it out. Since the contents size updates are asynchronous and go through the UI process, this could occasionally show some glitch frames. Even worse, the user could delay this update by starting to pan and keep his finger on the screen. This patch makes sure that changes to contents size are notifying the LayerTreeHost immediately when in fixed layout mode, and remove the loop through the UI process. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::setContentsSize): * UIProcess/API/qt/qquickwebpage_p_p.h: (QQuickWebPagePrivate): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::didRelaunchProcess): (QQuickWebViewLegacyPrivate::updateViewportSize): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::contentsSizeChanged): * WebProcess/WebPage/DrawingArea.h: (WebKit): (WebKit::DrawingArea::layerTreeHost): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::updateBackingStoreState): * WebProcess/WebPage/DrawingAreaImpl.h: (WebKit::DrawingAreaImpl::layerTreeHost): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::sizeDidChange): 2012-03-21 Kenneth Rohde Christiansen The activation highlight does not always hide https://bugs.webkit.org/show_bug.cgi?id=81767 Reviewed by Simon Hausmann. The zero point used for hiding potential activations should not be transformed. * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handlePotentialSingleTapEvent): 2012-03-21 Dinu Jacob [Qt][WK2] Item cannot be selected from select list in touch webview https://bugs.webkit.org/show_bug.cgi?id=81674 Reviewed by Simon Hausmann. Activate flag to prevent QQuickWebView from accepting touch event when select dialog is being displayed. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::execDialogRunner): (QQuickWebView::touchEvent): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate::setDialogActive): (QQuickWebViewPrivate): * UIProcess/qt/WebPopupMenuProxyQt.cpp: (WebKit::WebPopupMenuProxyQt::showPopupMenu): (WebKit::WebPopupMenuProxyQt::hidePopupMenu): 2012-03-21 Kenneth Rohde Christiansen [Qt] Remove the PostTransitionState https://bugs.webkit.org/show_bug.cgi?id=81751 Reviewed by Simon Hausmann. As we are handling content size change event etc from the WebProcess, that conflicts with the PostTransitionState handling and we therefore need to handle this slightly differently. Remove the code and make sure that we never resize the tiled area to something smaller than the layout viewport. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate): (QQuickWebViewFlickablePrivate::loadDidCommit): (QQuickWebViewFlickablePrivate::didFinishFirstNonEmptyLayout): (QQuickWebViewFlickablePrivate::didChangeViewportProperties): (QQuickWebViewFlickablePrivate::_q_resume): (QQuickWebViewFlickablePrivate::pageDidRequestScroll): (QQuickWebViewFlickablePrivate::didChangeContentsSize): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewFlickablePrivate): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::applyConstraints): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::contentsSizeChanged): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::resizeToContentsIfNeeded): 2012-03-21 Carlos Garcia Campos [GTK] Add webkit_web_view_run_javascript() to WebKit2 GTK+ https://bugs.webkit.org/show_bug.cgi?id=75543 Reviewed by Martin Robinson. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitError.cpp: (webkit_javascript_error_quark): Add new error domain for Javascript errors. * UIProcess/API/gtk/WebKitError.h: * UIProcess/API/gtk/WebKitJavascriptResult.cpp: Added. (webkitJavascriptResultCreate): Create a WebKitJavascriptResult for the given WKSerializedScriptValueRef. (webkit_javascript_result_ref): Increment reference count of WebKitJavascriptResult. (webkit_javascript_result_unref): Decrement reference count of WebKitJavascriptResult. (webkit_javascript_result_get_global_context): Get global javascript context of the result. (webkit_javascript_result_get_value): Get the JSValueRef of the result. * UIProcess/API/gtk/WebKitJavascriptResult.h: Added. * UIProcess/API/gtk/WebKitJavascriptResultPrivate.h: Added. * UIProcess/API/gtk/WebKitPrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewFinalize): Release the global javascript context. (webkit_web_view_get_javascript_global_context): Get or create the global javascript context. (webkitWebViewRunJavaScriptCallback): Callback called by C API when javascript execution finishes. (webkit_web_view_run_javascript): Asynchronously run a given javascript. (webkit_web_view_run_javascript_finish): Finish async operation started by webkit_web_view_run_javascript(). * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_javascript_result_get_type(). * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewRunJavaScript): (beforeAll): * UIProcess/API/gtk/tests/WebViewTest.cpp: (WebViewTest::WebViewTest): (WebViewTest::~WebViewTest): (runJavaScriptReadyCallback): (WebViewTest::runJavaScriptAndWaitUntilFinished): (jsValueToCString): (WebViewTest::javascriptResultToCString): (WebViewTest::javascriptResultToNumber): (WebViewTest::javascriptResultToBoolean): (WebViewTest::javascriptResultIsNull): (WebViewTest::javascriptResultIsUndefined): * UIProcess/API/gtk/tests/WebViewTest.h: * UIProcess/API/gtk/webkit2.h: 2012-03-20 Eric Seidel Move wtf/Platform.h from JavaScriptCore to Source/WTF/wtf https://bugs.webkit.org/show_bug.cgi?id=80911 Reviewed by Adam Barth. Update to not depend on "Foo.h" includes for WTF headers. * Shared/qt/QtNetworkReplyData.h: * Shared/qt/QtNetworkRequestData.cpp: * Shared/qt/QtNetworkRequestData.h: 2012-03-20 Anders Carlsson REGRESSION (r110780): Loading a PDF always makes the WKView layer backed https://bugs.webkit.org/show_bug.cgi?id=81734 Reviewed by Adele Peterson. * UIProcess/API/mac/WKView.mm: (-[WKView _setPageHasCustomRepresentation:]): Don't call -[NSView setWantsLayer:], the web process already takes care of entering and exiting accelerated compositing mode for us. 2012-03-20 Jon Lee Restrict access to notifications for unique origins and file URLs with no local file access https://bugs.webkit.org/show_bug.cgi?id=79704 Reviewed by Adam Barth. In the specific case where a file URL has restricted file access and is denied universal access, SecurityOrigin::canShowNotifications() returns Ask, since it is not considered a unique origin. The cached table of permissions held by the notification manager will typically not have an entry for the toString() representation of these file URLs, which is "null", since that can also cover unique origins, and it is possible that the client will want different permissions between the two types. It is reasonable, however, for there to be an entry for "file://", so we use toRawString() to do the lookup. * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::policyForOrigin): 2012-03-20 Alexey Proskuryakov Address review comment for WebProcess side, too. * WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): There is no need for path to be in static storage, setenv will copy the value. 2012-03-20 Alexey Proskuryakov Sandboxed PluginProcess should use private temporary and cache directories https://bugs.webkit.org/show_bug.cgi?id=81702 Reviewed by Anders Carlsson. * Platform/Module.h: * Platform/mac/ModuleMac.mm: (WebKit::Module::bundleIdentifier): Expose plug-in's bundle identifier. * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb.in: Some unerlated fixes to make networking functional on my testing platforms. These serveices are already allowed for WebProcess. * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: (readSandboxProfile): Unrelated fix - I've been made to rename the profile file, but didn't update where it's read from! (WKN_EnterSandbox): Add a suffix to user directories. 2012-03-20 Sheriff Bot Unreviewed, rolling out r111445 and r111446. http://trac.webkit.org/changeset/111445 http://trac.webkit.org/changeset/111446 https://bugs.webkit.org/show_bug.cgi?id=81708 It broke Qt and GTK build intentionally (Requested by Ossy on #webkit). * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::policyForOrigin): 2012-03-20 Jon Lee Restrict access to notifications for unique origins and file URLs with no local file access https://bugs.webkit.org/show_bug.cgi?id=79704 Reviewed by Adam Barth. In the specific case where a file URL has restricted file access and is denied universal access, SecurityOrigin::canShowNotifications() returns Ask, since it is not considered a unique origin. The cached table of permissions held by the notification manager will typically not have an entry for the toString() representation of these file URLs, which is "null", since that can also cover unique origins, and it is possible that the client will want different permissions between the two types. It is reasonable, however, for there to be an entry for "file://", so we use toRawString() to do the lookup. * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::policyForOrigin): 2012-03-20 Alexey Proskuryakov WebProcess should use private temporary and cache directories https://bugs.webkit.org/show_bug.cgi?id=80876 Reviewed by Sam Weinig. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: (WebProcessCreationParameters): * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): Always pass uiProcessBundleIdentifier to WebProcess on Mac, it's now used for more than CFURL sessions. * WebProcess/com.apple.WebProcess.sb.in: Limit old workaround to platforms that need it. * WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): Tell confstr to use a suffix on user directories. 2012-03-20 Anders Carlsson Graphic distortion effect when launching with empty page Safari after reset https://bugs.webkit.org/show_bug.cgi?id=81677 Reviewed by Sam Weinig. Don't set the redraw policy to never, since that was causing the WKView layer to never be updated. Instead, let AppKit decide which redraw policy to use. * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:contextRef:pageGroupRef:]): 2012-03-20 Gyuyoung Kim Convert hasSpellingMarker to use Internals interface. https://bugs.webkit.org/show_bug.cgi?id=81300 Reviewed by Ryosuke Niwa. * win/WebKit2.def: Export a symbol for hasSpellingMarker. 2012-03-20 Antaryami Pandia [GTK] [WK2] Add javascript clipboard functionality settings to WebKit2 GTK+ API. https://bugs.webkit.org/show_bug.cgi?id=80981 Reviewed by Martin Robinson. Add WebSettings to enable/disable javascript clipboard functionality. * UIProcess/API/gtk/WebKitSettings.cpp: (webKitSettingsSetProperty): (webKitSettingsGetProperty): (webkit_settings_class_init): (webkit_settings_get_javascript_can_access_clipboard): (webkit_settings_set_javascript_can_access_clipboard): * UIProcess/API/gtk/WebKitSettings.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: (testWebKitSettings): 2012-03-19 Adam Barth Remove support for "magic" iframe https://bugs.webkit.org/show_bug.cgi?id=81590 Reviewed by Eric Seidel. Remove FrameLoaderClient methods that no longer exist. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 2012-03-19 Gustavo Noronha Silva [GTK] libWebCore.la has become too big for make https://bugs.webkit.org/show_bug.cgi?id=81582 Unreviewed build fix. * GNUmakefile.am: link-in the new libWebCoreModules.la 2012-03-19 Sam Weinig Stop messing with the AppKit grow box on platforms that don't support it https://bugs.webkit.org/show_bug.cgi?id=81614 Reviewed by Dan Bernstein. * UIProcess/API/mac/WKView.mm: (-[WKView viewWillMoveToWindow:]): (-[WKView _didChangeScrollbarsForMainFrame]): Snow Leopard was the last Mac OS to need a grow box. 2012-03-19 Enrica Casucci WebKit2: create sandbox extensions for files that are dropped in an input control. https://bugs.webkit.org/show_bug.cgi?id=81153 Reviewed by Alexey Proskuryakov. Now the pasteboard access is performed only in the UI process, it is necessary to create sandbox extensions for each file that is dropped into an input type=file element. The extensions are created at the time the files are dropped and consumed immediately. * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Added template that takes 8 arguments. * Shared/SandboxExtension.h: (HandleArray): Added new class to handle an array of sandbox extension handles. (WebKit::SandboxExtension::HandleArray::HandleArray): (WebKit::SandboxExtension::HandleArray::~HandleArray): (WebKit::SandboxExtension::HandleArray::resize): (WebKit::SandboxExtension::HandleArray::operator[]): (WebKit::SandboxExtension::HandleArray::size): (WebKit::SandboxExtension::HandleArray::encode): (WebKit::SandboxExtension::HandleArray::decode): * Shared/mac/SandboxExtensionMac.mm: Added new class implementation. (WebKit::SandboxExtension::HandleArray::HandleArray): (WebKit::SandboxExtension::HandleArray::~HandleArray): (WebKit::SandboxExtension::HandleArray::resize): (WebKit::SandboxExtension::HandleArray::operator[]): (WebKit::SandboxExtension::HandleArray::size): (WebKit::SandboxExtension::HandleArray::encode): (WebKit::SandboxExtension::HandleArray::decode): * UIProcess/API/mac/WKView.mm: (createSandboxExtensionsForFileUpload): (-[WKView performDragOperation:]): Added logic to create the sandbox extensions for each file/directory being dropped. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::dragEntered): (WebKit::WebPageProxy::dragUpdated): (WebKit::WebPageProxy::dragExited): (WebKit::WebPageProxy::performDrag): (WebKit::WebPageProxy::performDragControllerAction): Added the handle array parameter. * UIProcess/WebPageProxy.h: * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handleDropEvent): * UIProcess/API/gtk/WebKitWebViewBase.cpp: * UIProcess/win/WebView.cpp: (WebKit::WebView::Drop): * WebProcess/WebCoreSupport/WebDragClient.cpp: (WebKit::WebDragClient::willPerformDragDestinationAction): Added handling of the new DragActionUpload. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::getPathnamesForType): Implemented using message to the UI process. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): (WebKit::WebPage::performUploadDragDestinationAction): Added method that consumes the received extensions. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2012-03-19 Alexey Proskuryakov Make WebFrameLoaderClient::createFrame more like WebKit1 version. https://bugs.webkit.org/show_bug.cgi?id=81550 Covered by existing tests. Reviewed by Jessie Berlin. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createFrame): 2012-03-19 Anders Carlsson Find in page highlights get out of place when scrolling https://bugs.webkit.org/show_bug.cgi?id=81543 Reviewed by Sam Weinig. When we have a page overlay layer, always force a full repaint of it whenever the page changes. If this turns out to be a real performance problem (measurements suggest that it isn't), we could once again try to figure out when a full page repaint is needed. Doing so could probably be more expensive than simply repainting the page, given that a page overlay consists of a bunch of rect-fills mostly. Also turn on accelerated drawing for the page overlay layer, since that cut CPU usage in half when scrolling on a page that had a find overlay visible. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::flushLayers): (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): 2012-03-19 Anders Carlsson When Find overlay first appears and the page scrolls, the scrolling happens through a fade https://bugs.webkit.org/show_bug.cgi?id=81539 Reviewed by Dan Bernstein. Disable implicit animations when adding the page overlay layer to its superlayer. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): 2012-03-19 Anders Carlsson Crash when closing an inspected web page with tiled drawing enabled https://bugs.webkit.org/show_bug.cgi?id=81524 Reviewed by Sam Weinig. Guard against the WebPage's underlying WebCore Page being null, which can happen when the inspector highlight overlay is uninstalled by the inspector when the inspected page goes away. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay): 2012-03-19 Kenneth Rohde Christiansen Merge _q_commitScaleChange and _q_commitPositionChange https://bugs.webkit.org/show_bug.cgi?id=81511 Reviewed by Simon Hausmann. Both methods were used for notifying WebCore of the new viewport and re-tiling. The methods are merge into _q_contentViewportChanged. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::onComponentComplete): (QQuickWebViewFlickablePrivate::updateViewportSize): (QQuickWebViewFlickablePrivate::_q_contentViewportChanged): (QQuickWebViewFlickablePrivate::_q_resume): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate::_q_contentViewportChanged): (QQuickWebViewFlickablePrivate): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer): (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate): (WebKit::QtViewportInteractionEngine::wheelEvent): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-03-19 Allan Sandfeld Jensen Select best target for tap gesture. https://bugs.webkit.org/show_bug.cgi?id=78801 Reviewed by Kenneth Rohde Christiansen. Send radius to handlePotentialSingleTapEvent so it can do the same hit detection the tap gesture later does. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handlePotentialActivation): * UIProcess/WebPageProxy.h: * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handlePotentialSingleTapEvent): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::highlightPotentialActivation): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2012-03-19 Alexander Færøy [Qt] Add experimental API for dynamically changing the UA string Reviewed by Simon Hausmann. This patch adds a new property named userAgent to the QQuickWebViewExperimental type which allows us to dynamically change the user agent string from the QML API. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewExperimental::userAgent): (QQuickWebViewExperimental::setUserAgent): * UIProcess/API/qt/qquickwebview_p.h: 2012-03-18 No'am Rosenthal [Qt][WK2] Avoid usage of manual scaling in the Qt scenegraph integration https://bugs.webkit.org/show_bug.cgi?id=81368 Reviewed by Simon Hausmann. Moved the QtScenegraph integration classes to a separate file, QtWebPageSGNode. The nodes created for QQuickWebPage now include a QSGTransformNode that controls the contentsScale, a QSGSimpleRectNode that controls the background color, and a QSGRenderNode subclass that renders the actual contents. * Target.pri: * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::updatePaintNode): * UIProcess/qt/QtWebPageSGNode.cpp: Added. * UIProcess/qt/QtWebPageSGNode.h: Added. 2012-03-18 No'am Rosenthal [Qt] The background is visible for tiles inside the contents area which are not ready https://bugs.webkit.org/show_bug.cgi?id=81349 Reviewed by Simon Hausmann. Split PageProxyNode to BackgroundSGNode and ContentsSGNode. BackgroundSGNode paints a solid background, either white or transparent (depending on drawsTransparentBackground flag). * UIProcess/API/qt/qquickwebpage.cpp: (ContentsSGNode): (ContentsSGNode::ContentsSGNode): (ContentsSGNode::changedStates): (ContentsSGNode::~ContentsSGNode): (BackgroundSGNode): (BackgroundSGNode::BackgroundSGNode): (BackgroundSGNode::contentsNode): (QQuickWebPage::updatePaintNode): 2012-03-17 Joe Thomas move calc*Value functions out from Length (and platform) https://bugs.webkit.org/show_bug.cgi?id=80897 Moving the Length calc*Value functions out from Length structure and also from /WebCore/platform/ folder. This helps to avoid the layering violation while length calculation. Otherwise layer violation can be avoided only by adding a virtual interface(bug 27160). Reviewed by Antti Koivisto. * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: (WebKit::WebPopupMenu::setUpPlatformData): 2012-03-17 Dan Bernstein Crash in WebCore::Range::startPosition() when dismissing the Press and Hold panel by clicking in the menu bar https://bugs.webkit.org/show_bug.cgi?id=81454 Reviewed by Ada Chan. When the Press and Hold panel is dismissed by clicking in the menu bar, -insertText:replacementRange: is called with an NSRange whose location is NSNotFound - 1 (see ). Trying to convert this bogus range to a WebCore Range returns 0, which leads to the crash. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::insertText): Added a null check, to protect the code from bogus ranges. 2012-03-16 Stephanie Lewis https://bugs.webkit.org/show_bug.cgi?id=81065 CrashTracer: [USER] 111 crashes in WebProcess at WebKitTestRunnerInjectedBundle: WTR::InjectedBundle::done + 142 Add some string function exports to Windows so the WebKitTestRunner can use them. Reviewed by Geoff Garen. * win/WebKit2.def: 2012-03-16 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=81412 REGRESSION (r107435) Copy a link and paste to Mail: Nothing is pasted Reviewed by Geoff Garen. Add new message so the WebProcess can ask the UIProcesses pasteboard for the URL: * UIProcess/WebContext.h: * UIProcess/WebContext.messages.in: * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::getPasteboardURL): Use that new message to implement the pasteboard strategy: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::url): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: (WebPlatformStrategies): 2012-03-16 Alexey Proskuryakov ASSERTION FAILED: m_loadState == LoadStateCommitted in WebFrameProxy::didFinishLoad causing "crashes" on Lion Intel Debug WebKit2 Tests https://bugs.webkit.org/show_bug.cgi?id=81184 Rubber-stamped by Anders Carlsson. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::finishedLoading): Don't leave a lingering m_pluginView after load is finished. When plug-in data was empty, we would create the plug-in here, but failed to finalize the load. 2012-03-08 Jer Noble Support W3C Full Screen API proposal https://bugs.webkit.org/show_bug.cgi?id=80660 Reviewed by Alexey Proskuryakov. Allow full screen elements to access the keyboard. * UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::supportsFullScreen): * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::exitFullScreenForElement): 2012-03-16 Andras Becsi [Qt][WK2] Fix bounce-back behaviour for panning https://bugs.webkit.org/show_bug.cgi?id=81144 Reviewed by Kenneth Rohde Christiansen. If the pan gesture recognizer receives a touch begin event during an ongoing kinetic scroll animation of a previous pan gesture, the animation is stopped and the content is immediately positioned back to valid boundaries. * UIProcess/qt/QtPanGestureRecognizer.cpp: (WebKit::QtPanGestureRecognizer::recognize): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::cancelScrollAnimation): (WebKit): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-03-16 Dinu Jacob [Qt][Wk2] Assertion Failure and crash on file upload https://bugs.webkit.org/show_bug.cgi?id=80854 Reviewed by Simon Hausmann. Crash resulted from attempting to create QFileDialog, a QtWidget based dialog from a QGuiApplication. Replace QFileDialog with a QML implementable component. Added a new property 'filePicker' to WebView experimental to set the QML component for file upload triggered by an input file element. Co-authored with Kasthuri Nallappasoundararajan * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::chooseFiles): (QQuickWebViewExperimental::filePicker): (QQuickWebViewExperimental::setFilePicker): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_singleFileUpload.qml: Added. * UIProcess/API/qt/tests/qmltests/common/singlefileupload.html: Added. * UIProcess/qt/QtDialogRunner.cpp: (FilePickerContextObject): (FilePickerContextObject::FilePickerContextObject): (FilePickerContextObject::fileList): (FilePickerContextObject::reject): (FilePickerContextObject::accept): (QtDialogRunner::initForFilePicker): * UIProcess/qt/QtDialogRunner.h: (QtDialogRunner): (QtDialogRunner::filePaths): (QtDialogRunner::onFileSelected): 2012-03-16 Dinu Jacob [Qt][WK2] Build failure when using --no-touch-events https://bugs.webkit.org/show_bug.cgi?id=81241 Reviewed by Simon Hausmann. Fixed inconsistency in the use of ENABLE_TOUCH_EVENTS flag that caused build failure when using --no-touch-events option * UIProcess/qt/QtPageClient.h: (QtPageClient): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handlePotentialSingleTapEvent): * UIProcess/qt/QtWebPageEventHandler.h: (QtWebPageEventHandler): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: 2012-03-16 Kenneth Rohde Christiansen Merge setVisibleContentsForScaling with setVisibleContentsRectForPanning https://bugs.webkit.org/show_bug.cgi?id=81346 Reviewed by Simon Hausmann. This cleans up the code path and is one step on the way to avoid calling both methods in succession, for instance after ending pinch zoom. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewLegacyPrivate::updateViewportSize): (QQuickWebViewFlickablePrivate::_q_commitScaleChange): (QQuickWebViewPrivate::_q_commitPositionChange): * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::setVisibleContentsRect): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect): * UIProcess/DrawingAreaProxyImpl.h: (DrawingAreaProxyImpl): * UIProcess/LayerTreeHostProxy.cpp: (WebKit::LayerTreeHostProxy::setVisibleContentsRect): * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::setVisibleContentsRect): * UIProcess/WebLayerTreeRenderer.h: (WebLayerTreeRenderer): * WebProcess/WebPage/LayerTreeHost.h: (WebKit::LayerTreeHost::setVisibleContentsRect): * WebProcess/WebPage/LayerTreeHost.messages.in: * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::setVisibleContentsRect): * WebProcess/WebPage/qt/LayerTreeHostQt.h: (LayerTreeHostQt): 2012-03-16 YoungTaeck Song [EFL][WK2] Add ProcessLauncherEfl.cpp https://bugs.webkit.org/show_bug.cgi?id=75464 Reviewed by Hajime Morita. Add first version of ProcessLauncherEfl.cpp including launchProcess() and terminateProcess(). * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: Added. (WebKit::ProcessLauncher::launchProcess): (WebKit::ProcessLauncher::terminateProcess): (WebKit::ProcessLauncher::platformInvalidate): 2012-03-15 Anders Carlsson Try to fix the Snow Leopard build. * UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::pdfKitBundle): 2012-03-07 Jon Lee Move NotificationContents into Notification https://bugs.webkit.org/show_bug.cgi?id=80487 Reviewed by Jian Li. * UIProcess/Notifications/WebNotificationManagerProxy.cpp: Remove extraneous include. * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::show): Refactor to use accessor methods on Notification. 2012-03-15 Brent Fulgham Unreviewed build correction. WinCairo export definitions file was not updated when the main Apple file was changed. * win/WebKit2CFLite.def: Revise export declarations to match new symbol names. 2012-03-15 Anders Carlsson REGRESSION(r107168?): Assertion failures under pageContainsAnyHorizontalScrollbars causing multiple "crashes" on the Lion Intel Debug WebKit2 testers https://bugs.webkit.org/show_bug.cgi?id=81162 Reviewed by Beth Dakin and Jessie Berlin. Downgrade the ASSERT to a simple if check since scrollableArea->isOnActivePage() can return false when layout happens during page transitions. * WebProcess/WebPage/WebPage.cpp: (WebKit::pageContainsAnyHorizontalScrollbars): 2012-03-15 David Hyatt https://bugs.webkit.org/show_bug.cgi?id=81258 Add a preference for enabling the new multi-column layout code that will be based on regions. Reviewed by Beth Dakin. * Shared/WebPreferencesStore.h: (WebKit): * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetRegionBasedColumnsEnabled): (WKPreferencesGetRegionBasedColumnsEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2012-03-14 Anders Carlsson Can't swipe to go back/forward when the current page is a PDF document https://bugs.webkit.org/show_bug.cgi?id=81194 Reviewed by Sam Weinig. Override -[PDFViewScrollView scrollWheel:] and have the new implementation call -[WKPDFView forwardScrollWheelEvent:] when the PDF is pinned to either the left or right side. WKPDFView will then call PDFController::forwardScrollWheelEvent which checks if we can go back or forward, and passes the event along to the WKView which ends up triggering the swiping machinery in Safari. * UIProcess/API/mac/PDFViewController.h: * UIProcess/API/mac/PDFViewController.mm: (-[WKPDFView forwardScrollWheelEvent:]): (WebKit): (WebKit::PDFViewController::forwardScrollWheelEvent): (WebKit::findEnclosingWKPDFView): (WebKit::PDFViewScrollView_scrollWheel): (WebKit::PDFViewController::pdfKitBundle): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didCommitLoadForFrame): 2012-03-15 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=81079 REGRESSION(r107844): Clipboard API only remembers most recent data set on clipboard Reviewed by Sam Weinig. Add the non-destructive "addTypes" to supplement the destructive "setTypes" * UIProcess/WebContext.h: * UIProcess/WebContext.messages.in: * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::addPasteboardTypes): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::addTypes): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: 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: 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