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