2011-12-19 Kenneth Rohde Christiansen First stab at upstreaming our virtual keyboard code Reviewed by Simon Hausmann. Add basic implementation of inputMethodEvent * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::handleEvent): (QtWebPageEventHandler::inputMethodEvent): * UIProcess/qt/QtWebPageEventHandler.h: 2011-12-19 Simon Hausmann [Qt][WK2] Add support for modal event loop processing for WTR https://bugs.webkit.org/show_bug.cgi?id=74852 Reviewed by Kenneth Rohde Christiansen. Add support for nested event loops, used by WebPage::runModal(). * Platform/qt/RunLoopQt.cpp: (RunLoop::run): (RunLoop::stop): 2011-12-18 Sam Weinig Another attempt to fix the windows build. * Platform/win/WorkQueueWin.cpp: (WorkQueue::performWorkOnRegisteredWorkThread): (WorkQueue::dispatch): 2011-12-18 Sam Weinig Try to fix the windows build. * Platform/win/WorkQueueWin.cpp: (WorkQueue::performWorkOnRegisteredWorkThread): 2011-12-18 Sam Weinig Remove now unused WorkItem.h https://bugs.webkit.org/show_bug.cgi?id=74818 Reviewed by Andreas Kling. * GNUmakefile.am: * Platform/CoreIPC/Connection.cpp: * Platform/RunLoop.cpp: * Platform/RunLoop.h: * Platform/WorkItem.h: Removed. * Platform/gtk/RunLoopGtk.cpp: * Platform/mac/RunLoopMac.mm: * Platform/mac/WorkQueueMac.cpp: (WorkQueue::platformInvalidate): * Platform/qt/RunLoopQt.cpp: * Platform/win/RunLoopWin.cpp: * Target.pri: * UIProcess/ResponsivenessTimer.cpp: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: * win/WebKit2.vcproj: 2011-12-18 Anders Carlsson Set the main frame view scroll position asynchronously https://bugs.webkit.org/show_bug.cgi?id=74823 Reviewed by Sam Weinig. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Don't make the background red. 2011-12-18 Sam Weinig Move timestamp down from PlatformEvent subclasses to the base class https://bugs.webkit.org/show_bug.cgi?id=74805 Reviewed by Anders Carlsson. * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent): (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): 2011-12-18 Anders Carlsson Add a scrolling thread to the scrolling coordinator https://bugs.webkit.org/show_bug.cgi?id=74814 Reviewed by Andreas Kling. Check if the scrolling coordinator can handle the wheel event before dispatching it to the main thread. * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent): 2011-12-18 Anders Carlsson EventDispatcher should keep track of all scrolling coordinators https://bugs.webkit.org/show_bug.cgi?id=74810 Reviewed by Andreas Kling. * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::addScrollingCoordinatorForPage): Get the scrolling coordinator from the WebCore page and add it to the map. (WebKit::EventDispatcher::removeScrollingCoordinatorForPage): Remove the scrolling coordinator from the map. (WebKit::EventDispatcher::sendDidHandleEvent): Add a new helper function, currently unused. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Add the scrolling coordinator. (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea): Remove the scrolling coordinator. * WebProcess/WebProcess.h: (WebKit::WebProcess::eventDispatcher): Add a getter. 2011-12-16 Anders Carlsson Move everyone off of WorkItem https://bugs.webkit.org/show_bug.cgi?id=74773 Reviewed by Darin Adler. * Platform/CoreIPC/unix/ConnectionUnix.cpp: (CoreIPC::Connection::open): (CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination): * Platform/CoreIPC/win/ConnectionWin.cpp: (CoreIPC::Connection::open): * Platform/RunLoop.cpp: (RunLoop::performWork): (RunLoop::dispatch): * Platform/RunLoop.h: * Platform/WorkQueue.cpp: * Platform/WorkQueue.h: (WorkQueue::WorkItemWin::function): * Platform/gtk/WorkQueueGtk.cpp: (WorkQueue::EventSource::EventSource): (WorkQueue::EventSource::executeEventSource): (WorkQueue::registerEventSourceHandler): (WorkQueue::dispatchOnSource): (WorkQueue::dispatch): (WorkQueue::dispatchAfterDelay): (WorkQueue::dispatchOnTermination): * Platform/mac/WorkQueueMac.cpp: (WorkQueue::executeFunction): (WorkQueue::dispatch): (WorkQueue::dispatchAfterDelay): * Platform/qt/WorkQueueQt.cpp: (WorkQueue::WorkItemQt::WorkItemQt): (WorkQueue::WorkItemQt::~WorkItemQt): (WorkQueue::WorkItemQt::execute): (WorkQueue::registerSocketEventHandler): (WorkQueue::dispatch): (WorkQueue::dispatchAfterDelay): (WorkQueue::dispatchOnTermination): * Platform/win/RunLoopWin.cpp: (RunLoop::wakeUp): * Platform/win/WorkQueueWin.cpp: (WorkQueue::WorkItemWin::WorkItemWin): (WorkQueue::WorkItemWin::create): (WorkQueue::HandleWorkItem::HandleWorkItem): (WorkQueue::HandleWorkItem::createByAdoptingHandle): (WorkQueue::registerHandle): (WorkQueue::dispatch): * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Launcher/win/ProcessLauncherWin.cpp: (WebKit::ProcessLauncher::launchProcess): * WebProcess/mac/CoreIPCClientRunLoop.mm: (WebKit::callOnCoreIPCClientRunLoopAndWait): 2011-12-17 Sam Weinig Make PlatformTouchEvent inherit from PlatformEvent https://bugs.webkit.org/show_bug.cgi?id=74777 Reviewed by Andreas Kling. * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformTouchEvent::WebKit2PlatformTouchEvent): Add PlatformEvent prefix to enum types. 2011-12-16 Anders Carlsson Convert more WorkItems over to WTF::Functions https://bugs.webkit.org/show_bug.cgi?id=74770 Reviewed by Andreas Kling. * Platform/WorkQueue.cpp: (WorkQueue::dispatchAfterDelay): * Platform/WorkQueue.h: * Shared/ChildProcess.cpp: (WebKit::ChildProcess::didCloseOnConnectionWorkQueue): * UIProcess/Launcher/ThreadLauncher.cpp: (WebKit::ThreadLauncher::launchThread): * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::ProcessLauncher::launchProcess): * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::pluginThreadAsyncCall): * WebProcess/Plugins/PluginView.cpp: (WebKit::derefPluginView): (WebKit::PluginView::unprotectPluginFromDestruction): 2011-12-16 Mark Hahnenberg Windows test fix Unreviewed test fix. All Windows tests were crashing when objects who were pointing to static data members across DLL boundaries were getting garbage in their pointers. * win/WebKit2.def: 2011-12-16 Ryosuke Niwa Rename registerCommandFor(Undo|Redo) to register(Undo|Redo)Step https://bugs.webkit.org/show_bug.cgi?id=74748 Reviewed by Eric Seidel. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::registerUndoStep): (WebKit::WebEditorClient::registerRedoStep): * WebProcess/WebCoreSupport/WebEditorClient.h: 2011-12-16 Anders Carlsson Add a pretty dumb tile cache to WebTileCacheLayer https://bugs.webkit.org/show_bug.cgi?id=74753 Reviewed by Simon Fraser. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::flushLayers): Always do a layout here, to prevent an ASSERT(!needsLayout()) when painting. 2011-12-16 Anders Carlsson TiledCoreAnimationDrawingArea should enable the scrolling coordinator https://bugs.webkit.org/show_bug.cgi?id=74724 Reviewed by Adam Roben. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): 2011-12-16 Sam Weinig Give PlatformEvents a base class https://bugs.webkit.org/show_bug.cgi?id=74685 Reviewed by Anders Carlsson. Add a base class for PlatformMouseEvent, PlatformKeyboardEvent, PlatformWheelEvent and PlatformGestureEvent and move Type enumeration and modifiers down to it. * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): (WebKit::WebKit2PlatformWheelEvent::WebKit2PlatformWheelEvent): (WebKit::WebKit2PlatformKeyboardEvent::WebKit2PlatformKeyboardEvent): (WebKit::WebKit2PlatformGestureEvent::WebKit2PlatformGestureEvent): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: (WebKit::WebEditorClient::handleKeyboardEvent): * WebProcess/WebPage/WebPage.cpp: (WebKit::handleMouseEvent): (WebKit::WebPage::setInitialFocus): (WebKit::WebPage::handleEditingKeyboardEvent): (WebKit::WebPage::dragEnded): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::executeKeypressCommandsInternal): (WebKit::WebPage::handleEditingKeyboardEvent): 2011-12-16 Ryosuke Niwa Only EditCommandComposition should implement unapply and reapply https://bugs.webkit.org/show_bug.cgi?id=74490 Reviewed by Eric Seidel. Renamed WebEditCommand to WebUndoStep and made necessary changes. Everything on WebProcess side should have the correct name now. Names in the proxy and UIProcess are to be updated in a follow up. * CMakeLists.txt: * GNUmakefile.am: * Target.pri: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::registerCommandForUndo): (WebKit::WebEditorClient::registerCommandForRedo): * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebPage/WebEditCommand.cpp: Removed. * WebProcess/WebPage/WebEditCommand.h: Removed. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::webUndoStep): (WebKit::WebPage::addWebUndoStep): (WebKit::WebPage::removeWebEditCommand): (WebKit::WebPage::unapplyEditCommand): (WebKit::WebPage::reapplyEditCommand): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebUndoStep.cpp: Copied from Source/WebKit2/WebProcess/WebPage/WebEditCommand.cpp. (WebKit::generateUndoStep): (WebKit::WebUndoStep::create): * WebProcess/WebPage/WebUndoStep.h: Copied from Source/WebKit2/WebProcess/WebPage/WebEditCommand.h. (WebKit::WebUndoStep::entry): (WebKit::WebUndoStep::entryID): (WebKit::WebUndoStep::WebUndoStep): * win/WebKit2.vcproj: 2011-12-16 Simon Hausmann [Qt] Eliminate dependency to QUndoStack https://bugs.webkit.org/show_bug.cgi?id=74691 Reviewed by Kenneth Rohde Christiansen. Replaced the QUndoStack with two vectors. When calling unapply() on the edit command proxy, it will automatically re-register itself in the redo stack. * UIProcess/qt/QtWebUndoController.cpp: (QtWebUndoController::registerEditCommand): (QtWebUndoController::clearAllEditCommands): (QtWebUndoController::canUndoRedo): (QtWebUndoController::executeUndoRedo): * UIProcess/qt/QtWebUndoController.h: 2011-12-16 Rafael Brandao [Qt][WK2] Move webView.page into experimental https://bugs.webkit.org/show_bug.cgi?id=74406 Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewExperimental::page): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::accessPage): 2011-12-16 Mark Hahnenberg De-virtualize destructors https://bugs.webkit.org/show_bug.cgi?id=74331 Reviewed by Geoffrey Garen. * WebProcess/Plugins/Netscape/JSNPMethod.cpp: Add trivial destructor assert. * WebProcess/Plugins/Netscape/JSNPObject.cpp: Add static destroy. (WebKit::JSNPObject::destroy): * WebProcess/Plugins/Netscape/JSNPObject.h: * win/WebKit2.def: Add/remove necessary symbols. * win/WebKit2CFLite.def: Ditto. 2011-12-16 Carlos Garcia Campos [GTK] Use bit field for bool members of WebKitWindowPropertiesPrivate https://bugs.webkit.org/show_bug.cgi?id=74713 Reviewed by Gustavo Noronha Silva. Most of the members are bools, so it reduces the memory footprint. * UIProcess/API/gtk/WebKitWindowProperties.cpp: 2011-12-16 Carlos Garcia Campos [GTK] Window frame should be 0x0 when the toplevel window is not visible https://bugs.webkit.org/show_bug.cgi?id=74709 Reviewed by Gustavo Noronha Silva. * UIProcess/API/gtk/WebKitUIClient.cpp: (getWindowFrame): Check also whether the toplevel is visible before getting its size and position. 2011-12-16 Michael Bruning [qt][wk2] Viewport info panel shows wrong current scale https://bugs.webkit.org/show_bug.cgi?id=74613 Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/qwebviewportinfo.cpp: (QWebViewportInfo::currentScale): Added division by devicePixelRatio. Also added emission of currenScaleUpdated signal when the viewport constraints have been updated. (QWebViewportInfo::didUpdateViewportConstraints): * UIProcess/API/qt/qwebviewportinfo_p.h: Changed return type of currentScale to QVariant as it depends on the viewport interaction engine now. * UIProcess/qt/QtViewportInteractionEngine.cpp: (WebKit::QtViewportInteractionEngine::ensureContentWithinViewportBoundary): Changed to use currentCSSScale for getting the current css scale. (WebKit::QtViewportInteractionEngine::currentCSSScale): Added. * UIProcess/qt/QtViewportInteractionEngine.h: Added method currentCSSScale. 2011-12-15 Martin Robinson Fix 'make dist' in preparation for the GTK+ release. * GNUmakefile.am: Add missing header. 2011-12-15 Anders Carlsson Add support for accelerated compositing to the tiled Core Animation drawing area https://bugs.webkit.org/show_bug.cgi?id=74675 Reviewed by Andreas Kling. Add a layer flush scheduler and get rid of the content layer since WebCore will manage that for us. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay): (WebKit::TiledCoreAnimationDrawingArea::scroll): (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): (WebKit::TiledCoreAnimationDrawingArea::scheduleCompositingLayerSync): (WebKit::TiledCoreAnimationDrawingArea::flushLayers): (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): 2011-12-15 Sheriff Bot Unreviewed, rolling out r102652 and r102717. http://trac.webkit.org/changeset/102652 http://trac.webkit.org/changeset/102717 https://bugs.webkit.org/show_bug.cgi?id=74674 Broke too many webs. (Requested by kling on #webkit). * UIProcess/API/mac/WKView.mm: (-[WKView _updateWindowAndViewFrames]): * UIProcess/WebPageProxy.h: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::windowAndViewFramesChanged): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::windowAndViewFramesChanged): * WebProcess/Plugins/PluginView.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::windowRect): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::windowAndViewFramesChanged): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::windowFrameInScreenCoordinates): (WebKit::WebPage::viewFrameInWindowCoordinates): (WebKit::WebPage::accessibilityPosition): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]): 2011-12-15 Gustavo Noronha Silva [GTK] New API test for WindowProperties fails https://bugs.webkit.org/show_bug.cgi?id=74630 Reviewed by Martin Robinson. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (WindowProperties::viewReadyToShow): assert each member to make assertion error messages more useful, and avoid asserting x and y, since we are getting bad values from WebCore, for some reason. (testWebViewWindowProperties): use smaller values that fit inside the 800x600 screen used by the bots. 2011-12-15 Anders Carlsson EventDispatcher should handle wheel events on the connection queue https://bugs.webkit.org/show_bug.cgi?id=74627 Reviewed by Andreas Kling. Send wheel events to the EventDispatcher, which handles them on the connection work queue, and immediately bounces them to the main thread (for now). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleWheelEvent): (WebKit::WebPageProxy::didReceiveEvent): * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::wheelEvent): (WebKit::EventDispatcher::dispatchWheelEvent): * WebProcess/WebPage/EventDispatcher.h: * WebProcess/WebPage/EventDispatcher.messages.in: * WebProcess/WebPage/WebPage.h: 2011-12-15 Jon Lee [WK2] Extend WebNotification to include its origin https://bugs.webkit.org/show_bug.cgi?id=74615 Reviewed by Sam Weinig. * Shared/API/c/WKSecurityOrigin.h: Expose API that converts the security origin to database identifier. * Shared/API/c/WKSecurityOrigin.cpp: (WKSecurityOriginCopyDatabaseIdentifier): * UIProcess/Notifications/WebNotification.h: Extend WebNotification to include the origin. (WebKit::WebNotification::create): (WebKit::WebNotification::origin): * UIProcess/Notifications/WebNotification.cpp: Remove unneeded encode() and decode() functions. (WebKit::WebNotification::WebNotification): * UIProcess/API/C/WKNotification.h: Expose WebNotification's origin(). * UIProcess/API/C/WKNotification.cpp: (WKNotificationGetSecurityOrigin): * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: Update show() to include the origin of the notification. * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::show): * UIProcess/Notifications/WebNotificationManagerProxy.h: * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::show): Pass the notification's exec context's origin as identifier. 2011-12-15 Rafael Brandao [Qt][WK2] Add test for download policy on navigation request https://bugs.webkit.org/show_bug.cgi?id=74541 Reviewed by Tor Arne Vestbø. * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_navigationRequested.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_download.qml: Make it wait for a downloadFinished signal to finish the test. 2011-12-15 Anders Carlsson Move WorkQueue Mach handlers over to WTF::Function https://bugs.webkit.org/show_bug.cgi?id=74620 Reviewed by Sam Weinig. * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC::Connection::open): (CoreIPC::Connection::initializeDeadNameSource): * Platform/WorkQueue.h: * Platform/mac/WorkQueueMac.cpp: (WorkQueue::EventSource::EventSource): (WorkQueue::EventSource::eventHandler): (WorkQueue::registerMachPortEventHandler): 2011-12-14 Anders Carlsson Add WTF::Function to wtf/Forward.h https://bugs.webkit.org/show_bug.cgi?id=74576 Reviewed by Adam Roben. * Platform/RunLoop.h: * Platform/WorkQueue.h: Remove forward declarations and just include wtf/Forward.h. 2011-12-15 Rafael Brandao [Qt][WK2] Move WebPreferences into experimental https://bugs.webkit.org/show_bug.cgi?id=74404 Reviewed by Tor Arne Vestbø. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewExperimental::preferences): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml: * UIProcess/API/qt/tests/qmltests/WebView/tst_preferences.qml: 2011-12-15 Carlos Garcia Campos [GTK] Add WebKitWindowProperties to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=74595 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitUIClient.cpp: (createNewPage): Pass the dictionary containing the window features to webkitWebViewCreateNewPage(). (toolbarsAreVisible): Return WebKitWindowProperties:toolbar-visible. (setToolbarsAreVisible): Set WebKitWindowProperties:toolbar-visible. (menuBarIsVisible): Return WebKitWindowProperties:menu-visible. (setMenuBarIsVisible): Set WebKitWindowProperties:menu-visible. (statusBarIsVisible): Return WebKitWindowProperties:status-visible. (setStatusBarIsVisible): Set WebKitWindowProperties:status-visible. (isResizable): Return WebKitWindowProperties:resizable. (setIsResizable): Set WebKitWindowProperties:resizable. (getWindowFrame): Return WebKitWindowProperties:geometry. (setWindowFrame): Set WebKitWindowProperties:geometry. (webkitUIClientAttachUIClientToPage): Initialize the UI client for the given page. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_init): Create a WebKitWindowProperties object for the view. (webkit_web_view_class_init): (webkitWebViewCreateNewPage): Update the WebKitWindowProperties object using the window features dictionary. (webkit_web_view_get_window_properties): Return the WebKitWindowProperties object of the view. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/WebKitWindowProperties.cpp: Added. (webkitWindowPropertiesFinalize): (webkitWindowPropertiesGetProperty): (webkitWindowPropertiesSetProperty): (webkit_window_properties_class_init): (webkit_window_properties_init): (webkitWindowPropertiesCreate): Create a new WebKitWindowProperties object. (webkitWindowPropertiesSetGeometry): (webkitWindowPropertiesSetToolbarVisible): (webkitWindowPropertiesSetMenubarVisible): (webkitWindowPropertiesSetStatusbarVisible): (webkitWindowPropertiesSetLocationbarVisible): (webkitWindowPropertiesSetScrollbarsVisible): (webkitWindowPropertiesSetResizable): (webkitWindowPropertiesSetFullscreen): (webkitWindowPropertiesUpdateFromWKWindowFeatures): Parse the window features dictionary and update the WebKitWindowProperties object accordingly. (webkit_window_properties_get_geometry): (webkit_window_properties_get_toolbar_visible): (webkit_window_properties_get_statusbar_visible): (webkit_window_properties_get_scrollbars_visible): (webkit_window_properties_get_menubar_visible): (webkit_window_properties_get_locationbar_visible): (webkit_window_properties_get_resizable): (webkit_window_properties_get_fullscreen): * UIProcess/API/gtk/WebKitWindowProperties.h: Added. * UIProcess/API/gtk/WebKitWindowPropertiesPrivate.h: Copied from Source/WebKit2/UIProcess/API/gtk/WebKitWebViewPrivate.h. * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new section for WebKitWindowProperties. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add webkit_window_properties_get_type. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (WindowProperties::windowPropertiesNotifyCallback): (WindowProperties::viewReadyToShow): (WindowProperties::viewCreate): (WindowProperties::setExpectedWindowProperties): (testWebViewWindowProperties): (beforeAll): * UIProcess/API/gtk/webkit2.h: Include WebKitWindowProperties.h. * UIProcess/WebUIClient.cpp: (WebKit::WebUIClient::createNewPage): Add also "locationBarVisible" to the window features dictionary. 2011-12-15 Caio Marcelo de Oliveira Filho [Qt] [WK2] Remove QtWebPageProxy https://bugs.webkit.org/show_bug.cgi?id=74540 Reviewed by Kenneth Rohde Christiansen. Move WebPageProxy* to QQuickWebViewPrivate. The remaining functions in QtWebPageProxy were simple wrappers to WebKit functionality (text zoom, page zoom and user agent setting). Since those wrappers are unused, they were removed. The signal in the class was also unused. This patch also remove the code from WebContextMenuProxyQt, it was remains of a previous QMenu-based implementation. We want to rewrite this code for QML anyway, so I reverted to an empty state. Farewell, QtWebPageProxy! * Target.pri: * UIProcess/API/qt/qquickwebpage.cpp: * UIProcess/API/qt/qquickwebpage_p.h: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::~QQuickWebViewPrivate): (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::processDidCrash): (QQuickWebViewPrivate::createDrawingAreaProxy): (QQuickWebViewPrivate::updateVisibleContentRectAndScale): (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged): (QQuickWebViewPrivate::_q_onVisibleChanged): (QQuickWebViewPrivate::updateViewportSize): (QQuickWebViewPrivate::computeViewportConstraints): (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour): (QQuickWebViewPrivate::setNavigatorQtObjectEnabled): (QQuickWebViewExperimental::postMessage): (QQuickWebView::load): (QQuickWebView::goBack): (QQuickWebView::goForward): (QQuickWebView::stop): (QQuickWebView::reload): (QQuickWebView::url): (QQuickWebView::canGoBack): (QQuickWebView::canGoForward): (QQuickWebView::loading): (QQuickWebView::canReload): (QQuickWebView::title): (QQuickWebView::pageRef): (QQuickWebView::loadHtml): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebnavigationhistory_p_p.h: * UIProcess/API/qt/qwebpreferences.cpp: (QWebPreferencesPrivate::preferencesRef): * UIProcess/PageClient.h: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::QtPageClient): (QtPageClient::initialize): (QtPageClient::createPopupMenuProxy): (QtPageClient::createContextMenuProxy): * UIProcess/qt/QtPageClient.h: * UIProcess/qt/QtWebPageProxy.cpp: Removed. * UIProcess/qt/QtWebPageProxy.h: Removed. * UIProcess/qt/WebContextMenuProxyQt.cpp: (WebKit::WebContextMenuProxyQt::WebContextMenuProxyQt): (WebKit::WebContextMenuProxyQt::create): (WebKit::WebContextMenuProxyQt::showContextMenu): (WebKit::WebContextMenuProxyQt::hideContextMenu): * UIProcess/qt/WebContextMenuProxyQt.h: 2011-12-15 Simon Hausmann [WK2] Eliminate unnecessary GTK/QT ifdefs for shared memory implementation https://bugs.webkit.org/show_bug.cgi?id=74602 Reviewed by Kenneth Rohde Christiansen. For shared memory Qt was using shm_open, Gtk was using files in /tmp. There is no reason to obfuscate the code with #ifdefs or let Gtk use an inferior method of opening shared memory. So this patch makes SharedMemoryUnix.cpp truly Qt and Gtk independent. * Platform/unix/SharedMemoryUnix.cpp: (WebKit::SharedMemory::create): 2011-12-15 Simon Hausmann [Qt] Cleanup: Remove unnecessary const_cast Reviewed by Kenneth Christiansen. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebView::preferences): 2011-12-15 Michael Brüning [QT][WK2]Add (experimental) viewport info view to Minibrowser/qt. https://bugs.webkit.org/show_bug.cgi?id=72893 Reviewed by Kenneth Rohde Christiansen. This patch extends QQuickWebViewExperimental by a property named viewportInfo, which contains the viewport scalability and layout and contents size information. This property is exposed to QML through the experimental extension for QQuickWebView. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::didChangeContentsSize): (QQuickWebViewPrivate::computeViewportConstraints): (QQuickWebViewPrivate::PostTransitionState::apply): Added applying contentsSize to viewportInfo. (QQuickWebViewExperimental::QQuickWebViewExperimental): (QQuickWebViewExperimental::viewportInfo): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: Moved PostTransitionState::apply to qquickwebview.cpp. Added friend QWebViewportInfo. * UIProcess/API/qt/qwebviewportinfo.cpp: Added. (QWebViewportInfo::QWebViewportInfo): (QWebViewportInfo::~QWebViewportInfo): (QWebViewportInfo::contentsSize): (QWebViewportInfo::currentScale): (QWebViewportInfo::devicePixelRatio): (QWebViewportInfo::initialScale): (QWebViewportInfo::minimumScale): (QWebViewportInfo::maximumScale): (QWebViewportInfo::isScalable): (QWebViewportInfo::layoutSize): (QWebViewportInfo::didUpdateContentsSize): (QWebViewportInfo::didUpdateCurrentScale): (QWebViewportInfo::didUpdateViewportConstraints): * UIProcess/API/qt/qwebviewportinfo_p.h: Added. * UIProcess/qt/QtViewportInteractionEngine.h: (WebKit::QtViewportInteractionEngine::Constraints::Constraints): Added layoutSize. (WebKit::QtViewportInteractionEngine::constraints): Added property to access m_contraints. 2011-12-15 Simon Hausmann [WK2] WebPage::m_useFixedLayout variable unininitialized https://bugs.webkit.org/show_bug.cgi?id=74596 Reviewed by Kenneth Rohde Christiansen. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Avoid uninitialized use through initialization in the constructor. 2011-12-15 Alexander Færøy [Qt] r102849 broke the Qt build on Mac OS X. https://bugs.webkit.org/show_bug.cgi?id=74594 Reviewed by Simon Hausmann. The __APPLE__ macro is defined on all standard OS X compilers, which leads to various CoreGraphics headers to be included in the Qt build. * config.h: 2011-12-14 Jing Zhao Opening two popup menus by dispatchEvent() makes problems. https://bugs.webkit.org/show_bug.cgi?id=73304 Reviewed by Kent Tamura. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::hasOpenedPopup): Not implemented. * WebProcess/WebCoreSupport/WebChromeClient.h: Overrides hasOpenedPopup(). 2011-12-14 Sam Weinig Remove whitespace from InheritedPropertySheets attributes in vsprops files to appease the Visual Studio project migrator. Reviewed by Adam Roben. * win/WebKit2Debug.vsprops: * win/WebKit2DebugAll.vsprops: * win/WebKit2DebugCairoCFLite.vsprops: * win/WebKit2Production.vsprops: * win/WebKit2Release.vsprops: * win/WebKit2ReleaseCairoCFLite.vsprops: * win/WebKit2WebProcessDebug.vsprops: * win/WebKit2WebProcessDebugAll.vsprops: * win/WebKit2WebProcessDebugCairoCFLite.vsprops: * win/WebKit2WebProcessProduction.vsprops: * win/WebKit2WebProcessRelease.vsprops: * win/WebKit2WebProcessReleaseCairoCFLite.vsprops: 2011-12-14 Anders Carlsson Add WorkQueue::dispatch and RunLoop::dispatch which both take WTF::Function objects https://bugs.webkit.org/show_bug.cgi?id=74574 Reviewed by Sam Weinig. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::SyncMessageState::processIncomingMessage): (CoreIPC::Connection::addQueueClient): (CoreIPC::Connection::removeQueueClient): (CoreIPC::Connection::invalidate): (CoreIPC::Connection::sendMessage): (CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue): (CoreIPC::Connection::connectionDidClose): (CoreIPC::Connection::enqueueIncomingMessage): Switch over to dispatch. * Platform/RunLoop.cpp: (RunLoop::dispatch): Create a FunctionWorkItem and call scheduleWork. * Platform/RunLoop.h: Add dispatch. * Platform/WorkItem.h: (FunctionWorkItem::FunctionWorkItem): (FunctionWorkItem::execute): (WorkItem::create): Add a helper work item that wraps a WTF::Function. * Platform/WorkQueue.cpp: (WorkQueue::dispatch): Create a FunctionWorkItem and call scheduleWork. * Platform/WorkQueue.h: Add dispatch. * UIProcess/Launcher/ProcessLauncher.cpp: (WebKit::ProcessLauncher::ProcessLauncher): Switch over to dispatch. 2011-12-14 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-14 Alexey Proskuryakov [Mac] Sandbox violation opening AppleSNBFBUserClient https://bugs.webkit.org/show_bug.cgi?id=74560 Reviewed by Darin Adler. * WebProcess/com.apple.WebProcess.sb: Just allow it. 2011-12-13 Jon Lee Enable notifications on Mac. Reviewed by Sam Weinig. * Configurations/FeatureDefines.xcconfig: 2011-12-14 Mark Rowe NPN_GetValueForURL returns wrong value for NPNURLVProxy Reviewed by Anders Carlsson. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::proxiesForURL): Fix a copy-paste error. 2011-12-14 Caio Marcelo de Oliveira Filho [Qt] [WK2] Move QWebPreferences out of QtWebPageProxy https://bugs.webkit.org/show_bug.cgi?id=74525 Reviewed by Luiz Agostini. This patch also uses internal WebKit API to set the Accelerate Compositing directly instead of going thru QWebPreferencesPrivate. The previous approach was always causing the QWebPreferences to be created making the "lazy initialization" useless. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::navigatorQtObjectEnabled): (QQuickWebViewPrivate::setNavigatorQtObjectEnabled): (QQuickWebViewExperimental::postMessage): (QQuickWebView::preferences): * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebpreferences.cpp: (QWebPreferencesPrivate::createPreferences): (QWebPreferencesPrivate::testAttribute): (QWebPreferencesPrivate::setAttribute): (QWebPreferences::navigatorQtObjectEnabled): (QWebPreferences::setNavigatorQtObjectEnabled): (QWebPreferencesPrivate::preferencesRef): * UIProcess/API/qt/qwebpreferences_p_p.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): * UIProcess/qt/QtWebPageProxy.h: 2011-12-14 Carlos Garcia Campos [GTK] Page size should be 0,0 when view widget is not realized https://bugs.webkit.org/show_bug.cgi?id=74523 Reviewed by Martin Robinson. We currently return 1,1 because GTK+ initializes widget allocation as -1,-1,1,1. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::viewSize): Check whether widget is realized and return IntSize() in that case. 2011-12-14 Caio Marcelo de Oliveira Filho [Qt] [WK2] Move download handling out of QtWebPageProxy https://bugs.webkit.org/show_bug.cgi?id=74506 Reviewed by Kenneth Rohde Christiansen. Also moves the creation of QtWebContext out of QtWebPageProxy. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::handleDownloadRequest): (QQuickWebViewPrivate::_q_onReceivedResponseFromDownload): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebdownloaditem_p.h: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::handleDownloadRequest): * UIProcess/qt/QtPageClient.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): * UIProcess/qt/QtWebPageProxy.h: 2011-12-14 Caio Marcelo de Oliveira Filho [Qt] [WK2] Move QWebNavigationHistory to QQuickWebView https://bugs.webkit.org/show_bug.cgi?id=74442 Reviewed by Simon Hausmann. QWebNavigationHistory used QtWebPageProxy to be QObject parent of the inner models, this patch change that to use OwnPtr instead. When creating the history object we pass only the WKPageRef and let it get the backForwardList. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::didChangeBackForwardList): (QQuickWebViewExperimental::navigationHistory): (QQuickWebViewExperimental::goForwardTo): (QQuickWebViewExperimental::goBackTo): * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebnavigationhistory.cpp: (QWebNavigationListModelPrivate::createWebNavigationModel): (QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate): (QWebNavigationHistoryPrivate::createHistory): (QWebNavigationHistoryPrivate::goBackTo): (QWebNavigationHistoryPrivate::goForwardTo): (QWebNavigationListModel::QWebNavigationListModel): (QWebNavigationHistory::backItems): (QWebNavigationHistory::forwardItems): * UIProcess/API/qt/qwebnavigationhistory_p.h: * UIProcess/API/qt/qwebnavigationhistory_p_p.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): * UIProcess/qt/QtWebPageProxy.h: 2011-12-14 Caio Marcelo de Oliveira Filho [Qt][WK2] Remove DrawingArea and QtWebPageEventHandler code from QtWebPageProxy https://bugs.webkit.org/show_bug.cgi?id=74414 Reviewed by Simon Hausmann. This also moves QtWebPageEventHandler to inside QQuickWebPagePrivate, to avoid the WebPage having a backpointer to the QQuickWebView. * Target.pri: * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::geometryChanged): (QQuickWebPage::event): (QQuickWebPagePrivate::QQuickWebPagePrivate): (QQuickWebPagePrivate::initialize): (QQuickWebPagePrivate::setDrawingAreaSize): (QQuickWebPagePrivate::paintToCurrentGLContext): (QQuickWebPagePrivate::resetPaintNode): * UIProcess/API/qt/qquickwebpage_p.h: * UIProcess/API/qt/qquickwebpage_p_p.h: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::initializeDesktop): (QQuickWebViewPrivate::initializeTouch): (QQuickWebViewPrivate::_q_resume): (QQuickWebViewPrivate::processDidCrash): (QQuickWebViewPrivate::didRelaunchProcess): (QQuickWebViewPrivate::createDrawingAreaProxy): (QQuickWebViewPrivate::updateVisibleContentRectAndScale): (QQuickWebViewPrivate::_q_viewportTrajectoryVectorChanged): (QQuickWebViewPrivate::updateViewportSize): * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::createDrawingAreaProxy): * UIProcess/qt/QtPageClient.h: (QtPageClient::findStringInCustomRepresentation): (QtPageClient::countStringMatchesInCustomRepresentation): * UIProcess/qt/QtWebPageEventHandler.cpp: (QtWebPageEventHandler::QtWebPageEventHandler): (QtWebPageEventHandler::startDrag): * UIProcess/qt/QtWebPageEventHandler.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::init): * UIProcess/qt/QtWebPageProxy.h: 2011-12-13 Gustavo Noronha Silva Unreviewed build fix. * GNUmakefile.am: make sure we do not derreference the target link if it already exists, and replace it with the new one instead, otherwise we end up with a gtk link inside Source/WebKit2/UIProcess/API/gtk, which causes the documentation build to produce warnings, and make the build fail. 2011-12-13 Andreas Kling REGRESSION (r102652): New window opens with zero size at produbanco.com and Reviewed by Anders Carlsson. Don't use the cached window frame if it's empty (meaning we haven't received a WindowAndViewFramesChanged message yet.) Instead use the synchronous GetWindowFrame (WP->UIP) message. This situation occurs when opening a new window via window.open(), in which WebCore::createWindow() will query the windowRect() on the new window. I spent a long time trying to write a layout test for this but couldn't come up with something reliable. The windowRect() is non-empty before we get a chance to run JS in/on the new window, and we can't check against the requested geometry since it varies depending on whether the window manager has shown the new window yet. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::windowRect): 2011-12-13 Caio Marcelo de Oliveira Filho [Qt][WK2] Make QtPageClient dispatch directly to WebView when possible https://bugs.webkit.org/show_bug.cgi?id=74407 Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::~QQuickWebViewPrivate): (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::pageDidRequestScroll): (QQuickWebViewPrivate::processDidCrash): (QQuickWebViewPrivate::didRelaunchProcess): (QQuickWebViewPrivate::viewSize): (QQuickWebViewPrivate::didReceiveMessageFromNavigatorQtObject): (QQuickWebViewExperimental::QQuickWebViewExperimental): (QQuickWebView::QQuickWebView): * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::QtPageClient): (QtPageClient::setViewNeedsDisplay): (QtPageClient::pageDidRequestScroll): (QtPageClient::processDidCrash): (QtPageClient::didRelaunchProcess): (QtPageClient::didChangeContentsSize): (QtPageClient::didChangeViewportProperties): (QtPageClient::createPopupMenuProxy): (QtPageClient::didReceiveMessageFromNavigatorQtObject): (QtPageClient::viewSize): (QtPageClient::isViewFocused): (QtPageClient::isViewVisible): * UIProcess/qt/QtPageClient.h: (QtPageClient::initialize): * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): * UIProcess/qt/QtWebPageProxy.h: 2011-12-13 Carlos Garcia Campos [GTK] Add support for javascript dialogs in WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=71362 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitUIClient.cpp: (runJavaScriptAlert): Call webkitWebViewRunJavaScriptAlert(). (runJavaScriptConfirm): Call webkitWebViewRunJavaScriptConfirm(). (runJavaScriptPrompt): Call webkitWebViewRunJavaScriptPrompt(). (webkitUIClientAttachUIClientToPage): Add implementation for runJavaScriptAlert, runJavaScriptConfirm and runJavaScriptPrompt callbacks. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewCreateJavaScriptDialog): Helper function to create javascript dialogs. (webkitWebViewScriptAlert): Default implementation of signal WebKitWebView::script-alert that shows a message dialog. (webkitWebViewScriptConfirm): Default implementation of signal WebKitWebView::script-confirm that shows a question dialog. (webkitWebViewScriptPrompt): Default implementation of signal WebKitWebView::script-prompt that shows a question dialog with a text entry. (webkit_web_view_class_init): (webkitWebViewRunJavaScriptAlert): Emit WebKitWebView::script-alert. (webkitWebViewRunJavaScriptConfirm): Emit WebKitWebView::script-confirm. (webkitWebViewRunJavaScriptPrompt): Emit WebKitWebView::script-prompt. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewJavaScriptDialogs): (beforeAll): * UIProcess/API/gtk/webkit2marshal.list: 2011-12-13 Kenneth Rohde Christiansen [Qt] Make sure that touch events result in the page view gaining focus Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::touchEvent): Force active focus. * UIProcess/API/qt/qquickwebview.cpp: * UIProcess/API/qt/qquickwebview_p.h: Remove ::touchEvent override. 2011-12-13 Carlos Garcia Campos [GTK] Initial UI client implementation for WebKit2 GTK +API https://bugs.webkit.org/show_bug.cgi?id=69753 Reviewed by Martin Robinson. * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/WebKitUIClient.cpp: Added. (createNewPage): Call webkitWebViewCreateNewPage. (showPage): Call webkitWebViewReadyToShowPage. (closePage): Call webkitWebViewClosePage. (webkitUIClientAttachUIClientToPage): Initialize UI client and attach it to the given page. (webkit_ui_client_init): (webkit_ui_client_class_init): * UIProcess/API/gtk/WebKitUIClient.h: Added. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewCreate): Default implementation of signal WebKitWebView::create that simply returns NULL. (webkitWebViewConstructed): Create the default UI client. (webkitWebViewAccumulatorObjectHandled): (webkit_web_view_class_init): (webkitWebViewCreateNewPage): Emit create signal. (webkitWebViewReadyToShowPage): Emit ready-to-show signal. (webkitWebViewClosePage): Emit close signal. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewCreateReadyClose): (beforeAll): * UIProcess/API/gtk/webkit2marshal.list: 2011-12-13 Caio Marcelo de Oliveira Filho [Qt][WK2] Move load & navigation related functions out of QtWebPageProxy https://bugs.webkit.org/show_bug.cgi?id=74395 Reviewed by Simon Hausmann. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::_q_onVisibleChanged): (QQuickWebViewPrivate::updateViewportSize): (QQuickWebViewPrivate::computeViewportConstraints): (QQuickWebViewPrivate::setUseTraditionalDesktopBehaviour): (QQuickWebViewPrivate::webPageProxy): (QQuickWebView::load): (QQuickWebView::goBack): (QQuickWebView::goForward): (QQuickWebView::stop): (QQuickWebView::reload): (QQuickWebView::url): (QQuickWebView::canGoBack): (QQuickWebView::canGoForward): (QQuickWebView::loading): (QQuickWebView::canReload): (QQuickWebView::title): (QQuickWebView::loadHtml): * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::didReceiveMessageFromNavigatorQtObject): * UIProcess/qt/QtWebPageProxy.h: 2011-12-13 Carlos Garcia Campos Unreviewed. Fix GTK+ build after r102640. * GNUmakefile.am: Add DownloadProxy sources again. 2011-12-12 Caio Marcelo de Oliveira Filho [Qt][WK2] Move undo & edit command PageClient callbacks into QtWebUndoController https://bugs.webkit.org/show_bug.cgi?id=74364 Reviewed by Simon Hausmann. The four callbacks in PageClient related to Undo depend only on the QUndoStack. So we move their handling to a QtWebUndoController (owned by QQuickWebViewPrivate). This also make QtWebUndoCommand an implementation detail. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/qt/QtPageClient.cpp: (QtPageClient::registerEditCommand): (QtPageClient::clearAllEditCommands): (QtPageClient::canUndoRedo): (QtPageClient::executeUndoRedo): * UIProcess/qt/QtPageClient.h: (QtPageClient::initialize): * UIProcess/qt/QtWebPageProxy.cpp: * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/QtWebUndoController.cpp: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoCommand.cpp. (QtWebUndoCommand::inUndoRedo): (QtWebUndoCommand::QtWebUndoCommand): (QtWebUndoCommand::~QtWebUndoCommand): (QtWebUndoCommand::redo): (QtWebUndoCommand::undo): (QtWebUndoController::QtWebUndoController): (QtWebUndoController::registerEditCommand): (QtWebUndoController::clearAllEditCommands): (QtWebUndoController::canUndoRedo): (QtWebUndoController::executeUndoRedo): * UIProcess/qt/QtWebUndoController.h: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoCommand.h. 2011-12-12 Andreas Kling Resizing Cappuccino is very laggy on WebKit since Safari 5.1 and Reviewed by Anders Carlsson. On Mac, we already cache the window rect through the WindowAndViewFramesChanged message, so simply return that in WebChromeClient::windowRect() instead of sending a synchronous query to the UIProcess. Changed WindowAndViewFramesChanged to pass FloatRect/FloatPoint rather than IntRect/IntPoint to match the ChromeClient::windowRect() return type. * UIProcess/API/mac/WKView.mm: (-[WKView _updateWindowAndViewFrames]): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setWindowFrame): * UIProcess/WebPageProxy.h: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::windowAndViewFramesChanged): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::windowAndViewFramesChanged): * WebProcess/Plugins/PluginView.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::windowRect): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::windowAndViewFramesChanged): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::windowFrameInScreenCoordinates): (WebKit::WebPage::viewFrameInWindowCoordinates): (WebKit::WebPage::accessibilityPosition): * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]): 2011-12-12 Anders Carlsson Add EventDispatcher class to WebKit2 https://bugs.webkit.org/show_bug.cgi?id=74344 Reviewed by Sam Weinig. The EventDispatcher is a singleton which will be in charge of dispatching events to WebPage objects. * DerivedSources.make: * DerivedSources.pri: * GNUmakefile.am: * Target.pri: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: Add new files. * Platform/CoreIPC/MessageID.h: Add EventDispatcher. * WebProcess/WebConnectionToUIProcess.cpp: (WebKit::WebConnectionToUIProcess::WebConnectionToUIProcess): (WebKit::WebConnectionToUIProcess::invalidate): * WebProcess/WebConnectionToUIProcess.h: WebConnectionToUIProcess doesn't need to be a QueueClient. Also, move the call to open into WebProcess since we don't want to add queue clients after the connection has been opened. * WebProcess/WebPage/EventDispatcher.cpp: Added. (WebKit::EventDispatcher::EventDispatcher): (WebKit::EventDispatcher::~EventDispatcher): (WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue): (WebKit::EventDispatcher::wheelEvent): * WebProcess/WebPage/EventDispatcher.h: * WebProcess/WebPage/EventDispatcher.messages.in: Added. Add new stub files. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initialize): Add the event dispatcher as a queue client. * WebProcess/WebProcess.h: Add an EventDispatcher member variable to the web process. 2011-12-12 Sam Weinig Prefix internal methods in Objective-C API files with an underscore https://bugs.webkit.org/show_bug.cgi?id=74363 Reviewed by Dan Bernstein. * UIProcess/API/mac/WKBrowsingContextController.mm: (-[WKBrowsingContextController _pageRef]): (-[WKBrowsingContextController loadRequest:]): (-[WKBrowsingContextController loadFileURL:restrictToFilesWithin:]): (-[WKBrowsingContextController stopLoading]): (-[WKBrowsingContextController reload]): (-[WKBrowsingContextController reloadFromOrigin]): (-[WKBrowsingContextController goForward]): (-[WKBrowsingContextController canGoForward]): (-[WKBrowsingContextController goBack]): (-[WKBrowsingContextController canGoBack]): (-[WKBrowsingContextController activeURL]): (-[WKBrowsingContextController provisionalURL]): (-[WKBrowsingContextController committedURL]): (-[WKBrowsingContextController title]): (-[WKBrowsingContextController textZoom]): (-[WKBrowsingContextController setTextZoom:]): (-[WKBrowsingContextController pageZoom]): (-[WKBrowsingContextController setPageZoom:]): (-[WKBrowsingContextController setPaginationMode:]): (-[WKBrowsingContextController paginationMode]): (-[WKBrowsingContextController setPageLength:]): (-[WKBrowsingContextController pageLength]): (-[WKBrowsingContextController setGapBetweenPages:]): (-[WKBrowsingContextController gapBetweenPages]): (-[WKBrowsingContextController pageCount]): (-[WKBrowsingContextController _initWithPageRef:]): * UIProcess/API/mac/WKBrowsingContextControllerInternal.h: * UIProcess/API/mac/WKBrowsingContextGroup.mm: (-[WKBrowsingContextGroup allowsJavaScript]): (-[WKBrowsingContextGroup setAllowsJavaScript:]): (-[WKBrowsingContextGroup allowsPlugIns]): (-[WKBrowsingContextGroup setAllowsPlugIns:]): (-[WKBrowsingContextGroup _pageGroupRef]): * UIProcess/API/mac/WKBrowsingContextGroupInternal.h: * UIProcess/API/mac/WKConnection.mm: (-[WKConnection _initWithConnectionRef:]): * UIProcess/API/mac/WKConnectionInternal.h: * UIProcess/API/mac/WKProcessGroup.mm: (didCreateConnection): (-[WKProcessGroup _contextRef]): * UIProcess/API/mac/WKProcessGroupInternal.h: * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:processGroup:browsingContextGroup:]): (-[WKView browsingContextController]): 2011-12-12 Ryosuke Niwa WebKit code shouldn't be calling applyCommand directly https://bugs.webkit.org/show_bug.cgi?id=74337 Reviewed by Darin Adler. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::replaceSelectionWithText): 2011-12-12 Sam Weinig Remove unused getter on WKConnection. Reviewed by Dan Bernstein. * UIProcess/API/mac/WKConnection.mm: 2011-12-12 Brady Eidson Page cache should support pages with plugins. and https://bugs.webkit.org/show_bug.cgi?id=13634 Expose a WebKit2 preference for the page cache supporting plugins (on by default). Reviewed by Anders Carlsson. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPageCacheSupportsPlugins): (WKPreferencesGetPageCacheSupportsPlugins): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2011-12-12 Sam Weinig Add WKConnection objective-c wrapper around WKConnectionRef https://bugs.webkit.org/show_bug.cgi?id=74324 Reviewed by Anders Carlsson. * UIProcess/API/mac/WKConnection.h: Added. * UIProcess/API/mac/WKConnection.mm: Added. (-[WKConnection dealloc]): (-[WKConnection connectionRef]): (-[WKConnection delegate]): (-[WKConnection setDelegate:]): (didReceiveMessage): (didClose): (setUpClient): (-[WKConnection initWithConnectionRef:]): * UIProcess/API/mac/WKConnectionInternal.h: Added. Added new class. * UIProcess/API/mac/WKProcessGroup.h: * UIProcess/API/mac/WKProcessGroup.mm: (didCreateConnection): (setUpConnectionClient): (-[WKProcessGroup initWithInjectedBundleURL:]): (-[WKProcessGroup delegate]): (-[WKProcessGroup setDelegate:]): Add WKProcessGroupDelegate to inform the user of when connections are established. * WebKit2.xcodeproj/project.pbxproj: Add new files. 2011-12-12 Anders Carlsson Rename QueueClient::willProcessMessageOnClientRunLoop https://bugs.webkit.org/show_bug.cgi?id=74325 Reviewed by Sam Weinig. Rename the QueueClient willProcessMessageOnClientRunLoop function to didReceiveMessageOnConnectionWorkQueue and give it an out parameter to indicate whether the message was handled or not. This makes it more clear that the function is expected to handle the message. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::processIncomingMessage): * Platform/CoreIPC/Connection.h: * Scripts/webkit2/messages.py: (async_case_statement): * Scripts/webkit2/messages_unittest.py: * WebProcess/WebConnectionToUIProcess.cpp: (WebKit::WebConnectionToUIProcess::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebConnectionToUIProcess.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebProcess.h: 2011-12-12 Alexis Menard Unreviewed cleanup fix. Add missing files from https://bugs.webkit.org/show_bug.cgi?id=73016 Also remove the files that should be removed. * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: Added. * UIProcess/qt/qwkhistory.cpp: Removed. * UIProcess/qt/qwkhistory.h: Removed. * UIProcess/qt/qwkhistory_p.h: Removed. 2011-12-12 Michael Bruning [qt][wk2] Postpone scroll effects when page transition is ongoing. https://bugs.webkit.org/show_bug.cgi?id=74177 Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::scrollPositionRequested): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate::PostTransitionState::apply): 2011-12-12 Caio Marcelo de Oliveira Filho [Qt][WK2] Remove dead code from QtWebPageProxy https://bugs.webkit.org/show_bug.cgi?id=74296 Reviewed by Andreas Kling. * UIProcess/qt/QtWebPageProxy.cpp: * UIProcess/qt/QtWebPageProxy.h: 2011-12-12 Simon Hausmann Unreviewed build fix. Add missing files from https://bugs.webkit.org/show_bug.cgi?id=73016 * UIProcess/API/qt/qwebnavigationhistory.cpp: Added. (QWebNavigationListModelPrivate::QWebNavigationListModelPrivate): (QWebNavigationListModelPrivate::createWebNavigationModel): (QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate): (QWebNavigationHistoryPrivate::createHistory): (QWebNavigationHistoryPrivate::reset): (QWebNavigationHistoryPrivate::goBackTo): (QWebNavigationHistoryPrivate::goForwardTo): (QWebNavigationListModel::QWebNavigationListModel): (QWebNavigationListModel::~QWebNavigationListModel): (QWebNavigationListModel::rowCount): (QWebNavigationListModel::data): (QWebNavigationHistory::QWebNavigationHistory): (QWebNavigationHistory::~QWebNavigationHistory): (QWebNavigationHistory::backItems): (QWebNavigationHistory::forwardItems): * UIProcess/API/qt/qwebnavigationhistory_p.h: Added. * UIProcess/API/qt/qwebnavigationhistory_p_p.h: Added. 2011-12-12 Simon Hausmann [Qt] Move postMessage/messageReceived APIS to experimental Reviewed by Tor Arne Vestbø. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::setPageProxy): (QQuickWebViewExperimental::QQuickWebViewExperimental): (QQuickWebViewExperimental::postMessage): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/tests/qmltests/DesktopBehavior/tst_messaging.qml: 2011-12-12 Alexis Menard [Qt][WK2] History is not accessible in QML. https://bugs.webkit.org/show_bug.cgi?id=73016 Reviewed by Simon Hausmann. Remove the old qwkhistory and create QWebNavigationHistory which is QML friendly with data models you can plug to a view in QML * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::didChangeBackForwardList): (QQuickWebViewExperimental::navigationHistory): (QQuickWebViewExperimental::goForwardTo): (QQuickWebViewExperimental::goBackTo): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: * UIProcess/API/qt/qwebnavigationhistory.cpp: Added. (QWebNavigationListModelPrivate::QWebNavigationListModelPrivate): (QWebNavigationListModelPrivate::createWebNavigationModel): (QWebNavigationHistoryPrivate::QWebNavigationHistoryPrivate): (QWebNavigationHistoryPrivate::createHistory): (QWebNavigationHistoryPrivate::reset): (QWebNavigationHistoryPrivate::goBackTo): (QWebNavigationHistoryPrivate::goForwardTo): (QWebNavigationListModel::QWebNavigationListModel): (QWebNavigationListModel::~QWebNavigationListModel): (QWebNavigationListModel::rowCount): (QWebNavigationListModel::data): (QWebNavigationHistory::QWebNavigationHistory): (QWebNavigationHistory::~QWebNavigationHistory): (QWebNavigationHistory::backItems): (QWebNavigationHistory::forwardItems): * UIProcess/API/qt/qwebnavigationhistory_p.h: Added. * UIProcess/API/qt/qwebnavigationhistory_p_p.h: Renamed from Source/WebKit2/UIProcess/qt/qwkhistory_p.h. * UIProcess/API/qt/tests/qmltests/WebView/tst_navigationHistory.qml: Added. * UIProcess/qt/QtWebPageLoadClient.cpp: (QtWebPageLoadClient::QtWebPageLoadClient): (QtWebPageLoadClient::didChangeBackForwardList): * UIProcess/qt/QtWebPageLoadClient.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::QtWebPageProxy): (QtWebPageProxy::~QtWebPageProxy): (QtWebPageProxy::goBackTo): (QtWebPageProxy::goForwardTo): (QtWebPageProxy::navigationHistory): * UIProcess/qt/QtWebPageProxy.h: * UIProcess/qt/qwkhistory.cpp: Removed. * UIProcess/qt/qwkhistory.h: Removed. 2011-12-09 Jesus Sanchez-Palencia [Qt][WK2] Move startDrag implementation to QtWebPageEventHandler https://bugs.webkit.org/show_bug.cgi?id=73145 Reviewed by Simon Hausmann. Move QtWebPageProxy::startDrag to QtWebPageEventHandler::startDrag and call it straight from QtPageClient. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): * UIProcess/qt/QtWebPageEventHandler.cpp: (dragOperationToDropAction): (dragOperationToDropActions): (dropActionToDragOperation): Now these functions are static inline and not part of QtWebPageEventHandler anymore. (QtWebPageEventHandler::QtWebPageEventHandler): (QtWebPageEventHandler::startDrag): * UIProcess/qt/QtWebPageEventHandler.h: * UIProcess/qt/QtWebPageProxy.cpp: (QtWebPageProxy::startDrag): removed. 2011-12-12 Caio Marcelo de Oliveira Filho [Qt] [WK2] Support customizing popup menus with QML https://bugs.webkit.org/show_bug.cgi?id=73560 Reviewed by Tor Arne Vestbø. Add a new property 'itemSelector' to WebView (experimental for now) that contains the QML component used when it needs to spawn a popup menu. For example, cursor blinks even after transferring focus to plugin https://bugs.webkit.org/show_bug.cgi?id=30355 PluginView needs to use page->focusController()->setFocusedNode() when focusing a plugin in order to clear the FrameSelection in the currently focused node. In its platform-specific code Chromium already does this (WebPluginContainerImpl.cpp). * WebProcess/Plugins/PluginView.cpp: (WebCore::PluginView::focusPluginElement): Using FocusController::setFocusedNode() makes the call to FocusController:setFocusedFrame() redundant, since the former calls it. 2011-07-02 Anders Carlsson Have another go at fixing the Windows build. * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: (WebKit::NetscapePlugin::containingWindow): (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): 2011-07-02 Anders Carlsson Null out the plug-in controller after destroying the plug-in. https://bugs.webkit.org/show_bug.cgi?id=63869 Reviewed by Maciej Stachowiak. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::destroy): Call destroyPlugin. * WebProcess/Plugins/Plugin.cpp: (WebKit::Plugin::destroyPlugin): Call destroy and null out the plug-in controller. * WebProcess/Plugins/Plugin.h: Add destroyPlugin, make destroy private. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::~PluginView): Call destroyPlugin. 2011-07-02 Anders Carlsson Fix Windows build for real. * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: (WebKit::NetscapePlugin::containingWindow): (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate): (WebKit::NetscapePlugin::platformPaint): (WebKit::NetscapePlugin::platformHandleMouseEvent): 2011-07-02 Anders Carlsson Implement NPN_PluginThreadAsyncCall https://bugs.webkit.org/show_bug.cgi?id=63868 Reviewed by Dan Bernstein. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_PluginThreadAsyncCall): Call NetscapePlugin::pluginThreadAsyncCall. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::pluginThreadAsyncCall): Schedule a work item to call the function on the main run loop. (WebKit::NetscapePlugin::handlePluginThreadAsyncCall): If the plug-in is still running, run the function. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add new member function. * WebProcess/Plugins/Plugin.h: Make plug-in inherit from ThreadSafeRefCounted since plug-ins can potentially ref the plug-in from other threads. 2011-07-02 Anders Carlsson Fix Windows build. * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: (WebKit::NetscapePlugin::containingWindow): (WebKit::NetscapePlugin::scheduleWindowedGeometryUpdate): (WebKit::NetscapePlugin::platformPaint): (WebKit::NetscapePlugin::platformHandleMouseEvent): (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): 2011-07-02 Anders Carlsson Move the plug-in controller member variable up to the shared Plugin base class https://bugs.webkit.org/show_bug.cgi?id=63867 Reviewed by Sam Weinig. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): Remove m_pluginController. (WebKit::NetscapePlugin::invalidate): (WebKit::NetscapePlugin::userAgent): (WebKit::NetscapePlugin::loadURL): (WebKit::NetscapePlugin::setStatusbarText): (WebKit::NetscapePlugin::evaluate): (WebKit::NetscapePlugin::isPrivateBrowsingEnabled): (WebKit::NetscapePlugin::windowScriptNPObject): (WebKit::NetscapePlugin::pluginElementNPObject): (WebKit::NetscapePlugin::tryToShortCircuitInvoke): (WebKit::NetscapePlugin::cancelStreamLoad): (WebKit::NetscapePlugin::isAcceleratedCompositingEnabled): (WebKit::NetscapePlugin::proxiesForURL): (WebKit::NetscapePlugin::cookiesForURL): (WebKit::NetscapePlugin::setCookiesForURL): (WebKit::NetscapePlugin::getAuthenticationInfo): Use controller() instead of m_pluginController. (WebKit::NetscapePlugin::initialize): This doesn't take a PluginController parameter anymore. (WebKit::NetscapePlugin::destroy): No need to null out the plug-in controller. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Remove m_pluginController member variable. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::compositingRenderServerPort): (WebKit::NetscapePlugin::platformSetFocus): (WebKit::NetscapePlugin::windowFocusChanged): Use controller() instead of m_pluginController. * WebProcess/Plugins/Plugin.cpp: (WebKit::Plugin::Plugin): Initialize m_pluginController. (WebKit::Plugin::initialize): New function that initializes the plug-in controller and then calls the real virtual initialize member function. * WebProcess/Plugins/Plugin.h: Add m_pluginController member variable and a new initialize virtual member function that doesn't take a PluginController parameter. Make the "old" initialize member function set up the plug-in controller. (WebKit::Plugin::controller): This is now a simple getter. * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::PluginProxy): Remove m_pluginController. (WebKit::PluginProxy::pluginProcessCrashed): Use controller(), remove a bogus null check. (WebKit::PluginProxy::initialize): This doesn't take a PluginController parameter now. (WebKit::PluginProxy::destroy): No need to null out the plug-in controller member variable. (WebKit::PluginProxy::loadURL): (WebKit::PluginProxy::proxiesForURL): (WebKit::PluginProxy::cookiesForURL): (WebKit::PluginProxy::setCookiesForURL): (WebKit::PluginProxy::getAuthenticationInfo): (WebKit::PluginProxy::windowNPObjectID): (WebKit::PluginProxy::getPluginElementNPObject): (WebKit::PluginProxy::evaluate): (WebKit::PluginProxy::cancelStreamLoad): (WebKit::PluginProxy::cancelManualStreamLoad): (WebKit::PluginProxy::setStatusbarText): (WebKit::PluginProxy::setComplexTextInputEnabled): (WebKit::PluginProxy::update): Use controller() instead of m_pluginController. * WebProcess/Plugins/PluginProxy.h: Remove m_pluginController. 2011-07-01 Darin Adler Consider backing scale factor when setting up graphics layers https://bugs.webkit.org/show_bug.cgi?id=63848 Reviewed by Simon Fraser. * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: (WebKit::LayerTreeHostCA::initialize): Set contents scale on the non-composited content layer based on the backing scale factor. (WebKit::LayerTreeHostCA::createPageOverlayLayer): Set contents scale on the page overlay layer based on the backing scale factor. 2011-06-30 Brian Weinstein Reviewed by Darin Adler. WebKit2: DidFinishLoadForFrame is never called on iframes when loads are cancelled by willSendRequest https://bugs.webkit.org/show_bug.cgi?id=63753 When deciding a policy for a null request, call the callback that was passed to WebKit2 and say that we used the loader. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDecidePolicyForResponse): 2011-07-01 Balazs Kelemen Reviewed by Andreas Kling. [X11][WK2] plugins/mouse-evets-fixedpos.html is failing because of broken event propagation https://bugs.webkit.org/show_bug.cgi?id=63239 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Revert the return value of NPP_HandleEvent because the plugin function returns with 0 if it handled the event. (WebKit::NetscapePlugin::platformHandleMouseEvent): (WebKit::NetscapePlugin::platformHandleWheelEvent): (WebKit::NetscapePlugin::platformHandleMouseEnterEvent): (WebKit::NetscapePlugin::platformHandleMouseLeaveEvent): (WebKit::NetscapePlugin::platformHandleKeyboardEvent): 2011-07-01 Mark Rowe Unreviewed due to fixing of a broken world. REGRESSION (r90163): WebKit2 bot is failing 100% of the tests. r90163 bumped the version of the WKBundlePageLoaderClient passed in by WebKitTestRunner from 0 to 1. This made it run in to the ad-hoc client version checking implemented directly in WKBundlePageSetPageLoaderClient, resulting in no client being set. After r90162 the ad-hoc checking is not necessary as the APIClient template takes care of the relevant version checks. * Shared/APIClient.h: (WebKit::APIClient::initialize): Fix a bug I noticed along the way: don't attempt to copy anything if the client version is newer than what we support. This matches the behavior of the ad-hoc version checking. * UIProcess/API/C/WKContext.cpp: (WKContextSetInjectedBundleClient): Drop the ad-hoc version checking. (WKContextSetHistoryClient): Ditto. (WKContextSetDownloadClient): Ditto. * UIProcess/API/C/WKCookieManager.cpp: (WKCookieManagerSetClient): Ditto. * UIProcess/API/C/WKGeolocationManager.cpp: (WKGeolocationManagerSetProvider): Ditto. * UIProcess/API/C/WKIconDatabase.cpp: (WKIconDatabaseSetIconDatabaseClient): Ditto. * UIProcess/API/C/WKPage.cpp: (WKPageSetPageContextMenuClient): Ditto. (WKPageSetPageFindClient): Ditto. (WKPageSetPageFormClient): Ditto. (WKPageSetPageLoaderClient): Ditto. (WKPageSetPagePolicyClient): Ditto. (WKPageSetPageResourceLoadClient): Ditto. (WKPageSetPageUIClient): Ditto. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetClient): Ditto. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetContextMenuClient): Ditto. (WKBundlePageSetEditorClient): Ditto. (WKBundlePageSetFormClient): Ditto. (WKBundlePageSetPageLoaderClient): Ditto. (WKBundlePageSetResourceLoadClient): Ditto. (WKBundlePageSetPolicyClient): Ditto. (WKBundlePageSetUIClient): Ditto. (WKBundlePageSetFullScreenClient): Ditto. 2011-06-30 Darin Adler Reviewed by Anders Carlsson. [WebKit2] Consider scale factor when allocating backing store https://bugs.webkit.org/show_bug.cgi?id=63766 This is the first step in considering scale factor. It considers scale factor for the primary backing store, not graphics layers, and for CG only. * Platform/cg/CGUtilities.cpp: (WebKit::paintImage): Added a scale factor argument. (WebKit::paintBitmapContext): Pass 1 for scale factor. * Platform/cg/CGUtilities.h: Updated for above. * Shared/ShareableBitmap.h: Added an overload of paint that can handle a scale factor. * Shared/UpdateInfo.cpp: (WebKit::UpdateInfo::encode): Encode scale factor. (WebKit::UpdateInfo::decode): Decode scale factor. * Shared/UpdateInfo.h: Added scale factor. * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::paint): Added the overload that can handle a scale factor. * UIProcess/BackingStore.cpp: (WebKit::BackingStore::create): Take a scale factor. (WebKit::BackingStore::BackingStore): Store the scale factor. (WebKit::BackingStore::incorporateUpdate): Consider the scale factor when asserting the size is correct. * UIProcess/BackingStore.h: Add a scale factor. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): Check the scale factor too when deciding whether to reuse a backing store. (WebKit::DrawingAreaProxyImpl::incorporateUpdate): Pass in the scale factor when creating a backing store. * UIProcess/mac/BackingStoreMac.mm: (WebKit::BackingStore::incorporateUpdate): Take the scale factor into account when painting. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Put the scale factor into the UpdateInfo. (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Ditto. (WebKit::DrawingAreaImpl::display): Take the scale factor into account when allocating the bitmap and creating a graphics context for it. 2011-06-30 Mark Rowe Fix the Windows build. * UIProcess/API/C/win/WKTextChecker.h: * UIProcess/API/C/win/WKView.h: * UIProcess/win/WebTextCheckerClient.h: * UIProcess/win/WebUndoClient.h: 2011-06-30 Mark Rowe Reviewed by Anders Carlsson. Teach APIClient to correctly handle multiple versions of a client interface. If a client struct is not the current version then we can't copy it via assignment since that will read past the end of the smaller, older struct. To deal with this APIClient needs to be aware of the sizes of the older client version structs so that it can copy only the appropriate amount of the struct. * Shared/APIClient.h: (WebKit::APIClient::initialize): Assign through to our client if the new in client is the latest version. If an older client version was passed then we zero out our client and memcpy the appropriate number of bytes in to it. This ensures that any new members in the client are initialized to 0. * Shared/APIClientTraits.cpp: * Shared/APIClientTraits.h: Client interfaces are the size of their struct unless otherwise stated. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Bump the version and add comments indicating which components belong to which versions. 2011-06-30 Mark Rowe Reviewed by Anders Carlsson. Make the APIClient template aware of the latest client interface version number. This will be used in an upcoming patch. * Shared/APIClient.h: * UIProcess/WebContextInjectedBundleClient.h: * UIProcess/WebCookieManagerProxyClient.h: * UIProcess/WebDatabaseManagerProxyClient.h: * UIProcess/WebDownloadClient.h: * UIProcess/WebFindClient.h: * UIProcess/WebFormClient.h: * UIProcess/WebGeolocationProvider.h: * UIProcess/WebHistoryClient.h: * UIProcess/WebIconDatabaseClient.h: * UIProcess/WebLoaderClient.h: * UIProcess/WebPageContextMenuClient.h: * UIProcess/WebPolicyClient.h: * UIProcess/WebResourceLoadClient.h: * UIProcess/WebUIClient.h: * WebProcess/InjectedBundle/InjectedBundleClient.h: * WebProcess/InjectedBundle/InjectedBundlePageContextMenuClient.h: * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.h: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: * WebProcess/InjectedBundle/InjectedBundlePagePolicyClient.h: * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.h: * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: 2011-06-30 Mark Rowe Reviewed by Anders Carlsson. WebKit2 client interfaces should have constant declaring latest version. * UIProcess/API/C/WKContext.h: * UIProcess/API/C/WKCookieManager.h: * UIProcess/API/C/WKDatabaseManager.h: * UIProcess/API/C/WKGeolocationManager.h: * UIProcess/API/C/WKIconDatabase.h: * UIProcess/API/C/WKPage.h: * WebProcess/InjectedBundle/API/c/WKBundle.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/API/c/WKBundlePageOverlay.h: 2011-06-30 Anders Carlsson Build fix. * UIProcess/win/WebPopupMenuProxyWin.h: (WebKit::WebPopupMenuProxyWin::enclosingScrollableArea): 2011-06-30 Martin Robinson Reviewed by Anders Carlsson. [GTK] Crash observed with nspluginwrapper and flash https://bugs.webkit.org/show_bug.cgi?id=62249 * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_InvalidateRect): Guard against null instances here. 2011-06-30 Mark Rowe Reviewed by Anders Carlsson. Reinstate WKSecurityOriginGetHost and WKSecurityOriginGetProtocol as wrappers around the correctly-named functions. They're needed for ABI compatibility. * Shared/API/c/WKSecurityOrigin.cpp: (WKSecurityOriginGetHost): (WKSecurityOriginGetProtocol): 2011-06-29 Darin Adler Reviewed by Dan Bernstein. [Mac] Use system cursors instead of custom bitmaps where possible https://bugs.webkit.org/show_bug.cgi?id=63679 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Added WKCursor. 2011-06-29 Darin Adler Reviewed by Anders Carlsson. [WebKit2] Crash loading page that adds/removes frame in DOMContentLoaded/loaded https://bugs.webkit.org/show_bug.cgi?id=63483 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createFrame): Added a check for null when creating a frame. Also added a check that was in the WebKit1 code, but not here. Strangely, the comment from the second check was still here, but not the code. 2011-06-28 Chang Shu Reviewed by Andreas Kling. [Qt][WK2] Random crashes in fast/frames/ tests https://bugs.webkit.org/show_bug.cgi?id=63459 Investigation on the crashes has revealed that sometimes, a frame could have been destroyed before it is removed from the hierachy in Qt WebKit2 UI process. The root cause lies in the fact that the order of the two contiguous asynchronous messages may not be respected on the receiving side. And it is Qt's implementation, which uses QTimer::startTimer(0), that causes the reverse order. This patch replaces the timer approach with QMetaObject::invokeMethod approach and no crash happens afterwards. * Platform/qt/WorkQueueQt.cpp: (WorkQueue::scheduleWork): 2011-06-28 Balazs Kelemen Reviewed by Kenneth Rohde Christiansen. [X11][WK2] X error with plugin tests https://bugs.webkit.org/show_bug.cgi?id=63520 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Never create a pixmap with (0,0) dimensions. (WebKit::NetscapePlugin::platformGeometryDidChange): (WebKit::NetscapePlugin::platformPaint): 2011-06-28 Balazs Kelemen Reviewed by Kenneth Rohde Christiansen. [X11][WK2] plugins/plugin-javascript-access fails https://bugs.webkit.org/show_bug.cgi?id=63464 * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::getPluginInfo): Determine the name of the plugin. 2011-06-27 Yuta Kitamura Reviewed by Alexey Proskuryakov. [WebKit2] Add hixie76WebSocketProtocolEnabled flag to WebPreferences https://bugs.webkit.org/show_bug.cgi?id=63447 Make a new flag added in WebCore::Settings (useHixie76WebSocketProtocol) switchable from WebPage and WebPreferences. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetHixie76WebSocketProtocolEnabled): (WKPreferencesGetHixie76WebSocketProtocolEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2011-06-27 Jeff Miller Reviewed by Oliver Hunt. Web process always pauses on launch https://bugs.webkit.org/show_bug.cgi?id=63487 In the absence of the WEBKIT2_PAUSE_WEB_PROCESS_ON_LAUNCH environment variable, only pause the web process on launch if the shift, control, and alt keys are all held down. This regressed in r89685, which always caused the web process to pause if the shift and alt keys were not held down. * WebProcess/WebKitMain.cpp: (pauseProcessIfNeeded): Add some parentheses. 2011-06-27 Huang Dongsung Reviewed by Kenneth Rohde Christiansen. TiledBackingStore endlessly creates and destroys tiles due to an off-by-one error. https://bugs.webkit.org/show_bug.cgi?id=62422 REGRESSION(r77286): Remove bottomRight(). REGRESSION(r77312): Change the logic to get the bottom right point. REGRESSION(r77928): Cause off-by-one error in TiledBackingStore. REGRESSION(r78783): Cause off-by-one error in TiledDrawingAreaProxy. REGRESSION(r78785): Cause off-by-one error in TiledDrawingAreaProxy. If the viewport width equals the contents width, especially in the mobile device, TiledBackingStore endlessly creates and deletes the rightmost column and bottom row of tiles. In the detail, dropTilesOutsideRect() in TiledBackingStore::createTiles() deletes tiles and setTile(coordinate, Tile::create(this, coordinate)) creates tiles infinitely. Modified TiledDrawingAreaProxy also. * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::innerBottomRight): (WebKit::TiledDrawingAreaProxy::invalidate): (WebKit::TiledDrawingAreaProxy::paint): (WebKit::TiledDrawingAreaProxy::createTiles): 2011-06-26 Mark Rowe Reviewed by Dan Bernstein. Use a separate file name for Lion's WebKitSystemInterface. * Configurations/DebugRelease.xcconfig: 2011-06-26 Mark Rowe Rubber-stamped by Maciej Stachowiak. Work around an issue with sandbox.h. * WebProcess/mac/WebProcessMac.mm: 2011-06-26 Anders Carlsson Reviewed by Dan Bernstein. Don't use a Mutex for protecting access to the connection queue clients https://bugs.webkit.org/show_bug.cgi?id=63403 Make sure to only access the queue client vector from the connection work queue. This gets rid of a lock and ensures that adding/removing clients from callbacks works correctly. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::addQueueClient): (CoreIPC::Connection::removeQueueClient): (CoreIPC::Connection::addQueueClientOnWorkQueue): (CoreIPC::Connection::removeQueueClientOnWorkQueue): (CoreIPC::Connection::processIncomingMessage): * Platform/CoreIPC/Connection.h: 2011-06-25 Brent Fulgham Unreviewed build correction after r89426. * Shared/API/c/cairo/WKImageCairo.h: Declare cairo type as struct (in keeping with other declarations). * win/WebKit2.vcproj: Add new WKImageCairo.cpp file to WinCairo build. 2011-06-25 Brent Fulgham Unreviewed build correction after r89503. See http://trac.webkit.org/changeset/89503. The modifications to the WebKit2.def need to be mirrored in WebKit2CFLite.def. * win/WebKit2CFLite.def: Add new exported symbol for isPreloaded. 2011-06-24 Brent Fulgham Unreviewed build correction after r89426. See http://trac.webkit.org/changeset/89426. The new WebKit2 header file (WKImageCairo.h) is needed. * win/WebKit2Generated.make: Make sure to copy the WKImageCairo.h header file to the WebKit2 API directory after building. 2011-06-24 Anders Carlsson Reviewed by John Sullivan. Drag-and-drop tab in same window makes web process falsely report unresponsiveness https://bugs.webkit.org/show_bug.cgi?id=63369 If the view becomes invisible, stop the responsiveness timer, because we might not get any messages that will cause it to stop (such as painting notifications since we don't paint when we're not visible). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::viewStateDidChange): 2011-06-24 Anders Carlsson Reviewed by Kevin Decker. Not possible for plug-ins to override the internal PDF viewer https://bugs.webkit.org/show_bug.cgi?id=63356 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedFromCachedFrame): (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Pass the entire resource response to shouldUseCustomRepresentationForResponse. * WebProcess/WebProcess.cpp: (WebKit::canPluginHandleResponse): Ask for the plug-in path for a plug-in that can handle the given resource response. If we fail to send the message, or if the path comes back empty, we assume that there's no plug-in that can handle it. (WebKit::WebProcess::shouldUseCustomRepresentationForResponse): If the response MIME type is in the m_mimeTypesWithCustomRepresentations map, check if there's a plug-in that can handle the given response. If that is the case, it should have precedence over the custom representation. * WebProcess/WebProcess.h: Rename shouldUseCustomRepresentationForMIMEType to shouldUseCustomRepresentationForResponse. 2011-06-24 Adam Roben Mac build fix after r89685 * WebProcess/WebKitMain.cpp: Make a Windows-only #include really be Windows-only. 2011-06-24 Adam Roben Make the web process pause dialog look better on Vista/7 and robust against executable renames Fixes Web process pause dialog looks bad on Vista/7 Reviewed by Brian Weinstein. * WebProcess/WebKitMain.cpp: (pauseProcessIfNeeded): Moved code to show the pause dialog here from WebKitMain. We now fetch the executable name using ::GetModuleFileNameW instead of hard-coding it. The string we pass to ::MessageBoxW no longer has embedded newlines, which improves its appearance on Vista/7 (which were doing their own wrapping in addition to our newlines). Appearance is different but fine on XP. Note that the message text now contains the "[_debug].exe" suffix when referring to the process; that is different from before but seems fine. (WebKitMain): Call the new function. 2011-06-24 Dominic Cooney Reviewed by Dimitri Glazkov. Convert shadow DOM-related tests to use window.internals https://bugs.webkit.org/show_bug.cgi?id=61671 Remove shadow DOM-related methods from WebKit2 API. These are not required any more. * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: * win/WebKit2.def: Re-exports for symbols used by WebCoreTestSupport. * win/WebKit2CFLite.def: Same for Cairo. 2011-06-24 Carlos Garcia Campos Reviewed by Martin Robinson. [X11] Do not call NPP_SetWindow with a null window handle on destroy https://bugs.webkit.org/show_bug.cgi?id=62981 * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::destroy): 2011-06-23 Jamie Cooley Reviewed by Andreas Kling. [Qt][WK2] Qt port needs load-from-history implementation https://bugs.webkit.org/show_bug.cgi?id=57784 Created "random access" BackForwardHistory public API method, QWKHistory::goToItemAt(int) * UIProcess/API/qt/qwkhistory.cpp: (QWKHistoryItem::QWKHistoryItem::itemRef): Added access method to fetch WKBackForwardListRef (QWKHistoryPrivate::QWKHistoryPrivate): (QWKHistoryPrivate::createHistory): Updated createHistory method and QWKHistoryPrivate constructor to take a pointer to the owning QWKPage in addition to the WebBackForwardList. This will be saved so that the new API can ask the page to load a HistoryItem. (QWKHistory::goToItemAt): New Public API. Like QWKHistory::itemAt, callee gives an integer. <0 means jump back to that item, 0 means the current item, >0 means jump forwards. If an out-of-range index is given, the function silently fails. This will invoke WKPageGoToBackForwardListItem. * UIProcess/API/qt/qwkhistory.h: * UIProcess/API/qt/qwkhistory_p.h: * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::QWKPagePrivate): Update instantiation of QWKHistory to include QWKPage. * UIProcess/API/qt/tests/qwkhistory/tst_qwkhistory.cpp: (tst_QWKHistory::historyForwardBackTest_data): (tst_QWKHistory::historyForwardBackTest): Add test content for the new API 2011-06-23 Yael Aharon Reviewed by Andreas Kling. [Qt] [WK2] Add drag and drop support https://bugs.webkit.org/show_bug.cgi?id=62838 Added missing pieces to add support for DnD in QtWebKit. * Shared/qt/ArgumentCodersQt.cpp: Added. (CoreIPC::::encode): (CoreIPC::::decode): * Shared/qt/ArgumentCodersQt.h: Added. Encode DragData so that we can transfer the QMimeData between the WebProcess and the UI Process. I encode the DragData and not QMimeData directly because we don't have an associated QMimeData for each message. * UIProcess/API/qt/qgraphicswkview.cpp: (QGraphicsWKView::init): (QGraphicsWKView::dragEnterEvent): (QGraphicsWKView::dragLeaveEvent): (QGraphicsWKView::dragMoveEvent): (QGraphicsWKView::dropEvent): * UIProcess/API/qt/qgraphicswkview.h: * UIProcess/API/qt/qwkpage.cpp: (dropActionToDragOperation): (dragOperationToDropAction): (dragOperationToDropActions): (QWKPagePrivate::dragEnterEvent): (QWKPagePrivate::dragLeaveEvent): (QWKPagePrivate::dragMoveEvent): (QWKPagePrivate::dropEvent): (QWKPagePrivate::startDrag): Send drag-and-drop related events to WebKit. * UIProcess/API/qt/qwkpage_p.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::performDragControllerAction): (WebKit::WebPageProxy::startDrag): * UIProcess/WebPageProxy.h: Start the HTML5 drag operation from the UI process, because QDrag needs a handle to the QWidget under the mouse. * UIProcess/WebPageProxy.messages.in: Add message type that takes DragData as a parameter. * WebKit2.pro: * WebProcess/WebCoreSupport/WebDragClient.cpp: * WebProcess/WebCoreSupport/qt/WebDragClientQt.cpp: Added. (WebKit::convertImageToBitmap): (WebKit::WebDragClient::startDrag): Send a message to the UI process to start the HTML5 drag operation. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Add message type that takes DragData as a parameter. 2011-06-23 Carlos Garcia Campos Reviewed by Martin Robinson. [UNIX] Fix compile warnings in NetscapePluginX11.cpp https://bugs.webkit.org/show_bug.cgi?id=63249 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::setXButtonEventFields): (WebKit::NetscapePlugin::platformHandleMouseEvent): 2011-06-22 Carlos Garcia Campos Reviewed by Martin Robinson. [UNIX] Increment/decrement module load conter in NetscapePluginModule::getPluginInfo() https://bugs.webkit.org/show_bug.cgi?id=63150 Since the method is static, we are using NetscapePluginModule::getOrCreate() to get the module. If it's created, the load counter is 0, so that when module is deleted, shutdown() hasn't been called and the destructor crashes in the assert that checks the module has been removed from the initialized module list. We should increment the load counter, and decrement it before getPluginInfo() returns, so that decrementLoadCount() will call shutdown() if counter is 0 and the module will be deleted from the list. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::getPluginInfo): 2011-06-22 Carlos Garcia Campos Reviewed by Martin Robinson. [UNIX] Check for npp directly when getting X display in NetscapeBrowserFuncs https://bugs.webkit.org/show_bug.cgi?id=63149 NetscapePlugin::fromNPP() shouldn't be called with a null npp, it contains an assert that make it crash when building with debug enabled. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): 2011-06-22 Nate Chapin Reviewed by Adam Barth. Add win symbols for new window.internals functionality. https://bugs.webkit.org/show_bug.cgi?id=62066 * win/WebKit2.def: 2011-06-22 Balazs Kelemen Reviewed by Andreas Kling. [Qt][WK2] Set up plugin tests https://bugs.webkit.org/show_bug.cgi?id=63066 * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createPlugin): Force windowless mode for the test plugin because we don't support windowed plugins yet. 2011-06-22 Geoffrey Garen Reviewed by Oliver Hunt. Removed unnecessary #include . * PluginProcess/mac/PluginProcessMainMac.mm: * Shared/WebMemorySampler.cpp: * UIProcess/WebFrameProxy.cpp: * UIProcess/WebProcessProxy.cpp: * WebProcess/InjectedBundle/mac/InjectedBundleMac.cpp: * WebProcess/mac/WebProcessMac.mm: Added #include back to places where it was needed. 2011-06-22 Balazs Kelemen Unreviewed build fix after r89461. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformSetFocus): Forgot to name the parameter, fix it. 2011-06-22 Balazs Kelemen Reviewed by Darin Adler. [X11][WK2] Implement NetscapePlugin::platformSetFocus https://bugs.webkit.org/show_bug.cgi?id=63154 * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformSetFocus): Implement focus setting based on the WebKit1 path. 2011-06-22 Eunmi Lee Reviewed by Martin Robinson. Change GtkWidgetBackingStore.h to WidgetBackingStore.h in order to use in the EFL port. https://bugs.webkit.org/show_bug.cgi?id=62848 Change GtkWidgetBackingStore to WidgetBackingStore in the BackingStore.h and gtk/BackingStoreGtk.cpp. * UIProcess/BackingStore.h: * UIProcess/gtk/BackingStoreGtk.cpp: (WebKit::BackingStore::incorporateUpdate): 2011-06-22 Adam Roben Don't use an alpha channel when drawing the web page on Windows We never use the alpha channel in the end anyway (because we never render into a layered window, which is the only kind of window that supports alpha). And using an alpha channel is tricky to get right since GDI doesn't support alpha (and often writes 0x0 into the alpha channel). Fixes REGRESSION (r88978): Text inside form controls looks really awful on Windows XP Reviewed by Anders Carlsson. * WebProcess/WebPage/win/DrawingAreaImplWin.cpp: (WebKit::DrawingAreaImpl::createGraphicsContext): Specify false for the hasAlpha parameter to the GraphicsContext constructor. 2011-06-22 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Remove Connection::setShouldCloseConnectionOnProcessTermination() https://bugs.webkit.org/show_bug.cgi?id=61627 Don't use Connection::setShouldCloseConnectionOnProcessTermination() for the GTK port, when the process finishes the connection is closed and the other process is already notified. We still need to monitor the child process so that it doesn't become a zombie when it dntabi * Platform/CoreIPC/Connection.h: * Platform/CoreIPC/unix/ConnectionUnix.cpp: * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::childFinishedFunction): (WebKit::ProcessLauncher::launchProcess): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didFinishLaunching): 2011-06-20 Dimitri Glazkov Reviewed by Kent Tamura. FileChooser should be only created when we need to choose files. https://bugs.webkit.org/show_bug.cgi?id=63039 * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::runOpenPanel): Changed to use settings. 2011-06-22 Martin Robinson Reviewed by Adam Roben. [GTK] Implement pixel dump support for WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=58242 * GNUmakefile.am: Added new Cairo specific image handling files to the build. * Shared/API/c/cairo/WKImageCairo.cpp: Copied from Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp. (WKImageCreateCairoSurface): Added (WKImageCreateFromCairoSurface): Added * Shared/API/c/cairo/WKImageCairo.h: Copied from Source/WebKit2/Shared/cairo/ShareableBitmapCairo.cpp. 2011-06-21 MORITA Hajime Unreviewed, rolling out r89401 and r89403. http://trac.webkit.org/changeset/89401 http://trac.webkit.org/changeset/89403 https://bugs.webkit.org/show_bug.cgi?id=62970 Breaks mac build and mistakenly enables the spellcheck API * Configurations/FeatureDefines.xcconfig: 2011-06-20 MORITA Hajime Reviewed by Kent Tamura. Spellcheck API should be build-able. https://bugs.webkit.org/show_bug.cgi?id=62970 No new tests, changing only build related files * Configurations/FeatureDefines.xcconfig: 2011-06-21 Jer Noble Reviewed by Simon Fraser. REGRESSION: Fullscreen videos are broken (affects embedded vimeo, vimeo.com, and apple.com) https://bugs.webkit.org/show_bug.cgi?id=63098 Force a repaint after completing entering full-screen mode only after the notification is sent for the QTMovie to tear down its layer. Then, the QTMovie will build up its layer again during the repaint. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): 2011-06-21 Yael Aharon Reviewed by Kenneth Rohde Christiansen. [Qt] Add an internal API for accessing the QGraphicsView. https://bugs.webkit.org/show_bug.cgi?id=63095 * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::ownerWidget): * UIProcess/API/qt/qwkpage_p.h: 2011-06-21 Lukasz Slachciak Reviewed by Sam Weinig. [GTK] [WK2] WebKit2 build break fixes. https://bugs.webkit.org/show_bug.cgi?id=62950 When building WebKit2 for GTK there are few build breaks connected with missing include files. * Platform/unix/SharedMemoryUnix.cpp: * Shared/gtk/WebCoreArgumentCodersGtk.cpp: * UIProcess/API/gtk/PageClientImpl.cpp: 2011-06-20 Martin Robinson Reviewed by Eric Seidel. [GTK] [WebKit2] Disable GDK double buffering https://bugs.webkit.org/show_bug.cgi?id=62770 Explicitly disable GDK double-buffering when instantiating a WebKit2 view widget. This prevents one extra pixmap copy. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkit_web_view_base_init): 2011-06-20 Carlos Garcia Campos Reviewed by Martin Robinson. [UNIX] Don't use WebCore::PluginPackage to get plugin information https://bugs.webkit.org/show_bug.cgi?id=62899 The problem is that both PluginPackage in WebCore and NetscapePluginModule in webkit2 install their own netscape browser functions and that can cause conflicts in some situations. * Shared/Plugins/Netscape/NetscapePluginModule.h: Add helper function to set plugin mime type descriptions. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::NetscapePluginModule::setMIMEDescription): Helper function to set plugin mime type descriptions. (WebKit::NetscapePluginModule::getPluginInfo): Use NetscapePluginModule instead of PluginPackage. * UIProcess/Plugins/unix/PluginInfoStoreUnix.cpp: Remove unneeded header include. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Do not try to get the XDisplay if the plugin doesn't have a view. It fixes a crash with flash plugin and matches WebCore. 2011-06-20 Carlos Garcia Campos Reviewed by Xan Lopez. [GTK] Split libWebCore into two libWebCore and libWebCoreGtk https://bugs.webkit.org/show_bug.cgi?id=60539 * GNUmakefile.am: Link to libWebCoreGtk.la too. 2011-06-19 MORITA Hajime Unreviewed wincairo build fix. * win/WebKit2CFLite.def: 2011-06-19 MORITA Hajime Reviewed by Dimitri Glazkov. The internals object should have createShadowContentElement() https://bugs.webkit.org/show_bug.cgi?id=62432 * win/WebKit2.def: Added some more symbols necessary for window.internals to function to the global symbol list. 2011-06-18 Dimitri Glazkov Reviewed by Darin Adler. Separate concerns of loading file icons and choosing files. https://bugs.webkit.org/show_bug.cgi?id=62931 * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::loadIconForFiles): Renamed. * WebProcess/WebCoreSupport/WebChromeClient.h: 2011-06-18 Eunmi Lee Reviewed by Sam Weinig. [EFL][WK2] add WebKit2 EFL port's NativeWebMouseEvent, NativeWebWheelEvent and NativeWebKeyboardEvent https://bugs.webkit.org/show_bug.cgi?id=61993 Add native mouse and keyboard event classes to convert EFL's events to NativeWebEvent. * Shared/NativeWebKeyboardEvent.h: (WebKit::NativeWebKeyboardEvent::nativeEvent): * Shared/NativeWebMouseEvent.h: (WebKit::NativeWebMouseEvent::nativeEvent): * Shared/NativeWebWheelEvent.h: (WebKit::NativeWebWheelEvent::nativeEvent): * Shared/efl/NativeWebKeyboardEventEfl.cpp: Added. (WebKit::NativeWebKeyboardEvent::NativeWebKeyboardEvent): * Shared/efl/NativeWebMouseEventEfl.cpp: Added. (WebKit::NativeWebMouseEvent::NativeWebMouseEvent): * Shared/efl/NativeWebWheelEventEfl.cpp: Added. (WebKit::NativeWebWheelEvent::NativeWebWheelEvent): * Shared/efl/WebEventFactory.cpp: Added. (WebKit::modifiersForEvent): (WebKit::buttonForEvent): (WebKit::clickCountForEvent): (WebKit::WebEventFactory::createWebMouseEvent): (WebKit::WebEventFactory::createWebWheelEvent): (WebKit::WebEventFactory::createWebKeyboardEvent): * Shared/efl/WebEventFactory.h: Added. 2011-06-18 Eunmi Lee Reviewed by Sam Weinig. [EFL][WK2] Add missing functions of EFL port's PageClientImpl https://bugs.webkit.org/show_bug.cgi?id=62711 Three functions are added in the PageClient.h, so add them to the EFL's PageClientImpl. * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::screenToWindow): (WebKit::PageClientImpl::enterAcceleratedCompositingMode): (WebKit::PageClientImpl::exitAcceleratedCompositingMode): * UIProcess/API/efl/PageClientImpl.h: 2011-06-17 Brent Fulgham [WinCairo] Unreviewed build fix after r89060 and r89161. * Shared/win/WebCoreArgumentCodersWin.cpp: WinCairo build fixes (1) Include proper header files for WinCairo build (2) Exclude unused namespace declaration 2011-06-17 Anders Carlsson Reviewed by Sam Weinig. Remove unused ArgumentEncoder and ArgumentDecoder functions https://bugs.webkit.org/show_bug.cgi?id=62909 * Platform/CoreIPC/ArgumentDecoder.cpp: * Platform/CoreIPC/ArgumentDecoder.h: * Platform/CoreIPC/ArgumentEncoder.cpp: * Platform/CoreIPC/ArgumentEncoder.h: * Shared/win/PlatformCertificateInfo.cpp: (WebKit::PlatformCertificateInfo::encode): (WebKit::PlatformCertificateInfo::decode): Replace calls to encodeBytes/decodeBytes with encodeVariableLengthByteArray/decodeVariableLengthByteArray. 2011-06-17 Anders Carlsson Yet another Qt build fix attempt. * UIProcess/API/qt/ClientImpl.cpp: * UIProcess/API/qt/qgraphicswkview.cpp: * UIProcess/API/qt/qwkpage.cpp: * UIProcess/API/qt/qwkpage_p.h: 2011-06-17 Anders Carlsson Another attempt at fixing the Qt build. * UIProcess/API/qt/ClientImpl.cpp: * UIProcess/API/qt/qgraphicswkview.cpp: * UIProcess/API/qt/qwkcontext.cpp: 2011-06-17 Anders Carlsson Fix Qt build. * WebProcess/ResourceCache/WebResourceCacheManager.cpp: 2011-06-17 Anders Carlsson Windows build fix. * UIProcess/win/WebView.cpp: 2011-06-17 Anders Carlsson Reviewed by Sam Weinig. Move the remaining WebCore argument coders to the .cpp file https://bugs.webkit.org/show_bug.cgi?id=62874 Also add includes that other files need that used to be provided by WebCoreArgumentCoders.h, and get rid of the LAZY_NATIVE_CURSOR #if check because all WebKit2 platforms now support it. * Shared/ContextMenuState.h: * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/WebCoreArgumentCoders.h: * Shared/gtk/WebCoreArgumentCodersGtk.cpp: * Shared/mac/WebCoreArgumentCodersMac.mm: * Shared/qt/WebCoreArgumentCodersQt.cpp: * UIProcess/API/mac/PDFViewController.mm: * UIProcess/PageClient.h: * UIProcess/WebIconDatabase.cpp: * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/mac/WKFullScreenWindowController.mm: 2011-06-17 Chang Shu Reviewed by Anders Carlsson. [Qt] [WK2] Debug info leaks to stdout from plugins in Qt WebKit2 layout tests https://bugs.webkit.org/show_bug.cgi?id=61940 Tempararily supress stdout during getPluginInfo during which debug info was leaked out. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::StdoutRedirect::StdoutRedirect): (WebKit::StdoutRedirect::~StdoutRedirect): (WebKit::NetscapePluginModule::getPluginInfo): 2011-06-17 Anders Carlsson Reviewed by Andreas Kling. Remove WebCore:: qualifier from names in WebPageProxy. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::dragEntered): (WebKit::WebPageProxy::dragUpdated): (WebKit::WebPageProxy::dragExited): (WebKit::WebPageProxy::performDrag): (WebKit::WebPageProxy::performDragControllerAction): (WebKit::WebPageProxy::dragEnded): (WebKit::WebPageProxy::setResizesToContentsUsingLayoutSize): (WebKit::WebPageProxy::unableToImplementPolicy): (WebKit::WebPageProxy::didChangeContentsSize): (WebKit::WebPageProxy::didFindZoomableArea): (WebKit::WebPageProxy::findZoomableAreaForPoint): (WebKit::WebPageProxy::setComposition): (WebKit::WebPageProxy::checkTextOfParagraph): (WebKit::WebPageProxy::checkGrammarOfString): (WebKit::WebPageProxy::setCursor): (WebKit::WebPageProxy::computedPagesCallback): (WebKit::WebPageProxy::canAuthenticateAgainstProtectionSpaceInFrame): (WebKit::WebPageProxy::didReceiveAuthenticationChallenge): (WebKit::WebPageProxy::showCorrectionPanel): (WebKit::WebPageProxy::dismissCorrectionPanel): (WebKit::WebPageProxy::dismissCorrectionPanelSoon): (WebKit::WebPageProxy::recordAutocorrectionResponse): 2011-06-17 Anders Carlsson Reviewed by Darin Adler. Fix message generator to include headers for all types https://bugs.webkit.org/show_bug.cgi?id=62870 Previously, if we found an argument coder header for a type, we'd assume that that header includes the necessary headers for the type. * Scripts/webkit2/messages.py: * Scripts/webkit2/messages_unittest.py: 2011-06-17 Chang Shu Reviewed by Andreas Kling. [Qt] [WK2] Support undo/redo in MiniBrowser https://bugs.webkit.org/show_bug.cgi?id=62809 * UIProcess/API/qt/qwkpage.cpp: (QWKPage::action): * UIProcess/API/qt/qwkpage.h: 2011-06-17 Carlos Garcia Campos Unreviewed. Fix WebKit2 GTK build after r89060. * Shared/gtk/WebCoreArgumentCodersGtk.cpp: (CoreIPC::::encode): 2011-06-16 Anders Carlsson Reviewed by Sam Weinig. Get rid of CoreIPC::In and CoreIPC::Out from some argument coders https://bugs.webkit.org/show_bug.cgi?id=62832 * Shared/OriginAndDatabases.cpp: (WebKit::OriginAndDatabases::encode): (WebKit::OriginAndDatabases::decode): * Shared/SecurityOriginData.cpp: (WebKit::SecurityOriginData::encode): (WebKit::SecurityOriginData::decode): * Shared/WebKeyboardEvent.cpp: (WebKit::WebKeyboardEvent::encode): (WebKit::WebKeyboardEvent::decode): * Shared/WebOpenPanelParameters.cpp: (WebKit::WebOpenPanelParameters::Data::encode): (WebKit::WebOpenPanelParameters::Data::decode): * Shared/WebPreferencesStore.cpp: (WebKit::WebPreferencesStore::encode): (WebKit::WebPreferencesStore::decode): 2011-06-16 Anders Carlsson Reviewed by Sam Weinig. Cleanup ResourceRequest, ResourceResponse and ResourceError argument coders https://bugs.webkit.org/show_bug.cgi?id=62803 Get rid of the free encode/decode functions and move the template specializations to their respective implementation files instead. * Shared/WebCoreArgumentCoders.h: * Shared/gtk/WebCoreArgumentCodersGtk.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/qt/WebCoreArgumentCodersQt.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/win/WebCoreArgumentCodersWin.cpp: (CoreIPC::::encode): (CoreIPC::::decode): 2011-06-16 Chang Shu Reviewed by Sam Weinig. [Qt] [WK2] Qt WebKit2 needs undo/redo support https://bugs.webkit.org/show_bug.cgi?id=62637 Implement undo/redo support for document.execCommand(). * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::QWKPagePrivate): (QWKPagePrivate::~QWKPagePrivate): (QWKPagePrivate::registerEditCommand): (QWKPagePrivate::clearAllEditCommands): (QWKPagePrivate::canUndoRedo): (QWKPagePrivate::executeUndoRedo): * UIProcess/API/qt/qwkpage_p.h: * UIProcess/qt/WebUndoCommandQt.cpp: Added. (WebUndoCommandQt::WebUndoCommandQt): (WebUndoCommandQt::~WebUndoCommandQt): (WebUndoCommandQt::redo): (WebUndoCommandQt::undo): * UIProcess/qt/WebUndoCommandQt.h: Added. (WebUndoCommandQt::inUndoRedo): * WebKit2.pro: 2011-06-16 Anders Carlsson Fix build. * Shared/WebCoreArgumentCoders.cpp: * Shared/WebCoreArgumentCoders.h: 2011-06-15 Anders Carlsson Reviewed by Sam Weinig. Move more argument coders to WebCoreArgumentCoders and clean up the animation coders https://bugs.webkit.org/show_bug.cgi?id=62760 * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): (CoreIPC::encodeOperation): (CoreIPC::decodeOperation): (CoreIPC::encodeBoolAndValue): (CoreIPC::encodeBoolAndEnumValue): (CoreIPC::decodeBoolAndValue): (CoreIPC::decodeBoolAndEnumValue): * Shared/WebCoreArgumentCoders.h: * Shared/mac/ArgumentCodersMac.h: * Shared/mac/ArgumentCodersMac.mm: * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::::encode): (CoreIPC::::decode): 2011-06-16 Sangyong Park Reviewed by Martin Robinson. [GTK] Implement ResourceRequest and ResourceResponse encoder/decoder https://bugs.webkit.org/show_bug.cgi?id=55934 * Shared/gtk/WebCoreArgumentCodersGtk.cpp: (CoreIPC::encodeResourceRequest): (CoreIPC::decodeResourceRequest): (CoreIPC::encodeResourceResponse): (CoreIPC::decodeResourceResponse): 2011-06-16 Carlos Garcia Campos Reviewed by Xan Lopez. [GTK] Remove support for GTK+2 in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=62794 * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseRealize): (webkitWebViewBaseDraw): (webkitWebViewBaseQueryTooltip): (webkit_web_view_base_class_init): (webkitWebViewBaseSetTooltipText): * UIProcess/gtk/WebContextMenuProxyGtk.cpp: (WebKit::WebContextMenuProxyGtk::menuPositionFunction): * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::moduleMixesGtkSymbols): 2011-06-15 Adam Barth Reviewed by Eric Seidel. Remove ScriptController::setAllowPopupsFromPlugin https://bugs.webkit.org/show_bug.cgi?id=62706 * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::performJavaScriptURLRequest): (WebKit::PluginView::evaluate): 2011-06-15 Ryuan Choi Rubber stamped by Eric Seidel. [CMAKE][WK2] Add an option to build webkit2. https://bugs.webkit.org/show_bug.cgi?id=62260 Add script to build WebKit2 using CMake. * CMakeLists.txt: Added. 2011-06-15 John Sullivan Reviewed by Sam Weinig. WKSecurityOriginGetProtocol and WKSecurityOriginGetHost are named wrong because they return copied strings * Shared/API/c/WKSecurityOrigin.cpp: (WKSecurityOriginCopyProtocol): Renamed to use "Copy" instead of "Get" because it returns a copy. (WKSecurityOriginCopyHost): Ditto. * Shared/API/c/WKSecurityOrigin.h: Updated declarations. 2011-06-14 Jon Honeycutt REGRESSION(78201): Windowless Flash plug-ins are transparent on some sites https://bugs.webkit.org/show_bug.cgi?id=62690 Reviewed by Ada Chan. The bug arises when mixing CoreGraphics and GDI. When we create a Windows bitmap for a windowless plug-in to draw into, we first fill it with "clear", or all 0s. If the plug-in uses GDI to draw, the GDI calls will ignore the alpha channel, and if we then use CG to blend this bitmap onto the GraphicsContext for the rest of the page, CG will treat the 0-filled alpha channel as being transparent. To fix this, on Windows, use a GDI-backed GraphicsContext to paint the page in the WebProcess, and use GDI to blit from the UpdateInfo to the backing store in the UI process. * Platform/SharedMemory.h: (WebKit::SharedMemory::handle): Return the handle for the memory. * Shared/ShareableBitmap.h: Declared windowsContext() to return a HDC with the bitmap selected into it. Added members to store the HDC and the HBITMAP. * Shared/win/ShareableBitmapWin.cpp: Added. (WebKit::ShareableBitmap::windowsContext): Get the screen DC, and create a compatible DC from it. Create a DIB section backed by the shared memory, select it into the context, and return it. * UIProcess/win/BackingStoreWin.cpp: (WebKit::BackingStore::incorporateUpdate): Use GDI to blit from the update info's bitmap into the backing store bitmap. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::createGraphicsContext): Return a GraphicsContext from the ShareableBitmap. (WebKit::DrawingAreaImpl::display): Call createGraphicsContext(), and pass the ShareableBitmap. * WebProcess/WebPage/DrawingAreaImpl.h: Declare createGraphicsContext(), which on Windows will create a GDI-backed GraphicsContext. * WebProcess/WebPage/win/DrawingAreaImplWin.cpp: Added. (WebKit::DrawingAreaImpl::createGraphicsContext): Get a Windows context for the bitmap, and create and return a new GraphicsContext using the DC. * win/WebKit2.vcproj: Added new files. 2011-06-15 Anders Carlsson Reviewed by Sam Weinig. Move more argument coders to WebCoreArgumentCoders.cpp https://bugs.webkit.org/show_bug.cgi?id=62755 * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::decode): (CoreIPC::::encode): (CoreIPC::encodeImage): (CoreIPC::decodeImage): * Shared/WebCoreArgumentCoders.h: 2011-06-15 Anders Carlsson Reviewed by Darin Adler. Add ShareableBitmap::createImage and get rid of WebCoreArgumentCodersCG.cpp https://bugs.webkit.org/show_bug.cgi?id=62742 * Shared/ShareableBitmap.h: Move createImage out of the #if PLATFORM(QT) section. * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::decodeImage): Call ShareableBitmap::createImage. * Shared/WebCoreArgumentCoders.h: remove createImage function declaration. * Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::createImage): Add implementation. * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::createGraphicsContext): (WebKit::ShareableBitmap::createImage): Move createImage implementation from WebCoreArgumentCodersCG.cpp here. * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: Update projects. 2011-06-15 Anders Carlsson Reviewed by Alexey Proskuryakov. Move some argument coders to WebCoreArgumentCoders.cpp https://bugs.webkit.org/show_bug.cgi?id=62739 * GNUmakefile.am: * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/WebCoreArgumentCoders.h: * WebKit2.pro: 2011-06-15 Anders Carlsson Reviewed by Sam Weinig. Fix possible null dereference in webSecKeychainItemCreateFromContentOnMainThread https://bugs.webkit.org/show_bug.cgi?id=62736 * WebProcess/mac/KeychainItemShimMethods.mm: (WebKit::webSecKeychainItemCreateFromContentOnMainThread): SecKeychainItemCreateFromContent can potentially return a null keychain item, so add a null check before trying to retain it. 2011-06-15 Anders Carlsson Reviewed by Dan Bernstein. Ignore responsiveness timer callbacks on closed pages https://bugs.webkit.org/show_bug.cgi?id=62735 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): Use nullptr instead of clear. (WebKit::WebPageProxy::processDidBecomeUnresponsive): Return early if the page isn't valid. (WebKit::WebPageProxy::processDidBecomeResponsive): Ditto. (WebKit::WebPageProxy::updateBackingStoreDiscardableState): Assert that the page is valid. 2011-06-15 Sheriff Bot Unreviewed, rolling out r88907. http://trac.webkit.org/changeset/88907 https://bugs.webkit.org/show_bug.cgi?id=62732 See comment #15 by Nikolas Zimmermann on bug 62527 regarding the deprecation of makeString() (Requested by acidx on #webkit). * UIProcess/efl/WebPageProxyEfl.cpp: (WebKit::WebPageProxy::standardUserAgent): 2011-06-15 Csaba Osztrogonác [Qt][WK2] Unreviewed rolling out r88799, because it made web process crash. * Scripts/webkit2/messages.py: * Shared/LayerTreeContext.h: * Shared/qt/LayerTreeContextQt.cpp: (WebKit::LayerTreeContext::LayerTreeContext): (WebKit::LayerTreeContext::~LayerTreeContext): (WebKit::LayerTreeContext::encode): (WebKit::LayerTreeContext::decode): (WebKit::LayerTreeContext::isEmpty): (WebKit::operator==): * UIProcess/DrawingAreaProxy.h: * UIProcess/DrawingAreaProxy.messages.in: * WebKit2.pro: * WebProcess/WebCoreSupport/WebGraphicsLayer.cpp: (WebCore::collectCompositingInfoForThisLayer): * WebProcess/WebPage/LayerTreeHost.cpp: (WebKit::LayerTreeHost::create): * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: * WebProcess/WebPage/qt/LayerTreeHostQt.h: Removed. 2011-06-14 Eunmi Lee Reviewed by Sam Weinig. [EFL][WK2] Change string operation to makeString() https://bugs.webkit.org/show_bug.cgi?id=62527 Use makeString() because it is better than creating individual strings and concatenating them. * UIProcess/efl/WebPageProxyEfl.cpp: (WebKit::WebPageProxy::standardUserAgent): 2011-06-14 Sam Weinig Reviewed by Simon Fraser. Follow up for Callers should be robust against WebImage::create() returning an image with a null snapshot https://bugs.webkit.org/show_bug.cgi?id=62666 * Shared/API/c/cg/WKImageCG.cpp: (WKImageCreateCGImage): (WKImageCreateFromCGImage): Don't null check the arguments (as per our API design) or the direct result of WebImage::create. * Shared/UserMessageCoders.h: (WebKit::UserMessageEncoder::baseEncode): Remove redundant check and make not being able to create a handle the same as not being backed by shareable memory. 2011-06-14 John Sullivan Reviewed by Ada Chan. windowsKeyCodeForKeyEvent should be robust against NSFlagsChanged events * Shared/mac/WebEventFactory.mm: (WebKit::windowsKeyCodeForKeyEvent): Explicitly check for NSFlagsChanged before calling -charactersIgnoringModifiers, since charactersIgnoringModifiers throws an exception for NSFlagsChanged events. 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Use new byte array encoding/decoding functions for WTF argument coders https://bugs.webkit.org/show_bug.cgi?id=62682 * Platform/CoreIPC/ArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): Use the new functions for the string argument coders. * Platform/CoreIPC/ArgumentCoders.h: (CoreIPC::SimpleArgumentCoder::encode): (CoreIPC::SimpleArgumentCoder::decode): Use the new functions to avoid encoding/decoding the size when it's known at decode time. * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::roundUpToAlignment): Assert that the alignment is a power of 2. (CoreIPC::decodeFixedLengthData): Alignment comes before the size. * UIProcess/cf/WebBackForwardListCF.cpp: (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Add a FIXME about now using the internal CoreIPC encoding format here. * UIProcess/cf/WebPageProxyCF.cpp: Bump the current session state data version number. 2011-06-14 No'am Rosenthal Reviewed by Kenneth Rohde Christiansen. [Qt] Implement accelerated compositing on WK2 Qt port https://bugs.webkit.org/show_bug.cgi?id=56935 Expose viewportVisibleRect(), so that we can detect which parts of a texture actually need to be uploaded. Together with Viatcheslav Ostapenko. * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::viewportVisibleRect): * UIProcess/API/qt/qwkpage_p.h: * UIProcess/PageClient.h: * UIProcess/WebPageProxy.h: * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::viewportVisibleRect): 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Start using the new encode/decode functions https://bugs.webkit.org/show_bug.cgi?id=62676 * Platform/CoreIPC/DataReference.cpp: (CoreIPC::DataReference::encode): Use encodeVariableLengthByteArray. * Shared/UserMessageCoders.h: (WebKit::UserMessageEncoder::baseEncode): Use encodeVariableLengthByteArray and the new dataReference accessors. (WebKit::UserMessageDecoder::baseDecode): Use decodeVariableLengthByteArray. * Shared/WebData.h: (WebKit::WebData::dataReference): Return a reference to the data. * Shared/WebSerializedScriptValue.h: (WebKit::WebSerializedScriptValue::dataReference): Ditto. * Shared/cf/ArgumentCodersCF.cpp: (CoreIPC::encode): Use encodeVariableLengthByteArray. * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::Handle::encode): Use encodeVariableLengthByteArray. * WebProcess/WebPage/DecoderAdapter.cpp: (WebKit::DecoderAdapter::decodeBytes): Use decodeVariableLengthByteArray. * WebProcess/WebPage/EncoderAdapter.cpp: (WebKit::EncoderAdapter::dataReference): Rename data() to dataReference() to indicate that it returns a reference to the data. (WebKit::EncoderAdapter::encodeBytes): Use encodeVariableLengthByteArray. 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Add encodeVariableLengthByteArray and decodeVariableLengthByteArray https://bugs.webkit.org/show_bug.cgi?id=62674 Rename the ArgumentDecoder::decodeBytes overload that takes a DataReference to decodeVariableLengthByteArray, to match the added encodeVariableLengthByteArray. * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::ArgumentDecoder::decodeVariableLengthByteArray): * Platform/CoreIPC/ArgumentDecoder.h: * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::encodeFixedLengthData): (CoreIPC::ArgumentEncoder::encodeVariableLengthByteArray): * Platform/CoreIPC/ArgumentEncoder.h: * Platform/CoreIPC/DataReference.cpp: (CoreIPC::DataReference::decode): * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::Handle::decode): 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Add functions for converting between DataReferences and vectors https://bugs.webkit.org/show_bug.cgi?id=62671 * Platform/CoreIPC/DataReference.h: (CoreIPC::DataReference::DataReference): New implicit constructor that takes a vector. (CoreIPC::DataReference::vector): New function that returns a new vector. * Shared/WebBackForwardListItem.cpp: (WebKit::WebBackForwardListItem::encode): Use implicit constructor. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::runJavaScriptInMainFrame): Ditto. 2011-06-14 John Sullivan Reviewed by Dan Bernstein. Callers should be robust against WebImage::create() returning an image with a null snapshot * Shared/API/c/cg/WKImageCG.cpp: (WKImageCreateCGImage): Return 0 if no bitmap was created. (WKImageCreateFromCGImage): Ditto. * Shared/UserMessageCoders.h: (WebKit::UserMessageEncoder::baseEncode): Check for null before dereferencing image->bitmap() in two places. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::snapshotInViewCoordinates): Return 0 if no bitmap was created. (WebKit::WebPage::scaledSnapshotInDocumentCoordinates): Ditto. (WebKit::WebPage::createSnapshotOfVisibleContent): Bail out if no bitmap was created. 2011-06-14 Anders Carlsson Reviewed by Darin Adler. Add functions for encoding/decoding data with a known size and alignment https://bugs.webkit.org/show_bug.cgi?id=62663 * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::ArgumentDecoder::decodeFixedLengthData): * Platform/CoreIPC/ArgumentDecoder.h: * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::encodeFixedLengthData): (CoreIPC::ArgumentEncoder::encodeVariableLengthData): * Platform/CoreIPC/ArgumentEncoder.h: 2011-06-14 Anders Carlsson Reviewed by Sam Weinig. Move string ArgumentCoder templat