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 ==