2012-06-16 Adam Barth Settings::devicePixelRatio doesn't do anything and is confusing https://bugs.webkit.org/show_bug.cgi?id=89272 Reviewed by James Robinson. * Shared/WebPreferencesStore.h: (WebKit): - Remove boilerplate code for the setting. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewExperimental::devicePixelRatio): (QQuickWebViewExperimental::setDevicePixelRatio): - Change these functions to get and set the real device scale factor. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::sendViewportAttributesChanged): - Use the real device scale factor for the viewport calculation. (WebKit::WebPage::updatePreferences): - Remove boilerplate code for the setting. 2012-06-15 Christophe Dumez [WK2] Add support for explicit intents https://bugs.webkit.org/show_bug.cgi?id=89206 Reviewed by Kenneth Rohde Christiansen. Expose the service URL of a Web Intent. This URL is set for explicit intents. * Shared/IntentData.h: (IntentData): * UIProcess/WebIntentData.h: (WebKit::WebIntentData::service): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchIntent): 2012-06-15 Christophe Dumez [EFL][WK2] Add title support to Ewk_View https://bugs.webkit.org/show_bug.cgi?id=89095 Reviewed by Kenneth Rohde Christiansen. Add a method to get the title of the main frame in an Ewk_View. A "title,changed" signal is now emitted on the view to notify clients that the main frame title was changed. * PlatformEfl.cmake: * UIProcess/API/efl/ewk_view.cpp: (_Ewk_View_Private_Data): (_ewk_view_priv_del): (ewk_view_base_add): (ewk_view_title_get): (ewk_view_title_changed): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/ewk_view_loader_client.cpp: Added. (didReceiveTitleForFrame): (ewk_view_loader_client_attach): * UIProcess/API/efl/ewk_view_loader_client_private.h: Added. * UIProcess/API/efl/ewk_view_private.h: 2012-06-15 Christophe Dumez [WK2][EFL] Implement navigation back/forward in Ewk_View https://bugs.webkit.org/show_bug.cgi?id=89173 Reviewed by Kenneth Rohde Christiansen. Add API for Ewk_View to ask the main frame to navigate backwards or forwards in history. Also add API to query if such navigation is possible. * UIProcess/API/efl/ewk_view.cpp: (ewk_view_back): (ewk_view_forward): (ewk_view_back_possible): (ewk_view_forward_possible): * UIProcess/API/efl/ewk_view.h: 2012-06-15 Christophe Dumez [EFL][WK2] Implement reload / stop in Ewk_View https://bugs.webkit.org/show_bug.cgi?id=89168 Reviewed by Kenneth Rohde Christiansen. Add API on the Ewk_View to reload the main frame and to stop the current load. * UIProcess/API/efl/ewk_view.cpp: (ewk_view_reload): (ewk_view_stop): * UIProcess/API/efl/ewk_view.h: 2012-06-14 Kent Tamura Validate form state strings in FormController::setStateForNewFormElements() https://bugs.webkit.org/show_bug.cgi?id=88768 Reviewed by Hajime Morita. * win/WebKit2.def: Expose some symbols used by Internals.cpp. * win/WebKit2CFLite.def: ditto. 2012-06-14 Tim Horton DrawingArea: Painting is being resumed while the view is not visible https://bugs.webkit.org/show_bug.cgi?id=88940 Reviewed by Dean Jackson. Using requestAnimationFrame and the fullscreen API on a DrawingArea-backed window would cause rAF to permanently suspend animations after entering full-screen mode, because of the following: 0. JavaScript causes fullscreen transition to start. 1. Painting (and rAF) are suspended. 2. The page changes size. a. DrawingAreaProxyImpl::sizeDidChange() calls DrawingAreaImpl::updateBackingStoreState, which calls DrawingAreaImpl::resumePainting. b. DrawingAreaImpl::resumePainting resumes painting, but does *not* resume rAF, because windowIsVisible is (legitimately) false. 3. The view becomes visible, windowIsVisible is updated to true. 4. visibilityDidChange() calls resumePainting again, but this time it early exits because painting is not suspended. Notice that because of the early exit in 4, rAF is never resumed. To solve this and prevent any further bugs caused by these unnecessary calls to resume/suspendPainting, temporarily stop sending SuspendPainting/ResumePainting messages from DrawingAreaProxyImpl::visibilityDidChange during the window animations that occur while entering and exiting full-screen. * UIProcess/API/mac/WKViewInternal.h: * UIProcess/API/mac/WKView.mm: (-[WKView setAutomaticallySuspendAndResumePainting:]): (-[WKView automaticallySuspendAndResumePainting]): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::visibilityDidChange): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::setShouldSuspendAndResumePainting): (WebKit::WebPageProxy::shouldSuspendAndResumePainting): * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): 2012-06-14 Jia Pu Mark text with text alternative with blue underline. https://bugs.webkit.org/show_bug.cgi?id=83047 Reviewed by Enrica Casucci. Changes in WebKit2 include implementation of new functions declared in AlternativeTextClient, and logic for calling Editor::insertDictatedText() instead of Editor::insertText() when there's alternatives attached to the input string. * Shared/API/c/WKContextMenuItemTypes.h: * Shared/API/c/WKSharedAPICast.h: * Shared/WebCoreArgumentCoders.cpp: * Shared/WebCoreArgumentCoders.h: * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::PageClientImpl): (WebKit::PageClientImpl::pageClosed): (WebKit::PageClientImpl::addDictationAlternatives): (WebKit::PageClientImpl::removeDictationAlternatives): (WebKit::PageClientImpl::showDictationAlternativeUI): (WebKit::PageClientImpl::dictationAlternatives): (WebKit::PageClientImpl::dismissDictationAlternativeUI): * UIProcess/API/mac/WKView.mm: (-[WKView insertText:replacementRange:]): (-[WKView validAttributesForMarkedText]): (-[WKView handleAcceptedAlternativeText:]): * UIProcess/API/mac/WKViewInternal.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::showDictationAlternativeUI): (WebKit::WebPageProxy::dismissDictationAlternativeUI): (WebKit::WebPageProxy::removeDictationAlternatives): (WebKit::WebPageProxy::dictationAlternatives): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/CorrectionPanel.mm: (correctionIndicatorType): (WebKit::CorrectionPanel::handleAcceptedReplacement): * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::insertDictatedText): * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: (WebAlternativeTextClient): * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp: (WebKit::WebAlternativeTextClient::showCorrectionAlternative): (WebKit::WebAlternativeTextClient::dismissAlternative): (WebKit::WebAlternativeTextClient::dismissAlternativeSoon): (WebKit::WebAlternativeTextClient::recordAutocorrectionResponse): (WebKit::WebAlternativeTextClient::removeDictationAlternatives): (WebKit::WebAlternativeTextClient::showDictationAlternativeUI): (WebKit::WebAlternativeTextClient::dismissDictationAlternativeUI): (WebKit::WebAlternativeTextClient::dictationAlternatives): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::insertDictatedText): 2012-06-13 Andreas Kling Chinese IM receives incorrect/duplicated key events in text fields in webpages in Safari. Reviewed by Darin Adler. Send the DidReceiveEvent message with the DispatchMessageEvenWhenWaitingForSyncReply flag for keyboard events. This ensures that it always arrives before the corresponding synchronous InterpretQueuedKeyEvent message. The problem was that we relied on DidReceiveEvent / InterpretQueuedKeyEvent always arriving in the same order they were sent. This was not always true, since DidReceiveEvent (async) would get deferred during an unrelated waitForSyncReply() whereas InterpretQueuedKeyEvent (sync) gets dispatched right away. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::keyEvent): 2012-06-14 Carlos Garcia Campos [GTK] Add input methods submenu item to the default context menu for editable content https://bugs.webkit.org/show_bug.cgi?id=80600 Reviewed by Martin Robinson. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitContextMenuClient.cpp: Added. (getContextMenuFromProposedMenu): Call webkitWebViewContextMenu(). (attachContextMenuClientToView): Add implementation for getContextMenuFromProposedMenu callback. * UIProcess/API/gtk/WebKitContextMenuClient.h: Added. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewConstructed): Attach context menu client to view. (webkitWebViewCreateAndAppendDefaultMenuItems): Helper function to add default context menu items to the new context menu items vector. (webkitWebViewShouldShowInputMethodsMenu): Helper function to check whether to show the input methods submenu according to the gtk-show-input-method-menu GTK+ setting. (webkitWebViewCreateAndAppendInputMethodsMenuItem): Helper function to add input methods submenu to the new context menu items vector. (webkitWebViewContextMenu): Create a new context menu items vector containing default items and input methods submenu in case of editable content. The active content menu is populated using that new vector. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseSetActiveContextMenu): Set the active context menu. (webkitWebViewBaseGetActiveContextMenu): Get the active context menu. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/gtk/WebContextMenuProxyGtk.cpp: (WebKit::WebContextMenuProxyGtk::append): Helper method to add a new item to the context menu. (WebKit::WebContextMenuProxyGtk::populate): Add items to the context menu. (WebKit::WebContextMenuProxyGtk::showContextMenu): Populate the menu with the given items and popup the menu if it's not empty. (WebKit::WebContextMenuProxyGtk::hideContextMenu): Get the GtkMenu from the WebCore ContextMenu to popdown it. (WebKit::WebContextMenuProxyGtk::WebContextMenuProxyGtk): Call webkitWebViewBaseSetActiveContextMenu() to set the menu as the current active one for the view. (WebKit::WebContextMenuProxyGtk::~WebContextMenuProxyGtk): Call webkitWebViewBaseSetActiveContextMenu() with NULL to reset the current active context of the view. GtkMenu is destroyed by WebCore ContextMenu in its destructor. * UIProcess/gtk/WebContextMenuProxyGtk.h: 2012-06-14 Christophe Dumez [WK2] Add implementation for registerIntentService in WebFrameLoaderClient https://bugs.webkit.org/show_bug.cgi?id=88399 Reviewed by Kenneth Rohde Christiansen. Add implementation for registerIntentService() in WebFrameLoaderClient. * CMakeLists.txt: * GNUmakefile.list.am: * Shared/API/c/WKBase.h: * Shared/APIClientTraits.h: * Shared/APIObject.h: * Shared/IntentServiceInfo.cpp: Added. (WebKit): (WebKit::IntentServiceInfo::encode): (WebKit::IntentServiceInfo::decode): * Shared/IntentServiceInfo.h: Added. (CoreIPC): (WebKit): (IntentServiceInfo): * Target.pri: * UIProcess/API/C/WKAPICast.h: (WebKit): * UIProcess/API/C/WKPage.h: * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): * UIProcess/WebIntentServiceInfo.cpp: Added. (WebKit): (WebKit::WebIntentServiceInfo::WebIntentServiceInfo): * UIProcess/WebIntentServiceInfo.h: Added. (WebKit): (WebIntentServiceInfo): (WebKit::WebIntentServiceInfo::create): (WebKit::WebIntentServiceInfo::~WebIntentServiceInfo): (WebKit::WebIntentServiceInfo::action): (WebKit::WebIntentServiceInfo::payloadType): (WebKit::WebIntentServiceInfo::href): (WebKit::WebIntentServiceInfo::title): (WebKit::WebIntentServiceInfo::disposition): (WebKit::WebIntentServiceInfo::type): * UIProcess/WebLoaderClient.cpp: (WebKit): (WebKit::WebLoaderClient::registerIntentServiceForFrame): * UIProcess/WebLoaderClient.h: (WebKit): (WebLoaderClient): * UIProcess/WebPageProxy.cpp: (WebKit): (WebKit::WebPageProxy::registerIntentServiceForFrame): * UIProcess/WebPageProxy.h: (WebKit): (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit): (WebKit::WebFrameLoaderClient::registerIntentService): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: (WebFrameLoaderClient): 2012-06-14 Carlos Garcia Campos [WK2] Add WKHitTestResultIsContentEditable() https://bugs.webkit.org/show_bug.cgi?id=80597 Reviewed by Martin Robinson. * Shared/WebHitTestResult.cpp: (WebKit::WebHitTestResult::Data::encode): Encode isContentEditable. (WebKit::WebHitTestResult::Data::decode): Decode isContentEditable. * Shared/WebHitTestResult.h: (Data): Add isContentEditable. (WebKit::WebHitTestResult::Data::Data): Initialize isContentEditable. (WebKit::WebHitTestResult::isContentEditable): Returns whether hit test result target is editable content. * UIProcess/API/C/WKHitTestResult.cpp: (WKHitTestResultIsContentEditable): C API to get whether hit test result target is editable content. * UIProcess/API/C/WKHitTestResult.h: * UIProcess/API/gtk/WebKitHitTestResult.cpp: (webkitHitTestResultCreate): Add WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE flags to the context if hit test result target is editable content. (webkit_hit_test_result_context_is_editable): Returns TRUE if WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE flags is present in context. * UIProcess/API/gtk/WebKitHitTestResult.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewMouseTarget): Add tests for WEBKIT_HIT_TEST_RESULT_CONTEXT_EDITABLE. 2012-06-14 Grzegorz Czajkowski [WK2] Fix client interface size for WKPageLoaderClient. https://bugs.webkit.org/show_bug.cgi?id=88764 Reviewed by Anders Carlsson. Fixes offset of WKPageLoaderClient for version 0 by adding didDetectXSSForFrame. The offset should be off the first new callback that was added in the new version. * Shared/APIClientTraits.cpp: (WebKit): 2012-06-13 Christophe Dumez [WK2] Add implementation for dispatchIntent in WebFrameLoaderClient https://bugs.webkit.org/show_bug.cgi?id=88340 Reviewed by Kenneth Rohde Christiansen. Add implementation for dispatchIntent() in WebFrameLoaderClient. * CMakeLists.txt: * GNUmakefile.list.am: * Shared/API/c/WKBase.h: * Shared/APIClientTraits.h: * Shared/APIObject.h: * Shared/IntentData.cpp: Added. (WebKit): (WebKit::IntentData::encode): (WebKit::IntentData::decode): * Shared/IntentData.h: Added. (CoreIPC): (WebKit): (IntentData): * Target.pri: * UIProcess/API/C/WKAPICast.h: (WebKit): * UIProcess/API/C/WKPage.h: * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): * UIProcess/WebIntentData.cpp: Added. (WebKit): (WebKit::WebIntentData::WebIntentData): (WebKit::WebIntentData::data): * UIProcess/WebIntentData.h: Added. (WebKit): (WebIntentData): (WebKit::WebIntentData::create): (WebKit::WebIntentData::~WebIntentData): (WebKit::WebIntentData::action): (WebKit::WebIntentData::payloadType): (WebKit::WebIntentData::extras): (WebKit::WebIntentData::suggestions): (WebKit::WebIntentData::type): * UIProcess/WebLoaderClient.cpp: (WebKit): (WebKit::WebLoaderClient::didReceiveIntentForFrame): * UIProcess/WebLoaderClient.h: (WebKit): (WebLoaderClient): * UIProcess/WebPageProxy.cpp: (WebKit): (WebKit::WebPageProxy::didReceiveIntentForFrame): * UIProcess/WebPageProxy.h: (WebKit): (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchIntent): 2012-06-13 Tim Horton Rename _swapView:with: to _replaceView:with: https://bugs.webkit.org/show_bug.cgi?id=89037 Reviewed by Darin Adler. _swapView:with: is a misnomer - after calling it, the first view is no longer contained within the view hierarchy. "Replace" is a more accurate term. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): (-[WKFullScreenWindowController _replaceView:with:]): 2012-06-13 Martin Robinson [GTK] Add an accelerated compositing implementation for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=86037 Reviewed by Alejandro G. Castro. Add an implementation of LayerTreeHost for GTK+ that uses TextureMapperGL. Later this implementation will fall back to using the ImageBuffer TextureMapper. * GNUmakefile.am: Add new files to the compilation. * Shared/LayerTreeContext.h: (LayerTreeContext): The GTK+ version of the LayerTreeContext just holds window handle. * Shared/gtk/LayerTreeContextGtk.cpp: Copied from Source/WebKit2/WebProcess/WebPage/LayerTreeHost.cpp. * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: Added. * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: Added. Add this LayerTreeHost implementation that just creates a GL context from the widget X11 window ID. Later implementations might find a more cross-platform solution. * WebProcess/WebPage/gtk/WebPageGtk.cpp: (WebKit::WebPage::platformInitialize): Initialize the native window handle to be zero. (WebKit::WebPage::widgetMapped): When mapping the widget, try to get the native window handle and send it to the WebProcess. 2012-06-13 Andras Becsi [Qt][WK2] ASSERT(m_rawAttributes.initialScale > 0) in QtViewportHandler::initialRect() https://bugs.webkit.org/show_bug.cgi?id=89026 Reviewed by Csaba Osztrogonác. Only act on viewport attribute changes if the layout size is valid. * UIProcess/qt/QtViewportHandler.cpp: (WebKit::QtViewportHandler::setInitialScaleIfNeeded): (WebKit::QtViewportHandler::viewportAttributesChanged): 2012-06-13 Brent Fulgham [WinCairo] Build fix after Windows export definition file change. * win/WebKit2CFLite.def: Add missing symbol exports. 2012-06-13 Allan Sandfeld Jensen [Qt] Fixed visible content rect lost during page-load https://bugs.webkit.org/show_bug.cgi?id=88991 Reviewed by Kenneth Rohde Christiansen. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): 2012-06-13 Sheriff Bot Unreviewed, rolling out r120209. http://trac.webkit.org/changeset/120209 https://bugs.webkit.org/show_bug.cgi?id=89007 Broke the WebKit2 mac build. (Requested by andersca on #webkit). * CMakeLists.txt: * GNUmakefile.list.am: * Shared/API/c/WKBase.h: * Shared/APIClientTraits.h: * Shared/APIObject.h: * Shared/IntentData.cpp: Removed. * Shared/IntentData.h: Removed. * Target.pri: * UIProcess/API/C/WKAPICast.h: (WebKit): * UIProcess/API/C/WKPage.h: * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): * UIProcess/WebIntentData.cpp: Removed. * UIProcess/WebIntentData.h: Removed. * UIProcess/WebLoaderClient.cpp: * UIProcess/WebLoaderClient.h: (WebKit): (WebLoaderClient): * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: (WebKit): (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchIntent): 2012-06-13 Alexis Menard Web Inspector: add a way to get the remote inspector url for a given page. https://bugs.webkit.org/show_bug.cgi?id=88902 Reviewed by Jocelyn Turcotte. Expose the remote inspector url for a given page in the API. If you want to create a web view and load directly the inspector for the page you want to inspect, it helps to get the url as it is impossible to figure it out from the API layer. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewExperimental::remoteInspectorUrl): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/InspectorServer/WebInspectorServer.cpp: (WebKit): (WebKit::WebInspectorServer::inspectorUrlForPageID): * UIProcess/InspectorServer/WebInspectorServer.h: (WebInspectorServer): * UIProcess/InspectorServer/WebSocketServer.cpp: (WebKit::WebSocketServer::WebSocketServer): (WebKit::WebSocketServer::listen): (WebKit::WebSocketServer::close): * UIProcess/InspectorServer/WebSocketServer.h: (WebKit::WebSocketServer::bindAddress): (WebKit::WebSocketServer::port): (WebKit::WebSocketServer::serverState): (WebSocketServer): * UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp: (WebKit::remoteInspectorPagePath): (WebKit): (WebKit::WebInspectorServer::inspectorUrlForPageID): (WebKit::WebInspectorServer::buildPageList): * UIProcess/WebInspectorProxy.h: (WebKit::WebInspectorProxy::remoteInspectionPageID): 2012-06-13 Christophe Dumez [WK2] Add implementation for dispatchIntent in WebFrameLoaderClient https://bugs.webkit.org/show_bug.cgi?id=88340 Reviewed by Kenneth Rohde Christiansen. Add implementation for dispatchIntent() in WebFrameLoaderClient. * CMakeLists.txt: * GNUmakefile.list.am: * Shared/API/c/WKBase.h: * Shared/APIClientTraits.h: * Shared/APIObject.h: * Shared/IntentData.cpp: Added. (WebKit): (WebKit::IntentData::encode): (WebKit::IntentData::decode): * Shared/IntentData.h: Added. (CoreIPC): (WebKit): (IntentData): * Target.pri: * UIProcess/API/C/WKAPICast.h: (WebKit): * UIProcess/API/C/WKPage.h: * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): * UIProcess/WebIntentData.cpp: Added. (WebKit): (WebKit::WebIntentData::WebIntentData): (WebKit::WebIntentData::data): * UIProcess/WebIntentData.h: Added. (WebKit): (WebIntentData): (WebKit::WebIntentData::create): (WebKit::WebIntentData::~WebIntentData): (WebKit::WebIntentData::action): (WebKit::WebIntentData::payloadType): (WebKit::WebIntentData::extras): (WebKit::WebIntentData::suggestions): (WebKit::WebIntentData::type): * UIProcess/WebLoaderClient.cpp: (WebKit): (WebKit::WebLoaderClient::didReceiveIntentForFrame): * UIProcess/WebLoaderClient.h: (WebKit): (WebLoaderClient): * UIProcess/WebPageProxy.cpp: (WebKit): (WebKit::WebPageProxy::didReceiveIntentForFrame): * UIProcess/WebPageProxy.h: (WebKit): (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchIntent): 2012-06-13 Balazs Kelemen [Qt][WK2] Scanning plugins blocks the UI for a long time https://bugs.webkit.org/show_bug.cgi?id=88535 Reviewed by Simon Hausmann. Implement a persistent cache for the meta data of plugins. This way the UI process will not block for too long when it's time to scan the plugins (except the first time). The cache is a json file stored in a standard hidden cache directory. * Shared/qt/QtDefaultDataLocation.cpp: Added. (WebKit): (WebKit::defaultDataLocation): * Shared/qt/QtDefaultDataLocation.h: Added. (WebKit): Added a common helper for the path we use to put stuff into. * Target.pri: * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: (WebKit::cacheFile): (WebKit): (WebKit::readMetaDataFromCacheFile): (WebKit::writeToCacheFile): (WebKit::appendToCacheFile): (WebKit::tryReadPluginMetaDataFromCacheFile): (WebKit::PluginProcessProxy::scanPlugin): * UIProcess/qt/WebContextQt.cpp: 2012-06-13 Kenneth Rohde Christiansen [Qt] Do not set contents pos to the current position https://bugs.webkit.org/show_bug.cgi?id=88990 Reviewed by Laszlo Gombos. This is basically an optimization but it also solves flickering in some cases. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::setContentPos): 2012-06-12 MORITA Hajime Shadow Pseudo ID should be able to nest to point nested shadow DOM. https://bugs.webkit.org/show_bug.cgi?id=62218 Reviewed by Dimitri Glazkov. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-06-12 Kenneth Rohde Christiansen Unreviewed build fix. * UIProcess/qt/QtViewportHandler.cpp: (WebKit::QtViewportHandler::initialRect): 2012-06-11 Jocelyn Turcotte Using extrernal ICU library on case unsensitive drives will not work https://bugs.webkit.org/show_bug.cgi?id=70913 Reviewed by Csaba Osztrogonác. * WebProcess/WebPage/UpdateAtlas.cpp: 2012-06-12 Kenneth Rohde Christiansen [Qt] Do not move/scale content while the user is interacting with it https://bugs.webkit.org/show_bug.cgi?id=88872 Reviewed by Simon Hausmann. Don't try moving content into valid bounds when the content size changes and the user is interacting with the content. Only apply the viewport initial scale after user interaction has ended. * UIProcess/qt/QtViewportHandler.cpp: (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer): (WebKit::QtViewportHandler::setInitialScaleIfNeeded): (WebKit::QtViewportHandler::viewportAttributesChanged): (WebKit::QtViewportHandler::pageContentsSizeChanged): (WebKit::QtViewportHandler::initialRect): (WebKit): * UIProcess/qt/QtViewportHandler.h: (QtViewportHandler): 2012-06-11 Kaustubh Atrawalkar [DRT] LTC:: counterValueForElementById() could be moved to Internals. https://bugs.webkit.org/show_bug.cgi?id=84406 Reviewed by Hajime Morita. Exporting Internals::counterValueForElement symbols for the win build. * win/WebKit2.def: 2012-06-11 Ryuan Choi [CMAKE][WK2] Make WebProcess target name more clear. https://bugs.webkit.org/show_bug.cgi?id=88767 Reviewed by Ryosuke Niwa. * CMakeLists.txt: Change WebProcess_NAME to WebProcess_EXECUTABLE_NAME. 2012-06-11 Alexis Menard [CSS3 Backgrounds and Borders] Protect box-decoration-break behind a feature flag. https://bugs.webkit.org/show_bug.cgi?id=88804 Reviewed by Tony Chang. Protect box-decoration-break behind a feature flag enabled by default. * Configurations/FeatureDefines.xcconfig: 2012-06-11 Gyuyoung Kim [CMAKE][EFL] Remove duplicated executable output path https://bugs.webkit.org/show_bug.cgi?id=88765 Reviewed by Daniel Bates. CMake files for EFL port have redefined executable output path. However, EFL port doesn't need to define again because it is already defined in top-level CMake file. * CMakeLists.txt: 2012-06-11 Anders Carlsson Pass the right color space over to the web process so we can set it on our CA context https://bugs.webkit.org/show_bug.cgi?id=88819 Reviewed by John Sullivan. * Platform/mac/LayerHostingContext.h: (LayerHostingContext): * Platform/mac/LayerHostingContext.mm: (WebKit::LayerHostingContext::createForPort): (WebKit::LayerHostingContext::createForWindowServer): Use a single constructor and explicitly set up the parameters of the constructed object. (WebKit::LayerHostingContext::setColorSpace): (WebKit::LayerHostingContext::colorSpace): Add getter and setter. * Scripts/webkit2/messages.py: (struct_or_class): WebKit::ColorSpaceData is a struct. * Shared/WebPageCreationParameters.cpp: Encode and decode the color space parameter. * Shared/WebPageCreationParameters.h: Add the color space. * Shared/mac/ColorSpaceData.h: Added. * Shared/mac/ColorSpaceData.mm: Added. Add a new class that represents a color space that can be sent over the wire. * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::colorSpace): Call through to the WKView. * UIProcess/API/mac/WKView.mm: (-[WKView _windowDidChangeBackingProperties:]): Fix whitespace. (-[WKView viewDidChangeBackingProperties]): Check if our new color space is different from the current one and null the current one out if that is the case, it will be reinitialized by the next call to -[WKView _colorSpace]. (-[WKView _colorSpace:]): Compute the color space. If we're not in a window we'll get the main screen's color space. * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::colorSpaceDidChange): Add empty stub. * UIProcess/PageClient.h: Add colorSpace getter. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::creationParameters): Initialize the color space. * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::colorSpaceDidChange): Send the new color space over to the web process. * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::colorSpace): Call through to the page client. * WebKit2.xcodeproj/project.pbxproj: Add ColorSpaceData.h and ColorSpaceData.mm. * WebProcess/WebPage/DrawingArea.h: * WebProcess/WebPage/DrawingArea.messages.in: Add SetColorSpace message. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Set the color space from the creation parameters. (WebKit::TiledCoreAnimationDrawingArea::setColorSpace): Set the color space on the layer hosting context. (WebKit::TiledCoreAnimationDrawingArea::updateLayerHostingContext): Make sure we apply the color space from the previous layer hosting context if one exists. 2012-06-11 Anders Carlsson Crash when a plug-in tries to use the NPRuntime API with JavaScript disabled https://bugs.webkit.org/show_bug.cgi?id=88797 Reviewed by Brady Eidson. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::initialize): Handle the windowNPObjectID being 0. (WebKit::PluginControllerProxy::windowScriptNPObject): Handle m_windownPObject being null. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::windowScriptNPObject): Return null if JavaScript is disabled. (WebKit::PluginView::pluginElementNPObject): Ditto. 2012-06-11 Kenneth Rohde Christiansen Add QML api for setting device width and height https://bugs.webkit.org/show_bug.cgi?id=88777 Reviewed by Simon Hausmann. Add the new API and set the default values to 0 (unset). The current values were introduced by Qt and only Qt depends on them. * Shared/WebPreferencesStore.h: (WebKit): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewExperimental::deviceWidth): (QQuickWebViewExperimental::setDeviceWidth): (QQuickWebViewExperimental::deviceHeight): (QQuickWebViewExperimental::setDeviceHeight): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/qt/QtViewportHandler.cpp: (WebKit::QtViewportHandler::viewportItemSizeChanged): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::sendViewportAttributesChanged): 2012-06-11 Michael Brüning [Qt][WK2] Compute and set cache capacities using the current CacheModel https://bugs.webkit.org/show_bug.cgi?id=73918 Reviewed by Kenneth Rohde Christiansen. Added implementation of cache model for Qt WK 2 port including supporting functionality such as WebProcess creation parameters and default values for disk cache directories. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: (WebProcessCreationParameters): * UIProcess/qt/WebContextQt.cpp: (WebKit::defaultDiskCacheDirectory): (WebKit): (WebKit::WebContext::platformInitializeWebProcess): * WebProcess/qt/WebProcessQt.cpp: (WebKit::physicalMemorySizeInBytes): (WebKit::WebProcess::platformSetCacheModel): (WebKit::WebProcess::platformInitializeWebProcess): 2012-06-10 Darin Adler Remove unneeded callRemovedLastRef function from TreeShared refactoring https://bugs.webkit.org/show_bug.cgi?id=88653 Reviewed by Sam Weinig. * win/WebKit2.def: Export removedLastRef instead of callRemovedLastRef. * win/WebKit2CFLite.def: Ditto. 2012-06-10 Ryuan Choi [EFL][WK2] Add and refactor ewk API in order to support MiniBrowser without WK API. https://bugs.webkit.org/show_bug.cgi?id=84124 Reviewed by Chang Shu. Modify ewk_view and add ewk_context to provide a platform-depedent WebKit2 API. This patch provides the minimum to support MiniBrowser. * PlatformEfl.cmake: add ewk_context.cpp. * UIProcess/API/efl/EWebKit2.h: Added. * UIProcess/API/efl/ewk_context.cpp: Added. (_Ewk_Context): (createDefaultWebContext): (ewk_context_WKContext_get): (ewk_context_default_get): * UIProcess/API/efl/ewk_context.h: Added. * UIProcess/API/efl/ewk_context_private.h: Added. * UIProcess/API/efl/ewk_view.cpp: (_Ewk_View_Private_Data): (_ewk_view_priv_del): (ewk_view_base_add): (ewk_view_add_with_context): (ewk_view_add): (ewk_view_uri_set): (ewk_view_uri_get): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/ewk_view_private.h: 2012-06-09 Sukolsak Sakshuwong Add UNDO_MANAGER flag https://bugs.webkit.org/show_bug.cgi?id=87908 Reviewed by Tony Chang. * Configurations/FeatureDefines.xcconfig: 2012-06-08 Brent Fulgham [WinCairo] Build fix after Windows export definition file change. * win/WebKit2CFLite.def: This file needs to be kept in sync with WebKit2.def (aside from the WebKitInterface exports.) 2012-06-08 Viatcheslav Ostapenko [Qt] [WK2] API tests randomly assert in WebLayerTreeRenderer::assignImageToLayer https://bugs.webkit.org/show_bug.cgi?id=88667 Reviewed by Noam Rosenthal. Move deactivation of WebLayerTreeRenderer from LayerTreeHostProxy::purgeBackingStores to WebLayerTreeRenderer::purgeGLResources. LayerTreeHostProxy::purgeBackingStores is invoked on main thread after going through call gate and it is too late to deactivate renderer here, because some update messages are able to go through. WebLayerTreeRenderer::purgeGLResources is called directly from render node deallocation and it is right place to deactivate renderer. * UIProcess/LayerTreeHostProxy.cpp: (WebKit::LayerTreeHostProxy::purgeBackingStores): * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::purgeGLResources): 2012-06-08 Carlos Garcia Campos [GTK] Add API to get the library version to WebKit2 GTK+ https://bugs.webkit.org/show_bug.cgi?id=88426 Reviewed by Martin Robinson. * GNUmakefile.am: * GNUmakefile.list.am: * UIProcess/API/gtk/WebKitVersion.cpp: Added. (webkit_get_major_version): (webkit_get_minor_version): (webkit_get_micro_version): * UIProcess/API/gtk/WebKitVersion.h.in: Added. * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new section for WebKitVersion. * UIProcess/API/gtk/tests/GNUmakefile.am: * UIProcess/API/gtk/tests/TestWebKitVersion.cpp: Added. (testWebKitVersion): (testWebKitCheckVersion): (beforeAll): (afterAll): * UIProcess/API/gtk/webkit2.h: Include WebKitVersion.h. 2012-06-08 Dan Bernstein Tried to fix the Snow Leopard build after r119806. * WebKit2Prefix.h: 2012-06-08 Andy Estes [WebKit2] Move Mac-specific bits from config.h to WebKit2Prefix.h https://bugs.webkit.org/show_bug.cgi?id=88625 Reviewed by Dan Bernstein. Since the Mac supports prefix headers, there is no point in having Mac-specific code in WebKit2's config.h. Move it to WebKit2Prefix.h. * WebKit2Prefix.h: * config.h: 2012-06-07 Kentaro Hara Reduce Node object size from 72 byte to 64 byte https://bugs.webkit.org/show_bug.cgi?id=88528 Reviewed by Ryosuke Niwa. Added a symbol for callRemovedLastRef(). * mac/WebKit2.order: * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-06-07 Andy Estes [WebKit2] Explicitly include CoreFoundation.h in config.h https://bugs.webkit.org/show_bug.cgi?id=88619 Reviewed by Dan Bernstein. WebKit2 relies (probably unintentionally) on CoreFoundation.h being included by CoreGraphics.h (via CGSession.h), but some versions of CoreGraphics headers don't include CoreFoundation.h. WebKit2 should include it explicitly in config.h. * config.h: Import CoreFoundation.h. 2012-06-07 Andy Estes [WebKit2] Only include Cocoa.h on platforms that use AppKit https://bugs.webkit.org/show_bug.cgi?id=88517 Reviewed by Sam Weinig. * WebKit2Prefix.h: Include Platform.h to get USE() macros. GTK needs to include autotoolsconfig.h before including Platform.h, so do that first if building on GTK. Then, if compiling an Objective-C file, it's safe to include Foundation.h, but not necessarily Cocoa.h; only include the latter if USE(APPKIT) is true. * config.h: There's no need to import Cocoa.h since this is already imported in the prefix header. 2012-06-07 Anders Carlsson Search highlight does not scroll with the content of the page, and find overlay doesn't work, on large-enough window https://bugs.webkit.org/show_bug.cgi?id=88577 Reviewed by John Sullivan. Prevent the page overlay layer from falling into tiled mode. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): 2012-06-07 Alexander Færøy Add QML API tests for Device Pixel Ratio https://bugs.webkit.org/show_bug.cgi?id=88531 Reviewed by Kenneth Rohde Christiansen. This patch adds an initial test case for the QML device pixel ratio API. The test currently fails and is therefore marked as being expected to fail. This will be fixed in a separated patch. * UIProcess/API/qt/tests/qmltests/WebView/tst_devicePixelRatio.qml: Added. 2012-06-07 Christophe Dumez [EFL][WK2] WebKit2-EFL does not link in debug mode https://bugs.webkit.org/show_bug.cgi?id=88518 Unreviewed. Fix WebKit2-EFL linking error in debug mode. * CMakeLists.txt: 2012-06-07 Simon Pena [GTK] Fix broken build due to missing
in GTK-DOC https://bugs.webkit.org/show_bug.cgi?id=88525 Unreviewed gardening. Added missing
tag. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: 2012-06-07 Carlos Garcia Campos [GTK] Add API to register custom URI schemes to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=84133 Reviewed by Martin Robinson. * GNUmakefile.list.am: Add new files to compilation. * UIProcess/API/gtk/WebKitPrivate.h: * UIProcess/API/gtk/WebKitRequestManagerClient.cpp: Added. (didReceiveURIRequest): Callback emitted by the C API when a request for a custom URI scheme has been received. Call webkitWebContextReceivedURIRequest() to handle the request. (didFailToLoadURIRequest): Callback emitted by the C API when a request for a custom URI scheme failed to load. Call webkitWebContextDidFailToLoadURIRequest() to noitfy the web context. (attachRequestManagerClientToContext): Initialize the WKSoupRequestManagerClient. * UIProcess/API/gtk/WebKitRequestManagerClient.h: Added. * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: Added. (webkit_uri_scheme_request_init): (webkitURISchemeRequestFinalize): (webkit_uri_scheme_request_class_init): (webkitURISchemeRequestCreate): Create a new WebKitURISchemeRequest for the given URI and request identifier. (webkitURISchemeRequestGetID): Return the request identifier. (webkitURISchemeRequestCancel): Cancel the request operation. (webkit_uri_scheme_request_get_scheme): Return the scheme of the request. (webkit_uri_scheme_request_get_uri): Return the full URI of the request. (webkit_uri_scheme_request_get_path): Return the path of the URI. (webkitURISchemeRequestReadCallback): Read callback emitted when reading the contents of the input stream. (webkit_uri_scheme_request_finish): Finish the request by reading the contents of the input stream and sending the data to the WebProcess. * UIProcess/API/gtk/WebKitURISchemeRequest.h: Added. * UIProcess/API/gtk/WebKitURISchemeRequestPrivate.h: Added. * UIProcess/API/gtk/WebKitWebContext.cpp: (WebKitURISchemeHandler::WebKitURISchemeHandler): Helper struct to save callback and user data of registered URI schemes. (createDefaultWebContext): Initialize the SoupRequestManager. (webkit_web_context_register_uri_scheme): Public API to register a custom URI scheme providing a callback that will be called to handle requests for that URI scheme. (webkitWebContextGetRequestManager): Helper private method to return the SoupRequestManager. (webkitWebContextReceivedURIRequest): Get the WebKitURISchemeHandler for the given request identifier and call the callback. Save the request in the request map. (webkitWebContextDidFailToLoadURIRequest): Cancel the ongoing request. (webkitWebContextDidFinishURIRequest): Remove the request from the map. * UIProcess/API/gtk/WebKitWebContext.h: * UIProcess/API/gtk/WebKitWebContextPrivate.h: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add WebKitURISchemeRequest section. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_uri_scheme_request_get_type. * UIProcess/API/gtk/tests/TestWebKitWebContext.cpp: (testWebContextURIScheme): (beforeAll): * UIProcess/API/gtk/webkit2.h: Include WebKitURISchemeRequest.h. 2012-06-07 Andras Becsi [Qt][WK2] setPageItemRectVisible() is not guarded by ViewportUpdateDeferrer at scaleAnimationValueChanged() https://bugs.webkit.org/show_bug.cgi?id=87954 Reviewed by Kenneth Rohde Christiansen. Resetting the end value, the easing curve or the duration of the scale animation triggers a recalculation of the animation interval. This might change the current value of the animated property. Since guarding of setPageItemRectVisible() relies on animation state change we have to make sure we only act on animation value changes if the animation is in active state. * UIProcess/qt/QtViewportHandler.cpp: (WebKit::QtViewportHandler::QtViewportHandler): (WebKit::QtViewportHandler::animatePageItemRectVisible): (WebKit::QtViewportHandler::scaleAnimationValueChanged): 2012-06-06 Carlos Garcia Campos [SOUP] WebSoupRequestManager should handle loading errors and zero-length replies https://bugs.webkit.org/show_bug.cgi?id=88087 Reviewed by Martin Robinson. * UIProcess/API/C/soup/WKSoupRequestManager.h: * UIProcess/soup/WebSoupRequestManagerClient.cpp: (WebKit::WebSoupRequestManagerClient::didFailToLoadURIRequest): Call didFailToLoadURIRequest in the client if present. * UIProcess/soup/WebSoupRequestManagerClient.h: * UIProcess/soup/WebSoupRequestManagerProxy.cpp: (WebKit::WebSoupRequestManagerProxy::WebSoupRequestManagerProxy): Initialize m_loadFailed. (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequestData): Don't send more data to the web process if the resource failed to load. (WebKit::WebSoupRequestManagerProxy::didFailToLoadURIRequest): Set m_loadFailed and notifiy the client calling didFailToLoadURIRequest. * UIProcess/soup/WebSoupRequestManagerProxy.h: * UIProcess/soup/WebSoupRequestManagerProxy.messages.in: Add DidFailToLoadURIRequest message. * WebProcess/soup/WebKitSoupRequestGeneric.cpp: (webkitSoupRequestGenericSendAsync): Pass the cancellable to the WebSoupRequestManager. * WebProcess/soup/WebSoupRequestManager.cpp: (WebKit::WebSoupRequestAsyncData::WebSoupRequestAsyncData): Helper struct to save requests. (WebSoupRequestAsyncData): Add a weak pointer to invalidate the request when it's destroyed before the operation has finished. (WebKit::WebSoupRequestAsyncData::~WebSoupRequestAsyncData): Remove the weak pointer. (WebKit::WebSoupRequestAsyncData::requestFailed): Return whther the request failed. (WebKit::WebSoupRequestAsyncData::releaseResult): Return the result and clear the pointer. (WebKit::WebSoupRequestManager::didHandleURIRequest): Create and empty memory stream for zero-length replies instead of creating an error. (WebKit::WebSoupRequestManager::didReceiveURIRequestData): If the request failed and more data expected from the UI process, send a message to the UI process to notify that the resource load failed. (WebKit::WebSoupRequestManager::send): Save request information in the request map. * WebProcess/soup/WebSoupRequestManager.h: 2012-06-06 Andy Estes Wrap uppercaseWord, lowercaseWord, and capitalizeWord with USE(APPKIT) https://bugs.webkit.org/show_bug.cgi?id=88504 Reviewed by Dan Bernstein. uppercaseWord, lowercaseWord, and capitalizeWord are methods declared by NSResponder that subclasses are expected to implement. WebKit should only support these implementations on platforms that use AppKit. * UIProcess/WebPageProxy.h: * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2012-06-06 chandra Shekar Vallala [WK2-Gtk]Compilation errors with flag CONTEXT_MENUS=0 https://bugs.webkit.org/show_bug.cgi?id=87842 Reviewed by Martin Robinson. Fix for compilation errors while building webkit2-gtk with CONTEXT_MENUS=0 * UIProcess/gtk/WebContextMenuProxyGtk.cpp: Added code under CONTEXT_MENUS CC * UIProcess/gtk/WebContextMenuProxyGtk.h: Ditto * WebProcess/WebCoreSupport/gtk/WebContextMenuClientGtk.cpp: Ditto 2012-06-06 Michael Brüning [Qt][WK2] Add preferredMinimumContentsWidth to the viewport info in MiniBrowser. https://bugs.webkit.org/show_bug.cgi?id=88327 Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewExperimental::setPreferredMinimumContentsWidth): * UIProcess/API/qt/qquickwebview_p.h: 2012-06-06 Tim Horton WebPage::windowIsVisible is incorrect during resumePainting https://bugs.webkit.org/show_bug.cgi?id=88374 Reviewed by Simon Fraser. Currently, when changing window visibility, WKView calls viewStateDidChange(ViewIsVisible) and then _updateWindowVisibility. This means that during viewStateDidChange, the WebPage's windowIsVisible state is incorrect. viewStateDidChange(ViewIsVisible) can end up in (one of the DrawingArea implementations)::resumePainting(), which uses windowIsVisible to determine whether or not to unpause requestAnimationFrame. This results in a state where, with some configurations, doing the following: 1. requestAnimationFrame() 2. requestFullScreen() 3. requestAnimationFrame() 4. cancelFullScreen() 5. requestAnimationFrame() Will cause the second and third rAF calls to have no effect. Even after cancelFullScreen() is called, the fact that we have had unpaired suspend/resumeScriptedAnimations will cause the suspend count on the ScriptedAnimationController to never return to zero, which will cause us to never recover rAF functionality. The fix is very simple: we should _updateWindowVisibility *before* viewStateDidChange, so that it is always correct for any code called underneath that method. * UIProcess/API/mac/WKView.mm: (-[WKView viewDidMoveToWindow]): (-[WKView _windowDidOrderOffScreen:]): (-[WKView _windowDidOrderOnScreen:]): 2012-06-05 Dinu Jacob [Qt][WK2] Use Component.onCompleted in API tests for single and multi file upload tests. https://bugs.webkit.org/show_bug.cgi?id=88247 Reviewed by Kenneth Rohde Christiansen. With r116936, Component.onCompleted can be used for callback instead of the 1s timer in single and multi file upload tests. * UIProcess/API/qt/tests/qmltests/WebView/tst_multiFileUpload.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_singleFileUpload.qml: 2012-06-04 Stephanie Lewis https://bugs.webkit.org/show_bug.cgi?id=88370 Memory sampler should trigger low memory signal Reviewed by Geoff Garen. Send low memory signal when running the memory sampler. We'd like to test memory that cannot be freed. * Shared/WebMemorySampler.cpp: (WebKit::WebMemorySampler::sampleTimerFired): * Shared/WebMemorySampler.h: (WebMemorySampler): * Shared/mac/WebMemorySampler.mac.mm: (WebKit): (WebKit::WebMemorySampler::sendMemoryPressureEvent): 2012-06-05 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=88372 REGRESSION(110494): Can no longer drag-and-drop links into FileMaker Pro 12 - Before r110494 we used to write the NSStringPboardType to the pasteboard. After r110494 we write NSURLPboardType instead. That's basically a no-op, but the NSStringPboardType needs to be restored. - Before r110494 we wrote the link destination URL to the pasteboard. After r110494 we write the image src URL if the link is an image. We need to revert to writing the link URL. Fortunately these changes can be accomplished with a 2-line fix. Reviewed by Enrica Casucci. * UIProcess/API/mac/WKView.mm: (-[WKView _setPromisedData:WebCore::withFileName:withExtension:withTitle:withURL:withVisibleURL:withArchive:WebCore::forPasteboard:]): n 2012-06-05 Tor Arne Vestbø [Qt] Implement log channel initialization for WebKit2 Reviewed by Alexis Menard. * Platform/Logging.cpp: (WebKit): * Platform/Logging.h: (WebKit): * Platform/qt/LoggingQt.cpp: Copied from Source/WebKit2/Platform/gtk/LoggingGtk.cpp (WebKit): (WebKit::initializeLogChannel): * Target.pri: 2012-06-05 Jocelyn Turcotte WebLayerTreeRenderer behaves wrongly when no contentsScale is set. https://bugs.webkit.org/show_bug.cgi?id=88357 Reviewed by Alexis Menard. The contentsScale needs to get a default value in case no value is explicitely set yet. This fixes the blank-until-resize problem when running MiniBrowser in --desktop mode. * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::WebLayerTreeRenderer): 2012-06-05 Alexis Menard [Qt] Don't propagate viewport size changes if the viewport is empty. https://bugs.webkit.org/show_bug.cgi?id=88336 Reviewed by Tor Arne Vestbø. Qt Quick sequentially set the x, y, width, height of the view. We really want to start propagating further when the size of the viewport becomes valid, i.e. both height and width are defined. In any case lower level classes are discarding an empty size such as WebPage::sendViewportAttributesChanged() so it was pointless to send the size through the IPC bus for nothing. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewLegacyPrivate::updateViewportSize): 2012-06-05 Carlos Garcia Campos [GTK] Add webkit_download_get_received_data_length to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=88323 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitDownload.cpp: (webkit_download_get_received_data_length): * UIProcess/API/gtk/WebKitDownload.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: * UIProcess/API/gtk/tests/TestDownloads.cpp: 2012-06-05 Dongwoo Im Add 'isProtocolHandlerRegistered' and 'unregisterProtocolHandler'. https://bugs.webkit.org/show_bug.cgi?id=73176 Reviewed by Adam Barth. Two more APIs are added in Custom Scheme Handler specification. http://dev.w3.org/html5/spec/Overview.html#custom-handlers One is 'isProtocolHandlerRegistered' to query whether the specific URL is registered or not. The other is 'unregisterProtocolHandler' to remove the registered URL. * Configurations/FeatureDefines.xcconfig: Add a macro 'ENABLE_CUSTOM_SCHEME_HANDLER'. 2012-06-05 Christophe Dumez [EFL][WK2] WebKit2-EFL does not link with gold linker https://bugs.webkit.org/show_bug.cgi?id=88295 Unreviewed. Fix linking when using gold linker. * PlatformEfl.cmake: 2012-06-05 Mario Sanchez Prada [GTK][WK2] Implement API for Geolocation permission requests in the GTK port https://bugs.webkit.org/show_bug.cgi?id=83879 Reviewed by Carlos Garcia Campos. Added a new kind of permission request for supporting the Geolocation API in WebKit2GTK+. New WebKitGeolocationPermissionRequest class, implementing the WebKitPermissionRequest interface, to enabling client applications to allow or deny geolocation permission requests. * GNUmakefile.list.am: Added new files. * UIProcess/API/gtk/WebKitGeolocationPermissionRequest.cpp: Added. (_WebKitGeolocationPermissionRequestPrivate): (webkitGeolocationPermissionRequestAllow): (webkitGeolocationPermissionRequestDeny): (webkit_permission_request_interface_init): (webkit_geolocation_permission_request_init): (webkitGeolocationPermissionRequestFinalize): (webkit_geolocation_permission_request_class_init): (webkitGeolocationPermissionRequestCreate): * UIProcess/API/gtk/WebKitGeolocationPermissionRequest.h: Added. (_WebKitGeolocationPermissionRequest): (_WebKitGeolocationPermissionRequestClass): * UIProcess/API/gtk/WebKitGeolocationPermissionRequestPrivate.h: Added. Include WKGeolocationPermissionRequest.h in WebKitPrivate.h, so we can use it from the new WebKitGeolocationPermissionRequest class. * UIProcess/API/gtk/WebKitPrivate.h: Added new include. Implement geolocation permission requests in the UI client. * UIProcess/API/gtk/WebKitUIClient.cpp: (decidePolicyForGeolocationPermissionRequest): Create a new instance of the WebKitGeolocationPermissionRequest class and call to webkitWebViewMakePermissionRequest(). (attachUIClientToView): Provide an implementation function for decidePolicyForGeolocationPermissionRequest. * UIProcess/API/gtk/WebKitWebView.h: Add new element to WebKitPermissionRequestType enumeration for geolocation requests. * UIProcess/API/gtk/webkit2.h: Added header file for WebKitGeolocationPermissionRequest New unit tests to test allowing and denying permission requests. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewPermissionRequests): New test that loads a simple HTML with JavaScript code requesting the current location. (beforeAll): Added new test. Updated documentation files. * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: 2012-06-04 Sadrul Habib Chowdhury [chromium] Fix software rendering for device-scale-factor > 1 https://bugs.webkit.org/show_bug.cgi?id=88136 Reviewed by Darin Fisher. Export WebCore::Page::setDeviceScaleFactor and WebCore::Settings::setDefaultDeviceScaleFactor. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-06-04 Andy Estes Use ENABLE() and USE() macros in a few more places https://bugs.webkit.org/show_bug.cgi?id=88245 Reviewed by Anders Carlsson. * UIProcess/API/C/WKPluginSiteDataManager.cpp: Only include npapi.h if Netscape plug-in API is enabled. * UIProcess/mac/CorrectionPanel.h: Wrap with USE(AUTOCORRECTION_PANEL) * WebProcess/Authentication/AuthenticationManager.cpp: Use the stub version of tryUsePlatformCertificateInfoForChallenge if Security.framework isn't available. * WebProcess/WebProcess.messages.in: Only generate two messages if Security.framework is available. * WebProcess/mac/KeychainItemShimMethods.mm: Wrap with USE(SECURITY_FRAMEWORK). 2012-06-04 Andy Estes Add stub WebKit2 implementations of PLUGIN_PROXY_FOR_VIDEO methods declared in FrameLoaderClient https://bugs.webkit.org/show_bug.cgi?id=88244 Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createMediaPlayerProxyPlugin): Add a stub implementation. (WebKit::WebFrameLoaderClient::hideMediaPlayerProxyPlugin): Ditto. (WebKit::WebFrameLoaderClient::showMediaPlayerProxyPlugin): Ditto. * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: 2012-06-04 Mario Sanchez Prada [GTK][WK2] Implement geolocation provider for the GTK port https://bugs.webkit.org/show_bug.cgi?id=83877 Reviewed by Carlos Garcia Campos. Add a new client-based geolocation provider for WebKit2GTK+, relying the new Geoclue-based geolocation provider available in WebCore. * GNUmakefile.am: * GNUmakefile.list.am: * UIProcess/API/gtk/WebKitGeolocationProvider.cpp: Added. (toGeolocationProvider): (startUpdatingCallback): (stopUpdatingCallback): (WebKitGeolocationProvider::~WebKitGeolocationProvider): (WebKitGeolocationProvider::create): (WebKitGeolocationProvider::WebKitGeolocationProvider): (WebKitGeolocationProvider::startUpdating): (WebKitGeolocationProvider::stopUpdating): (WebKitGeolocationProvider::notifyPositionChanged): (WebKitGeolocationProvider::notifyErrorOccurred): * UIProcess/API/gtk/WebKitGeolocationProvider.h: Added. * UIProcess/API/gtk/WebKitPrivate.h: * UIProcess/API/gtk/WebKitWebContext.cpp: (_WebKitWebContextPrivate): (createDefaultWebContext): 2012-06-04 Zalan Bujtas [Qt][WK2] Rename QtViewportInteractionEngine to QtViewportHandler. https://bugs.webkit.org/show_bug.cgi?id=88226 Reviewed by Kenneth Rohde Christiansen. * Target.pri: * UIProcess/API/qt/qquickwebpage_p_p.h: (WebKit): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::~QQuickWebViewFlickablePrivate): (QQuickWebViewFlickablePrivate::onComponentComplete): (QQuickWebViewFlickablePrivate::didChangeViewportProperties): (QQuickWebViewFlickablePrivate::updateViewportSize): (QQuickWebViewFlickablePrivate::pageDidRequestScroll): (QQuickWebViewFlickablePrivate::didChangeContentsSize): * UIProcess/API/qt/qquickwebview_p.h: (WebKit): * UIProcess/API/qt/qquickwebview_p_p.h: (WebKit): (QQuickWebViewPrivate::viewportHandler): (QQuickWebViewFlickablePrivate::viewportHandler): (QQuickWebViewFlickablePrivate): * UIProcess/API/qt/qwebkittest.cpp: (QWebKitTest::contentsScale): (QWebKitTest::devicePixelRatio): (QWebKitTest::initialScale): (QWebKitTest::minimumScale): (QWebKitTest::maximumScale): (QWebKitTest::isScalable): (QWebKitTest::layoutSize): * UIProcess/qt/QtGestureRecognizer.cpp: (WebKit::QtGestureRecognizer::viewportHandler): * UIProcess/qt/QtGestureRecognizer.h: (WebKit): * UIProcess/qt/QtPanGestureRecognizer.cpp: (WebKit::QtPanGestureRecognizer::update): (WebKit::QtPanGestureRecognizer::finish): (WebKit::QtPanGestureRecognizer::cancel): * UIProcess/qt/QtPinchGestureRecognizer.cpp: (WebKit::QtPinchGestureRecognizer::update): (WebKit::QtPinchGestureRecognizer::finish): (WebKit::QtPinchGestureRecognizer::cancel): * UIProcess/qt/QtViewportHandler.cpp: Copied from Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.cpp. (WebKit::ViewportUpdateDeferrer::ViewportUpdateDeferrer): (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer): (ViewportUpdateDeferrer): (WebKit::QtViewportHandler::suspendPageContent): (WebKit::QtViewportHandler::resumePageContent): (WebKit::QtViewportHandler::cssScaleFromItem): (WebKit::QtViewportHandler::itemScaleFromCSS): (WebKit::QtViewportHandler::itemCoordFromCSS): (WebKit::QtViewportHandler::itemRectFromCSS): (WebKit::QtViewportHandler::QtViewportHandler): (WebKit::QtViewportHandler::~QtViewportHandler): (WebKit::QtViewportHandler::innerBoundedCSSScale): (WebKit::QtViewportHandler::outerBoundedCSSScale): (WebKit::QtViewportHandler::viewportAttributesChanged): (WebKit::QtViewportHandler::pageContentsSizeChanged): (WebKit::QtViewportHandler::setPageItemRectVisible): (WebKit::QtViewportHandler::animatePageItemRectVisible): (WebKit::QtViewportHandler::flickMoveStarted): (WebKit::QtViewportHandler::flickMoveEnded): (WebKit::QtViewportHandler::pageItemPositionChanged): (WebKit::QtViewportHandler::pageContentPositionRequested): (WebKit::QtViewportHandler::scaleAnimationStateChanged): (WebKit::QtViewportHandler::scaleAnimationValueChanged): (WebKit::QtViewportHandler::touchBegin): (WebKit::QtViewportHandler::touchEnd): (WebKit::QtViewportHandler::computePosRangeForPageItemAtScale): (WebKit::QtViewportHandler::focusEditableArea): (WebKit::QtViewportHandler::zoomToAreaGestureEnded): (WebKit::QtViewportHandler::nearestValidBounds): (WebKit::QtViewportHandler::setCSSScale): (WebKit::QtViewportHandler::currentCSSScale): (WebKit::QtViewportHandler::scrollAnimationActive): (WebKit::QtViewportHandler::panGestureActive): (WebKit::QtViewportHandler::panGestureStarted): (WebKit::QtViewportHandler::panGestureRequestUpdate): (WebKit::QtViewportHandler::panGestureEnded): (WebKit::QtViewportHandler::panGestureCancelled): (WebKit::QtViewportHandler::scaleAnimationActive): (WebKit::QtViewportHandler::cancelScrollAnimation): (WebKit::QtViewportHandler::interruptScaleAnimation): (WebKit::QtViewportHandler::pinchGestureActive): (WebKit::QtViewportHandler::pinchGestureStarted): (WebKit::QtViewportHandler::pinchGestureRequestUpdate): (WebKit::QtViewportHandler::pinchGestureEnded): (WebKit::QtViewportHandler::pinchGestureCancelled): (WebKit::QtViewportHandler::visibleContentsRect): (WebKit::QtViewportHandler::informVisibleContentChange): (WebKit::QtViewportHandler::viewportItemSizeChanged): (WebKit::QtViewportHandler::scaleContent): * UIProcess/qt/QtViewportHandler.h: Copied from Source/WebKit2/UIProcess/qt/QtViewportInteractionEngine.h. (QtViewportHandler): * UIProcess/qt/QtViewportInteractionEngine.cpp: Removed. * UIProcess/qt/QtViewportInteractionEngine.h: Removed. * UIProcess/qt/QtWebPageEventHandler.cpp: (WebKit::QtWebPageEventHandler::QtWebPageEventHandler): (WebKit::QtWebPageEventHandler::setViewportHandler): (WebKit::QtWebPageEventHandler::inputPanelVisibleChanged): (WebKit::QtWebPageEventHandler::doneWithTouchEvent): (WebKit::QtWebPageEventHandler::didFindZoomableArea): * UIProcess/qt/QtWebPageEventHandler.h: (WebKit): (QtWebPageEventHandler): (WebKit::QtWebPageEventHandler::viewportHandler): 2012-06-04 David Kilzer BUILD FIX: FeatureDefines.xcconfig should match across projects * Configurations/FeatureDefines.xcconfig: - Add missing ENABLE_LEGACY_CSS_VENDOR_PREFIXES. 2012-06-04 Allan Sandfeld Jensen [Qt] Tap-to-zoom overshoot animation. https://bugs.webkit.org/show_bug.cgi?id=87108 Reviewed by Tor Arne Vestbø. Reverts the change in animation, so the default is more "neutral". This should be made configurable later. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::animatePageItemRectVisible): 2012-06-04 Andras Becsi [Qt][WK2] Refactor the tap gesture recognizer https://bugs.webkit.org/show_bug.cgi?id=88096 Reviewed by Simon Hausmann. Refactor the tap gesture recognizer so that its internal state machine is self contained and independent of input event types. Also change the internal API for tap highlighting to make the code easier to understand on the caller side. This patch makes the tap gesture recognizer more robust, consistent with other gesture recognizers and fixes some issues related to highlighting and link activation with respect to native touch events. * UIProcess/qt/QtTapGestureRecognizer.cpp: (WebKit::QtTapGestureRecognizer::QtTapGestureRecognizer): (WebKit::QtTapGestureRecognizer::withinDistance): (WebKit::QtTapGestureRecognizer::update): (WebKit::QtTapGestureRecognizer::finish): (WebKit::QtTapGestureRecognizer::cancel): (WebKit::QtTapGestureRecognizer::highlightTimeout): (WebKit::QtTapGestureRecognizer::singleTapTimeout): (WebKit::QtTapGestureRecognizer::tapAndHoldTimeout): (WebKit::QtTapGestureRecognizer::reset): * UIProcess/qt/QtTapGestureRecognizer.h: (QtTapGestureRecognizer): * UIProcess/qt/QtWebPageEventHandler.cpp: (WebKit::QtWebPageEventHandler::QtWebPageEventHandler): (WebKit::QtWebPageEventHandler::activateTapHighlight): (WebKit::QtWebPageEventHandler::deactivateTapHighlight): (WebKit): (WebKit::QtWebPageEventHandler::handleSingleTapEvent): (WebKit::QtWebPageEventHandler::handleDoubleTapEvent): (WebKit::QtWebPageEventHandler::doneWithTouchEvent): * UIProcess/qt/QtWebPageEventHandler.h: (QtWebPageEventHandler): 2012-06-02 Geoffrey Garen Try to fix the Windows build. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-06-02 Andy Estes [WebKit2] Use USE(), ENABLE(), and HAVE() macros in more places https://bugs.webkit.org/show_bug.cgi?id=88182 Reviewed by Sam Weinig. Use USE(APPKIT): * Shared/mac/NativeWebKeyboardEventMac.mm: * Shared/mac/NativeWebMouseEventMac.mm: * Shared/mac/NativeWebWheelEventMac.mm: * Shared/mac/WebEventFactory.h: * UIProcess/API/mac/WKTextInputWindowController.h: * UIProcess/API/mac/WKTextInputWindowController.mm: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.h: Use ENABLE(NETSCAPE_PLUGIN_API): * UIProcess/API/C/WKPluginSiteDataManager.cpp: (WKPluginSiteDataManagerClearSiteData): (WKPluginSiteDataManagerClearAllSiteData): Use USE(AUTOCORRECTION_PANEL): * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::showCorrectionPanel): (WebKit::PageClientImpl::dismissCorrectionPanel): (WebKit::PageClientImpl::dismissCorrectionPanelSoon): * UIProcess/mac/CorrectionPanel.mm: Use HAVE(HOSTED_CORE_ANIMATION): * UIProcess/mac/WebContextMac.mm: Put ENABLE(FULLSCREEN_API) in the right place: * UIProcess/mac/WebFullScreenManagerProxyMac.mm: Remove unnecessary use of USE(APPKIT): * UIProcess/mac/WebPageProxyMac.mm: Use USE(SECURITY_FRAMEWORK): * WebProcess/Authentication/mac/AuthenticationManager.mac.mm: Use ENABLE(CONTEXT_MENUS): * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: Use USE(SECURITY_FRAMEWORK): * WebProcess/WebProcess.h: Remove unnecessary use of USE(SECURITY_FRAMEWORK): * WebProcess/mac/WebProcessMac.mm: 2012-06-02 Andy Estes Remove a duplicate INIT() from WebSystemInterface.mm https://bugs.webkit.org/show_bug.cgi?id=88181 Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2012-06-02 Andy Estes Remove unnecessary import of https://bugs.webkit.org/show_bug.cgi?id=88180 Reviewed by Sam Weinig. * UIProcess/mac/WKFullKeyboardAccessWatcher.h: 2012-06-02 Andy Estes Ensure cpu_type_t is defined by including https://bugs.webkit.org/show_bug.cgi?id=88178 Reviewed by Anders Carlsson. * Shared/Plugins/PluginModuleInfo.h: 2012-06-02 Sam Weinig InjectedBundles' sandbox extensions don't do what we think they do https://bugs.webkit.org/show_bug.cgi?id=88177 Reviewed by Anders Carlsson. This cannot be tested with our current infrastructure (or any modifications of the infrastructure I can think of) since it relies on the bundle being put outside the build directory where WebKit is put. * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: (WebKit::InjectedBundle::load): Use SandboxExtension::consumePermanently() rather than consume(), otherwise, nulling out the SandboxExtension a few lines later invalidates the extension we just consumed. 2012-06-02 Dan Bernstein Reverted the last change. * WebKit2.xcodeproj/project.pbxproj: 2012-06-02 Dan Bernstein Stop treating two Python scripts as private headers. * WebKit2.xcodeproj/project.pbxproj: Removed model.py and parser.py from the Copy Headers build phase. 2012-06-02 Zeno Albisser Fix and enable WebGL for WebKit2 on Qt. https://bugs.webkit.org/show_bug.cgi?id=86214 Added glue code to make use of GraphicsSurface as a backend for the webgl-canvas in case of WK2. Reviewed by Noam Rosenthal. * UIProcess/API/qt/qwebpreferences.cpp: (QWebPreferencesPrivate::testAttribute): (QWebPreferencesPrivate::setAttribute): (QWebPreferences::webGLEnabled): (QWebPreferences::setWebGLEnabled): * UIProcess/API/qt/qwebpreferences_p.h: * UIProcess/API/qt/qwebpreferences_p_p.h: Added WebGLEnabled enum to allow enabling/disabling of WebGL using QWebPreferences. * UIProcess/LayerTreeHostProxy.cpp: (WebKit::LayerTreeHostProxy::syncCanvas): Dispatch syncCanvas calls to the apropriate WebLayerTreeRenderer. * UIProcess/LayerTreeHostProxy.h: (LayerTreeHostProxy): * UIProcess/LayerTreeHostProxy.messages.in: * UIProcess/WebLayerTreeRenderer.h: (WebLayerTreeRenderer): * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::syncCanvas): (WebKit::WebLayerTreeRenderer::deleteLayer): (WebKit::WebLayerTreeRenderer::purgeGLResources): Create a TextureMapperSurfaceBackingStore for the canvas if necessary and pass or update the graphicsSurfaceToken for to be used with the backing store. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::WebGraphicsLayer): (WebCore): (WebCore::WebGraphicsLayer::setContentsToCanvas): (WebCore::WebGraphicsLayer::syncCanvas): Copy the multisample framebuffer contents onto the GraphicsSurface. Notify the UIProcess of the availability of a new texture. (WebCore::WebGraphicsLayer::syncCompositingStateForThisLayerOnly): Sync the canvas as well. * WebProcess/WebCoreSupport/WebGraphicsLayer.h: Added a pure virtual function syncCanvas. This is guarded by PLATFORM(QT). (WebGraphicsLayerClient): (WebGraphicsLayer): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::syncLayerChildren): (WebKit): (WebKit::LayerTreeHostQt::syncCanvas): * WebProcess/WebPage/qt/LayerTreeHostQt.h: (LayerTreeHostQt): 2012-06-01 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=88119 REGRESSION (r99448) Zero-sized plug-ins no longer get an NPP_SetWindow call Followup to r119260 Rubber-stamped by Anders Carlsson. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::callSetWindow): Set the m_hasCalledSetWindow here... (WebKit::NetscapePlugin::geometryDidChange): ...instead of here. 2012-06-01 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=88119 REGRESSION (r99448) Zero-sized plug-ins no longer get an NPP_SetWindow call Reviewed by Oliver Hunt. Add a flag to NetscapePlugin to track whether or not NPP_SetWindow has ever been called. Check this flag in geometryDidChange to make sure every plug-in gets the call at least once. "Everybody gets one. Tell him, Peter." "Apparently everybody gets one." "Bingo." * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): (WebKit::NetscapePlugin::geometryDidChange): * WebProcess/Plugins/Netscape/NetscapePlugin.h: (NetscapePlugin): 2012-06-01 Dinu Jacob [WK2] WebLayerTreeRenderer::setContentsSize called synchronously https://bugs.webkit.org/show_bug.cgi?id=88091 Reviewed by Noam Rosenthal. Do not call WebLayerTreeRenderer::setContentsSize synchronously from LayerTreeHostProxy. * UIProcess/LayerTreeHostProxy.cpp: (WebKit::LayerTreeHostProxy::setContentsSize): 2012-06-01 Dinu Jacob [Qt][WK2] Set QWebKitTest::isScalable default as false https://bugs.webkit.org/show_bug.cgi?id=88095 Reviewed by Tor Arne Vestbø. Set QWebKitTest::isScalable default as false * UIProcess/API/qt/qwebkittest.cpp: (QWebKitTest::isScalable): 2012-06-01 Allan Sandfeld Jensen [Qt] Remove QtViewportInteractionEngine::pageItemSizeChanged. https://bugs.webkit.org/show_bug.cgi?id=88082 Reviewed by Kenneth Rohde Christiansen. The function was causing flickering, and after testing it was verified that it was no longer needed either. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-06-01 Dinu Jacob [Qt][WK2] Contents not rendered in MiniBrowser for some pages https://bugs.webkit.org/show_bug.cgi?id=87922 Reviewed by Kenneth Rohde Christiansen. Set drawing area visible contents rect if new visible contents rect is different from the previous one. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::informVisibleContentChange): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-06-01 Kenneth Rohde Christiansen [Qt] Move suspension to QtViewportInteractionEngine https://bugs.webkit.org/show_bug.cgi?id=88078 Reviewed by Simon Hausmann. Next step is to take care of visibility changes. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate): (QQuickWebViewFlickablePrivate::onComponentComplete): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): (QQuickWebViewFlickablePrivate): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::ViewportUpdateDeferrer::ViewportUpdateDeferrer): (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer): (WebKit::QtViewportInteractionEngine::suspendPageContent): (WebKit): (WebKit::QtViewportInteractionEngine::resumePageContent): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-06-01 Dinu Jacob [Qt][W2] Qml Error in ViewportInfoItem.qml in MiniBrowser https://bugs.webkit.org/show_bug.cgi?id=87999 Reviewed by Kenneth Rohde Christiansen. Return default viewport attributes rather than invalid QVariant. * UIProcess/API/qt/qwebkittest.cpp: (QWebKitTest::contentsScale): (QWebKitTest::devicePixelRatio): (QWebKitTest::initialScale): (QWebKitTest::minimumScale): (QWebKitTest::maximumScale): (QWebKitTest::isScalable): (QWebKitTest::layoutSize): 2012-05-31 Kenneth Rohde Christiansen [Qt] Clean up our viewport handling mess https://bugs.webkit.org/show_bug.cgi?id=87977 Reviewed by Simon Hausmann. Consolidated functionality from QQuickWebViewPrivate* into ViewportInteractionEngine that belongs there, in preparation for renaming ViewportInteractionEngine in the future. Remove unneeded methods and move others to private. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate): (QQuickWebViewFlickablePrivate::onComponentComplete): (QQuickWebViewFlickablePrivate::didChangeViewportProperties): (QQuickWebViewFlickablePrivate::updateViewportSize): (QQuickWebViewFlickablePrivate::_q_resume): (QQuickWebViewFlickablePrivate::pageDidRequestScroll): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): (QQuickWebViewFlickablePrivate): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer): (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::viewportAttributesChanged): (WebKit::QtViewportInteractionEngine::pageContentsSizeChanged): (WebKit::QtViewportInteractionEngine::pageItemPositionChanged): (WebKit::QtViewportInteractionEngine::pageContentPositionRequested): (WebKit::QtViewportInteractionEngine::visibleContentsRect): (WebKit): (WebKit::QtViewportInteractionEngine::informVisibleContentChange): (WebKit::QtViewportInteractionEngine::viewportItemSizeChanged): * UIProcess/qt/QtViewportInteractionEngine.h: (WebKit): (QtViewportInteractionEngine): 2012-05-31 Hajime Morrita REGRESSION(r117572): editing/spelling/spellcheck-async-remove-frame.html crashes on Mac https://bugs.webkit.org/show_bug.cgi?id=86859 Reviewed by Ryosuke Niwa. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::requestCheckingOfString): * WebProcess/WebCoreSupport/WebEditorClient.h: 2012-05-31 Andy Estes [WebKit2] Remove nested #if conditions from messages.in files https://bugs.webkit.org/show_bug.cgi?id=88039 Reviewed by Filip Pizlo. The code generator that processes messages.in files can't handle nested #if conditions. Sadly I added said conditions in r117700 but failed to verify the generated result. Un-nest the conditions I added. * UIProcess/WebPageProxy.messages.in: * WebProcess/WebPage/WebPage.messages.in: 2012-05-31 Andy Estes Disentangle code that relies on USE(AUTOMATIC_TEXT_REPLACEMENT) from that which merely relies on PLATFORM(MAC) https://bugs.webkit.org/show_bug.cgi?id=87933 Reviewed by Dan Bernstein. * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebCoreSupport/mac/WebEditorClientMac.mm: 2012-05-31 Carlos Garcia Campos [GTK] Add webkit_download_get_request to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=87957 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitDownload.cpp: (webkit_download_get_request): Return the WebKitURIRequest representing the request that originated the download. * UIProcess/API/gtk/WebKitDownload.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol. * UIProcess/API/gtk/tests/TestDownloads.cpp: (testDownloadLocalFile): (testDownloadRemoteFile): 2012-05-31 Carlos Garcia Campos [SOUP] WebProcess crashes when a download is started from an existing ResourceHandle https://bugs.webkit.org/show_bug.cgi?id=87953 Reviewed by Martin Robinson. The output stream to write the downloaded data is created in the didReceiveResponse callback of the download client. When a download is created for an existing ResourceHandle (this happens for example when policy decision is download), the response has already been received. In this case we should make sure that the download client is notified about the response, so that when data actually arrives the output stream has already been created. * WebProcess/Downloads/soup/DownloadSoup.cpp: (WebKit::Download::startWithHandle): 2012-05-31 Carlos Garcia Campos [GTK] Fix webkit_web_view_can_execute_editing_command() API doc https://bugs.webkit.org/show_bug.cgi?id=87930 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitWebView.cpp: 2012-05-31 Tor Arne Vestbø [Qt] Simplify QT_VERSION_CHECKS for Qt5 by introducing HAVE(QT5) https://bugs.webkit.org/show_bug.cgi?id=87955 Reviewed by Simon Hausmann. * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: 2012-05-31 Zalan Bujtas [Qt][WK2] Add missing ViewportUpdateDeferrer guarding to setPageItemRectVisible() calls. https://bugs.webkit.org/show_bug.cgi?id=87936 Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::viewportAttributesChanged): (WebKit::QtViewportInteractionEngine::pageContentsSizeChanged): 2012-05-31 Keunsoon Lee [EFL][WK2] Add WKURLRequestEfl and WKURLResponseEfl https://bugs.webkit.org/show_bug.cgi?id=70231 Reviewed by Chang Shu. These codes can be used for WKPageDecidePolicyForResponseCallback on page policy callbacks. The callback conveys WKURLResponseRef and WKURLRequestRef as parameter. By the way, EFL browser needs content type from response to decide correct policy. Another information, cookie, is necessary with similar reason. But, there is no way to obtain such information on WebKit2 main stream, except for WKURLRequestCopyURL(). So, EFL port created those files to extract necessary information from WKURLResponseRef and WKURLRequestRef, and not to desturb WebKit2 main stream. * Shared/API/c/efl/WKURLRequestEfl.cpp: Added. (WKURLRequestEflCopyCookies): extracting cookie information from WKURLRequestRef. * Shared/API/c/efl/WKURLRequestEfl.h: Added. * Shared/API/c/efl/WKURLResponseEfl.cpp: Added. (WKURLResponseEflCopyContentType): extracting content type (i.e. MIME type) from WKURLResponseRef. * Shared/API/c/efl/WKURLResponseEfl.h: Added. * Shared/efl/WebCoreArgumentCodersEfl.cpp: Added. (CoreIPC): (CoreIPC::::encode): (CoreIPC::::decode): * Shared/efl/WebURLRequestEfl.cpp: Added. (WebKit): (WebKit::WebURLRequestEfl::WebURLRequestEfl): (WebKit::WebURLRequestEfl::cookies): obtaining cookie information from ResourceRequest. * Shared/efl/WebURLRequestEfl.h: Added. (WebKit): (WebURLRequestEfl): (WebKit::WebURLRequestEfl::create): * Shared/efl/WebURLResponseEfl.cpp: Added. (WebKit): (WebKit::WebURLResponseEfl::WebURLResponseEfl): (WebKit::WebURLResponseEfl::contentType): obtaining content type (i.e. MIME type) from ResourceResponse. * Shared/efl/WebURLResponseEfl.h: Added. (WebKit): (WebURLResponseEfl): (WebKit::WebURLResponseEfl::create): 2012-05-31 Gyuyoung Kim [EFL][WK2] Rename ewk_private.h to ewk_view_private.h https://bugs.webkit.org/show_bug.cgi?id=87923 Reviewed by Kenneth Rohde Christiansen. EFL WK1 decided to divide up ewk_private.h into each file's XXX_private.h file in order to maintain internal functions more easily. EFL WK2 needs to adjust this as well. * UIProcess/API/efl/PageClientImpl.cpp: * UIProcess/API/efl/ewk_view_private.h: Renamed from Source/WebKit2/UIProcess/API/efl/ewk_private.h. (WebCore): * UIProcess/cairo/BackingStoreCairo.cpp: 2012-05-31 Andy Estes Move the specification of framework and library linking out of WebKit2.xcodeproj and into WebKit2.xcconfig https://bugs.webkit.org/show_bug.cgi?id=87932 Reviewed by Dan Bernstein. Doing this makes it easier to vary linking based on SDK or other factors. * Configurations/WebKit2.xcconfig: Create FRAMEWORK_AND_LIBRARY_LDFLAGS, which specifies the same list of frameworks and libraries that were previously in WebKit2's 'Link Binary With Libraries' build phase, and append it to $(OTHER_LDFLAGS). * WebKit2.xcodeproj/project.pbxproj: Remove all frameworks and libraries from the 'Link Binary With Libraries' build phase. 2012-05-30 Sudarsana Nagineni [GTK] [WK2] Memory leak in webkitWebViewBaseStartDrag https://bugs.webkit.org/show_bug.cgi?id=87756 Reviewed by Carlos Garcia Campos. Fixed memory leaks in drag and drop by using adoptRef instead of just getting new references. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseStartDrag): 2012-05-30 Luiz Agostini [Qt] handled touchmove events should not cancel tap gesture recognition https://bugs.webkit.org/show_bug.cgi?id=87808 Reviewed by Kenneth Rohde Christiansen. Tap gesture recognition should not be canceled if a touchmove event is handled by the web process. * UIProcess/qt/QtWebPageEventHandler.cpp: (WebKit::QtWebPageEventHandler::doneWithTouchEvent): 2012-05-30 Mario Sanchez Prada [GTK][WK2] Errors in documentation about webkit_web_view_run_javascript() https://bugs.webkit.org/show_bug.cgi?id=87866 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitWebView.cpp: Fix errors. 2012-05-30 Andy Estes WebProcessMainMac.mm doesn't need to import WKView.h. Rubber-stamped by Anders Carlsson. * WebProcess/mac/WebProcessMainMac.mm: 2012-05-30 Marcelo Lira WebKit2: Implement layoutTestController.setPluginsEnabled() in WebKitTestRunner. https://bugs.webkit.org/show_bug.cgi?id=58593 Adds the ability to change the pluginsEnabled flag in WebCore::Settings to WebKitTestRunner's LayoutTestController. The flag is modified via the public C API of the WebProcess. Reviewed by Darin Adler. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetPluginsEnabled): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setPluginsEnabled): Calls the setPluginsEnabled method for the WebCore::Settings of each WebCore::Page in the current page group. (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-05-30 Caio Marcelo de Oliveira Filho HashTable.h has using directives for std::pair and std::make_pair https://bugs.webkit.org/show_bug.cgi?id=29919 Reviewed by Darin Adler. Change code to use std::pair and std::make_pair. * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm: (WebKit::DynamicLinkerEnvironmentExtractor::processEnvironmentVariable): * UIProcess/WebContext.cpp: (WebKit::WebContext::postMessageToInjectedBundle): 2012-05-30 Kenneth Rohde Christiansen Unreviewed: Fix wrongly typed Qt slot. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): 2012-05-30 Kenneth Rohde Christiansen [Qt] Move ViewportAttribute related methods to the interaction engine. https://bugs.webkit.org/show_bug.cgi?id=87855 Reviewed by Simon Hausmann. Move the logic of didChange{ViewportProperties|ContentsSize} to the interaction engine and update our testing object. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewLegacyPrivate::QQuickWebViewLegacyPrivate): (QQuickWebViewFlickablePrivate::didChangeViewportProperties): (QQuickWebViewFlickablePrivate::didChangeContentsSize): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/qwebkittest.cpp: (QWebKitTest::contentsScale): (QWebKitTest::devicePixelRatio): (QWebKitTest::initialScale): (QWebKitTest::minimumScale): (QWebKitTest::maximumScale): (QWebKitTest::isScalable): (QWebKitTest::layoutSize): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::viewportAttributesChanged): (WebKit): (WebKit::QtViewportInteractionEngine::pageContentsSizeChanged): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-05-30 Kenneth Rohde Christiansen [Qt] Do renames in ViewportInteractionEngine as agreed upon https://bugs.webkit.org/show_bug.cgi?id=87845 Reviewed by Simon Hausmann. Mostly moving methods around and renaming them to be more consistent and avoid terminology clashes. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::didChangeViewportProperties): (QQuickWebViewFlickablePrivate::pageDidRequestScroll): (QQuickWebViewFlickablePrivate::didChangeContentsSize): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::boundPosition): (WebKit): (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::setPageItemRectVisible): (WebKit::QtViewportInteractionEngine::animatePageItemRectVisible): (WebKit::QtViewportInteractionEngine::flickMoveStarted): (WebKit::QtViewportInteractionEngine::flickMoveEnded): (WebKit::QtViewportInteractionEngine::pageItemPositionChanged): (WebKit::QtViewportInteractionEngine::pageContentPositionRequest): (WebKit::QtViewportInteractionEngine::scaleAnimationValueChanged): (WebKit::QtViewportInteractionEngine::computePosRangeForPageItemAtScale): (WebKit::QtViewportInteractionEngine::focusEditableArea): (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): (WebKit::QtViewportInteractionEngine::nearestValidBounds): (WebKit::QtViewportInteractionEngine::cancelScrollAnimation): (WebKit::QtViewportInteractionEngine::pinchGestureEnded): (WebKit::QtViewportInteractionEngine::pageItemSizeChanged): * UIProcess/qt/QtViewportInteractionEngine.h: (WebKit::QtViewportInteractionEngine::setDevicePixelRatio): (QtViewportInteractionEngine): 2012-05-30 Mariusz Grzegorczyk , Ryuan Choi [EFL][WK2] Fix WebKit2-EFL build https://bugs.webkit.org/show_bug.cgi?id=83693 Reviewed by Carlos Garcia Campos. * CMakeLists.txt: Move IDL generator codes to generate port specific *.messages.in. * PlatformEfl.cmake: Add soup related files after r115411 and includes to fix build break. * UIProcess/API/efl/PageClientImpl.cpp: Fix build break with ENABLE_TOUCH_EVENTS. (WebKit): (WebKit::PageClientImpl::doneWithTouchEvent): * UIProcess/API/efl/PageClientImpl.h: (PageClientImpl): * WebProcess/WebCoreSupport/WebChromeClient.cpp: Fix build break with ENABLE_INPUT_TYPE_COLOR and ENABLE_REGISTER_PROTOCOL_HANDLER. (WebKit): (WebKit::WebChromeClient::createColorChooser): * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: Fix build break with ENABLE_WEB_INTENTS (WebKit): (WebKit::WebFrameLoaderClient::dispatchIntent): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: (WebCore): (WebFrameLoaderClient): * WebProcess/WebProcess.cpp: Guard PLATFORM_STRATEGIES codes. (WebKit::WebProcess::didGetPlugins): * WebProcess/soup/WebSoupRequestManager.cpp: Try to share with EFL port. (WebKit::WebSoupRequestManager::didHandleURIRequest): 2012-05-30 Kenneth Rohde Christiansen [Qt] Variable renaming as preparation of further refactoring. Rubberstamped by Simon Hausmann. Change m_viewport to m_viewportItem and m_content to m_pageItem. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::setItemRectVisible): (WebKit::QtViewportInteractionEngine::animateItemRectVisible): (WebKit::QtViewportInteractionEngine::flickableMoveStarted): (WebKit::QtViewportInteractionEngine::flickableMoveEnded): (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate): (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged): (WebKit::QtViewportInteractionEngine::pagePositionRequest): (WebKit::QtViewportInteractionEngine::computePosRangeForItemAtScale): (WebKit::QtViewportInteractionEngine::focusEditableArea): (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): (WebKit::QtViewportInteractionEngine::nearestValidBounds): (WebKit::QtViewportInteractionEngine::reset): (WebKit::QtViewportInteractionEngine::setCSSScale): (WebKit::QtViewportInteractionEngine::currentCSSScale): (WebKit::QtViewportInteractionEngine::scrollAnimationActive): (WebKit::QtViewportInteractionEngine::panGestureActive): (WebKit::QtViewportInteractionEngine::panGestureStarted): (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate): (WebKit::QtViewportInteractionEngine::panGestureEnded): (WebKit::QtViewportInteractionEngine::panGestureCancelled): (WebKit::QtViewportInteractionEngine::cancelScrollAnimation): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate): (WebKit::QtViewportInteractionEngine::scaleContent): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-05-30 Zalan Bujtas [Qt][WK2] Do not use anonymous variables for ViewportUpdateDeferrer. https://bugs.webkit.org/show_bug.cgi?id=87831 Reviewed by Kenneth Rohde Christiansen. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::pagePositionRequest): (WebKit::QtViewportInteractionEngine::cancelScrollAnimation): (WebKit::QtViewportInteractionEngine::itemSizeChanged): 2012-05-30 Carlos Garcia Campos Unreviewed. Fix WebKit2GTK+ API tests in the bots. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewCanShowMIMEType): Remove the check for multimedia and plugins MIME types since they depend on the configuration and they are not available in the bots. 2012-05-29 Jer Noble Noticeable delay taking an HTML5 trailer fullscreen. https://bugs.webkit.org/show_bug.cgi?id=87794 Reviewed by Darin Adler. Work around a not-entirely understood delay when using the results of a CGWindowListCreateImage() call as the contents of a placeholder view. The backing of the resulting CGImageRef resides on the WindowServer, and drawing that image requires synchronous calls to the WindowServer process. By copying the image data, up front, into our own process, we can avoid those synchronous calls later and avoid the delay-causing drawing behavior. * UIProcess/mac/WKFullScreenWindowController.mm: (CGImageDeepCopy): Added a helper function which copies the image data into a new CGImage. (-[WKFullScreenWindowController enterFullScreen:]): Use the above. 2012-05-29 Sudarsana Nagineni [GTK] [WK2] Reproducible crash in performDragControllerAction https://bugs.webkit.org/show_bug.cgi?id=87744 Reviewed by Martin Robinson. Fix a crash by using deref() instead of delete to dereference and release the platformData of DragData. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): 2012-05-29 Simon Pena [GTK] Missing field initializers for WKPageLoaderClient and WKPageUIClient https://bugs.webkit.org/show_bug.cgi?id=87745 Reviewed by Carlos Garcia Campos. Add missing initializers for WKPageLoaderClient and WKPageUIClient, for callbacks WKPagePluginDidFailCallback and WKPageUnavailablePluginButtonClickedCallback, introduced in revision r116716. * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): Initialize WKPagePluginDidFailCallback * UIProcess/API/gtk/WebKitUIClient.cpp: (attachUIClientToView): Initialize callback WKPageUnavailablePluginButtonClickedCallback 2012-05-29 Carlos Garcia Campos [GTK] Policy decision headers are not included in the main webkit2.h header https://bugs.webkit.org/show_bug.cgi?id=87753 Reviewed by Martin Robinson. * UIProcess/API/gtk/webkit2.h: Include WebKitNavigationPolicyDecision.h and WebKitResponsePolicyDecision.h. 2012-05-29 Carlos Garcia Campos [GTK] Add webkit_web_view_can_show_mime_type() to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=85998 Reviewed by Martin Robinson. And use it in the default handler of WebKitWebView::decide-policy signal to decide whether to use or ignore a response policy decision depending on whether the mime type of the response can be displayed in the WebView or not. * UIProcess/API/gtk/WebKitURIResponse.cpp: (webkitURIResponseGetProperty): Add getter for mime-type property. (webkit_uri_response_class_init): Add mime-type property. (webkit_uri_response_get_mime_type): Return the mime type of the response. * UIProcess/API/gtk/WebKitURIResponse.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewDecidePolicy): In case of response policy decisions, use the URI response to decide what to do: download if the response is an attachment, use if the mime type is supported by the web view or ignore otherwise. (webkit_web_view_can_show_mime_type): Returns whether the given mime type can be displayed in the WebView or not. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/TestResources.cpp: (testWebResourceResponse): (testWebResourceMimeType): (serverCallback): (beforeAll): * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewCanShowMIMEType): (beforeAll): 2012-05-29 David Barr Introduce ENABLE_CSS_IMAGE_RESOLUTION compile flag https://bugs.webkit.org/show_bug.cgi?id=87685 Reviewed by Eric Seidel. Add a configuration option for CSS image-resolution support, disabling it by default. * Configurations/FeatureDefines.xcconfig: 2012-05-29 Kenneth Rohde Christiansen [Qt] Move tests from DesktopBehavior which can be made to work https://bugs.webkit.org/show_bug.cgi?id=87736 Rubberstamped by Simon Hausmann. Move and modify the following tests to WebView/ and make them use touch events. * UIProcess/API/qt/tests/qmltests/WebView/tst_itemSelector.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml. * UIProcess/API/qt/tests/qmltests/WebView/tst_messaging.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml. * UIProcess/API/qt/tests/qmltests/WebView/tst_multiFileUpload.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_multiFileUpload.qml. * UIProcess/API/qt/tests/qmltests/WebView/tst_singleFileUpload.qml: Renamed from Source/WebKit2/UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_singleFileUpload.qml. 2012-05-29 Tor Arne Vestbø [Qt] Sync up favicon-implementation with WebView url changes in r118158 https://bugs.webkit.org/show_bug.cgi?id=87133 We now base64-encode the page url in the image-provider url, so that any normalization done by QUrl will not mess up the page-url. The logic of creating and parsing the provider-url has been moved into the image provider, to keep it in one place. We were also releasing icons (even ones we hadn't retained), which we can't do since we don't know when the icon url is no longer in use. Reviewed-by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::loadProgressDidChange): (QQuickWebViewPrivate::_q_onUrlChanged): (QQuickWebViewPrivate::_q_onIconChangedForPageURL): (QQuickWebViewPrivate::updateIcon): (QQuickWebView::icon): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/qwebiconimageprovider.cpp: (QWebIconImageProvider::iconURLForPageURLInContext): (QWebIconImageProvider::requestImage): * UIProcess/API/qt/qwebiconimageprovider_p.h: (WebKit): * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: * UIProcess/qt/QtWebIconDatabaseClient.cpp: (WebKit::QtWebIconDatabaseClient::didChangeIconForPageURL): (WebKit::QtWebIconDatabaseClient::iconForPageURL): (WebKit): (WebKit::QtWebIconDatabaseClient::iconImageForPageURL): * UIProcess/qt/QtWebIconDatabaseClient.h: (QtWebIconDatabaseClient): 2012-05-29 Kenneth Rohde Christiansen [Qt][WK2] Fix failing qmltests::FitToView::test_basic() https://bugs.webkit.org/show_bug.cgi?id=87236 Reviewed by Simon Hausmann. The fix is a combination of things. First of all some events were emitted at the wrong times or when nothing had changed. We also initialized the view saying it was suspended which is not correct. Another bug was that the touch tap, didn't result in marking the view as having user interaction. This was recently fixed in r118493. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::setContentsScale): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::QQuickWebViewFlickablePrivate): Make sure pageIsSuspended is initialized to false. (QQuickWebViewFlickablePrivate::_q_onInformVisibleContentChange): Early bail out if there is no change. Inform contentScaleCommitted if the scale changed since last time. (QQuickWebViewFlickablePrivate::didChangeContentsSize): Make sure to commit the right signals, ie. *Changed and not *Committed. * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qwebkittest.cpp: (touchPoint): (QWebKitTest::sendTouchEvent): (QWebKitTest::touchTap): (QWebKitTest::touchDoubleTap): Add proper touch emulation for the testing system. Call directly to our WebKit API (avoid Qt event loop) to ensure all events gets delivered. * UIProcess/API/qt/qwebkittest_p.h: * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::setItemRectVisible): Assert that a ViewportUpdateDeferrer is always used when calling this method. (WebKit::QtViewportInteractionEngine::animateItemRectVisible): Remove work around now we have the proper fix in place. (WebKit::QtViewportInteractionEngine::pagePositionRequest): Do not send the informVisibleContentChange manually, use the ViewportUpdateDeferrer instead. (WebKit::QtViewportInteractionEngine::cancelScrollAnimation): Add missing ViewportUpdateDeferrer. (WebKit::QtViewportInteractionEngine::pinchGestureStarted): No reason to emit informVisibleContentChange before pinch start, as it is always done on end (due to the ViewportUpdateDeferrer). (WebKit::QtViewportInteractionEngine::itemSizeChanged): Add missing ViewportUpdateDeferrer. 2012-05-29 Caio Marcelo de Oliveira Filho [Qt] [WK2] Allow user to inject JS scripts when the page loads https://bugs.webkit.org/show_bug.cgi?id=85827 Reviewed by Simon Hausmann. Create a new experimental property to list URLs of JS scripts that should be loaded when a page is loaded. These scripts will run in the normal JS environment of the page. The supported URL schemes are file:/// and qrc:///. The scripts are read from the UI process and transfered to the Web process. Together with the experimental messaging API this provides a way for the application to manipulate the DOM (by injecting a script that does the manipulation and communicating with it via postMessage). This covers some of the use cases of QWebElement in our WK1 API. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::didRelaunchProcess): (readUserScript): (QQuickWebViewPrivate::updateUserScripts): (QQuickWebViewExperimental::userScripts): (QQuickWebViewExperimental::setUserScripts): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/tests/qmltests/WebView.pro: * UIProcess/API/qt/tests/qmltests/WebView/tst_userScripts.qml: Added. * UIProcess/API/qt/tests/qmltests/common/append-document-title.js: Added. * UIProcess/API/qt/tests/qmltests/common/big-user-script.js: Added. * UIProcess/API/qt/tests/qmltests/common/change-document-title.js: Added. * UIProcess/API/qt/tests/qmltests/resources.qrc: Added. * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::setUserScripts): (WebKit): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/qt/WebPageQt.cpp: (WebKit::WebPage::setUserScripts): (WebKit): 2012-05-29 Sheriff Bot Unreviewed, rolling out r118752. http://trac.webkit.org/changeset/118752 https://bugs.webkit.org/show_bug.cgi?id=87731 incomplete patch (Requested by cmarcelo on #webkit). * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::didRelaunchProcess): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/tests/qmltests/WebView.pro: * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/qt/WebPageProxyQt.cpp: * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/qt/WebPageQt.cpp: 2012-05-21 Caio Marcelo de Oliveira Filho [Qt] [WK2] Allow user to inject JS scripts when the page loads https://bugs.webkit.org/show_bug.cgi?id=85827 Reviewed by Simon Hausmann. Create a new experimental property to list URLs of JS scripts that should be loaded when a page is loaded. These scripts will run in the normal JS environment of the page. The supported URL schemes are file:/// and qrc:///. The scripts are read from the UI process and transfered to the Web process. Together with the experimental messaging API this provides a way for the application to manipulate the DOM (by injecting a script that does the manipulation and communicating with it via postMessage). This covers some of the use cases of QWebElement in our WK1 API. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::didRelaunchProcess): (readUserScript): (QQuickWebViewPrivate::updateUserScripts): (QQuickWebViewExperimental::userScripts): (QQuickWebViewExperimental::setUserScripts): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/tests/qmltests/WebView.pro: * UIProcess/API/qt/tests/qmltests/WebView/tst_userScripts.qml: Added. * UIProcess/API/qt/tests/qmltests/common/append-document-title.js: Added. * UIProcess/API/qt/tests/qmltests/common/big-user-script.js: Added. * UIProcess/API/qt/tests/qmltests/common/change-document-title.js: Added. * UIProcess/API/qt/tests/qmltests/resources.qrc: Added. * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::setUserScripts): (WebKit): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/qt/WebPageQt.cpp: (WebKit::WebPage::setUserScripts): (WebKit): 2012-05-29 Carlos Garcia Campos [GTK] Add return value information to WebKitWebView::load-failed signal documentation https://bugs.webkit.org/show_bug.cgi?id=87704 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_class_init): 2012-05-29 Carlos Garcia Campos [GTK] Add WebKitWebInspector.h to the list of WebKit2 GTK public headers https://bugs.webkit.org/show_bug.cgi?id=87703 Reviewed by Martin Robinson. * GNUmakefile.list.am: Add WebKitWebInspector.h to webkit2gtk_h_api. 2012-05-25 Jesus Sanchez-Palencia WebKitTestRunner needs to support layoutTestController.setJavaScriptProfilingEnabled https://bugs.webkit.org/show_bug.cgi?id=42328 Reviewed by Eric Seidel. Removed unneeded setJavaScriptProfilingEnabled function from WTR after its move to windows.internals.settings. * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp: * WebProcess/InjectedBundle/API/c/WKBundleInspector.h: * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::setJavaScriptProfilingEnabled): * win/WebKit2.def: 2012-05-28 No'am Rosenthal Remove unused argument coders for animation https://bugs.webkit.org/show_bug.cgi?id=87435 Reviewed by Sam Weinig. Left the used argument coders only, behind a proper USE(UI_SIDE_COMPOSITING) flag. * Shared/WebCoreArgumentCoders.cpp: (CoreIPC): * Shared/WebCoreArgumentCoders.h: 2012-05-28 Gyuyoung Kim Move allowRoundingHacks to Internals interface https://bugs.webkit.org/show_bug.cgi?id=87328 Reviewed by Hajime Morita. * win/WebKit2.def: Add setAllowsRoundingHacks() to symbol filter. 2012-05-26 Geoffrey Garen WebKit should be lazy-finalization-safe (esp. the DOM) v2 https://bugs.webkit.org/show_bug.cgi?id=87581 Reviewed by Oliver Hunt. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::destroy): (WebKit::JSNPObject::leakNPObject): * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::finalize): Use static_cast instead of jsCast because jsCast does Structure-based validation, and our Structure is not guaranteed to be alive when we get finalized. 2012-05-25 Maciej Stachowiak REGRESSION (r116720): Subframe PDF scrolls extremely slowly https://bugs.webkit.org/show_bug.cgi?id=87557 Reviewed by Anders Carlsson. It's not possible to make an automated test for this. * WebProcess/Plugins/PDF/BuiltInPDFView.mm: (WebKit::BuiltInPDFView::wantsWheelEvents): Return true instead of false and delete misleading comment. While the built-in PDF view would get added to the set of scrollable areas anyway, there are some code paths that check wantsWheelEvents explicitly, so it seems necessary to reutrn true. 2012-05-25 Brady Eidson https://bugs.webkit.org/show_bug.cgi?id=87418 WebBackForwardList should separate "has no current index" from the integer value of the current index This patch also renames "m_current" to "m_currentIndex" for clarity and symmetry with other variable names that reference "index", It also removes the m_closed and m_enabled flags which were never actually used. Reviewed by Darin Adler. * UIProcess/WebBackForwardList.cpp: (WebKit::WebBackForwardList::WebBackForwardList): (WebKit::WebBackForwardList::addItem): (WebKit::WebBackForwardList::goToItem): (WebKit::WebBackForwardList::currentItem): (WebKit::WebBackForwardList::backItem): (WebKit::WebBackForwardList::forwardItem): (WebKit::WebBackForwardList::itemAtIndex): (WebKit::WebBackForwardList::backListCount): (WebKit::WebBackForwardList::forwardListCount): (WebKit::WebBackForwardList::backListAsImmutableArrayWithLimit): (WebKit::WebBackForwardList::forwardListAsImmutableArrayWithLimit): (WebKit::WebBackForwardList::clear): * UIProcess/WebBackForwardList.h: (WebKit::WebBackForwardList::currentIndex): (WebBackForwardList): * UIProcess/cf/WebBackForwardListCF.cpp: (WebKit::WebBackForwardList::createCFDictionaryRepresentation): (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): 2012-05-25 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=87529 Background tabs hosted in window server flash before painting when they first become active Reviewed by Anders Carlsson. Initialize to LayerHostingModeInWindowServer if that is available to avoid having to re-make the context and re-set everything later on. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): 2012-05-25 Mario Sanchez Prada [GTK][WK2] Implement API for generic permission requests https://bugs.webkit.org/show_bug.cgi?id=84018 Reviewed by Martin Robinson. Added new 'permission-request' signal to WebKitWebView, to be fired when WebKit needs confirmation from the user on whether to allow or deny certain operations, such as sharing the user's location with web site through the Geolocation API. New WebKitPermissionRequest interface, providing allow() and deny() operations, to be called over the objects implementing it when emitted along with the new 'permission-request' signal. * UIProcess/API/gtk/WebKitPermissionRequest.cpp: Added. (webkit_permission_request_default_init): (webkit_permission_request_allow): (webkit_permission_request_deny): * UIProcess/API/gtk/WebKitPermissionRequest.h: Added. (_WebKitPermissionRequestIface): * GNUmakefile.am: Added new files. Added the new signal to WebKitWebView, providing a default handler that will just deny the request when the signal is not handled. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewDecidePermissionRequest): Default handler. (webkit_web_view_class_init): Declare the new signal and connect to the default handler. (webkitWebViewMakePermissionRequest): Helper function to create a make a new permission request and emit the new signal signal. * UIProcess/API/gtk/WebKitWebView.h: (_WebKitWebViewClass): * UIProcess/API/gtk/WebKitWebViewPrivate.h: Declare the creational function webkitWebViewMakePermissionRequest for internal use only. Updated documentation files. * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: 2012-05-25 Grzegorz Czajkowski [WK2] Fix client interface size for WKPageContextMenuClient. https://bugs.webkit.org/show_bug.cgi?id=87472 Reviewed by Carlos Garcia Campos. Add correct offset for version 1 and 2 of WKPageContextMenuClient. Revision 109750 introduces a new API and increases size of interfaceSizesByVersion but the table is not properly initialized for newly introduced version 2. * Shared/APIClientTraits.cpp: (WebKit): 2012-05-24 Andreas Kling Mac bots crashing under PluginInfo destructor. Reviewed by Darin Adler. We can't safely pass WTF::String to another thread without a deref() race, so pass the PluginInfo vector by pointer instead of by value. * UIProcess/WebContext.cpp: (WebKit::WebContext::sendDidGetPlugins): (WebKit::WebContext::handleGetPlugins): * UIProcess/WebContext.h: 2012-05-25 Zalan Bujtas [Qt][WK2] Fix failing qmltests::FitToView::test_basic() https://bugs.webkit.org/show_bug.cgi?id=87236 Reviewed by Kenneth Rohde Christiansen. Rename contentViewportChanged to informVisibleContentChange() to reflect its functionality better. Centralize m_hadUserInteraction flag setting and add assertions on it to ensure that designated functions are called only on user interaction. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::onComponentComplete): (QQuickWebViewFlickablePrivate::updateViewportSize): (QQuickWebViewFlickablePrivate::_q_onInformVisibleContentChange): (QQuickWebViewFlickablePrivate::_q_resume): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate::_q_onInformVisibleContentChange): (QQuickWebViewFlickablePrivate): * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer): (WebKit::QtViewportInteractionEngine::flickableMovingPositionUpdate): (WebKit::QtViewportInteractionEngine::pagePositionRequest): (WebKit::QtViewportInteractionEngine::touchBegin): (WebKit::QtViewportInteractionEngine::focusEditableArea): (WebKit::QtViewportInteractionEngine::zoomToAreaGestureEnded): (WebKit::QtViewportInteractionEngine::panGestureStarted): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): * UIProcess/qt/QtViewportInteractionEngine.h: (QtViewportInteractionEngine): 2012-05-24 Tim Horton Add feature defines for web-facing parts of CSS Regions and Exclusions https://bugs.webkit.org/show_bug.cgi?id=87442 Reviewed by Dan Bernstein. * Configurations/FeatureDefines.xcconfig: 2012-05-24 Geoffrey Garen WebKit should be lazy-finalization-safe (esp. the DOM) https://bugs.webkit.org/show_bug.cgi?id=87456 Reviewed by Filip Pizlo. * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::getOrCreateJSObject): Use the new idioms. (WebKit::NPRuntimeObjectMap::invalidate): Check for null while iterating, since that's possible now. (WebKit::NPRuntimeObjectMap::finalize): Use the new idioms. 2012-05-24 Brady Eidson Fix the build after http://trac.webkit.org/changeset/118441 Also fix a glaring bug with the new code, will run it by original reviewer retroactively. * UIProcess/cf/WebBackForwardListCF.cpp: (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): Fix up the types of the ? operands to appease super-strict compilers. Don't allow negative indexes (besides the -1 "No index" index). 2012-05-24 Brady Eidson and https://bugs.webkit.org/show_bug.cgi?id=87417 (Unrepro) Crashes saving session state in WebBackForwardList Reviewed by Darin Adler. * UIProcess/WebBackForwardList.cpp: (WebKit::WebBackForwardList::addItem): Null check the proposed item and also m_page, to make sure the page hasn't been closed making this list inactive. Be more aggressive about clearing the current entries out if there is no current item index. (WebKit::WebBackForwardList::itemAtIndex): Early null return if there is no current index. (WebKit::WebBackForwardList::clear): Don't put the current item back in the array if there was no current item. * UIProcess/cf/WebBackForwardListCF.cpp: (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Don't create a meaningless WebURL. Don't successfully return a dictionary if any of the entries were null. Be more aggressive about validating the current index we plan to return in the dictionary. (WebKit::WebBackForwardList::restoreFromCFDictionaryRepresentation): More aggressively validate the current index read from disk. Replace a meaningless sanity check with our typical ASSERT. 2012-05-24 Anders Carlsson Make sure that the layer hosting mode is up-to-date when reconnecting to a new web process https://bugs.webkit.org/show_bug.cgi?id=87421 Reviewed by Beth Dakin. Send over the layer hosting mode as part of the web page creation parameters and create the right layer hosting context based on the mode. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: (WebPageCreationParameters): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::creationParameters): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::setLayerHostingMode): (WebKit): (WebKit::TiledCoreAnimationDrawingArea::updateLayerHostingContext): 2012-05-24 John Mellor Font Boosting: Add compile flag and runtime setting https://bugs.webkit.org/show_bug.cgi?id=87394 Reviewed by Adam Barth. Add ENABLE_FONT_BOOSTING. * Configurations/FeatureDefines.xcconfig: 2012-05-24 Yael Aharon [Qt] Stop using the flag FIXED_POSITION_CREATES_STACKING_CONTEXT https://bugs.webkit.org/show_bug.cgi?id=87392 Reviewed by Antonio Gomes. Turn on the setting setFixedPositionCreatesStackingContext. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setResizesToContentsUsingLayoutSize): 2012-05-24 Alexey Proskuryakov [WK2] Let the client give local files universal access on a case by case basis https://bugs.webkit.org/show_bug.cgi?id=87174 Reviewed by Maciej Stachowiak. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::shouldForceUniversalAccessFromLocalURL): * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::shouldForceUniversalAccessFromLocalURL): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/qt/QtBuiltinBundlePage.cpp: (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): Added glue code to call bundle client. 2012-05-24 Alexander Færøy Reorder arguments to compare() in the QML WebView tests https://bugs.webkit.org/show_bug.cgi?id=87374 Reviewed by Simon Hausmann. Based on patch by Kenneth Rohde Christiansen. The reordering is necessary to get correct information printed when the tests fails. Without this, the test suite will display the bogus value and not the expected value. This patch also removes the delayed windowShown since this is not needed anymore, due to us using the touch events instead of mouse events. * UIProcess/API/qt/tests/qmltests/WebView/tst_doubleTapToZoom.qml: 2012-05-24 Allan Sandfeld Jensen [Qt] Tiles not painted after wheel or keyboard scroll. https://bugs.webkit.org/show_bug.cgi?id=87358 Reviewed by Kenneth Rohde Christiansen. After performing a scroll requested from the WebProcess we also need to inform the painting layer of the viewport change. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::pagePositionRequest): 2012-05-24 Andras Becsi [Qt][WK2] Fix bounce-back animation on pinch->pan https://bugs.webkit.org/show_bug.cgi?id=87266 Reviewed by Kenneth Rohde Christiansen. If ending an out-of-bounds pinch gesture with releasing one finger (transition to a pan gesture) the bounce back animation blinks in the end position immediately first, then animates the content back into bounds. QtViewportInteractionEngine::cancelScrollAnimation should return early if there is no active kinetic animation. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::cancelScrollAnimation): 2012-05-23 Ojan Vafai add back the ability to disable flexbox https://bugs.webkit.org/show_bug.cgi?id=87147 Reviewed by Tony Chang. * Configurations/FeatureDefines.xcconfig: 2012-05-23 Jer Noble REGRESSION (117623) - Entering/exiting fullscreen HTML5 videos, there is a quick animated fade https://bugs.webkit.org/show_bug.cgi?id=87294 Reviewed by Darin Adler. When setting the sublayers array on the layer hosting view, wrap the call in a CATransaction which disables animations. * UIProcess/API/mac/WKView.mm: (-[WKView _updateAcceleratedCompositingMode:WebKit::]): 2012-05-23 Dinu Jacob [Qt][Wk2] Assertion failure when selecting an option in select list with size attribute greater than one https://bugs.webkit.org/show_bug.cgi?id=86974 Reviewed by Simon Hausmann. Select list with size attribute greater than one will not initially have any item in selected state (if no option has 'selected' tag), resulting in m_selectedModelIndex in WebPopupMenuProxyQt to be invalid. Hence, need to check whether the old index is invalid before accessing the item at that index. * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_itemSelector.qml: Added new test that tests selection in a select list with size attribute value of 2. * UIProcess/API/qt/tests/qmltests/common/selectwithsize.html: Added. * UIProcess/qt/WebPopupMenuProxyQt.cpp: (WebKit::PopupMenuItemModel::select): Check whether old index is valid before accessing the item at that index. 2012-05-23 Jer Noble REGRESSION (r116188): After exiting full screen, Safari window is frozen, then inline video speeds through frames as it catches up with audio https://bugs.webkit.org/show_bug.cgi?id=87206 Reviewed by Darin Adler. When re-enabling the Safari window's autodisplay flag, also force the window to re-display. Otherwise, the window will not repaint itself until it is forced to by user interaction. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): 2012-05-23 Martin Robinson [GTK] [WebKit2] Add an API to enable and disable composited layer indicators https://bugs.webkit.org/show_bug.cgi?id=87053 Reviewed by Carlos Garcia Campos. Add a WebKitSetting that allows the client to enable and disable debug borders and repaint counters for accelerated content. * UIProcess/API/gtk/WebKitSettings.cpp: (webKitSettingsSetProperty): Added. (webKitSettingsGetProperty): Added. (webkit_settings_class_init): Add the new property. (webkit_settings_set_draw_compositing_indicators): Added. (webkit_settings_get_draw_compositing_indicators): Added. * UIProcess/API/gtk/WebKitSettings.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add the new API points to the documentation. * UIProcess/API/gtk/test/TestWebKitSettings.h: Add a new unit test. 2012-05-23 Michael Brüning [Qt][WK2] Small refactoring WebPage::confirmComposition. https://bugs.webkit.org/show_bug.cgi?id=87243 Reviewed by Kenneth Rohde Christiansen. Change nested if into an early return to reduce complexity. * WebProcess/WebPage/qt/WebPageQt.cpp: (WebKit::WebPage::confirmComposition): 2012-05-22 Alexander Færøy [Qt] Missing tests for the evaluateJavaScript API https://bugs.webkit.org/show_bug.cgi?id=86351 Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/tests/qmltests/WebView/tst_evaluateJavaScript.qml: * UIProcess/API/qt/tests/qmltests/common/evaluatejavascript.html: Added. 2012-05-23 Allan Sandfeld Jensen [Qt] FloatSize Qt Support https://bugs.webkit.org/show_bug.cgi?id=87237 Reviewed by Andreas Kling. Basic cleanup possible to new Qt support in FloatSize. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPagePrivate::updateSize): * UIProcess/API/qt/qwebkittest.cpp: (QWebKitTest::layoutSize): 2012-04-18 Tor Arne Vestbø [Qt] Make the web view's url property follow the active url https://bugs.webkit.org/show_bug.cgi?id=77554 The url property of the webview now reflects the 'active' url of the page, which maps to either the currently loading url, in the case of an ongoing load, or the result of a load, even when the load failed. In practice this means that setting the url though QML, or navigating to a new url in the page by e.g clicking, will both instantly change the url-property of the webview to the target url. This differs from earlier behavior, where we would update the url when the load committed. An optional argument is added to loadHtml(), to allow setting the unreachable url when providing replacement content for failed loads. Finally, the location bar in the minibrowser is updated to behave a bit more like normal browsers in terms of when the url will change and how active focus is handled. Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::onComponentComplete): (QQuickWebView::reload): (QQuickWebView::url): (QQuickWebView::setUrl): (QQuickWebView::loadHtml): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro: * UIProcess/API/qt/tests/qmltests/WebView.pro: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: * UIProcess/API/qt/tests/qmltests/common/link.html: Added. * UIProcess/API/qt/tests/qmltests/common/redirect.html: Added. * UIProcess/qt/QtWebPageLoadClient.cpp: (QtWebPageLoadClient::QtWebPageLoadClient): (QtWebPageLoadClient::didStartProvisionalLoadForFrame): (QtWebPageLoadClient::didReceiveServerRedirectForProvisionalLoadForFrame): (QtWebPageLoadClient::didCommitLoadForFrame): (QtWebPageLoadClient::dispatchLoadFailed): (QtWebPageLoadClient::didFailProvisionalLoadWithErrorForFrame): (QtWebPageLoadClient::didFailLoadWithErrorForFrame): * UIProcess/qt/QtWebPageLoadClient.h: (QtWebPageLoadClient): 2012-05-23 Simon Hausmann [Qt] Race condition in LayerTreeHost/Proxy can cause blank rendering https://bugs.webkit.org/show_bug.cgi?id=87239 Reviewed by Kenneth Rohde Christiansen. On the UI process side the WebLayerTreeRenderer/LayerTreeHostProxy pair is created with m_active = false, which makes it ignore any incoming layer updates. It remains inactive until the ContentsSGNode is created and setActive(true) is called. On the web process side the LayerTreeHost is created with m_waitingForUIProcess = false. Those two variables must be in sync, otherwise a race condition can happen: The web process sends updates to the ui process before the ContentsSGNode is created. This can happen for example when re-using an existing WebProcess to create a QQuickWebView and load a page very fast from the disk cache. The update arrives on the ui process side, but it is discarded because setActive(true) hasn't been called yet. As a result any updates that would for example create and populate the tiles required for rendering are ignored. This patch ensures that the variables are initialized with the same values and that calling setActive(true) will trigger the rendering of the next frame. * UIProcess/WebLayerTreeRenderer.cpp: (WebKit::WebLayerTreeRenderer::setActive): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: (WebKit::LayerTreeHostQt::LayerTreeHostQt): 2012-05-23 Tor Arne Vestbø [Qt] Make QtWebError return the failing URL as a QString instead of QUrl We don't want to use QUrl inside QtWebKit (only in the API layer), due to how QUrl normalizes the url. Reviewed by Simon Hausmann. * UIProcess/qt/QtWebError.cpp: (WebKit::QtWebError::url): * UIProcess/qt/QtWebError.h: 2012-05-22 Carlos Garcia Campos [GTK] Add inspector API to WebKit2 GTK+ https://bugs.webkit.org/show_bug.cgi?id=87113 Reviewed by Martin Robinson. * GNUmakefile.list.am: Add new files to compilation. * UIProcess/API/C/gtk/WKInspectorClientGtk.cpp: Added. (WKInspectorSetInspectorClientGtk): * UIProcess/API/C/gtk/WKInspectorClientGtk.h: Added. * UIProcess/API/gtk/WebKitPrivate.h: * UIProcess/API/gtk/WebKitWebInspector.cpp: Added. (webkitWebInspectorFinalize): (webkit_web_inspector_init): (webkit_web_inspector_class_init): (openWindow): Emit WebKitWebInspector::open-window singal. (didClose): Emit WebKitWebInspector::closed signal. (bringToFront): Emit WebKitWebInspector::bring-to-front singal. (inspectedURLChanged): Set the inspected URI and emit GObject::notify signal if it changed. (attach): Emit WebKitWebInspector::attach signal. (detach): Emit WebKitWebInspector::detach signal. (didChangeAttachedHeight): Set the attached height and emit GObject::notify signal if it changed. (webkitWebInspectorCreate): Ceate a new WebKitWebInspector object for the given WKInspector. Also initialize and set the inspector client. (webkit_web_inspector_get_web_view): Return the web view used to render the inspector. (webkit_web_inspector_get_inspected_uri): Return the URI that is being inspected. (webkit_web_inspector_is_attached): Whether the inspector view is currently attached. (webkit_web_inspector_attach): Request to attach the inspector. (webkit_web_inspector_detach): Request to detach the inspector. (webkit_web_inspector_show): Request to show the inspector. (webkit_web_inspector_close): Request to close the inspector. (webkit_web_inspector_get_attached_height): Return the height that the inspector view should have when attached. * UIProcess/API/gtk/WebKitWebInspector.h: Added. * UIProcess/API/gtk/WebKitWebInspectorPrivate.h: Added. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_get_inspector): Return the WebKitWebInspector associated to the web view. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitWebInspector. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Ad new symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_web_inspector_get_type. * UIProcess/API/gtk/tests/GNUmakefile.am: Add new test for the inspector API. * UIProcess/API/gtk/tests/TestInspector.cpp: Added. (testInspectorDefault): (testInspectorCustom): (testInspectorWindowDestroyed): (beforeAll): (afterAll): * UIProcess/API/gtk/tests/WebViewTest.cpp: (WebViewTest::showInWindowAndWaitUntilMapped): Add optional parameter to create a toplevel or popup window. (WebViewTest::resizeView): Helper function to set the widget allocation to a given size. * UIProcess/API/gtk/tests/WebViewTest.h: * UIProcess/API/gtk/webkit2.h: Include WebKitWebInspector.h * UIProcess/WebInspectorProxy.h: (WebKit::WebInspectorProxy::inspectorView): Return the view used to render the inspector. * UIProcess/gtk/WebInspectorClientGtk.cpp: Added. (WebKit::WebInspectorClientGtk::openWindow): (WebKit::WebInspectorClientGtk::didClose): (WebKit::WebInspectorClientGtk::bringToFront): (WebKit::WebInspectorClientGtk::inspectedURLChanged): (WebKit::WebInspectorClientGtk::attach): (WebKit::WebInspectorClientGtk::detach): (WebKit::WebInspectorClientGtk::didChangeAttachedHeight): * UIProcess/gtk/WebInspectorClientGtk.h: Added. * UIProcess/gtk/WebInspectorProxyGtk.cpp: (WebKit::inspectorViewDestroyed): Close the inspector page when the inspector view is destroyed, instead of when the inspector window is deleted, because the inspector view can now be inside a window created by the user. (WebKit::WebInspectorProxy::initializeInspectorClientGtk): Initialze the inspector client. (WebKit::WebInspectorProxy::platformCreateInspectorPage): Add a weak pointer to the inspector view to make sure it's NULL when destroyed. (WebKit::WebInspectorProxy::createInspectorWindow): Call openWindow on the inspector client, and return early if the callback was handled. (WebKit::WebInspectorProxy::platformOpen): Connect to destroy signal of the inspector view to close the page when the view is destroyed. (WebKit::WebInspectorProxy::platformDidClose): Call didClose on the inspector client. (WebKit::WebInspectorProxy::platformBringToFront): Call bringToFront on the inspector client, and return early if the callback was handled. (WebKit::WebInspectorProxy::platformInspectedURLChanged): Call inspectedURLChanged on the inspector client. (WebKit::WebInspectorProxy::platformAttach): Call attach on the inspector client and return if the callback was handled. (WebKit::WebInspectorProxy::platformDetach): Call detach on the inspector client and return if the callback was handled. (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): Call didChangeAttachedHeight on the inspector client. 2012-05-22 Anders Carlsson Functions dispatched by dispatchAfterEnsuringUpdatedScrollPosition can be called after drawing area has been destroyed https://bugs.webkit.org/show_bug.cgi?id=87173 Reviewed by Beth Dakin. Don't try to call forceRepaint if the drawing area has already been destroyed. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::forceRepaintAsync): 2012-05-22 Anders Carlsson Crash when a plug-in view outlives its containing WebPage https://bugs.webkit.org/show_bug.cgi?id=87163 Reviewed by Dan Bernstein. In rare cases, when a plug-in is kept alive for some reason it can outlive its WebPage. When that happens, the PluginView destructor will try to access the (deleted) web page and we'll crash. Fix this by making the WebPage destructor iterate over all the registered plug-ins and null out the m_webPage pointer. Don't try to access the WebPage object if it's null. Also, remove PLATFORM(MAC) ifdefs around the HashSet of known plug-in views as well as the member functions that access the set; we want this to be cross platform now. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::PluginView): (WebKit::PluginView::~PluginView): (WebKit::PluginView::webPageDestroyed): (WebKit): * WebProcess/Plugins/PluginView.h: (PluginView): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::~WebPage): (WebKit::WebPage::scalePage): (WebKit): * WebProcess/WebPage/WebPage.h: (WebPage): == Rolled over to ChangeLog-2012-05-22 ==