2012-01-26 Tim Horton 3D transformed elements hide when showing the print dialog https://bugs.webkit.org/show_bug.cgi?id=45894 Reviewed by Andy Estes. Suspend updates of the compositing layer tree while printing is taking place, preventing on-screen layers from moving to their print-mode positions. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::beginPrinting): (WebKit::WebPage::endPrinting): * WebProcess/WebPage/ca/LayerTreeHostCA.h: * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm: (WebKit::LayerTreeHostCAMac::forceRepaint): (WebKit::LayerTreeHostCAMac::flushPendingLayerChanges): 2012-01-26 Andras Becsi [Qt][WK2] Add the componentComplete method to WebView https://bugs.webkit.org/show_bug.cgi?id=77111 Reviewed by Kenneth Rohde Christiansen. Move the touch/desktop initialization to componentComplete. Also return valid default values in the viewport info functions if the interaction engine is not yet initialized because the viewport info component could finish initialization earlier than the WebView, which results in QML warnings during MiniBrowser startup. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour): (QQuickWebView::geometryChanged): (QQuickWebView::componentComplete): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qwebviewportinfo.cpp: (QWebViewportInfo::currentScale): (QWebViewportInfo::devicePixelRatio): (QWebViewportInfo::initialScale): (QWebViewportInfo::minimumScale): (QWebViewportInfo::maximumScale): (QWebViewportInfo::isScalable): (QWebViewportInfo::layoutSize): 2012-01-26 Anders Carlsson WebWheelEvent::Phase and PlatformWheelEvent::Phase declarations should match AppKit https://bugs.webkit.org/show_bug.cgi?id=77123 Reviewed by Beth Dakin. * Shared/WebEvent.h: (): * Shared/mac/WebEventFactory.mm: (WebKit::phaseForEvent): 2012-01-26 Andras Becsi ASSERT(!m_overlay) reached in TapHighlightController.cpp:73 https://bugs.webkit.org/show_bug.cgi?id=77117 Reviewed by Tor Arne Vestbø. The PageOverlay does only get uninstalled after the fade-out animation finishes, so do not assert on !m_overlay after the uninstallPageOverlay call. * WebProcess/WebPage/TapHighlightController.cpp: (WebKit::TapHighlightController::hideHighlight): 2012-01-26 Caio Marcelo de Oliveira Filho WebPreferencesStore: use DEFINE_STATIC_LOCAL for overrides HashMap https://bugs.webkit.org/show_bug.cgi?id=77109 Reviewed by Andreas Kling. Fix build for Clang. * Shared/WebPreferencesStore.cpp: (WebKit): (WebKit::boolTestRunnerOverridesMap): (WebKit::WebPreferencesStore::overrideBoolValueForKey): (WebKit::WebPreferencesStore::removeTestRunnerOverrides): (WebKit::WebPreferencesStore::getBoolValueForKey): 2012-01-26 Caio Marcelo de Oliveira Filho Implement overridePreference for boolean preferences in WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=77033 Reviewed by Alexey Proskuryakov. Implement a way to WebKitTestRunner override preferences for the pages loaded. Follows the same approach taken by overrideXSSAuditorEnabledForTestRunner() from r66551, but generalizing to many preferences. Preferences are stored in the UI process using WebPreferencesStore, and when there's a change, this data is sent to Web process, triggering WebPage::preferencesDidChange(), which take a WebPreferencesStore and apply it's data to the WebCore::Settings object. The overridePreference() is executed on the Web process, and set the preferences without communicating to the UI process. The overriden preferences are stored in a static map and WebPreferencesStore query this map before returning the values of each preference. This static map is used only on the Web process. To clear the overrides we need to clear the map. Since WTR only sets preferences when resetting the page, we hook the clearing at WebPage::preferencesDidChange(). A WKPreferences private function was exposed to WTR force the update, in case there's no effective change at UI process (all the properties remains the same). This clearing could be improved by creating a proper message instead of hooking at WebPage::preferencesDidChange(). * Shared/WebPreferencesStore.cpp: (WebKit::WebPreferencesStore::decode): (WebKit::WebPreferencesStore::overrideBoolValueForKey): (WebKit::WebPreferencesStore::removeTestRunnerOverrides): (WebKit::WebPreferencesStore::getBoolValueForKey): * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesResetTestRunnerOverrides): * UIProcess/API/C/WKPreferencesPrivate.h: * UIProcess/WebPreferences.h: (WebKit::WebPreferences::forceUpdate): * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleOverrideBoolPreferenceForTestRunner): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): (WebKit::InjectedBundle::overrideXSSAuditorEnabledForTestRunner): * WebProcess/InjectedBundle/InjectedBundle.h: 2012-01-26 Carlos Garcia Campos [GTK][WK2] Primary clipboard should be updated with the current selection in X11 platforms https://bugs.webkit.org/show_bug.cgi?id=77097 Reviewed by Martin Robinson. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::respondToChangedSelection): Call setSelectionPrimaryClipboardIfNeeded() to update primary clipboard in X11 platforms. * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::collapseSelection): Callback called when clearing clipboard contents. (WebKit::WebEditorClient::setSelectionPrimaryClipboardIfNeeded): Updaye primary clipboard with the current selection. 2012-01-26 Zeno Albisser [Qt][WK2] Use QVariant for payload data in application URL schemes. https://bugs.webkit.org/show_bug.cgi?id=77007 Make application schemes use QVariant for payload data. This allows passing QByteArrays as well as simple String data. Remove unneeded http header parts that were exposed in QQuickNetworkReply. Add ByteArrayTestData class to allow injecting QByteArray data into an application scheme handler for testing. Reviewed by Simon Hausmann. * Shared/qt/QtNetworkReplyData.cpp: (WebKit::QtNetworkReplyData::QtNetworkReplyData): (WebKit::QtNetworkReplyData::encode): (WebKit::QtNetworkReplyData::decode): * Shared/qt/QtNetworkReplyData.h: * UIProcess/API/qt/qquicknetworkreply.cpp: (QQuickNetworkReply::QQuickNetworkReply): (QQuickNetworkReply::data): (QQuickNetworkReply::setData): (QQuickNetworkReply::send): * UIProcess/API/qt/qquicknetworkreply_p.h: * UIProcess/API/qt/tests/bytearraytestdata.cpp: Added. (ByteArrayTestData::ByteArrayTestData): (ByteArrayTestData::latin1Data): (ByteArrayTestData::utf8Data): * UIProcess/API/qt/tests/bytearraytestdata.h: Added. * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml: * UIProcess/API/qt/tests/qmltests/tst_qmltests.cpp: (main): * UIProcess/API/qt/tests/tests.pri: * WebProcess/qt/QtNetworkReply.cpp: (WebKit::QtNetworkReply::setReplyData): * WebProcess/qt/QtNetworkReply.h: 2012-01-26 Thiago Marcos P. Santos [Qt] Fixed build when using force_static_libs_as_shared https://bugs.webkit.org/attachment.cgi?bugid=77082 Reviewed by Simon Hausmann. * Target.pri: 2012-01-26 Nándor Huszka [WK2] WebKitTestRunner needs layoutTestController.setGeolocationPermission https://bugs.webkit.org/show_bug.cgi?id=42545 Reviewed by Zoltan Herczeg. Implement the setGeolocationPermission method. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetGeolocationPermission): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setGeoLocationPermission): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-01-25 Mark Rowe Build in to an alternate location when USE_STAGING_INSTALL_PATH is set. Adopt USE_STAGING_INSTALL_PATH Reviewed by David Kilzer. * Configurations/BaseTarget.xcconfig: Define NORMAL_WEBKIT2_FRAMEWORKS_DIR, which contains the path where WebKit is normally installed. Update WEBKIT2_FRAMEWORKS_DIR to point to the staged frameworks directory when USE_STAGING_INSTALL_PATH is set. Update UMBRELLA_FRAMEWORKS_DIR so we can find WebCore at the top level of the staged frameworks directory when USE_STAGING_INSTALL_PATH is set, rather than finding it embedded inside of WebKit.framework. * Configurations/PluginProcess.xcconfig: Set our install path based on WEBKIT2_FRAMEWORKS_DIR. * Configurations/WebKit2.xcconfig: Set our install path based on WEBKIT2_FRAMEWORKS_DIR. Always set the framework's install name based on the normal framework location. This prevents an incorrect install name from being used when installing in to the staged frameworks directory. * Configurations/WebProcess.xcconfig: Set our install path based on WEBKIT2_FRAMEWORKS_DIR. 2012-01-25 No'am Rosenthal [WK2][Qt] REGRESSION: Pages with transform animations sometimes omit some of the layers since r105413 https://bugs.webkit.org/show_bug.cgi?id=76886 Reviewed by Kenneth Rohde Christiansen. We now render the whole layer if it or one if its ancestors has an active transform animations. It's possible to optimize further in the future, but not currently necessary. Also, we make sure that when a WebGraphicsLayer's property that affects transformation is changed, all its descandants layers are marked as modified so that we re-adjust their visible rect in the next pass. * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::notifyChangeRecursively): (WebCore): (WebCore::WebGraphicsLayer::setPosition): (WebCore::WebGraphicsLayer::setAnchorPoint): (WebCore::WebGraphicsLayer::setSize): (WebCore::WebGraphicsLayer::setTransform): (WebCore::WebGraphicsLayer::setChildrenTransform): (WebCore::WebGraphicsLayer::setPreserves3D): (WebCore::WebGraphicsLayer::setMasksToBounds): (WebCore::WebGraphicsLayer::addAnimation): (WebCore::WebGraphicsLayer::removeAnimation): (WebCore::WebGraphicsLayer::tiledBackingStoreVisibleRect): (WebCore::WebGraphicsLayer::selfOrAncestorHasActiveTransformAnimations): * WebProcess/WebCoreSupport/WebGraphicsLayer.h: (WebGraphicsLayer): 2012-01-25 Hajime Morita ENABLE_SHADOW_DOM should be available via build-webkit --shadow-dom https://bugs.webkit.org/show_bug.cgi?id=76863 Reviewed by Dimitri Glazkov. Added a feature flag. * Configurations/FeatureDefines.xcconfig: 2012-01-25 Martin Robinson [WK2] Navigation events not triggered by a mouse event claim to be triggered by the left mouse button during policy decisions https://bugs.webkit.org/show_bug.cgi?id=76344 Reviewed by Sam Weinig. When creating InjectedBundleNavigationActions, initialize the mouse button to NoButton. This ensures that when there is no mouse event associated with the action, when the event hits the client-API layer, the button is still NoButton. * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): Initialize m_mouseButton to WebMouseEvent::NoButton. 2012-01-25 Kenneth Rohde Christiansen [Qt] Implement tap feedback respecting -webkit-tap-highlight-color https://bugs.webkit.org/show_bug.cgi?id=76914 Reviewed by Simon Hausmann. Implement tap highlighting for Qt. When a touch press is issued, which is not handled by the web page, then we highlight any activatable node below. In all otehr cases, we hide any highlights. The highlighting itself is painted on an accelerated PageOverlay, on the web process side. * Target.pri: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handlePotentialActivation): * UIProcess/WebPageProxy.h: * UIProcess/qt/QtTapGestureRecognizer.cpp: (WebKit::QtTapGestureRecognizer::recognize): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handlePotentialSingleTapEvent): * UIProcess/qt/QtWebPageEventHandler.h: * WebProcess/WebPage/TapHighlightController.cpp: Added. (WebKit::TapHighlightController::TapHighlightController): (WebKit::TapHighlightController::~TapHighlightController): (WebKit::TapHighlightController::highlight): (WebKit::TapHighlightController::hideHighlight): (WebKit::TapHighlightController::pageOverlayDestroyed): (WebKit::TapHighlightController::willMoveToWebPage): (WebKit::TapHighlightController::didMoveToWebPage): (WebKit::highlightColor): (WebKit::TapHighlightController::drawRect): (WebKit::TapHighlightController::mouseEvent): * WebProcess/WebPage/TapHighlightController.h: Added. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::highlightPotentialActivation): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::tapHighlightController): * WebProcess/WebPage/WebPage.messages.in: 2012-01-25 Nándor Huszka [WK2] WebKitTestRunner needs layoutTestController.setPopupBlockingEnabled https://bugs.webkit.org/show_bug.cgi?id=63458 Reviewed by Adam Roben. Implement the setPopupBlockingEnabled method. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetPrivateBrowsingEnabled): (WKBundleSetPopupBlockingEnabled): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setPopupBlockingEnabled): * WebProcess/InjectedBundle/InjectedBundle.h: 2012-01-25 Yael Aharon [Qt] Build fix when using force_static_libs_as_shared https://bugs.webkit.org/show_bug.cgi?id=76832 Reviewed by Simon Hausmann. Add a dependency on QtWidgets. * Target.pri: 2012-01-24 Sergio Villar Senin [WK2] FindController should not assume that ports do not want to highlight text matches https://bugs.webkit.org/show_bug.cgi?id=76921 Reviewed by Darin Adler. FindController must obey the FindOptionsShowHighlight flag instead of assuming that ports do not want to highlight search matches. * Shared/API/c/WKFindOptions.h: added kWKFindOptionsShowHighlight. * Shared/API/c/WKSharedAPICast.h: (WebKit::toFindOptions): Ditto. * Shared/WebFindOptions.h: added FindOptionsShowHighlight. * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::findString): 2012-01-25 Carlos Garcia Campos [GTK] Page clients don't need to be GObjects anymore in WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=76899 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitLoaderClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/WebKitWebLoaderClient.cpp. (didStartProvisionalLoadForFrame): Use clientInfo instead fo getting the view from the page. (didReceiveServerRedirectForProvisionalLoadForFrame): Ditto. (didFailProvisionalLoadWithErrorForFrame): Ditto. (didCommitLoadForFrame): Ditto. (didFinishLoadForFrame): Ditto. (didFailLoadWithErrorForFrame): Ditto. (didSameDocumentNavigationForFrame): Ditto. (didReceiveTitleForFrame): Ditto. (didChangeProgress): Ditto. (didChangeBackForwardList): Ditto. (attachLoaderClientToView): Pass WebKitWebView as clientInfo to callbacks. * UIProcess/API/gtk/WebKitLoaderClient.h: Added. * UIProcess/API/gtk/WebKitUIClient.cpp: (createNewPage): Use clientInfo instead fo getting the view from the page. (showPage): Ditto. (closePage): Ditto. (runJavaScriptAlert): Ditto. (runJavaScriptConfirm): Ditto. (runJavaScriptPrompt): Ditto. (toolbarsAreVisible): Ditto. (setToolbarsAreVisible): Ditto. (menuBarIsVisible): Ditto. (setMenuBarIsVisible): Ditto. (statusBarIsVisible): Ditto. (setStatusBarIsVisible): Ditto. (isResizable): Ditto. (setIsResizable): Ditto. (getWindowFrame): Ditto. (setWindowFrame): Ditto. (attachUIClientToView): Pass WebKitWebView as clientInfo to callbacks. * UIProcess/API/gtk/WebKitUIClient.h: Remove GObject boilerplate. * UIProcess/API/gtk/WebKitWebLoaderClient.h: Removed. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewConstructed): Remove UIClient and LoaderClient objects and call attachUIClientToView() and attachLoaderClientToView(). * UIProcess/API/gtk/tests/GNUmakefile.am: Rename WebKitWebLoaderClient to WebKitLoaderClient. * UIProcess/API/gtk/tests/TestLoaderClient.cpp: Renamed from Source/WebKit2/UIProcess/API/gtk/tests/TestWebKitWebLoaderClient.cpp. 2012-01-25 Roland Steiner