2011-12-02 Fady Samuel When page scaling is in use position:fixed has incorrect results https://bugs.webkit.org/show_bug.cgi?id=68617 Reviewed by Simon Fraser. * win/WebKit2.def: * win/WebKit2CFLite.def: 2011-12-02 Alexey Proskuryakov Update sandbox rules https://bugs.webkit.org/show_bug.cgi?id=73675 Reviewed by Sam Weinig. * WebProcess/com.apple.WebProcess.sb: 2011-12-02 Andy Estes WebKit2: Freeze the state of the layer tree until frame load completion if incremental rendering is suppressed https://bugs.webkit.org/show_bug.cgi?id=73641 Reviewed by Darin Adler. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout): Do not un-freeze the layer tree state if incremental rendering is suppressed. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::layerTreeStateIsFrozen): Add a getter for m_layerTreeStateIsFrozen. * WebProcess/WebPage/DrawingAreaImpl.h: (WebKit::DrawingAreaImpl::layerTreeStateIsFrozen): Ditto. * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: (WebKit::LayerTreeHostCA::initialize): WebFrameLoaderClient might have tried to freeze the state of the layer tree before the layer tree host was created. When creating the layer tree host, only schedule a layer flush if the layer tree state isn't frozen. 2011-12-02 Nayan Kumar K [WebKit2][gtk] Add 'enable-dns-prefetching' property to WebKitSettings https://bugs.webkit.org/show_bug.cgi?id=73414 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitSettings.cpp: (webKitSettingsSetProperty): Add new set function. (webKitSettingsGetProperty): Add new get function. (webkit_settings_class_init): Register new property. (webkit_settings_get_enable_dns_prefetching): API to get 'enable-dns-prefetching' property. (webkit_settings_set_enable_dns_prefetching): API to set 'enable-dns-prefetching' property. * UIProcess/API/gtk/WebKitSettings.h: Expose new public API's. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new APIs to gtk-doc sections file. * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: (testWebKitSettings): Add new tests. 2011-12-02 Andras Becsi [Qt][WK2] Set event timestamps on custom input events Reviewed by Simon Hausmann. Since r101791 WebEventFactoryQt uses input event timestamps for WebEvents, thus set the timestamp on the custom events as well. * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handleHoverLeaveEvent): (QtWebPageEventHandler::handleHoverMoveEvent): * UIProcess/qt/WebPopupMenuProxyQtDesktop.cpp: (WebKit::WebPopupMenuProxyQtDesktop::showPopupMenu): 2011-12-02 Andras Becsi [Qt] [WK2] Use input event timestamps in WebEvents if available https://bugs.webkit.org/show_bug.cgi?id=73647 Reviewed by Simon Hausmann. Qt5 input events already have a native timestamp, use this timestamp in WebEventFactory instead of WTF::currentTime if it is available. * Shared/qt/WebEventFactoryQt.cpp: (WebKit::currentTimeForEvent): (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): (WebKit::WebEventFactory::createWebTouchEvent): * Shared/qt/WebEventFactoryQt.h: 2011-12-02 Jesus Sanchez-Palencia [Qt][WK2] Split the QtWebPageProxy into PageClient and QtPageProxy https://bugs.webkit.org/show_bug.cgi?id=66668 Reviewed by Simon Hausmann. Split QtPageClient out of QtWebPageProxy. This client will live in QQuickWebViewPrivate and communicate directly with QtWebPageProxy and QtWebPageEventHandler. The functions that need anything else than these entities will need to call the proper implementation through QtWebPageProxy itself. With this we have a clear separation between PageClient and PageProxy, having two well defined and separated entities for hooking our clients with our API layer (QtWebPageProxy) and for hooking the WebPageProxy with our client implementations (QtPageClient). As a positive side-effect we have a cleaner QtWebPageProxy. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/qt/QtPageClient.cpp: Added. (QtPageClient::QtPageClient): (QtPageClient::~QtPageClient): (QtPageClient::createDrawingAreaProxy): (QtPageClient::setViewNeedsDisplay): (QtPageClient::pageDidRequestScroll): (QtPageClient::processDidCrash): (QtPageClient::didRelaunchProcess): (QtPageClient::didChangeContentsSize): (QtPageClient::didChangeViewportProperties): (QtPageClient::startDrag): (QtPageClient::handleDownloadRequest): (QtPageClient::setCursor): (QtPageClient::setCursorHiddenUntilMouseMoves): (QtPageClient::toolTipChanged): (QtPageClient::registerEditCommand): (QtPageClient::clearAllEditCommands): (QtPageClient::canUndoRedo): (QtPageClient::executeUndoRedo): (QtPageClient::convertToDeviceSpace): (QtPageClient::convertToUserSpace): (QtPageClient::screenToWindow): (QtPageClient::windowToScreen): (QtPageClient::createPopupMenuProxy): (QtPageClient::createContextMenuProxy): (QtPageClient::flashBackingStoreUpdates): (QtPageClient::didFindZoomableArea): (QtPageClient::didReceiveMessageFromNavigatorQtObject): (QtPageClient::doneWithTouchEvent): (QtPageClient::displayView): (QtPageClient::scrollView): (QtPageClient::viewSize): (QtPageClient::isViewWindowActive): (QtPageClient::isViewFocused): (QtPageClient::isViewVisible): (QtPageClient::isViewInWindow): (QtPageClient::enterAcceleratedCompositingMode): (QtPageClient::exitAcceleratedCompositingMode): * UIProcess/qt/QtPageClient.h: Added. (QtPageClient::pageClosed): (QtPageClient::doneWithKeyEvent): (QtPageClient::setFindIndicator): (QtPageClient::didCommitLoadForMainFrame): (QtPageClient::didFinishLoadingDataForCustomRepresentation): (QtPageClient::customRepresentationZoomFactor): (QtPageClient::setCustomRepresentationZoomFactor): (QtPageClient::didChangeScrollbarsForMainFrame): (QtPageClient::findStringInCustomRepresentation): (QtPageClient::countStringMatchesInCustomRepresentation): (QtPageClient::setEventHandler): (QtPageClient::setPageProxy): * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): * UIProcess/qt/QtWebPageProxy.h: 2011-12-02 Kenneth Rohde Christiansen [Qt] Do not apply the transition state before we are unsuspended Reviewed by Simon Hausmann. Also remove an accessor in the private, which is unneeded as everything in the private class is supposed to be public or only used by the private itself. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::loadDidCommit): (QQuickWebViewPrivate::didFinishFirstNonEmptyLayout): (QQuickWebViewPrivate::_q_suspend): (QQuickWebViewPrivate::_q_resume): (QQuickWebViewPrivate::didChangeContentsSize): (QQuickWebViewPrivate::didChangeViewportProperties): * UIProcess/API/qt/qquickwebview_p_p.h: 2011-12-02 Kenneth Rohde Christiansen Unreviewed buildfix, add missing include. * WebProcess/Notifications/WebNotificationManager.cpp: 2011-12-02 Hajime Morrita Unreviewed, rolling out r101751 and r101775. http://trac.webkit.org/changeset/101751 http://trac.webkit.org/changeset/101775 https://bugs.webkit.org/show_bug.cgi?id=73191 breaks Windows build * config.h: 2011-12-02 Carlos Garcia Campos Unreviewed. Fix GTK+ build after r101750. * GNUmakefile.am: Add missing files. 2011-12-02 Gustavo Noronha Silva Unreviewed. GTK+ build fix. * GNUmakefile.am: 2011-12-02 Zalan Bujtas [Qt][WK2] ASSERT at QQuickWebViewPrivate::computeViewportConstraints() when API test is exercising zero sized views. https://bugs.webkit.org/show_bug.cgi?id=73441 Do not assert on empty available size, but return default constrain values instead. Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::computeViewportConstraints): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::dispatchViewportPropertiesDidChange): 2011-12-01 Hajime Morrita JS_INLINE and WTF_INLINE should be visible from WebCore https://bugs.webkit.org/show_bug.cgi?id=73191 Reviewed by Kevin Ollivier. Removed macro definitions which is now provided by Platform.h * config.h: 2011-12-01 Jon Lee [WK2] Add further support for notifications https://bugs.webkit.org/show_bug.cgi?id=73572 Reviewed by Darin Adler. * WebProcess/Notifications/WebNotificationManager.messages.in: Added. Contains messages for callbacks from the notification platform. * DerivedSources.make: Add WebNotificationManager. * DerivedSources.pri: Ditto. * Platform/CoreIPC/MessageID.h: Add message class. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessage): Forward calls to WebNotificationManager when needed. * WebKit2.xcodeproj/project.pbxproj: Add new message files. * win/WebKit2.vcproj: Adding new files to project. * win/WebKit2Common.vsprops: Add Notifications to include paths * UIProcess/WebNotification.h: Add and expose internal ID of each notification sent to the platform. (WebKit::WebNotification::create): (WebKit::WebNotification::notificationID): (WebKit::isNotificationIDValid): Checks that the ID is not a value that might trip up the HashMaps used for mapping IDs to notifications. * UIProcess/WebNotification.cpp: (WebKit::WebNotification::WebNotification): (WebKit::WebNotification::encode): (WebKit::WebNotification::decode): * UIProcess/API/C/WKNotification.h: Expose notification ID to WKAPI. * UIProcess/API/C/WKNotification.cpp: (WKNotificationGetNotificationID): * UIProcess/WebNotificationManagerProxy.h: Add callbacks for dispatching events back to the notification. * UIProcess/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::invalidate): Remove manager. (WebKit::WebNotificationManagerProxy::show): Add manager prior to showing. (WebKit::WebNotificationManagerProxy::cancel): Add manager prior to canceling. (WebKit::WebNotificationManagerProxy::didDestroyNotification): (WebKit::WebNotificationManagerProxy::providerDidShowNotification): (WebKit::WebNotificationManagerProxy::providerDidClickNotification): (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): * UIProcess/API/C/WKNotificationManager.h: * UIProcess/API/C/WKNotificationManager.cpp: (WKNotificationManagerProviderDidShowNotification): (WKNotificationManagerProviderDidClickNotification): (WKNotificationManagerProviderDidCloseNotifications): * UIProcess/WebNotificationProvider.h: * UIProcess/WebNotificationProvider.cpp: (WebKit::WebNotificationProvider::show): (WebKit::WebNotificationProvider::cancel): (WebKit::WebNotificationProvider::didDestroyNotification): (WebKit::WebNotificationProvider::addNotificationManager): (WebKit::WebNotificationProvider::removeNotificationManager): * UIProcess/API/C/WKNotificationProvider.h: Expose add/removeNotificationManager calls * WebProcess/Notifications/WebNotificationManager.h: Add bookkeeping to keep track of notification IDs with Notification instances. * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::generateNotificationID): (WebKit::WebNotificationManager::didReceiveMessage): (WebKit::WebNotificationManager::show): (WebKit::WebNotificationManager::cancel): (WebKit::WebNotificationManager::didDestroyNotification): (WebKit::WebNotificationManager::didShowNotification): (WebKit::WebNotificationManager::didClickNotification): (WebKit::WebNotificationManager::didCloseNotifications): * UIProcess/WebNotificationManagerProxy.messages.in: Add DidDestroyNotification message. * WebProcess/WebCoreSupport/WebNotificationClient.cpp: (WebKit::WebNotificationClient::notificationObjectDestroyed): Implemented. 2011-12-01 Goutham J [WEBKIT2] Fix for compilation warnings in WebContext.cpp https://bugs.webkit.org/show_bug.cgi?id=69080 Fix compilation warning in WebKit2 builds. Reviewed by Hajime Morita. * UIProcess/WebContext.cpp: (WebKit::WebContext::processDidFinishLaunching): (WebKit::WebContext::startMemorySampler): 2011-12-01 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=73592 REGRESSION (r100483): Can't drag out of background window -and corresponding- Reviewed by Darin Adler. If the mouse is pressed we need to do a full, normal hit test even if the window is not active. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mouseEvent): (WebKit::WebPage::mouseEventSyncForTesting): 2011-12-01 Martin Robinson [GTK] Add a helper function to find the current executable's path https://bugs.webkit.org/show_bug.cgi?id=73473 Reviewed by Gustavo Noronha Silva. Do a series of tests when looking for processes. First search the directory specified by the environment variable, then the directory of the binary and then the LIBEXECDIR. * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::findWebKitProcess): Added. (WebKit::ProcessLauncher::launchProcess): Call the new helper to get the binary location. 2011-12-01 Viatcheslav Ostapenko [Qt] [WK2] QQuickWebView covers QML elements that should be rendered on top. https://bugs.webkit.org/show_bug.cgi?id=73338 Reviewed by Noam Rosenthal. Move painting of QQuickWebPage content from canvas afterrendering() to QSGGeometryNode/QSGMaterial based paint node. Implementation uses QSGMaterialShader updateState() method to draw TextureMapper graphics layers. This is considered to be temporary until QSGNode::UserNodeType will be available. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::QQuickWebPage): (QQuickWebPagePrivate::QQuickWebPagePrivate): (PageProxyMaterialShader::attributeNames): (PageProxyMaterialShader::vertexShader): (PageProxyMaterialShader::fragmentShader): (PageProxyMaterial::PageProxyMaterial): (PageProxyMaterial::type): (PageProxyMaterial::createShader): (PageProxyNode::PageProxyNode): (PageProxyNode::~PageProxyNode): (PageProxyMaterialShader::updateState): (QQuickWebPage::updatePaintNode): (QQuickWebPagePrivate::resetPaintNode): (QQuickWebPagePrivate::~QQuickWebPagePrivate): * UIProcess/API/qt/qquickwebpage_p.h: * UIProcess/API/qt/qquickwebpage_p_p.h: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::showWebView): * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::didRenderFrame): 2011-12-01 Nayan Kumar K [WK2][GTK] Change default-font-size and default-monospace-font-size https://bugs.webkit.org/show_bug.cgi?id=73468 Reviewed by Martin Robinson. Set 'default-font-size' property value to 16px and 'default-monospace-font-size' value to 13px. * UIProcess/API/gtk/WebKitSettings.cpp: (webkit_settings_class_init): Change the default font size settings. * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: (testWebKitSettings): Correct the test. 2011-12-01 Wajahat Siddiqui Popup menu can get stuck in closed state when GtkMenu can't grab mouse. https://bugs.webkit.org/show_bug.cgi?id=56466 Add a check if popup menu is not visible due to no mouse grab, Ensure WebCore is in sync with proper state. Reviewed by Martin Robinson. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::failedToShowPopupMenu): Added Method to send message to WebProcess. * UIProcess/WebPageProxy.h: * UIProcess/WebPopupMenuProxy.h: * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: (WebKit::WebPopupMenuProxyGtk::showPopupMenu): * WebProcess/WebCoreSupport/WebPopupMenu.h: (WebKit::WebPopupMenu::client): Added Method to get WebCore::PopupMenuClient. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::failedToShowPopupMenu): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Added Message to inform WebProcess ShowPopupMenu failed. 2011-12-01 Pavel Feldman Web Inspector: restore WebKit2 Safari menu items after capabilities refactoring regression. https://bugs.webkit.org/show_bug.cgi?id=73554 Reviewed by Yury Semikhatsky. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::didClose): 2011-11-30 Alexey Proskuryakov Remove an unneeded argument from FrameLoaderClient::download https://bugs.webkit.org/show_bug.cgi?id=73486 Reviewed by Andreas Kling. * WebProcess/Downloads/Download.h: * WebProcess/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::convertHandleToDownload): * WebProcess/Downloads/DownloadManager.h: * WebProcess/Downloads/cfnet/DownloadCFNet.cpp: (WebKit::Download::startWithHandle): * WebProcess/Downloads/curl/DownloadCurl.cpp: (WebKit::Download::startWithHandle): * WebProcess/Downloads/mac/DownloadMac.mm: (WebKit::Download::startWithHandle): * WebProcess/Downloads/qt/DownloadQt.cpp: (WebKit::Download::startWithHandle): * WebProcess/Downloads/soup/DownloadSoup.cpp: (WebKit::Download::startWithHandle): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::download): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::convertHandleToDownload): * WebProcess/WebPage/WebFrame.h: Updated for the change. CF version is the only one worth seeing, as it was using the argument. 2011-11-30 Alexey Proskuryakov Original page URL is not set in quarantine information when downloading using context menu Save Linked File https://bugs.webkit.org/show_bug.cgi?id=73475 Reviewed by Dan Bernstein. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::downloadRequest): Set main document URL for the request, so that CFNetwork would know where te file was downloaded. Note that this is an easier case than downloading due to clicks, since we don't really need to build a host only URL, and could use full page URL. However, the same function is used for consistency. 2011-11-30 Igor Oliveira [WK2][Qt] AC animation startTime is wrong [WK2][Qt] AC animation startTime is wrong https://bugs.webkit.org/show_bug.cgi?id=73467 When WebProcess sends animation information to UIProcess, It uses the current time(WTF::currentTime) minus the timeOffset to set the start time animation. But there is a latency between the WebProcess and UIProcess communication and sometimes the animation transition starts late. This patch fixes the bug moving the startTime calculation to UIProcess. Reviewed by Noam Rosenthal. * UIProcess/qt/LayerTreeHostProxyQt.cpp: (WebKit::LayerTreeHostProxy::syncLayerParameters): * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::WebGraphicsLayer::addAnimation): 2011-11-30 Csaba Osztrogonác [Qt] Buildfix for generating forwarding headers https://bugs.webkit.org/show_bug.cgi?id=73446 Reviewed by Noam Rosenthal. * DerivedSources.pri: Always create the parent directory before generating a forwarding header. 2011-11-30 Dan Bernstein WebKit2 part of: Allow the length of a page along the pagination axis to differ from the length of the view https://bugs.webkit.org/show_bug.cgi?id=73476 Reviewed by Anders Carlsson. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): Encode pageLength. (WebKit::WebPageCreationParameters::decode): Decode pageLength. * Shared/WebPageCreationParameters.h: Added pageLength. * UIProcess/API/C/WKPage.cpp: (WKPageSetPageLength): Added this accessor. (WKPageGetPageLength): Ditto. * UIProcess/API/C/WKPagePrivate.h: * UIProcess/API/mac/WKBrowsingContextController.mm: (-[WKBrowsingContextController setPageLength:]): Ditto. (-[WKBrowsingContextController pageLength]): Ditto. * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): Added initializer for m_pageLength. (WebKit::WebPageProxy::setPageLength): Added. (WebKit::WebPageProxy::creationParameters): Initialize pageLength. * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::pageLength): Added. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Set the page length based on the creation parameters. (WebKit::WebPage::setPageLength): Added. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Added SetPageLength. 2011-11-30 Alejandro G. Castro [GTK] Add accelerated compositing compilation option https://bugs.webkit.org/show_bug.cgi?id=73298 Compile whatever we have inside the USE(ACCELERATED_COMPOSITING) define. Fix accelerated compositing compilation in WK2, update the enter/exit functions. Reviewed by Martin Robinson. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::enterAcceleratedCompositingMode): (WebKit::PageClientImpl::exitAcceleratedCompositingMode): * UIProcess/API/gtk/PageClientImpl.h: 2011-11-29 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=72751 WebKit2.MouseMoveAfterCrash API test is failing Reviewed by Sam Weinig. windowIsFocused() is too restrictive. All we need to know is that the page is active. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::mouseEvent): (WebKit::WebPage::mouseEventSyncForTesting): 2011-11-29 Sam Weinig Add move semantics to WKRetainPtr https://bugs.webkit.org/show_bug.cgi?id=73400 Reviewed by Anders Carlsson. * UIProcess/API/cpp/WKRetainPtr.h: (WebKit::WKRetainPtr::WKRetainPtr): Add a move constructor and move enabled assignment operators to WKRetainPtr if the compiler being used supports rvalue references. If the compiler does not support it, we fallback to the copy semantics we have always had. 2011-11-30 Mario Sanchez Prada [Gtk] Links should be Tab-focusable by default https://bugs.webkit.org/show_bug.cgi?id=73427 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitSettings.cpp: (webkit_settings_class_init): Switch the default value for 'enable-tabs-to-links' property from FALSE to TRUE. * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: (testWebKitSettings): Updated unit test. 2011-11-30 Alexey Proskuryakov Download page URL should be set by WebCore https://bugs.webkit.org/show_bug.cgi?id=73358 Reviewed by Darin Adler. * WebProcess/Downloads/mac/DownloadMac.mm: (WebKit::Download::start): There is no need to set original URL post factum any more. (WebKit::Download::startWithHandle): Ditto. 2011-11-30 Kenneth Rohde Christiansen Rename WebKit::ViewportUpdateGuard to *Deferrer and add some better comments to explain its purpose. Reviewed by Simon Hausmann. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::ViewportUpdateDeferrer::ViewportUpdateDeferrer): (WebKit::ViewportUpdateDeferrer::~ViewportUpdateDeferrer): (WebKit::QtViewportInteractionEngine::setItemRectVisible): (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged): (WebKit::QtViewportInteractionEngine::scrollStateChanged): (WebKit::QtViewportInteractionEngine::applyConstraints): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): * UIProcess/qt/QtViewportInteractionEngine.h: 2011-11-30 Simon Hausmann Build fix. The removal of the Qt threading back-end also removed an implicit QString inclusion/forward-declaration. * UIProcess/qt/QtWebContext.h: 2011-11-30 Kenneth Rohde Christiansen [Qt] Clean up the Qt viewport interaction engine Reviewed by Simon Hausmann. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::reset): Make sure reset is not called while suspended. (WebKit::QtViewportInteractionEngine::applyConstraints): We always need to apply the constrains due to initial-scale. Now that we only apply the constrains when we are ready to paint, it is impossible for the user to have interacted with the content in the case the viewport meta tag was declared in the tag, and it is thus always applied. (WebKit::QtViewportInteractionEngine::panGestureStarted): (WebKit::QtViewportInteractionEngine::pinchGestureActive): Fix this method to actually do what it advertises, before it would be true even if just animation a bounce back effect. (WebKit::QtViewportInteractionEngine::pinchGestureStarted): (WebKit::QtViewportInteractionEngine::pinchGestureEnded): * UIProcess/qt/QtViewportInteractionEngine.h: General, get rid of the interaction flags as we only need to know whether the user interacted (panned, pinched, double-tapped). Before we would still apply initial-scale if the user had panned the content which can be pretty confusing. 2011-11-30 Simon Hausmann Unreviewed prospective mac build fix after r101450. * Platform/mac/ModuleMac.mm: (WebKit::Module::unload): leakRef is declared with attribute warn_unused_result. 2011-11-30 Adenilson Cavalcanti [Qt][WK2] Implement permission API for Qt port https://bugs.webkit.org/show_bug.cgi?id=59200 Permission API hookup for Geolocation, it allows to receive in WebView a signal when a permission request is done (e.g. to grant permission for accessing geolocation information) and set it accordingly. Reviewed by Simon Hausmann. * Target.pri: * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qwebpermissionrequest.cpp: Added. (QWebPermissionRequestPrivate::QWebPermissionRequestPrivate): (QWebPermissionRequestPrivate::~QWebPermissionRequestPrivate): (QWebPermissionRequest::create): (QWebPermissionRequest::QWebPermissionRequest): (QWebPermissionRequest::~QWebPermissionRequest): (QWebPermissionRequest::type): (QWebPermissionRequest::setAllow): (QWebPermissionRequest::allow): (QWebPermissionRequest::scheme): (QWebPermissionRequest::host): (QWebPermissionRequest::port): * UIProcess/API/qt/qwebpermissionrequest_p.h: Added. * UIProcess/API/qt/tests/qmltests/WebView/tst_geopermission.qml: Added. * UIProcess/API/qt/tests/qmltests/common/geolocation.html: Added. * UIProcess/API/qt/tests/qmltests/qmltests.pro: * UIProcess/qt/QtWebPageUIClient.cpp: (QtWebPageUIClient::QtWebPageUIClient): (QtWebPageUIClient::permissionRequest): (QtWebPageUIClient::policyForGeolocationPermissionRequest): * UIProcess/qt/QtWebPageUIClient.h: 2011-11-30 Alexey Proskuryakov -[WKView attributedSubstringForProposedRange:actualRange:] doesn't update actualRange when it's out of bounds https://bugs.webkit.org/show_bug.cgi?id=67813 Reviewed by Simon Fraser. * UIProcess/API/mac/WKView.mm: (-[WKView attributedSubstringForProposedRange:actualRange:]): Update actualRange to match result length. (-[WKView firstRectForCharacterRange:actualRange:]): Added a FIXME. This is harder to implement, and it's unclear if clients care at this time. 2011-11-29 Sam Weinig Remove RetainPtr::releaseRef https://bugs.webkit.org/show_bug.cgi?id=73396 Reviewed by Dan Bernstein. * Platform/mac/ModuleMac.mm: (WebKit::Module::unload): Replace the final use of RetainPtr::releaseRef() with RetainPtr::leakRef(), its sexy replacement. 2011-11-29 Jessie Berlin WKKeyValueStorageManagerGetKeyValueStorageOrigins may not report the correct list of origins the first time it is called. https://bugs.webkit.org/show_bug.cgi?id=73374 () Reviewed by Brady Eidson. Queue any requests for the origins that have Local Storage until the StorageTracker is done loading the list of those origins from disk. * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: (WebKit::keyValueStorageOriginIdentifiers): Refactored here from getKeyValueStorageOrigins so it can be used by didFinishLoadingOrigins. (WebKit::dispatchDidGetKeyValueStorageOrigins): Ditto. (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins): If the StorageTracker is not done loading the list of origins from disk, queue up the request to be handled later. (WebKit::WebKeyValueStorageManager::didFinishLoadingOrigins): Dispatch the results for any requests that were make before the StorageTracker was done loading the list of origins from disk. (WebKit::WebKeyValueStorageManager::dispatchDidModifyOrigin): * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Set the WebKeyValueStorageManager as the StorageTrackerClient. 2011-11-29 Anders Carlsson Decorate adoptWK with WARN_UNUSED_RETURN https://bugs.webkit.org/show_bug.cgi?id=73331 Reviewed by Sam Weinig. * UIProcess/API/cpp/WKRetainPtr.h: (WebKit::adoptWK): 2011-11-29 Carlos Garcia Campos Unreviewed. Fix GTK+ WebKit2 build after r101312. * Scripts/generate-forwarding-headers.pl: Add blackberry to the list of platforms. 2011-11-29 Tor Arne Vestbø [Qt] Don't hard-code the list of WebKit2 generated sources The generated sources are... wait for it... generated. So use the generator itself to figure out which sources we need to compile. Reviewed by Simon Hausmann. * DerivedSources.pri: * Target.pri: 2011-11-29 Carlos Garcia Campos Unreviewed. Fix the GTK+ port build after r101307. * GNUmakefile.am: Add missing files to compilation. 2011-11-29 Kenneth Rohde Christiansen [Qt] Add the infrastructure for enabling suspend/resume. Reviewed by Simon Hausmann. Also, remove the painting optimization as it is broken in some situations, as there is an assumption in that comparison that the guards cannot be nested, which goes against the design and its use. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initializeDesktop): (QQuickWebViewPrivate::initializeTouch): (QQuickWebViewPrivate::_q_suspend): (QQuickWebViewPrivate::_q_resume): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::ViewportUpdateGuard::ViewportUpdateGuard): (WebKit::ViewportUpdateGuard::~ViewportUpdateGuard): (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::scaleAnimationStateChanged): (WebKit::QtViewportInteractionEngine::scrollStateChanged): (WebKit::QtViewportInteractionEngine::event): (WebKit::QtViewportInteractionEngine::pagePositionRequest): (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): (WebKit::QtViewportInteractionEngine::reset): (WebKit::QtViewportInteractionEngine::applyConstraints): (WebKit::QtViewportInteractionEngine::panGestureRequestUpdate): (WebKit::QtViewportInteractionEngine::panGestureEnded): (WebKit::QtViewportInteractionEngine::pinchGestureActive): (WebKit::QtViewportInteractionEngine::pinchGestureStarted): (WebKit::QtViewportInteractionEngine::pinchGestureRequestUpdate): (WebKit::QtViewportInteractionEngine::pinchGestureEnded): (WebKit::QtViewportInteractionEngine::itemSizeChanged): * UIProcess/qt/QtViewportInteractionEngine.h: 2011-11-29 Carlos Garcia Campos [GTK] Add WebKitURIResponse to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=72946 Reviewed by Martin Robinson. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitURIResponse.cpp: Added. (webkitURIResponseFinalize): (webkitURIResponseGetProperty): (webkitURIResponseSetProperty): (webkit_uri_response_class_init): (webkit_uri_response_init): (webkit_uri_response_get_uri): Return the URI of the response. (webkit_uri_response_get_status_code): Return the status code of the response, or SOUP_STATUS_NONE. (webkit_uri_response_get_content_length): Return the expected content length of the response. (webkitURIResponseCreateForSoupMessage): Private function to create a response object from a SoupMessage. (webkitURIResponseGetSoupMessage): Return the soup message associated to the response. (webkitURIResponseSetContentLength): Set the expected content length of the response. This is useful for non http responses. * UIProcess/API/gtk/WebKitURIResponse.h: Added. * UIProcess/API/gtk/WebKitURIResponsePrivate.h: Added. * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_uri_response_get_type(). * UIProcess/API/gtk/webkit2.h: Add WebKitURIResponse.h. 2011-11-29 Kenneth Rohde Christiansen [Qt] QQuickWebView gets wrong position after reload https://bugs.webkit.org/show_bug.cgi?id=73292 Reviewed by Simon Hausmann. The ensureContentWithinViewportBoundary animates the current viewport item into boundaries. That of course breaks when we try to animate it, given the initial-scale which hasn't been applied; so apply it. Also put the QScroller settings code in the ctor as it never changes. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::QtViewportInteractionEngine): (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): (WebKit::QtViewportInteractionEngine::reset): (WebKit::QtViewportInteractionEngine::applyConstraints): * UIProcess/qt/QtViewportInteractionEngine.h: 2011-11-29 Roland Steiner