2011-06-04 Sam Weinig Reviewed by Anders Carlsson. Disable WebProcess side display throttling when in a user scroll https://bugs.webkit.org/show_bug.cgi?id=62095 Add the ability to disable WebProcess side display throttling that takes place in DrawingAreaImpl::displayTimerFired. Disable the throttling when in a user or animated scroll. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::didStartRubberBandForFrame): (WebKit::WebChromeClient::didCompleteRubberBandForFrame): (WebKit::WebChromeClient::didStartAnimatedScroll): (WebKit::WebChromeClient::didCompleteAnimatedScroll): * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::enableDisplayThrottling): (WebKit::DrawingArea::disableDisplayThrottling): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): (WebKit::DrawingAreaImpl::enableDisplayThrottling): (WebKit::DrawingAreaImpl::disableDisplayThrottling): (WebKit::DrawingAreaImpl::displayTimerFired): * WebProcess/WebPage/DrawingAreaImpl.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::wheelEvent): 2011-06-04 Darin Adler Reviewed by Anders Carlsson. [Mac WebKit2] REGRESSION (r86692): Synchronous XMLHttpRequest hangs in credential shim (affects Netgear ReadyNAS admin page) https://bugs.webkit.org/show_bug.cgi?id=62094 rdar://problem/9539204 * WebKit2.xcodeproj/project.pbxproj: Added new source files. * WebProcess/mac/CoreIPCClientRunLoop.h: Added. * WebProcess/mac/CoreIPCClientRunLoop.mm: Added. (-[WKFunctionAdapter perform]): Added. (WebKit::createCoreIPCRunLoopModesArray): Added. (WebKit::coreIPCRunLoopModesArray): Added. (WebKit::callOnCoreIPCClientRunLoopAndWait): Added. * WebProcess/mac/KeychainItemShimMethods.mm: (WebKit::webFreeAttributeListContent): Use callOnCoreIPCClientRunLoopAndWait. (WebKit::webFreeKeychainItemContent): Ditto. (WebKit::webSecKeychainItemCopyContent): Ditto. (WebKit::webSecKeychainItemCreateFromContent): Ditto. (WebKit::webSecKeychainItemModifyContent): Ditto. * WebProcess/mac/SecItemShimMethods.mm: (WebKit::webSecItemCopyMatching): Ditto. (WebKit::webSecItemAdd): Ditto. (WebKit::webSecItemUpdate): Ditto. (WebKit::webSecItemDelete): Ditto. 2011-06-04 Sam Weinig Reviewed by Anders Carlsson. WebKit2 needs to know when a scroll is happening due to the ScrollAnimator https://bugs.webkit.org/show_bug.cgi?id=62093 Stub out new ChromeClient functions regarding the start and end of ScrollAnimator animated scrolls, and update logic for rubber-band ending to check for main frame now that it is called for all frames. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::didStartRubberBandForFrame): (WebKit::WebChromeClient::didCompleteRubberBandForFrame): (WebKit::WebChromeClient::didStartAnimatedScroll): (WebKit::WebChromeClient::didCompleteAnimatedScroll): * WebProcess/WebCoreSupport/WebChromeClient.h: 2011-06-03 Brady Eidson Reviewed by Steve Falkenburg. and https://bugs.webkit.org/show_bug.cgi?id=62064 WebBackForwardListItem::setBackForwardData actually appends data * Shared/WebBackForwardListItem.cpp: (WebKit::WebBackForwardListItem::setBackForwardData): Clear the Vector out before appending the replacement data. 2011-06-03 Anders Carlsson Reviewed by Brady Eidson. Disable the sync message timeout for the Microsoft SharePoint plug-in https://bugs.webkit.org/show_bug.cgi?id=62043 * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::defaultSyncMessageTimeout): 2011-06-03 Andreas Kling Reviewed by Benjamin Poulain. [Qt] TiledDrawingArea: Initialize tiles to transparent. * UIProcess/qt/TiledDrawingAreaTileQt.cpp: (WebKit::TiledDrawingAreaTile::incorporateUpdate): When constructing new back buffers, fill them with transparent pixels. 2011-06-03 No'am Rosenthal Reviewed by Andreas Kling. [Qt][WK2] Make tiling on WebKit2 more responsive. https://bugs.webkit.org/show_bug.cgi?id=50064 Instead of creating and destroying pixmaps, and copying them using QPixmap::copy() or relying on the implicit sharing functionality, we keep the QPixmaps alive and just make sure their content is synchronized. This seems to improve responsiveness noticably, as now the UI process doesn't deal with allocating/deallocating pixmaps, and the copies are done with the optimized path (QPainter) vs the unoptimized ones (QPixmap::copy().) * UIProcess/TiledDrawingAreaTile.h: * UIProcess/qt/TiledDrawingAreaTileQt.cpp: (WebKit::TiledDrawingAreaTile::TiledDrawingAreaTile): (WebKit::TiledDrawingAreaTile::isReadyToPaint): (WebKit::TiledDrawingAreaTile::hasReadyBackBuffer): (WebKit::TiledDrawingAreaTile::swapBackBufferToFront): (WebKit::TiledDrawingAreaTile::incorporateUpdate): 2011-06-03 Mikhail Naganov Reviewed by Yury Semikhatsky. Web Inspector: [Chromium] cpu-profiler-profiling layout test is flaky on Linux Debug. https://bugs.webkit.org/show_bug.cgi?id=61533 Skip cpu-profiler-profiling in debug, implement a fast headless alternative. * WebProcess/InjectedBundle/API/c/WKBundleInspector.cpp: (WKBundleInspectorSetJavaScriptProfilingEnabled): * WebProcess/InjectedBundle/API/c/WKBundleInspector.h: * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::setJavaScriptProfilingEnabled): * WebProcess/WebPage/WebInspector.h: 2011-06-02 Anders Carlsson Reviewed by Mark Rowe. Assert when trying to unload a module that failed to load https://bugs.webkit.org/show_bug.cgi?id=61980 Remove an invalid ASSERT; it's OK for m_bundle to be null if the bundle failed to load. * Platform/mac/ModuleMac.mm: (WebKit::Module::unload): 2011-06-02 Anders Carlsson Reviewed by Simon Fraser. Add quirk for plug-ins that return a retained CALayer https://bugs.webkit.org/show_bug.cgi?id=61948 * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::determineQuirks): Set the ReturnsRetainedCoreAnimationLayer quirk for Flash. * Shared/Plugins/PluginQuirks.h: Add ReturnsRetainedCoreAnimationLayer quirk. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): Handle WKNVExpectsNonretainedLayer by always returning true, and also call NetscapePlugin::setPluginReturnsNonretainedLayer(true) to add a way for plug-ins to opt into returning non-retained layers even if they have the quirk specified. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::NetscapePlugin): Initialize m_pluginReturnsNonretainedLayer to true. * WebProcess/Plugins/Netscape/NetscapePlugin.h: (WebKit::NetscapePlugin::setPluginReturnsNonretainedLayer): Add setter. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::platformPostInitialize): If m_pluginReturnsNonretainedLayer is false, adopt the layer. 2011-06-02 Brent Fulgham Unreviewed WinCairo build correction. * UIProcess/win/WebView.cpp: Don't include CG file header when building without CoreGraphics support. 2011-06-02 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Implement popup menus in Webkit2 https://bugs.webkit.org/show_bug.cgi?id=61854 * GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createPopupMenuProxy): Create a new WebPopupMenuProxy. * UIProcess/gtk/WebPopupMenuProxyGtk.cpp: Added. (WebKit::WebPopupMenuProxyGtk::WebPopupMenuProxyGtk): (WebKit::WebPopupMenuProxyGtk::~WebPopupMenuProxyGtk): (WebKit::WebPopupMenuProxyGtk::showPopupMenu): (WebKit::WebPopupMenuProxyGtk::hidePopupMenu): (WebKit::WebPopupMenuProxyGtk::shutdownRunLoop): (WebKit::WebPopupMenuProxyGtk::menuItemActivated): (WebKit::WebPopupMenuProxyGtk::menuUnmapped): * UIProcess/gtk/WebPopupMenuProxyGtk.h: Added. (WebKit::WebPopupMenuProxyGtk::create): (WebKit::WebPopupMenuProxyGtk::setActiveItem): 2011-06-01 Sam Weinig Reviewed by Anders Carlsson. Non-users need access to the mds caches for SSL support. * WebProcess/com.apple.WebProcess.sb: 2011-06-01 Jer Noble Reviewed by Maciej Stachowiak. Flash of old video frame at the end of full screen transition https://bugs.webkit.org/show_bug.cgi?id=61752 Add a new method and message, DisposeOfLayerClient, which will invalidate and release the WKRemoteLayerClient used during the full-screen animation. This ensures that the root layer used for the full-screen animation will be in a clean state at the start of the next transition. * UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::disposeOfLayerClient): Added. * UIProcess/WebFullScreenManagerProxy.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController exitCompositedModeRepaintCompleted]): Call disposeOfLayerClient. * WebProcess/FullScreen/WebFullScreenManager.h: (WebKit::WebFullScreenManager::disposeOfLayerClient): Added. * WebProcess/FullScreen/WebFullScreenManager.messages.in: Added DisposeOfLayerClient. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::disposeOfLayerClient): Added, invalidates and clears m_rootLayerClient. 2011-06-01 Adam Roben Build fix after r87831 * UIProcess/win/WebView.cpp: (WebKit::WebView::enterAcceleratedCompositingMode): (WebKit::WebView::exitAcceleratedCompositingMode): Added some HAVE(WKQCA) guards. 2011-06-01 Adam Roben Delete a bunch of dead code in DrawingAreaImpl LayerTreeHost::participatesInDisplay always returns false now, which means a bunch of code in DrawingAreaImpl no longer runs. Cleanup after fixing REGRESSION (WebKit2): Accelerated CSS animations have a lower framerate than in WebKit1 Reviewed by Anders Carlsson. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::forceRepaint): (WebKit::DrawingAreaImpl::layerHostDidFlushLayers): (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): (WebKit::DrawingAreaImpl::didUpdate): (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): (WebKit::DrawingAreaImpl::scheduleDisplay): (WebKit::DrawingAreaImpl::displayTimerFired): (WebKit::DrawingAreaImpl::display): * WebProcess/WebPage/DrawingAreaImpl.h: * WebProcess/WebPage/LayerTreeHost.h: Reverted r82959. 2011-06-01 Adam Roben Render accelerated content into a web process-owned child HWND This allows us to use WKCACFView's far more efficient kWKCACFViewDrawingDestinationWindow mode, which gives us asynchronous rendering on a background thread and doesn't require us to read bits off the GPU back into system memory. A new class, WKCACFViewWindow, represents the child HWND. The child HWND is placed at the bottom of the z-order so it won't obscure any other child HWNDs (i.e., windowed plugins). The child HWND is made transparent to mouse events so that WKView will continue to receive mouse events even though it is obscured by the child HWND. There is now a bunch of dead code in DrawingAreaImpl to handle our old rendering model. I'll remove that in a future patch. Fixes REGRESSION (WebKit2): Accelerated CSS animations have a lower framerate than in WebKit1 Reviewed by Anders Carlsson. * Shared/LayerTreeContext.h: Added HWND member on Windows. * Shared/win/CoalescedWindowGeometriesUpdater.cpp: (WebKit::CoalescedWindowGeometriesUpdater::updateGeometries): * Shared/win/CoalescedWindowGeometriesUpdater.h: Added new BringToTopOrNot argument. Allows the caller to specify that all windows being updated should also be brought to the top of the z-order. * Shared/win/LayerTreeContextWin.cpp: (WebKit::LayerTreeContext::LayerTreeContext): (WebKit::LayerTreeContext::~LayerTreeContext): (WebKit::LayerTreeContext::encode): (WebKit::LayerTreeContext::decode): (WebKit::LayerTreeContext::isEmpty): (WebKit::operator==): Implemented based on new window member. * UIProcess/win/WebView.cpp: (WebKit::WebView::WebView): Initialize new member. (WebKit::WebView::onSizeEvent): Resize the layer host window to cover our entire view, if we have one. (WebKit::WebView::enterAcceleratedCompositingMode): Store, position, and show the layer host window. (WebKit::WebView::exitAcceleratedCompositingMode): Destroy the layer host window. (WebKit::WebView::updateChildWindowGeometries): Updated for change to CoalescedWindowGeometriesUpdater. * UIProcess/win/WebView.h: Added m_layerHostWindow member. * WebProcess/WebPage/LayerTreeHost.h: Added scheduleChildWindowGeometryUpdate. * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp: (WebKit::LayerTreeHostCAWin::supportsAcceleratedCompositing): Simplified by using WKCACFViewWindow. (WebKit::LayerTreeHostCAWin::LayerTreeHostCAWin): Removed initialization of a removed member. (WebKit::LayerTreeHostCAWin::platformInitialize): Changed to use WKCACFViewWindow, kWKCACFViewDrawingDestinationWindow, and to initialize the LayerTreeContext. (WebKit::LayerTreeHostCAWin::invalidate): Leak our window and tell it to clean up after itself. The UI process will take care of destroying the window when it finishes switching out of accelerated compositing mode. Removed a WKCACFViewUpdate call that is now handled by WKCACFViewWindow. (WebKit::LayerTreeHostCAWin::scheduleChildWindowGeometryUpdate): Added. Calls through to m_geometriesUpdater. (WebKit::LayerTreeHostCAWin::sizeDidChange): Updated to use WKCACFViewWindow. (WebKit::LayerTreeHostCAWin::contextDidChange): Update child window geometries now to keep them (almost) in sync with the accelerated content. covers the slight asynchrony that still exists. (WebKit::LayerTreeHostCAWin::setRootCompositingLayer): Don't flush any changes when we don't have a root layer. This prevents a flash of white when switching out of compositing mode. * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Added m_window and m_geometriesUpdater. Removed code related to the old, synchronous display model. * WebProcess/WebPage/ca/win/WKCACFViewWindow.cpp: Added. (WebKit::WKCACFViewWindow::WKCACFViewWindow): Initialize members and create our window. (WebKit::WKCACFViewWindow::~WKCACFViewWindow): Destroy our window if needed. (WebKit::WKCACFViewWindow::onCustomDestroy): Just call ::DestroyWindow. (WebKit::WKCACFViewWindow::onDestroy): Tell our view not to render into our window anymore. (WebKit::WKCACFViewWindow::onEraseBackground): Tell Windows not to erase us. (WebKit::WKCACFViewWindow::onNCDestroy): Clear out m_window since it's now pointing to a destroy window, and destroy ourselves if requested. (WebKit::WKCACFViewWindow::onPaint): Tell the view to draw, then clear our invalid region. (WebKit::WKCACFViewWindow::onPrintClient): Tell our view to draw into the given HDC. (WebKit::WKCACFViewWindow::registerClass): Register our class (duh). (WebKit::WKCACFViewWindow::staticWndProc): Get the WKCACFViewWindow pointer, or store the pointer if needed, then call through to wndProc. (WebKit::WKCACFViewWindow::wndProc): Call out to the appropriate handler function. * WebProcess/WebPage/ca/win/WKCACFViewWindow.h: Added. (WebKit::WKCACFViewWindow::setDeletesSelfWhenWindowDestroyed): Simple setter. (WebKit::WKCACFViewWindow::window): Simple getter. * WebProcess/WebPage/win/DrawingAreaImplWin.cpp: (WebKit::DrawingAreaImpl::scheduleChildWindowGeometryUpdate): Let the LayerTreeHost handle the geometry update, if we have one. * win/WebKit2.vcproj: Added WKCACFViewWindow files. 2011-06-01 Adam Roben Route plugin window geometry updates through the DrawingArea This will allow the geometry updates to be handled by the LayerTreeHost in compositing mode in the future. More rep work for REGRESSION (WebKit2): Accelerated CSS animations have a lower framerate than in WebKit1 Reviewed by Anders Carlsson. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::scheduleWindowedPluginGeometryUpdate): Tell the DrawingArea, not the WebPage, about the geometry update. * WebProcess/WebPage/DrawingArea.h: * WebProcess/WebPage/DrawingAreaImpl.h: * WebProcess/WebPage/win/DrawingAreaImplWin.cpp: Added. (WebKit::DrawingAreaImpl::scheduleChildWindowGeometryUpdate): Moved code here... * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/win/WebPageWin.cpp: ...from here. * win/WebKit2.vcproj: Added DrawingAreaImplWin.cpp. 2011-06-01 Adam Roben Move WebView's window geometry updating code to a new class This will allow us to share this code with LayerTreeHostCAWin. Prep work for REGRESSION (WebKit2): Accelerated CSS animations have a lower framerate than in WebKit1 Reviewed by Anders Carlsson. * Shared/win/CoalescedWindowGeometriesUpdater.cpp: Added. (WebKit::CoalescedWindowGeometriesUpdater::CoalescedWindowGeometriesUpdater): (WebKit::CoalescedWindowGeometriesUpdater::~CoalescedWindowGeometriesUpdater): Simple constructor/destructor. (WebKit::CoalescedWindowGeometriesUpdater::addPendingUpdate): (WebKit::setWindowRegion): (WebKit::CoalescedWindowGeometriesUpdater::updateGeometries): * Shared/win/CoalescedWindowGeometriesUpdater.h: Added. Moved code here... * UIProcess/win/WebView.cpp: (WebKit::WebView::scheduleChildWindowGeometryUpdate): (WebKit::WebView::updateChildWindowGeometries): * UIProcess/win/WebView.h: ...from here. * win/WebKit2.vcproj: Added new files. 2011-06-01 Adam Roben Windows build fix after r87755 * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp: (WebKit::LayerTreeHostCAWin::setLayerFlushSchedulingEnabled): Fixed typo. 2011-06-01 Oleg Romashin Reviewed by Kenneth Rohde Christiansen. platformGeometryDidChange function definition was changed everywhere except Qt. This is fix for Qt WK2 plugins compilation https://bugs.webkit.org/show_bug.cgi?id=61832 * PluginProcess/qt/PluginControllerProxyQt.cpp: (WebKit::PluginControllerProxy::platformGeometryDidChange): 2011-05-31 Jer Noble Reviewed by Darin Adler. Flash of black at the end of full screen transition at apple.com product videos https://bugs.webkit.org/show_bug.cgi?id=61756 The @"WebKitLayerHostChanged" notification is causing the QTMovie to tear down its layer (which is good) at the wrong time (which is bad). Send this notification only after the dragImage snapshot is taken. This exposed another problem, that the snapshot has a white background. Set the default background color and transparency for the view (making sure to reset them afterwards) to transparent. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): 2011-03-30 Martin Robinson Reviewed by Adam Roben. [GTK] [WebKit2] Implement a basic WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=57068 Added InjectedBundle support for GTK+. * WebProcess/InjectedBundle/InjectedBundle.h: Added typedef for GTK+. * WebProcess/InjectedBundle/gtk/InjectedBundleGtk.cpp: Added implementation. (WebKit::InjectedBundle::load): (WebKit::InjectedBundle::activateMacFontAscentHack): * WebProcess/WebPage/gtk/WebPageGtk.cpp: Remove unnecessary method definition. 2011-05-31 Dan Bernstein Reviewed by Simon Fraser. REGRESSION (5.0.5-ToT, WebKit2): Flash to white when navigating between pages on wsj.com, other sites (when navigating away from composited page) https://bugs.webkit.org/show_bug.cgi?id=61808 WebKit1 has a mechanism to prevent the stale bits from the outgoing page from being erased until the incoming page has layout. Adapt this in WebKit2 to prevent the composited layer tree of the outgoing page from being torn down or updated until the incoming page has layout. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidFirstLayout): Unfreeze the layer tree state. (WebKit::WebFrameLoaderClient::frameLoadCompleted): Ditto. (WebKit::WebFrameLoaderClient::provisionalLoadStarted): Freeze the layer tree state. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setLayerTreeStateIsFrozen): Added. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): Initialize new member variables. (WebKit::DrawingAreaImpl::setLayerTreeStateIsFrozen): Added. When freezing, sets the flag and disables layer flush scheduling and exiting accelerated compositing mode. When unfreezing, clears the flag and exits compositing mode if needed. (WebKit::DrawingAreaImpl::setRootCompositingLayer): Reset m_wantsToExitAcceleratedCompositingMode. (WebKit::DrawingAreaImpl::enterAcceleratedCompositingMode): Ditto. (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): Ditto. (WebKit::DrawingAreaImpl::exitAcceleratedCompositingModeSoon): If the layer tree state is frozen, bail out but set m_wantsToExitAcceleratedCompositingMode. * WebProcess/WebPage/DrawingAreaImpl.h: * WebProcess/WebPage/LayerTreeHost.h: * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: (WebKit::LayerTreeHostCA::LayerTreeHostCA): Initialize m_layerFlushSchedulingEnabled. * WebProcess/WebPage/ca/LayerTreeHostCA.h: * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h: * WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm: (WebKit::LayerTreeHostCAMac::scheduleLayerFlush): Bail out if scheduling is not enabled. (WebKit::LayerTreeHostCAMac::setLayerFlushSchedulingEnabled): Added. Sets the flag. If disabling flushing, cancels the pending flush. (WebKit::LayerTreeHostCAMac::flushPendingLayerChangesRunLoopObserverCallback): Added an assertion. * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp: (WebKit::LayerTreeHostCAWin::scheduleLayerFlush): Bail out if scheduling is not enabled. (WebKit::LayerTreeHostCAWin::setLayerFlushSchedulingEnabled): Added. Sets the flag. If disabling flushing, cancels the pending flush. * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: 2011-05-31 ChangeLog Reviewed by Andreas Kling. [Qt][WK2] Qt port needs test content for QWKHistory https://bugs.webkit.org/show_bug.cgi?id=57850 Created data-driven QTestLib tests for existing QWKHistory APIs. This walks through loading four simple pages, navigating backwards and forwards. We check the results at each action by creating expected forward/back lists and comparing those lists in count and membership to those kept by WebKit and retrieved via the QWKHistory APIs. * UIProcess/API/qt/tests/html/a.htm: Added. * UIProcess/API/qt/tests/html/b.htm: Added. * UIProcess/API/qt/tests/html/c.htm: Added. * UIProcess/API/qt/tests/html/d.htm: Added. Four added simple pages * UIProcess/API/qt/tests/qwkhistory: Added. * UIProcess/API/qt/tests/qwkhistory/qwkhistory.pro: Added. Created qwkhistory folder and pro * UIProcess/API/qt/tests/qwkhistory/tst_qwkhistory.cpp: Added. (TestHistoryItem::title): (TestHistoryItem::url): (TestHistoryItem::TestHistoryItem): Utility class to hold expected url,title for test (tst_QWKHistory::initTestCase): (tst_QWKHistory::historyFBTest_data): (tst_QWKHistory::historyFBTest): init, data, and data-driven test case * UIProcess/API/qt/tests/tests.pro: Included qwkhistory in tests.pro 2011-05-30 No'am Rosenthal Reviewed by Simon Hausmann. WebKit2: Enable serializing of data types needed for cross-process accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=61694 Create an ArgumentCoder for WebCore::Animation. * Scripts/webkit2/messages.py: * Shared/WebCoreArgumentCoders.h: 2011-05-30 No'am Rosenthal Reviewed by Simon Hausmann. WebKit2: Enable serializing of data types needed for cross-process accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=61694 Add an ArgumentCoder for WebCore::TimingFunction. This serializer can create the appropriate TimingFunction subclass based on the type of timing function. * Scripts/webkit2/messages.py: * Shared/WebCoreArgumentCoders.h: 2011-05-30 No'am Rosenthal Reviewed by Simon Hausmann. WebKit2: Enable serializing of data types needed for cross-process accelerated compositing https://bugs.webkit.org/show_bug.cgi?id=61694 Add WebCore::Length and WebCore::TransformationMatrix to the types that use SimpleArgumentCoder. * Scripts/webkit2/messages.py: * Shared/WebCoreArgumentCoders.h: 2011-05-30 Anders Carlsson Reviewed by Simon Fraser. Remove incorrect asserts from PluginProcessConnection https://bugs.webkit.org/show_bug.cgi?id=61731 There might be pending incoming messages from a PluginProxy even though we've destroyed the plug-in and removed it from the m_plugins map, so remove the incorrect assertions. * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::PluginProcessConnection::didReceiveMessage): (WebKit::PluginProcessConnection::didReceiveSyncMessage): 2011-05-30 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Initial tooltips implementation for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=59318 * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::toolTipChanged): Update view's tooltip text. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseQueryTooltip): Implement GtkWidget::query-tooltip. (webkit_web_view_base_class_init): Override GtkWidget::query-tooltip. (webkitWebViewBaseSetTooltipText): Update tooltip text and trigger GtkWidget::query-tooltip. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: 2011-05-30 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Remove some unneeded header includes https://bugs.webkit.org/show_bug.cgi?id=60536 * Platform/CoreIPC/Connection.cpp: Remove WebProcess.h. * Platform/CoreIPC/unix/ConnectionUnix.cpp: Remove ProcessLauncher.h and WebProcessProxy.h. Add . * WebProcess/Plugins/Netscape/NPJSObject.cpp: Remove PluginView.h. 2011-05-29 Darin Adler Reviewed by Dan Bernstein. Race condition in full screen controller, which leads to problem when web process crashes https://bugs.webkit.org/show_bug.cgi?id=61707 Second try at this. First try could lead to a WKView leak. * UIProcess/mac/WKFullScreenWindowController.h: Added _isExitingAcceleratedCompositingMode. Needed to track whether we have retained so we don't leak if the page goes away before we get the callback. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Added code to set the new variable to YES. (-[WKFullScreenWindowController exitCompositedModeRepaintCompleted]): Added code to deal with the new boolean and to release. (exitCompositedModeRepaintCompleted): Removed the release that was here. (-[WKFullScreenWindowController close]): Added a call to exitCompositedModeRepaintCompleted here. We're as complete as we'll ever be when we're closed; we can't get the callback after that point. 2011-05-29 Sam Weinig Reviewed by Anders Carlsson. REGRESSION (r87637): nytimes.com freezes after going back to it * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::forceRepaint): Add call to setShouldNotifyAfterNextScheduledLayerFlush(false) to prevent a redundant call to layerHostDidFlushLayers which would cause the layer state to get out of sync with the UIProcess. 2011-05-29 Jer Noble Reviewed by Simon Fraser. REGRESSION (r86924): webkitRequestFullScreen does not work properly (black screen, can’t interact) https://bugs.webkit.org/show_bug.cgi?id=61710 When taking the documentElement full screen, we don't create a RenderFullScreen object and thus never enter accelerated compositing mode for the animation. Tell the WKFullScreenWindowController to enter accelerated compositing mode anyway (with an empty layer context) so as to fulfill its expectations and cause the full screen animation to complete. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Added a comment explaining when we expect the animation to complete. (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Remove an ASSERT which is no longer valid. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Tell the UIProcess to enter then exit full-screen mode. (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto. 2011-05-29 Darin Adler Reviewed by Dan Bernstein. Race condition in full screen controller, which leads to problem when web process crashes https://bugs.webkit.org/show_bug.cgi?id=61707 Saw this while debugging a crash. We don't have a way to make regression tests for this kind of issue at this time. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): Retain the controller here since we are keeping a pointer to it. (exitCompositedModeRepaintCompleted): Release the controller here. 2011-05-29 Anders Carlsson Reviewed by Darin Adler. REGRESSION (87637): Entering WebKit Full Screen mode causes an assertion in DrawingAreaImpl::layerHostDidFlushLayers https://bugs.webkit.org/show_bug.cgi?id=61706 If we've already let the UI process know that we're in compositing mode, we just need to force a repaint. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::forceRepaint): 2011-05-29 Beth Dakin Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=61700 Need WebKit2 API to get the size of the render tree -and corresponding- * UIProcess/API/C/WKPage.cpp: (WKPageGetRenderTreeSize): * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::renderTreeSize): (WebKit::WebPageProxy::setRenderTreeSize): * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::setRenderTreeSize): * WebProcess/WebCoreSupport/WebChromeClient.h: 2011-05-29 Darin Adler Reviewed by Anders Carlsson and Simon Fraser. When calling ForceRepaint on a page with accelerated compositing, we can get a race condition where the UI process paints the old content, resulting in showing the previous page. That happens because forceRepaint's callback waits for the next repaint to happen, but nothing notifies UI process that the page is in accelerated compositing mode. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::forceRepaint): Call layerHostDidFlushLayers instead of just calling forceRepaint on the layer tree host. 2011-05-28 Simon Fraser Reviewed by Dan Bernstein, Maciej Stachowiak. Denying access to your keychain on login crashes WebKit2 https://bugs.webkit.org/show_bug.cgi?id=61695 Fix two sources of crashes if you hit the Deny button when WebKit2 is doing HTTP authentication. First, SecKeychainItemRequestData::attributeList() failed to initialize the length and data members of SecKeychainAttributes in the list if there was no data. This caused invalid memory reads later. Second, returning a non-zero error from the SecKeychainItemCopyContent shim method would cause a later crash in a system framework, which is not set up to handle errors. Instead, we always return noErr, and allow the authentication to fail. Finally, paranoically initialize the SecKeychainItemContext in two places to avoid uninitialized data members, and initialize length and outData to 0 in secKeychainItemCopyContent() in case SecKeychainItemCopyContent() fails to set them on error. * Shared/mac/SecKeychainItemRequestData.cpp: (WebKit::SecKeychainItemRequestData::attributeList): * UIProcess/mac/WebProcessProxyMac.mm: (WebKit::WebProcessProxy::secKeychainItemCopyContent): * WebProcess/mac/KeychainItemShimMethods.mm: (WebKit::webSecKeychainItemCopyContent): (WebKit::webSecKeychainItemCreateFromContent): 2011-05-28 Anders Carlsson Reviewed by Dan Bernstein. REGRESSION (r86578): Flash content missing from mercurynews.com https://bugs.webkit.org/show_bug.cgi?id=61691 If the plug-in doesn't have access to the toplevel URL, make sure to return *something* to the plug-in. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::tryToShortCircuitInvoke): 2011-05-28 Adam Barth Reviewed by Alexey Proskuryakov. Audit all uses of KURL::prettyURL https://bugs.webkit.org/show_bug.cgi?id=61201 Update callers of prettyURL to just call string. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createPlugin): * WebProcess/WebCoreSupport/qt/WebErrorsQt.cpp: (WebKit::cancelledError): (WebKit::blockedError): 2011-05-27 Stephanie Lewis Unreviewed. Fix a typo in the order_file flag. * Configurations/Base.xcconfig: 2011-05-27 Stephanie Lewis Rubber Stamped by Adam Roben. Add Order File. Use -order_file flag since it can order more of the binary. * Configurations/Base.xcconfig: * mac/WebKit2.order: Added. 2011-05-27 Carlos Garcia Campos Reviewed by Martin Robinson. [CAIRO] Don't copy the surface before drawing it into the context in ShareableBitmap::paint() https://bugs.webkit.org/show_bug.cgi?id=60757 cairo_image_surface_create_for_data() is already a shallow copy of the image, so we don't need to copy it again. * Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::paint): 2011-05-26 Jeff Miller Reviewed by Alexey Proskuryakov. Add a key handling logging channel for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=61588 Added a new LogKeyHandling channel, and logged some key events in WebPageProxy. I also fixed a misspelling of coalescing in a comment in WebPageProxy.cpp. * Platform/Logging.cpp: (WebKit::initializeLogChannelsIfNecessary): Initialize LogKeyHandling channel. * Platform/Logging.h: Added LogKeyHandling channel. * UIProcess/WebPageProxy.cpp: Fixed misspelling of coalescing in a comment. (WebKit::webKeyboardEventTypeString): Added to support logging. (WebKit::WebPageProxy::handleKeyboardEvent): Log the keyboard event. (WebKit::WebPageProxy::didReceiveEvent): Log the keyboard event. 2011-05-26 Chris Fleizach Reviewed by Darin Adler. Safari's AXFocusedUIElement attribute returns WebArea object with AXSelectedTextMarkerRange of nil https://bugs.webkit.org/show_bug.cgi?id=61492 The method for determining which WebPage is actually focused and foreground was faulty. More extensive checks are required to check which WebPage should be returned as the focusable one. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::windowIsFocused): 2011-05-26 Jon Lee Reviewed by Darin Adler. REGRESSION (5.0.5-Jazz): Transition to full screen video animates in wrong location when scrolled (61559) https://bugs.webkit.org/show_bug.cgi?id=61559 The CALayer that gets animated has a position that is offset by the scroll position of the web view. To fix this, we set the destination location based on the rect of the full screen, and add a position animation which keeps the position of the layer centered. This prevents glitches if others are trying to change the layer position while the animation is running. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: Refactor the calculation of the CALayer windowed position into a private helper function, as well as the animation setup. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): (WebKit::WebFullScreenManagerMac::animateFullScreen): Sets up the zoom animation, and the position offset animation. (WebKit::WebFullScreenManagerMac::windowedCGTransform): Calculates the placement of the windowed layer in screen coordinates. 2011-05-26 Qi Zhang Reviewed by Andreas Kling. WebKitTestRunner needs layoutTestController.setAuthorAndUserStylesEnabled https://bugs.webkit.org/show_bug.cgi?id=42676 Implemented layoutTestController.setAuthorAndUserStylesEnabled for WebKitTestRunner. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetAuthorAndUserStylesEnabled): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setAuthorAndUserStylesEnabled): * WebProcess/InjectedBundle/InjectedBundle.h: 2011-05-25 Brian Weinstein Reviewed by Adam Roben. WebKit2: Status bar, toolbar, and menu bar checks should be in the injected bundle https://bugs.webkit.org/show_bug.cgi?id=61474 * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::statusBarIsVisible): Call the function on the client if it exists. (WebKit::InjectedBundlePageUIClient::menuBarIsVisible): Ditto. (WebKit::InjectedBundlePageUIClient::toolbarsAreVisible): Ditto. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::statusbarVisible): Add a possible short-circuit in the injected bundle. (WebKit::WebChromeClient::menubarVisible): Ditto. (WebKit::WebChromeClient::toolbarsVisible): Ditto. 2011-05-26 Steve Falkenburg Reviewed by Adam Roben. WebKit2 bundle missing localization subdirectories https://bugs.webkit.org/show_bug.cgi?id=61512 Better fix for this. We just need to specify CFBundleAllowMixedLocalizations. * win/WebKit2WebProcess.resources/English.lproj: Removed. * win/WebKit2WebProcess.resources/Info.plist: * win/WebKit2WebProcess.resources/da.lproj: Removed. * win/WebKit2WebProcess.resources/de.lproj: Removed. * win/WebKit2WebProcess.resources/es.lproj: Removed. * win/WebKit2WebProcess.resources/fi.lproj: Removed. * win/WebKit2WebProcess.resources/fr.lproj: Removed. * win/WebKit2WebProcess.resources/it.lproj: Removed. * win/WebKit2WebProcess.resources/ja.lproj: Removed. * win/WebKit2WebProcess.resources/ko.lproj: Removed. * win/WebKit2WebProcess.resources/nb.lproj: Removed. * win/WebKit2WebProcess.resources/nl.lproj: Removed. * win/WebKit2WebProcess.resources/pl.lproj: Removed. * win/WebKit2WebProcess.resources/pt.lproj: Removed. * win/WebKit2WebProcess.resources/pt_PT.lproj: Removed. * win/WebKit2WebProcess.resources/ru.lproj: Removed. * win/WebKit2WebProcess.resources/sv.lproj: Removed. * win/WebKit2WebProcess.resources/zh_CN.lproj: Removed. * win/WebKit2WebProcess.resources/zh_TW.lproj: Removed. 2011-05-26 Steve Falkenburg Reviewed by Adam Roben. WebKit2 bundle missing localization subdirectories https://bugs.webkit.org/show_bug.cgi?id=61512 These lproj directories are intentionally left empty. Their presence indicates that this exe is localized to this set of languages. * win/WebKit2WebProcess.resources/English.lproj: Added. * win/WebKit2WebProcess.resources/da.lproj: Added. * win/WebKit2WebProcess.resources/de.lproj: Added. * win/WebKit2WebProcess.resources/es.lproj: Added. * win/WebKit2WebProcess.resources/fi.lproj: Added. * win/WebKit2WebProcess.resources/fr.lproj: Added. * win/WebKit2WebProcess.resources/it.lproj: Added. * win/WebKit2WebProcess.resources/ja.lproj: Added. * win/WebKit2WebProcess.resources/ko.lproj: Added. * win/WebKit2WebProcess.resources/nb.lproj: Added. * win/WebKit2WebProcess.resources/nl.lproj: Added. * win/WebKit2WebProcess.resources/pl.lproj: Added. * win/WebKit2WebProcess.resources/pt.lproj: Added. * win/WebKit2WebProcess.resources/pt_PT.lproj: Added. * win/WebKit2WebProcess.resources/ru.lproj: Added. * win/WebKit2WebProcess.resources/sv.lproj: Added. * win/WebKit2WebProcess.resources/zh_CN.lproj: Added. * win/WebKit2WebProcess.resources/zh_TW.lproj: Added. * win/WebKit2WebProcessPostBuild.cmd: Copy entire resources directory, exclude .svn directories. * win/xcopy.excludes: Added. Excludes .svn directories. 2011-05-25 Qi Zhang Reviewed by Simon Hausmann. WebKitTestRunner needs layoutTestController.setPrivateBrowsingEnabled https://bugs.webkit.org/show_bug.cgi?id=42697 Implemented layoutTestController.setPrivateBrowsingEnabled for WebKitTestRunner. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetPrivateBrowsingEnabled): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setPrivateBrowsingEnabled): * WebProcess/InjectedBundle/InjectedBundle.h: 2011-05-25 Mark Rowe Reviewed by Sam Weinig. Need some way to query user gesture state from injected bundle Add WKBundleIsProcessingUserGesture. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleIsPageBoxVisible): (WKBundleIsProcessingUserGesture): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::isProcessingUserGesture): * WebProcess/InjectedBundle/InjectedBundle.h: 2011-05-24 Jer Noble Reviewed by Darin Adler. Video fails to play on Vimeo https://bugs.webkit.org/show_bug.cgi?id=61403 * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Added support for wkAVAssetResolvedURL and wkQTMovieResolvedURL. 2011-05-25 Jon Honeycutt REGRESSION (WebKit2): Crash in Flash on USA Today photo gallery https://bugs.webkit.org/show_bug.cgi?id=61428 Reviewed by Adam Roben. The crash occurs when Flash posts a message to a window that it creates, and in processing the message, it calls NPN_Evaluate to evaluate JavaScript that removes the plug-in from the page. Flash then crashes when we return to Flash code. * Platform/WorkItem.h: (DerefWorkItem::DerefWorkItem): Initialize m_ptr. (DerefWorkItem::execute): Deref the object. (WorkItem::createDeref): Create and return a DerefWorkItem. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::unprotectPluginFromDestruction): If the PluginView has only one reference left, deref it asynchronously. 2011-05-25 Dan Bernstein Reviewed by Anders Carlsson. REGRESSION (r86851): Plug-ins disappear when scrolled with non-1 page scale https://bugs.webkit.org/show_bug.cgi?id=61448 * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::clipRectInWindowCoordinates): Correct for page scale after intersecting the two rectangles. 2011-05-24 Timothy Hatcher Make the Web Inspector bring the right window to the front when docked. rdar://problem/9464685 https://webkit.org/b/61420 Reviewed by Brian Weinstein. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformBringToFront): Order front the parent window of the Inspector's WKView. * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::platformBringToFront): Ditto. 2011-05-24 Keishi Hattori Reviewed by Kent Tamura. Disable textfield implementation of . Add INPUT_COLOR feature flag. Add input color sanitizer. https://bugs.webkit.org/show_bug.cgi?id=61273 * Configurations/FeatureDefines.xcconfig: Added INPUT_COLOR feature flag. 2011-05-24 Maciej Stachowiak Reviewed by Dan Bernstein. Update the WebProcess sandbox exceptions to silence warnings for a file that is accessed uselessly https://bugs.webkit.org/show_bug.cgi?id=61349 * WebProcess/com.apple.WebProcess.sb: 2011-05-24 Mark Rowe Fix the 32-bit build. Explicitly use uint32_t when encoding / decoding a type that is a typedef of OSType, as this is declared as different underlying types in 32- and 64-bit (unsigned long vs unsigned int). * Shared/mac/KeychainAttribute.cpp: (CoreIPC::encode): (CoreIPC::decode): 2011-05-24 Sam Weinig Reviewed by Maciej Stachowiak. Enable coalesced wheel events * UIProcess/WebPageProxy.cpp: Flip the switch for coalescing wheel events rather than dropping them. 2011-05-24 Sam Weinig Reviewed by Maciej Stachowiak. Additional sandbox extension required for quarantine database https://bugs.webkit.org/show_bug.cgi?id=61405 * WebProcess/com.apple.WebProcess.sb: Add read-data access for ~/Library/Preferences. 2011-05-24 Michael Saboff Reviewed by Geoffrey Garen. Improve handling in WebCore of low memory situations https://bugs.webkit.org/show_bug.cgi?id=61222 Added call to enable memory pressure handling for Mac case. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): * WebProcess/WebProcess.h: * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): 2011-05-24 Brady Eidson Reviewed by Darin Adler. Part of and https://bugs.webkit.org/show_bug.cgi?id=61334 Should shim a few SecKeychainItem* methods on SnowLeopard Initialize the KeychainItem shim on SnowLeopard: * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::initializeShim): On SnowLeopard, shim the 4 SecKeychainItem methods: * WebProcess/mac/WebProcessShim.h: * WebProcess/mac/WebProcessShim.mm: (WebKit::shimSecKeychainItemCopyContent): (WebKit::shimSecKeychainItemCreateFromContent): (WebKit::shimSecKeychainItemModifyContent): (WebKit::shimSecKeychainItemFreeContent): (WebKit::WebKitWebProcessKeychainItemShimInitialize): * WebProcess/mac/KeychainItemShimMethods.h: Added. * WebProcess/mac/KeychainItemShimMethods.mm: Added. Manage a set of shim-controlled AttributeList data: (WebKit::shimManagedAttributeLists): (WebKit::freeAttributeListContents): (WebKit::allocateAttributeListContents): Manage a set of shim-controlled KeychainItem data: (WebKit::shimManagedKeychainItemContents): (WebKit::allocateKeychainItemContentData): Free any shim-controlled AttributeList or KeychainItem data: (WebKit::webFreeAttributeListContentOnMainThread): (WebKit::webFreeAttributeListContent): (WebKit::webFreeKeychainItemContentOnMainThread): (WebKit::webFreeKeychainItemContent): Marshall these 3 KeychainItem methods to the UIProcess: (WebKit::webSecKeychainItemCopyContentOnMainThread): (WebKit::webSecKeychainItemCopyContent): (WebKit::webSecKeychainItemCreateFromContentOnMainThread): (WebKit::webSecKeychainItemCreateFromContent): (WebKit::webSecKeychainItemModifyContentOnMainThread): (WebKit::webSecKeychainItemModifyContent): (WebKit::initializeKeychainItemShim): Container for an AttributeList entry that knows how to encode/decode: * Shared/mac/KeychainAttribute.cpp: Added. (WebKit::KeychainAttribute::KeychainAttribute): (CoreIPC::encode): (CoreIPC::decode): * Shared/mac/KeychainAttribute.h: Added. Container for the relevant arguments to the shimmed methods, to send to the UIProcess: * Shared/mac/SecKeychainItemRequestData.cpp: Added. (WebKit::SecKeychainItemRequestData::SecKeychainItemRequestData): (WebKit::SecKeychainItemRequestData::initializeWithAttributeList): (WebKit::SecKeychainItemRequestData::~SecKeychainItemRequestData): (WebKit::SecKeychainItemRequestData::attributeList): (WebKit::SecKeychainItemRequestData::encode): (WebKit::SecKeychainItemRequestData::decode): * Shared/mac/SecKeychainItemRequestData.h: Added. (WebKit::SecKeychainItemRequestData::keychainItem): (WebKit::SecKeychainItemRequestData::itemClass): (WebKit::SecKeychainItemRequestData::length): (WebKit::SecKeychainItemRequestData::data): Container for the possible output from the shimmed methods, to send back to the WebProcess: * Shared/mac/SecKeychainItemResponseData.cpp: Added. (WebKit::SecKeychainItemResponseData::SecKeychainItemResponseData): (WebKit::SecKeychainItemResponseData::encode): (WebKit::SecKeychainItemResponseData::decode): * Shared/mac/SecKeychainItemResponseData.h: Added. (WebKit::SecKeychainItemResponseData::itemClass): (WebKit::SecKeychainItemResponseData::data): (WebKit::SecKeychainItemResponseData::resultCode): (WebKit::SecKeychainItemResponseData::attributes): (WebKit::SecKeychainItemResponseData::keychainItem): Actually implement the calls to the SecKeychainItem* methods in the UIProcess: * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * UIProcess/mac/WebProcessProxyMac.mm: (WebKit::WebProcessProxy::secKeychainItemCopyContent): (WebKit::WebProcessProxy::secKeychainItemCreateFromContent): (WebKit::WebProcessProxy::secKeychainItemModifyContent): * WebKit2.xcodeproj/project.pbxproj: Project file stuff * Configurations/Shim.xcconfig: 2011-05-24 Jay Civelli Rubberstamped by David Kilzer. Updated some files that I forgot in my previous MHTML CL. * Configurations/FeatureDefines.xcconfig: 2011-05-24 Sam Weinig Clean up after Geoff and fix the WebKit2 build. * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: 2011-05-24 Adam Roben Invalidate JSNPObjects when they are finalized This will cause the underlying NPObject to be released at finalization time, rather than at destruction time (which is unpredictable and could occur after the plugin has been unloaded). Test: plugins/npobject-js-wrapper-destroyed-after-plugin-unload.html Fixes Crash in deallocateNPObject when reloading yahoo.com webarchive in WebKit2 Reviewed by Oliver Hunt. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::~JSNPObject): Assert that we've already been invalidated, rather than trying to perform invalidation now (when the plugin might already be unloaded). * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::getOrCreateJSObject): (WebKit::NPRuntimeObjectMap::invalidate): Updated for m_jsNPObjects type change. (WebKit::NPRuntimeObjectMap::finalize): Added. Invalidates the JSNPObject and removes it from the map. * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: Now inherits from WeakHandleOwner. Changed m_jsNPObjects from a WeakGCMap to a HashMap of JSC::Weak objects so that we will be notified when the JSNPObjects are finalized. 2011-05-24 Qi Zhang Reviewed by Adam Roben. WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard https://bugs.webkit.org/show_bug.cgi?id=42669 Fixes a typo issue for patch 94265. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetJavaScriptCanAccessClipboard): 2011-05-24 Sam Weinig Reviewed by John Sullivan. WebKit tells client that the page has become unresponsive while the beforeUnloadConfirm dialog is up https://bugs.webkit.org/show_bug.cgi?id=61372 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::runBeforeUnloadConfirmPanel): Stop the unresponsiveness timer like we do for other client functions that spin a runloop. 2011-05-24 Andreas Kling Reviewed by Simon Hausmann. [WK2] Change TiledDrawingArea to use ShareableBitmap instead of UpdateChunk. https://bugs.webkit.org/show_bug.cgi?id=61296 Pass UpdateInfo containing ShareableBitmaps instead of UpdateChunk for tile updates. Only the bounds rect and bitmap handle in the UpdateInfo are used since none of the other parameters are needed for TiledDrawingArea. * Shared/ShareableBitmap.h: * Shared/qt/ShareableBitmapQt.cpp: (WebKit::ShareableBitmap::createQImage): (WebKit::ShareableBitmap::createGraphicsContext): (WebKit::ShareableBitmap::paint): * Shared/qt/UpdateChunk.cpp: Removed. * Shared/qt/UpdateChunk.h: Removed. * UIProcess/TiledDrawingAreaProxy.cpp: (WebKit::TiledDrawingAreaProxy::didReceiveMessage): (WebKit::TiledDrawingAreaProxy::waitUntilUpdatesComplete): * UIProcess/TiledDrawingAreaProxy.h: * UIProcess/TiledDrawingAreaTile.h: * UIProcess/qt/TiledDrawingAreaProxyQt.cpp: (WebKit::TiledDrawingAreaProxy::snapshotTaken): * UIProcess/qt/TiledDrawingAreaTileQt.cpp: (WebKit::TiledDrawingAreaTile::incorporateUpdate): * WebKit2.pro: * WebProcess/WebPage/TiledDrawingArea.cpp: (WebKit::TiledDrawingArea::updateTile): (WebKit::TiledDrawingArea::didReceiveMessage): * WebProcess/WebPage/TiledDrawingArea.h: * WebProcess/WebPage/qt/TiledDrawingAreaQt.cpp: (WebKit::TiledDrawingArea::paintIntoBitmap): 2011-05-24 Brady Eidson Build fix after r87153 * WebProcess/mac/SecItemShimMethods.mm: Don't compile this code on SnowLeopard. 2011-05-23 Brady Eidson Reviewed by Sam Weinig. Part of and https://bugs.webkit.org/show_bug.cgi?id=61334 Should shim a few SecKeychainItem* methods on SnowLeopard In preparation for different WebProcess shims depending on platform, move the current shim to its own files. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::initializeShim): For non-SnowLeopard platforms, call initializeSecItemShim(). * WebProcess/mac/SecItemShimMethods.h: Added. * WebProcess/mac/SecItemShimMethods.mm: Added. Actual webSecItem* methods moved from WebProcessMac.mm. (WebKit::webSecItemCopyMatchingMainThread): (WebKit::webSecItemCopyMatching): (WebKit::webSecItemAddOnMainThread): (WebKit::webSecItemAdd): (WebKit::webSecItemUpdateOnMainThread): (WebKit::webSecItemUpdate): (WebKit::webSecItemDeleteOnMainThread): (WebKit::webSecItemDelete): (WebKit::initializeSecItemShim): Initialize the callbacks via WebKitWebProcessSecItemShimInitialize * WebProcess/mac/WebProcessShim.h: * WebProcess/mac/WebProcessShim.mm: Wrap all the actual code here in a !BUILDING_ON_SNOW_LEOPARD block (WebKit::shimSecItemCopyMatching): (WebKit::shimSecItemAdd): (WebKit::shimSecItemUpdate): (WebKit::shimSecItemDelete): (WebKit::WebKitWebProcessSecItemShimInitialize): 2011-05-23 Anders Carlsson Reviewed by Sam Weinig. Cap painting to 30fps on Windows https://bugs.webkit.org/show_bug.cgi?id=61337 * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::displayTimerFired): 2011-05-23 Jeremy Noble Reviewed by Darin Adler. REGRESSION (r86990:86992): World leak when all windows closed https://bugs.webkit.org/show_bug.cgi?id=61311 Three interlocking problems: 1) Calling [WKView fullScreenController] will create the controller if it doesn't all ready exist, so move the closing code into WKView, where we can bail early if there isn't a controller. 2) A retain-cycle exists between WKView and WKFullScreenWindowController. Make sure to break the cycle explicitly by clearing the _fullScreenWindowController ivar when closing the controller. 3) [NSWindowController close] was overridden without calling [super close]. Do that. * UIProcess/API/mac/WKView.mm: (-[WKView closeFullScreenWindowController]): Moved here from WebFullScreenManagerProxyMac.mm. * UIProcess/API/mac/WKViewInternal.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController close]): Call [super close]. * UIProcess/mac/WebFullScreenManagerProxyMac.mm: (WebKit::WebFullScreenManagerProxy::invalidate): 2011-05-20 Jer Noble Reviewed by Darin Adler. Video looks squished when animating to full screen. https://bugs.webkit.org/show_bug.cgi?id=61220 Instead of scaling between the client sizes of the full-screen element before and after entering full-screen, scale between their content boxes. The difference is that the client sizes can have different aspect ratios, and thus the animation can end up "squishing" the content at one end of the animation. When animating between the two content box sizes, their aspect ratios (for the case of video) are equal, so the animation will appear to scale smoothly between the two states without "squishing" the content. * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): Set the destination frame to be the content box of the current full screen element. (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): Ditto. 2011-05-23 Sam Weinig Reviewed by Darin Adler. Terminating a WebProcess should work even while a page is being closed https://bugs.webkit.org/show_bug.cgi?id=61299 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::terminateProcess): Change validity check to only check for process validity, since terminating the process of a page that is closed or is closing is acceptable behavior. 2011-05-23 Jessie Berlin Reviewed by Darin Adler. [Windows] Initial Cookie Accept Policy not set on Deserialized Storage Session. https://bugs.webkit.org/show_bug.cgi?id=61255 * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformInitializeWebProcess): Move the code to set the cookie policy before the early return that is taken when using the default storage session from the UI Process. Also, remove unnecessary #ifdefs (USE(CFURLSTORAGESESSIONS) is true if USE(CFNETWORK) is true) and add a comment explaining the early return. 2011-05-23 Qi Zhang Reviewed by Darin Adler. WebKitTestRunner needs layoutTestController.setJavaScriptCanAccessClipboard https://bugs.webkit.org/show_bug.cgi?id=42669 Implement setJavaScriptCanAccessClipboard in WebKitTestRunner. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetJavaScriptCanAccessClipboard): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setJavaScriptCanAccessClipboard): * WebProcess/InjectedBundle/InjectedBundle.h: 2011-05-23 Csaba Osztrogonác [Qt][WK2] Unreviewed trivial fix after r86990. * WebKit2.pro: Remove UIProcess/ChunkedUpdateDrawingAreaProxy.h. 2011-05-23 Carlos Garcia Campos Unreviewed. Fix WebKit2 GTK build after r86990. * GNUmakefile.am: Remove UpdateChunk.cpp and UpdateChunk.h. 2011-05-21 John Sullivan Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=61244 Undo operations for a web page linger after page is destroyed * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::closePage): Clear editing commands before telling UI client to close the page (this must be done while the page is still in a window so its undo manager can be accessed, so waiting for WebPageProxy::close() is too late). 2011-05-22 Jeff Miller Reviewed by Darin Adler. Don't call WebKit::initializeLogChannelsIfNecessary if logging is disabled https://bugs.webkit.org/show_bug.cgi?id=61249 * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): Check #if !LOG_DISABLED, not #ifndef NDEBUG, to decide whether to call WebKit::initializeLogChannelsIfNecessary(). 2011-05-21 Nancy Piedra Reviewed by Andreas Kling. [Qt][Symbian] WKStringCopyQString function is not exported https://bugs.webkit.org/show_bug.cgi?id=59285 A few functions were declared twice but without the export macro. On Symbian, the linking failed when trying to reference these functions. * UIProcess/API/qt/qgraphicswkview.h: 2011-05-21 Jeremy Noble Reviewed by Eric Carlson. WebKit2: fix failing fullscreen/full-screen-remove* tests. https://bugs.webkit.org/show_bug.cgi?id=61027 * WebProcess/InjectedBundle/InjectedBundlePageFullScreenClient.cpp: (WebKit::InjectedBundlePageFullScreenClient::exitFullScreenForElement): Call the exit functions (was calling the enter functions). 2011-05-20 Jeremy Noble Reviewed by Mark Rowe. Crash in WebFullScreenManager::didExitFullScreen when closing a window in Safari. https://bugs.webkit.org/show_bug.cgi?id=61228 Do not attempt to exit full screen if we aren't in full screen to begin with, as the WebProcess won't be expecting will/didExitFullScreen notifications. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController close]): 2011-05-20 Andy Estes Reviewed by Darin Adler. WebView loses firstResponder status when entering full-screen mode. https://bugs.webkit.org/show_bug.cgi?id=61153 * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): If the WebView was a descendant of the browser window's first responder when entering full-screen mode, set the full-screen window's first responder to that same NSResponder. (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Do the reverse of what is done in finishedEnterFullScreenAnimation:. 2011-05-20 Jeremy Noble Reviewed by Maciej Stachowiak. WebKit2: Exit full screen mode if the WebProcess crashes. https://bugs.webkit.org/show_bug.cgi?id=61151 If the WebProcess crashes, exit full-screen mode to avoid getting stuck. Move the WebFullScreenManagerProxy::invalidate() implementation into the platform-specific files, and have them close their respective platform's full-screen window. * UIProcess/WebFullScreenManagerProxy.cpp: * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp: (WebKit::WebFullScreenManagerProxy::invalidate): Added. Copied from main implementation. * UIProcess/mac/WKFullScreenWindowController.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController close]): Added. * UIProcess/mac/WebFullScreenManagerProxyMac.mm: (WebKit::WebFullScreenManagerProxy::invalidate): Added. * UIProcess/win/WebFullScreenManagerProxyWin.cpp: (WebKit::WebFullScreenManagerProxy::invalidate): Added. 2011-05-20 Anders Carlsson Reviewed by Dan Bernstein. Remove the chunked update drawing area https://bugs.webkit.org/show_bug.cgi?id=61216 The chunked update drawing area is no longer used in any port, so remove all traces of it. Qt still uses UpdateChunks for the tiled drawing area so keep the Shared/qt/UpdateChunk.* classes for now. * GNUmakefile.am: * Shared/DrawingAreaInfo.h: * Shared/gtk/UpdateChunk.cpp: Removed. * Shared/gtk/UpdateChunk.h: Removed. * Shared/mac/UpdateChunk.cpp: Removed. * Shared/mac/UpdateChunk.h: Removed. * Shared/win/UpdateChunk.cpp: Removed. * Shared/win/UpdateChunk.h: Removed. * UIProcess/ChunkedUpdateDrawingAreaProxy.cpp: Removed. * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Removed. * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp: Removed. * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm: Removed. * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp: Removed. * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp: Removed. * UIProcess/win/WebView.cpp: (WebKit::WebView::paint): (WebKit::WebView::createDrawingAreaProxy): (WebKit::WebView::enterAcceleratedCompositingMode): (WebKit::WebView::exitAcceleratedCompositingMode): * WebKit2.pro: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebPage/ChunkedUpdateDrawingArea.cpp: Removed. * WebProcess/WebPage/ChunkedUpdateDrawingArea.h: Removed. * WebProcess/WebPage/DrawingArea.cpp: (WebKit::DrawingArea::create): * WebProcess/WebPage/mac/ChunkedUpdateDrawingAreaMac.cpp: Removed. * WebProcess/WebPage/qt/ChunkedUpdateDrawingAreaQt.cpp: Removed. * WebProcess/WebPage/win/ChunkedUpdateDrawingAreaWin.cpp: Removed. * win/WebKit2.vcproj: 2011-05-20 Matthew Delaney Reviewed by Steve Falkenburg. Default min DOM Timer interval is not set soon enough for first page to pick it up in WK2 https://bugs.webkit.org/show_bug.cgi?id=61215 * WebProcess/WebPage/WebPage.cpp: Simply moving the DOM min timer interval setting to before the first page creation. 2011-05-20 Simon Fraser Reviewed by Sam Weinig. numberOfActiveAnimations() can include animations from documents in the page cache https://bugs.webkit.org/show_bug.cgi?id=53641 Pass the Frame's document as the one to count animations on. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::numberOfActiveAnimations): 2011-05-20 Simon Fraser Reviewed by Sam Weinig. WebKitTestRunner needs layoutTestController.pauseTransitionAtTimeOnElementWithId https://bugs.webkit.org/show_bug.cgi?id=42550 Plumb through methods to pause a transition of a given property on an element. * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: (WKBundleFramePauseAnimationOnElementWithId): (WKBundleFramePauseTransitionOnElementWithId): * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::pauseTransitionOnElementWithId): * WebProcess/WebPage/WebFrame.h: 2011-05-20 Sam Weinig Reviewed by Anders Carlsson. WebKit2: Media files cannot be saved in the Application Cache due to a sandbox violation https://bugs.webkit.org/show_bug.cgi?id=61199 Instead of using a sandbox extension to give permission to the application cache directory, initialize the sandbox with access to it like we do for other databases. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureWebProcess): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): * WebProcess/com.apple.WebProcess.sb: * WebProcess/mac/WebProcessMac.mm: (WebKit::initializeSandbox): 2011-05-20 Jer Noble Reviewed by Maciej Stachowiak. Win: non-full-screen content is briefly seen when entering full-screen mode (and vice versa) https://bugs.webkit.org/show_bug.cgi?id=61108 When the fullScreenController asks us to repaint, make an async repaint request, and when the callback is fired, notify the fullScreenController that repaint has completed. * UIProcess/win/WebView.cpp: (WebKit::fullScreenClientForceRepaintCompleted): Added. (WebKit::WebView::fullScreenClientForceRepaint): Added. * UIProcess/win/WebView.h: 2011-05-19 Adam Roben Don't try to process DownloadProxy messages twice (and robustify code that runs if we do) Fixes REGRESSION (r86812): Crash (preceded by assertion) in fastMalloc when downloading a file Reviewed by Darin Adler. * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::alignedBufferIsLargeEnoughToContain): Added. This helper function checks that the given buffer is large enough to hold |size| bytes (and correctly handles the case where we're already at the end or beyond the end of the buffer). (CoreIPC::ArgumentDecoder::alignBufferPosition): (CoreIPC::ArgumentDecoder::bufferIsLargeEnoughToContain): Replaced old code that was vulnerable to underflow with the new helper function. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveSyncMessage): Added back an early return that was mistakenly removed in r86812 so that we don't mistakenly pass DownloadProxy messages on to a WebPageProxy after we've already handled them. 2011-05-19 Jer Noble Reviewed by Maciej Stachowiak. WebKit2: Flashing when entering and exiting full screen mode https://bugs.webkit.org/show_bug.cgi?id=56957 In the WKFullscreenWindowController, when exiting accelerated compositing mode, force a repaint, and don't actually remove the animation layer until the repaint completes. Also, move back to parenting the WebView in a layer-backed view, and work around the SnowLeopard bug which causes a crash in those situations. We no longer need to do a bunch of work in finishedEnterFullScreenAnimation, because the animation layer is "hiding" all the drawing happening in the webView underneath. In the WebFullScreenManagerMac, when asked to tear down the root layer, instead remove all its children, and set its contents to a flattened image of the full screen element and its children. This helps patch over the time where everything is re-rendering and helps give the appearance of continuousness in the animation. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): (-[WKFullScreenWindowController beganExitFullScreenAnimation]): (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): (-[WKFullScreenWindowController exitAcceleratedCompositingMode]): (-[WKFullScreenWindowController exitCompositedModeRepaintCompleted]): (exitCompositedModeRepaintCompleted): (-[WKFullScreenWindowController _page]): (-[WKFullScreenWindowController _manager]): (-[WKFullScreenWindow initWithContentRect:styleMask:backing:defer:]): * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): 2011-05-19 Anders Carlsson Address a review comment by Sam Weinig. * UIProcess/WebContext.cpp: (WebKit::WebContext::didUpdateHistoryTitle): 2011-05-19 Anders Carlsson Reviewed by Sam Weinig. Hang UI appears when WebProcess isn't running https://bugs.webkit.org/show_bug.cgi?id=61147 This fixes two bugs: 1. The HistoryClient related message handlers in WebContext could get invoked for pages that have been closed, and thus didn't have any subframes. Since we have a MESSAGE_CHECK that checks that the frame exists, we'd mark the currently dispatched message as invalid, which would end up calling Connection::Client::didReceiveInvalidMessage. Fix this by checking that the page exists first. 2. In the call to WebProcessProxy::didReceiveInvalidMessage we'd first invalidate the CoreIPC connection to make sure that we won't get any further messages from this connection. We'd then go ahead and terminate the web process, but because we've already invalidated the CoreIPC connection we would never get the Connection::Client::didClose callback that would call WebPageProxy::processDidCrash. Fix this by explicitly calling WebProcessProxy::didClose. Also, add logging when we receive an invalid message * UIProcess/WebContext.cpp: (WebKit::WebContext::didNavigateWithNavigationData): (WebKit::WebContext::didPerformClientRedirect): (WebKit::WebContext::didPerformServerRedirect): (WebKit::WebContext::didUpdateHistoryTitle): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveInvalidMessage): 2011-05-19 Brian Weinstein Reviewed by Adam Roben. Crash when detaching Web Inspector when parent is in process of closing. https://bugs.webkit.org/show_bug.cgi?id=61141 We were trying to send a WM_SIZE to a window that was in the process of closing. Switch to using PostMessage, so the window will finish closing, and then it won't need to process the WM_SIZE message anymore. * UIProcess/win/WebInspectorProxyWin.cpp: (WebKit::WebInspectorProxy::platformAttach): Call PostMessage instead of SendMessage. (WebKit::WebInspectorProxy::platformDetach): Ditto. 2011-05-19 Robert Hogan Reviewed by Andreas Kling. [Qt] Fix plugins/windowless_plugin_paint_test.html Call gdk_init_check before gdk_display_get_default(). If we don't do this, gdk_display_get_default() will hang the next time it's called. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::getPluginDisplay): 2011-05-18 Chris Marrin Reviewed by Anders Carlsson. Plug-ins at YouTube, cnn.com, nytimes vanish when their top/left is scrolled out of view when zoomed https://bugs.webkit.org/show_bug.cgi?id=61101 Scale both bounding boxes sent to m_plugin->geometryDidChange(), not just the frameRect. This fools the plugin into thinking it is drawing into an unscaled box with an unscaled view even when scaled. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::frame):Made this const so it can be used in clipRectInWindowCoordinates() (WebKit::PluginView::viewGeometryDidChange):Used IntRect::scale() rather than scaling by hand (WebKit::PluginView::clipRectInWindowCoordinates):Added scale of clipRect. * WebProcess/Plugins/PluginView.h: 2011-05-19 Carlos Garcia Campos Reviewed by Anders Carlsson. Fix build with ENABLE_PLUGIN_PROCESS=1 for non-mac platforms after r86578 https://bugs.webkit.org/show_bug.cgi?id=61113 * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::tryToShortCircuitInvoke): (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate): 2011-05-19 Philippe Normand Unreviewed, follow-up fix of the messages python unittests after r86812. [WebKit2] handleMessageDelayed leaks replyEncoder if decoding fails https://bugs.webkit.org/show_bug.cgi?id=60872 * Scripts/webkit2/messages_unittest.py: 2011-05-18 Brady Eidson As originally reviewed by Anders Carlsson. and https://bugs.webkit.org/show_bug.cgi?id=61009 Processes spawned by SnowLeopard's WebProcess attempt to install WebKit2 shims. Restore r86797 to how it was supposed to be using the appropriate #ifdef, reverting the temporary r86814 in the process. The #ifdef is BUILDING_ON_SNOW_LEOPARD, not BUILDING_ON_SNOWLEOPARD! * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::ProcessLauncher::launchProcess): * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): 2011-05-18 Brady Eidson Fix the WK2 SnowLeopard layouttests (again) until I can explore on a SnowLeopard machine tomorrow. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::ProcessLauncher::launchProcess): * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): 2011-05-18 Darin Adler Reviewed by Anders Carlsson. [WebKit2] handleMessageDelayed leaks replyEncoder if decoding fails https://bugs.webkit.org/show_bug.cgi?id=60872 Eliminate the concept of SyncReplyMode and instead hand around ownership of the reply decoder using an OwnPtr. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::dispatchSyncMessage): Eliminated comments that say the same things the code itself does. Removed code that handles the reply mode. Instead, pass the OwnPtr to the message handling function and make the call to sendSyncReply conditional on whether the reply encoder is still non-null. * Platform/CoreIPC/Connection.h: Removed SyncReplyMode. Made didReceiveSyncMessage return void, and take OwnPtr& for the reply encoder. * Platform/CoreIPC/HandleMessage.h: (CoreIPC::handleMessageDelayed): Take an OwnPtr&. Replaced the call to adoptPtr with a call to release. * PluginProcess/PluginControllerProxy.h: Updated to take an OwnPtr& and not return SyncReplyMode. * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::didReceiveSyncMessage): Ditto. * PluginProcess/WebProcessConnection.h: Ditto. * Scripts/webkit2/messages.py: Updated for changes to sync messages. Eliminated unneeded return types and use get() when apporopriate to call the handleMessage functions. * Scripts/webkit2/messages_unittest.py: Tried to update this too. I don't know how to run the test, though. * Shared/Plugins/NPObjectMessageReceiver.h: Updated to take an OwnPtr& and not return SyncReplyMode. * Shared/Plugins/NPRemoteObjectMap.cpp: (WebKit::NPRemoteObjectMap::didReceiveSyncMessage): Ditto. * Shared/Plugins/NPRemoteObjectMap.h: Ditto. * UIProcess/Downloads/DownloadProxy.h: Ditto. * UIProcess/WebContext.cpp: (WebKit::WebContext::didReceiveSyncMessage): Ditto. * UIProcess/WebContext.h: Ditto. * UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::didReceiveSyncMessage): Ditto. * UIProcess/WebFullScreenManagerProxy.h: Ditto. * UIProcess/WebIconDatabase.cpp: (WebKit::WebIconDatabase::didReceiveSyncMessage): Ditto. * UIProcess/WebIconDatabase.h: Ditto. * UIProcess/WebInspectorProxy.h: Ditto. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveSyncMessage): Ditto. * UIProcess/WebPageProxy.h: Ditto. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveSyncMessage): Ditto. * UIProcess/WebProcessProxy.h: Ditto. * WebProcess/Plugins/Netscape/JSNPObject.cpp: Added a missing include. * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::PluginProcessConnection::didReceiveSyncMessage): Updated to take an OwnPtr& and not return SyncReplyMode. * WebProcess/Plugins/PluginProcessConnection.h: Ditto. * WebProcess/Plugins/PluginProxy.h: Ditto. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didReceiveSyncMessage): Ditto. * WebProcess/WebPage/WebPage.h: Ditto. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveSyncMessage): Ditto. * WebProcess/WebProcess.h: Ditto. 2011-05-18 Chris Fleizach Reviewed by Maciej Stachowiak. WK2: VoiceOver cannot move focus into a web area programmatically https://bugs.webkit.org/show_bug.cgi?id=60661 Add a makeFirstResponder method that will bring focus to the widget view within the UI process. * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::makeFirstResponder): * UIProcess/PageClient.h: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::makeFirstResponder): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::makeFirstResponder): * WebProcess/WebCoreSupport/WebChromeClient.h: 2011-05-18 Brady Eidson Reviewed by Anders Carlsson. and https://bugs.webkit.org/show_bug.cgi?id=61009 Processes spawned by SnowLeopard's WebProcess attempt to install WebKit2 shims. * Platform/unix/EnvironmentUtilities.cpp: Remove an unnecessary #include, as reviewed. 2011-05-17 Timothy Hatcher Update the the context menu to reflect the system search provider on Mac. Reviewed by Sam Weinig. * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: (WebKit::WebContextMenuClient::searchWithGoogle): Add a FIXME about using NSPerformService on Mac. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Added CopyDefaultSearchProviderDisplayName. 2011-05-18 Brady Eidson Reviewed by Anders Carlsson. and https://bugs.webkit.org/show_bug.cgi?id=61009 Processes spawned by SnowLeopard's WebProcess attempt to install WebKit2 shims. If the WebProcess or PluginProcess forks, it shouldn't pass WebKit2 shims along to the new process in the DYLD_INSERT_LIBRARIES environment variable. Add Environment Utilities helper to strip unwanted values from an environment variable: * Platform/unix/EnvironmentUtilities.cpp: Added. (WebKit::EnvironmentUtilities::stripValuesEndingWithString): * Platform/unix/EnvironmentUtilities.h: Added. * WebKit2.xcodeproj/project.pbxproj: Strip PluginProcessShim.dylib from DYLD_INSERT_LIBRARIES: * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): Strip WebProcessShim.dylib from DYLD_INSERT_LIBRARIES: * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): Unprotect SnowLeopard now that it will behave and not spawn processes trying to use WebKit2 shims: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::ProcessLauncher::launchProcess): 2011-05-18 Jon Lee Reviewed by Simon Fraser. Crash in injected bundle client https://bugs.webkit.org/show_bug.cgi?id=61086 * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::shouldRubberBandInDirection): Check for existence of method in client prior to calling. 2011-05-18 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt][WK2] Remove usage of ChunkedUpdateDrawingArea. https://bugs.webkit.org/show_bug.cgi?id=60901 To prepare for the eventual removal of the ChunkedUpdateDrawingArea, make QGraphicsWKView's "Simple" backing store type map to DrawingAreaImpl. * UIProcess/API/qt/qgraphicswkview.cpp: * UIProcess/API/qt/qgraphicswkview.h: * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::createDrawingAreaProxy): 2011-05-18 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt][WK2] Don't lie about supporting accelerated compositing. https://bugs.webkit.org/show_bug.cgi?id=61054 Until we have an implementation of LayerTreeHost, we shouldn't lie about it. * WebKit2.pro: * WebProcess/WebPage/LayerTreeHost.h: * WebProcess/WebPage/qt/LayerTreeHostQt.cpp: Added. (WebKit::LayerTreeHost::supportsAcceleratedCompositing): 2011-05-17 Jeremy Noble Reviewed by Darin Adler. Exiting full screen will leave up invisible full-screen window, blocking all mouse clicks. https://bugs.webkit.org/show_bug.cgi?id=60982 The GraphicsLayer tree has unparented m_fullScreenRootLayer behind our backs, replacing the tiled layer with a normal one. Instead of holding on to a specific layer, assume that the w_rootLayer will only have 0 or 1 children, and if a child is present, then that is our full- screen layer. Additionally, check to see if the animating layer's presentationLayer is nil before calling it; asking a nil object for a CATransform3D will give back a struct full of garbage. In WKFullScreenWindowController, when the exit animation completes, ignore the "completed" parameter. This eliminates the possibility that the full screen window will end up left on top of the screen if the animation is cancelled and a enter full screen animation isn't forthcoming. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): 2011-05-17 Dan Bernstein Reviewed by Alice Liu. REGRESSION (r86724): Repro crash loading any webpage in WebKit2 on SnowLeopard https://bugs.webkit.org/show_bug.cgi?id=61022 * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): As long as we are not loading the shim on Snow Leopard, we should not try to initialize it. 2011-05-17 Brady Eidson Rubberstamped by Sam Weinig. https://bugs.webkit.org/show_bug.cgi?id=60595 Fix the rampant WebProcess crashing because we're trying to install the WebProcess shim into QTKitServer when we launch it. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::ProcessLauncher::launchProcess): This is only happening on SnowLeopard, so put SnowLeopard build guards around the shim install path. 2011-05-17 Sheriff Bot Unreviewed, rolling out r86668. http://trac.webkit.org/changeset/86668 https://bugs.webkit.org/show_bug.cgi?id=61001 It made 52 tests crash on Qt WK2 bot (Requested by Ossy on #webkit). * UIProcess/API/qt/qgraphicswkview.cpp: * UIProcess/API/qt/qgraphicswkview.h: * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::createDrawingAreaProxy): 2011-05-17 Brian Weinstein Build fix after r86717. * UIProcess/API/C/win/WKView.h: Add a forward declaration of IDropTarget 2011-05-17 Brian Weinstein Reviewed by Adam Roben. WebKit2: Needs API to set a custom drop target https://bugs.webkit.org/show_bug.cgi?id=60991 Add API to set a custom drop target on a WKView. * UIProcess/API/C/win/WKView.cpp: (WKViewSetCustomDropTarget): Call through to WebView::setCustomDropTarget. * UIProcess/API/C/win/WKView.h: * UIProcess/win/WebView.cpp: (WebKit::WebView::setCustomDropTarget): Revoke the current drop target, and register the custom one. * UIProcess/win/WebView.h: 2011-05-17 Sam Weinig Reviewed by Dan Bernstein. Add API to determine if a frame has any form elements without going to javascript https://bugs.webkit.org/show_bug.cgi?id=60999 * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: (WKBundleFrameContainsAnyFormElements): * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::containsAnyFormElements): * WebProcess/WebPage/WebFrame.h: Add WKBundleFrameContainsAnyFormElements which does a walk of the document to determine if there are any form elements. 2011-05-17 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt][WK2] Initial support for favicons. https://bugs.webkit.org/show_bug.cgi?id=58937 Add the following API to QWKContext: - void setIconDatabasePath(QString) - void iconChangedForPageURL(QUrl) [signal] - QIcon iconForPageURL(QUrl) This is mostly analogous to the QWebSettings/QWebFrame icon API we had in WebKit1. * UIProcess/API/qt/ClientImpl.h: Added WKIconDatabaseClient methods. * UIProcess/API/qt/ClientImpl.cpp: (toQWKContext): Helper to cast from "void* clientInfo" to a QWKContext*. (qt_wk_didChangeIconForPageURL): Emits QWKContext::iconChangedForPageURL(QUrl). (qt_wk_didRemoveAllIcons): Stub. * UIProcess/API/qt/qwkcontext.h: * UIProcess/API/qt/qwkcontext_p.h: * UIProcess/API/qt/qwkcontext.cpp: (QWKContextPrivate::QWKContextPrivate): Set up and register a WKIconDatabaseClient. (QWKContext::QWKContext): Minor refactor to avoid code duplication in constructors. (QWKContext::setIconDatabasePath): Exactly what it sounds like. (QWKContext::iconForPageURL): Retrieves the favicon for a given page URL as a QIcon. * WebKit2API.pri: Add WKIconDatabase.cpp and WKIconDatabase.h to build. 2011-05-17 Brady Eidson Reviewed by Anders Carlsson. Part 4 of and https://bugs.webkit.org/show_bug.cgi?id=60595 Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess This patch actually hooks up the shim to the WebProcess shim callbacks, which messages these 4 calls up to the UIProcess and returns the result. Note that this patch uncovered the fact that CoreIPC can't sync message out from a secondary thread, so I filed https://bugs.webkit.org/show_bug.cgi?id=60975 as a followup to allow that. * Shared/mac/SecItemResponseData.cpp: (WebKit::SecItemResponseData::SecItemResponseData): Reorder the constructor arguments to be a little cleaner. * Shared/mac/SecItemResponseData.h: Call the shim callbacks for each method: * WebProcess/mac/WebProcessShim.mm: (WebKit::shimSecItemCopyMatching): (WebKit::shimSecItemAdd): (WebKit::shimSecItemUpdate): (WebKit::shimSecItemDelete): Implement the shim callbacks, which each marshall to the main thread, which then calls out to CoreIPC: * WebProcess/mac/WebProcessMac.mm: (WebKit::WebSecItemCopyMatchingMainThread): (WebKit::WebSecItemCopyMatching): (WebKit::WebSecItemAddOnMainThread): (WebKit::WebSecItemAdd): (WebKit::WebSecItemUpdateOnMainThread): (WebKit::WebSecItemUpdate): (WebKit::WebSecItemDeleteOnMainThread): (WebKit::WebSecItemDelete): Add the 4 messages and their implementations in the UIProcess: * UIProcess/WebProcessProxy.h: * UIProcess/WebProcessProxy.messages.in: * UIProcess/mac/WebProcessProxyMac.mm: Added. (WebKit::WebProcessProxy::secItemCopyMatching): (WebKit::WebProcessProxy::secItemAdd): (WebKit::WebProcessProxy::secItemUpdate): (WebKit::WebProcessProxy::secItemDelete): * WebKit2.xcodeproj/project.pbxproj: 2011-05-17 Anders Carlsson Reviewed by Dan Bernstein. Incomplete page painting at dropbox.com https://bugs.webkit.org/show_bug.cgi?id=60974 When we're exiting compositing mode and haven't sent an EnterAcceleratedCompositingMode message to the UI process, we still need to send the updated bits to the ui process. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::exitAcceleratedCompositingMode): 2011-05-17 Brady Eidson Reviewed by Anders Carlsson. Part 3 of and https://bugs.webkit.org/show_bug.cgi?id=60595 Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess Add CoreIPC stuff we'll need to marshall the SecItem calls to the UIProcess and back. Teach ArgumentCodersCF about CFDateRef, SecKeychainItemRef, and generic CFTypeRefs: * Shared/cf/ArgumentCodersCF.cpp: (CoreIPC::typeFromCFTypeRef): (CoreIPC::encode): (CoreIPC::decode): * Shared/cf/ArgumentCodersCF.h: Serializable object that contains the query CFDictionaryRef and optionally the "attributesToMatch" CFDictionaryRef: * Shared/mac/SecItemRequestData.cpp: Added. (WebKit::SecItemRequestData::SecItemRequestData): (WebKit::SecItemRequestData::encode): (WebKit::SecItemRequestData::decode): * Shared/mac/SecItemRequestData.h: Added. (WebKit::SecItemRequestData::query): (WebKit::SecItemRequestData::attributesToMatch): Serializable object that returns an OSStatus and optionally a "result object" CFTypeRef: * Shared/mac/SecItemResponseData.cpp: Added. (WebKit::SecItemResponseData::SecItemResponseData): (WebKit::SecItemResponseData::encode): (WebKit::SecItemResponseData::decode): * Shared/mac/SecItemResponseData.h: Added. (WebKit::SecItemResponseData::resultObject): (WebKit::SecItemResponseData::resultCode): * WebKit2.xcodeproj/project.pbxproj: 2011-05-17 Brady Eidson Reviewed by Anders Carlsson. Part 2 of and https://bugs.webkit.org/show_bug.cgi?id=60595 Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess Hookup some of the methods we plan to shim in the patch, but just have them call through to the actual implementations for now. Also stub-out the future shimmed versions of the methods. * WebProcess/mac/WebProcessShim.h: Add the methods to the shim callbacks. * WebProcess/mac/WebProcessShim.mm: (WebKit::shimSecItemCopyMatching): Call through to the actual function for now. (WebKit::shimSecItemAdd): Ditto. (WebKit::shimSecItemUpdate): Ditto. (WebKit::shimSecItemDelete): Ditto. (WebKit::WebKitWebProcessShimInitialize): Copy over the shim callbacks. * WebKit2.xcodeproj/project.pbxproj: Link the shim to required frameworks. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebSecItemCopyMatching): Add placeholders for the future to-be-shimmed functions. (WebKit::WebSecItemAdd): Ditto. (WebKit::WebSecItemUpdate): Ditto. (WebKit::WebSecItemDelete): Ditto. (WebKit::WebProcess::initializeShim): Pass along those placeholders to the shim initializer. 2011-05-17 Brady Eidson Reviewed by Anders Carlsson. Part 1 of and https://bugs.webkit.org/show_bug.cgi?id=60595 Mac WebKit2 WebProcess needs a shim to make prompts appear to be from the UIProcess Add am empty shim for a new WebProcess shim and install it at launch. Use the same Shim.xcconfig for both the web and plugin processes: * Configurations/PluginProcessShim.xcconfig: Removed. * Configurations/Shim.xcconfig: Copied from Configurations/PluginProcessShim.xcconfig. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebProcess.h: Add initializeShim() for Mac-only * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::initializeShim): Initialize the (empty) shim callbacks. * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): Call initializeShim() * WebProcess/mac/WebProcessShim.h: Added. * WebProcess/mac/WebProcessShim.mm: Added. (WebKit::WebKitWebProcessShimInitialize): Empty for now. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::ProcessLauncher::launchProcess): Install the Plugin Process shim for plugin processes and the WebProcess shim for the web content process. 2011-05-17 John Sullivan Reviewed by Adam Roben. Loose end from fix for https://bugs.webkit.org/show_bug.cgi?id=60938 * WebKit2.xcodeproj/project.pbxproj: Made new header file "private" instead of "project" so clients can access it. 2011-05-17 Andreas Kling Reviewed by Kenneth Rohde Christiansen. [Qt][WK2] Remove usage of ChunkedUpdateDrawingArea. https://bugs.webkit.org/show_bug.cgi?id=60901 To prepare for the eventual removal of the ChunkedUpdateDrawingArea, make QGraphicsWKView's "Simple" backing store type map to DrawingAreaImpl. * UIProcess/API/qt/qgraphicswkview.cpp: * UIProcess/API/qt/qgraphicswkview.h: * UIProcess/API/qt/qwkpage.cpp: (QWKPagePrivate::createDrawingAreaProxy): 2011-05-16 Martin Robinson Take another shot at fixing the WinCairo build. * Shared/cairo/LayerTreeContextCairo.cpp: Include NotImplemented.h using a framework include. 2011-05-16 Sam Weinig Reviewed by Jon Honeycutt. Add access to process pid in WebKit2 API https://bugs.webkit.org/show_bug.cgi?id=60938 * UIProcess/API/C/mac/WKPagePrivateMac.cpp: Added. (WKPageGetProcessIdentifier): * UIProcess/API/C/mac/WKPagePrivateMac.h: Added. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::processIdentifier): * UIProcess/WebPageProxy.h: * WebKit2.xcodeproj/project.pbxproj: Add WKPageGetProcessIdentifier as SPI for the mac. 2011-05-16 Martin Robinson Add file missing from my previous commit. * Shared/cairo/LayerTreeContextCairo.cpp: Added. 2011-05-16 Martin Robinson Try to fix the WinCairo build after r86612. Move the LayerTreeContextGtk.cpp stub to LayerTreeContextCairo.cpp and add it to the WinCairo build. * GNUmakefile.am: Update the source list. * Shared/cairo/LayerTreeContextCairo.cpp: Renamed from Source/WebKit2/Shared/gtk/LayerTreeContextGtk.cpp. * win/WebKit2.vcproj: Update the source list. 2011-05-16 Martin Robinson Reviewed by Anders Carlsson. [GTK] [WebKit2] Provide a fast version of the backing store for X11 https://bugs.webkit.org/show_bug.cgi?id=60912 Instead of allocating the backing store surface directly in WebKit2, instantiate the GtkWidgetBackingStore class which abstracts away the platform-specific details of maintaining the backing store. * UIProcess/BackingStore.h: * UIProcess/gtk/BackingStoreGtk.cpp: (WebKit::BackingStore::paint): Call into GtkWidgetBackingStore to get the Cairo surface now. (WebKit::BackingStore::incorporateUpdate): Ditto. (WebKit::BackingStore::scroll): Call into GtkWidgetBackingStore to do the actual backing store scroll. 2011-05-16 Chris Marrin Reviewed by Darin Adler. Plug-in hit testing is broken after zooming https://bugs.webkit.org/show_bug.cgi?id=60916 Construct a WebMouseEvent to send to plugin, adjusting values to take pageScaleFactor into account. Also adjusted bounds sent to viewGeometryDidChange to take pageScaleFactor into account. Both are needed or the plugin will think the mouse positions are outside its bounds. * Shared/WebEvent.h: * Shared/WebMouseEvent.cpp:Add ctor to clone a WebMouseEvent and add a scaleFactor to values (WebKit::WebMouseEvent::WebMouseEvent): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::handleEvent):Adjust mouse coords to take pageScaleFactor into account (WebKit::PluginView::viewGeometryDidChange):Adjust bounds to take pageScaleFactor into account 2011-05-16 Martin Robinson Reviewed by Anders Carlsson. GTK port of WebKit2 should switch to new DrawingAreaImpl model https://bugs.webkit.org/show_bug.cgi?id=59655 * GNUmakefile.am: Add the files necessary to use the DrawingAreaProxyImpl to the source list. The source list also needs the LayerContextTree stubs. * Shared/LayerTreeContext.h: This file should not be guarded by USE(ACCELERATED_COMPOSITING) as it's needed for the DrawingAreaProxyImpl IPC messaging. * Shared/gtk/LayerTreeContextGtk.cpp: Added this stub. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::createDrawingAreaProxy): Instead of creating the deprecated chunked drawing area, create a DrawingAreaProxyImpl. (WebKit::PageClientImpl::setViewNeedsDisplay): Here we must now queue a redraw. Previously the chunked drawing area was doing this manually. This is the appropriate place though. (WebKit::PageClientImpl::scrollView): Add an implementation that just calls into setViewNeedsDisplay. * UIProcess/API/gtk/PageClientImpl.h: Added a getter for m_viewWidget. (WebKit::PageClientImpl::viewWidget): * UIProcess/API/gtk/WebKitWebViewBase.cpp: (callDrawingAreaPaintMethod): Added this helper which reduces code duplication between GTK+ 2.x and 3.x (webkitWebViewBaseExpose): Call the new helper now. (webkitWebViewBaseDraw): Ditto. * UIProcess/BackingStore.h: Updated to include GTK+ specific types. * UIProcess/DrawingAreaProxy.h: Ditto. * UIProcess/DrawingAreaProxy.messages.in: Do not the DrawingAreaProxyImpl-specific message with USE(ACCELERATED_COMPOSITING). * UIProcess/WebPageProxy.cpp: Removed these guards, as DrawingAreProxyImpl is used on all platforms now. (WebKit::WebPageProxy::didReceiveMessage): Ditto. * UIProcess/WebPageProxy.h: Ditto. * UIProcess/gtk/BackingStoreGtk.cpp: Added. This implementation heavily uses Cairo, but depends on GTK+/GDK in a few places. (WebKit::BackingStore::paint): (WebKit::BackingStore::incorporateUpdate): (WebKit::BackingStore::scroll): * UIProcess/gtk/WebPageProxyGtk.cpp: Added a getting for the viewWidget, which is required by BackingStoreGtk. A similar getter exists for Windows and Mac. (WebKit::WebPageProxy::viewWidget): Ditto. * WebProcess/WebPage/DrawingArea.cpp: Removed these guards as DrawingAreaProxyImpl is used on all platforms now. (WebKit::DrawingArea::create): Ditto. * WebProcess/WebPage/DrawingArea.h: Ditto. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::sendDidUpdateBackingStoreState): Do not guard this DrawingAreaProxyImpl-specific message with USE(ACCELERATED_COMPOSITING) * WebProcess/WebPage/WebPage.cpp: Removed these guards as DrawingAreaProxyImpl is used on all platforms now. (WebKit::WebPage::didReceiveMessage): Ditto. 2011-05-16 Maciej Stachowiak Reviewed by Sam Weinig. Sandbox denies Kerberos authentication https://bugs.webkit.org/show_bug.cgi?id=60921 * WebProcess/com.apple.WebProcess.sb: 2011-05-16 David Kilzer C++ exceptions should not be enabled when building with llvm-gcc-4.2 Reviewed by Mark Rowe. * Configurations/Base.xcconfig: Fixed typo. 2011-05-16 Anders Carlsson Reviewed by Dan Bernstein. If the root compositing layer changes while we're about to exit compositing mode, make sure to enter compositing mode https://bugs.webkit.org/show_bug.cgi?id=60905 * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::setRootCompositingLayer): If we have a layer tree host, but haven't yet sent a EnterAcceleratedCompositingMode message (this can happen when quickly going in and out of compositing mode), make sure to schedule a notification when the layer tree host does it next flush. This will end up sending the EnterAcceleratedCompositingMode message. 2011-05-13 Jer Noble Reviewed by Simon Fraser. Video is blank, controller is misplaced on trailers.apple.com movie in fullscreen (with two screens) https://bugs.webkit.org/show_bug.cgi?id=60826 Emit a notification when moving a CALayer from the WebProcess's main layer host to a new context. This allows listeners to invalidate their layers which may not support moving between different CAContexts (as is the case with QTMovieLayer). In order to allow listeners to determine if they are affected, the notification will pass the root CALayer in a userInfo dictionary. In WebFullScreenManagerMac, move from storing a pointer to a non-refcounted class (GraphicsLayer) to a retainable class (PlatformLayer). * WebProcess/FullScreen/mac/WebFullScreenManagerMac.h: * WebProcess/FullScreen/mac/WebFullScreenManagerMac.mm: (WebKit::WebFullScreenManagerMac::WebFullScreenManagerMac): No need to initialize m_fullScreenRootLayer now that it is a RetainPtr<>. (WebKit::WebFullScreenManagerMac::setRootFullScreenLayer): Emit a notification after either creating or destroying the full screen layer host. (WebKit::WebFullScreenManagerMac::beginEnterFullScreenAnimation): (WebKit::WebFullScreenManagerMac::beginExitFullScreenAnimation): 2011-05-16 Siddharth Mathur Rubber-stamped by Csaba Osztrogonác. [Qt][Wk2][Symbian] Fix build after r86560 https://bugs.webkit.org/show_bug.cgi?id=60887 Temporarily fix Symbian build by re-enabling compilation of Qt/Gtk common code (as was the case for Symbian before r55875). This is a stop gap until the pure Symbian Core IPC and process launching bits land in Bug 55875 As of this revision, only the native SharedMemory implementation is in trunk. * Platform/CoreIPC/Attachment.h: Compile Qt/Gtk common code for Qt-Symbian too * Platform/CoreIPC/Connection.h: ditto * Platform/SharedMemory.h: ditto * Platform/qt/SharedMemorySymbian.cpp: stub implementations of attachment handling (WebKit::SharedMemory::Handle::releaseToAttachment): (WebKit::SharedMemory::Handle::adoptFromAttachment): 2011-05-16 Jon Lee Reviewed by Simon Fraser. Can't horizontally scroll iframes and overflow because wheel events are always accepted https://bugs.webkit.org/show_bug.cgi?id=60779 We keep track of the number of horizontal scrollbars and mouse wheel event handlers in the UI process as a means of determining whether horizontal scroll events will be handled by the web process. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::willHandleHorizontalScrollEvents): Return true if there is at least one wheel event handler * UIProcess/WebPageProxy.h: Add new variable to cache the count (WebKit::WebPageProxy::numWheelEventHandlersChanged): Sets the count The rest just provides all the connections. * UIProcess/API/C/WKPage.cpp: (WKPageWillHandleHorizontalScrollEvents): * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::shouldRubberBandInDirection): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::shouldRubberBandInDirection): Forward to injected bundle UI client (WebKit::WebChromeClient::updateCountWheelEventHandlers): Updates the web page proxy * WebProcess/WebCoreSupport/WebChromeClient.h: 2011-05-16 Anders Carlsson Reviewed by Oliver Hunt. Silverlight: Selection via keyboard selects the entire plugin instead of the contents of a TextBox https://bugs.webkit.org/show_bug.cgi?id=60898 Special-case Command-A and always return true, indicating that the plug-in handled the event. This matches WebKit1. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NetscapePlugin::platformHandleKeyboardEvent): 2011-05-16 Anders Carlsson Reviewed by Oliver Hunt. Short-circuit NPRuntime calls made by Flash during plug-in instantiation https://bugs.webkit.org/show_bug.cgi?id=60894 During plug-in instantiation, Flash makes a couple of NPRuntime calls to get the URL of the current document as well as the URL of the toplevel document. This leads to a bunch of IPC traffic that slows down instantiation. Since we know what calls Flash is making and what results are expected, we can handle the NPRuntime calls directly in the plug-in process and avoid extra IPC overhead. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::PluginControllerProxy): Initialize m_pluginCreationParameters. (WebKit::PluginControllerProxy::initialize): Set m_pluginCreationParameters to point to the creation parameters right before calling Plugin::initialize and restore it back afterwards. (WebKit::PluginControllerProxy::tryToShortCircuitInvoke): If the plug-in calling NPN_Invoke has the CanShortCircuitSomeNPRuntimeCallsDuringInitialization quirk, and we're being initialized, check for the __flash_getWindowLocation and __flash_getTopLocation function calls and return the correct values. (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate): Check if the script string has the definitions of __flash_getWindowLocation or __flash_getTopLocation and just ignore them. Note that ignoring them has the effect of not adding them to the window object, which could in theory be a backwards compatibility problem if web pages were to assume that these functions existed on a page with plug-ins. In practice this is probably not a problem, especially since these functions are only used on Mac WebKit. * PluginProcess/PluginControllerProxy.h: (WebKit::PluginControllerProxy::inInitialize): Add helper function. * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::determineQuirks): Add the CanShortCircuitSomeNPRuntimeCallsDuringInitialization quirk for Flash on Mac. * Shared/Plugins/PluginQuirks.h: Add Mac specific CanShortCircuitSomeNPRuntimeCallsDuringInitialization quirk. 2011-05-16 Anders Carlsson Reviewed by Adam Roben. Add a returnValue parameter to tryToShortCircuitInvoke https://bugs.webkit.org/show_bug.cgi?id=60891 tryToShortCircuitInvoke needs to be able to indicate that an invoke call failed. Add a returnValue parameter and have the real return value indicate whether tryToShortCircuitInvoke did short-circuit the invoke or not. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::tryToShortCircuitInvoke): * PluginProcess/PluginControllerProxy.h: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_Invoke): * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::tryToShortCircuitInvoke): * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/PluginController.h: * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::tryToShortCircuitInvoke): * WebProcess/Plugins/PluginView.h: 2011-05-16 Siddharth Mathur Reviewed by Csaba Osztrogonác. [Qt][Wk2][Symbian] Fix build after r86560 https://bugs.webkit.org/show_bug.cgi?id=60887 * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::ArgumentDecoder::~ArgumentDecoder): guard Unix and Gtk code with USE(UNIX_DOMAIN_SOCKETS) * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::~ArgumentEncoder): ditto 2011-05-16 Anders Carlsson Reviewed by Adam Roben. Add the ability for a plug-in controller to short-circuit calls to NPN_Invoke https://bugs.webkit.org/show_bug.cgi?id=60886 Make it possible for a plug-in controller to intercept calls to NPN_Invoke, which will be useful for avoiding sync IPC messages during instantiation. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::evaluate): Call tryToShortCircuitEvaluate. If it returns true, we don't need to call back to the web process to ask it to evaluate the script string. (WebKit::PluginControllerProxy::tryToShortCircuitInvoke): (WebKit::PluginControllerProxy::tryToShortCircuitEvaluate): Always return false for now. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_Invoke): Get the plug-in and call tryToShortCircuitInvoke. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::tryToShortCircuitInvoke): Call the plug-in controller. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::tryToShortCircuitInvoke): Always return false here, since there's no need to short-circuit calls for plug-ins that live in the web process. 2011-05-16 Siddharth Mathur Reviewed by Laszlo Gombos. [Qt][WK2][Symbian] Shared memory implementation for Symbian https://bugs.webkit.org/show_bug.cgi?id=55875 Use global chunks for sharing data between processes. This is an initial implementation. An outstanding issue is the correct way to close() the chunk in the SharedMemory d'tor without triggering a delete by the kernel when the ref-count temporarily goes to zero. * Platform/SharedMemory.h: platform specific handle and chunk name * Platform/qt/SharedMemorySymbian.cpp: Added. Native Symbian OS implementation using RChunk.CreateGlobal() for named chunks. The chunk name is serialized and sent over the IPC channel and opened by the remote process using RChunk.OpenGlobal(). (WebKit::SharedMemory::Handle::Handle): (WebKit::SharedMemory::Handle::~Handle): (WebKit::SharedMemory::Handle::isNull): (WebKit::SharedMemory::Handle::encode): (WebKit::SharedMemory::Handle::decode): (WebKit::SharedMemory::create): (WebKit::SharedMemory::~SharedMemory): (WebKit::SharedMemory::createHandle): (WebKit::SharedMemory::systemPageSize): * Platform/unix/SharedMemoryUnix.cpp: Exclude Qt-Symbian using HAVE(UNIX_DOMAIN_SOCKETS) * WebKit2.pro: Add SharedMemorySymbian.cpp 2011-05-16 Carlos Garcia Campos Unreviewed. Fix WebKit2 GTK build after r86489. * GNUmakefile.am: Add PluginProcess/PluginCreationParameters.cpp and PluginProcess/PluginCreationParameters.h to compilation. 2011-05-16 Carlos Garcia Campos Reviewed by Martin Robinson. [GTK] Enable building GTK port with ENABLE_PLUGIN_PROCESS=1 https://bugs.webkit.org/show_bug.cgi?id=58223 * GNUmakefile.am: Add new files to compilation. * PluginProcess/gtk/PluginControllerProxyGtk.cpp: Added. (WebKit::PluginControllerProxy::platformInitialize): (WebKit::PluginControllerProxy::platformDestroy): (WebKit::PluginControllerProxy::platformGeometryDidChange): * PluginProcess/gtk/PluginProcessGtk.cpp: Added. (WebKit::PluginProcess::platformInitialize): * UIProcess/Plugins/gtk/PluginProcessProxyGtk.cpp: Added. (WebKit::PluginProcessProxy::platformInitializePluginProcess): * WebProcess/Plugins/Netscape/gtk/PluginProxyGtk.cpp: Added. (WebKit::PluginProxy::needsBackingStore): 2011-05-16 Adam Barth Attempt to fix the Qt build. (Strict PassOwnPtr fix.) * Shared/qt/ShareableBitmapQt.cpp: (WebKit::ShareableBitmap::createGraphicsContext): 2011-05-15 Michael Saboff Reviewed by Geoffrey Garen. Suboptimal lifetime of BackingStore objects in DrawingAreaProxyImpl https://bugs.webkit.org/show_bug.cgi?id=60864 Implemented reuse of BackingStore's in DrawingAreaProxyImpl::didUpdateBackingStoreState when the size needed matches the size of the existing BackingStore. Also reduced the discardBackingStoreTimer from 5 to 2 seconds. These changes reduces memory usage up to 10MB on memory tests. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): 2011-05-15 Anders Carlsson Reviewed by Maciej Stachowiak. Pass the window NPObject identifier in the plug-in creation parameters https://bugs.webkit.org/show_bug.cgi?id=60865 This avoids a synchronous call when the plug-in wants to get the NPObject that corresponds to the window. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::initialize): Change this to take the PluginCreationParameters. Initialize the window NPObject. (WebKit::PluginControllerProxy::windowScriptNPObject): Just return the window NPObject; it's already been initialized. * PluginProcess/PluginControllerProxy.h: * PluginProcess/PluginCreationParameters.cpp: (WebKit::PluginCreationParameters::PluginCreationParameters): (WebKit::PluginCreationParameters::encode): (WebKit::PluginCreationParameters::decode): * PluginProcess/PluginCreationParameters.h: Add the window NPObject ID. * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::createPlugin): Pass the creation parameters to PluginControllerProxy::initialize. * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::initialize): Initialize the window NPObject ID. * WebProcess/Plugins/PluginProxy.messages.in: Remove the GetWindowScriptNPObject message. 2011-05-15 Anders Carlsson Reviewed by Geoffrey Garen. Pass the document URL and toplevel document URL when creating a plug-in https://bugs.webkit.org/show_bug.cgi?id=60863 This is the first of a series of patches intended to reduce the IPC traffic during plug-in instantiation. * WebProcess/Plugins/Plugin.cpp: (WebKit::Plugin::Parameters::encode): Encode the URLs. (WebKit::Plugin::Parameters::decode): Decode the URLs. * WebProcess/Plugins/Plugin.h: Add the document and toplevel document URLs. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createPlugin): Initialize the document and toplevel document URLs. 2011-05-13 Oliver Hunt Reviewed by Geoffrey Garen. Make GC validation more aggressive https://bugs.webkit.org/show_bug.cgi?id=60802 Add GC_VALIDATION calls to all the JSNPObject methods. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::invalidate): (WebKit::JSNPObject::callMethod): (WebKit::JSNPObject::callObject): (WebKit::JSNPObject::callConstructor): (WebKit::JSNPObject::getCallData): (WebKit::JSNPObject::getConstructData): (WebKit::JSNPObject::getOwnPropertySlot): (WebKit::JSNPObject::getOwnPropertyDescriptor): (WebKit::JSNPObject::put): (WebKit::JSNPObject::getOwnPropertyNames): (WebKit::JSNPObject::propertyGetter): (WebKit::JSNPObject::methodGetter): 2011-05-13 Oliver Hunt Reviewed by Geoffrey Garen. Make GC validation more aggressive https://bugs.webkit.org/show_bug.cgi?id=60802 Add GC_VALIDATION calls to all the JSNPObject methods. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::invalidate): (WebKit::JSNPObject::callMethod): (WebKit::JSNPObject::callObject): (WebKit::JSNPObject::callConstructor): (WebKit::JSNPObject::getCallData): (WebKit::JSNPObject::getConstructData): (WebKit::JSNPObject::getOwnPropertySlot): (WebKit::JSNPObject::getOwnPropertyDescriptor): (WebKit::JSNPObject::put): (WebKit::JSNPObject::getOwnPropertyNames): (WebKit::JSNPObject::propertyGetter): (WebKit::JSNPObject::methodGetter): 2011-05-14 Alexey Proskuryakov Reviewed by Sam Weinig. WebKit2: Smart cut&paste is broken https://bugs.webkit.org/show_bug.cgi?id=60840 * UIProcess/mac/TextCheckerMac.mm: (WebKit::TextChecker::isSmartInsertDeleteEnabled): Match WK1 - this default defaults to YES if not present. 2011-05-14 Dan Bernstein Reviewed by Alice Liu. WKView does not draw after forced repaint before the first update https://bugs.webkit.org/show_bug.cgi?id=60845 * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint): Added. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::waitForBackingStoreUpdateOnNextPaint): Set m_hasReceivedFirstUpdate to true, ensuring that paint() will wait for an update if needed. * UIProcess/DrawingAreaProxyImpl.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::forceRepaint): Call DrawingAreaProxy::waitForBackingStoreUpdateOnNextPaint(). 2011-05-14 Anders Carlsson Reviewed by Sam Weinig. Document the WantsMozillaUserAgent quirk and make it Windows specific https://bugs.webkit.org/show_bug.cgi?id=60843 * Shared/Plugins/PluginQuirks.h: * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::userAgent): 2011-05-14 Anders Carlsson Reviewed by Sam Weinig. Consolidate plug-in creation parameters to a single struct https://bugs.webkit.org/show_bug.cgi?id=60839 * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::create): (WebKit::PluginControllerProxy::PluginControllerProxy): * PluginProcess/PluginControllerProxy.h: * PluginProcess/PluginCreationParameters.cpp: Added. (WebKit::PluginCreationParameters::PluginCreationParameters): (WebKit::PluginCreationParameters::encode): (WebKit::PluginCreationParameters::decode): * PluginProcess/PluginCreationParameters.h: Added. * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::createPlugin): * PluginProcess/WebProcessConnection.h: * PluginProcess/WebProcessConnection.messages.in: * Scripts/webkit2/messages.py: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::initialize): 2011-05-14 Anders Carlsson Reviewed by Kevin Decker. NPP_URLNotify is not called if a URL passed to NPN_GetURLNotify fails to load https://bugs.webkit.org/show_bug.cgi?id=60823 If a plug-in stream fails to load before it's been started, we won't destroy the stream. * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: (WebKit::NetscapePluginStream::stop): Call notifyAndDestroyStream which will call NPP_URLNotify if necessary, and also destroy the stream. (WebKit::NetscapePluginStream::notifyAndDestroyStream): Pass the request URL to NPP_URLNotify, matching other browsers. 2011-05-14 Jer Noble Reviewed by Simon Fraser. Flashing window frame and graphical glitches after exiting full screen mode. https://bugs.webkit.org/show_bug.cgi?id=60825 A layer-backed WebView throws an exception when moved from a layer-backed parent view to a non-layer-backed one, so make the WebView a child of the content view, instead of the animation view. There is an unrelated fix in beganExitFullScreen, which was calling finishedExitFullScreenAnimation: instead of finishedEnterFullScreenAnimation: when notifications come out of order. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Add the _webView to the full screen window's content view, instead of the _animationView. (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Call finishedEnterFullScreenAnimation: instead of finishedExitFullScreenAnimation:. (-[WKFullScreenWindowController enterAcceleratedCompositingMode:WebKit::]): Add the _layerHostingView to the contentView, instead of the animationView. 2011-05-14 Csaba Osztrogonác Unreviewed, rolling out r86469 and r86471, because they made hundreds tests crash on Qt. Make GC validation more aggressive https://bugs.webkit.org/show_bug.cgi?id=60802 * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::invalidate): (WebKit::JSNPObject::callMethod): (WebKit::JSNPObject::callObject): (WebKit::JSNPObject::callConstructor): (WebKit::JSNPObject::getCallData): (WebKit::JSNPObject::getConstructData): (WebKit::JSNPObject::getOwnPropertySlot): (WebKit::JSNPObject::getOwnPropertyDescriptor): (WebKit::JSNPObject::put): (WebKit::JSNPObject::getOwnPropertyNames): (WebKit::JSNPObject::propertyGetter): (WebKit::JSNPObject::methodGetter): 2011-05-14 Sheriff Bot Unreviewed, rolling out r86476. http://trac.webkit.org/changeset/86476 https://bugs.webkit.org/show_bug.cgi?id=60832 It made plugins/get-url-notify-with-url-that-fails-to- load.html crash on GTK (Requested by Ossy on #webkit). * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: (WebKit::NetscapePluginStream::stop): (WebKit::NetscapePluginStream::notifyAndDestroyStream): 2011-05-13 Enrica Casucci Reviewed by Darin Adler and Brian Weinstein. REGRESSION (WK2): Can't drag and drop a link or image from Safari to Desktop https://bugs.webkit.org/show_bug.cgi?id=60819 To support drag-and-drop to the desktop and other windows applications, we need to support the fileDescriptor and fileContentZero clipboard formats. This patch adds the support for serializing these types across the process boundary. * Platform/CoreIPC/Arguments.h: Added support for messages with 10 arguments. (CoreIPC::Arguments10::Arguments10): (CoreIPC::Arguments10::encode): (CoreIPC::Arguments10::decode): (CoreIPC::In): (CoreIPC::Out): * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Added support for memebers with 10 arguments. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::startDragDrop): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp: (WebKit::WebDragClient::startDrag): 2011-05-13 Anders Carlsson Reviewed by Sam Weinig. NPP_URLNotify is not called if a URL passed to NPN_GetURLNotify fails to load https://bugs.webkit.org/show_bug.cgi?id=60823 If a plug-in stream fails to load before it's been started, we won't destroy the stream. * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: (WebKit::NetscapePluginStream::stop): Call notifyAndDestroyStream which will call NPP_URLNotify if necessary, and also destroy the stream. (WebKit::NetscapePluginStream::notifyAndDestroyStream): Pass the request URL to NPP_URLNotify, matching other browsers. 2011-05-13 Michael Saboff Reviewed by Geoffrey Garen. Backing store may not get discarded due to stopped timer https://bugs.webkit.org/show_bug.cgi?id=60816 Changed the backing store timer to restart if it has been stopped. The evaluation is done when the view's state is changed. This change appears to be worth ~3MB (one backing store worth) during memory tests. * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::discardBackingStoreSoon): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::viewStateDidChange): 2011-05-13 Oliver Hunt Reviewed by Geoffrey Garen. Make GC validation more aggressive https://bugs.webkit.org/show_bug.cgi?id=60802 Add GC_VALIDATION calls to all the JSNPObject methods. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::invalidate): (WebKit::JSNPObject::callMethod): (WebKit::JSNPObject::callObject): (WebKit::JSNPObject::callConstructor): (WebKit::JSNPObject::getCallData): (WebKit::JSNPObject::getConstructData): (WebKit::JSNPObject::getOwnPropertySlot): (WebKit::JSNPObject::getOwnPropertyDescriptor): (WebKit::JSNPObject::put): (WebKit::JSNPObject::getOwnPropertyNames): (WebKit::JSNPObject::propertyGetter): (WebKit::JSNPObject::methodGetter): 2011-05-13 Anders Carlsson Reviewed by Sam Weinig. NPN_GetURL with a javascript: URL doesn't send back the result in the stream https://bugs.webkit.org/show_bug.cgi?id=60810 In NetscapePluginStream::sendJavaScriptStream, we were incorrectly passing the result URL to the stream, instead of the result. Also, store the request URL in the NetscapePluginStream object to avoid sending it over the wire. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::didEvaluateJavaScript): * PluginProcess/PluginControllerProxy.h: * PluginProcess/PluginControllerProxy.messages.in: * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::loadURL): (WebKit::NetscapePlugin::didEvaluateJavaScript): (WebKit::NetscapePlugin::manualStreamDidReceiveResponse): * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/Netscape/NetscapePluginStream.cpp: (WebKit::NetscapePluginStream::NetscapePluginStream): (WebKit::NetscapePluginStream::sendJavaScriptStream): * WebProcess/Plugins/Netscape/NetscapePluginStream.h: (WebKit::NetscapePluginStream::create): * WebProcess/Plugins/Plugin.h: * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::didEvaluateJavaScript): * WebProcess/Plugins/PluginProxy.h: * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::performJavaScriptURLRequest): 2011-05-13 Jeff Miller Reviewed by Darin Adler. Make some page() member functions const https://bugs.webkit.org/show_bug.cgi?id=60794 * UIProcess/ChunkedUpdateDrawingAreaProxy.h: Make page() const. * UIProcess/WebFrameProxy.h: (WebKit::WebFrameProxy::page): Make page() const. * UIProcess/WebInspectorProxy.h: (WebKit::WebInspectorProxy::page): Make page() const. * UIProcess/gtk/ChunkedUpdateDrawingAreaProxyGtk.cpp: (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const. * UIProcess/mac/ChunkedUpdateDrawingAreaProxyMac.mm: (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const. * UIProcess/qt/ChunkedUpdateDrawingAreaProxyQt.cpp: (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const. * UIProcess/win/ChunkedUpdateDrawingAreaProxyWin.cpp: (WebKit::ChunkedUpdateDrawingAreaProxy::page): Make page() const. 2011-05-13 Adam Roben Load plugins in the order they're found Fixes REGRESSION (r69790): WebKit2 doesn't prefer plugins in the additional plugins directory Reviewed by Anders Carlsson. * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::addFromVector): Changed to use a ListHashSet instead of a HashSet to store the plugin paths. 2011-05-13 Sam Weinig Reviewed by Anders Carlsson. Prune #includes from FrameView.h (Part 2) https://bugs.webkit.org/show_bug.cgi?id=60748 - Update files that were depending on FrameView.h #including Frame.h or Page.h. * WebProcess/Plugins/PluginView.cpp: * WebProcess/WebCoreSupport/mac/WebDragClientMac.mm: * WebProcess/WebPage/WebContextMenu.cpp: * WebProcess/WebPage/mac/AccessibilityWebPageObject.mm: 2011-05-13 Martin Robinson Reviewed by Eric Seidel. [GTK] Share the GTK+ key binding code between WebKit1 and WebKit2 https://bugs.webkit.org/show_bug.cgi?id=59765 Use the new KeyBindingTranslator class from WebCore/platform/gtk. With this utility class we can now share the code with WebKit2. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::PageClientImpl): No longer need to initialize keybinding code. (WebKit::PageClientImpl::getEditorCommandsForKeyEvent): Use the new utility class. * UIProcess/API/gtk/PageClientImpl.h: Remove unnecessary members. Add utility class member. 2011-05-12 Pratik Solanki Reviewed by Antti Koivisto. Part of WebCore should use CFNetwork-based loader on Mac https://bugs.webkit.org/show_bug.cgi?id=51836 Use CFRunLoop when using CFNetwork. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::platformInitialize): 2011-05-12 Sam Weinig Reviewed by Gavin Barraclough. WebProcess sandbox denies file:/// accesses after you navigate to a nonexistent file https://bugs.webkit.org/show_bug.cgi?id=60745 * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): Don't attempt to re-use a non-existent committed sandbox extension. This can happen when the previous load was file: url, but did not require an extension, such as an error page. 2011-05-12 Jia Pu Reviewed by Darin Adler. Regression caused by changeset 86281 https://bugs.webkit.org/show_bug.cgi?id=60712 Removed the condition variable. [NSSpellChecker dismissCorrectionIndicatorForView:] is blocking. So handleAcceptedReplacement() triggered by dismissInternal() will return before dismissInternal() returns. So we don't need to use the condition to coordinate between these two function. In fact, all callbacks are delivered on main thread. We don't really need any locking here. Since now we don't have distinction between dismiss() and dismissSoon(). dismissSoon() has been removed. * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::dismissCorrectionPanelSoon): * UIProcess/mac/CorrectionPanel.h: * UIProcess/mac/CorrectionPanel.mm: (WebKit::CorrectionPanel::CorrectionPanel): (WebKit::CorrectionPanel::show): (WebKit::CorrectionPanel::dismiss): (WebKit::CorrectionPanel::dismissInternal): (WebKit::CorrectionPanel::handleAcceptedReplacement): 2011-05-12 Brian Weinstein Reviewed by Adam Roben. WebKit2: Implement plugin quirk for Mozilla user agent for older Flash https://bugs.webkit.org/show_bug.cgi?id=60726 Implement the quirk for versions of Flash before v10 that only request windowless plugins if we use a Mozilla user agent. * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: (WebKit::NetscapePluginModule::determineQuirks): If we have a plugin that handles the "application/x-shockwave-flash" MIME type with a version less than 10, tell it to use the Mozilla user agent. * Shared/Plugins/PluginQuirks.h: * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::userAgent): Add an early return if the plugin uses the Mozilla user agent. * win/WebKit2.vcproj: Add PluginQuirks.h. 2011-05-12 Anders Carlsson Reviewed by Simon Fraser. PluginView::invalidateRect doesn't work for transformed plug-ins https://bugs.webkit.org/show_bug.cgi?id=60727 Ask the RenderObject to repaint the plug-in instead of using invalidateContentsAndWindow. This matches what we do in WebKit1. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::invalidateRect): 2011-05-12 Jessie Berlin Reviewed by Darin Adler. [Windows WebKit2] Use cookies set in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=60274 Properly handle the case where there is no serialized default storage session by not trying to encode or decode 0, while still making sure to decode any valid storage session. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): (WebKit::WebProcessCreationParameters::encode): Only encode the storage session if there is one to encode. (WebKit::WebProcessCreationParameters::decode): Only decode the storage session there is one to decode. * Shared/WebProcessCreationParameters.h: 2011-05-11 Brian Weinstein Reviewed by Anders Carlsson. After relaunching an unresponsive web process, web page stops responding to mouse movement https://bugs.webkit.org/show_bug.cgi?id=60669 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::processDidCrash): Set m_processingMouseMoveEvent to false when the WebProcess crashes. 2011-05-10 Tony Gentilcore Reviewed by Darin Adler. Perform some forward declarations suggested by include-what-you-use https://bugs.webkit.org/show_bug.cgi?id=60545 * WebProcess/WebPage/mac/WebPageMac.mm: 2011-05-12 Carlos Garcia Campos Reviewed by Martin Robinson. Fix the build with ENABLE_PLUGIN_PROCESS https://bugs.webkit.org/show_bug.cgi?id=60628 * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::initialize): Move the call to pluginController->isAcceleratedCompositingEnabled() to a #ifdef block. * WebProcess/Plugins/PluginProxy.h: Add include for . 2011-05-11 Damian Kaleta Reviewed by Brady Eidson. Need a new API that will try to restore the scrollbars' position, when navigating in the back/forward history https://bugs.webkit.org/show_bug.cgi?id=60674 * UIProcess/API/C/WKPage.cpp: (WKPageTryRestoreScrollPosition): * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::tryRestoreScrollPosition): * UIProcess/WebPageProxy.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::tryRestoreScrollPosition): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2011-05-11 Sam Weinig Reviewed by Gavin Barraclough. WebKit2 doesn't build on Mac with strict PassOwnPtr https://bugs.webkit.org/show_bug.cgi?id=60655 * Platform/CoreIPC/HandleMessage.h: (CoreIPC::handleMessageDelayed): Add explicit adoptPtr to indicate that the constructor is taking ownership. 2011-05-11 Jessie Berlin Reviewed by Steve Falkenburg. [Windows WebKit2] Use cookies set in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=60274 Share the default storage session between the UI and Web Processes. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): Only encode the session parameter if it is valid. (WebKit::WebProcessCreationParameters::decode): Don't try to decode a null session data. * Shared/WebProcessCreationParameters.h: Add a parameter for a serialized default storage session, used only on Windows. * Shared/win/WebCoreArgumentCodersWin.cpp: (CoreIPC::decodeResourceRequest): Make sure to set the current storage session on any requests used by the Web Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid doing anything with the Web Process's default storage session. * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess): Serialize the default storage session in the UI Process and add it to the WebProcessCreationParameters. * WebProcess/WebPage/win/WebPageWin.cpp: (WebKit::cachedResponseForURL): Use the cache associated with the current storage session and make sure the request has the current storage session set on it before doing anything with it. * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformSetCacheModel): Use the default storage session. (WebKit::WebProcess::platformClearResourceCaches): Ditto. (WebKit::WebProcess::platformInitializeWebProcess): Deserialize the default storage session passed in by the UI Process and hand it to the ResourceHandle. 2011-05-11 Jia Pu Reviewed by Darin Adler. CorrectionPanel sometimes hangs in dismissSoon(). https://bugs.webkit.org/show_bug.cgi?id=60599 Make sure dismissSoon() won't wait indefinitely if handleAcceptedReplacement() sets m_resultForSynchronousDismissal to nil. Added a designated variable m_isDismissing, instead of piggy-backing m_resultForSynchronousDismissal, for condition checking. * UIProcess/mac/CorrectionPanel.h: * UIProcess/mac/CorrectionPanel.mm: (WebKit::CorrectionPanel::CorrectionPanel): (WebKit::CorrectionPanel::show): (WebKit::CorrectionPanel::dismissSoon): (WebKit::CorrectionPanel::dismissInternal): (WebKit::CorrectionPanel::handleAcceptedReplacement): 2011-05-11 Sheriff Bot Unreviewed, rolling out r86255. http://trac.webkit.org/changeset/86255 https://bugs.webkit.org/show_bug.cgi?id=60660 REGRESSION (r86255): Lots of tests crashing in CFWriteStreamCreateWithAllocatedBuffers on Windows 7 Release (WebKit2 Tests) (Requested by aroben on #webkit). * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: * Shared/win/WebCoreArgumentCodersWin.cpp: (CoreIPC::decodeResourceRequest): * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess): * WebProcess/WebPage/win/WebPageWin.cpp: (WebKit::cachedResponseForURL): * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformSetCacheModel): (WebKit::WebProcess::platformClearResourceCaches): (WebKit::WebProcess::platformInitializeWebProcess): 2011-05-11 Adam Roben Don't notify the plugin when a targeted javascript: URL request completes This matches Mozilla and WebKit1. Fixes REGRESSION (WebKit2): Flash plugin doesn't appear on a hanes.com page Test: plugins/get-targeted-javascript-url.html Reviewed by Anders Carlsson. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::performJavaScriptURLRequest): Don't call back to the plugin if the request had a target. 2011-05-11 Jessie Berlin Reviewed by Steve Falkenburg. [Windows WebKit2] Use cookies set in WebKit1 https://bugs.webkit.org/show_bug.cgi?id=60274 Share the default storage session between the UI and Web Processes. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: Add a parameter for a serialized default storage session, used only on Windows. * Shared/win/WebCoreArgumentCodersWin.cpp: (CoreIPC::decodeResourceRequest): Make sure to set the current storage session on any requests used by the Web Process before CFNetwork has to do anything with them, in order for CFNetwork to avoid doing anything with the Web Process's default storage session. * UIProcess/win/WebContextWin.cpp: (WebKit::WebContext::platformInitializeWebProcess): Serialize the default storage session in the UI Process and add it to the WebProcessCreationParameters. * WebProcess/WebPage/win/WebPageWin.cpp: (WebKit::cachedResponseForURL): Use the cache associated with the current storage session and make sure the request has the current storage session set on it before doing anything with it. * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformSetCacheModel): Use the default storage session. (WebKit::WebProcess::platformClearResourceCaches): Ditto. (WebKit::WebProcess::platformInitializeWebProcess): Deserialize the default storage session passed in by the UI Process and hand it to the ResourceHandle. 2011-05-11 Sam Weinig Reviewed by Adam Roben. WebKit2 should tell app that is unresponsive in more cases https://bugs.webkit.org/show_bug.cgi?id=60608 * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::didUpdateBackingStoreState): (WebKit::DrawingAreaProxyImpl::sendUpdateBackingStoreState): Invoke the responsiveness time when forcing a backing store update to catch the cases of activating tabs, resizing the window, etc. 2011-05-11 Martin Robinson Try to fix the WinCairo build. * Shared/ShareableBitmap.h: Correctly include RefPtrCairo here and guard it with USE(CAIRO) instead of PLATFORM(CAIRO). 2011-05-11 John Sullivan Reviewed by Darin Adler. WebKit2 doesn't clear the pendingAPIRequestURL on in-page anchor navigation [60631] * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didSameDocumentNavigationForFrame): Call clearPendingAPIRequestURL(). 2011-05-11 Adam Roben Turn on strict PassOwnPtr on Windows Fixes Windows should build with strict PassOwnPtr enabled Reviewed by Adam Barth. * WebProcess/FullScreen/win/WebFullScreenManagerWin.cpp: (WebKit::WebFullScreenManagerWin::setRootFullScreenLayer): Use nullptr instead of 0. 2011-05-11 Jessie Berlin Reviewed by Darin Adler. [WebKit2] exceededDatabaseQuota function on WKPageUIClient needs to provide information about the usage for both the origin overall and the database in question. https://bugs.webkit.org/show_bug.cgi?id=60573 Add the currentOriginUsage parameter. * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::exceededDatabaseQuota): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebUIClient.cpp: (WebKit::WebUIClient::exceededDatabaseQuota): * UIProcess/WebUIClient.h: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::exceededDatabaseQuota): 2011-05-10 Oliver Hunt Reviewed by Geoffrey Garen. Assertion failure in JSC::Structure::typeInfo when reloading weather.com video page https://bugs.webkit.org/show_bug.cgi?id=60580 The plugin object map was incorrect trying to implement a weak map itself using destructors. Switch to a WeakGCMap and the problem is fixed. * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::~JSNPObject): * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::getOrCreateJSObject): (WebKit::NPRuntimeObjectMap::invalidate): * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: 2011-05-10 Sam Weinig Reviewed by Dan Bernstein. Yet more quarantine related sandbox denial when downloading files * WebProcess/com.apple.WebProcess.sb: 2011-05-10 Sam Weinig Reviewed by Anders Carlsson. WebKit2: Coalesced wheel events should be saved to hand back to the client on unhandled return https://bugs.webkit.org/show_bug.cgi?id=60584 * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::handleWheelEvent): (WebKit::canCoalesce): (WebKit::coalesce): (WebKit::coalescedWheelEvent): (WebKit::WebPageProxy::didReceiveEvent): (WebKit::WebPageProxy::processDidCrash): Reworks coalescing/merging code to happen on didReceiveEvent rather than in handleWheelEvent. This means we now store the pending events in a queue, and pull them out when we can. * UIProcess/WebPageProxy.h: Change single event containers to contain all pending/merged/coalesced events and remove unused flag. 2011-05-09 Jeremy Noble Reviewed by Darin Adler. WebKit2: Cancelling full screen before animation completes leads to full screen window staying up. https://bugs.webkit.org/show_bug.cgi?id=60531 Remove the (unused) _isAnimating ivar and replace it with two ivars: _isEnteringFullScreen and _isExitingFullScreen. These will ensure each is only called once per full screen request, and that if one exit/enter request interrupts another, that the required functions are called in order. * UIProcess/mac/WKFullScreenWindowController.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController enterFullScreen:]): Removed _isAnimating. (-[WKFullScreenWindowController exitFullScreen]): Ditto. (-[WKFullScreenWindowController beganEnterFullScreenAnimation]): Gate on _isEnteringFullScreen. Check _isExitingFullScreen and call [self finishedExitFullScreenAnimation:] if necessary. (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Gate on _isEnteringFullScreen. (-[WKFullScreenWindowController beganExitFullScreenAnimation]): Gate on _isExitingFullScreen. Check _isEnteringFullScreen and call [self finishedEnterFullScreenAnimation:] if necessary. (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): Gate on _isExitingFullScreen. 2011-05-10 Beth Dakin Reviewed by Darin Adler. https://bugs.webkit.org/show_bug.cgi?id=60582 Crash switching overlay/non-overlay scrollbar preference still possible -and corresponding- * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2011-05-10 Jeff Miller Reviewed by Anders Carlsson. WebKit2: Windows clients need to know if the page overlay is installed https://bugs.webkit.org/show_bug.cgi?id=60562 Until we move all the UI for find on page into WebKit on Windows (specifically, drawing the find bouncy), WebKit clients need to know whether WebKit is drawing the page overlay or not. Keep track of this in the WebPageProxy in the UI process and provide a WebKit2 API to retrieve this information. * UIProcess/API/C/win/WKView.cpp: (WKViewIsPageOverlayInstalled): Added. * UIProcess/API/C/win/WKView.h: Added WKViewIsPageOverlayInstalled(). * UIProcess/PageClient.h: Added didInstallOrUninstallPageOverlay(). * UIProcess/WebPageProxy.h: Added didInstallOrUninstallPageOverlay(). * UIProcess/WebPageProxy.messages.in: Added DidInstallOrUninstallPageOverlay. * UIProcess/win/WebPageProxyWin.cpp: (WebKit::WebPageProxy::didInstallOrUninstallPageOverlay): Added. * UIProcess/win/WebView.cpp: (WebKit::WebView::WebView): Initialize m_pageOverlayInstalled. (WebKit::WebView::didInstallOrUninstallPageOverlay): Added. * UIProcess/win/WebView.h: Added didInstallOrUninstallPageOverlay() and m_pageOverlayInstalled. (WebKit::WebView::pageOverlayInstalled): Added. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::installPageOverlay): Send message to UI process to tell it the page overlay is installed. (WebKit::WebPage::uninstallPageOverlay): Send message to UI process to tell it the page overlay is uninstalled. 2011-05-10 Anders Carlsson Reviewed by Adam Roben. Remove incorrect ASSERTs from CoreIPC::Connection::processIncomingSyncReply https://bugs.webkit.org/show_bug.cgi?id=60567 It is possible to receive an incoming sync reply that is for a request we don't know about. This could happen if the sync message send timed out for example. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::processIncomingSyncReply): 2011-05-05 Brent Fulgham and Martin Robinson Reviewed by Anders Carlsson. [Cairo][WebKit2] Add an implementation of ShareableBitmap for Cairo https://bugs.webkit.org/show_bug.cgi?id=60293 * GNUmakefile.am: Remove ShareableBitmapGtk in favor of ShareableBitmapCairo. * Shared/ShareableBitmap.h: Added a couple Cairo-specific declarations. * Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::createGraphicsContext): Added. (WebKit::ShareableBitmap::paint): Added. (WebKit::ShareableBitmap::createCairoSurface): Added. (WebKit::ShareableBitmap::releaseSurfaceData): Added. 2011-05-10 Anders Carlsson Reviewed by Sam Weinig. Extra sign in required to view video on MobileMe Gallery album https://bugs.webkit.org/show_bug.cgi?id=60560 Implement NPN_GetAuthenticationInfo. * PluginProcess/PluginControllerProxy.cpp: (WebKit::PluginControllerProxy::getAuthenticationInfo): Send a GetAuthenticationInfo message to the web process. * PluginProcess/PluginControllerProxy.h: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::initializeProtectionSpace): Initialize a WebCore::ProtectionSpace object from NPAPI parameters. (WebKit::NPN_GetAuthenticationInfo): Make a ProtectionSpace object and then call NetscapePlugin::getAuthenticationInfo. Finally, copy the username/password and pass them back to the plug-in. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::getAuthenticationInfo): Call the plug-in controller. * WebProcess/Plugins/PluginController.h: Add getAuthenticationInfo pure virtual member function. * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::getAuthenticationInfo): Call the real plug-in controller's getAuthenticationInfo member function. * WebProcess/Plugins/PluginProxy.messages.in: Add GetAuthenticationInfo message. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::getAuthenticationInfo): Try to get the authentication info from the credential storage. Failing that, get it from the persistent credential storage. 2011-05-10 Adam Roben Use FontSmoothingLevelWindows by default on Windows Fixes REGRESSION (r86077): Web Inspector uses CG font rendering in WebKit2 on Windows Reviewed by Darin Adler. * Shared/WebPreferencesStore.h: Added and deployed a new DEFAULT_WEBKIT_FONT_SMOOTHING_LEVEL macro to let Windows have a different default font smoothing level from other platforms. * UIProcess/API/C/WKPreferencesPrivate.h: Updated the comment about the default font smoothing level. 2011-05-06 Tony Gentilcore Reviewed by Darin Adler. Fix some unnecessary includes in headers https://bugs.webkit.org/show_bug.cgi?id=60388 * WebProcess/FullScreen/WebFullScreenManager.cpp: 2011-05-09 Jeremy Noble Reviewed by Darin Adler. Command-~/Exposé to another window while