2013-01-17 Tim Horton [WK2] TiledCoreAnimationDrawingArea should unparent its layer tree when requested https://bugs.webkit.org/show_bug.cgi?id=107108 Reviewed by Darin Adler and Simon Fraser. Currently, TiledCoreAnimationDrawingArea returns early if asked to unparent its layer tree, to prevent flashing when switching tabs. We have new plans to alleviate the flashing, but first, we should reinstate unparenting the root layer, to allow underlying libraries to better manage the memory backing all compositing layers. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): 2013-01-17 Tim Horton Fix the Mac build sans ENABLE(CSS_FILTERS) Reviewed by Darin Adler. Include FloatRect in RemoteGraphicsLayer.mm; it's included by chance currently, via something that must be compiled out without CSS_FILTERS (or SVG, or shaders, or something). * WebProcess/WebPage/mac/RemoteGraphicsLayer.mm: 2013-01-16 Alexey Proskuryakov Don't use NSApplication run loop in NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=107061 Reviewed by Anders Carlsson. Only WebProcess and PluginProcess should use Cocoa APIs that require the run loop. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitializePluginProcess): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeProcess): 2013-01-16 Alexey Proskuryakov Update sandbox rules after r128003 https://bugs.webkit.org/show_bug.cgi?id=106840 Reviewed by Darin Adler. * WebProcess/com.apple.WebProcess.sb.in: Additional Lion only fixes. 2013-01-16 Sam Weinig Make debug-safari --target-web-process work again https://bugs.webkit.org/show_bug.cgi?id=107088 Reviewed by Anders Carlsson. --target-web-process was made harder to use during recent refactoring by requiring users to pass a -ui-process-name parameter in addition to the -client-executable. Instead, we should conjure up that name from the information we already have at our disposal. * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMainDelegate::getConnectionIdentifier): Simplify by making the non-client-executable path use the base class implementation. (WebKit::WebProcessMainDelegate::getClientIdentifier): Ditto. (WebKit::WebProcessMainDelegate::getClientProcessName): Added. Create a client process name (its actually not too important what it is, as it is only used to show a name in Activity Monitor) from the passed in client executable path. 2013-01-16 Sam Weinig Fix crashes on the bots. The WebKit LoaderStrategy for loading synchronously was only implemented for the case where you have a network process. When you don't, we should be using the base implementation. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::loadResourceSynchronously): 2013-01-16 Sam Weinig Update Owners file. * Owners: 2013-01-16 Sam Weinig Remove unused AddLoadInProgress message https://bugs.webkit.org/show_bug.cgi?id=107077 Reviewed by Dan Bernstein. Dead code is dead. * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: 2013-01-16 Anders Carlsson Fix crash when destroying a plug-in with pending URL requests https://bugs.webkit.org/show_bug.cgi?id=107075 Reviewed by Sam Weinig. In PluginView::destroyPluginAndReset, make sure to cancel any outstanding URL requests since the PluginView object will stay around and would otherwise start loading URLs from stopped plug-ins. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::Stream::start): Assert that the plug-in is alive. (WebKit::PluginView::destroyPluginAndReset): Empty out the pending URL requests vector and stop the timer. 2013-01-16 Jaehun Lim [EFL][WK2] PageUIClientEfl should keep in sync with WKPageUIClient https://bugs.webkit.org/show_bug.cgi?id=107060 Reviewed by Benjamin Poulain. Rearrange the order of functions in PageUIClientEfl. Rename closePage() to close(). * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::close): * UIProcess/API/efl/EwkViewImpl.h: (EwkViewImpl): * UIProcess/efl/PageUIClientEfl.cpp: (WebKit::PageUIClientEfl::PageUIClientEfl): (WebKit::PageUIClientEfl::close): (WebKit::PageUIClientEfl::takeFocus): (WebKit::PageUIClientEfl::focus): (WebKit::PageUIClientEfl::unfocus): (WebKit::PageUIClientEfl::getWindowFrame): (WebKit::PageUIClientEfl::setWindowFrame): (WebKit::PageUIClientEfl::createNewPage): (WebKit::PageUIClientEfl::showColorPicker): (WebKit::PageUIClientEfl::hideColorPicker): * UIProcess/efl/PageUIClientEfl.h: (PageUIClientEfl): 2013-01-16 Brady Eidson Synchronous XMLHTTPRequests need to go to the NetworkProcess. and https://bugs.webkit.org/show_bug.cgi?id=106826 Reviewed by Sam Weinig and Alexey Proskuryakov. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::loadResourceSynchronously): Entry point for WebCore to get synchronous requests to the NetworkProcess. * WebProcess/WebCoreSupport/WebPlatformStrategies.h: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad): Create a SyncNetworkResourceLoader and schedule it. * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::scheduleSyncNetworkResourceLoader): (WebKit::NetworkResourceLoadScheduler::servePendingRequestsForHost): Serve synchronous loaders before async loaders. * NetworkProcess/NetworkResourceLoadScheduler.h: A class that encapsulates a synchronous load request and the CoreIPC reply to be made once it is complete: * NetworkProcess/SyncNetworkResourceLoader.cpp: Added. (WebKit::SyncNetworkResourceLoader::SyncNetworkResourceLoader): (WebKit::SyncNetworkResourceLoader::start): * NetworkProcess/SyncNetworkResourceLoader.h: Copied from Source/WebKit2/NetworkProcess/HostRecord.h. (WebKit::SyncNetworkResourceLoader::create): (WebKit::SyncNetworkResourceLoader::setIdentifier): (WebKit::SyncNetworkResourceLoader::identifier): (WebKit::SyncNetworkResourceLoader::loadParameters): Add a second queue of sync loaders: * NetworkProcess/HostRecord.h: (WebKit::HostRecord::syncLoadersPending): Add comments to explicitly spell out the current reliance on some messages that are currently synchronous: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::willSendRequest): (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace): * WebKit2.xcodeproj/project.pbxproj: 2013-01-16 Alexey Proskuryakov WebProcess should not access ~/Library/Caches/com.apple.WebProcess https://bugs.webkit.org/show_bug.cgi?id=107055 Reviewed by Anders Carlsson. * WebProcess/com.apple.WebProcess.sb.in: Remove the rule allowing access. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): Use a correct cache directory even if NetworkProcess is in use. Not all loading has moved to this process yet. 2013-01-16 Anders Carlsson Remove CoreIPCMessageKinds.h https://bugs.webkit.org/show_bug.cgi?id=107048 Reviewed by Beth Dakin. Use named IPC messages instead. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncReply): (CoreIPC::Connection::processIncomingMessage): (CoreIPC::Connection::dispatchSyncMessage): * Platform/CoreIPC/CoreIPCMessageKinds.h: Removed. * Platform/CoreIPC/MessageID.h: (MessageID): (CoreIPC::MessageID::stripMostSignificantBit): (CoreIPC::MessageID::operator==): * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC::Connection::open): (CoreIPC::Connection::receiveSourceEventHandler): * WebKit2.xcodeproj/project.pbxproj: 2013-01-15 Jer Noble Add a Setting to disable QTKit media engine. https://bugs.webkit.org/show_bug.cgi?id=106972 Reviewed by Eric Carlson. Add a WebKit2 API to access WebCore QTKitEnabled settings. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetQTKitEnabled): Pass through to WebCore. (WKPreferencesGetQTKitEnabled): Ditto. * UIProcess/API/C/WKPreferences.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Synchronize WebKit2/WebCore settings. 2013-01-16 Kiran Muppala Groundwork to enable process suppression by default on Mac https://bugs.webkit.org/show_bug.cgi?id=106513 Reviewed by Alexey Proskuryakov. Process suppression has so far been controlled by a user default and disabled by default. This patch provides the groundwork to enable it by default and adds a private API to enable/disable it on a per-context basis. * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::platformInitialize): Add comment about initilization of application occlusion state. * UIProcess/API/C/mac/WKContextPrivateMac.cpp: Added. (WKContextGetProcessSuppressionEnabled): (WKContextSetProcessSuppressionEnabled): Add private API to enable/disable process suppression on a per-context basis. * UIProcess/API/C/mac/WKContextPrivateMac.h: Added. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didFinishLaunching): Check if owning context has process suppression enabled before updating application occlusion state. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didFinishLaunching): Ditto. * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::didFinishLaunching): Check if process suppression is enabled for global child processes before updating application occlusion state. * UIProcess/SharedWorkers/SharedWorkerProcessProxy.cpp: (WebKit::SharedWorkerProcessProxy::didFinishLaunching): Ditto. * UIProcess/WebContext.cpp: (WebKit::WebContext::create): Remove call to initializeProcessSuppressionSupport, since platformInitialize has been modified to perform initialization. (WebKit::WebContext::WebContext): Initialize new member variable m_processSuppressionEnabled to false. * UIProcess/WebContext.h: (WebKit::WebContext::processSuppressionEnabled): Remove "Support" from the method name. * UIProcess/mac/WebContextMac.mm: (WebKit::updateGlobalChildProcessesApplicationOcclusionState): (WebKit::applicationOcclusionStateChanged): Update the application occlusion state of child processes having process suppresion enabled. (WebKit::applicationBecameVisible): (WebKit::applicationBecameOccluded): Simplify by moving code to applicationOcclusionStateChanged. (WebKit::registerOcclusionNotificationHandlers): Fix typos. (WebKit::unregisterOcclusionNotificationHandlers): Add method to unregister occlusion notification handlers when no context has process suppression enabled. (WebKit::enableOcclusionNotifications): (WebKit::disableOcclusionNotifications): (WebKit::enableProcessSuppressionForGlobalChildProcesses): (WebKit::disableProcessSuppressionForGlobalChildProcesses): (WebKit::processSuppressionIsEnabledForAnyContext): (WebKit::processSuppressionIsEnabledForAllContexts): (WebKit::WebContext::platformInitialize): Disable process suppression for global child processes since process suppression is disabled for a context on construction. (WebKit::WebContext::setProcessSuppressionEnabled): (WebKit::WebContext::updateChildProcessesApplicationOcclusionState): (WebKit::WebContext::applicationIsOccluded): (WebKit::WebContext::processSuppressionEnabledForGlobalChildProcesses): (WebKit::WebContext::processSuppressionEnabledChanged): Update child processes application occlusion state, enable/disable occlusion notifications and enable/disable process suppression for global child processes. * WebKit2.xcodeproj/project.pbxproj: 2013-01-15 Anders Carlsson Merge LayerTreeHostCA and LayerTreeHostMac https://bugs.webkit.org/show_bug.cgi?id=106967 Reviewed by Sam Weinig. There's no need to have a LayerTreeHostCA base class anymore, just merge it into LayerTreeHostMac. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: Removed. * WebProcess/WebPage/ca/LayerTreeHostCA.h: Removed. * WebProcess/WebPage/mac/LayerTreeHostMac.h: (LayerTreeHostMac): * WebProcess/WebPage/mac/LayerTreeHostMac.mm: (WebKit::LayerTreeHostMac::LayerTreeHostMac): (WebKit::LayerTreeHostMac::~LayerTreeHostMac): (WebKit::LayerTreeHostMac::layerTreeContext): (WebKit::LayerTreeHostMac::setShouldNotifyAfterNextScheduledLayerFlush): (WebKit): (WebKit::LayerTreeHostMac::setRootCompositingLayer): (WebKit::LayerTreeHostMac::invalidate): (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay): (WebKit::LayerTreeHostMac::scrollNonCompositedContents): (WebKit::LayerTreeHostMac::forceRepaint): (WebKit::LayerTreeHostMac::sizeDidChange): (WebKit::LayerTreeHostMac::deviceScaleFactorDidChange): (WebKit::LayerTreeHostMac::didInstallPageOverlay): (WebKit::LayerTreeHostMac::didUninstallPageOverlay): (WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay): (WebKit::LayerTreeHostMac::pauseRendering): (WebKit::LayerTreeHostMac::resumeRendering): (WebKit::LayerTreeHostMac::setLayerHostingMode): (WebKit::LayerTreeHostMac::notifyAnimationStarted): (WebKit::LayerTreeHostMac::notifyFlushRequired): (WebKit::LayerTreeHostMac::paintContents): (WebKit::LayerTreeHostMac::deviceScaleFactor): (WebKit::LayerTreeHostMac::flushLayers): (WebKit::LayerTreeHostMac::initialize): (WebKit::LayerTreeHostMac::performScheduledLayerFlush): (WebKit::LayerTreeHostMac::flushPendingLayerChanges): (WebKit::LayerTreeHostMac::createPageOverlayLayer): (WebKit::LayerTreeHostMac::destroyPageOverlayLayer): 2013-01-15 Tim Horton Clamp TileCache visibleRect to WKView's visibleRect https://bugs.webkit.org/show_bug.cgi?id=106601 Reviewed by Simon Fraser. Some clients expand the WKView to be much larger than what is visible on screen, and control scrolling with their own view. Currently, we will create tiles for the entire view, consuming a great deal of memory, and can sometimes factor scrollbars which can never exist into layout. Piggyback on WKView SPI (the property minimumWidthForAutoLayout, renamed from minimumLayoutWidth) to drop into a mode where we disable main frame scrolling and respect the WKView's visibleRect when creating tiles. * UIProcess/API/mac/WKView.mm: (-[WKView setFrameSize:]): Update the page's viewExposedRect from our visibleRect. (-[WKView _updateWindowAndViewFrames]): Update the page's viewExposedRect from our visibleRect. (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): The main frame is scrollable by default. (-[WKView enableFrameSizeUpdates]): If frame size updates become enabled, update the page's viewExposedRect from our visibleRect. (-[WKView setMinimumLayoutWidth:]): Rename minimumLayoutWidth property to minimumWidthForAutoLayout. Warn once if the old one is used. (-[WKView minimumWidthForAutoLayout]): (-[WKView setMinimumWidthForAutoLayout:]): Adjust the minimum layout width, whether the main frame is scrollable, and update the page's viewExposedRect if needed. * UIProcess/API/mac/WKViewPrivate.h: Added minimumWidthForAutoLayout property. * UIProcess/WebPageProxy.h: (WebPageProxy): Add viewExposedRectChanged/setMainFrameIsScrollable. * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::viewExposedRectChanged): Forward viewExposedRectChanged to WebPage. (WebKit::WebPageProxy::setMainFrameIsScrollable): Forward setMainFrameIsScrollable to WebPage. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Disable scrollbars and scrolling if main frame scrollability is disabled. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setExposedRect): Added empty default implementation. (WebKit::DrawingArea::mainFrameScrollabilityChanged): Added empty default implementation. (DrawingArea): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::windowAndViewFramesChanged): We don't need the WebCore:: namespace. (WebKit::WebPage::viewExposedRectChanged): Forward exposed rect changes to DrawingArea (only TiledCoreAnimationDrawingArea cares, for now). (WebKit::WebPage::setMainFrameIsScrollable): Forward scrollability changes to DrawingArea and the main FrameView. (WebKit::WebPage::drawRectToImage): We don't need the WebCore:: namespace. * WebProcess/WebPage/WebPage.h: (WebPage): Add mainFrameIsScrollable, viewExposedRectChanged, setMainFrameIsScrollable, and storage for m_mainFrameIsScrollable. (WebKit::WebPage::mainFrameIsScrollable): * WebProcess/WebPage/WebPage.messages.in: Add ViewExposedRectChanged and SetMainFrameIsScrollable messages. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::setExposedRect): Forward new exposed rect to TiledBacking (only TileCache cares, for now). (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged): Ask TiledBacking to clip to the exposedRect if main frame scrolling is disabled. (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): Use size instead of viewSize in case we've changed it because of m_minimumLayoutWidth. (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): Update exposedRect and clipsToExposedRect. 2013-01-15 Enrica Casucci Add a new set of WebKit2 APIs for text search and search results management. https://bugs.webkit.org/show_bug.cgi?id=106834. Reviewed by Simon Fraser. Adding new API to perform text search in WebKit2 without using the stock UI. The new interface provides all the information necessary to write a custom UI for search. The main logic is implemented in the new functions added to FindController. Added new TextWebKitAPI test. * UIProcess/API/C/WKPage.cpp: (WKPageFindStringMatches): Added. (WKPageGetImageForFindMatch): Added. (WKPageSelectFindMatch): Added. (WKPageSetPageFindMatchesClient): Added. * UIProcess/API/C/WKPage.h: Added the new API definitions. * UIProcess/WebFindClient.cpp: Added new client callbacks. (WebKit::WebFindMatchesClient::didFindStringMatches): (WebKit::WebFindMatchesClient::didGetImageForMatchResult): * UIProcess/WebFindClient.h: (WebFindMatchesClient): Added. * UIProcess/WebPageProxy.cpp: Added proxy methods. (WebKit::WebPageProxy::initializeFindMatchesClient): (WebKit::WebPageProxy::findStringMatches): (WebKit::WebPageProxy::getImageForFindMatch): (WebKit::WebPageProxy::selectFindMatch): (WebKit::WebPageProxy::didGetImageForFindMatch): (WebKit::WebPageProxy::didFindStringMatches): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::findStringMatches): Finds all the matching text according to the find options. All the matching text ranges are stored in a vector until the next call to findStringMatches or until hideFindUI is called. The message that is sent back to the UI process contains a vector containing an entry for each find match (i.e. for each range) and each entry is represented by a vector of the corresponding text rects. It also returns the index in the vector of matches corresponding to the first match after the user selection. If there is no selection the index is always 0 and if there are no matches after the user selection, the index returned is -1. (WebKit::FindController::getFindIndicatorBitmapAndRect): Helper function to share code between updateFindIndicator and getImageForFindMatch. (WebKit::FindController::getImageForFindMatch): Creates the image corresponding to the text matched at the given match index. (WebKit::FindController::selectFindMatch): creates a selection for the range corresponding to the given match index. (WebKit::FindController::hideFindUI): Added logic to clear the vector of matched ranges. (WebKit::FindController::updateFindIndicator): Updated to use the new helper function getFindIndicatorBitmapAndRect. * WebProcess/WebPage/FindController.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::findStringMatches): (WebKit::WebPage::getImageForFindMatch): (WebKit::WebPage::selectFindMatch): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: 2013-01-15 Anders Carlsson Rename LayerTreeHostCAMac to LayerTreeHostMac. Rubber-stamped by Deth Bakin. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebPage/LayerTreeHost.cpp: * WebProcess/WebPage/mac/LayerTreeHostMac.h: Renamed from Source/WebKit2/WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.h. * WebProcess/WebPage/mac/LayerTreeHostMac.mm: Renamed from Source/WebKit2/WebProcess/WebPage/ca/mac/LayerTreeHostCAMac.mm. 2013-01-15 Dominik Röttsches [CoordinatedGraphics] Deadlock when running abspos-child-container-changes-from-relative-to-static.html https://bugs.webkit.org/show_bug.cgi?id=106884 Reviewed by Benjamin Poulain. We need to return false if m_waitingForUIProcess is true since otherwise we'll not really repaint in performScheduledLayerFlush() and the UI process will wait forever. Returning false leads to executing the layer flush synchronously and immediately, then acknowledging the callback to the WebProcess - which resolves the deadlock. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::forceRepaintAsync): Return false in order to trigger a synchronous repaint if m_waitingForUIProcess is true. 2013-01-15 Simon Fraser Allow tiled WKViews to have transparent backgrounds https://bugs.webkit.org/show_bug.cgi?id=106400 Reviewed by Anders Carlsson. When WKViews were set to have transparent backgrounds, they still obscured content behind the view, for several reasons. First, when in tiled scrolling mode, WKView set the background of its layer to opaque white. Fix by using the clearColor (effectively removing the background color) if the view has a non-opaque background. Second, RenderLayerBacking just looked at FrameViews's isTransparent() when deciding to make TileCache tiles non-opaque, but it also needs to consider FrameViews with a non-opaque base background color. The same logic was necessary to avoid setting an opaque white background color on the TileCache layer. Finally, for views with non-opaque backgrounds, we don't want to display linen, so RenderLayerCompositor::requiresOverhangAreasLayer() was changed to return false in that case. * UIProcess/API/mac/WKView.mm: (-[WKView updateLayer]): 2013-01-14 Dean Jackson [ANGLE] Update ANGLE in WebKit https://bugs.webkit.org/show_bug.cgi?id=106274 Unreviewed attempted build fix. The khrplatform.h file is now a public header without a directory prefix. Update the include path to look in the right place. * PlatformEfl.cmake: 2013-01-14 Alexey Proskuryakov Update sandbox rules after r128003 https://bugs.webkit.org/show_bug.cgi?id=106840 Reviewed by Anders Carlsson. * WebProcess/com.apple.WebProcess.sb.in: 2013-01-14 Huang Dongsung [EFL] REGRESSION(r139189): MiniBrowser renders abnormally with -r option. https://bugs.webkit.org/show_bug.cgi?id=106512 Reviewed by Kenneth Rohde Christiansen. PageViewportController handles only pageScaleFactor after r139189. So PageViewportControllerClientEFL calls EwkView::setScaleFactor() with pageScaleFactor instead of pageScaleFactor * deviceScaleFactor. This patch makes EwkView handle pageScaleFactor. 1. EwkView uses pageScaleFactor * deviceScaleFactor when drawing in the device unit. 2. EwkView uses pageScaleFactor when notifying the scale to PageViewportController. * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::EwkViewImpl): (EwkViewImpl::deviceScaleFactor): (EwkViewImpl::transformFromScene): (EwkViewImpl::displayTimerFired): * UIProcess/API/efl/EwkViewImpl.h: (EwkViewImpl): (EwkViewImpl::setPageScaleFactor): (EwkViewImpl::pageScaleFactor): * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::didRenderFrame): * UIProcess/PageViewportControllerClient.h: (PageViewportControllerClient): * UIProcess/efl/PageClientLegacyImpl.cpp: (WebKit::PageClientLegacyImpl::updateViewportSize): * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::setViewportPosition): (WebKit::PageViewportControllerClientEfl::setPageScaleFactor): (WebKit::PageViewportControllerClientEfl::didResumeContent): * UIProcess/efl/PageViewportControllerClientEfl.h: (PageViewportControllerClientEfl): * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::setPageScaleFactor): * UIProcess/qt/PageViewportControllerClientQt.h: (PageViewportControllerClientQt): 2013-01-14 Max Vujovic [ANGLE] Update ANGLE in WebKit https://bugs.webkit.org/show_bug.cgi?id=106274 Reviewed by Dean Jackson. Update ANGLE to r1641. * PlatformEfl.cmake: Add ANGLE/include to the include directories list because ShaderLang.h now includes "KHR/khrplatform.h", which is located in ANGLE/include/KHR/khrplatform.h. 2013-01-14 Alexey Proskuryakov NetworkProcess scheduler never resumes resource loads that were postponed due to connection limit https://bugs.webkit.org/show_bug.cgi?id=106821 Reviewed by Brady Eidson. * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::servePendingRequests): * NetworkProcess/NetworkResourceLoadScheduler.h: Remove an uninitialized variable that could prevent loading. 2013-01-11 Balazs Kelemen [Qt][WK2] plugin tests assert in debug https://bugs.webkit.org/show_bug.cgi?id=106659 Reviewed by Benjamin Poulain. Fixed the misuse of String::split. * Shared/Plugins/Netscape/x11/NetscapePluginModuleX11.cpp: (WebKit::truncateToSingleLine): Add an assert to make sure this function works well. I just walked there while debugging the bug, and although it was innocent, adding this assertion is logical. * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: (WebKit::PluginProcessProxy::scanPlugin): The ASSERT was wrong. We have three lines, each ends in a newline, so split with allowEmptyEntries=true will devide it to 4 substrings. 2013-01-11 Filip Pizlo JITThunks should not compile only because of luck https://bugs.webkit.org/show_bug.cgi?id=105696 Rubber stamped by Sam Weinig. * Shared/APIObject.cpp: * Shared/linux/WebMemorySamplerLinux.cpp: * UIProcess/WebContext.cpp: * WebProcess/WebPage/WebPage.cpp: * WebProcess/efl/WebProcessMainEfl.cpp: 2013-01-11 Huang Dongsung Coordinated Graphics: Remove the dependency of WebCoordinatedSurface::Handle from Coordinated Graphics. https://bugs.webkit.org/show_bug.cgi?id=104347 Reviewed by Noam Rosenthal. It is a preparation patch for Threaded Coordinated Graphics on WK1. Currently, UpdateAtlas and CoordinatedImageBacking use WebCoordinatedSurface::Handle, but WebCoordinatedSurface::Handle can be used only IPC-based Coordinated Graphics. So this patch removes the dependency of WebCoordinatedSurface::Handle from UpdateAtlas and CoordinatedImageBacking. Now CoordinatedLayerTreeHost converts the handle to a WebCoordinatedSurface. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.cpp: (WebKit::CoordinatedImageBacking::update): (WebKit::CoordinatedImageBacking::releaseSurfaceIfNeeded): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h: (Coordinator): (CoordinatedImageBacking): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::updateImageBacking): (WebKit::CoordinatedLayerTreeHost::createUpdateAtlas): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (WebKit): (CoordinatedLayerTreeHost): * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp: (WebKit::UpdateAtlas::UpdateAtlas): (WebKit::UpdateAtlas::~UpdateAtlas): (WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer): * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h: (UpdateAtlasClient): (UpdateAtlas): 2013-01-11 Alexey Proskuryakov [WK2] Network process unblocks all waiting threads when any sync reply arrives https://bugs.webkit.org/show_bug.cgi?id=106713 Reviewed by Brady Eidson. Switch to sending sync CoreIPC messages, which is now possible. * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didClose): We no longer have response maps. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::willSendRequest): Just send a sync message. (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto. (WebKit::NetworkResourceLoader::didReceiveDataArray): Added an unrelated assertion. * NetworkProcess/NetworkResourceLoader.h: * NetworkProcess/NetworkResourceLoader.messages.in: Removed no longer used reply messages and their handlers. * Shared/BlockingResponseMap.h: Removed a bool version, which was not perfectly safe, and only used in NetworkProcess. (BlockingResponseMap::didReceiveResponse): Updated a still valid FIXME to not refer to network process. (BlockingResponseMap::cancel): Ditto. * WebProcess/Network/NetworkProcessConnection.h: * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveSyncMessage): Plumbing to handle sync messages. * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::willSendRequest): (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): * WebProcess/Network/WebResourceLoader.h: * WebProcess/Network/WebResourceLoader.messages.in: Updated (simplified) sync messages and their handlers. 2013-01-11 Alexey Proskuryakov [WK2] Make it possible to send sync messages from secondary threads https://bugs.webkit.org/show_bug.cgi?id=106708 Apply another review comment (overlooked a "ditto"). * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessage): 2013-01-11 Alexey Proskuryakov [WK2] Make it possible to send sync messages from secondary threads https://bugs.webkit.org/show_bug.cgi?id=106708 Reviewed by Anders Carlsson. It is hugely beneficial to implement sync messages at Connection level, because ad hoc code that blocks a thread and wakes it up when a reply arrives on main thread can't be made equally performant. A CoreOPC MessageDecoder can be moved across threads, which can't be done with a decoded argument passed by reference to client code. Sync messages from secondary threads are tracked in much simpler data structure than client thread ones, because we don't need to be concerned with incoming messages. * Platform/CoreIPC/Connection.cpp: (Connection::SecondaryThreadPendingSyncReply): (CoreIPC::Connection::SecondaryThreadPendingSyncReply::SecondaryThreadPendingSyncReply): (CoreIPC::Connection::createSyncMessageEncoder): (CoreIPC::Connection::sendSyncMessage): (CoreIPC::Connection::sendSyncMessageFromSecondaryThread): (CoreIPC::Connection::processIncomingSyncReply): (CoreIPC::Connection::connectionDidClose): * Platform/CoreIPC/Connection.h: Also corrected a misleading comment. 2013-01-11 Dan Bernstein Exclude unused resources. Reviewed by Darin Adler. * Configurations/WebKit2.xcconfig: Defined EXCLUDED_SOURCE_FILE_NAMES. 2013-01-11 Anders Carlsson Incoming synchronous messages can sometimes arrive out of order https://bugs.webkit.org/show_bug.cgi?id=106677 Reviewed by Andreas Kling. In cases where synchronous messages come in more than one connection at the same time, we can sometimes deliver the synchronous messages before any pending asynchronous messages on that connection. This breaks FIFO ordering. Fix this by separating the "dispatch all incoming synchronous messages" phase out into multiple phases, so we'll schedule one call per connection instead of one call for all connections. * Platform/CoreIPC/Connection.cpp: (Connection::SyncMessageState): (CoreIPC::Connection::SyncMessageState::SyncMessageState): (CoreIPC::Connection::SyncMessageState::processIncomingMessage): (CoreIPC::Connection::SyncMessageState::dispatchMessages): (CoreIPC::Connection::SyncMessageState::dispatchMessageAndResetDidScheduleDispatchMessagesForConnection): (CoreIPC::Connection::waitForSyncReply): 2013-01-11 Zan Dobersek Unreviewed. Build fix for the GTK debug builds of WebKit2 after r139415. * WebProcess/gtk/WebGtkExtensionManager.cpp: 2013-01-11 Carlos Garcia Campos [GTK] Remove support for global extensions in WebKit2 GTK+ https://bugs.webkit.org/show_bug.cgi?id=106646 Reviewed by Xan Lopez. We have now API to set the web extensions directory. A global web estensions directory doesn't make sense anymore. * WebProcess/gtk/WebGtkExtensionManager.cpp: (WebKit::WebGtkExtensionManager::scanModules): Only scan the given directory for modules. (WebKit::WebGtkExtensionManager::initialize): Load modules found in the given directory only. * WebProcess/gtk/WebGtkExtensionManager.h: (WebGtkExtensionManager): Remove appendModuleDirectories(). 2013-01-11 KwangYong Choi [EFL][WK2] Add ewk_view_page_contents_get() API https://bugs.webkit.org/show_bug.cgi?id=106440 Reviewed by Gyuyoung Kim. Add ewk_view_page_contents_get() API for getting contents of the current page. Currently, it supports only MHTML type. * UIProcess/API/efl/ewk_view.cpp: (Ewk_Page_Contents_Context): (ewkViewPageContentsCallback): (ewk_view_page_contents_get): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/tests/test_ewk2_view.cpp: (PageContentsCallback): (TEST_F): 2013-01-11 Krzysztof Czech [WK2] Missing HAVE(ACCESSIBILITY) guards to some atk/ accessibility files. https://bugs.webkit.org/show_bug.cgi?id=106447 Reviewed by Andreas Kling. Files do not have HAVE(ACCESSIBILITY) guards. This is source of potential build breakes, when macro is not enabled. * WebProcess/WebPage/atk/WebPageAccessibilityObject.h: * WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp: 2013-01-11 KwangYong Choi [EFL] Fix unused parameter build error https://bugs.webkit.org/show_bug.cgi?id=106639 Reviewed by Kentaro Hara. Use UNUSED_PARAM macro to fix build error. * UIProcess/API/efl/ewk_color_picker.cpp: (ewk_color_picker_color_set): (ewk_color_picker_color_get): * UIProcess/API/efl/ewk_context.cpp: (ewk_context_additional_plugin_path_set): * UIProcess/API/efl/ewk_settings.cpp: (ewk_settings_fullscreen_enabled_set): (ewk_settings_fullscreen_enabled_get): * UIProcess/API/efl/ewk_view.cpp: (ewk_view_intent_deliver): (ewk_view_feed_touch_event): (ewk_view_touch_events_enabled_set): (ewk_view_touch_events_enabled_get): (ewk_view_fullscreen_exit): 2013-01-10 Carlos Garcia Campos [GTK] Add API to set the web extensions directory to WebKit2 GTK+ https://bugs.webkit.org/show_bug.cgi?id=106462 Reviewed by Xan Lopez. * UIProcess/API/gtk/WebKitWebContext.cpp: (webkit_web_context_set_web_extensions_directory): Set the given directory as injected bundle initialization user data. * UIProcess/API/gtk/WebKitWebContext.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol. * UIProcess/API/gtk/tests/TestWebExtensions.cpp: (beforeAll): Update the test to use webkit_web_context_set_web_extensions_directory() instead of setting the WEBKIT_WEB_EXTENSIONS_PATH env var. * WebProcess/gtk/WebGtkExtensionManager.cpp: (WebKit::WebGtkExtensionManager::scanModules): Append the given additional web extensions directory to the list of directories to scan for modules. (WebKit::WebGtkExtensionManager::initialize): Get the additional web extensions directory from initialization user data and pass it to scanModules(). * WebProcess/gtk/WebGtkExtensionManager.h: (WebGtkExtensionManager): Add userData parameter. * WebProcess/gtk/WebGtkInjectedBundleMain.cpp: (WKBundleInitialize): Pass initialization user data to WebGtkExtensionManager. 2013-01-10 Huang Dongsung [Qt][EFL] Rename from xxxContentsScale() to xxxScale() in PageViewportController. https://bugs.webkit.org/show_bug.cgi?id=106537 Reviewed by Kenneth Rohde Christiansen. Rename 3 methods to match the terms of ViewportAttributes. * UIProcess/API/qt/qwebkittest.cpp: (QWebKitTest::viewport): (QWebKitTest::contentsScale): * UIProcess/PageViewportController.h: (WebKit::PageViewportController::minimumScale): (WebKit::PageViewportController::maximumScale): (WebKit::PageViewportController::currentScale): * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded): 2013-01-10 Michael Pruett [WK2] Set IndexedDB database path in WK2 https://bugs.webkit.org/show_bug.cgi?id=106257 Reviewed by Benjamin Poulain. * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: (WebKit::WebKeyValueStorageManager::initialize): * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: (WebKeyValueStorageManager): (WebKit::WebKeyValueStorageManager::indexedDBDatabaseDirectory): * WebProcess/WebPage/WebPageGroupProxy.cpp: (WebKit::WebPageGroupProxy::WebPageGroupProxy): 2013-01-10 Tim Horton Ensure that WebPageProxy's notion of pageScaleFactor is reset on didCommitLoad https://bugs.webkit.org/show_bug.cgi?id=103290 Reviewed by Darin Adler. When a standard main frame load is committed, we reset the WebPage's pageScaleFactor, if it's not the default. However, if the previous page had a full-main-frame plugin that was handling page scaling itself, WebPageProxy can have a cached pageScaleFactor != 1, while WebPage now (since the plugin that was overriding (set)pageScaleFactor is gone) has a pageScaleFactor of 1, causing us to skip the call to reset the WebPage's pageScaleFactor. Therefore, when WebPageProxy is notified that a standard main-frame load is committed, reset its cached notion of the pageScaleFactor. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didCommitLoadForFrame): Add a parameter which corresponds to FrameLoadType, so we can determine whether a frame load is of FrameLoadTypeStandard (which matches the check to reset page scale in WebFrameLoaderClient::didCommitLoad), so we can reset m_pageScaleFactor. * UIProcess/WebPageProxy.h: (WebPageProxy): Add frameLoadType parameter to didCommitLoadForFrame. * UIProcess/WebPageProxy.messages.in: Add frameLoadType parameter to didCommitLoadForFrame. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad): Pass frameLoadType parameter to didCommitLoadForFrame. 2013-01-10 Tim Horton PDFPlugin: Cmd-/+ should affect PDF page scale https://bugs.webkit.org/show_bug.cgi?id=103285 Reviewed by Darin Adler. Plugins which support handling page scale themselves should also handle page zoom, as it is a very similar concept. This patch disables text zoom in the case of a main-frame plugin which supports page scale factor changes, as it is not needed in the PDFPlugin case (we can't do text-only scale for PDF), but it could be added later if needed. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::pageZoomFactorDidChange): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: Add WebPageProxy::pageZoomFactorDidChange, to notify WebPageProxy of out-of-band page zoom factor changes (in this case, from PluginView). * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::setPageScaleFactor): Update WebPageProxy's notion of the current page zoom whenever PluginView is notified of a page scale factor change. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setTextZoomFactor): We don't support text zoom in plugins, but we also don't want it to silently act on the Frame if we have a plugin that purports to handle page scale itself. Return early if this is the case. (WebKit::WebPage::pageZoomFactor): For plugins that support page scale factor, we equate page scale and page zoom. Return the PluginView's page scale factor in place of the Frame's page zoom factor. (WebKit::WebPage::setPageZoomFactor): Make page zoom changes in the aforementioned case affect the PluginView's page scale. (WebKit::WebPage::setPageAndTextZoomFactors): Ditto. 2013-01-10 Tim Horton PDFPlugin: Header cleanup https://bugs.webkit.org/show_bug.cgi?id=106540 Reviewed by Andreas Kling. * WebProcess/Plugins/PDF/PDFPlugin.mm: Remove some unneeded headers. 2013-01-10 Zan Dobersek Remove the ENABLE_ANIMATION_API feature define occurences https://bugs.webkit.org/show_bug.cgi?id=106544 Reviewed by Simon Fraser. The Animation API code was removed in r137243. The ENABLE_ANIMATION_API feature define handling still lingers in various build systems and configurations but is of no use, so it should be removed. * Configurations/FeatureDefines.xcconfig: 2013-01-10 Mikhail Pozdnyakov [EFL][WK2] Contents gets blurry when page is scrolled down https://bugs.webkit.org/show_bug.cgi?id=106545 Reviewed by Kenneth Rohde Christiansen. The bound values for scrolling also should be pixel aligned, otherwise it leads to page contents blurriness when the page is scrolled down. * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::pageDidRequestScroll): 2013-01-10 Carlos Garcia Campos [GTK] Add support for loading web process extensions https://bugs.webkit.org/show_bug.cgi?id=105631 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Link to libWebCoreDOM.la and build injected bundle lib. * GNUmakefile.list.am: Add new files to compilation. * UIProcess/API/gtk/WebKitWebContext.cpp: (injectedBundleDirectory): Helper funtion to get the injected bundle directory. (injectedBundleFilename): Helper funtion to get the injected undle library full path. (createDefaultWebContext): Create the WebContext with an injected bundle path. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_get_page_id): Return the identifier of the web page associated to the web view. * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: Add new chapter for web extensions. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/docs/webkit2gtk.types: Add new types. * UIProcess/API/gtk/tests/GNUmakefile.am: Add new files to compilation. * UIProcess/API/gtk/tests/TestMain.cpp: (main): * UIProcess/API/gtk/tests/TestWebExtensions.cpp: Added. (testWebExtension): (beforeAll): (afterAll): * UIProcess/API/gtk/tests/WebExtensionTest.cpp: Added. (methodCallCallback): (webkit_web_extension_initialize): * UIProcess/API/gtk/tests/WebKitTestBus.cpp: Added. (WebKitTestBus::WebKitTestBus): (WebKitTestBus::run): (WebKitTestBus::~WebKitTestBus): (WebKitTestBus::connection): (onNameAppeared): (WebKitTestBus::createProxy): * UIProcess/API/gtk/tests/WebKitTestBus.h: Added. (WebKitTestBus): * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: Added. (_WebKitWebExtensionPrivate): (webkitWebExtensionPageCreated): Create a WebKitWebPage for the newly crated page and emit WebKitWebExtension::page-created signals. (webkitWebExtensionPageDestroy): Remove the page from the map. (didCreatePage): Call webkitWebExtensionPageCreated(). (willDestroyPage): Call webkitWebExtensionPageDestroy(). (webkitWebExtensionCreate): Create a new WebKitWebExtension and initialize the injected bundle client. (webkit_web_extension_get_page): Return the WebKitWebPage for the given page identifier. * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h: Added. (_WebKitWebExtension): (_WebKitWebExtensionClass): * WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionDefines.h: Added. * WebProcess/InjectedBundle/API/gtk/WebKitWebExtensionPrivate.h: Added. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: Added. (_WebKitWebPagePrivate): (webkit_web_page_class_init): (webkitWebPageCreate): Create a new WebKitWebPage. (webkit_web_page_get_dom_document): Return the WebKitDOMDocument loaded in the WebKitWebPage. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h: Added. (_WebKitWebPage): (_WebKitWebPageClass): * WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h: Added. * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: Added. * WebProcess/gtk/WebGtkExtensionManager.cpp: Added. (WebKit::WebGtkExtensionManager::shared): Return the global shared instance. (WebKit::WebGtkExtensionManager::WebGtkExtensionManager): (WebKit::WebGtkExtensionManager::appendModuleDirectories): Add directories to scan for modules. (WebKit::WebGtkExtensionManager::scanModules): Scan for modules. (WebKit::WebGtkExtensionManager::initialize): Load and initialize the modules found. * WebProcess/gtk/WebGtkExtensionManager.h: Added. * WebProcess/gtk/WebGtkInjectedBundleMain.cpp: Added. (WKBundleInitialize): Initialize WebGtkExtensionManager. 2013-01-10 Huang Dongsung REGRESSION(r139189): pixel alignment must be performed in device units. https://bugs.webkit.org/show_bug.cgi?id=106504 Reviewed by Kenneth Rohde Christiansen. After r139189, pixel alignment is performed in UI units. If deviceScaleFactor is fractional number, adjusted scroll position can blur non-composited layer. * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::pixelAlignedFloatPoint): 2013-01-10 Arnaud Renevier [WK2] [Gtk] web inspector is not visible. https://bugs.webkit.org/show_bug.cgi?id=106050 Reviewed by Carlos Garcia Campos. Use webkitWebViewBaseAddWebInspector when adding web inspector to webview in order to make webview aware of its existence. Use gtk_container_add when adding web inspector wiew to its own window because m_inspectorWindow is not a WebKitWebViewBase. * UIProcess/gtk/WebInspectorProxyGtk.cpp: (WebKit::WebInspectorProxy::createInspectorWindow): (WebKit::WebInspectorProxy::platformAttach): 2013-01-09 Seokju Kwon [WK2][EFL] Add guard around NativeWebTouchEvent https://bugs.webkit.org/show_bug.cgi?id=105846 Reviewed by Benjamin Poulain. Fix EFL build without TOUCH_EVENTS. * Shared/efl/NativeWebTouchEventEfl.cpp: Add TOUCH_EVENTS guard. 2013-01-09 Huang Dongsung Remove deviceScaleFactor argument in computeMinimumScaleFactorForContentContained(). https://bugs.webkit.org/show_bug.cgi?id=106500 Reviewed by Kenneth Rohde Christiansen. deviceScaleFactor argument is not used after r139189. * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::updateMinimumScaleToFit): 2013-01-09 Huang Dongsung [QT][EFL][WK2] Rename scale members in PageViewportController. https://bugs.webkit.org/show_bug.cgi?id=106499 Reviewed by Kenneth Rohde Christiansen. Rename from m_contentsScale to m_pageScaleFactor and from devicePixelRatio() to deviceScaleFactor() to match terms of WebCore. * UIProcess/API/qt/qwebkittest.cpp: (QWebKitTest::devicePixelRatio): * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::PageViewportController): (WebKit::PageViewportController::deviceScaleFactor): (WebKit::PageViewportController::pixelAlignedFloatPoint): (WebKit::PageViewportController::boundContentsPosition): (WebKit::PageViewportController::didRenderFrame): (WebKit::PageViewportController::didChangeContentsVisibility): (WebKit::PageViewportController::syncVisibleContents): (WebKit::PageViewportController::visibleContentsSize): (WebKit::PageViewportController::applyScaleAfterRenderingContents): (WebKit::PageViewportController::updateMinimumScaleToFit): * UIProcess/PageViewportController.h: (PageViewportController): (WebKit::PageViewportController::currentContentsScale): * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::updateViewportSize): 2013-01-09 KyungTae Kim [WK2][soup] Get rid of LocalTerminationDisabler https://bugs.webkit.org/show_bug.cgi?id=106510 Unreviewed build fix. With r139257(bug 106501), the LocalTerminationDisabler was removed from WebKit::ChildProcess. So, it should be removed on setCookiePersistentStorage, too. * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp: (WebKit::WebCookieManager::setCookiePersistentStorage): 2013-01-09 Alexey Proskuryakov [WK2] Get rid of LocalTerminationDisabler https://bugs.webkit.org/show_bug.cgi?id=106501 Reviewed by Anders Carlsson. LocalTerminationDisabler is no-op - termination timer can't fire inside its scope even if not stopped. * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::getSitesWithData): (WebKit::PluginProcess::clearSiteData): * Shared/ChildProcess.h: * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins): (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin): (WebKit::WebApplicationCacheManager::deleteAllEntries): (WebKit::WebApplicationCacheManager::setAppCacheMaximumSize): * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins): (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin): (WebKit::WebKeyValueStorageManager::deleteAllEntries): * WebProcess/MediaCache/WebMediaCacheManager.cpp: (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache): (WebKit::WebMediaCacheManager::clearCacheForHostname): (WebKit::WebMediaCacheManager::clearCacheForAllHostnames): * WebProcess/ResourceCache/WebResourceCacheManager.cpp: (WebKit::WebResourceCacheManager::getCacheOrigins): (WebKit::WebResourceCacheManager::clearCacheForOrigin): (WebKit::WebResourceCacheManager::clearCacheForAllOrigins): * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: (WebKit::WebDatabaseManager::getDatabasesByOrigin): (WebKit::WebDatabaseManager::getDatabaseOrigins): (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin): (WebKit::WebDatabaseManager::deleteDatabasesForOrigin): (WebKit::WebDatabaseManager::deleteAllDatabases): (WebKit::WebDatabaseManager::setQuotaForOrigin): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::getSitesWithPluginData): (WebKit::WebProcess::clearPluginSiteData): 2013-01-09 Kiran Muppala Add user defaults to override system proxy settings for NetworkProcess on Mac https://bugs.webkit.org/show_bug.cgi?id=104197 Reviewed by Brady Eidson. For internal testing and debugging, it is useful to have a defaults write to set the HTTP and HTTPS proxy specific to a WebKit2 client application and not affect the system proxy settings on Mac. * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::overrideSystemProxies): Add helper method to parse proxy URLs and populate settings dictionary passed to WKCFNetworkSetOverrideSystemProxySettings. (WebKit::NetworkProcess::platformInitializeNetworkProcess): Call overrideSystemProxies if process creation parameters for http proxy or https proxy is set. * Shared/Network/NetworkProcessCreationParameters.cpp: Add httpProxy and httpsProxy process creation parameters on Mac. (WebKit::NetworkProcessCreationParameters::encode): (WebKit::NetworkProcessCreationParameters::decode): * Shared/Network/NetworkProcessCreationParameters.h: * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeNetworkProcess): Initialize httpProxy and httpsProxy process creation parameters based on the value of WebKit2HTTPProxyDefaultsKey and WebKit2HTTPSProxyDefaultsKey user default respectively. 2013-01-09 Alexey Proskuryakov Local builds of NetworkProcess should have a process icon https://bugs.webkit.org/show_bug.cgi?id=106489 Reviewed by Mark Rowe. * Resources/WebKit.icns: Copied from Source/WebKit2/WebProcess/mac/WebKit.icns. * WebProcess/mac/WebKit.icns: Removed. Copied to a shared location. We don't have different icons, so just using WebKit one. * Configurations/NetworkProcess.xcconfig: * NetworkProcess/Info.plist: * WebKit2.xcodeproj/project.pbxproj: Same changes as for WebProcess. 2013-01-09 Andras Becsi [Qt][WK2] Fix a typo in in the double-tap-to-zoom logic Rubber-stamped by Csaba Osztrogonác. The qMin for the upper boundary of the scale was accidentally changed to qMax in r139189, change it back to fix the Qt API tests. * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded): 2013-01-09 Andras Becsi [Qt][EFL][WK2] Remove redundant device pixel ratio adjustment from PageViewportController https://bugs.webkit.org/show_bug.cgi?id=106355 Reviewed by Kenneth Rohde Christiansen. Since r137597 Qt uses the device pixel ratio of the underlying platform window as the device pixel ratio in WebCore. The tiles are rendered with the effective scale (scale adjusted with the device scale factor) and the projection matrix is also adjusted with the device pixel ratio when painting. As a result we can follow the same approach as QtQuick and all the coordinates in PageViewportController need to be in device independent pixels (UI pixels) thus we do no longer need to adjust with the device pixel ratio when calculating the viewport attributes. This simplifies the logic significantly and increases robustness, but does not allow to set a custom device pixel ratio different from the factor of the underlying platform (eg. for testing purposes). This patch is conceptually a follow-up of r137597 and fixes layout and canvas size on retina display. * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::PageViewportController): (WebKit::PageViewportController::innerBoundedViewportScale): (WebKit::PageViewportController::outerBoundedViewportScale): (WebKit::PageViewportController::pixelAlignedFloatPoint): (WebKit::PageViewportController::boundContentsPosition): (WebKit::PageViewportController::didRenderFrame): (WebKit::PageViewportController::pageTransitionViewportReady): (WebKit::PageViewportController::didChangeContentsVisibility): (WebKit::PageViewportController::syncVisibleContents): (WebKit::PageViewportController::visibleContentsSize): (WebKit::PageViewportController::applyScaleAfterRenderingContents): (WebKit::PageViewportController::updateMinimumScaleToFit): * UIProcess/PageViewportController.h: (WebKit::PageViewportController::currentContentsScale): (PageViewportController): * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::updateViewportSize): Adjust the viewport size with the device pixel ratio to keep previous behaviour. * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::focusEditableArea): (WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded): * UIProcess/qt/QtWebPageSGNode.cpp: (WebKit::ContentsSGNode::clipRect): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::sendViewportAttributesChanged): 2013-01-09 Carlos Garcia Campos Unreviewed. Fix make distcheck. * GNUmakefile.list.am: Add missing headers. 2013-01-08 Sam Weinig Add Owners file. * Owners: Added. 2013-01-08 Anders Carlsson Unbreak the world. * WebProcess/com.apple.WebProcess.sb.in: 2013-01-08 Anders Carlsson Silence a sandbox violation https://bugs.webkit.org/show_bug.cgi?id=106386 Reviewed by Andreas Kling. * WebProcess/com.apple.WebProcess.sb.in: 2013-01-08 Sam Weinig This should be camel case. Must remove to fix. * OWNERS: Removed. 2013-01-08 Alexey Proskuryakov Network process temporary and cache directories are not set correctly Reviewed by Sam Weinig. Set DIRHELPER_USER_DIR_SUFFIX, like we do for WebProcess. Also while in this function, enabled sandbox-style file quarantine. * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::initializeSandbox): 2013-01-08 Anders Carlsson Use correct capitalization in service name https://bugs.webkit.org/show_bug.cgi?id=106368 Reviewed by Andreas Kling. * WebProcess/com.apple.WebProcess.sb.in: 2013-01-08 Anders Carlsson Tweak sandbox profile https://bugs.webkit.org/show_bug.cgi?id=106362 Reviewed by Sam Weinig. * WebProcess/com.apple.WebProcess.sb.in: Allow access to com.apple.CoreServices.launchservicesd. 2013-01-08 Sam Weinig Add OWNERS file. * OWNERS: Added. 2013-01-08 Mark Lam Removed the need for the ProposedDatabase mechanism. https://bugs.webkit.org/show_bug.cgi?id=106292. Reviewed by Sam Weinig. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::exceededDatabaseQuota): * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): 2013-01-08 Sam Weinig Remove dead Connection members in ChildProcess subclasses (and their users) https://bugs.webkit.org/show_bug.cgi?id=106347 Reviewed by Alexey Proskuryakov. This also fixes a crash when entering fullscreen with a plug-in. * PluginProcess/PluginProcess.h: Remove dead m_connection member. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::setModalWindowIsShowing): (WebKit::PluginProcess::setFullscreenWindowIsShowing): Replace use of m_connection, which is dead, with parentProcessConnection(). * SharedWorkerProcess/SharedWorkerProcess.h: (SharedWorkerProcess): Remove dead m_connection member. * SharedWorkerProcess/SharedWorkerProcess.cpp: (WebKit::SharedWorkerProcess::createWebProcessConnection): Replace use of m_connection, which is dead, with parentProcessConnection(). 2013-01-07 Alexey Proskuryakov [WK2] NetworkProcess should have a Keychain shim https://bugs.webkit.org/show_bug.cgi?id=106286 Reviewed by Sam Weinig. Renamed WebProcessShim to SecItemShim. Use it with NetworkProcess, too. * WebProcess/mac/SecItemShimLibrary.h: Copied from Source/WebKit2/WebProcess/mac/WebProcessShim.h. * WebProcess/mac/SecItemShimLibrary.mm: Copied from Source/WebKit2/WebProcess/mac/WebProcessShim.mm. This code lives in SecItemShim.dylib. "Library" in the name is to avoid conflicting with SecItemShim class in WebKit2. * Shared/mac/SecItemShim.cpp: (WebKit::sendSecItemRequest): (WebKit::SecItemShim::initialize): * Shared/mac/SecItemShim.h: Take a ChildProcess pointer at initialization instead of using using WebProcess::shared(). * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::addDYLDEnvironmentAdditions): Use SecItemShim with NetworkProcess too. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeConnection): * NetworkProcess/NetworkProcess.h: * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::platformInitializeNetworkProcess): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didFinishLaunching): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeConnection): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeProcess): * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMainDelegate::doPreInitializationWork): * WebProcess/mac/WebProcessServiceEntryPoints.mm: (webProcessServiceMain): (initializeWebProcessForWebProcessServiceForWebKitDevelopment): * WebProcess/mac/WebProcessShim.h: Removed. * WebProcess/mac/WebProcessShim.mm: Removed. * WebProcessService/Info.plist: 2013-01-08 Kihong Kwon Add DeviceProximityController to support Device Proximity Events. https://bugs.webkit.org/show_bug.cgi?id=97630 Reviewed by Hajime Morita. Add initial WebDeviceProximityClient class which is inherited DeviceProximityClient. But startUpdating and stopUpdating need to be implemented. * CMakeLists.txt: * WebProcess/WebCoreSupport/WebDeviceProximityClient.cpp: Added. (WebKit): (WebKit::WebDeviceProximityClient::WebDeviceProximityClient): (WebKit::WebDeviceProximityClient::startUpdating): (WebKit::WebDeviceProximityClient::stopUpdating): (WebKit::WebDeviceProximityClient::hasLastData): * WebProcess/WebCoreSupport/WebDeviceProximityClient.h: Added. (WebKit): (WebDeviceProximityClient): (WebKit::WebDeviceProximityClient::~WebDeviceProximityClient): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): 2013-01-03 Sergio Villar Senin [GTK] Add WebP image support https://bugs.webkit.org/show_bug.cgi?id=105915 Reviewed by Martin Robinson. * GNUmakefile.am: link against WebP library. 2013-01-08 Csaba Osztrogonác [Qt][Win] Unreviewed buildfix, partially revert r139003, because Qt port still uses these files. * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Added. * Platform/CoreIPC/win/ConnectionWin.cpp: Added. * Platform/win/SharedMemoryWin.cpp: Added. * Platform/win/WorkQueueWin.cpp: Added. 2013-01-07 Christophe Dumez [CoordinatedGraphics] compositing/repaint/resize-repaint.html is failing https://bugs.webkit.org/show_bug.cgi?id=104637 Reviewed by Noam Rosenthal. r137526 attempted to fix excessive repainting when compositing layers change size. However, the fix did not suffice for ports using Coordinated Graphics because CoordinatedGraphicsLayer::setSize() was calling setNeedsDisplay() causing a full repaint. This patch removes the call to setNeedsDisplay() in CoordinatedGraphicsLayer::setSize() so that we don't unconditionally repaint CoordinatedGraphics layers when their size changes. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setSize): 2013-01-07 Christophe Dumez [CoordinatedGraphics] Support invalidation tracking for CoordinatedGraphicsLayer https://bugs.webkit.org/show_bug.cgi?id=106002 Reviewed by Noam Rosenthal. Add calls to addRepaintRect() to CoordinatedGraphicsLayer so that we can track invalidation in the composited layer. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setContentsNeedsDisplay): (WebCore::CoordinatedGraphicsLayer::setNeedsDisplay): Pass a FloatRect instead of an IntRect to setNeedsDisplayInRect() since it is what it expects. (WebCore::CoordinatedGraphicsLayer::setNeedsDisplayInRect): 2013-01-07 Anders Carlsson Remove PLATFORM(WIN) #ifdefs https://bugs.webkit.org/show_bug.cgi?id=106279 Reviewed by Sam Weinig. * Platform/CoreIPC/BinarySemaphore.cpp: * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::waitForSyncReply): * Platform/CoreIPC/Connection.h: (Client): * Platform/Module.cpp: (WebKit::Module::Module): * Platform/Module.h: (Module): * Platform/PlatformProcessIdentifier.h: (WebKit): * Shared/CommandLine.h: (CommandLine): * Shared/FontSmoothingLevel.h: * Shared/LayerTreeContext.h: (LayerTreeContext): * Shared/NativeWebKeyboardEvent.h: (NativeWebKeyboardEvent): * Shared/NativeWebMouseEvent.h: (NativeWebMouseEvent): * Shared/NativeWebWheelEvent.h: (NativeWebWheelEvent): * Shared/PlatformPopupMenuData.cpp: (WebKit::PlatformPopupMenuData::PlatformPopupMenuData): (WebKit::PlatformPopupMenuData::encode): (WebKit::PlatformPopupMenuData::decode): * Shared/PlatformPopupMenuData.h: (PlatformPopupMenuData): * Shared/Plugins/PluginModuleInfo.h: (PluginModuleInfo): (WebKit::PluginModuleInfo::isolatedCopy): * Shared/ShareableBitmap.h: (ShareableBitmap): * Shared/WebCoreArgumentCoders.h: * Shared/WebEvent.h: (WebMouseEvent): * Shared/WebEventConversion.cpp: (WebKit::WebKit2PlatformMouseEvent::WebKit2PlatformMouseEvent): * Shared/WebMouseEvent.cpp: (WebKit::WebMouseEvent::WebMouseEvent): (WebKit::WebMouseEvent::encode): (WebKit::WebMouseEvent::decode): * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: (WebPageCreationParameters): * Shared/WebPreferencesStore.h: (WebKit): * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::WebProcessCreationParameters): (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: (WebProcessCreationParameters): * Shared/WebURLRequest.h: * Shared/WebURLResponse.h: * Shared/cg/ShareableBitmapCG.cpp: (WebKit::ShareableBitmap::makeCGImageCopy): * UIProcess/API/C/WKAPICast.h: (WebKit::toFontSmoothingLevel): (WebKit::toAPI): * UIProcess/API/C/WKPage.cpp: * UIProcess/BackingStore.h: (BackingStore): * UIProcess/PageClient.h: (WebKit): (PageClient): * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): * UIProcess/WebContext.h: (WebContext): * UIProcess/WebFullScreenManagerProxy.h: (WebKit): * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::WebInspectorProxy): * UIProcess/WebInspectorProxy.h: (WebInspectorProxy): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::performDragControllerAction): (WebKit::WebPageProxy::didReceiveEvent): (WebKit::WebPageProxy::creationParameters): (WebKit): * UIProcess/WebPageProxy.h: (WebKit): (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * UIProcess/WebProcessProxy.h: (WebProcessProxy): * WebKit2Prefix.h: * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: (WKBundleFrameCopyWebArchiveFilteringSubframes): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setPrivateBrowsingEnabled): (WebKit::InjectedBundle::switchNetworkLoaderToNewTestingSession): * WebProcess/InjectedBundle/InjectedBundle.h: (WebKit): (InjectedBundle): * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): * WebProcess/Plugins/Netscape/NetscapePlugin.h: (NetscapePlugin): * WebProcess/Plugins/PluginController.h: (PluginController): * WebProcess/Plugins/PluginView.cpp: * WebProcess/Plugins/PluginView.h: (PluginView): * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::selectItemWritingDirectionIsNatural): (WebKit::WebChromeClient::selectItemAlignmentFollowsMenuWritingDirection): (WebKit): * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): * WebProcess/WebCoreSupport/WebDragClient.cpp: (WebKit): * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::respondToChangedSelection): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: (WebFrameLoaderClient): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: * WebProcess/WebCoreSupport/WebPopupMenu.cpp: (WebKit::WebPopupMenu::updateFromElement): * WebProcess/WebKitMain.cpp: * WebProcess/WebPage/DrawingArea.h: (WebKit): (DrawingArea): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::createGraphicsContext): * WebProcess/WebPage/DrawingAreaImpl.h: (DrawingAreaImpl): * WebProcess/WebPage/LayerTreeHost.cpp: (WebKit::LayerTreeHost::create): * WebProcess/WebPage/LayerTreeHost.h: (WebCore): (WebKit): (LayerTreeHost): * WebProcess/WebPage/WebFrame.cpp: (WebKit): * WebProcess/WebPage/WebFrame.h: (WebFrame): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::installPageOverlay): (WebKit::WebPage::uninstallPageOverlay): (WebKit::WebPage::getWebArchiveOfFrame): (WebKit): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::ensurePrivateBrowsingSession): (WebKit::WebProcess::destroyPrivateBrowsingSession): * WebProcess/WebProcess.h: (WebProcess): * WebProcess/WebProcess.messages.in: * config.h: 2013-01-07 Alexey Proskuryakov [WK2] Delete more obsolete Keychain code https://bugs.webkit.org/show_bug.cgi?id=106276 Reviewed by Sam Weinig. Deleting dead code. * Shared/mac/KeychainAttribute.cpp: Removed. * Shared/mac/KeychainAttribute.h: Removed. * WebKit2.xcodeproj/project.pbxproj: 2013-01-07 Alexey Proskuryakov [WK2] Merge SecItemShimMethods files into SecItemShim https://bugs.webkit.org/show_bug.cgi?id=106278 Reviewed by Anders Carlsson. Now that we have a SecItemShim class, there is no reason to split implementation into a separate file. * Shared/mac/SecItemShim.cpp: (WebKit::responseMap): (WebKit::generateSecItemRequestID): (WebKit::sendSecItemRequest): (WebKit::webSecItemCopyMatching): (WebKit::webSecItemAdd): (WebKit::webSecItemUpdate): (WebKit::webSecItemDelete): (WebKit::SecItemShim::secItemResponse): (WebKit::SecItemShim::install): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/mac/SecItemShimMethods.h: Removed. * WebProcess/mac/SecItemShimMethods.mm: Removed. 2013-01-07 Ryosuke Niwa Sorted the xcodeproj file. * WebKit2.xcodeproj/project.pbxproj: 2013-01-07 Alexey Proskuryakov [WK2] Make SecItemShim messages work with any process https://bugs.webkit.org/show_bug.cgi?id=106269 Reviewed by Sam Weinig. Add SecItemShim and SecItemShimProxy classes to manage message sending, and moved relevant code from WebProcess(Proxy). * DerivedSources.make: * Platform/CoreIPC/MessageID.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didFinishLaunching): * UIProcess/WebProcessProxy.h: (WebProcessProxy): * UIProcess/WebProcessProxy.messages.in: * Shared/mac/SecItemShim.cpp: Added. (WebKit::SecItemShim::shared): (WebKit::SecItemShim::SecItemShim): (WebKit::SecItemShim::secItemResponse): (WebKit::SecItemShim::install): (WebKit::SecItemShim::didReceiveMessageOnConnectionWorkQueue): * Shared/mac/SecItemShim.h: Added. * Shared/mac/SecItemShim.messages.in: Added. * UIProcess/mac/SecItemShimProxy.cpp: Added. (WebKit::SecItemShimProxy::shared): (WebKit::SecItemShimProxy::SecItemShimProxy): (WebKit::handleSecItemRequest): (WebKit::dispatchFunctionOnQueue): (WebKit::SecItemShimProxy::secItemRequest): (WebKit::SecItemShimProxy::didReceiveMessageOnConnectionWorkQueue): * UIProcess/mac/SecItemShimProxy.h: Added. * UIProcess/mac/SecItemShimProxy.messages.in: Added. * UIProcess/mac/WebProcessProxyMac.mm: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeConnection): * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: * WebProcess/mac/SecItemShimMethods.mm: (WebKit::sendSeqItemRequest): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeProcess): 2013-01-07 Anders Carlsson Remove Windows files from WebKit2 https://bugs.webkit.org/show_bug.cgi?id=106264 Reviewed by Sam Weinig. * Platform/CoreIPC/win/BinarySemaphoreWin.cpp: Removed. * Platform/CoreIPC/win/ConnectionWin.cpp: Removed. * Platform/win/ModuleWin.cpp: Removed. * Platform/win/SharedMemoryWin.cpp: Removed. * Platform/win/WorkQueueWin.cpp: Removed. * Shared/API/c/win/WKBaseWin.h: Removed. * Shared/API/c/win/WKCertificateInfoWin.cpp: Removed. * Shared/API/c/win/WKCertificateInfoWin.h: Removed. * Shared/Plugins/Netscape/win/NetscapePluginModuleWin.cpp: Removed. * Shared/cg/win/ShareableBitmapCGWin.cpp: Removed. * Shared/win/CoalescedWindowGeometriesUpdater.cpp: Removed. * Shared/win/CoalescedWindowGeometriesUpdater.h: Removed. * Shared/win/CommandLineWin.cpp: Removed. * Shared/win/LayerTreeContextWin.cpp: Removed. * Shared/win/NativeWebKeyboardEventWin.cpp: Removed. * Shared/win/NativeWebMouseEventWin.cpp: Removed. * Shared/win/NativeWebWheelEventWin.cpp: Removed. * Shared/win/PlatformCertificateInfo.cpp: Removed. * Shared/win/PlatformCertificateInfo.h: Removed. * Shared/win/ShareableBitmapWin.cpp: Removed. * Shared/win/WebCoreArgumentCodersWin.cpp: Removed. * Shared/win/WebEventFactory.cpp: Removed. * Shared/win/WebEventFactory.h: Removed. * Shared/win/WebKitBundle.cpp: Removed. * Shared/win/WebKitBundle.h: Removed. * Shared/win/WebURLRequestWin.cpp: Removed. * Shared/win/WebURLResponseWin.cpp: Removed. * Shared/win/WindowGeometry.cpp: Removed. * Shared/win/WindowGeometry.h: Removed. * UIProcess/API/C/win/WKAPICastWin.h: Removed. * UIProcess/API/C/win/WKContextPrivateWin.h: Removed. * UIProcess/API/C/win/WKContextWin.cpp: Removed. * UIProcess/API/C/win/WKView.cpp: Removed. * UIProcess/API/C/win/WKView.h: Removed. * UIProcess/API/C/win/WKViewPrivate.cpp: Removed. * UIProcess/API/C/win/WKViewPrivate.h: Removed. * UIProcess/Launcher/win/ProcessLauncherWin.cpp: Removed. * UIProcess/Plugins/win/PluginInfoStoreWin.cpp: Removed. * UIProcess/win/BackingStoreWin.cpp: Removed. * UIProcess/win/TextCheckerWin.cpp: Removed. * UIProcess/win/WebContextMenuProxyWin.cpp: Removed. * UIProcess/win/WebContextMenuProxyWin.h: Removed. * UIProcess/win/WebContextWin.cpp: Removed. * UIProcess/win/WebFullScreenManagerProxyWin.cpp: Removed. * UIProcess/win/WebInspectorProxyWin.cpp: Removed. * UIProcess/win/WebPageProxyWin.cpp: Removed. * UIProcess/win/WebPopupMenuProxyWin.cpp: Removed. * UIProcess/win/WebPopupMenuProxyWin.h: Removed. * UIProcess/win/WebProcessProxyWin.cpp: Removed. * UIProcess/win/WebUndoClient.cpp: Removed. * UIProcess/win/WebUndoClient.h: Removed. * UIProcess/win/WebView.cpp: Removed. * UIProcess/win/WebView.h: Removed. * WebProcess/Downloads/cf/win/DownloadCFWin.cpp: Removed. * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.cpp: Removed. * WebProcess/InjectedBundle/API/c/win/WKBundlePrivateWin.h: Removed. * WebProcess/InjectedBundle/win/InjectedBundleWin.cpp: Removed. * WebProcess/Plugins/Netscape/win/NetscapePluginWin.cpp: Removed. * WebProcess/WebCoreSupport/win/WebContextMenuClientWin.cpp: Removed. * WebProcess/WebCoreSupport/win/WebDragClientWin.cpp: Removed. * WebProcess/WebCoreSupport/win/WebDragSource.cpp: Removed. * WebProcess/WebCoreSupport/win/WebDragSource.h: Removed. * WebProcess/WebCoreSupport/win/WebErrorsWin.cpp: Removed. * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.cpp: Removed. * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h: Removed. * WebProcess/WebCoreSupport/win/WebPopupMenuWin.cpp: Removed. * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.cpp: Removed. * WebProcess/WebPage/ca/win/LayerTreeHostCAWin.h: Removed. * WebProcess/WebPage/ca/win/WKCACFViewWindow.cpp: Removed. * WebProcess/WebPage/ca/win/WKCACFViewWindow.h: Removed. * WebProcess/WebPage/win/DrawingAreaImplWin.cpp: Removed. * WebProcess/WebPage/win/LayerTreeHostWin.cpp: Removed. * WebProcess/WebPage/win/WebInspectorWin.cpp: Removed. * WebProcess/WebPage/win/WebPageWin.cpp: Removed. * WebProcess/win/WebProcessMainWin.cpp: Removed. * WebProcess/win/WebProcessWin.cpp: Removed. 2013-01-07 Xianzhu Wang Add window.internals.nonFastScrollableRects for testing scrollable areas in fast/slow paths https://bugs.webkit.org/show_bug.cgi?id=105546 Reviewed by James Robinson. Export the new symbol. * win/WebKit2.def.in: 2013-01-07 Mike West Make the IFRAME_SEAMLESS flag runtime-enabled. https://bugs.webkit.org/show_bug.cgi?id=106213 Reviewed by Ojan Vafai. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetSeamlessIFramesEnabled): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setSeamlessIFramesEnabled): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): Add a toggle for seamless IFrames to InjectedBundle, and set it to true when beginning testing. 2013-01-07 Alexey Proskuryakov [WK2] Remove more obsolete shim code https://bugs.webkit.org/show_bug.cgi?id=106248 Reviewed by Anders Carlsson. Removing KeychainItemShimCallbacks, and SecItemRequestData::CopyContent, which was only needed for that obsolete version of shim. We now use WebProcessSecItemShimCallbacks. * Shared/mac/SecItemRequestData.h: * UIProcess/mac/WebProcessProxyMac.mm: (WebKit::handleSecItemRequest): * WebProcess/mac/WebProcessShim.h: 2013-01-05 Sam Weinig Merge child process main functions as much as possible https://bugs.webkit.org/show_bug.cgi?id=106192 Reviewed by Anders Carlsson. To reduce copied code, this merges the Mac main functions for the WebProcess, NetworkProcess, PluginProcess, and SharedWorkerProcess. Since slight variations are needed, it adds a delegate class for hooks into the main function that each process can override if necessary. * NetworkProcess/mac/NetworkProcessMainMac.mm: (WebKit::NetworkProcessMain): Remove almost everything with a call to ChildProcessMain with the default delegate. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitializeProcess): Move defaults registration here from PluginProcessMainMac. * PluginProcess/mac/PluginProcessMainMac.mm: (PluginProcessMainDelegate): Add a delegate for the new shared main function that does does PluginProcess specific work. (WebKit::PluginProcessMainDelegate::doPreInitializationWork): Move DYLD_INSERT_LIBRARIES removal and createPluginMIMETypesPreferences special mode to this pre-initialization hook. (WebKit::PluginProcessMainDelegate::doPostRunWork): Move private temporary and cache directories clean up to this post run hook. (WebKit::PluginProcessMain): Call the ChildProcessMain shared main function with the PluginProcess as the process to initialize and PluginProcessMainDelegate as the main delegate. * Shared/mac/ChildProcessMain.h: Added. (ChildProcessMainDelegate): ChildProcessMainDelegate is a helper class that process can subclass to hook into the main function. (WebKit::ChildProcessMain): Add a single version of the "main" function that uses the ChildProcessMainDelegate to allow processes to hook into it. * Shared/mac/ChildProcessMain.mm: (WebKit::ChildProcessMainDelegate::~ChildProcessMainDelegate): (WebKit::ChildProcessMainDelegate::installSignalHandlers): (WebKit::ChildProcessMainDelegate::doPreInitializationWork): (WebKit::ChildProcessMainDelegate::getConnectionIdentifier): (WebKit::ChildProcessMainDelegate::getClientIdentifier): (WebKit::ChildProcessMainDelegate::getClientProcessName): (WebKit::ChildProcessMainDelegate::doPostRunWork): Add default implementations of the delegate hooks, most processes should be able to use the defaults. * SharedWorkerProcess/mac/SharedWorkerProcessMainMac.mm: (WebKit::SharedWorkerProcessMain): Remove almost everything with a call to ChildProcessMain with the default delegate. * WebKit2.xcodeproj/project.pbxproj: Add new files. * WebProcess/mac/WebProcessMainMac.mm: (WebProcessMainDelegate): Add a delegate for the new shared main function that does does WebProcess specific work. (WebKit::WebProcessMainDelegate::doPreInitializationWork): Move DYLD_INSERT_LIBRARIES removal to this this pre-initialization hook. (WebKit::WebProcessMainDelegate::getConnectionIdentifier): A custom getConnectionIdentifier is necessary for the WebProcess to keep support for having the WebProcess be able to launch the UIProcess (for debugging purposes). (WebKit::WebProcessMainDelegate::getClientIdentifier): For the same reasons as about, a custom getClientIdentifier is needed. (WebKit::WebProcessMain): Call the ChildProcessMain shared main function with the WebProcess as the process to initialize and WebProcessMainDelegate as the main delegate. 2013-01-07 Simon Fraser Make WKViews work when layer-backed https://bugs.webkit.org/show_bug.cgi?id=106166 Reviewed by Sam Weinig. When not in TileCache mode, WebKit2 views had redraw problems on scrolling, if layer-backed. The issue is that the DrawingAreaProxy code tries to optimize scrolling by calling -scrollRect:by: on the WKView (an NSView) to copy bits, rather than repainting the entire view. However, -scrollRect:by: does nothing for NSViews that have layers. Fix by plumbing through a canScrollView() function which PageClientImpl() implements, returning true if the view does not have layer backing. When canScrollView() is false, DrawingAreaProxyImpl::incorporateUpdate() dirties the entire view. * UIProcess/API/gtk/PageClientImpl.h: (WebKit::PageClientImpl::canScrollView): * UIProcess/API/mac/PageClientImpl.h: (PageClientImpl): * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::canScrollView): * UIProcess/API/qt/raw/qrawwebview_p_p.h: (QRawWebViewPrivate::canScrollView): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::incorporateUpdate): * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::canScrollView): * UIProcess/WebPageProxy.h: * UIProcess/efl/PageClientBase.h: (WebKit::PageClientBase::canScrollView): * UIProcess/qt/QtPageClient.h: (WebKit::QtPageClient::canScrollView): * UIProcess/win/WebView.h: (WebKit::WebView::canScrollView): 2013-01-04 Sam Weinig Remove WebProcessInitialization and NetworkProcessInitialization by putting the rest of initialization in ChildProcess derived classes https://bugs.webkit.org/show_bug.cgi?id=106163 Reviewed by Darin Adler. Adds ChildProcess::initializeProcessName() and the catchall ChildProcess::initializeProcess() as the last pieces to have all the initialization from WebProcessInitialization and NetworkProcessInitialization captured in ChildProcess and derived classes. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeProcessName): (WebKit::NetworkProcess::initializeSandbox): * NetworkProcess/NetworkProcess.h: (NetworkProcess): * NetworkProcess/mac/NetworkProcessInitialization.h: Removed. * NetworkProcess/mac/NetworkProcessInitialization.mm: Removed. * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::initializeProcessName): (WebKit::NetworkProcess::initializeSandbox): * NetworkProcess/mac/NetworkProcessMainMac.mm: (WebKit::NetworkProcessMain): * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::initializeProcess): * PluginProcess/PluginProcess.h: (PluginProcess): * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitializeProcess): * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): * PluginProcess/qt/PluginProcessQt.cpp: (WebKit::PluginProcess::platformInitializeProcess): (WebKit::PluginProcess::platformInitializePluginProcess): * PluginProcess/unix/PluginProcessUnix.cpp: (WebKit::PluginProcess::platformInitializeProcess): * Shared/ChildProcess.cpp: (WebKit::ChildProcess::initialize): (WebKit::ChildProcess::initializeProcess): (WebKit::ChildProcess::initializeProcessName): (WebKit::ChildProcess::initializeSandbox): (WebKit::ChildProcess::initializeConnection): * Shared/ChildProcess.h: (ChildProcess): * SharedWorkerProcess/mac/SharedWorkerProcessMainMac.mm: (WebKit::SharedWorkerProcessMain): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeProcess): (WebKit::WebProcess::initializeProcessName): (WebKit::WebProcess::initializeSandbox): * WebProcess/WebProcess.h: (WebProcess): * WebProcess/mac/WebProcessInitialization.h: Removed. * WebProcess/mac/WebProcessInitialization.mm: Removed. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::initializeSandbox): (WebKit::WebProcess::initializeProcessName): (WebKit::WebProcess::platformInitializeProcess): * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): * WebProcess/mac/WebProcessServiceEntryPoints.mm: (WebKit::WebProcessServiceEventHandler): (initializeWebProcessForWebProcessServiceForWebKitDevelopment): 2013-01-04 Sam Weinig Fix failing API test. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeConnection): (WebKit::WebProcess::initializeWebProcess): The WebConnectionToUIProcess needs to be initialized before the injected bundle is, so that if the user tries to use it, its there. 2013-01-04 Sam Weinig Consolidate all the one time initialization functions into a single InitializeWebKit2() super function https://bugs.webkit.org/show_bug.cgi?id=106161 Reviewed by Simon Fraser. Adds InitializeWebKit2 and uses it. * CMakeLists.txt: * GNUmakefile.list.am: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): * NetworkProcess/mac/NetworkProcessInitialization.mm: (WebKit::initializeNetworkProcess): * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): * Shared/WebKit2Initialize.cpp: Copied from Source/WebKit2/NetworkProcess/mac/NetworkProcessInitialization.mm. (WebKit::InitializeWebKit2): * Shared/WebKit2Initialize.h: Copied from Source/WebKit2/NetworkProcess/mac/NetworkProcessInitialization.mm. (WebKit): * SharedWorkerProcess/mac/SharedWorkerProcessMainMac.mm: (WebKit::SharedWorkerProcessMain): * Target.pri: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): * WebProcess/mac/WebProcessInitialization.mm: (WebKit::initializeWebProcess): 2013-01-04 Sam Weinig Follow up to https://bugs.webkit.org/show_bug.cgi?id=106144, fixing some of Alexey's review comments. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::downloadProxyConnection): (WebKit::NetworkProcess::createNetworkConnectionToWebProcess): * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::createWebProcessConnection): (WebKit::PluginProcess::getSitesWithData): (WebKit::PluginProcess::clearSiteData): * Shared/ChildProcess.h: (WebKit::ChildProcess::parentProcessConnection): * SharedWorkerProcess/SharedWorkerProcess.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::downloadProxyConnection): (WebKit::WebProcess::addVisitedLink): (WebKit::WebProcess::removeWebFrame): (WebKit::WebProcess::getSitesWithPluginData): (WebKit::WebProcess::clearPluginSiteData): (WebKit::WebProcess::addPlugInAutoStartOrigin): (WebKit::WebProcess::plugInDidReceiveUserInteraction): (WebKit::WebProcess::getWebCoreStatistics): 2013-01-04 Sam Weinig Consolidate process initialization in ChildProcess https://bugs.webkit.org/show_bug.cgi?id=106144 Reviewed by Alexey Proskuryakov. Consolidate more functionality down into ChildProcess. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::didReceiveMessage): (WebKit::NetworkProcess::didReceiveSyncMessage): (WebKit::NetworkProcess::downloadProxyConnection): (WebKit::NetworkProcess::initializeNetworkProcess): (WebKit::NetworkProcess::createNetworkConnectionToWebProcess): (WebKit::NetworkProcess::initializeSandbox): * NetworkProcess/NetworkProcess.h: * NetworkProcess/mac/NetworkProcessInitialization.h: * NetworkProcess/mac/NetworkProcessInitialization.mm: (WebKit::initializeNetworkProcess): * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::platformInitializeNetworkProcess): * NetworkProcess/mac/NetworkProcessMainMac.mm: (WebKit::NetworkProcessMain): * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::PluginProcess): (WebKit::PluginProcess::initializePluginProcess): (WebKit::PluginProcess::createWebProcessConnection): (WebKit::PluginProcess::getSitesWithData): (WebKit::PluginProcess::clearSiteData): * PluginProcess/PluginProcess.h: (PluginProcess): * PluginProcess/mac/PluginProcessMac.mm: (WebKit::initializeShim): (WebKit::initializeCocoaOverrides): (WebKit::PluginProcess::platformInitialize): (WebKit::PluginProcess::platformInitializePluginProcess): * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): * PluginProcess/qt/PluginProcessMainQt.cpp: (WebKit::PluginProcessMain): * PluginProcess/qt/PluginProcessQt.cpp: (WebKit::PluginProcess::platformInitializePluginProcess): * PluginProcess/unix/PluginProcessMainUnix.cpp: (WebKit::PluginProcessMainUnix): * PluginProcess/unix/PluginProcessUnix.cpp: (WebKit::PluginProcess::platformInitializePluginProcess): * Shared/ChildProcess.cpp: (WebKit::ChildProcess::ChildProcess): (WebKit::watchdogCallback): (WebKit::didCloseOnConnectionWorkQueue): (WebKit::ChildProcess::initialize): (WebKit::ChildProcess::initializeConnection): (WebKit::ChildProcess::initializeSandbox): (WebKit::ChildProcess::terminate): * Shared/ChildProcess.h: (ChildProcessInitializationParameters): (ChildProcess): (WebKit::ChildProcess::connection): (WebKit::ChildProcess::destinationID): (WebKit::ChildProcess::messageReceiverMap): * SharedWorkerProcess/SharedWorkerProcess.cpp: (WebKit::SharedWorkerProcess::initializeSharedWorkerProcess): * SharedWorkerProcess/SharedWorkerProcess.h: (SharedWorkerProcess): * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm: (WebKit::SharedWorkerProcess::platformInitializeSharedWorkerProcess): * SharedWorkerProcess/mac/SharedWorkerProcessMainMac.mm: (WebKit::SharedWorkerProcessMain): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeConnection): (WebKit::WebProcess::downloadProxyConnection): (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::terminate): (WebKit::WebProcess::didReceiveSyncMessage): (WebKit::WebProcess::didReceiveMessage): (WebKit::WebProcess::removeWebFrame): (WebKit::WebProcess::initializeSandbox): * WebProcess/WebProcess.h: * WebProcess/efl/WebProcessMainEfl.cpp: (WebKit::WebProcessMainEfl): * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): * WebProcess/mac/WebProcessInitialization.h: * WebProcess/mac/WebProcessInitialization.mm: (WebKit::initializeWebProcess): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitialize): * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): * WebProcess/mac/WebProcessServiceEntryPoints.mm: (WebKit::WebProcessServiceEventHandler): (initializeWebProcessForWebProcessServiceForWebKitDevelopment): * WebProcess/qt/WebProcessMainQt.cpp: (WebKit::WebProcessMainQt): 2013-01-04 Tim Horton [wk2] Remove non-visible tiles from the layer tree https://bugs.webkit.org/show_bug.cgi?id=106061 Reviewed by Simon Fraser. Add a setting to enable aggressive retention of TileCache tiles. If enabled, TileCache will generally try to keep around all tiles. This setting is off by default. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetAggressiveTileRetentionEnabled): (WKPreferencesGetAggressiveTileRetentionEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): Forward the setting to the TiledBacking. 2013-01-04 Sam Weinig Make process initialization more uniform by renaming initialization methods and removing extraneous parameters https://bugs.webkit.org/show_bug.cgi?id=106120 Reviewed by Brady Eidson. Rename FooProcess::initialize() -> FooProcess::initializeConnection() and removes the RunLoop parameter since it is always the same the as RunLoop::main(). * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeConnection): * NetworkProcess/NetworkProcess.h: (NetworkProcess): * NetworkProcess/mac/NetworkProcessInitialization.mm: (WebKit::initializeNetworkProcess): * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::initializeConnection): * PluginProcess/PluginProcess.h: * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): * PluginProcess/qt/PluginProcessMainQt.cpp: (WebKit::PluginProcessMain): * PluginProcess/unix/PluginProcessMainUnix.cpp: (WebKit::PluginProcessMainUnix): * SharedWorkerProcess/SharedWorkerProcess.cpp: (WebKit::SharedWorkerProcess::initializeConnection): * SharedWorkerProcess/SharedWorkerProcess.h: (SharedWorkerProcess): * SharedWorkerProcess/mac/SharedWorkerProcessMainMac.mm: (WebKit::SharedWorkerProcessMain): 2013-01-04 Adam Klein Remove ENABLE_MUTATION_OBSERVERS #define https://bugs.webkit.org/show_bug.cgi?id=105459 Reviewed by Ryosuke Niwa. * Configurations/FeatureDefines.xcconfig: 2013-01-04 Carlos Garcia Campos [WK2] [Gtk] crash when web inspector is attached, and window height is reduced. https://bugs.webkit.org/show_bug.cgi?id=106052 Reviewed by Martin Robinson. Do not allocate more size for the inspector view than its parent size. Also make sure that the view size is always at least 1. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (resizeWebKitWebViewBaseFromAllocation): 2013-01-04 Carlos Garcia Campos [GTK][Qt] Make compositing messages async again https://bugs.webkit.org/show_bug.cgi?id=106082 Reviewed by Simon Hausmann. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setComposition): (WebKit::WebPageProxy::confirmComposition): (WebKit::WebPageProxy::cancelComposition): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::confirmComposition): (WebKit::WebPage::setComposition): (WebKit::WebPage::cancelComposition): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: 2013-01-04 Christophe Dumez Regression(r138728): Causes crashes on the build bots https://bugs.webkit.org/show_bug.cgi?id=106083 Reviewed by Simon Hausmann. Update encodeTimingFunction() to encode the x/y members only if the bezierPreset is set to custom. This is needed because decodeTimingFunction() only decodes x/y members if the bezierPreset is set to custom. This fixes assertion hits on the debug build bots. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::encodeTimingFunction): 2013-01-04 Carlos Garcia Campos [SOUP] Convert WebSoupRequestManagerProxy to be WebContextSupplement https://bugs.webkit.org/show_bug.cgi?id=106012 Reviewed by Martin Robinson. * UIProcess/API/C/soup/WKContextSoup.cpp: (WKContextGetSoupRequestManager): * UIProcess/API/gtk/WebKitWebContext.cpp: (createDefaultWebContext): * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): (WebKit::WebContext::~WebContext): (WebKit::WebContext::disconnectProcess): * UIProcess/WebContext.h: (WebKit): (WebContext): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveURIRequest): * UIProcess/efl/WebContextEfl.cpp: (WebKit::WebContext::platformInitializeWebProcess): * UIProcess/gtk/WebContextGtk.cpp: (WebKit::WebContext::platformInitializeWebProcess): * UIProcess/soup/WebSoupRequestManagerProxy.cpp: (WebKit::WebSoupRequestManagerProxy::supplementName): (WebKit): (WebKit::WebSoupRequestManagerProxy::WebSoupRequestManagerProxy): (WebKit::WebSoupRequestManagerProxy::initializeClient): (WebKit::WebSoupRequestManagerProxy::contextDestroyed): (WebKit::WebSoupRequestManagerProxy::processDidClose): (WebKit::WebSoupRequestManagerProxy::refWebContextSupplement): (WebKit::WebSoupRequestManagerProxy::derefWebContextSupplement): (WebKit::WebSoupRequestManagerProxy::registerURIScheme): (WebKit::WebSoupRequestManagerProxy::didHandleURIRequest): (WebKit::WebSoupRequestManagerProxy::didReceiveURIRequestData): * UIProcess/soup/WebSoupRequestManagerProxy.h: (WebSoupRequestManagerProxy): 2013-01-04 Mikhail Pozdnyakov [EFL][WK2] Remove unneeded EwkViewImpl::informLoadCommitted() https://bugs.webkit.org/show_bug.cgi?id=106010 Reviewed by Gyuyoung Kim. Removed EwkViewImpl::informLoadCommitted() method to simplify the code. * UIProcess/API/efl/EwkViewImpl.cpp: * UIProcess/API/efl/EwkViewImpl.h: * UIProcess/efl/PageClientBase.h: (PageClientBase): * UIProcess/efl/PageLoadClientEfl.cpp: (WebKit::PageLoadClientEfl::didCommitLoadForFrame): 2013-01-03 Jon Lee REGRESSION(r138729): crash and assertion failures in WebKit::WebProcess::plugInDidReceiveUserInteraction https://bugs.webkit.org/show_bug.cgi?id=106042 Reviewed by Brady Eidson. The assertion is hit if plugin snapshotting is disabled, and the user interacts with a plug-in that comes from an origin not found in the cached dictionary. The proper fix is to check for whether the setting is enabled. Otherwise, that origin should be in the dictionary since the plugin is running. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginDidReceiveUserInteraction): Check for the setting, and avoid the whole code path if snapshotting is disabled. 2013-01-03 Roger Fong Remove all traces of Windows from WebKit2 folder. https://bugs.webkit.org/show_bug.cgi?id=105585. Reviewed by Sam Weinig. * win: Removed. * win/MainWin.cpp: Removed. * win/WebKit2.def.in: Removed. * win/WebKit2.make: Removed. * win/WebKit2.rc: Removed. * win/WebKit2.submit.sln: Removed. * win/WebKit2.vcproj: Removed. * win/WebKit2Apple.vsprops: Removed. * win/WebKit2CFLite.vsprops: Removed. * win/WebKit2Common.vsprops: Removed. * win/WebKit2Debug.vsprops: Removed. * win/WebKit2DebugAll.vsprops: Removed. * win/WebKit2DebugCairoCFLite.vsprops: Removed. * win/WebKit2DirectX.vsprops: Removed. * win/WebKit2ExportGenerator.vcproj: Removed. * win/WebKit2ExportGeneratorBuildCmd.cmd: Removed. * win/WebKit2ExportGeneratorCommon.vsprops: Removed. * win/WebKit2ExportGeneratorDebug.vsprops: Removed. * win/WebKit2ExportGeneratorDebugAll.vsprops: Removed. * win/WebKit2ExportGeneratorDebugCairoCFLite.vsprops: Removed. * win/WebKit2ExportGeneratorPostBuild.cmd: Removed. * win/WebKit2ExportGeneratorPreBuild.cmd: Removed. * win/WebKit2ExportGeneratorProduction.vsprops: Removed. * win/WebKit2ExportGeneratorRelease.vsprops: Removed. * win/WebKit2ExportGeneratorReleaseCairoCFLite.vsprops: Removed. * win/WebKit2Generated.make: Removed. * win/WebKit2Generated.vcproj: Removed. * win/WebKit2GeneratedCommon.vsprops: Removed. * win/WebKit2Production.vsprops: Removed. * win/WebKit2Release.vsprops: Removed. * win/WebKit2ReleaseCairoCFLite.vsprops: Removed. * win/WebKit2WebProcess.resources: Removed. * win/WebKit2WebProcess.resources/Info.plist: Removed. * win/WebKit2WebProcess.vcproj: Removed. * win/WebKit2WebProcessCommon.vsprops: Removed. * win/WebKit2WebProcessDebug.vsprops: Removed. * win/WebKit2WebProcessDebugAll.vsprops: Removed. * win/WebKit2WebProcessDebugCairoCFLite.vsprops: Removed. * win/WebKit2WebProcessPostBuild.cmd: Removed. * win/WebKit2WebProcessPreBuild.cmd: Removed. * win/WebKit2WebProcessProduction.vsprops: Removed. * win/WebKit2WebProcessRelease.vsprops: Removed. * win/WebKit2WebProcessReleaseCairoCFLite.vsprops: Removed. * win/WebKitPostBuild.cmd: Removed. * win/WebKitPreBuild.cmd: Removed. * win/WebKitPreLink.cmd: Removed. * win/build-generated-files.sh: Removed. * win/deleteButton.png: Removed. * win/deleteButtonPressed.png: Removed. * win/fsVideoAudioVolumeHigh.png: Removed. * win/fsVideoAudioVolumeLow.png: Removed. * win/fsVideoExitFullscreen.png: Removed. * win/fsVideoPause.png: Removed. * win/fsVideoPlay.png: Removed. * win/missingImage.png: Removed. * win/nullplugin.png: Removed. * win/panEastCursor.png: Removed. * win/panIcon.png: Removed. * win/panNorthCursor.png: Removed. * win/panNorthEastCursor.png: Removed. * win/panNorthWestCursor.png: Removed. * win/panSouthCursor.png: Removed. * win/panSouthEastCursor.png: Removed. * win/panSouthWestCursor.png: Removed. * win/panWestCursor.png: Removed. * win/resource.h: Removed. * win/searchCancel.png: Removed. * win/searchCancelPressed.png: Removed. * win/searchMagnifier.png: Removed. * win/searchMagnifierResults.png: Removed. * win/textAreaResizeCorner.png: Removed. * win/verticalTextCursor.png: Removed. * win/xcopy.excludes: Removed. * win/zoomInCursor.png: Removed. * win/zoomOutCursor.png: Removed. 2013-01-03 Kiran Muppala Ensure autorelease pool exists when calling WKNSProcessInfoProcessAssertionWithTypes on Mac https://bugs.webkit.org/show_bug.cgi?id=105674 Reviewed by Sam Weinig. The function WKNSProcessInfoProcessAssertionWithTypes returns a autoreleased object and since, it is called during process initialization prior to the runloop being started in PluginProcess and SharedWorkerProcess, an autorelease pool must be explictly created. * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): Enclose process initialization code in an @autoreleasepool block. * SharedWorkerProcess/mac/SharedWorkerProcessMainMac.mm: (WebKit::SharedWorkerProcessMain): Ditto. 2013-01-03 Csaba Osztrogonác [Qt] Unreviewed debug buildfix after r138723. * WebProcess/qt/QtBuiltinBundle.cpp: 2013-01-02 Jon Lee Revert auto-start plugins to snapshotted plugins after a period of inactivity https://bugs.webkit.org/show_bug.cgi?id=105973 Reviewed by Brady Eidson. Change the set of origin hashes maintained by the web process to a hash map that associates a timestamp for each hash. If the plug-in's origin is marked for auto-start, we also check it against the timestamp. If the time is later, then we consider the entry stale, and snapshot the plug-in instead. But, if the user interacts with the plug-in, we delay that expiration timestamp out, so that it expires a month from first interaction. To avoid too much chatter between the web processes and UI process, we only update the timestamp if a day a passed since the last change to the timestamp. * WebProcess/Plugins/PluginView.h: (PluginView): Add a member variable to flag whether the user had interacted with the plug-in. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::PluginView): Initialize the flag to false. (WebKit::PluginView::handleEvent): We consider mouse down, up, wheel, context menu, and keyboard events as user interaction. Do not consider mouse enter, leave, and move events as user interaction. Also, remove unneeded comments. (WebKit::PluginView::pluginDidReceiveUserInteraction): If this is the first time the function is called, tell the web process, so that the expiration timestamp can be updated. * WebProcess/WebProcess.messages.in: Update the messages to include the expiration time. * WebProcess/WebProcess.h: (WebProcess): Update the cached copy of the auto-start origins to include their expiration timestamps. Update the message signatures. Add a function to update the expiration timestamp for a specific origin. Rename plugInAutoStartOriginsChanged to resetPlugInAutoStartOrigins. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Instead of individually adding the origins in the provided vector, just call resetPlugInAutoStartOrigins(). (WebKit::WebProcess::isPlugInAutoStartOrigin): Check to see if the origin is in the table, and if so, check the current time against the expiration time. (WebKit::WebProcess::didAddPlugInAutoStartOrigin): Update the cached table. (WebKit::WebProcess::resetPlugInAutoStartOrigins): Swap the tables between the provided parameter and the member variable. We can safely do this because the function is called in two cases where the parameter is afterwards thrown away: when a new web process is created, and when it is called through an IPC message. (WebKit::WebProcess::plugInDidReceiveUserInteraction): When invoked, we tell the UI process to update the expiration time for the given origin if the time difference between the expiration time and the current time is less than the threshold plugInAutoStartExpirationTimeUpdateThreshold. * UIProcess/WebContext.messages.in: Add message that is called when the web process wants to update the expiration timestamp for the plug-in origin. * UIProcess/WebContext.cpp: (WebKit::WebContext::plugInDidReceiveUserInteraction): Forward to the provider. * UIProcess/WebContext.h: * UIProcess/Plugins/PlugInAutoStartProvider.cpp: (WebKit::expirationTimeFromNow): Returns a new time based on the current time + 1 month. (WebKit::PlugInAutoStartProvider::addAutoStartOrigin): Refactor. Set the expiration time for the added origin. (WebKit::PlugInAutoStartProvider::autoStartOriginsCopy): Refactor. (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy): Refactor to include the expiration times. Also, check the current time against the expiration time. If we are past the time, remove the entry from the copy. (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable): Refactor to extract and duplicate the provided map of origins and expiration timestamps. (WebKit::PlugInAutoStartProvider::didReceiveUserInteraction): Look for the origin hash. If found, update the expiration time. Update all existing web processes with the new expiration time, and tell the context client that the hashes have changed. * UIProcess/Plugins/PlugInAutoStartProvider.h: (PlugInAutoStartProvider): Change the m_autoStartHashes variable to a map of a hash to its domain entry in the auto-start table. It is used to cross-reference the auto-start table and update the origin's expiration time. * Shared/WebProcessCreationParameters.h: (WebProcessCreationParameters): Switch the creation parameter to seed the origin table to a map. 2013-01-03 Alexis Menard Querying transition-timing-function value on the computed style does not return keywords when it should. https://bugs.webkit.org/show_bug.cgi?id=105442 Reviewed by Simon Fraser. Update the code to pass the animations from one process to another as the constructor of TimingFunction changed to take an extra parameter holding the type of the cubic-bezier form. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::encodeTimingFunction): (CoreIPC::decodeTimingFunction): 2013-01-03 Rik Cabanier Canvas blending tests fail on Mac WK2 https://bugs.webkit.org/show_bug.cgi?id=105943 Reviewed by Simon Fraser. CanvasUsesAcceleratedDrawing preference was not passed to the WebProcess. * WebProcess/InjectedBundle/InjectedBundle.cpp: Adds support for CanvasUsesAcceleratedDrawing to WK2 (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): 2013-01-02 Caio Marcelo de Oliveira Filho [Qt] Use WebPageProxy::postMessageToInjectedBundle when passing messages to a specific page in the builtin bundle https://bugs.webkit.org/show_bug.cgi?id=105928 Reviewed by Simon Hausmann. Simplify the code since we now can send the contents as is, instead of packaging it inside an array that also contained the reference for the page. This was made possible after r126311. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::setNavigatorQtObjectEnabled): (QQuickWebViewExperimental::postMessage): Built the messages and used WebPageProxy::postMessageToInjectedBundle() directly. * UIProcess/qt/QtWebContext.cpp: Removed functions that now are simpler and were inlined in qquickwebview.cpp. * UIProcess/qt/QtWebContext.h: Ditto. * WebProcess/qt/QtBuiltinBundle.cpp: (WebKit::QtBuiltinBundle::initialize): Used the callback that gets messages for specific pages. Also changed the way we create the bundle client: now we fill the struct with zeros, and then set the fields we care about. This way if another field is added to that client, this code doesn't need to be changed. (WebKit::QtBuiltinBundle::didReceiveMessageToPage): (WebKit::QtBuiltinBundle::handleMessageToNavigatorQtObject): Changed to not read the page reference from the message, since we get it in the callback already. (WebKit::QtBuiltinBundle::handleSetNavigatorQtObjectEnabled): Ditto. * WebProcess/qt/QtBuiltinBundle.h: (QtBuiltinBundle): 2013-01-03 Jocelyn Turcotte [Qt] Fix a crash when the QQuickWebPage is destroyed between the scene graph sync and render. https://bugs.webkit.org/show_bug.cgi?id=106018 Reviewed by Simon Hausmann. The main and rendering threads are only guaranteed to be synchronised in the updatePaintNode call. In every other cases, QQuickItems cannot be safely accessed from the rendering thread. Do as the first patch version in https://bugs.webkit.org/show_bug.cgi?id=104574 was doing and copy the ratio value directly to fix the issue. Also add a note about the threading issue in QQuickWebPage::updatePaintNode. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::updatePaintNode): * UIProcess/qt/QtWebPageSGNode.cpp: (WebKit::QtWebPageSGNode::QtWebPageSGNode): * UIProcess/qt/QtWebPageSGNode.h: (QtWebPageSGNode): (WebKit::QtWebPageSGNode::devicePixelRatio): (WebKit::QtWebPageSGNode::setDevicePixelRatio): 2013-01-02 Sam Weinig Stop pretending its possible to run the WebProcess in threaded mode https://bugs.webkit.org/show_bug.cgi?id=105969 Reviewed by Alexey Proskuryakov. - Removes WebProcess::isSeparateProcess() - Stop storing a RunLoop on the WebProcess and just use RunLoop::main(). * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::NetworkProcessConnection): * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::NPRuntimeObjectMap): * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::PluginProcessConnection::PluginProcessConnection): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::PageOverlay): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::close): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeConnection): (WebKit::WebProcess::shouldTerminate): (WebKit::WebProcess::terminate): (WebKit::WebProcess::didClose): * WebProcess/WebProcess.h: (WebProcess): * WebProcess/efl/WebProcessMainEfl.cpp: (WebKit::WebProcessMainEfl): * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): * WebProcess/mac/WebProcessInitialization.mm: (WebKit::initializeWebProcess): * WebProcess/qt/WebProcessMainQt.cpp: (WebKit::WebProcessMainQt): * WebProcess/win/WebProcessMainWin.cpp: (WebKit::WebProcessMain): 2013-01-02 Sam Weinig Factor out NetworkProcess initialization into its own function in preparation of adding a NetworkProcess service https://bugs.webkit.org/show_bug.cgi?id=105946 Reviewed by Brady Eidson. * NetworkProcess/NetworkProcess.h: * NetworkProcess/mac/NetworkProcessInitialization.h: Added. (NetworkProcessInitializationParameters): * NetworkProcess/mac/NetworkProcessInitialization.mm: Added. (WebKit::initializeNetworkProcess): * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::initializeSandbox): (WebKit::NetworkProcess::platformInitialize): * NetworkProcess/mac/NetworkProcessMainMac.mm: (WebKit::NetworkProcessMain): * WebKit2.xcodeproj/project.pbxproj: 2013-01-02 Sheriff Bot Unreviewed, rolling out r138403. http://trac.webkit.org/changeset/138403 https://bugs.webkit.org/show_bug.cgi?id=105950 Fixing e138331 which was rolled out in r138403 (Requested by rfong on #webkit). * win/WebKit2.def.in: 2013-01-02 Ryosuke Niwa Yet another Windows build fix attempt. Try exporting more symbols. * win/WebKit2.def.in: 2013-01-02 Alexey Proskuryakov REGRESSION (r138464): Safari hangs when opening Privacy preferences https://bugs.webkit.org/show_bug.cgi?id=105933 Reviewed by Sam Weinig. Quick and dirty fix - added a special case for main thread. But I'm not sure if dispatch_sync on main queue is really the best idiom here. * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::getPluginInfoFromCarbonResources): 2013-01-02 Ryosuke Niwa Don't include a header that has been removed in r138413. * WebProcess/win/WebProcessWin.cpp: 2013-01-02 Carlos Garcia Campos [WK2] Rename SetFrameInViewSourceMode to SetMainFrameInViewSourceMode https://bugs.webkit.org/show_bug.cgi?id=105885 Reviewed by Martin Robinson. This way we don't depend on a WebFrameProxy and webkit_web_view_set_view_mode() works even if the main frame proxy hasn't been created yet. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_set_view_mode): Call WebPageProxy::setMainFrameInViewSourceMode() directly. * UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::WebFrameProxy): Remove setInViewSourceMode(). * UIProcess/WebFrameProxy.h: (WebFrameProxy): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setMainFrameInViewSourceMode): * UIProcess/WebPageProxy.h: (WebPageProxy): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setMainFrameInViewSourceMode): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: 2013-01-02 Caio Marcelo de Oliveira Filho [Qt] Use WebPageGroup to create user scripts instead of Qt-specific function in WebPage https://bugs.webkit.org/show_bug.cgi?id=105921 Reviewed by Simon Hausmann. After r131281 the WebPageGroup.h (in UIProcess) exposes a way to add user scripts, so we can use this directly to implement the user script functionality in Qt. The previous solution was a Qt-port specific function in WebPage that can be removed now. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::updateUserScripts): Use WebPageGroup functions to manipulate user scripts directly. * UIProcess/WebPageProxy.h: (WebPageProxy): Remove now unused function. * UIProcess/qt/WebPageProxyQt.cpp: Ditto. * WebProcess/WebPage/WebPage.messages.in: Ditto. * WebProcess/WebPage/qt/WebPageQt.cpp: Remove now unused function and headers. 2013-01-02 Heikki Paajanen [Qt][WK2] Add experimental API to find text from page https://bugs.webkit.org/show_bug.cgi?id=96481 Reviewed by Jocelyn Turcotte. Expose findString and PageFindClient provided functionality to QtQuick applications. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (QQuickWebViewExperimental::findText): (QQuickWebViewPrivate::didFindString): * UIProcess/API/qt/qquickwebview_p.h: (WebKit): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/tests/qmltests/WebView/tst_findText.qml: Added. * UIProcess/qt/QtWebPageFindClient.cpp: Added. (WebKit): (WebKit::QtWebPageFindClient::QtWebPageFindClient): (WebKit::QtWebPageFindClient::didFindString): (WebKit::toQtWebPageFindClient): (WebKit::QtWebPageFindClient::didFailToFindString): * UIProcess/qt/QtWebPageFindClient.h: Added. (WebKit): (QtWebPageFindClient): 2013-01-02 Christophe Dumez Regression(r138607): Causes crashes related to WebIconDatabase https://bugs.webkit.org/show_bug.cgi?id=105909 Reviewed by Gyuyoung Kim. Add back WebIconDatabase initialization statement in WebContext constructor. It was removed in r138607 and causing a lot of crashes on WebKit2. * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): 2012-12-31 Sam Weinig Convert more classes to be WebContextSupplements https://bugs.webkit.org/show_bug.cgi?id=105890 Reviewed by Dan Bernstein. * UIProcess/API/C/WKContext.cpp: (WKContextGetCookieManager): (WKContextGetDatabaseManager): (WKContextGetGeolocationManager): (WKContextGetKeyValueStorageManager): (WKContextGetMediaCacheManager): (WKContextGetNotificationManager): (WKContextGetResourceCacheManager): * UIProcess/API/efl/ewk_context.cpp: (EwkContext::cookieManager): (EwkContext::clearResourceCache): * UIProcess/API/efl/ewk_database_manager_private.h: (EwkDatabaseManager::create): * UIProcess/API/efl/ewk_storage_manager_private.h: (EwkStorageManager::create): * UIProcess/API/gtk/WebKitWebContext.cpp: (createDefaultWebContext): (webkit_web_context_clear_cache): (webkit_web_context_get_cookie_manager): * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::supplementName): (WebKit): (WebKit::WebNotificationManagerProxy::WebNotificationManagerProxy): (WebKit::WebNotificationManagerProxy::initializeProvider): (WebKit::WebNotificationManagerProxy::contextDestroyed): (WebKit::WebNotificationManagerProxy::processDidClose): (WebKit::WebNotificationManagerProxy::refWebContextSupplement): (WebKit::WebNotificationManagerProxy::derefWebContextSupplement): (WebKit::WebNotificationManagerProxy::didReceiveMessage): (WebKit::WebNotificationManagerProxy::providerDidShowNotification): (WebKit::WebNotificationManagerProxy::providerDidClickNotification): (WebKit::WebNotificationManagerProxy::providerDidCloseNotifications): (WebKit::WebNotificationManagerProxy::providerDidUpdateNotificationPolicy): (WebKit::WebNotificationManagerProxy::providerDidRemoveNotificationPolicies): * UIProcess/Notifications/WebNotificationManagerProxy.h: (WebNotificationManagerProxy): * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): (WebKit::WebContext::~WebContext): (WebKit::WebContext::removeNetworkProcessProxy): (WebKit::WebContext::createNewWebProcess): (WebKit::WebContext::shouldTerminate): (WebKit::WebContext::disconnectProcess): * UIProcess/WebContext.h: (WebKit): (WebContext): (WebKit::WebContext::iconDatabase): * UIProcess/WebContextSupplement.h: (WebKit): (WebKit::WebContextSupplement::contextDestroyed): (WebKit::WebContextSupplement::processDidClose): (WebContextSupplement): (WebKit::WebContextSupplement::shouldTerminate): (WebKit::WebContextSupplement::ref): (WebKit::WebContextSupplement::deref): * UIProcess/WebCookieManagerProxy.cpp: (WebKit::WebCookieManagerProxy::supplementName): (WebKit): (WebKit::WebCookieManagerProxy::WebCookieManagerProxy): (WebKit::WebCookieManagerProxy::initializeClient): (WebKit::WebCookieManagerProxy::contextDestroyed): (WebKit::WebCookieManagerProxy::processDidClose): (WebKit::WebCookieManagerProxy::shouldTerminate): (WebKit::WebCookieManagerProxy::refWebContextSupplement): (WebKit::WebCookieManagerProxy::derefWebContextSupplement): (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): (WebKit::WebCookieManagerProxy::deleteCookiesForHostname): (WebKit::WebCookieManagerProxy::deleteAllCookies): (WebKit::WebCookieManagerProxy::startObservingCookieChanges): (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy): * UIProcess/WebCookieManagerProxy.h: (WebCookieManagerProxy): * UIProcess/WebDatabaseManagerProxy.cpp: (WebKit::WebDatabaseManagerProxy::supplementName): (WebKit): (WebKit::WebDatabaseManagerProxy::WebDatabaseManagerProxy): (WebKit::WebDatabaseManagerProxy::initializeClient): (WebKit::WebDatabaseManagerProxy::contextDestroyed): (WebKit::WebDatabaseManagerProxy::processDidClose): (WebKit::WebDatabaseManagerProxy::refWebContextSupplement): (WebKit::WebDatabaseManagerProxy::derefWebContextSupplement): (WebKit::WebDatabaseManagerProxy::didReceiveMessage): (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin): (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins): (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin): (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin): (WebKit::WebDatabaseManagerProxy::deleteAllDatabases): (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin): * UIProcess/WebDatabaseManagerProxy.h: (WebDatabaseManagerProxy): * UIProcess/WebGeolocationManagerProxy.cpp: (WebKit::WebGeolocationManagerProxy::supplementName): (WebKit): (WebKit::WebGeolocationManagerProxy::WebGeolocationManagerProxy): (WebKit::WebGeolocationManagerProxy::initializeProvider): (WebKit::WebGeolocationManagerProxy::contextDestroyed): (WebKit::WebGeolocationManagerProxy::processDidClose): (WebKit::WebGeolocationManagerProxy::refWebContextSupplement): (WebKit::WebGeolocationManagerProxy::derefWebContextSupplement): (WebKit::WebGeolocationManagerProxy::didReceiveMessage): (WebKit::WebGeolocationManagerProxy::providerDidChangePosition): (WebKit::WebGeolocationManagerProxy::providerDidFailToDeterminePosition): * UIProcess/WebGeolocationManagerProxy.h: (WebGeolocationManagerProxy): * UIProcess/WebKeyValueStorageManagerProxy.cpp: (WebKit::WebKeyValueStorageManagerProxy::supplementName): (WebKit): (WebKit::WebKeyValueStorageManagerProxy::WebKeyValueStorageManagerProxy): (WebKit::WebKeyValueStorageManagerProxy::contextDestroyed): (WebKit::WebKeyValueStorageManagerProxy::processDidClose): (WebKit::WebKeyValueStorageManagerProxy::refWebContextSupplement): (WebKit::WebKeyValueStorageManagerProxy::derefWebContextSupplement): (WebKit::WebKeyValueStorageManagerProxy::getKeyValueStorageOrigins): (WebKit::WebKeyValueStorageManagerProxy::deleteEntriesForOrigin): (WebKit::WebKeyValueStorageManagerProxy::deleteAllEntries): * UIProcess/WebKeyValueStorageManagerProxy.h: (WebKeyValueStorageManagerProxy): * UIProcess/WebMediaCacheManagerProxy.cpp: (WebKit::WebMediaCacheManagerProxy::supplementName): (WebKit): (WebKit::WebMediaCacheManagerProxy::WebMediaCacheManagerProxy): (WebKit::WebMediaCacheManagerProxy::contextDestroyed): (WebKit::WebMediaCacheManagerProxy::processDidClose): (WebKit::WebMediaCacheManagerProxy::refWebContextSupplement): (WebKit::WebMediaCacheManagerProxy::derefWebContextSupplement): (WebKit::WebMediaCacheManagerProxy::getHostnamesWithMediaCache): (WebKit::WebMediaCacheManagerProxy::clearCacheForHostname): (WebKit::WebMediaCacheManagerProxy::clearCacheForAllHostnames): * UIProcess/WebMediaCacheManagerProxy.h: (WebMediaCacheManagerProxy): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::showNotification): * UIProcess/WebResourceCacheManagerProxy.cpp: (WebKit::WebResourceCacheManagerProxy::supplementName): (WebKit): (WebKit::WebResourceCacheManagerProxy::WebResourceCacheManagerProxy): (WebKit::WebResourceCacheManagerProxy::contextDestroyed): (WebKit::WebResourceCacheManagerProxy::processDidClose): (WebKit::WebResourceCacheManagerProxy::refWebContextSupplement): (WebKit::WebResourceCacheManagerProxy::derefWebContextSupplement): (WebKit::WebResourceCacheManagerProxy::didReceiveMessage): (WebKit::WebResourceCacheManagerProxy::getCacheOrigins): (WebKit::WebResourceCacheManagerProxy::clearCacheForOrigin): (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): * UIProcess/WebResourceCacheManagerProxy.h: (WebResourceCacheManagerProxy): * UIProcess/efl/WebContextEfl.cpp: (WebKit::WebContext::platformInitializeWebProcess): * UIProcess/gtk/WebContextGtk.cpp: (WebKit::WebContext::platformInitializeWebProcess): * UIProcess/qt/WebContextQt.cpp: (WebKit::WebContext::platformInitializeWebProcess): 2013-01-01 Dan Bernstein Update copyright strings Reviewed by Sam Weinig. * Info.plist: * NetworkProcess/Info.plist: * PluginProcess/Info.plist: * SharedWorkerProcess/Info.plist: * WebProcess/Info.plist: * WebProcessService/Info.plist: * WebProcessServiceForWebKitDevelopment/Info.plist: 2013-01-01 KwangYong Choi [EFL] Enable MHTML feature https://bugs.webkit.org/show_bug.cgi?id=105815 Reviewed by Laszlo Gombos. Add missing include directory for ENABLE_MHTML. * CMakeLists.txt: 2012-12-30 Sam Weinig Add supplementability for WebContext https://bugs.webkit.org/show_bug.cgi?id=105878 Reviewed by Dan Bernstein. Add WebContextSupplement and convert WebApplicationCacheManagerProxy to it. * UIProcess/API/C/WKContext.cpp: (WKContextGetApplicationCacheManager): * UIProcess/WebApplicationCacheManagerProxy.cpp: (WebKit::WebApplicationCacheManagerProxy::supplementName): (WebKit::WebApplicationCacheManagerProxy::WebApplicationCacheManagerProxy): (WebKit::WebApplicationCacheManagerProxy::contextDestroyed): (WebKit::WebApplicationCacheManagerProxy::processDidClose): (WebKit::WebApplicationCacheManagerProxy::refWebContextSupplement): (WebKit::WebApplicationCacheManagerProxy::derefWebContextSupplement): (WebKit::WebApplicationCacheManagerProxy::getApplicationCacheOrigins): (WebKit::WebApplicationCacheManagerProxy::deleteEntriesForOrigin): (WebKit::WebApplicationCacheManagerProxy::deleteAllEntries): * UIProcess/WebApplicationCacheManagerProxy.h: (WebApplicationCacheManagerProxy): * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): (WebKit::WebContext::~WebContext): (WebKit::WebContext::shouldTerminate): (WebKit::WebContext::disconnectProcess): * UIProcess/WebContext.h: (WebKit::WebContext::supplement): (WebKit::WebContext::addSupplement): * UIProcess/WebContextSupplement.h: Added. (WebKit::WebContextSupplement::WebContextSupplement): (WebKit::WebContextSupplement::~WebContextSupplement): (WebKit::WebContextSupplement::ref): (WebKit::WebContextSupplement::deref): (WebKit::WebContextSupplement::context): (WebKit::WebContextSupplement::clearContext): * WebKit2.xcodeproj/project.pbxproj: 2012-12-31 Christophe Dumez [EFL[WK2] Regression(r138574): Should not allocate memory in the fork https://bugs.webkit.org/show_bug.cgi?id=105868 Reviewed by Kenneth Rohde Christiansen. Store prefixed executable path in a CString before the fork to avoid allocating memory in the fork by calling String::utf8(). Allocating memory in the fork may lead to deadlocks due to FastMalloc and the fork not inheriting the threads. * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: (WebKit::ProcessLauncher::launchProcess): 2012-12-31 Carlos Garcia Campos [GTK] Add API to set a WebKitWebView in view source mode to WebKit2 https://bugs.webkit.org/show_bug.cgi?id=99315 Reviewed by Martin Robinson. Add a generic API to set/get a view mode. For now there are only two modes, Web and Source, but the API can be extended if we eventually support other view modes like Printing for example. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewSetProperty): Implement setter for view-mode property. (webkitWebViewGetProperty): Implement getter for view-mode property. (webkit_web_view_class_init): Add view-source property. (webkit_web_view_set_view_mode): Public method to set the view mode. (webkit_web_view_get_view_mode): Public method to get the view mode. * UIProcess/API/gtk/WebKitWebView.h: Add WebKitViewMode enum. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewMode): (beforeAll): * UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::WebFrameProxy): Initialize m_inViewSourceMode. (WebKit::WebFrameProxy::setInViewSourceMode): Set m_inViewSourceMode if it has changed and call WebPageProxy::setFrameInViewSourceMode() to notify the WebProcess. * UIProcess/WebFrameProxy.h: (WebKit::WebFrameProxy::inViewSourceMode): Return whether the frame is currently in view source mode. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setFrameInViewSourceMode): Send a message to the WebProcess to set the given frame in view source mode or not. * UIProcess/WebPageProxy.h: (WebPageProxy): Add setFrameInViewSourceMode(). * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setFrameInViewSourceMode): Call setInViewSourceMode for the main frame. * WebProcess/WebPage/WebPage.h: (WebPage): Add setFrameInViewSourceMode(). * WebProcess/WebPage/WebPage.messages.in: Add new message SetFrameInViewSourceMode. 2012-12-30 Christophe Dumez [EFL][WK2] Invalid use of temporary object in ProcessLauncher::launchProcess() https://bugs.webkit.org/show_bug.cgi?id=105867 Reviewed by Kenneth Rohde Christiansen. Fix invalid use of temporary object in ProcessLauncher::launchProcess() for prefixedExecutablePath. * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: (WebKit::ProcessLauncher::launchProcess): 2012-12-29 Sam Weinig Windows build fix. * win/WebKit2Common.vsprops: 2012-12-29 Sam Weinig Add supplementability to the NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=105838 Reviewed by Dan Bernstein. This patch adds a NetworkProcessSupplement, which is almost identical to WebProcessSupplement, but has a different initialization override. It also stops WebProcessSupplement from inheriting from MessageReceiver (and makes everything that is a WebProcessSupplement also a MessageReceiver) as keeping that would cause classes that need to be both WebProcessSupplements and NetworkProcessSupplements inherit from MessageReceiver twice. * GNUmakefile.list.am: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::NetworkProcess): (WebKit::NetworkProcess::downloadsAuthenticationManager): (WebKit::NetworkProcess::initializeNetworkProcess): * NetworkProcess/NetworkProcess.h: (WebKit): (NetworkProcess): (WebKit::NetworkProcess::supplement): (WebKit::NetworkProcess::addSupplement): * Shared/Network/CustomProtocols/CustomProtocolManager.h: (CustomProtocolManager): * Shared/Network/NetworkProcessSupplement.h: Added. (WebKit): (NetworkProcessSupplement): (WebKit::NetworkProcessSupplement::~NetworkProcessSupplement): (WebKit::NetworkProcessSupplement::initialize): * Target.pri: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/ApplicationCache/WebApplicationCacheManager.h: * WebProcess/Authentication/AuthenticationManager.h: * WebProcess/Cookies/WebCookieManager.h: * WebProcess/Geolocation/WebGeolocationManager.h: * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: * WebProcess/MediaCache/WebMediaCacheManager.h: * WebProcess/Notifications/WebNotificationManager.h: * WebProcess/ResourceCache/WebResourceCacheManager.h: * WebProcess/WebCoreSupport/WebDatabaseManager.h: * WebProcess/WebProcessSupplement.h: * win/WebKit2.vcproj: 2012-12-28 Ryuan Choi [EFL][WK2] MiniBrowser could not be launched on specific machine https://bugs.webkit.org/show_bug.cgi?id=105844 Reviewed by Gyuyoung Kim. * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: (WebKit::ProcessLauncher::launchProcess): Modified to avoid bad use of temporary object. 2012-12-28 Joone Hur [EFL][WK2] Implement ewk_context_resource_cache_clear https://bugs.webkit.org/show_bug.cgi?id=104782 The purpose of this API is to clear HTTP caches in local storage and all resources cached in memory such as images, CSS, JavaScript, XSL, and fonts. Reviewed by Kenneth Rohde Christiansen. * UIProcess/API/efl/ewk_context.cpp: (EwkContext::clearResourceCache): Call WebResourceCacheManager::ClearCacheForAllOrigins. (ewk_context_resource_cache_clear): * UIProcess/API/efl/ewk_context.h: Add ewk_context_resource_cache_clear. * UIProcess/API/efl/ewk_context_private.h: (EwkContext): 2012-12-28 Mark Rowe Move logic for extracting the OS X marketing version in to WebCore / Reviewed by Dan Bernstein. * UIProcess/mac/WebPageProxyMac.mm: (WebKit::systemMarketingVersionForUserAgentString): Call the WebCore function instead of the WKSI function. (WebKit::WebPageProxy::standardUserAgent): * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Remove the code related to the WKSI symbol. 2012-12-28 Sam Weinig Fix assert seen when adding a custom protocol handler before an initial web process has been created. * UIProcess/WebContext.h: (WebKit::WebContext::sendToNetworkingProcess): 2012-12-28 Martin Robinson [GTK][WK2] Add support for IME Composition https://bugs.webkit.org/show_bug.cgi?id=65093 Reviewed by Carlos Garcia Campos. Add a WebKit2 implementation of the GtkInputMethodFilter and provide the necessary plumbing to pass composition information along with input method events. * GNUmakefile.list.am: Add new files to the source list. * Shared/EditorState.cpp: The cursorRect is now passed for GTK+ as well as Qt, so update the encode and decode methods to pass that along. * Shared/EditorState.h: Add the cursorRect member for GTK+ as well. * Shared/NativeWebKeyboardEvent.h: (NativeWebKeyboardEvent): Keyboard events should also have knowledge of the compositionResults and whether or not the event was faked for composition purposes. * Shared/gtk/NativeWebKeyboardEventGtk.cpp: Ditto. * Shared/gtk/WebEventFactory.cpp: (WebKit::WebEventFactory::createWebKeyboardEvent): Copy the logic of PlatformKeyEvent, for properly setting the windows key code and the event text from the composition results. * Shared/gtk/WebEventFactory.h: The createWebKeyboardEvent factory now takes a CompositionResults argument. * UIProcess/API/gtk/PageClientImpl.cpp: (WebKit::PageClientImpl::doneWithKeyEvent): Don't forward keyboard events that were faked for composition reasons. These events originated from WebKit and should never be passed to parent classes. (WebKit::PageClientImpl::updateTextInputState): Plumb through the updateTextInputState method to the WebViewBase. * UIProcess/API/gtk/PageClientImpl.h: (PageClientImpl): Add a updateTextInputState method. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (_WebKitWebViewBasePrivate): Instead of having an input method context as a member keep a WebViewBaseInputMethodFilter. (webkitWebViewBaseRealize): Set the filter widget when the WebViewBase is realized. (webkit_web_view_base_init): No longer create a input method context during init. (webkitWebViewBaseFocusInEvent): Pass along focus in events to the filter. (webkitWebViewBaseFocusOutEvent): Pass along focus out events to the filter. (webkitWebViewBaseKeyPressEvent): Instead of passing key presses directly to the WebProcess, filter them through the input method filter. (webkitWebViewBaseKeyReleaseEvent): Ditto. (webkitWebViewBaseButtonPressEvent): Notify the input method filter about button press events. (webkitWebViewBaseGetIMContext): The input method filter owns the input method now. (webkitWebViewBaseSetInputMethodState): Add a bit of plumbing for the PageClient. (webkitWebViewBaseUpdateTextInputState): Ditto. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: Add plumbing declarations. * UIProcess/API/gtk/WebViewBaseInputMethodFilter.cpp: Added. An implementation of GtkInputMethodFilter for WebKit2. * UIProcess/API/gtk/WebViewBaseInputMethodFilter.h: Copied from Source/WebKit/gtk/WebCoreSupport/WebViewInputMethodFilter.h. * UIProcess/PageClient.h: (PageClient): updateInputMethod state is now for both Qt and GTK+. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::editorStateChanged): Pass the editor state for GTK+ as well as Qt. (WebKit::WebPageProxy::setComposition): Moved this method from WebPageProxyQt as it's used for GTK+ now as well. (WebKit::WebPageProxy::confirmComposition): Ditto. (WebKit::WebPageProxy::cancelComposition): Ditto. * UIProcess/WebPageProxy.h: (WebPageProxy): The setInputMethodState message is for GTK+ as well as Qt now. * UIProcess/WebPageProxy.messages.in: Ditto. * UIProcess/gtk/WebPageProxyGtk.cpp: (WebKit::WebPageProxy::setInputMethodState): Ditto. * UIProcess/qt/WebPageProxyQt.cpp: Move some methods to the platform-independent file. * WebProcess/WebCoreSupport/gtk/WebEditorClientGtk.cpp: More closely match the WebKit1 logic for dealing with key events so that composition events will be handled properly. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState): Properly pass the cursorRect for GTK+. (WebKit::targetFrameForEditing): Moved from the Qt file, because its used by GTK+ as well. They now pass along the updated EditorState as well, just like the Mac versions. (WebKit::WebPage::confirmComposition): Ditto. (WebKit::WebPage::setComposition): Ditto. (WebKit::WebPage::cancelComposition): Ditto. * WebProcess/WebPage/WebPage.h: The above messages are now for GTK+ as well as Qt. * WebProcess/WebPage/WebPage.messages.in: Ditto. * WebProcess/WebPage/qt/WebPageQt.cpp: Moved some methods to the platform-independent file. 2012-12-28 Sam Weinig Appease the Windows Gods. * WebProcess/Notifications/WebNotificationManager.cpp: 2012-12-27 Sam Weinig Make CustomProtocolManager a WebProcessSupplement https://bugs.webkit.org/show_bug.cgi?id=105814 Reviewed by Dan Bernstein. This converts CustomProtocolManager from a global singleton, to be a supplement of the WebProcess. Since it also needs to act as a supplement of the NetworkProcess, it adds an initialization function for the NetworkProcess as well, while we await the arrival of the forthcoming NetworkProcessSupplement. In addition, this moves the handling of registering and unregistering schemes directly to the CustomProtocolManager, instead of requiring an unnecessary trip in the ChildProcess. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::NetworkProcess): (WebKit::NetworkProcess::initializeNetworkProcess): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * Shared/Network/CustomProtocols/CustomProtocolManager.h: (CustomProtocolManager): * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: (+[WKCustomProtocol canInitWithRequest:]): (-[WKCustomProtocol initWithRequest:cachedResponse:client:]): (-[WKCustomProtocol startLoading]): (-[WKCustomProtocol stopLoading]): (WebKit::CustomProtocolManager::supplementName): (WebKit::CustomProtocolManager::CustomProtocolManager): (WebKit::CustomProtocolManager::initialize): * UIProcess/WebContext.cpp: (WebKit::WebContext::registerSchemeForCustomProtocol): (WebKit::WebContext::unregisterSchemeForCustomProtocol): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::initializeWebProcess): * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: 2012-12-27 Sam Weinig Convert a few other WebProcess managers to be WebProcessSupplements https://bugs.webkit.org/show_bug.cgi?id=105812 Reviewed by Dan Bernstein. * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: (WebKit::WebApplicationCacheManager::supplementName): * WebProcess/ApplicationCache/WebApplicationCacheManager.h: (WebApplicationCacheManager): * WebProcess/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::supplementName): * WebProcess/Authentication/AuthenticationManager.h: (AuthenticationManager): * WebProcess/Cookies/WebCookieManager.cpp: (WebKit::WebCookieManager::supplementName): * WebProcess/Cookies/WebCookieManager.h: (WebCookieManager): * WebProcess/Geolocation/WebGeolocationManager.cpp: (WebKit::WebGeolocationManager::supplementName): * WebProcess/Geolocation/WebGeolocationManager.h: (WebGeolocationManager): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setAlwaysAcceptCookies): (WebKit::InjectedBundle::clearApplicationCache): (WebKit::InjectedBundle::setAppCacheMaximumSize): (WebKit::InjectedBundle::webNotificationID): * WebProcess/MediaCache/WebMediaCacheManager.cpp: (WebKit::WebMediaCacheManager::supplementName): * WebProcess/MediaCache/WebMediaCacheManager.h: (WebMediaCacheManager): * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: (WebKit::NotificationPermissionRequestManager::permissionLevel): (WebKit::NotificationPermissionRequestManager::setPermissionLevelForTesting): (WebKit::NotificationPermissionRequestManager::removeAllPermissionsForTesting): (WebKit::NotificationPermissionRequestManager::didReceiveNotificationPermissionDecision): * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::supplementName): (WebKit::WebNotificationManager::initialize): * WebProcess/Notifications/WebNotificationManager.h: (WebNotificationManager): * WebProcess/ResourceCache/WebResourceCacheManager.cpp: (WebKit::WebResourceCacheManager::supplementName): * WebProcess/ResourceCache/WebResourceCacheManager.h: (WebResourceCacheManager): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge): * WebProcess/WebCoreSupport/WebGeolocationClient.cpp: (WebKit::WebGeolocationClient::geolocationDestroyed): (WebKit::WebGeolocationClient::startUpdating): (WebKit::WebGeolocationClient::stopUpdating): * WebProcess/WebCoreSupport/WebNotificationClient.cpp: (WebKit::WebNotificationClient::show): (WebKit::WebNotificationClient::cancel): (WebKit::WebNotificationClient::clearNotifications): (WebKit::WebNotificationClient::notificationObjectDestroyed): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::downloadsAuthenticationManager): * WebProcess/WebProcess.h: (WebKit::WebProcess::textCheckerState): (WebKit::WebProcess::networkAccessManager): (WebKit::WebProcess::soupRequestManager): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): * WebProcess/soup/WebProcessSoup.cpp: (WebKit::WebProcess::platformInitializeWebProcess): * WebProcess/win/WebProcessWin.cpp: (WebKit::WebProcess::platformInitializeWebProcess): 2012-12-27 Viatcheslav Ostapenko [EFL][WK2] Regression(138462) Sometimes garbage in snapshots https://bugs.webkit.org/show_bug.cgi?id=105803 Reviewed by Kenneth Rohde Christiansen. Instead of creating temporary buffer and then creating cairo surface from it, create cairo surface 1st and use surface image internal buffer to read pixels from GL buffer. * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::takeSnapshot): * UIProcess/API/efl/SnapshotImageGL.cpp: (getImageSurfaceFromFrameBuffer): * UIProcess/API/efl/SnapshotImageGL.h: 2012-12-27 Sam Weinig Actually make use of the WebProcessSupplements by adding a supplement map to WebProcess https://bugs.webkit.org/show_bug.cgi?id=105804 Reviewed by Dan Bernstein. This continues the work of adding extensibility to WebProcess by adding a supplement map, and using it as proof of concept for WebDatabaseManager and WebKeyValueStorageManager. - A supplement is added to WebProcess by calling: process->addSupplement(); - A supplement can be used accessed by calling: process->supplement(); * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::clearAllDatabases): (WebKit::InjectedBundle::setDatabaseQuota): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Switch to using the new supplement accessor. * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: (WebKit::WebKeyValueStorageManager::supplementName): * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: (WebKit::WebDatabaseManager::supplementName): * WebProcess/WebCoreSupport/WebDatabaseManager.h: Add static supplementName functions. We might want to merge this with the message class name, but for now we have both. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): Add supplements the new way. This should eventually move to the caller of WebProcess::initialize, so that we can reduce #ifdefs and ports have a chance to customize. (WebKit::WebProcess::initializeWebProcess): Iterate the supplements to give each a chance to initialize. * WebProcess/WebProcess.h: (WebKit::WebProcess::supplement): (WebKit::WebProcess::addSupplement): Add functions to add and get WebProcessSupplements. 2012-12-26 Sam Weinig Add an initial stab at a generic supplemental interface for WebProcess https://bugs.webkit.org/show_bug.cgi?id=105779 Reviewed by Darin Adler. This starts the process of adding a mechanism to WebProcess to extend its functionality without actually changing it (similar to the Supplement mechanism in WebCore). This will make it possible for ports to add functionality that might not be needed or wanted by other ports. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: (WebKit::WebKeyValueStorageManager::initialize): (WebKit): * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: (WebKeyValueStorageManager): (WebKit::WebKeyValueStorageManager::localStorageDirectory): * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: (WebKit::WebDatabaseManager::WebDatabaseManager): (WebKit::WebDatabaseManager::initialize): * WebProcess/WebCoreSupport/WebDatabaseManager.h: (WebDatabaseManager): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::keyValueStorageManager): (WebKit): * WebProcess/WebProcess.h: (WebProcess): * WebProcess/WebProcessSupplement.h: Added. (WebKit): (WebProcessSupplement): (WebKit::WebProcessSupplement::~WebProcessSupplement): (WebKit::WebProcessSupplement::initialize): 2012-12-27 Christophe Dumez [EFL][WK2] Regression(135935) layout tests snapshots are flaky https://bugs.webkit.org/show_bug.cgi?id=103468 Reviewed by Kenneth Rohde Christiansen. Make sure that we wait for pending repaints before taking a snapshot to avoid flakiness in pixel / ref tests. We also suspend all animations before taking the snapshot to make sure we don't wait forever for repaint events to be processed. * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::takeSnapshot): 2012-12-26 Csaba Osztrogonác Unreviewed Xmas buildfix after r138479. * WebProcess/MediaCache/WebMediaCacheManager.h: 2012-12-25 Sam Weinig Convert WebKeyValueStorageManager and WebMediaCacheManager to MessageReceiver https://bugs.webkit.org/show_bug.cgi?id=105751 Reviewed by Andreas Kling. * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager): (WebKit::WebKeyValueStorageManager::dispatchDidGetKeyValueStorageOrigins): (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins): (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin): (WebKit::WebKeyValueStorageManager::deleteAllEntries): * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: (WebKeyValueStorageManager): Remove unused m_originsLoaded member variable. * WebProcess/MediaCache/WebMediaCacheManager.cpp: (WebKit::WebMediaCacheManager::WebMediaCacheManager): (WebKit::WebMediaCacheManager::getHostnamesWithMediaCache): (WebKit::WebMediaCacheManager::clearCacheForHostname): (WebKit::WebMediaCacheManager::clearCacheForAllHostnames): * WebProcess/MediaCache/WebMediaCacheManager.h: (WebMediaCacheManager): Convert the managers to MessageReceiver. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::didReceiveMessage): * WebProcess/WebProcess.h: (WebProcess): Add the new managers. 2012-12-25 Sam Weinig Fix the Database manager assert, again. * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: (WebKit): (WebKit::WebDatabaseManager::WebDatabaseManager): (WebKit::WebDatabaseManager::initialize): * WebProcess/WebCoreSupport/WebDatabaseManager.h: (WebDatabaseManager): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): 2012-12-25 Huang Dongsung Coordinated Graphics: Manage the lifecycle of CoordinatedGraphicsLayer explicitly. https://bugs.webkit.org/show_bug.cgi?id=104990 Reviewed by Noam Rosenthal. Send explicit commands to the UI process to create/delete compositing layers, instead of having the UI process decide lazily when to create them. Avoid creating a compositing layer at all if it was deleted in the same cycle. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::createCompositingLayer): (WebKit): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (CoordinatedLayerTreeHostProxy): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::createCanvas): (WebKit::LayerTreeRenderer::destroyCanvas): (WebKit::LayerTreeRenderer::setLayerChildren): (WebKit::LayerTreeRenderer::setLayerFilters): (WebKit::LayerTreeRenderer::setLayerState): (WebKit::LayerTreeRenderer::getLayerByIDIfExists): (WebKit): (WebKit::LayerTreeRenderer::createLayer): (WebKit::LayerTreeRenderer::deleteLayer): (WebKit::LayerTreeRenderer::setRootLayerID): (WebKit::LayerTreeRenderer::createTile): (WebKit::LayerTreeRenderer::removeTile): (WebKit::LayerTreeRenderer::updateTile): (WebKit::LayerTreeRenderer::ensureRootLayer): (WebKit::LayerTreeRenderer::setLayerAnimations): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: (LayerTreeRenderer): (WebKit::LayerTreeRenderer::layerByID): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges): (WebKit::CoordinatedLayerTreeHost::createCompositingLayers): (WebKit): (WebKit::CoordinatedLayerTreeHost::deleteCompositingLayers): (WebKit::CoordinatedLayerTreeHost::detachLayer): (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 2012-12-25 Sam Weinig Fix Qt build. * WebProcess/WebPage/qt/WebPageQt.cpp: 2012-12-24 Sam Weinig Reduce the number of includes in WebProcess.h https://bugs.webkit.org/show_bug.cgi?id=105709 Reviewed by Dan Bernstein. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::NetworkProcess): (WebKit::NetworkProcess::downloadsAuthenticationManager): * NetworkProcess/NetworkProcess.h: (WebKit): * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: * WebProcess/FullScreen/WebFullScreenManager.cpp: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/Network/NetworkProcessConnection.cpp: * WebProcess/Notifications/NotificationPermissionRequestManager.cpp: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: * WebProcess/WebPage/FindController.cpp: * WebProcess/WebPage/WebContextMenu.cpp: * WebProcess/WebPage/ca/LayerTreeHostCA.cpp: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::downloadsAuthenticationManager): (WebKit::WebProcess::initializeWebProcess): (WebKit::WebProcess::geolocationManager): (WebKit): (WebKit::WebProcess::applicationCacheManager): (WebKit::WebProcess::resourceCacheManager): (WebKit::WebProcess::cookieManager): (WebKit::WebProcess::authenticationManager): (WebKit::WebProcess::databaseManager): (WebKit::WebProcess::notificationManager): (WebKit::WebProcess::pluginProcessConnectionManager): (WebKit::WebProcess::networkProcessConnectionClosed): (WebKit::WebProcess::webResourceLoadScheduler): (WebKit::WebProcess::pluginProcessCrashed): * WebProcess/WebProcess.h: (WebCore): (WebKit): (WebProcess): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): 2012-12-25 Andreas Kling [WK2][Mac] Call Carbon resource APIs on main thread only. Reviewed by Anders Carlsson. The Carbon resource APIs are not thread-safe, so use a little libdispatch sugar to make sure that plugin enumeration never calls them on a secondary thread. * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::getPluginInfoFromCarbonResourcesOnMainThread): (WebKit::getPluginInfoFromCarbonResources): 2012-12-25 Seokju Kwon [EFL][WK2] Build breaks with --no-input-type-color https://bugs.webkit.org/show_bug.cgi?id=105740 Reviewed by Laszlo Gombos. * UIProcess/API/efl/EwkViewImpl.h: Add INPUT_TYPE_COLOR guard. (EwkViewImpl): 2012-12-25 Christophe Dumez [EFL][WK2] Refactor snapshot taking code https://bugs.webkit.org/show_bug.cgi?id=105687 Reviewed by Kenneth Rohde Christiansen. Refactor EFL WK2 snapshot taking code to use smart pointers when possible and follow naming conventions. * UIProcess/API/C/efl/WKView.cpp: (WKViewCreateSnapshot): * UIProcess/API/C/efl/WKView.h: Rename WKViewGetSnapshot to WKViewCreateSnapshot to follow C API naming conventions, since the returned value needs to be adopted. * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::takeSnapshot): * UIProcess/API/efl/EwkViewImpl.h: Have takeSnapshot() return a cairo_surface_t instead of a WKType. The value should be converted to a WKType at C API level. (EwkViewImpl): * UIProcess/API/efl/SnapshotImageGL.cpp: Use OwnArrayPtr for the buffer to avoid manual memory handling. Remove useless call to glBindTexture() since glReadPixels() reads pixels from the frame buffer, not from the texture. (getImageDataFromFrameBuffer): * UIProcess/API/efl/SnapshotImageGL.h: Rename getImageFromCurrentTexture to getImageDataFromFrameBuffer for consistency since we technically return the pixel data of the image and since glReadPixels does not actually read from the texture. Have the function return a smart pointer instead of a raw one to avoid manual memory handling. 2012-12-25 Tim Horton PDFPlugin: Find-in-page https://bugs.webkit.org/show_bug.cgi?id=105710 Reviewed by Alexey Proskuryakov. Make use of PDFLayerController's find-in-page functionality to mimic WebKit's. Add two Plugin methods, countFindMatches and findString, and make use of them if attempting to find-in-page within a PluginDocument. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::countFindMatches): Added. We don't support find-in-page for NetscapePlugin. (WebKit::NetscapePlugin::findString): Added. We don't support find-in-page for NetscapePlugin. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add countFindMatches and findString. * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add requisite PDFLayerController interfaces. * WebProcess/Plugins/PDF/PDFPlugin.h: Add countFindMatches, findString, and nextMatchForString, as well as storage for the most-recently-searched string. * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::writeItemsToPasteboard): (WebKit::PDFPlugin::countFindMatches): (WebKit::PDFPlugin::nextMatchForString): (WebKit::PDFPlugin::findString): * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Add countFindMatches and findString. * WebProcess/Plugins/Plugin.h: Add countFindMatches and findString. * WebProcess/Plugins/PluginProxy.h: Add countFindMatches and findString, but since PDFPlugin is in-process, we don't need to forward these calls to the PluginProcess. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::countFindMatches): Forward countFindMatches to the plugin. (WebKit::PluginView::findString): Forward findString to the plugin. * WebProcess/Plugins/PluginView.h: Add countFindMatches and findString. * WebProcess/WebPage/FindController.cpp: (WebKit::pluginViewForFrame): If the given frame hosts a PluginDocument, grab its PluginView. (WebKit::FindController::countStringMatches): Forward countStringMatches to PluginView if necessary. (WebKit::FindController::updateFindUIAfterPageScroll): Only use unmarkAllTextMatches if we're using ordinary find-in-page and don't have a plugin. If we have a plugin, disable our overlay, as it must be handled by the plugin itself, and request the number of matches for the search from the plugin. (WebKit::FindController::findString): If necessary, forward findString to the plugin. (WebKit::FindController::hideFindUI): Hide the search highlight by searching for an empty string. 2012-12-24 Laszlo Gombos Remove wtf/Platform.h includes from {c|cpp} files https://bugs.webkit.org/show_bug.cgi?id=105678 Reviewed by Kentaro Hara. Remove wtf/Platform.h from the include list as it is already included in config.h. * Shared/qt/QtNetworkRequestData.cpp: 2012-12-24 Sam Weinig Assert fix take 2. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::initializeWebProcess): 2012-12-24 Sam Weinig Fix WebKit2 asserting on launch. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): * WebProcess/WebProcess.h: (WebKit::WebProcess::databaseManager): (WebProcess): 2012-12-24 Csaba Osztrogonác [Qt][Win] Unreviewed Xmas buildfix after r138433. * WebProcess/Cookies/WebCookieManager.h: 2012-12-23 Seokju Kwon Fix the incorrect use of preprocessor statement in API header https://bugs.webkit.org/show_bug.cgi?id=105675 Reviewed by Sam Weinig. Remove a preprocessor statement in WKBundlePage.h * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageGetInspector): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: 2012-12-23 Sam Weinig Switch WebCookieManager and AuthenticationManager to use the ChildProcess rather than holding on to a Connection https://bugs.webkit.org/show_bug.cgi?id=105703 Reviewed by Dan Bernstein. Also switches WebCookieManager over to be a MessageReceiver while we are at it. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::NetworkProcess): (WebKit::NetworkProcess::initialize): (WebKit::NetworkProcess::didReceiveMessage): * NetworkProcess/NetworkProcess.h: (WebKit): * WebProcess/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::AuthenticationManager): (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge): * WebProcess/Authentication/AuthenticationManager.h: (AuthenticationManager): * WebProcess/Cookies/WebCookieManager.cpp: (WebKit): (WebKit::WebCookieManager::WebCookieManager): (WebKit::WebCookieManager::didReceiveMessage): (WebKit::WebCookieManager::getHostnamesWithCookies): (WebKit::WebCookieManager::cookiesDidChange): (WebKit::WebCookieManager::dispatchCookiesDidChange): (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy): * WebProcess/Cookies/WebCookieManager.h: (WebKit): (WebCookieManager): * WebProcess/Cookies/soup/WebCookieManagerSoup.cpp: (WebKit::WebCookieManager::setCookiePersistentStorage): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setAlwaysAcceptCookies): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::initialize): (WebKit::WebProcess::didReceiveMessage): * WebProcess/WebProcess.h: (WebProcess): (WebKit::WebProcess::cookieManager): 2012-12-23 Sam Weinig Try to fix the Qt build. * WebProcess/WebCoreSupport/WebDatabaseManager.h: 2012-12-23 Sam Weinig Remove more special cased message receiving code from WebProcess https://bugs.webkit.org/show_bug.cgi?id=105700 Reviewed by Dan Bernstein. Makes WebApplicationCacheManager, WebResourceCacheManager and WebDatabaseManager CoreIPC::MessageReceivers, removes them as special cases in WebProcess. * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: (WebKit::WebApplicationCacheManager::WebApplicationCacheManager): (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins): (WebKit::WebApplicationCacheManager::deleteEntriesForOrigin): (WebKit::WebApplicationCacheManager::deleteAllEntries): (WebKit::WebApplicationCacheManager::setAppCacheMaximumSize): * WebProcess/ApplicationCache/WebApplicationCacheManager.h: (WebKit): (WebApplicationCacheManager): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::clearAllDatabases): (WebKit::InjectedBundle::setDatabaseQuota): (WebKit::InjectedBundle::clearApplicationCache): (WebKit::InjectedBundle::setAppCacheMaximumSize): * WebProcess/ResourceCache/WebResourceCacheManager.cpp: (WebKit::WebResourceCacheManager::WebResourceCacheManager): (WebKit::WebResourceCacheManager::getCacheOrigins): (WebKit::WebResourceCacheManager::clearCacheForOrigin): (WebKit::WebResourceCacheManager::clearCacheForAllOrigins): * WebProcess/ResourceCache/WebResourceCacheManager.h: (WebKit): (WebResourceCacheManager): * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: (WebKit): (WebKit::WebDatabaseManager::WebDatabaseManager): (WebKit::WebDatabaseManager::getDatabasesByOrigin): (WebKit::WebDatabaseManager::getDatabaseOrigins): (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin): (WebKit::WebDatabaseManager::deleteDatabasesForOrigin): (WebKit::WebDatabaseManager::deleteAllDatabases): (WebKit::WebDatabaseManager::setQuotaForOrigin): (WebKit::WebDatabaseManager::dispatchDidModifyOrigin): (WebKit::WebDatabaseManager::dispatchDidModifyDatabase): * WebProcess/WebCoreSupport/WebDatabaseManager.h: (WebKit): (WebDatabaseManager): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::didReceiveMessage): * WebProcess/WebProcess.h: (WebProcess): (WebKit::WebProcess::applicationCacheManager): (WebKit::WebProcess::resourceCacheManager): (WebKit::WebProcess::databaseManager): 2012-12-23 Alexey Proskuryakov Network process should respect cookie accept policy https://bugs.webkit.org/show_bug.cgi?id=105684 Reviewed by Sam Weinig. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initialize): Tell cookie manager which connection to make calls on. Now that the code can run in either WebProcess or NetworkProcess, it cannot use WebProcess singleton. (WebKit::NetworkProcess::didReceiveMessage): Dispatch WebCookieManager messages. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initialize): Tell cookie manager which connection to make calls on. * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::didReceiveAuthenticationChallenge): Changed to use WebContext::networkingProcessConnection() instead of deciding upon the connection here. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didReceiveMessage): Call m_webContext->dispatchMessage), as WebCookieManagerProxy handlers are registered on the context. This may seem wasteful, but a lot of registered managers will need the ame handling soon. * UIProcess/WebContext.cpp: (WebKit::WebContext::networkingProcessConnection): Added a way to get connection to whichever process performs networking. (WebKit::WebContext::removeNetworkProcessProxy): Invalidate cookie manager proxy, so that expected responses could be cleared. (WebKit::WebContext::disconnectProcess): Updated a FIXME. * UIProcess/WebContext.h: Deleted deprecatedSharedProcess(). (WebKit::WebContext::networkingProcessConnection): Added. (WebKit::WebContext::sendToNetworkingProcess): Added. (WebKit::WebContext::sendToNetworkingProcessRelaunchingIfNecessary): Added. * UIProcess/WebCookieManagerProxy.cpp: (WebKit::WebCookieManagerProxy::shouldTerminate): Should not prevent WebProcess termination when NetworkProcess is in use. (WebKit::WebCookieManagerProxy::getHostnamesWithCookies): Removed a useless ASSERT that neiter documents expectations nor helps find bugs. Send a message to correct process, whether WebProcess or NetworkProcess. (WebKit::WebCookieManagerProxy::deleteCookiesForHostname): Ditto. (WebKit::WebCookieManagerProxy::deleteAllCookies): Ditto. (WebKit::WebCookieManagerProxy::startObservingCookieChanges): Ditto. (WebKit::WebCookieManagerProxy::stopObservingCookieChanges): Ditto. (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): Ditto. (WebKit::WebCookieManagerProxy::getHTTPCookieAcceptPolicy): Ditto. * WebProcess/Cookies/WebCookieManager.h: * WebProcess/Cookies/WebCookieManager.cpp: Made the class usable in either WebProcess or NetworkProcess. (WebKit::WebCookieManager::setConnection): WebCookieManager now remembers which connection to talk back on. (WebKit::WebCookieManager::didReceiveMessage): Added an assertion that stored connection matches the one being used to reciev messages. (WebKit::WebCookieManager::getHostnamesWithCookies): Use the stored connection to send a reply. (WebKit::WebCookieManager::startObservingCookieChanges): Pass a callback function, so that WebCore doesn't have to use a platform strategy. (WebKit::WebCookieManager::cookiesDidChange): The new callback. (WebKit::WebCookieManager::dispatchCookiesDidChange): Use the stored connection. (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy): Use the stored connection. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Removed notifyCookiesChanged() which is no longer part of CookiesStrategy. 2012-12-22 Sam Weinig Make CustomProtocolManager a MessageReceiver to remove more special casing https://bugs.webkit.org/show_bug.cgi?id=105682 Reviewed by Dan Bernstein. To avoid storing a Connection in CustomProtocolManager, which is not a great idea without it being the Connection::Client and therefore getting death notifications, I also made ChildProcess a MessageSender so that extensions to it, like CustomProtocolManager, can easily send messages to the parent process. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::NetworkProcess): Initialize the shared CustomProtocolManager, which will add it to the MessageReceiverMap in the ChildProcess. (WebKit::NetworkProcess::didReceiveMessage): Remove the special case for CustomProtocolManager. (WebKit::NetworkProcess::initializeNetworkProcess): Call connectionEstablished on the CustomProtocolManager to make it start working as a NSURLProtocol handler. * NetworkProcess/NetworkProcess.h: Add overrides necessary for MessageSender. * PluginProcess/PluginProcess.h: Ditto. * Shared/ChildProcess.h: (ChildProcess): Make ChildProcess a MessageSender. * Shared/Network/CustomProtocols/CustomProtocolManager.h: (CustomProtocolManager): (WebKit::CustomProtocolManager::childProcess): * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: (-[WKCustomProtocol startLoading]): (-[WKCustomProtocol stopLoading]): (WebKit::CustomProtocolManager::CustomProtocolManager): (WebKit::CustomProtocolManager::initialize): (WebKit::CustomProtocolManager::connectionEstablished): Make CustomProtocolManager a MessageReceiver and split initialization and the time when it can start acting as protocol handler as these happen at different times now. It also now stores a ChildProcess rather than a Connection. * SharedWorkerProcess/SharedWorkerProcess.h: Add overrides necessary for MessageSender. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): Initialize the shared CustomProtocolManager, which will add it to the MessageReceiverMap in the ChildProcess. (WebKit::WebProcess::didReceiveMessage): Remove the special case for CustomProtocolManager. (WebKit::WebProcess::initializeCustomProtocolManager): Call connectionEstablished on the CustomProtocolManager to make it start working as a NSURLProtocol handler. * WebProcess/WebProcess.h: Add overrides necessary for MessageSender. 2012-12-20 Martin Robinson [GTK] Remove plugin process configuration option https://bugs.webkit.org/show_bug.cgi?id=105564 Reviewed by Carlos Garcia Campos. Remove the --enable-plugin-process configuration option, opting instead to always build the plugin process when building WebKit2. It isn't very interesting for downstream to enable or disable the plugin process. It should always be enabled for WebKit2 and it's better for us not to have to keep a disabled plugin process building. Additionally, the in-process plugin isn't functional, since plugins depend on GTK+ 2 and WebKit2 depends on GTK+ 3. * GNUmakefile.am: Remove the option. * GNUmakefile.list.am: Remote the option. 2012-12-22 Sam Weinig Give the ChildProcess a MessageReceiverMap https://bugs.webkit.org/show_bug.cgi?id=105681 Reviewed by Dan Bernstein. Moving the MessageReceiverMap to the ChildProcess will help shared code between the WebProcess and NetworkProcess. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::NetworkProcess): Pass 'this' instead of the MessageReceiverMap, now that ChildProcess can be used to access the MessageReceiverMap. * NetworkProcess/NetworkProcess.h: (NetworkProcess): Remove the now extraneous MessageReceiverMap. * Shared/ChildProcess.cpp: (WebKit::ChildProcess::ChildProcess): (WebKit): (WebKit::ChildProcess::~ChildProcess): (WebKit::ChildProcess::addMessageReceiver): (WebKit::ChildProcess::removeMessageReceiver): * Shared/ChildProcess.h: (ChildProcess): Add a MessageReceiverMap and helper functions from WebProcess. * WebProcess/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::AuthenticationManager): * WebProcess/Authentication/AuthenticationManager.h: (AuthenticationManager): Fix the FIXME, passing the ChildProcess rather than the MessageReceiverMap. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): * WebProcess/WebProcess.h: (WebProcess): Remove the MessageReceiverMap and helper functions. 2012-12-22 Alexey Proskuryakov Windows build fix. * WebProcess/Cookies/cf/WebCookieManagerCFNet.cpp: 2012-12-22 Alexey Proskuryakov Add a separate class for networking related storage https://bugs.webkit.org/show_bug.cgi?id=105676 Reviewed by Sam Weinig. * NetworkProcess/NetworkConnectionToWebProcess.cpp: We no longer need to create fake RemoteNetworkingContexts here! Use an actual default or private storage session. * NetworkProcess/mac/NetworkProcessMainMac.mm: Updated form of WebSystemInterface.h include, it's not a system one. * NetworkProcess/mac/RemoteNetworkingContext.h: Expose privateBrowsingSession(), so that NetworkConnectionToWebProcess could use it. We can generalize the interface one we support more sessions. * NetworkProcess/mac/RemoteNetworkingContext.mm: This class now only tracks private browsing session, with most other code being in NetworkStorageSession. * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: * WebProcess/WebProcess.cpp: * WebProcess/efl/WebProcessMainEfl.cpp: * WebProcess/gtk/WebProcessMainGtk.cpp: * WebProcess/Downloads/cfnet/DownloadCFNet.cpp: * WebProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp: * WebProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp: * WebProcess/Downloads/mac/DownloadMac.mm: * WebProcess/Network/WebResourceLoader.cpp: Updated includes for ResourceHandle change. For some ports, the includes could be made more tight, but I have no practical way to do that. * WebKit2.xcodeproj/project.pbxproj: Removed WebPlatformStrategiesMac.mm. * WebProcess/Cookies/WebCookieManager.cpp: (WebKit::WebCookieManager::getHostnamesWithCookies): (WebKit::WebCookieManager::deleteCookiesForHostname): (WebKit::WebCookieManager::deleteAllCookies): Pass a proper session instead of relying on a strategy to call back to WebKit for default cookie storage (we don't even have strategies initialized in NetworkProcess). * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::switchNetworkLoaderToNewTestingSession): Initialize WCSI before calling a function that now uses in in WebCore. * WebProcess/WebCoreSupport/WebPlatformStrategies.h: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: We no longer need a strategy for default cookie storage! Updated other functions to use sessions. * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: * WebProcess/WebCoreSupport/mac/WebPlatformStrategiesMac.mm: Removed. * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h: WebFrameNetworkingContext is now simpler, with more tracking being donre through WebCore. 2012-12-21 Elliott Sprehn Replace documentFragmentIsShadowRoot with isTreeScope https://bugs.webkit.org/show_bug.cgi?id=105345 Reviewed by Dimitri Glazkov. Expose isTreeScope symbol. * win/WebKit2.def.in: 2012-12-21 Sheriff Bot Unreviewed, rolling out r138331. http://trac.webkit.org/changeset/138331 https://bugs.webkit.org/show_bug.cgi?id=105668 Broke Windows clean builds; can't figure out how to fix it (Requested by rniwa on #webkit). * win/WebKit2.def.in: 2012-12-21 Brady Eidson ASSERT in WebResourceLoadScheduler::scheduleLoad with a crashed NetworkProcess. and https://bugs.webkit.org/show_bug.cgi?id=105646 Reviewed by Alexey Proskuryakov. If we fail to schedule a loader with the NetworkProcess it is probably because the NetworkProcess crashed. Since these loaders will never succeed in loading we should schedule them to fail on a timer. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler): (WebKit::WebResourceLoadScheduler::scheduleLoad): (WebKit::WebResourceLoadScheduler::addUnschedulableLoad): (WebKit::WebResourceLoadScheduler::unscheduledLoadTimerFired): (WebKit::WebResourceLoadScheduler::remove): * WebProcess/Network/WebResourceLoadScheduler.h: 2012-12-21 Kenneth Rohde Christiansen Unreviewed potential fix EFL/Qt test breakage on WK2 Only disable scrollbars when in fixed layout mode. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): 2012-12-21 Brady Eidson Remove ResourceLoadScheduler::addMainResourceLoad and all related code and https://bugs.webkit.org/show_bug.cgi?id=105644 Reviewed by Alexey Proskuryakov. Now that main resources loads are scheduled (bug 49246) we don't need this stuff anymore. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::remove): (WebKit::WebResourceLoadScheduler::networkProcessCrashed): * WebProcess/Network/WebResourceLoadScheduler.h: 2012-12-20 Sam Weinig Add WebKit2 SPI to get the current selection as a WebArchive https://bugs.webkit.org/show_bug.cgi?id=105613 Reviewed by Anders Carlsson. * UIProcess/API/C/WKPage.cpp: (WKPageGetSelectionAsWebArchiveData): * UIProcess/API/C/WKPage.h: Add SPI. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::getSelectionAsWebArchiveData): (WebKit): * UIProcess/WebPageProxy.h: (WebPageProxy): * WebProcess/WebPage/WebPage.cpp: (WebKit): (WebKit::frameWithSelection): (WebKit::WebPage::getSelectionAsWebArchiveData): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: Pipe getter to the WebProcess and back. 2012-12-21 Brady Eidson Perform cleanup in WebProcess if the NetworkProcess crashes. and https://bugs.webkit.org/show_bug.cgi?id=105592 Reviewed by Alexey Proskuryakov. If the NetworkProcess crashes, a whole bunch of WebResourceLoaders (and WebCore::ResourceLoaders) might be orphaned in the WebProcess. These loaders need to fail once it is apparent they will never finish loading. * Shared/API/c/WKError.h: Add a new error representing an "WebKit Internal Error." * WebProcess/WebCoreSupport/WebErrors.h: * WebProcess/WebCoreSupport/mac/WebErrorsMac.mm: (WebKit::internalError): * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::networkProcessCrashed): Call didFail all outstanding ResourceLoaders and tell all WebResourceLoaders the NetworkProcess crashed. * WebProcess/Network/WebResourceLoadScheduler.h: * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::networkProcessCrashed): Call didFail with the new InternalError * WebProcess/Network/WebResourceLoader.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::networkProcessConnectionClosed): Tell the scheduled the NetworkProcess crashed. 2012-12-21 Kenneth Rohde Christiansen [EFL][WK2] Never create WebCore scrollbars for EFL/WK2 https://bugs.webkit.org/show_bug.cgi?id=105632 Reviewed by Antonio Gomes. Then creating the frame ask to not create scrollbars and lock it so they won't be created at any later time. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): 2012-12-21 Seokju Kwon [EFL] Add guard around ContextMenuItemTagInspectElement https://bugs.webkit.org/show_bug.cgi?id=105267 Reviewed by Ryosuke Niwa. Need INSPECTOR guard for using ContextMenuItemTagInspectElement. * UIProcess/API/efl/ewk_context_menu_item.cpp: 2012-12-21 Mikhail Pozdnyakov [WK2] TiledBackingStore: Scroll position is not reset when new page is loaded https://bugs.webkit.org/show_bug.cgi?id=105627 Reviewed by Kenneth Rohde Christiansen. Reset scroll position to (0,0) when new page is loaded. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::sendViewportAttributesChanged): 2012-12-21 Tim Horton PDFPlugin: Cannot drop files/URLs on PDFPlugin https://bugs.webkit.org/show_bug.cgi?id=105516 Reviewed by Alexey Proskuryakov. Add shouldAllowNavigationFromDrags to Plugin/PluginView/etc., which WebCore will consult when dragging over a PluginDocument to decide whether or not a drag may result in navigation. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::shouldAllowNavigationFromDrags): Added, always returning false to keep existing behavior. * WebProcess/Plugins/Netscape/NetscapePlugin.h: (NetscapePlugin): Added. * WebProcess/Plugins/PDF/SimplePDFPlugin.h: (WebKit::SimplePDFPlugin::shouldAllowNavigationFromDrags): Added, always returning true. (Simple)PDFPlugin should navigate when dropped onto, just like an image or HTML document would. * WebProcess/Plugins/Plugin.h: (Plugin): Add shouldAllowNavigationFromDrags. * WebProcess/Plugins/PluginProxy.h: Add shouldAllowNavigationFromDrags. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::shouldAllowNavigationFromDrags): Forward shouldAllowNavigationFromDrags to the plugin. * WebProcess/Plugins/PluginView.h: Add shouldAllowNavigationFromDrags. 2012-12-21 Sheriff Bot Unreviewed, rolling out r138357. http://trac.webkit.org/changeset/138357 https://bugs.webkit.org/show_bug.cgi?id=105622 wrong fix for the problem (the original author actually already did this, and it's not helping) (Requested by thorton on #webkit). * win/WebKit2.def.in: 2012-12-21 Sheriff Bot Unreviewed, rolling out r138338. http://trac.webkit.org/changeset/138338 https://bugs.webkit.org/show_bug.cgi?id=105621 speculative rollout because fast/dom/shadow/content-element- distributed-nodes.html is crashing on linux debug. (Requested by loislo on #webkit). * win/WebKit2.def.in: 2012-12-21 Tim Horton Unreviewed Windows build fix after http://trac.webkit.org/changeset/138338 * win/WebKit2.def.in: 2012-12-21 Tim Horton Reducing print preview scale significantly causes a crash https://bugs.webkit.org/show_bug.cgi?id=105519 Reviewed by Alexey Proskuryakov. The bitmap image used for print previews was being created respecting the print preview scale. This doesn't make any sense, as the scale does not affect the size of the image required to represent the previewed page. Instead, we should not scale the size, creating the buffer at a size that is constant regardless of scale, and do the scaling when drawing *into* the buffer instead. In some cases, this could cause an out-of-memory crash. * UIProcess/API/mac/WKPrintingView.mm: (-[WKPrintingView _drawPreview:]): Rename rect to scaledPrintingRect for clarity. Compute print preview bitmap image size from the original non-scaled drawing size and the device scale factor. Hand the image size to drawRectToImage. Draw the image without scaling, as it's always created at the correct size. Don't compute the scale factor from the size of the image, we can know it from WebPageProxy. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::drawRectToImage): Add a parameter to drawRectForImage, imageSize. * UIProcess/WebPageProxy.h: (WebPageProxy): Add a parameter to drawRectForImage, imageSize. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawRectToImage): Use imageSize to size our buffer, and scale up to make the printing rect fit in the bitmap's bounds. * WebProcess/WebPage/WebPage.h: (WebPage): Add a parameter to drawRectForImage, imageSize. * WebProcess/WebPage/WebPage.messages.in: Add a parameter to drawRectForImage, imageSize. 2012-12-20 Helder Correia [CoordGfx] Make single-argument AreaAllocator constructors explicit https://bugs.webkit.org/show_bug.cgi?id=105598 Reviewed by Noam Rosenthal. Follow the coding style for AreaAllocator and GeneralAreaAllocator. * WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.h: (AreaAllocator): (GeneralAreaAllocator): 2012-12-20 Elliott Sprehn Replace documentFragmentIsShadowRoot with isTreeScope https://bugs.webkit.org/show_bug.cgi?id=105345 Reviewed by Dimitri Glazkov. Expose isTreeScope symbol. * win/WebKit2.def.in: 2012-12-20 Kiran Muppala Set timer coalescing policy for WebKit2 processes on Mac until process visible assertion handles it automatically https://bugs.webkit.org/show_bug.cgi?id=105594 Reviewed by Mark Rowe. * Shared/mac/ChildProcessMac.mm: (WebKit::initializeTimerCoalescingPolicy): Set task_latency and task_throughput QOS tiers as appropriate for visible applications. (WebKit::ChildProcess::platformInitialize): Add call to initializeTimerCoalescingPolicy. 2012-12-20 Anders Carlsson Stop building WebKit2 for Windows https://bugs.webkit.org/show_bug.cgi?id=105585 Reviewed by Brian Weinstein. Remove an unneeded export. * win/WebKit2.def.in: 2012-12-20 Ryuan Choi [EFL] Build break with latest EFL libraries. https://bugs.webkit.org/show_bug.cgi?id=104827 Reviewed by Laszlo Gombos. The eo EFL package is introduced and evas and ecore use it since 1.8. While introducing Eo, EFL changed several structures of Evas and Ecore from own specific class to Eo. So, this patch adds FindEo and changes declaration of Evas, Evas_Object, Ecore_Timer to build with latest EFL libraries. * PlatformEfl.cmake: Includes eo EFL library. * UIProcess/API/C/efl/WKAPICastEfl.h: Modified declaration of Evas_Object. * UIProcess/API/C/efl/WKView.h: Modified declaration of Evas. * UIProcess/efl/WebPopupMenuProxyEfl.h: Removed unnecessary declaration. 2012-12-20 Helder Correia [CoordGfx] Remove CoordinatedLayerUpdateInfo class forwarding https://bugs.webkit.org/show_bug.cgi?id=105588 Reviewed by Noam Rosenthal. There is no such class. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (WebKit): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: (WebKit): 2012-12-20 Pratik Solanki Rename HAVE(NETWORK_CFDATA_ARRAY_CALLBACK) to USE(NETWORK_CFDATA_ARRAY_CALLBACK) https://bugs.webkit.org/show_bug.cgi?id=105578 Reviewed by Alexey Proskuryakov. * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkResourceLoader.h: 2012-12-20 Alexey Proskuryakov LocalTerminationDisabler is not needed in WebCookieManager.cpp https://bugs.webkit.org/show_bug.cgi?id=105581 Reviewed by Anders Carlsson. All WebCookieManager functions are synchronous, and all LocalTerminationDisabler does is enable/disable a timer that cannot fire inside the function anyway. * WebProcess/Cookies/WebCookieManager.cpp: (WebKit::WebCookieManager::getHostnamesWithCookies): (WebKit::WebCookieManager::deleteCookiesForHostname): (WebKit::WebCookieManager::deleteAllCookies): (WebKit::WebCookieManager::startObservingCookieChanges): (WebKit::WebCookieManager::setHTTPCookieAcceptPolicy): (WebKit::WebCookieManager::getHTTPCookieAcceptPolicy): 2012-12-20 Brady Eidson NetworkProcess has no need for suspend/resumePendingRequests. and https://bugs.webkit.org/show_bug.cgi?id=105550 Reviewed by Alexey Proskuryakov. suspend/resumePendingRequests were important in a single-process, WebKit1 API world to help prevent client callbacks from occurring during layout/painting. In a WebKit2 + NetworkProcess world, they aren't important. Remove the Web->Network process messages: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkResourceLoadScheduler.cpp: * NetworkProcess/NetworkResourceLoadScheduler.h: For now, still keep the per-WebProcess count to help keep servePendingRequest working as WebCore intends: * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::servePendingRequests): (WebKit::WebResourceLoadScheduler::suspendPendingRequests): (WebKit::WebResourceLoadScheduler::resumePendingRequests): 2012-12-20 Carlos Garcia Campos [GTK] Add API to set a TLS errors policy to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=104482 Reviewed by Martin Robinson. Add an emum for TLS errors policy with values IGNORE and FAIL and API to WebKitWebContext to set/get the policy. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): Encode ignoreTLSErrors. (WebKit::WebProcessCreationParameters::decode): Decode ignoreTLSErrors. * Shared/WebProcessCreationParameters.h: (WebProcessCreationParameters): Add ignoreTLSErrors when building with soup network backend. * Shared/soup/PlatformCertificateInfo.cpp: (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): Add a constructor that receives a ResourceError. * Shared/soup/PlatformCertificateInfo.h: * Shared/soup/WebCoreArgumentCodersSoup.cpp: (CoreIPC::::encodePlatformData): Encode the PlatformCertificateInfo as part for the ResourceError. (CoreIPC::::decodePlatformData): Decode the PlatformCertificateInfo and set certificate and TLS errors in the ResourceError. * UIProcess/API/gtk/WebKitLoaderClient.cpp: (didFailProvisionalLoadWithErrorForFrame): Call webkitWebViewLoadFailedWithTLSErrors() if the load failed due to TLS errors. * UIProcess/API/gtk/WebKitWebContext.cpp: (_WebKitWebContextPrivate): Add tlsErrorsPolicy member. (createDefaultWebContext): Initiales tlsErrorsPolicy. (webkit_web_context_set_tls_errors_policy): Set the TLS errors policy notify WebContext to ignore TLS errors or not. (webkit_web_context_get_tls_errors_policy): Return the current TLS errors policy. * UIProcess/API/gtk/WebKitWebContext.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewLoadFailedWithTLSErrors): Finish the load with an error if the TLS errors policy is FAIL. * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbols. * UIProcess/API/gtk/tests/TestSSL.cpp: (testTLSErrorsPolicy): (beforeAll): * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): Initialize m_ignoreTLSErrors. * UIProcess/WebContext.h: (WebContext): Add m_ignoreTLSErrors member. (WebKit::WebContext::ignoreTLSErrors): Return m_ignoreTLSErrors. * UIProcess/efl/WebContextEfl.cpp: (WebKit::WebContext::platformInitializeWebProcess): Set ignoreTLSErrors parameter. (WebKit::WebContext::setIgnoreTLSErrors): Send SetIgnoreTLSErrors message to the web process. * UIProcess/gtk/WebContextGtk.cpp: (WebKit::WebContext::platformInitializeWebProcess): Set ignoreTLSErrors parameter. (WebKit::WebContext::setIgnoreTLSErrors): Send SetIgnoreTLSErrors message to the web process. (WebKit): * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: * WebProcess/efl/WebProcessMainEfl.cpp: (WebKit::WebProcessMainEfl): Remove the call to ResourceHandle::setIgnoreSSLErrors(). * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): Remove the call to ResourceHandle::setIgnoreSSLErrors(). * WebProcess/soup/WebProcessSoup.cpp: (WebKit::WebProcess::platformInitializeWebProcess): (WebKit::WebProcess::setIgnoreTLSErrors): Call ResourceHandle::setIgnoreSSLErrors(). (WebKit): 2012-12-20 Dominik Röttsches [EFL] MiniBrowser does not play Infinite Gangnam Style https://bugs.webkit.org/show_bug.cgi?id=103531 Reviewed by Kenneth Rohde Christiansen. WebAudio preference now defaults to switched on. * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::EwkViewImpl): 2012-12-20 Huang Dongsung Remove GraphicsLayer::setGraphicsLayerFactory(). https://bugs.webkit.org/show_bug.cgi?id=105503 Reviewed by Kenneth Rohde Christiansen. We don't need GraphicsLayer::setGraphicsLayerFactory() anymore. After r130302, we have used a graphics layer factory explicitly. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: * WebProcess/efl/WebProcessMainEfl.cpp: (WebKit::WebProcessMainEfl): * WebProcess/qt/WebProcessMainQt.cpp: (WebKit::WebProcessMainQt): 2012-12-20 Dominik Röttsches [WK2] WebAudio WKTR support https://bugs.webkit.org/show_bug.cgi?id=95084 Reviewed by Kenneth Rohde Christiansen. Implementing audio data dump support for WebKitTestRunner, by adding the API to the IDL, enabling IPC for transferring the audio data as bytebuffer and dumping it according to run-webkit-tests script's expectations. I am adding a testrunner specific bundle method to extract data from a Uint8Array into a bytebuffer. This API is used by WebKitTestRunner's TestRunner to extract the data into a local variable, then sending it over IPC. * DerivedSources.pri: Fixing Qt build by adding JSUint8Array.h header to list of forwarding headers. * Target.pri: Adding missing WKData.* files. Qt build fix. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleCreateWKDataFromUint8Array): Added. * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: Adding WKBundleCreateWKDataFromUint8Array. * WebProcess/InjectedBundle/InjectedBundle.cpp: Convert Uint8Array to WebData. (WebKit::InjectedBundle::createWebDataFromUint8Array): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (WebKit): (InjectedBundle): 2012-12-19 Kiran Muppala Adopt new assertion SPI for process suppression on Mac https://bugs.webkit.org/show_bug.cgi?id=105378 Reviewed by Mark Rowe. Process suppression for WebKit2 child processes is currently enabled or disabled using AutomaticTermination. This should be replaced with a new assertion SPI specific to process suppression. * Shared/ChildProcess.cpp: (WebKit::ChildProcess::ChildProcess): Remove unused member variable m_applicationIsOccluded. * Shared/ChildProcess.h: (WebKit::ChildProcess::applicationIsOccluded): Infer occlusion state from m_processVisibleAssertion. * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::setApplicationIsOccluded): Use applicationIsOccluded() accessor to check if the occlusion state has changed and take or release a process visible assertion accordingly. (WebKit::ChildProcess::platformInitialize): Remove call to initializeTimerCoalescingPolicy(), since taking a process visible assertion also sets the timer coalescing policy appropriately. Set the occlusion state to false on initialization. 2012-12-19 Alexey Proskuryakov [WK2 NetworkProcess] Client doesn't receive SSL certificates https://bugs.webkit.org/show_bug.cgi?id=105467 Reviewed by Brady Eidson. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didReceiveResponse): * Shared/mac/PlatformCertificateInfo.mm: (WebKit::PlatformCertificateInfo::PlatformCertificateInfo): * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): * WebProcess/Network/WebResourceLoader.h: * WebProcess/Network/WebResourceLoader.messages.in: Pass certificate chain over IPC, so that we could ultimately send it to client via WebPageProxy::DidCommitLoadForFrame message. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Initialize a WKSI function we've been missing. 2012-12-19 Jon Lee Add a function to set the origin hash table https://bugs.webkit.org/show_bug.cgi?id=105447 Reviewed by Brian Weinstein. Add a new API called WKContextSetPlugInAutoStartOriginHashes. It assigns the table of hashes, keyed by main frame origin, to the WebContext. That, in turn, notifies all existing web processes, so that each web process can update its copy of the auto-start hashes. * UIProcess/API/C/WKContext.cpp: (WKContextSetPlugInAutoStartOriginHashes): To clear the table, an empty dictionary must be provided. * UIProcess/API/C/WKContext.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::setPlugInAutoStartOriginHashes): Forward to PlugInAutoStartProvider. * UIProcess/WebContext.h: * UIProcess/Plugins/PlugInAutoStartProvider.cpp: (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable): Clear the map and set of hashes, and convert the data from the provided dictionary. Also add it to a temporary vector, which will be used to pass along to all of the active web processes. * UIProcess/Plugins/PlugInAutoStartProvider.h: * WebProcess/WebProcess.messages.in: Add plugInAutoStartOriginsChanged. Takes in a vector of the new set of hashes. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::plugInAutoStartOriginsChanged): Clear the existing set, and copy the new hashes. * WebProcess/WebProcess.h: 2012-12-18 Jon Lee Notify context client of change to table, and allow client to get a copy of it https://bugs.webkit.org/show_bug.cgi?id=105364 Reviewed by Brady Eidson. Add a callback to notify the context client that the origin hashes have changed. The client may choose to get a copy of that table and save it to disk. * UIProcess/API/C/WKContext.cpp: (WKContextCopyPlugInAutoStartOriginHashes): Added to the context client. * UIProcess/API/C/WKContext.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::plugInAutoStartOriginHashes): Return a copy of the origin hash table. * UIProcess/WebContext.h: * UIProcess/Plugins/PlugInAutoStartProvider.cpp: (WebKit::PlugInAutoStartProvider::addAutoStartOrigin): When the origin is added to the table, notify the context client. (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy): Create a copy of the table. * UIProcess/Plugins/PlugInAutoStartProvider.h: * UIProcess/WebContextClient.cpp: (WebKit::WebContextClient::plugInAutoStartOriginHashesChanged): Call the client. * UIProcess/WebContextClient.h: 2012-12-19 Alexis Menard Implement CSS parsing for CSS transitions unprefixed. https://bugs.webkit.org/show_bug.cgi?id=104804 Reviewed by Dean Jackson. Add a new flag ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED to cover the work of unprefixing Transforms, Animations and Transitions. It will let the possibility of each ports to turn it off in their release branches until we're confident that these CSS properties are ready to be unprefixed. * Configurations/FeatureDefines.xcconfig: 2012-12-19 Kondapally Kalyan [EFL][WK2][AC] Avoid creating an empty surface. https://bugs.webkit.org/show_bug.cgi?id=105410 Reviewed by Kenneth Rohde Christiansen. Ensure that the view has valid size before creating the surface. * UIProcess/API/efl/EvasGLSurface.h: (WebKit::EvasGLSurface::create): * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::displayTimerFired): 2012-12-19 Kenneth Rohde Christiansen [EFL][Qt][WK2] Going back to 47-amazing-css3-animation-demos shows nothing or wrong position https://bugs.webkit.org/show_bug.cgi?id=104414 Reviewed by Simon Hausmann. When contents size changes, make sure to apply any pending position change if possible. * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::didChangeContentsSize): 2012-12-19 Alberto Garcia [GTK] [WK2] Trailing semicolon in an #include line https://bugs.webkit.org/show_bug.cgi?id=105418 Reviewed by Xan Lopez. * UIProcess/gtk/WebContextGtk.cpp: Remove trailing semicolon in #include line. 2012-12-19 Kenneth Rohde Christiansen [EFL][WK2] Move deviceScaleFactor to our view as it's view related https://bugs.webkit.org/show_bug.cgi?id=105412 Reviewed by Laszlo Gombos. * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::setDeviceScaleFactor): (EwkViewImpl::transformFromScene): * UIProcess/API/efl/EwkViewImpl.h: (EwkViewImpl): * UIProcess/API/efl/ewk_view.cpp: (ewk_view_device_pixel_ratio_set): 2012-12-19 Zeno Albisser [Qt] Missing vtable for LoadStartedCatcher. https://bugs.webkit.org/show_bug.cgi?id=105313 Properly splitting class declarations and function definitions into headers/cpp-files. This makes including util.moc redundant and avoids the well known vtable issues with QObject classes. Reviewed by Simon Hausmann. * UIProcess/API/qt/tests/util.cpp: (LoadSpy::LoadSpy): (LoadSpy::onLoadingChanged): * UIProcess/API/qt/tests/util.h: (LoadSpy): 2012-12-19 KyungTae Kim Unused parameters on WebContext.cpp https://bugs.webkit.org/show_bug.cgi?id=105395 Reviewed by Kentaro Hara. Because the parameters 'certficate', 'host' are not used if !ENABLE(NETWORK_PROCESS), use UNUSED_PARAM macro to fix build warning -Wunused-parameter. * UIProcess/WebContext.cpp: (WebKit::WebContext::allowSpecificHTTPSCertificateForHost): 2012-12-18 Alexey Proskuryakov Remove unnecessary functions from CookiesStrategy https://bugs.webkit.org/show_bug.cgi?id=105369 Reviewed by Brady Eidson. * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: * WebProcess/WebCoreSupport/WebPlatformStrategies.h: * WebProcess/Cookies/WebCookieManager.cpp: Call PlatformCookieJar directly. Cookie messages to NetworkProcess should not be sent through WebProcess. In a future patch, I'll make WebCookieManagerProxy message NetworkProcess instead. 2012-12-18 Jon Lee [WK2] Create a context client https://bugs.webkit.org/show_bug.cgi?id=105316 Reviewed by Brady Eidson. Web contexts already have clients related to downloads or history. Miscellaneous callbacks can be grouped into a generic client for the web context. * UIProcess/API/C/WKContext.cpp: (WKContextSetClient): Set the client for the context. * UIProcess/API/C/WKContext.h: Define a new, empty WKContextClient. * UIProcess/WebContext.cpp: (WebKit::WebContext::initializeClient): * UIProcess/WebContext.h: Add a variable for the new client. Move the download client so that all the clients are grouped together. (WebKit::WebContext::client): Returns the context client. * UIProcess/WebContextClient.cpp: Added. Currently empty, but will be filled out in a pending patch. * UIProcess/WebContextClient.h: Added. Add WebContextClient.{h,cpp}. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: 2012-12-18 Ivan Krstić per-pid private temporary directories for sandboxed webkit2 plugins Reviewed by Sam Weinig, Alexey Proskuryakov, Anders Carlsson. Previously we assigned each PluginProcess a private temporary and cache directory based on the bundle name of the plugin that was running. This sometimes led to overly-long pathnames (sockets on OS X can only be 103 characters long), and didn't provide isolation between multiple running instances of the same plugin on behalf of different processes. We now assign each PluginProcess its own private temporary and cache directory regardless of which plugin it's running, and make an attempt to clean these up when the process terminates. We also pass the temporary directory into the sandbox profile as a parameter, in case the plugin profile needs to apply additional rules beyond the default read/write policy. * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: (enterSandbox): 2012-12-18 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=102579 [mac] Enable scaled cursors Reviewed by Dean Jackson. * Configurations/FeatureDefines.xcconfig: 2012-12-18 Joseph Pecoraro [Mac] Add Build Phase to Check Headers for Inappropriate Macros (Platform.h macros) https://bugs.webkit.org/show_bug.cgi?id=104279 Reviewed by David Kilzer. Add a build phase to check the public WebKit2 headers for inappropriate macros. Also set the executable as an input path on the other check-* build phases. * WebKit2.xcodeproj/project.pbxproj: 2012-12-18 Jer Noble REGRESSION: Using the Exit Full Screen button in the menu bar to exit HTML5 / media full screen breaks Safari windows https://bugs.webkit.org/show_bug.cgi?id=104610 Reviewed by Anders Carlsson. When a user clicks on the menu-bar exit fullscreen button, that skips notifying the document that the window is exiting fullscreen and tearing down the placeholder. Manually call that part of the code when we detect that it has been skipped. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): 2012-12-18 Brady Eidson WebProcesses often crash if they access the network after a NetworkProcess crash. and https://bugs.webkit.org/show_bug.cgi?id=105338 Reviewed by Alexey Proskuryakov. After a NetworkProcess crash we should try to re-establish a connection to a new NetworkProcess when it is needed. If that attempt fails, then the WebProcess should "cleanly" crash. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::networkConnection): 2012-12-17 Sam Weinig Try to fix the Mac build. * NetworkProcess/mac/NetworkProcessMac.mm: 2012-12-17 Halton Huo [EFL] Add ecore_imf_evas to FindEcore.cmake https://bugs.webkit.org/show_bug.cgi?id=105159 Reviewed by Laszlo Gombos. * PlatformEfl.cmake: Add ECORE_IMF_EVAS_LIBRARIES to WebProcess_LIBRARIES 2012-12-17 Huang Dongsung Coordinated Graphics: Refactor TiledBackingStore code in CoordinatedGraphicsLayer. https://bugs.webkit.org/show_bug.cgi?id=103959 Reviewed by Kenneth Rohde Christiansen. Currently, CoordinatedGraphicsLayer has complex code related to TiledBackingStore. It has two problem. 1. CoordinatedGraphicsLayer hacks TiledBackingStore to prevent TiledBackingStore from asynchronously sending UpdateTile message to UI Process. 2. CreateTile and RemoveTile message can be sent to UI Process at any time. This patch makes CoordinatedGraphicsLayer use TiledBackingStore more explicitly. It means only during flushing layer states, CoordinatedGraphicsLayer calls methods of TiledBackingStore, which indirectly call createTile(), updateTile() and removeTile(). * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::setVisibleContentRectTrajectoryVector): (WebCore::CoordinatedGraphicsLayer::setContentsScale): (WebCore::CoordinatedGraphicsLayer::adjustContentsScale): (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreHasPendingTileCreation): (WebCore::CoordinatedGraphicsLayer::beginContentUpdate): (WebCore::CoordinatedGraphicsLayer::createTile): (WebCore::CoordinatedGraphicsLayer::updateTile): (WebCore::CoordinatedGraphicsLayer::removeTile): (WebCore::CoordinatedGraphicsLayer::updateContentBuffers): (WebCore::CoordinatedGraphicsLayer::purgeBackingStores): (WebCore::CoordinatedGraphicsLayer::setNeedsVisibleRectAdjustment): (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayerClient): (CoordinatedGraphicsLayer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::notifyFlushRequired): (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer): (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 2012-12-17 Brady Eidson Can't visit sites with untrusted certs with the NetworkProcess. and https://bugs.webkit.org/show_bug.cgi?id=105235 Reviewed by Sam Weinig. For Mac the missing functionality is being able to tell the network layer in the NetworkProcess to temporarily accept a certificate chain for the given host. This patch adds some SPI supporting the way this works on Mac. Add a message and Mac implementation for "allowSpecificHTTPSCertificateForHost": * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::allowSpecificHTTPSCertificateForHost): Add SPI for the embedding app" * UIProcess/API/C/WKContext.cpp: (WKContextAllowSpecificHTTPSCertificateForHost): * UIProcess/API/C/WKContextPrivate.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::allowSpecificHTTPSCertificateForHost): * UIProcess/WebContext.h: 2012-12-17 Huang Dongsung [CoordinatedGraphics] Assertion hit in WebKit::LayerTreeRenderer::setLayerState() https://bugs.webkit.org/show_bug.cgi?id=104518 Reviewed by Noam Rosenthal. CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly() must perform only during flushing pending layer changes in CoordinatedLayerTreeHost. RenderLayerCompositor can call GraphicsLayer::flushCompositingState() regardless of CoordinatedLayerTreeHost and it breaks our assumption. It means that CoordinatedGraphicsLayer can send messages although m_waitingForUIProcess in CoordinatedLayerTreeHost is true. Assertion hits because of the same reason. If RenderLayerCompositor calls flushCompositingState() before the first CoordinatedLayerTreeHost::flushPendingLayerChanges(), SetCompositingLayerState message can be prior to SetRootCompositingLayer message. We fix this by ensuring that we perform the layer flush only in the code path originating from CoordinatedLayerTreeHost. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::flushCompositingState): (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayerClient): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 2012-12-17 Alexey Proskuryakov NetworkProcess should not exit after downloading https://bugs.webkit.org/show_bug.cgi?id=105209 Reviewed by Anders Carlsson. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::shouldTerminate): This process should never voluntarily terminate, because it keeps session auth and cookies. 2012-12-17 Thiago Marcos P. Santos [EFL] Unit tests process hanging on WK2 Release bots https://bugs.webkit.org/show_bug.cgi?id=105021 Reviewed by Kenneth Rohde Christiansen. Follow-up of r137605, which made it more difficult to reproduce the race condition but doesn't entirely solve the problem. Now we are handling only points in the middle of the fork()/exec(). * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: (WebKit::ProcessLauncher::launchProcess): 2012-12-17 Kenneth Rohde Christiansen [EFL][WK2] window_create doesn't receive the url https://bugs.webkit.org/show_bug.cgi?id=105184 Reviewed by Alexis Menard. Pass the url to the window_create method. * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::createNewPage): * UIProcess/API/efl/EwkViewImpl.h: (EwkViewImpl): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/tests/test_ewk2_window_features.cpp: (createDefaultWindow): (createWindow): * UIProcess/efl/PageUIClientEfl.cpp: (WebKit::PageUIClientEfl::createNewPage): 2012-12-17 Mikhail Pozdnyakov [WK2] TiledBackingStore: css3/device-adapt/viewport-width-not-affecting-next-page.html is flaky https://bugs.webkit.org/show_bug.cgi?id=105131 Reviewed by Kenneth Rohde Christiansen. The problem was lead by truncation of the scaled result for 'contentFixedSize'. Fixed now with using FloatSize::scale() instead of IntSize::scale(). * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::sendViewportAttributesChanged): 2012-12-17 Oswald Buddenhagen [Qt] remove some unnecessary CONFIG additions Reviewed by Simon Hausmann. qt is already added by spec_pre.prf, warn_on and depend_includepath by default_pre.prf. * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro: * UIProcess/API/qt/tests/qmltests/WebView.pro: 2012-12-17 Oswald Buddenhagen [Qt] rely on automatic output directory setup Reviewed by Simon Hausmann. Now being a proper qt module (by virtue of having load(qt_build_config) in .qmake.conf), webkit gets the path setup goodies for free. This also fixes Makefile.api.Debug/Release trying to generate qrc_WebKit.cpp at the same time, instead of the debug and release version ending up in different directories as they should. * UIProcess/API/qt/tests/qmltests/DesktopBehavior.pro: * UIProcess/API/qt/tests/qmltests/WebView.pro: 2012-12-17 Thiago Marcos P. Santos [EFL] Unit tests process hanging on WK2 Release bots https://bugs.webkit.org/show_bug.cgi?id=105021 Reviewed by Kenneth Rohde Christiansen. Do not allocate memory in the middle of a fork()/exec(). EFL uses global FastMalloc new operator and when we fork(), the process is in a very delicate state. We were being lucky most of the time, but sometimes FastMalloc enters in a busy wait and hangs because it's data structures cannot be trusted after the fork(). This explains why sometimes we see UIProcess hanging on the bots: they are in fact UIProcess trying to exec() into a WebProcess but hanged just after the fork(). CMake test runner kills the original UIProcess due to timeout and the buggy one stays forever. * PlatformEfl.cmake: Set the timeout back to the original value. * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: (WebKit::ProcessLauncher::launchProcess): I'm keeping the original behavior, including the call to system() when wrapping the WebProcess on Debug mode. This should be changed to exec() in another patch. 2012-12-17 Csaba Osztrogonác Fix the Qt Windows build after r137803 https://bugs.webkit.org/show_bug.cgi?id=105152 Reviewed by Kentaro Hara. * Shared/CacheModel.h: 2012-12-16 Tim Horton PDFPlugin: The "Open in Preview" HUD button should work https://bugs.webkit.org/show_bug.cgi?id=102448 Reviewed by Alexey Proskuryakov. Implement the "Open in Preview" button for PDFPlugin, by moving the implementation from PDFViewController onto WebPageProxyMac, and reusing it in PDFViewController and PDFPlugin. * UIProcess/API/mac/PDFViewController.h: (PDFViewController): Remove unnecessary members in favor of a UUID that identifies our PDF on disk. * UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewController::openPDFInFinder): Move PDFViewController's implementation of openPDFInFinder and related functions to WebPageProxyMac. This will allow it to be shared with PDFPlugin. * UIProcess/WebPageProxy.h: (WebPageProxy): Add savePDFToFileInTemporaryFolderAndOpenWithNativeApplication, savePDFToFileInTemporaryFolderAndOpenWithNativeApplicationRaw, and openPDFFromTemporaryFolderWithNativeApplication. Add m_temporaryPDFFiles, which is used to keep track of the filenames of PDFs that we've saved to disk. * UIProcess/WebPageProxy.messages.in: Add SavePDFToFileInTemporaryFolderAndOpenWithNativeApplication and OpenPDFFromTemporaryFolderWithNativeApplication. * UIProcess/mac/WebPageProxyMac.mm: (WebKit::temporaryPDFDirectoryPath): Copied from PDFViewController. Construct the path to a WebKitPDFs temporary directory into which PDFs to be opened with a native application are downloaded. (WebKit::pathToPDFOnDisk): Copied from PDFViewController. Combine temporaryPDFDirectoryPath with the suggested filename for the given PDF, creating a new filename if the file already exists. (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplicationRaw): (WebKit::WebPageProxy::savePDFToTemporaryFolderAndOpenWithNativeApplication): Save the given PDF data to a temporary file, given the suggested filename. This inserts the filename used into m_temporaryPDFFiles, where it can later be retrieved by UUID when asked to open the PDF again in a native application. Then, open it with NSWorkspace. (WebKit::WebPageProxy::openPDFFromTemporaryFolderWithNativeApplication): Open the previously saved PDF file with NSWorkspace, referenced by UUID. We identify the file by UUID instead of name so that only the UIProcess needs to keep track of the actual filename, and so that the WebProcess cannot hand an arbitrary filename back to the UIProcess to open. * WebProcess/Plugins/PDF/PDFPlugin.h: (PDFPlugin): Add openWithNativeApplication and storage for the UUID that identifies our PDF on disk. * WebProcess/Plugins/PDF/PDFPlugin.mm: (-[WKPDFLayerControllerDelegate openWithPreview]): Forward openWithPreview to PDFPlugin's openWithNativeApplication. (WebKit::PDFPlugin::saveToPDF): Hand raw data to WebPage and have it send the message to WebPageProxy instead of using IPC types in PDFPlugin. (WebKit::PDFPlugin::openWithNativeApplication): Ask WebPage to save the current PDF to a temporary directory and open it with a native application. If we've already downloaded the PDF (and have a non-null m_temporaryPDFUUID), we can just open the existing file. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::savePDFToFileInDownloadsFolder): Hand the PDF data to WebPageProxy to save. (WebKit::WebPage::savePDFToTemporaryFolderAndOpenWithNativeApplication): Hand the PDF data to WebPageProxy to save and open. * WebProcess/WebPage/WebPage.h: (WebPage): Add savePDFToFileInDownloadsFolder and savePDFToTemporaryFolderAndOpenWithNativeApplication. 2012-12-16 Seokju Kwon [WK2] Remote Web Inspector requires the inspector https://bugs.webkit.org/show_bug.cgi?id=105088 Reviewed by Sam Weinig. Inspector server should not be started without inspector. * config.h: 2012-12-16 Seokju Kwon Fix unused parameter compile warnings https://bugs.webkit.org/show_bug.cgi?id=105089 Reviewed by Kentaro Hara. Use UNUSED_PARAM macro to fix build warning -Wunused-parameter. * UIProcess/API/efl/ewk_view.cpp: (ewk_view_inspector_show): (ewk_view_inspector_close): 2012-12-16 Ryuan Choi [EFL][WK2] Header files of ewk_context_menu should be installed https://bugs.webkit.org/show_bug.cgi?id=105069 Reviewed by Gyuyoung Kim. * PlatformEfl.cmake: Modified to install ewk_context_menu.h and ewk_context_menu_item.h which are included in EWebKit2.h 2012-12-16 Alexey Proskuryakov Bundle uploads don't work https://bugs.webkit.org/show_bug.cgi?id=105149 Reviewed by Sam Weinig. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didReceiveResponse): (WebKit::NetworkResourceLoader::didFail): Clean up generated files when they are no longer needed. This has to be done before FormData destruction. This duplicates same work done in WebProcess, but duplicaiton is safe, and may be helpful if one of the sides prematurely exits. 2012-12-16 Jon Lee Allow built-in PDF plugin and plugin documents to auto-start https://bugs.webkit.org/show_bug.cgi?id=105000 Reviewed by Sam Weinig. Overrides PluginViewBase::shouldAlwaysAutoStart(). * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::shouldAlwaysAutoStart): If there's no plug-in, return the default, otherwise return the plug-in's behavior. * WebProcess/Plugins/PluginView.h: * WebProcess/Plugins/Plugin.h: (WebKit::Plugin::shouldAlwaysAutoStart): Added. By default, return false. * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Built-in PDF plug-ins should auto-start. 2012-12-16 Huang Dongsung Coordinated Graphics: Small refactor of CoordinatedLayerTreeHost and CoordinatedGraphicsLayer. https://bugs.webkit.org/show_bug.cgi?id=104880 Reviewed by Noam Rosenthal. This patch changes two points. 1. Remove layerByIDMap() in CoordinatedGraphicsLayer because it is unused. 2. Remove code swapping m_registeredLayers in CoordinatedLayerTreeHost because setCoordinator(0) does not call detachLayer(). * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost): 2012-12-16 Anders Carlsson Remove the random crash thread https://bugs.webkit.org/show_bug.cgi?id=105147 Reviewed by Sam Weinig. Remove old crashy code. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initialize): 2012-12-16 Anders Carlsson Implement authentication for downloads https://bugs.webkit.org/show_bug.cgi?id=105146 Reviewed by Sam Weinig. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::NetworkProcess): (WebKit::NetworkProcess::initialize): (WebKit::NetworkProcess::didReceiveMessage): (WebKit::NetworkProcess::didReceiveSyncMessage): (WebKit::NetworkProcess::downloadsAuthenticationManager): * NetworkProcess/NetworkProcess.h: * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::didReceiveAuthenticationChallenge): * WebProcess/Downloads/Download.cpp: (WebKit::Download::didReceiveAuthenticationChallenge): * WebProcess/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::downloadsAuthenticationManager): * WebProcess/Downloads/DownloadManager.h: * WebProcess/Downloads/mac/DownloadMac.mm: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::downloadsAuthenticationManager): (WebKit::WebProcess::didReceiveSyncMessage): * WebProcess/WebProcess.h: 2012-12-16 Huang Dongsung Coordinated Graphics: Small refactor of CoordinatedLayerTreeHost and CoordinatedGraphicsLayer. https://bugs.webkit.org/show_bug.cgi?id=104880 Reviewed by Noam Rosenthal. Delete backing stores explicitly in ~CoordinatedLayerTreeHost(). Clarify the lifecycle of backing stores in CoordinatedGraphicsLayer. Currently, CoordinatedGraphicsLayer::removeTile() checks if m_coordinator exists, because ~CoordinatedLayerTreeHost() sets m_coordinator in CoordinatedGraphicsLayer to 0. This patch purges backing stores before setting m_coordinator to 0. This change makes code more readable. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::~CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::beginContentUpdate): (WebCore::CoordinatedGraphicsLayer::createTile): (WebCore::CoordinatedGraphicsLayer::updateTile): (WebCore::CoordinatedGraphicsLayer::removeTile): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost): 2012-12-16 Anders Carlsson Authentication manager cleanup https://bugs.webkit.org/show_bug.cgi?id=105144 Reviewed by Sam Weinig. Some cleanup to make it possible to reuse the authentication manager from the network process. * UIProcess/Authentication/AuthenticationChallengeProxy.cpp: (WebKit::AuthenticationChallengeProxy::AuthenticationChallengeProxy): (WebKit::AuthenticationChallengeProxy::~AuthenticationChallengeProxy): (WebKit::AuthenticationChallengeProxy::useCredential): (WebKit::AuthenticationChallengeProxy::cancel): * UIProcess/Authentication/AuthenticationChallengeProxy.h: (WebKit::AuthenticationChallengeProxy::create): (AuthenticationChallengeProxy): * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::didReceiveAuthenticationChallenge): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveAuthenticationChallenge): * WebProcess/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::AuthenticationManager): (WebKit::AuthenticationManager::setConnection): (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge): (WebKit::AuthenticationManager::useCredentialForChallenge): * WebProcess/Authentication/AuthenticationManager.h: * WebProcess/Downloads/Download.cpp: (WebKit::Download::didReceiveAuthenticationChallenge): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidReceiveAuthenticationChallenge): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::initialize): * WebProcess/WebProcess.h: (WebKit::WebProcess::authenticationManager): (WebProcess): 2012-12-16 Anders Carlsson Rudimentary support for main resource downloads https://bugs.webkit.org/show_bug.cgi?id=105141 Reviewed by Sam Weinig. For now, instead of converting a main resource load into a download, just cancel it and start a new separate download. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::downloadRequest): Call through to the download manager. (WebKit::NetworkProcess::cancelDownload): Call through to the download manager. * NetworkProcess/NetworkProcess.messages.in: Add new messages. * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::cancel): Send the cancel message to the network process when needed. * UIProcess/WebContext.cpp: (WebKit::WebContext::download): Handle the network process case. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::receivedPolicyDecision): (WebKit::WebPageProxy::decidePolicyForResponse): Keep track of the current request when calling decidePolicyForResponse. 2012-12-16 Andy Estes [WebKit2] CustomProtocolManager should intercept messages of class MessageClassCustomProtocolManager sent to the network process https://bugs.webkit.org/show_bug.cgi?id=105137 Reviewed by Anders Carlsson. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::didReceiveMessage): 2012-12-16 Levi Weintraub Push pixel snapping logic into TransformState https://bugs.webkit.org/show_bug.cgi?id=101779 Reviewed by Simon Fraser. Eliminating use of SnapOffsetForTransforms as it's no longer needed. * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::screenRectOfContents): 2012-12-16 Anders Carlsson Rename WebFrame::convertHandleToDownload to convertMainResourceLoadToDownload https://bugs.webkit.org/show_bug.cgi?id=105134 Reviewed by Sam Weinig. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::convertMainResourceLoadToDownload): * WebProcess/WebPage/WebFrame.h: (WebFrame): 2012-12-15 Anders Carlsson Rename FrameLoaderClient::download to convertMainResourceLoadToDownload https://bugs.webkit.org/show_bug.cgi?id=105122 Reviewed by Andreas Kling. Update for WebCore changes. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: (WebFrameLoaderClient): 2012-12-15 Anders Carlsson Another build fix. * UIProcess/WebContext.cpp: (WebKit::WebContext::createDownloadProxy): 2012-12-15 Andy Estes [WebKit2] Have CustomProtocolManager and CustomProtocolManagerProxy store Connections for messaging https://bugs.webkit.org/show_bug.cgi?id=105124 Reviewed by Anders Carlsson. Remove CustomProtocolManagerProxy's assumption that all messages go to a web process. Have it take a ChildProcessProxy instead and extract its connection. Similarly, remove CustomProtocolManager's assumption that all messages go through a shared WebProcess. Initialize the shared CustomProtocolManager with a Connection object instead. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): Initialize the shared CustomProtocolManager with the NetworkProcess's connection to the UI process. * Shared/Network/CustomProtocols/CustomProtocolManager.h: (WebKit::CustomProtocolManager::connection): Assert m_connection is non-0 and return it. * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: (+[WKCustomProtocol canInitWithRequest:]): Remove an unnecessary namespace. (-[WKCustomProtocol initWithRequest:cachedResponse:client:]): Ditto. (-[WKCustomProtocol startLoading]): Send a message on the CustomProtocolManager's connection rather than assuming there is a shared WebProcess in our address space. (-[WKCustomProtocol stopLoading]): Ditto. (WebKit::CustomProtocolManager::initialize): Initialize the shared CustomProtocolManager with a Connection and register our custom protocol handler with NSURLProtocol. * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h: (WebKit): (CustomProtocolManagerProxy): Take a ChildProcessProxy* rather than a WebProcessProxy*. * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm: (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy): Ditto. (WebKit::CustomProtocolManagerProxy::startLoading): Ditto. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::NetworkProcessProxy): Instantiate a CustomProtocolManagerProxy for the network process. (WebKit::NetworkProcessProxy::didReceiveMessage): Route messages of class MessageClassCustomProtocolManagerProxy to the CustomProtocolManagerProxy. * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveMessage): Assert that we aren't using the network process since we've received a message from a web process's CustomProtocolManager. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Break CustomProtocolManager initialization out into a helper function. (WebKit::WebProcess::initializeCustomProtocolManager): Initialize our CustomProtocolManager. * WebProcess/WebProcess.h: 2012-12-15 Anders Carlsson Happy little Qt build fix. * UIProcess/WebContext.cpp: (WebKit::WebContext::download): 2012-12-15 Alexey Proskuryakov Cannot upload patches to Bugzilla ( doesn't work) https://bugs.webkit.org/show_bug.cgi?id=105120 Reviewed by Sam Weinig. Serialize HTTP body. ResourceRequest serialization cannot (and shouldn't) know about body streams, as used with files. * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::encode): (WebKit::NetworkResourceLoadParameters::decode): * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): 2012-12-15 Anders Carlsson Handle downloads in the network process https://bugs.webkit.org/show_bug.cgi?id=105117 Reviewed by Sam Weinig. Start using the download manager in the network process. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::startDownload): Call through to the download manager. * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Add StartDownload message. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::downloadManager): Add "singleton" download manager. (WebKit::NetworkProcess::didCreateDownload): (WebKit::NetworkProcess::didDestroyDownload): (WebKit::NetworkProcess::downloadProxyConnection): Implement DownloadManager::Client. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didReceiveMessage): (WebKit::NetworkProcessProxy::didReceiveSyncMessage): Call through to the message receiver map. * WebProcess/Downloads/Download.cpp: * WebProcess/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::downloadProxyConnection): * WebProcess/Downloads/DownloadManager.h: Rename connection to downloadProxyConnection. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::startDownload): When using the network process, send a message to it with the request that needs to be downloaded. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::downloadProxyConnection): Return the connection to the UI process. 2012-12-15 Sam Weinig NSURLCache should be disabled in the WebProcess when using the NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=105119 Reviewed by Alexey Proskuryakov. Set the size of the NSURLCache to 0 (both disk and memory) in the WebProcess when using the NetworkProcess. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformSetCacheModel): (WebKit::WebProcess::platformInitializeWebProcess): 2012-12-15 Sam Weinig The network process should use the correct NSURLCache location and set its size correctly for the CacheModel https://bugs.webkit.org/show_bug.cgi?id=105115 Reviewed by Anders Carlsson. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::NetworkProcess): (WebKit::NetworkProcess::initializeNetworkProcess): (WebKit::NetworkProcess::setCacheModel): * NetworkProcess/NetworkProcess.h: (NetworkProcess): * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::platformInitialize): (WebKit::memorySize): (WebKit::volumeFreeSize): (WebKit::NetworkProcess::platformSetCacheModel): Copy code from the WebProcess to set up the NSURLCache correctly (location and size). We should eventually move the calculation of this to the WebContext so it can be done once. * Shared/Network/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode): (WebKit::NetworkProcessCreationParameters::decode): * Shared/Network/NetworkProcessCreationParameters.h: (NetworkProcessCreationParameters): Add the necessary creation parameters to set up the cache. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didFinishLaunching): * UIProcess/Network/NetworkProcessProxy.h: (NetworkProcessProxy): * UIProcess/Network/mac/NetworkProcessProxyMac.mm: * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureNetworkProcess): (WebKit::WebContext::setCacheModel): * UIProcess/WebContext.h: (WebKit): (WebContext): * UIProcess/mac/WebContextMac.mm: (WebKit): (WebKit::WebContext::platformInitializeNetworkProcess): Move initializing the NetworkProcess to just after creating (matching the WebProcess), rather than waiting for it finish loading before sending the creation parameters. Additionally, this moves the setting up of the creation parameters to the WebContext, as that is where all the interesting state resides (and also matches the WebProcess). 2012-12-15 Andy Estes [WebKit2] Register the custom protocol handler in the network process if it exists https://bugs.webkit.org/show_bug.cgi?id=105118 Reviewed by Anders Carlsson. Register our custom protocol handler with NSURLProtocol when starting up the network process; do not register the custom protocol handler in web processes if a network process is being used. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): 2012-12-15 Sam Weinig The network process should use the correct NSURLCache location and set its size correctly for the CacheModel https://bugs.webkit.org/show_bug.cgi?id=105115 Reviewed by Anders Carlsson. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::NetworkProcess): (WebKit::NetworkProcess::initializeNetworkProcess): (WebKit::NetworkProcess::setCacheModel): * NetworkProcess/NetworkProcess.h: (NetworkProcess): * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::platformInitialize): (WebKit::memorySize): (WebKit::volumeFreeSize): (WebKit::NetworkProcess::platformSetCacheModel): Copy code from the WebProcess to set up the NSURLCache correctly (location and size). We should eventually move the calculation of this to the WebContext so it can be done once. * Shared/Network/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode): (WebKit::NetworkProcessCreationParameters::decode): * Shared/Network/NetworkProcessCreationParameters.h: (NetworkProcessCreationParameters): Add the necessary creation parameters to set up the cache. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didFinishLaunching): * UIProcess/Network/NetworkProcessProxy.h: (NetworkProcessProxy): * UIProcess/Network/mac/NetworkProcessProxyMac.mm: * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureNetworkProcess): (WebKit::WebContext::setCacheModel): * UIProcess/WebContext.h: (WebKit): (WebContext): * UIProcess/mac/WebContextMac.mm: (WebKit): (WebKit::WebContext::platformInitializeNetworkProcess): Move initializing the NetworkProcess to just after creating (matching the WebProcess), rather than waiting for it finish loading before sending the creation parameters. Additionally, this moves the setting up of the creation parameters to the WebContext, as that is where all the interesting state resides (and also matches the WebProcess). 2012-12-15 Andy Estes Clean up the previous build fix; access m_networkProcess directly. * UIProcess/WebContext.cpp: (WebKit::WebContext::registerSchemeForCustomProtocol): (WebKit::WebContext::unregisterSchemeForCustomProtocol): 2012-12-15 Andy Estes Fix the build. * UIProcess/WebContext.cpp: (WebKit::WebContext::registerSchemeForCustomProtocol): (WebKit::WebContext::unregisterSchemeForCustomProtocol): 2012-12-15 Andy Estes [WebKit2] Register schemes with the network process if it is being used https://bugs.webkit.org/show_bug.cgi?id=105113 Reviewed by Anders Carlsson. If a WebContext is using the network process, it needs to be told about scheme (un)registration rather than the context's web processes. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): Tell the shared CustomProtocolManager about schemes registered at process creation time. (WebKit::NetworkProcess::registerSchemeForCustomProtocol): Tell the shared CustomProtocolManager about a new scheme. (WebKit::NetworkProcess::unregisterSchemeForCustomProtocol): Remove a scheme from the shared CustomProtocolManager. * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: Add registration and unregistration messages for the NetworkProcess. * Shared/Network/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode): Encode urlSchemesRegisteredForCustomProtocols. (WebKit::NetworkProcessCreationParameters::decode): Decode urlSchemesRegisteredForCustomProtocols. * Shared/Network/NetworkProcessCreationParameters.h: Define urlSchemesRegisteredForCustomProtocols. * UIProcess/Network/mac/NetworkProcessProxyMac.mm: (WebKit::NetworkProcessProxy::platformInitializeNetworkProcess): Populate urlSchemesRegisteredForCustomProtocols with the current set of schemes. * UIProcess/WebContext.cpp: (WebKit::WebContext::registerSchemeForCustomProtocol): Send a new scheme to either the network process or to the context's web processes. (WebKit::WebContext::unregisterSchemeForCustomProtocol): Ditto for removing a scheme. * UIProcess/WebContext.h: * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): Only populate urlSchemesRegisteredForCustomProtocols if the network process isn't being used. (WebKit::WebContext::registerNotificationObservers): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): urlSchemesRegisteredForCustomProtocols should only be non-empty if the network process isn't being used. Assert this. 2012-12-15 Anders Carlsson Remove the unneeded NetworkProcessCrashed message https://bugs.webkit.org/show_bug.cgi?id=105114 Reviewed by Sam Weinig. Remove the NetworkProcessCrashed message; it's not needed since the connection member variable is already nulled out in WebProcess::networkProcessConnectionClosed which is called when the Connection::Client::didClose member function is called on the connection between the web process and network process. Furthermore, this message was handled on the connection queue which runs on a different thread and the handler was not thread-safe so this could in theory cause bad crashes. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didClose): * WebProcess/WebProcess.cpp: * WebProcess/WebProcess.h: (WebProcess): * WebProcess/WebProcess.messages.in: 2012-12-15 Anders Carlsson Add a DownloadProxyMap object to the NetworkProcessProxy object https://bugs.webkit.org/show_bug.cgi?id=105112 Reviewed by Sam Weinig. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::createDownloadProxy): (WebKit::NetworkProcessProxy::didClose): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::createDownloadProxy): * UIProcess/WebProcessProxy.cpp: * UIProcess/WebProcessProxy.h: 2012-12-15 Anders Carlsson Move the download proxy map from the web context to the web process proxy https://bugs.webkit.org/show_bug.cgi?id=105109 Reviewed by Andreas Kling. More progress towards making downloads work with the networking process. Since downloads are handled by the web process when not using a networking process, it makes sense for the download proxy map to live in the web process proxy object. * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): (WebKit::WebContext::shouldTerminate): (WebKit::WebContext::disconnectProcess): (WebKit::WebContext::download): (WebKit::WebContext::createDownloadProxy): * UIProcess/WebContext.h: (WebContext): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::disconnect): (WebKit::WebProcessProxy::shouldTerminate): (WebKit): (WebKit::WebProcessProxy::createDownloadProxy): * UIProcess/WebProcessProxy.h: (WebProcessProxy): 2012-12-15 Anders Carlsson DownloadProxy should keep a strong reference to its associated web context https://bugs.webkit.org/show_bug.cgi?id=105107 Reviewed by Alexey Proskuryakov. While this does create a ref-cycle, it's broken when the download completes, fails, is canceled or if the process that's doing the download crashes. * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::processDidClose): (WebKit::DownloadProxy::didStart): (WebKit::DownloadProxy::didReceiveAuthenticationChallenge): (WebKit::DownloadProxy::didReceiveResponse): (WebKit::DownloadProxy::didReceiveData): (WebKit::DownloadProxy::shouldDecodeSourceDataOfMIMEType): (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename): (WebKit::DownloadProxy::didCreateDestination): (WebKit::DownloadProxy::didFinish): (WebKit::DownloadProxy::didFail): (WebKit::DownloadProxy::didCancel): * UIProcess/Downloads/DownloadProxy.h: (DownloadProxy): 2012-12-15 Anders Carlsson Remove WebContext::downloadFinished https://bugs.webkit.org/show_bug.cgi?id=105105 Reviewed by Sam Weinig. Have DownloadProxyMap manage the message receiver map and remove WebContext::downloadFinished. * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::didFinish): (WebKit::DownloadProxy::didFail): (WebKit::DownloadProxy::didCancel): * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::DownloadProxyMap): (WebKit::DownloadProxyMap::createDownloadProxy): (WebKit::DownloadProxyMap::downloadFinished): * UIProcess/Downloads/DownloadProxyMap.h: (DownloadProxyMap): * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): (WebKit::WebContext::createDownloadProxy): * UIProcess/WebContext.h: 2012-12-15 Sam Weinig Make the NetworkProcess be managed by the WebContext, rather than a singleton NetworkProcessMananger https://bugs.webkit.org/show_bug.cgi?id=105104 Reviewed by Alexey Proskuryakov. Move to having the WebContext own and manage the NetworkProcessProxy. * UIProcess/Network/NetworkProcessManager.cpp: Removed. * UIProcess/Network/NetworkProcessManager.h: Removed. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::create): (WebKit::NetworkProcessProxy::NetworkProcessProxy): (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch): * UIProcess/Network/NetworkProcessProxy.h: (WebKit): (NetworkProcessProxy): * UIProcess/Network/mac/NetworkProcessManagerMac.mm: Removed. * UIProcess/WebContext.cpp: (WebKit::WebContext::ensureNetworkProcess): (WebKit::WebContext::removeNetworkProcessProxy): (WebKit::WebContext::getNetworkProcessConnection): (WebKit::WebContext::willStartUsingPrivateBrowsing): (WebKit::WebContext::willStopUsingPrivateBrowsing): (WebKit::WebContext::createNewWebProcess): * UIProcess/WebContext.h: (WebKit): (WebContext): (WebKit::WebContext::networkProcess): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getNetworkProcessConnection): * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::applicationBecameVisible): (WebKit::WebContext::applicationBecameOccluded): * WebKit2.xcodeproj/project.pbxproj: 2012-12-15 Anders Carlsson DownloadProxy objects should know which DownloadProxyMap they belong to https://bugs.webkit.org/show_bug.cgi?id=105102 Reviewed by Andy Estes. * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::create): (WebKit::DownloadProxy::DownloadProxy): * UIProcess/Downloads/DownloadProxy.h: (WebKit): (DownloadProxy): * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::createDownloadProxy): 2012-12-15 Andy Estes [WebKit2] Move CustomProtocolManager to Shared/ https://bugs.webkit.org/show_bug.cgi?id=105103 Reviewed by Sam Weinig. CustomProtocolManager can be instantiated either in the NetworkProcess or the WebProcess, so it should live in Shared/. * DerivedSources.make: Update the path where CustomProtocolManager.messages.in can be found. * Shared/Network/CustomProtocols/CustomProtocolManager.h: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/CustomProtocolManager.h. * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/CustomProtocolManager.messages.in. * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: Renamed from Source/WebKit2/WebProcess/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm. * WebKit2.xcodeproj/project.pbxproj: 2012-12-15 Sam Weinig Try to fix the Qt build. * Target.pri: 2012-12-15 Anders Carlsson Get rid of DownloadProxyMap::downloads() https://bugs.webkit.org/show_bug.cgi?id=105100 Reviewed by Sam Weinig. Add the needed member functions to DownloadProxyMap and remove the downloads() member function. * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::downloadFinished): (WebKit::DownloadProxyMap::processDidClose): (WebKit): * UIProcess/Downloads/DownloadProxyMap.h: (WebKit::DownloadProxyMap::isEmpty): (DownloadProxyMap): * UIProcess/WebContext.cpp: (WebKit::WebContext::shouldTerminate): (WebKit::WebContext::disconnectProcess): (WebKit::WebContext::downloadFinished): 2012-12-15 Sam Weinig Move calculation of caches sizes based on the cache model to CacheModel.h/cpp https://bugs.webkit.org/show_bug.cgi?id=105098 Reviewed by Anders Carlsson. Move calculation of caches sizes based on the cache model to CacheModel.h/cpp so that it can be used by more than just the WebProcess. * CMakeLists.txt: * GNUmakefile.list.am: * Shared/CacheModel.cpp: Added. (WebKit): (WebKit::calculateCacheSizes): * Shared/CacheModel.h: * Target.pri: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebProcess.cpp: * WebProcess/WebProcess.h: (WebProcess): * win/WebKit2.vcproj: 2012-12-15 Anders Carlsson DownloadProxyMap shouldn't be a singleton after all https://bugs.webkit.org/show_bug.cgi?id=105099 Reviewed by Sam Weinig. Make the DownloadProxyMap be per context instead, and get rid of the m_downloads hash map from WebContext. * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::didFinish): (WebKit::DownloadProxy::didFail): (WebKit::DownloadProxy::didCancel): * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::~DownloadProxyMap): * UIProcess/Downloads/DownloadProxyMap.h: (DownloadProxyMap): (WebKit::DownloadProxyMap::downloads): * UIProcess/WebContext.cpp: (WebKit::WebContext::shouldTerminate): (WebKit::WebContext::disconnectProcess): (WebKit::WebContext::createDownloadProxy): (WebKit::WebContext::downloadFinished): * UIProcess/WebContext.h: (WebContext): 2012-12-15 No'am Rosenthal Disambiguate "background color" and "contents as solid color" on GraphicsLayer https://bugs.webkit.org/show_bug.cgi?id=104842 Reviewed by Simon Fraser. Rename overloads in coordinated graphics to account for the rename in GraphicsLayer. * Shared/CoordinatedGraphics/CoordinatedLayerInfo.h: (CoordinatedLayerInfo): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::setLayerState): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setContentsToSolidColor): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayer): 2012-12-15 Christophe Dumez [GTK][WK2] Memory leak in ChunkedUpdateDrawingArea::paintIntoUpdateChunk() https://bugs.webkit.org/show_bug.cgi?id=105095 Reviewed by Martin Robinson. Adopt the pointer returned by cairo_create() in ChunkedUpdateDrawingArea::paintIntoUpdateChunk() to avoid leaking memory. * WebProcess/WebPage/gtk/ChunkedUpdateDrawingAreaGtk.cpp: (WebKit::ChunkedUpdateDrawingArea::paintIntoUpdateChunk): 2012-12-15 Mark Lam Added #if ENABLE(SQL_DATABASE) around WebPlatformStrategies::getDatabaseServer(). https://bugs.webkit.org/show_bug.cgi?id=104934.. Not reviewed. Greening the Qt Linux Release Minimal bot. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: (WebPlatformStrategies): 2012-12-15 Mark Lam Re-landing patch for "Introducing the DatabaseStrategy and database servers". https://bugs.webkit.org/show_bug.cgi?id=104934. Not reviewed. Merged from r137767. Previously reviewed by Sam Weinig. * CMakeLists.txt: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::createDatabaseStrategy): (WebKit): (WebKit::WebPlatformStrategies::getDatabaseServer): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: (WebPlatformStrategies): 2012-12-14 Anders Carlsson DownloadProxy objects should be message receivers https://bugs.webkit.org/show_bug.cgi?id=105068 Reviewed by Andreas Kling. This simplifies the WebContext message dispatch code somewhat. * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::didReceiveMessage): (WebKit::DownloadProxy::didReceiveSyncMessage): * UIProcess/Downloads/DownloadProxy.h: (DownloadProxy): * UIProcess/WebContext.cpp: (WebKit::WebContext::createDownloadProxy): (WebKit::WebContext::didReceiveMessage): (WebKit::WebContext::didReceiveSyncMessage): 2012-12-14 Sheriff Bot Unreviewed, rolling out r137767. http://trac.webkit.org/changeset/137767 https://bugs.webkit.org/show_bug.cgi?id=105062 Broke Mac builds. (Requested by mlam on #webkit). * CMakeLists.txt: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: * WebProcess/WebCoreSupport/WebPlatformStrategies.h: (WebPlatformStrategies): 2012-12-14 Alexey Proskuryakov NetworkProcess loads may get stuck when WebProcess quits https://bugs.webkit.org/show_bug.cgi?id=105056 Reviewed by Anders Carlsson. Make response maps per-connection. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didClose): Cancel waiting for responses from WebProcess, they will never arrive. * NetworkProcess/NetworkConnectionToWebProcess.h: (WebKit::NetworkConnectionToWebProcess::willSendRequestResponseMap): (WebKit::NetworkConnectionToWebProcess::canAuthenticateAgainstProtectionSpaceResponseMap): Maps now live here. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose): Added a FIXME. (WebKit::NetworkResourceLoader::willSendRequest): (WebKit::NetworkResourceLoader::willSendRequestHandled): (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace): (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceHandled): Handle the cases where we can't send a request, or can't expect a response any more. * Shared/BlockingResponseMap.h: (BlockingResponseMap): (BlockingResponseMap::BlockingResponseMap): (BlockingResponseMap::~BlockingResponseMap): (BlockingResponseMap::waitForResponse): (BlockingResponseMap::didReceiveResponse): (BlockingResponseMap::cancel): (BlockingBoolResponseMap): (BlockingBoolResponseMap::BlockingBoolResponseMap): (BlockingBoolResponseMap::~BlockingBoolResponseMap): (BlockingBoolResponseMap::waitForResponse): (BlockingBoolResponseMap::didReceiveResponse): (BlockingBoolResponseMap::cancel): Added an ability to cancel, and slightly beefed up overall. 2012-12-14 Anders Carlsson DownloadProxyMap should keep track of outstanding DownloadProxy objects https://bugs.webkit.org/show_bug.cgi?id=105053 Reviewed by Andreas Kling. This is more work towards removing the m_downloads map from every WebContext object. * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::didFinish): (WebKit::DownloadProxy::didFail): (WebKit::DownloadProxy::didCancel): * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::createDownloadProxy): (WebKit): (WebKit::DownloadProxyMap::downloadFinished): * UIProcess/Downloads/DownloadProxyMap.h: (DownloadProxyMap): * UIProcess/WebContext.cpp: (WebKit::WebContext::createDownloadProxy): 2012-12-14 Mark Lam Introducing the DatabaseStrategy and database servers. https://bugs.webkit.org/show_bug.cgi?id=104934. Reviewed by Sam Weinig. The database server is currently a placeholder that does nothing. * CMakeLists.txt: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::createDatabaseStrategy): (WebKit): (WebKit::WebPlatformStrategies::getDatabaseServer): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: (WebPlatformStrategies): 2012-12-14 Alexey Proskuryakov Resource loads sometimes stall https://bugs.webkit.org/show_bug.cgi?id=104976 Apply the same quick an dirty fix to BlockingBoolResponseMap. * Shared/BlockingResponseMap.h: (BlockingBoolResponseMap::didReceiveResponse): 2012-12-14 Anders Carlsson Add a DownloadsProxyMap class in preparation for moving the downloads map away from WebContext https://bugs.webkit.org/show_bug.cgi?id=104980 Reviewed by Andreas Kling. Currently the DownloadProxyMap doesn't really do anything; this initial change is to make sure that adding the new files won't break any builds. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * UIProcess/Downloads/DownloadProxyMap.cpp: Added. (WebKit): (WebKit::DownloadProxyMap::shared): (WebKit::DownloadProxyMap::DownloadProxyMap): (WebKit::DownloadProxyMap::~DownloadProxyMap): (WebKit::DownloadProxyMap::createDownloadProxy): * UIProcess/Downloads/DownloadProxyMap.h: Added. (WebKit): (DownloadProxyMap): * UIProcess/WebContext.cpp: (WebKit::WebContext::createDownloadProxy): * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: 2012-12-14 Anders Carlsson Fix assertion failure when the network process is enabled https://bugs.webkit.org/show_bug.cgi?id=105040 Reviewed by Alexey Proskuryakov. Make sure that we don't call into the download manager when running with a network process. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldTerminate): 2012-12-14 Michelangelo De Simone [CSS Shaders] Remove code for the other mesh box types (border-box | padding-box | content-box) https://bugs.webkit.org/show_bug.cgi?id=103776 Reviewed by Dean Jackson. The MeshBoxType has been removed and the code has been refactored. The specs will be updated shortly and therefore this feature - even though it was not fully implemented yet - shall not be used anymore. In this patch we remove everything but the parsing code, which shall be addressed in a different patch (see: https://bugs.webkit.org/show_bug.cgi?id=103778). Specification to be updated: http://dvcs.w3.org/hg/FXTF/raw-file/tip/filters/index.html#ltboxgt Existing tests have been updated and new parsing legacy cases have been added. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * Shared/CoordinatedGraphics/WebCustomFilterOperation.h: (WebCore::WebCustomFilterOperation::create): (WebCore::WebCustomFilterOperation::WebCustomFilterOperation): 2012-12-14 Alexey Proskuryakov RGRESSION: Crash when emptying cookie jar https://bugs.webkit.org/show_bug.cgi?id=105038 Reviewed by Jessie Berlin. Handle null context, which is used for cookie management functions. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::cookiesForDOM): (WebKit::WebPlatformStrategies::setCookiesFromDOM): (WebKit::WebPlatformStrategies::cookiesEnabled): (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue): (WebKit::WebPlatformStrategies::getRawCookies): (WebKit::WebPlatformStrategies::deleteCookie): (WebKit::WebPlatformStrategies::getHostnamesWithCookies): (WebKit::WebPlatformStrategies::deleteCookiesForHostname): (WebKit::WebPlatformStrategies::deleteAllCookies): 2012-12-14 Alberto Garcia [GTK] When in private mode WebKitGTK+ should not save HTTP authentication credentials to the persistent storage https://bugs.webkit.org/show_bug.cgi?id=104910 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp: (WebKit::WebKit2GtkAuthenticationDialog::WebKit2GtkAuthenticationDialog): * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.h: (WebKit2GtkAuthenticationDialog): GtkAuthenticationDialog has a new credential storage mode parameter, so add it here too. * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewHandleAuthenticationChallenge): When creating the GtkAuthenticationDialog, set the credential storage mode using the private browsing setting from the current page. 2012-12-14 Mikhail Pozdnyakov [EFL][WK2] Fix EFL build after r137718 https://bugs.webkit.org/show_bug.cgi?id=105018 Unreviewed build fix. The problem was that UNUSED_PARAM(size) was left in the code for non-existent variable 'size'. * UIProcess/efl/PageClientDefaultImpl.cpp: (WebKit::PageClientDefaultImpl::updateViewportSize): * UIProcess/efl/PageClientLegacyImpl.cpp: (WebKit::PageClientLegacyImpl::updateViewportSize): 2012-12-13 Kenneth Rohde Christiansen [EFL][WK2] Do not pass size to updateViewportSize https://bugs.webkit.org/show_bug.cgi?id=104994 Reviewed by Gyuyoung Kim. There is no need to pass size to updateViewportSize as we have direct access to it. This makes the code differ less from Qt. * UIProcess/API/efl/ewk_view.cpp: (_ewk_view_smart_calculate): * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::pageDidRequestScroll): * UIProcess/efl/PageClientBase.h: (PageClientBase): * UIProcess/efl/PageClientDefaultImpl.cpp: (WebKit::PageClientDefaultImpl::updateViewportSize): * UIProcess/efl/PageClientDefaultImpl.h: (PageClientDefaultImpl): * UIProcess/efl/PageClientLegacyImpl.cpp: (WebKit::PageClientLegacyImpl::updateViewportSize): * UIProcess/efl/PageClientLegacyImpl.h: (PageClientLegacyImpl): * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::updateViewportSize): * UIProcess/efl/PageViewportControllerClientEfl.h: (PageViewportControllerClientEfl): 2012-12-13 Sanghyup Lee Fix build warning https://bugs.webkit.org/show_bug.cgi?id=104978 Reviewed by Kentaro Hara. Initialize parameter 'downloadID' to fix 'unused parameter' build warning. * WebProcess/Downloads/Download.cpp: (WebKit::Download::Download): 2012-12-13 Alexey Proskuryakov Resource loads sometimes stall https://bugs.webkit.org/show_bug.cgi?id=104976 Reviewed by Anders Carlsson. Quick and dirty partial fix. * Shared/BlockingResponseMap.h: (BlockingResponseMap::didReceiveResponse): Wake up all threads, so that non-sequential responses don't break us. This is still horribly inefficient,but should improve behavior quite a bit. 2012-12-13 Seokju Kwon Fix unused parameter compile warnings https://bugs.webkit.org/show_bug.cgi?id=104907 Reviewed by Kentaro Hara. Use UNUSED_PARAM macro to fix build warning -Wunused-parameter when ENABLE_INSPECTOR is disabled. * UIProcess/API/C/WKInspector.cpp: (WKInspectorGetPage): (WKInspectorIsVisible): (WKInspectorIsFront): (WKInspectorShow): (WKInspectorClose): (WKInspectorShowConsole): (WKInspectorShowResources): (WKInspectorShowMainResourceForFrame): (WKInspectorIsAttached): (WKInspectorAttach): (WKInspectorDetach): (WKInspectorIsDebuggingJavaScript): (WKInspectorToggleJavaScriptDebugging): (WKInspectorIsProfilingJavaScript): (WKInspectorToggleJavaScriptProfiling): (WKInspectorIsProfilingPage): (WKInspectorTogglePageProfiling): * UIProcess/API/C/WKPage.cpp: (WKPageGetInspector): 2012-12-13 Seokju Kwon [QT][GTK][EFL] Add guard for WebInspectorServer https://bugs.webkit.org/show_bug.cgi?id=104889 Reviewed by Kenneth Rohde Christiansen. Add ENABLE(INSPECTOR_SERVER) guard around platform-specific implementation for WebInspectorServer. * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp: * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp: * UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp: 2012-12-13 Huang Dongsung Coordinated Graphics: Reorder messages to CoordinatedLayerTreeHostProxy https://bugs.webkit.org/show_bug.cgi?id=103843 Reviewed by Noam Rosenthal. Clarify LayerTreeRenderer::setRootLayerID() can be called only once during its lifecycle. LayerTreeRenderer, CoordinatedLayerTreeHost and CoordinatedLayerTreeHostProxy have the same lifecycle to WebPage and the root layer is reused even if loading new page, so it is impossible to call LayerTreeRenderer::setRootLayerID() more than twice. * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::setRootLayerID): 2012-12-13 Alexey Proskuryakov DOM cookie access functions should respect private browsing https://bugs.webkit.org/show_bug.cgi?id=104691 Reviewed by Anders Carlsson. Remove obsolete FIXMEs, and fix one function that I overlooked. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::cookiesForDOM): (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): (WebKit::NetworkConnectionToWebProcess::cookiesEnabled): (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue): (WebKit::NetworkConnectionToWebProcess::getRawCookies): (WebKit::NetworkConnectionToWebProcess::deleteCookie): (WebKit::NetworkConnectionToWebProcess::getHostnamesWithCookies): (WebKit::NetworkConnectionToWebProcess::deleteCookiesForHostname): (WebKit::NetworkConnectionToWebProcess::deleteAllCookies): 2012-12-13 Anders Carlsson DownloadManager shouldn't call the web process directly https://bugs.webkit.org/show_bug.cgi?id=104946 Reviewed by Antti Koivisto. Introduce the needed DownloadManager::Client member functions and have Download call them instead of calling the web process directly. * WebProcess/Downloads/Download.cpp: (WebKit::Download::Download): (WebKit::Download::~Download): (WebKit::Download::connection): * WebProcess/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::DownloadManager): (WebKit::DownloadManager::didCreateDownload): (WebKit::DownloadManager::didDestroyDownload): (WebKit::DownloadManager::connection): * WebProcess/Downloads/DownloadManager.h: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didCreateDownload): (WebKit::WebProcess::didDestroyDownload): * WebProcess/WebProcess.h: 2012-12-13 Alexey Proskuryakov Per-Tab WebProcess: DOM cookie access functions should respect private browsing https://bugs.webkit.org/show_bug.cgi?id=104691 Reviewed by Sam Weinig. Pass private browsing state from local context to remote one. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::networkingContext): (WebKit::NetworkConnectionToWebProcess::cookiesForDOM): (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): (WebKit::NetworkConnectionToWebProcess::cookiesEnabled): (WebKit::NetworkConnectionToWebProcess::cookieRequestHeaderFieldValue): (WebKit::NetworkConnectionToWebProcess::getRawCookies): (WebKit::NetworkConnectionToWebProcess::deleteCookie): (WebKit::NetworkConnectionToWebProcess::getHostnamesWithCookies): (WebKit::NetworkConnectionToWebProcess::deleteCookiesForHostname): (WebKit::NetworkConnectionToWebProcess::deleteAllCookies): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/mac/RemoteNetworkingContext.h: * NetworkProcess/mac/RemoteNetworkingContext.mm: (WebKit::RemoteNetworkingContext::inPrivateBrowsingMode): (WebKit::RemoteNetworkingContext::storageSession): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::cookiesForDOM): (WebKit::WebPlatformStrategies::setCookiesFromDOM): (WebKit::WebPlatformStrategies::cookiesEnabled): (WebKit::WebPlatformStrategies::cookieRequestHeaderFieldValue): (WebKit::WebPlatformStrategies::getRawCookies): (WebKit::WebPlatformStrategies::deleteCookie): (WebKit::WebPlatformStrategies::getHostnamesWithCookies): (WebKit::WebPlatformStrategies::deleteCookiesForHostname): (WebKit::WebPlatformStrategies::deleteAllCookies): * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: (WebKit::WebFrameNetworkingContext::inPrivateBrowsingMode): (WebKit::WebFrameNetworkingContext::storageSession): * WebProcess/WebCoreSupport/win/WebFrameNetworkingContext.h: (WebFrameNetworkingContext::inPrivateBrowsingMode): 2012-12-13 Anders Carlsson Get rid of DownloadManager::shared https://bugs.webkit.org/show_bug.cgi?id=104939 Reviewed by Andreas Kling. Move the DownloadManager singleton to WebProcess and stub out a DownloadManager::Client class. * WebProcess/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::DownloadManager): * WebProcess/Downloads/DownloadManager.h: (Client): (WebKit::DownloadManager::Client::~Client): (DownloadManager): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::startDownload): (WebKit::WebFrame::convertHandleToDownload): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::downloadManager): (WebKit): (WebKit::WebProcess::shouldTerminate): (WebKit::WebProcess::downloadRequest): (WebKit::WebProcess::cancelDownload): (WebKit::WebProcess::startTransfer): * WebProcess/WebProcess.h: (WebProcess): 2012-12-12 Andy Estes [WebKit2] Only register NSNotificationCenter observers once per WebContext https://bugs.webkit.org/show_bug.cgi?id=104879 Reviewed by Alexey Proskuryakov. WebContext was mistakenly registering NSNotificationCenter observers every time a new web process was created. In a multi-WebProcess world, this caused duplicate observers to be needlessly registered. Fix this by registering observers at WebContext creation time (and fix a related bug where two of the observers were never unregistered). * UIProcess/WebContext.h: * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitialize): Register observers when initializing the context. (WebKit::WebContext::platformInitializeWebProcess): Don't register observers here. (WebKit::WebContext::platformInvalidateContext): Unregister observers when invalidating the context. (WebKit::WebContext::registerNotificationObservers): (WebKit::WebContext::unregisterNotificationObservers): 2012-12-13 Anders Carlsson Download objects should keep track of their associated DownloadManager object https://bugs.webkit.org/show_bug.cgi?id=104936 Reviewed by Andreas Kling. This is the first step towards eliminating DownloadManager::shared. * WebProcess/Downloads/Download.cpp: (WebKit::Download::create): (WebKit::Download::Download): (WebKit::Download::didFinish): (WebKit::Download::didFail): (WebKit::Download::didCancel): * WebProcess/Downloads/Download.h: * WebProcess/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::startDownload): (WebKit::DownloadManager::convertHandleToDownload): 2012-12-13 Anders Carlsson Remove unused initiatingPage parameter from download objects https://bugs.webkit.org/show_bug.cgi?id=104933 Reviewed by Alexey Proskuryakov. * WebProcess/Downloads/Download.h: (Download): * WebProcess/Downloads/DownloadManager.cpp: (WebKit::DownloadManager::startDownload): (WebKit::DownloadManager::convertHandleToDownload): * WebProcess/Downloads/DownloadManager.h: (DownloadManager): * WebProcess/Downloads/cfnet/DownloadCFNet.cpp: (WebKit::Download::start): (WebKit::Download::startWithHandle): * WebProcess/Downloads/curl/DownloadCurl.cpp: (WebKit::Download::start): (WebKit::Download::startWithHandle): * WebProcess/Downloads/mac/DownloadMac.mm: (WebKit::Download::start): (WebKit::Download::startWithHandle): * WebProcess/Downloads/qt/DownloadQt.cpp: (WebKit::Download::start): (WebKit::Download::startWithHandle): * WebProcess/Downloads/soup/DownloadSoup.cpp: (WebKit::Download::start): (WebKit::Download::startWithHandle): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::startDownload): (WebKit::WebFrame::convertHandleToDownload): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::downloadRequest): 2012-12-13 Alexey Proskuryakov Frequent NetworkProcess crashes due to null connection when closing tabs https://bugs.webkit.org/show_bug.cgi?id=104922 Reviewed by Anders Carlsson. Don't zero out connection pointers when a connection closes. There doesn't appear to be any reason to do this. Tested by hitting breakpoints in all relevant objects destructors to confirm that this doesn't introduce leaks. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess): (WebKit::NetworkConnectionToWebProcess::didClose): * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose): 2012-12-13 Thiago Marcos P. Santos [EFL] Update the way we set the cookies policy https://bugs.webkit.org/show_bug.cgi?id=104915 Reviewed by Kenneth Rohde Christiansen. We are mistakenly assigning the cookie policy to the persistent storage type which is not correct. This was caused by r137432 and is making the unit tests fail. * UIProcess/efl/WebContextEfl.cpp: (WebKit::WebContext::platformInitializeWebProcess): 2012-12-13 Andras Becsi [Qt][WK2] Fix painting on Mac with retina display https://bugs.webkit.org/show_bug.cgi?id=104574 Unreviewed, removing leftover API test. This hunk somehow did not make it into the final patch. * UIProcess/API/qt/tests/qmltests/WebView/tst_devicePixelRatio.qml: Removed. 2012-12-13 Andras Becsi [Qt][WK2] Fix painting on Mac with retina display https://bugs.webkit.org/show_bug.cgi?id=104574 Reviewed by Kenneth Rohde Christiansen. Since HiDPI support has been added and enabled in Qt we ended up painting incorrectly scaled content on high-resolution screens. Because the intrinsic device pixel ratio is always taken into account by Qt when painting to high-resolution screens we should automatically obtain the scale ratio from the window in which the item is rendered instead of setting it in QML. Qt does not make it possible to override the device pixel ratio of the native window, therefore our experimental QML API for setting a custom value is of no use any more and should be removed. This patch fixes the scaling issue on Mac retina display by querying the underlying window for the device scale factor and applying it to the backing store and the scene-graph rendering of the content node. Additionally removes the experimental API and related API tests. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPage::updatePaintNode): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewLegacyPrivate::updateViewportSize): (QQuickWebViewFlickablePrivate::onComponentComplete): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/tests/qquickwebview/tst_qquickwebview.cpp: (tst_QQuickWebView::newWebView): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect): (WebKit::CoordinatedLayerTreeHostProxy::deviceScaleFactor): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (CoordinatedLayerTreeHostProxy): * UIProcess/qt/QtWebPageSGNode.cpp: (WebKit::ContentsSGNode::ContentsSGNode): (WebKit::ContentsSGNode::render): (WebKit::ContentsSGNode::clipRect): (ContentsSGNode): (WebKit::QtWebPageSGNode::QtWebPageSGNode): (WebKit::QtWebPageSGNode::devicePixelRatio): (WebKit): (WebKit::QtWebPageSGNode::setRenderer): * UIProcess/qt/QtWebPageSGNode.h: (QtWebPageSGNode): 2012-12-13 Thiago Marcos P. Santos [EFL] API tests failing because Vibration API is using unsigned as duration since r137410 https://bugs.webkit.org/show_bug.cgi?id=104914 Reviewed by Kenneth Rohde Christiansen. Update the tests to reflect the data type coming from WebCore. * UIProcess/API/efl/tests/test_ewk2_view.cpp: (VibrationCbData): (onVibrate): 2012-12-13 Kenneth Rohde Christiansen [EFL][WK2] Device pixel ratio lost upon relaunch of the web process https://bugs.webkit.org/show_bug.cgi?id=104913 Reviewed by Simon Hausmann. Use setIntrinsicDeviceScaleFactor instead of setCustomDeviceScaleFactor when setting the device pixel ratio to make the setting permanent and make sure it is set as part of the web process creation parameters. * UIProcess/API/efl/ewk_view.cpp: (ewk_view_device_pixel_ratio_set): 2012-12-13 Jerome Pasion [Qt] Doc: Fixing Qt WebKit reference documentation. Reviewed by Simon Hausmann. Fixes: -added \module for C++ classes and \qmlmodule for QML types -added links to the Qt WebKit Examples pages -fixed the qhp settings for Qt Creator Task-number: QTBUG-28583 Task-number: QTBUG-28418 Task-number: QTBUG-27646 * UIProcess/API/qt/qquickwebview.cpp: 2012-12-13 Jussi Kukkonen [EFL][GTK] Don't call deprecated g_type_init when glib => 2.35 https://bugs.webkit.org/show_bug.cgi?id=103209 Reviewed by Kenneth Rohde Christiansen. g_type_init() is deprecated from 2.35.0 onwards. Don't call it in that case to avoid warnings and/or build failure. Also, remove a call to g_type_init() from WebProcessMainGtk(): It is not needed if gtk_init() is called. * UIProcess/API/efl/ewk_main.cpp: (ewk_init): * WebProcess/efl/WebProcessMainEfl.cpp: (WebKit::WebProcessMainEfl): * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): 2012-12-13 Joaquim Rocha REGRESSION (r137432): The /webkit2/WebKitCookieManager/accept-policy unit test is failing https://bugs.webkit.org/show_bug.cgi?id=104790 Reviewed by Carlos Garcia Campos. The cookies accept policy and the cookies persistent storage type were not being correctly assigned. * UIProcess/WebContext.cpp: Set the default value of the cookie accept policy. (WebKit::WebContext::WebContext): * UIProcess/gtk/WebContextGtk.cpp: Fix setting the cookies persistent storage type (it was mistakenly assigning the policy instead) and set the accept policy which was missing. (WebKit::WebContext::platformInitializeWebProcess): 2012-12-13 Jon Lee plugin snapshotting accepts bad snapshot after 5 seconds https://bugs.webkit.org/show_bug.cgi?id=104886 Reviewed by Maciej Stachowiak. * WebProcess/Plugins/PluginView.cpp: Increase to 60 tries, equating to a little over 60 seconds total. 2012-12-12 Gyuyoung Kim NetworkInfoController needs to support destructor https://bugs.webkit.org/show_bug.cgi?id=104642 Reviewed by Kentaro Hara. Though NetworkInfoController can be referenced by each port in order to update network status change, there is no virtual interface to destroy it. Beside each port client also needs to be destroyed when controller is destroyed. * UIProcess/efl/NetworkInfoProvider.cpp: (NetworkInfoProvider::networkInfoControllerDestroyed): * UIProcess/efl/NetworkInfoProvider.h: (NetworkInfoProvider): * WebProcess/WebCoreSupport/WebNetworkInfoClient.cpp: (WebKit::WebNetworkInfoClient::networkInfoControllerDestroyed): (WebKit): * WebProcess/WebCoreSupport/WebNetworkInfoClient.h: (WebNetworkInfoClient): 2012-12-12 Andy Estes Rename currentMousePosition() to lastKnownMousePosition() and mark it as OVERRIDE. * WebProcess/Plugins/PDF/PDFPlugin.h: 2012-12-12 Seokju Kwon [EFL] Refactor duplicate code into EflInspectorUtilities https://bugs.webkit.org/show_bug.cgi?id=104329 Reviewed by Kenneth Rohde Christiansen. Remove duplicated work to get the resource path for inspector. And use WebCore::inspectorResourcePath(). * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp: (WebKit::WebInspectorServer::platformResourceForPath): * UIProcess/efl/WebInspectorProxyEfl.cpp: (WebKit::WebInspectorProxy::inspectorBaseURL): 2012-12-12 Mark Lam Encapsulate externally used webdatabase APIs in DatabaseManager. https://bugs.webkit.org/show_bug.cgi?id=104741. Reviewed by Sam Weinig. Use DatabaseManager instead of accessing DatabaseTracker, AbstractDatabase, and DatabaseContext directly. This is to prepare for upcoming webkit2 refactoring. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::exceededDatabaseQuota): * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: (WebKit::WebDatabaseManager::initialize): (WebKit::WebDatabaseManager::WebDatabaseManager): (WebKit::WebDatabaseManager::getDatabasesByOrigin): (WebKit::WebDatabaseManager::getDatabaseOrigins): (WebKit::WebDatabaseManager::deleteDatabaseWithNameForOrigin): (WebKit::WebDatabaseManager::deleteDatabasesForOrigin): (WebKit::WebDatabaseManager::deleteAllDatabases): (WebKit::WebDatabaseManager::setQuotaForOrigin): * WebProcess/WebCoreSupport/WebDatabaseManager.h: (WebDatabaseManager): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2012-12-12 Alexey Proskuryakov Crashes in NetworkResourceLoadScheduler::receivedRedirect https://bugs.webkit.org/show_bug.cgi?id=104844 Reviewed by Sam Weinig. * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::receivedRedirect): The load may be already canceled. * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::didReceiveResponse): Expanded logging a little. 2012-12-12 Andras Becsi [Qt][WK2] Fix the build on Mac Unreviewed build fix. Add missing virtual destructor with empty definition to fix missing vtable error in test util's LoadStartedCatcher. * UIProcess/API/qt/tests/util.h: (LoadStartedCatcher::~LoadStartedCatcher): 2012-12-12 Alexey Proskuryakov Make LOG() work in WebProcess and NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=104718 Reviewed by Tim Horton. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): Initialize WebCore and WebKit2 logging. * Platform/Logging.cpp: (WebKit::initializeLogChannelsIfNecessary): Added Network and NetworkScheduling. Re-ordered to match declaration order, alphabetical clearly doesn't help here. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): Initialize WebKit2 logging in addition to WebCore. * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): Initialize WebKit2 logging in addition to WebCore. 2012-12-12 Simon Pena [GTK] Add sections documentation to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=104484 Reviewed by Martin Robinson. Many of the sections in the WebKit2 GTK+ API documentation were missing. This commit adds new documentation, in some cases adapting it from WebKitGtk+ and in others writing it from the scratch. It also removes the WebKitWebViewBase class from the documentation index, since it is not really relevant. * UIProcess/API/gtk/WebKitBackForwardListItem.cpp: * UIProcess/API/gtk/WebKitContextMenu.cpp: * UIProcess/API/gtk/WebKitContextMenuItem.cpp: * UIProcess/API/gtk/WebKitCookieManager.cpp: * UIProcess/API/gtk/WebKitDownload.cpp: * UIProcess/API/gtk/WebKitError.cpp: * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: * UIProcess/API/gtk/WebKitFindController.cpp: * UIProcess/API/gtk/WebKitFormSubmissionRequest.cpp: * UIProcess/API/gtk/WebKitPlugin.cpp: * UIProcess/API/gtk/WebKitPrintOperation.cpp: * UIProcess/API/gtk/WebKitSecurityManager.cpp: * UIProcess/API/gtk/WebKitURIRequest.cpp: * UIProcess/API/gtk/WebKitURIResponse.cpp: * UIProcess/API/gtk/WebKitURISchemeRequest.cpp: * UIProcess/API/gtk/WebKitVersion.cpp: * UIProcess/API/gtk/WebKitWebContext.cpp: * UIProcess/API/gtk/WebKitWebInspector.cpp: * UIProcess/API/gtk/WebKitWebResource.cpp: (webkit_web_resource_class_init): * UIProcess/API/gtk/WebKitWebView.cpp: * UIProcess/API/gtk/docs/webkit2gtk-docs.sgml: 2012-12-12 Kondapally Kalyan [EFL [WebGL] [Wk2] Resizing the canvas breaks WebGL. https://bugs.webkit.org/show_bug.cgi?id=104535. Reviewed by Kenneth Rohde Christiansen. GraphicsContext3DEfl does not re-create the surface on canvas resize, this conflicted with the logic in coordinated graphics Layer. CoordinatedGraphicsLayer checks for GraphicsSurfaceToken to decide if the surface in UI-Process should be recreated or not. With this patch we also check for size of the platform Layer. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setContentsToCanvas): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayer): 2012-12-12 Sheriff Bot Unreviewed, rolling out r137438. http://trac.webkit.org/changeset/137438 https://bugs.webkit.org/show_bug.cgi?id=104798 assertion reached when removing tile (Requested by tmpsantos on #webkit). * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): (WebCore::CoordinatedGraphicsLayer::setVisibleContentRectTrajectoryVector): (WebCore::CoordinatedGraphicsLayer::setContentsScale): (WebCore::CoordinatedGraphicsLayer::adjustContentsScale): (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreUpdatesAllowed): (WebCore::CoordinatedGraphicsLayer::beginContentUpdate): (WebCore::CoordinatedGraphicsLayer::createTile): (WebCore::CoordinatedGraphicsLayer::updateTile): (WebCore::CoordinatedGraphicsLayer::removeTile): (WebCore::CoordinatedGraphicsLayer::updateContentBuffers): (WebCore::CoordinatedGraphicsLayer::purgeBackingStores): (WebCore::CoordinatedGraphicsLayer::adjustVisibleRect): (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayerClient): (CoordinatedGraphicsLayer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::notifyFlushRequired): (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer): (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect): (WebKit::CoordinatedLayerTreeHost::layerTreeTileUpdatesAllowed): (WebKit): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (CoordinatedLayerTreeHost): 2012-12-12 Mario Sanchez Prada [GTK][WK2] New API to detect display/execution of insecure content https://bugs.webkit.org/show_bug.cgi?id=104578 Reviewed by Martin Robinson. Added new API and documentation for detecting insecure content. Implemented needed functions from C API's WKPageLoaderClient * UIProcess/API/gtk/WebKitLoaderClient.cpp: (didDisplayInsecureContentForFrame): Implemented. (didRunInsecureContentForFrame): Ditto. (attachLoaderClientToView): Added newly implemented functions. Added new 'insecure-content-detected' signal to API. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_class_init): Installed new signal. (webkitWebViewInsecureContentDetected): Helper function aded to private API to emit the new signal from the page loader client. * UIProcess/API/gtk/WebKitWebView.h: (_WebKitWebViewClass): Added new signal. * UIProcess/API/gtk/WebKitWebViewPrivate.h: Added prototype of the new helper function webkitWebViewInsecureContentDetected(). Added new unit tests. * UIProcess/API/gtk/tests/TestSSL.cpp: (testSSL): Updated to the new variable name for the https server. (testInsecureContent): New unit test. (httpsServerCallback): Renamed from serverCallback() and updated to return HTML content linking to external resources in an insecure (plain http) server, to be used by the new test. (httpServerCallback): New callback for a new http server, that will serve a script and an image when requested. (beforeAll): Run the new http server, besides the https one. (afterAll): Delete both the http and the https server. Updated documentation with new API. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Added references to the new WebKitInsecureContentEvent enum type. 2012-12-12 Huang Dongsung Coordinated Graphics: Refactor TiledBackingStore code in CoordinatedGraphicsLayer. https://bugs.webkit.org/show_bug.cgi?id=103959 Reviewed by Kenneth Rohde Christiansen. Currently, CoordinatedGraphicsLayer has complex code related to TiledBackingStore. It has two problem. 1. CoordinatedGraphicsLayer hacks TiledBackingStore to prevent TiledBackingStore from asynchronously sending UpdateTile message to UI Process. 2. CreateTile and RemoveTile message can be sent to UI Process at any time. This patch makes CoordinatedGraphicsLayer use TiledBackingStore more explicitly. It means only during flushing layer states, CoordinatedGraphicsLayer calls methods of TiledBackingStore, which indirectly call createTile(), updateTile() and removeTile(). * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): (WebCore::CoordinatedGraphicsLayer::setVisibleContentRectTrajectoryVector): (WebCore::CoordinatedGraphicsLayer::setContentsScale): (WebCore::CoordinatedGraphicsLayer::adjustContentsScale): (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreHasPendingTileCreation): (WebCore::CoordinatedGraphicsLayer::beginContentUpdate): (WebCore::CoordinatedGraphicsLayer::createTile): (WebCore::CoordinatedGraphicsLayer::updateTile): (WebCore::CoordinatedGraphicsLayer::removeTile): (WebCore::CoordinatedGraphicsLayer::updateContentBuffers): (WebCore::CoordinatedGraphicsLayer::purgeBackingStores): (WebCore::CoordinatedGraphicsLayer::setNeedsVisibleRectAdjustment): (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayerClient): (CoordinatedGraphicsLayer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::notifyFlushRequired): (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer): (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (CoordinatedLayerTreeHost): 2012-12-12 Joaquim Rocha [GTK] Cookies' storage path and policy are not set when the WebProcess is killed and relaunched https://bugs.webkit.org/show_bug.cgi?id=104370 Reviewed by Carlos Garcia Campos. This issue happens on ports that use Soup and causes problems like not finding the stored cookies nor their policy when the WebProcess is relaunched. As an example of a problem caused by this, a previously logged in user will not be logged in again when the process is relaunched and the policy used is always the same one. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): Encode cookies' persistent storage path, storage type and acceptance policy. (WebKit::WebProcessCreationParameters::decode): Decode cookies' persistent storage path, storage type and acceptance policy. * Shared/WebProcessCreationParameters.h: Create 3 variables to hold the values mentioned above. (WebProcessCreationParameters): * UIProcess/WebCookieManagerProxy.cpp: (WebKit::WebCookieManagerProxy::WebCookieManagerProxy): (WebKit::WebCookieManagerProxy::setHTTPCookieAcceptPolicy): Call WebCookieManagerProxySoup::setCookieAcceptPolicy. * UIProcess/WebCookieManagerProxy.h: Declare new Soup's methods setCookieAcceptPolicy, cookieAcceptPolicy and cookiePersistentStorage as well as the variables m_cookieAcceptPolicy and m_cookiePersistentStorage. (WebCookieManagerProxy): * UIProcess/efl/WebContextEfl.cpp: Assign the parameters' cookiePersistentStoragePath and cookiePersistentStorageType with the respective values. (WebKit::WebContext::platformInitializeWebProcess): * UIProcess/gtk/WebContextGtk.cpp: Assign the parameters' cookiePersistentStoragePath and cookiePersistentStorageType with the respective values. (WebKit::WebContext::platformInitializeWebProcess): * UIProcess/soup/WebCookieManagerProxySoup.cpp: (WebKit::WebCookieManagerProxy::setCookiePersistentStorage): Assign the m_cookiePersistentStorage pair with the method's parameters. (WebKit): (WebKit::WebCookieManagerProxy::getCookiePersistentStorage): Implement this getter. * WebProcess/Cookies/WebCookieManager.h: Declare setCookiePersistentStorage. (WebCookieManager): * WebProcess/soup/WebProcessSoup.cpp: (WebKit::WebProcess::platformInitializeWebProcess): Set the cookies' persistent storage and policy using the WebCookieManager's methods. 2012-12-11 Jinwoo Song [EFL][WK2] Duplicated WebPageGroup initialization https://bugs.webkit.org/show_bug.cgi?id=103229 Reviewed by Kenneth Rohde Christiansen. WebPageGroup does not need to be created in creating EwkView when the pageGroupRef is 0 because the default WebPageGroup(m_defaultPageGroup) is created in WebContext constructor. As a side effect on the duplicated initialization, pageGroupID increases even when the EwkView is created with default context. * UIProcess/API/efl/ewk_view.cpp: (createEwkView): 2012-12-11 Sam Weinig Add API to set the maximum number of processes allowed in a WKContext https://bugs.webkit.org/show_bug.cgi?id=104769 Reviewed by Dan Bernstein. Switch from using NSUserDefaults to a WKContext API to set the maximum number of processes for a context. * UIProcess/API/C/WKContext.cpp: (WKContextSetMaximumNumberOfProcesses): (WKContextGetMaximumNumberOfProcesses): * UIProcess/API/C/WKContext.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::setMaximumNumberOfProcesses): (WebKit): * UIProcess/WebContext.h: (WebContext): (WebKit::WebContext::maximumNumberOfProcesses): * UIProcess/mac/WebContextMac.mm: (WebKit::registerUserDefaultsIfNeeded): (WebKit::WebContext::platformInitialize): 2012-12-11 Kihong Kwon Vibration API: IDL type doesn't match implementation type https://bugs.webkit.org/show_bug.cgi?id=103899 Reviewed by Kentaro Hara. According to WebIDL, "unsigned long" corresponds to "unsigned" in the platform. Therefore unsigned long need to be changed to unsigned for the Vibration API. - Change a parameter type of vibrate function from uint64_t to uint_32_t. * UIProcess/API/C/WKVibration.h: * UIProcess/API/efl/EwkViewCallbacks.h: * UIProcess/WebVibrationProvider.cpp: (WebKit::WebVibrationProvider::vibrate): * UIProcess/WebVibrationProvider.h: (WebVibrationProvider): * UIProcess/WebVibrationProxy.cpp: (WebKit::WebVibrationProxy::vibrate): * UIProcess/WebVibrationProxy.h: (WebVibrationProxy): * UIProcess/WebVibrationProxy.messages.in: * UIProcess/efl/VibrationClientEfl.cpp: (VibrationClientEfl::vibrateCallback): * UIProcess/efl/VibrationClientEfl.h: (VibrationClientEfl): * WebProcess/WebCoreSupport/WebVibrationClient.cpp: (WebKit::WebVibrationClient::vibrate): * WebProcess/WebCoreSupport/WebVibrationClient.h: (WebVibrationClient): 2012-12-11 Alexey Proskuryakov [WK2 NetworkProcess] Cannot load HTTPS sites https://bugs.webkit.org/show_bug.cgi?id=104732 Reviewed by Anders Carlsson. * Shared/BlockingResponseMap.h: (BlockingBoolResponseMap::waitForResponse): Fixed to make sense. 2012-12-11 Xianzhu Wang Add window.internals.mainThreadScrollReasonsAsText for testing slow scrolling https://bugs.webkit.org/show_bug.cgi?id=104714 Reviewed by Eric Seidel. Export symbol Page::mainThreadScrollingReasonsAsText(). * win/WebKit2.def.in: 2012-12-11 Gwang Yoon Hwang Coordinated Graphics: Rename LayerTreeCoordinator to CoordinatedLayerTreeHost https://bugs.webkit.org/show_bug.cgi?id=104641 Reviewed by Noam Rosenthal. The name of LayerTreeCoordinator does not match LayerTreeHost. This patch renames it to CoordinatedLayerTreeHost. And make a getter for CoordinatedLayerTreeHostProxy in QQuickWebPagePrivate to make a cleaner code. No new tests - just a refactoring. * CMakeLists.txt: * DerivedSources.pri: * Platform/CoreIPC/MessageID.h: * Target.pri: * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::layerTreeRenderer): * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPagePrivate::paint): (QQuickWebPagePrivate::coordinatedLayerTreeHostProxy): (QQuickWebPage::updatePaintNode): (QQuickWebPagePrivate::updateSize): * UIProcess/API/qt/qquickwebpage_p_p.h: (WebKit): (QQuickWebPagePrivate): * UIProcess/API/qt/raw/qrawwebview.cpp: (QRawWebView::setSize): (QRawWebView::layerTreeRenderer): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp. (WebKit): (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy): (WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy): (WebKit::CoordinatedLayerTreeHostProxy::updateViewport): (WebKit::CoordinatedLayerTreeHostProxy::dispatchUpdate): (WebKit::CoordinatedLayerTreeHostProxy::createTileForLayer): (WebKit::CoordinatedLayerTreeHostProxy::updateTileForLayer): (WebKit::CoordinatedLayerTreeHostProxy::removeTileForLayer): (WebKit::CoordinatedLayerTreeHostProxy::createUpdateAtlas): (WebKit::CoordinatedLayerTreeHostProxy::removeUpdateAtlas): (WebKit::CoordinatedLayerTreeHostProxy::deleteCompositingLayer): (WebKit::CoordinatedLayerTreeHostProxy::setRootCompositingLayer): (WebKit::CoordinatedLayerTreeHostProxy::setCompositingLayerState): (WebKit::CoordinatedLayerTreeHostProxy::setCompositingLayerChildren): (WebKit::CoordinatedLayerTreeHostProxy::setCompositingLayerFilters): (WebKit::CoordinatedLayerTreeHostProxy::removeCustomFilterProgram): (WebKit::CoordinatedLayerTreeHostProxy::createCustomFilterProgram): (WebKit::CoordinatedLayerTreeHostProxy::didRenderFrame): (WebKit::CoordinatedLayerTreeHostProxy::createImageBacking): (WebKit::CoordinatedLayerTreeHostProxy::updateImageBacking): (WebKit::CoordinatedLayerTreeHostProxy::clearImageBackingContents): (WebKit::CoordinatedLayerTreeHostProxy::removeImageBacking): (WebKit::CoordinatedLayerTreeHostProxy::setContentsSize): (WebKit::CoordinatedLayerTreeHostProxy::setLayerAnimations): (WebKit::CoordinatedLayerTreeHostProxy::setAnimationsLocked): (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect): (WebKit::CoordinatedLayerTreeHostProxy::renderNextFrame): (WebKit::CoordinatedLayerTreeHostProxy::requestAnimationFrame): (WebKit::CoordinatedLayerTreeHostProxy::animationFrameReady): (WebKit::CoordinatedLayerTreeHostProxy::didChangeScrollPosition): (WebKit::CoordinatedLayerTreeHostProxy::createCanvas): (WebKit::CoordinatedLayerTreeHostProxy::syncCanvas): (WebKit::CoordinatedLayerTreeHostProxy::destroyCanvas): (WebKit::CoordinatedLayerTreeHostProxy::purgeBackingStores): (WebKit::CoordinatedLayerTreeHostProxy::setBackgroundColor): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h. (WebKit): (CoordinatedLayerTreeHostProxy): (WebKit::CoordinatedLayerTreeHostProxy::layerTreeRenderer): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: Renamed from Source/WebKit2/UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in. * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::LayerTreeRenderer): (WebKit::LayerTreeRenderer::animationFrameReady): (WebKit::LayerTreeRenderer::updateViewport): (WebKit::LayerTreeRenderer::renderNextFrame): (WebKit::LayerTreeRenderer::purgeBackingStores): (WebKit::LayerTreeRenderer::detach): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: (WebKit): (LayerTreeRenderer): * UIProcess/DrawingAreaProxy.cpp: (WebKit::DrawingAreaProxy::didReceiveCoordinatedLayerTreeHostProxyMessage): * UIProcess/DrawingAreaProxy.h: (WebKit): (WebKit::DrawingAreaProxy::coordinatedLayerTreeHostProxy): (DrawingAreaProxy): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::DrawingAreaProxyImpl): (WebKit::DrawingAreaProxyImpl::enterAcceleratedCompositingMode): (WebKit::DrawingAreaProxyImpl::didReceiveCoordinatedLayerTreeHostProxyMessage): (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect): * UIProcess/DrawingAreaProxyImpl.h: (WebKit): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveMessage): * UIProcess/efl/PageClientBase.cpp: * UIProcess/efl/PageClientLegacyImpl.cpp: (WebKit::PageClientLegacyImpl::didChangeContentsSize): * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::setRendererActive): (WebKit::PageViewportControllerClientEfl::didChangeContentsSize): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp. (WebKit): (WebKit::CoordinatedLayerTreeHost::create): (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::setLayerFlushSchedulingEnabled): (WebKit::CoordinatedLayerTreeHost::scheduleLayerFlush): (WebKit::CoordinatedLayerTreeHost::cancelPendingLayerFlush): (WebKit::CoordinatedLayerTreeHost::setShouldNotifyAfterNextScheduledLayerFlush): (WebKit::CoordinatedLayerTreeHost::setRootCompositingLayer): (WebKit::CoordinatedLayerTreeHost::invalidate): (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay): (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents): (WebKit::CoordinatedLayerTreeHost::forceRepaint): (WebKit::CoordinatedLayerTreeHost::forceRepaintAsync): (WebKit::CoordinatedLayerTreeHost::sizeDidChange): (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay): (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges): (WebKit::CoordinatedLayerTreeHost::initializeRootCompositingLayerIfNeeded): (WebKit::CoordinatedLayerTreeHost::syncLayerState): (WebKit::CoordinatedLayerTreeHost::syncLayerChildren): (WebKit::CoordinatedLayerTreeHost::createCanvas): (WebKit::CoordinatedLayerTreeHost::syncCanvas): (WebKit::CoordinatedLayerTreeHost::destroyCanvas): (WebKit::CoordinatedLayerTreeHost::syncLayerFilters): (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies): (WebKit::CoordinatedLayerTreeHost::removeCustomFilterProgramProxy): (WebKit::CoordinatedLayerTreeHost::disconnectCustomFilterPrograms): (WebKit::CoordinatedLayerTreeHost::detachLayer): (WebKit::updateOffsetFromViewportForSelf): (WebKit::updateOffsetFromViewportForLayer): (WebKit::CoordinatedLayerTreeHost::syncFixedLayers): (WebKit::CoordinatedLayerTreeHost::lockAnimations): (WebKit::CoordinatedLayerTreeHost::unlockAnimations): (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush): (WebKit::CoordinatedLayerTreeHost::syncDisplayState): (WebKit::CoordinatedLayerTreeHost::didPerformScheduledLayerFlush): (WebKit::CoordinatedLayerTreeHost::layerFlushTimerFired): (WebKit::CoordinatedLayerTreeHost::createPageOverlayLayer): (WebKit::CoordinatedLayerTreeHost::destroyPageOverlayLayer): (WebKit::CoordinatedLayerTreeHost::createImageBackingIfNeeded): (WebKit::CoordinatedLayerTreeHost::createImageBacking): (WebKit::CoordinatedLayerTreeHost::updateImageBacking): (WebKit::CoordinatedLayerTreeHost::clearImageBackingContents): (WebKit::CoordinatedLayerTreeHost::removeImageBacking): (WebKit::CoordinatedLayerTreeHost::flushPendingImageBackingChanges): (WebKit::CoordinatedLayerTreeHost::notifyAnimationStarted): (WebKit::CoordinatedLayerTreeHost::notifyFlushRequired): (WebKit::CoordinatedLayerTreeHost::paintContents): (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer): (WebKit::LayerTreeHost::supportsAcceleratedCompositing): (WebKit::CoordinatedLayerTreeHost::createTile): (WebKit::CoordinatedLayerTreeHost::updateTile): (WebKit::CoordinatedLayerTreeHost::removeTile): (WebKit::CoordinatedLayerTreeHost::createUpdateAtlas): (WebKit::CoordinatedLayerTreeHost::removeUpdateAtlas): (WebKit::CoordinatedLayerTreeHost::visibleContentsRect): (WebKit::CoordinatedLayerTreeHost::setLayerAnimations): (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect): (WebKit::CoordinatedLayerTreeHost::graphicsLayerFactory): (WebKit::CoordinatedLayerTreeHost::scheduleAnimation): (WebKit::CoordinatedLayerTreeHost::animationFrameReady): (WebKit::CoordinatedLayerTreeHost::renderNextFrame): (WebKit::CoordinatedLayerTreeHost::layerTreeTileUpdatesAllowed): (WebKit::CoordinatedLayerTreeHost::purgeBackingStores): (WebKit::CoordinatedLayerTreeHost::beginContentUpdate): (WebKit::CoordinatedLayerTreeHost::scheduleReleaseInactiveAtlases): (WebKit::CoordinatedLayerTreeHost::releaseInactiveAtlasesTimerFired): (WebKit::CoordinatedLayerTreeHost::setBackgroundColor): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: Renamed from Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h. (WebKit): (CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::layerTreeContext): (WebKit::CoordinatedLayerTreeHost::pageOverlayShouldApplyFadeWhenPainting): (WebKit::CoordinatedLayerTreeHost::pauseRendering): (WebKit::CoordinatedLayerTreeHost::resumeRendering): (WebKit::CoordinatedLayerTreeHost::deviceScaleFactorDidChange): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in: Renamed from Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.messages.in. * WebProcess/WebPage/DrawingArea.h: (DrawingArea): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::didReceiveCoordinatedLayerTreeHostMessage): * WebProcess/WebPage/DrawingAreaImpl.h: (DrawingAreaImpl): * WebProcess/WebPage/LayerTreeHost.cpp: (WebKit::LayerTreeHost::create): * WebProcess/WebPage/LayerTreeHost.h: (LayerTreeHost): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::~WebPage): (WebKit::WebPage::didReceiveMessage): 2012-12-11 Alexey Proskuryakov Per-Tab WebProcess: Blue lines between menu tabs at apple.com https://bugs.webkit.org/show_bug.cgi?id=104709 Reviewed by Sam Weinig. Data URLs were broken. Removing a no longer valid optimization for now. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::scheduleLoad): 2012-12-11 Michael Pruett [JSC] Add tests for explicit serialization values https://bugs.webkit.org/show_bug.cgi?id=104423 Reviewed by Oliver Hunt. Add tests for serialization and deserialization mechanisms of the JSC implementation of SerializedScriptValue. Similar tests already exist for the V8 implementation. * win/WebKit2.def.in: 2012-12-11 Jon Lee Initialize new web processes with list of auto-start origins for plug-ins https://bugs.webkit.org/show_bug.cgi?id=103219 Reviewed by Anders Carlsson. Serialize the set of hashes into a vector as a parameter in web process creation. * Shared/WebProcessCreationParameters.h: Add a parameter for the origin hashes. * Shared/WebProcessCreationParameters.cpp: Encode/decode that parameter. (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * UIProcess/Plugins/PlugInAutoStartProvider.cpp: (WebKit::PlugInAutoStartProvider::autoStartOriginsCopy): Return a vector copy with contents from the hash set. * UIProcess/Plugins/PlugInAutoStartProvider.h: (PlugInAutoStartProvider): * UIProcess/WebContext.cpp: (WebKit::WebContext::createNewWebProcess): Populate the parameter with the contents of the set. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Add the items in the vector to the web process' copy of the set. 2012-12-11 Andreas Kling CoreIPC: ArgumentEncoder should have an inline buffer. Reviewed by Anders Carlsson. Add a 4K inline buffer to CoreIPC::ArgumentEncoder to avoid malloc/free churn. It was dominating the transient allocations graph in Instruments. * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::ArgumentEncoder): (CoreIPC::ArgumentEncoder::grow): * Platform/CoreIPC/ArgumentEncoder.h: (CoreIPC::ArgumentEncoder::buffer): (ArgumentEncoder): (CoreIPC::ArgumentEncoder::usesInlineBuffer): 2012-12-11 Mike West Web Inspector: ConsoleTypes should not expose MessageType - it should be private to inspector. https://bugs.webkit.org/show_bug.cgi?id=66371 Reviewed by Pavel Feldman. Drops WebCore::MessageLevel from the addMessageToConsole method. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::addMessageToConsole): * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): 2012-12-11 Thiago Marcos P. Santos [EFL] Increase the timeout of the API unit tests https://bugs.webkit.org/show_bug.cgi?id=104666 Reviewed by Kenneth Rohde Christiansen. Palliative fix until we find out why the tests are taking so long. * PlatformEfl.cmake: 2012-12-11 Kenneth Rohde Christiansen [Qt][EFL][WK2] Resizing the window doesn't always result in right content position https://bugs.webkit.org/show_bug.cgi?id=104416 Reviewed by Simon Hausmann. Make sure the client is notified about position and scale changed done by us. Rename the m_*IsLocked to m_pending*Change as that makes the code more obvious. Patch verified with both Qt and EFL. * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::PageViewportController): (WebKit::PageViewportController::didRenderFrame): Notify client and pixel align. (WebKit::PageViewportController::didChangeContentsVisibility): (WebKit::PageViewportController::didChangeViewportAttributes): (WebKit::PageViewportController::applyScaleAfterRenderingContents): (WebKit::PageViewportController::applyPositionAfterRenderingContents): * UIProcess/PageViewportController.h: (PageViewportController): 2012-12-11 Christophe Dumez [CoordinatedGraphics] Use unsigned integers for UpdateAtlas IDs https://bugs.webkit.org/show_bug.cgi?id=104654 Reviewed by Kenneth Rohde Christiansen. UpdateAtlas currently uses *signed* integer type for its identifier. Due to the way we generate those IDs, it is safer to use *unsigned* integers. This is because the generated ID will overflow at some point and the C and C++ language standards say that overflow of a signed value is undefined behaviour. This patch switches to unsigned integer type for UpdateAtlas IDs since unsigned integers are guaranteed to wrap around on overflow. * Shared/SurfaceUpdateInfo.h: (SurfaceUpdateInfo): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp: (WebKit::LayerTreeCoordinatorProxy::createUpdateAtlas): (WebKit::LayerTreeCoordinatorProxy::removeUpdateAtlas): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h: (LayerTreeCoordinatorProxy): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in: * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::beginContentUpdate): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayerClient): (CoordinatedGraphicsLayer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.h: (CoordinatedTileClient): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::createUpdateAtlas): (WebKit::LayerTreeCoordinator::removeUpdateAtlas): (WebKit::LayerTreeCoordinator::beginContentUpdate): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h: (LayerTreeCoordinator): * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp: (WebKit::UpdateAtlas::UpdateAtlas): (WebKit::UpdateAtlas::~UpdateAtlas): (WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer): * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h: (UpdateAtlasClient): (UpdateAtlas): 2012-12-11 Jinwoo Song [EFL][WK2] Create a ewk view object with new context for API tests https://bugs.webkit.org/show_bug.cgi?id=103692 Reviewed by Gyuyoung Kim. Bug 103229 fixes the issue which PageGroupID increased even though the EwkView was created with default context. If the Bug 103229 is resolved, the EwkViews with same context will have same setting preferences. Currently, WebKit2/EFL API test is creating the ewk view object with the default context so the setting values set previously may influence the following tests. So this patch created a ewk view object with a new context instead of default one. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: (EWK2UnitTest::EWK2UnitTestBase::SetUp): 2012-12-10 Dan Winship [Soup] Fix spelling of "initiating" in API. Reviewed by Martin Robinson. * WebProcess/soup/WebSoupRequestManager.cpp: (WebKit::WebSoupRequestManager::send): 2012-12-10 Alexey Proskuryakov [WK2] Add a user default to limit the number of web processes https://bugs.webkit.org/show_bug.cgi?id=104606 Reviewed by Sam Weinig. When the limit is reached, we'll reuse an existing process with fewest pages. * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): Initialize m_webProcessCountLimit. (WebKit::WebContext::platformInitialize): Added a hook for reading the preference, empty implementation on most platforms. (WebKit::WebContext::createNewWebProcess): Changed to return a raw pointer. The new process is put into a vector anyway, so there is no ownership transfer. (WebKit::WebContext::warmInitialProcess): Don't create a new process if that would exceed the limit. (WebKit::WebContext::createNewWebProcessRespectingProcessCountLimit): Added a new function that wither creates a new process, or picks an existing one. (WebKit::WebContext::createWebPage): Call the above new function instead of unconditionally creating a process. * UIProcess/WebContext.h: createNewWebProcess is no private. All clients should respect the process count limit. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::reattachToWebProcess): Respect the process count limit. * UIProcess/mac/WebContextMac.mm: (WebKit::registerUserDefaultsIfNeeded): Register the new default. (WebKit::WebContext::platformInitialize): Read the default into a WebContext member variable. (WebKit::WebContext::platformInitializeWebProcess): Moved registerUserDefaultsIfNeeded() from here to platformInitialize(), as that's a better place for it. Also added a FIXME for an unrelated issue. 2012-12-10 Jon Lee Build fix. * WebProcess/WebCoreSupport/WebPlugInClient.cpp: (WebKit::WebPlugInClient::WebPlugInClient): Remove unneeded m_page variable. * WebProcess/WebCoreSupport/WebPlugInClient.h: (WebPlugInClient): 2012-12-10 Jon Lee Keep track of plug-in snapshots clicked by user https://bugs.webkit.org/show_bug.cgi?id=103206 Reviewed by Anders Carlsson. Create a new provider class for the web context that maintains a mapping of the plug-in origins allowed to auto-start for a specific page origin. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Create and set WebPlugInClient. Implement WebCore::PlugInClient. * WebProcess/WebCoreSupport/WebPlugInClient.cpp: Added. (WebKit::WebPlugInClient::WebPlugInClient): (WebKit::WebPlugInClient::~WebPlugInClient): (WebKit::WebPlugInClient::pageDestroyed): (WebKit::WebPlugInClient::isAutoStartOrigin): Forward to WebProcess. (WebKit::WebPlugInClient::addAutoStartOrigin): Forward to WebProcess. * WebProcess/WebCoreSupport/WebPlugInClient.h: Added. * WebProcess/WebProcess.cpp: Maintains a copy of the hash set. (WebKit::WebProcess::isPlugInAutoStartOrigin): Look for the hash in the set. (WebKit::WebProcess::addPlugInAutoStartOrigin): Tell the UI process to add the hash for the page. (WebKit::WebProcess::didAddPlugInAutoStartOrigin): Add the hash to the cached set. * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: Add DidAddPlugInAutoStartOrigin. Add the auto-start provider. * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): Initialize the provider. (WebKit::WebContext::addPlugInAutoStartOriginHash): Forward to the provider. * UIProcess/WebContext.h: * UIProcess/WebContext.messages.in: Add AddPlugInAutoStartOriginHash. The provider class maintains a map of page domains to hashes, and a set of all the hashes. The latter will be used to initialize new web processes without having to crawl through the whole map. * UIProcess/Plugins/PlugInAutoStartProvider.cpp: Added. (WebKit::PlugInAutoStartProvider::PlugInAutoStartProvider): (WebKit::PlugInAutoStartProvider::addAutoStartOrigin): Add the origin to the map and set. Tell all processes to add the origin to their local copies. * UIProcess/Plugins/PlugInAutoStartProvider.h: Added. Add PlugInAutoStartProvider and WebPlugInClient. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: 2012-12-10 Anders Carlsson Add WKPageSetInvalidMessageFunction stub https://bugs.webkit.org/show_bug.cgi?id=104614 Reviewed by Mark Rowe. * UIProcess/API/C/WKPage.cpp: (WKPageSetInvalidMessageFunction): * UIProcess/API/C/WKPagePrivate.h: 2012-12-09 Antti Koivisto Factor node traversal into standalone functions https://bugs.webkit.org/show_bug.cgi?id=104507 Reviewed by Eric Seidel. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::containsAnyFormElements): 2012-12-10 Eduardo Lima Mitev [GTK] Expose HitTestResult::scrollbar() condition in API https://bugs.webkit.org/show_bug.cgi?id=104369 Reviewed by Carlos Garcia Campos. This patch populates WebCore::HitTestResult::scrollbar() condition in WebKitHitTestResult public API, and includes a corresponding unit test. * Shared/WebHitTestResult.cpp: Adds new isScrollbar member to encoding and decoding methods to carry the scrollbar condition from Web process to UI process. (WebKit::WebHitTestResult::Data::encode): (WebKit::WebHitTestResult::Data::decode): * Shared/WebHitTestResult.h: (Data): Adds new bool member isScrollbar. (WebKit::WebHitTestResult::Data::Data): Initializes isScrollbar from WebCore::HitTestResult::scrollbar(). (WebKit::WebHitTestResult::isScrollbar): Method that returns value of isScrollbar member. (WebHitTestResult): * UIProcess/API/gtk/WebKitHitTestResult.cpp: (webkitHitTestResultCreate): Adds scrollbar condition to context upon initialization. (webkitHitTestResultCompare): Adds comparison of scrollbar condition. (webkit_hit_test_result_context_is_scrollbar): Public accessor for scrollbar presence in context. * UIProcess/API/gtk/WebKitHitTestResult.h: Adds new flag WEBKIT_HIT_TEST_RESULT_CONTEXT_SCROLLBAR to WebKitHitTestResultContext enum. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Adds new API symbol to the corresponding documentation sections. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewMouseTarget): Updates mouse-target test to include assertions for hitting scrollbar condition, and an new HTML to privide a positive case. 2012-12-10 Alexis Menard [CSS3 Backgrounds and Borders] Remove CSS3_BACKGROUND feature flag. https://bugs.webkit.org/show_bug.cgi?id=104539 Reviewed by Antonio Gomes. As discussed on webkit-dev it is not needed to keep this feature flag as support for type is a small feature that is already implemented by three other UAs. It was useful while landing this feature as partial bits were landed one after one. * Configurations/FeatureDefines.xcconfig: 2012-12-10 Alberto Garcia WebKitWebViewBase produces a warning if compiled with gcc https://bugs.webkit.org/show_bug.cgi?id=104561 Reviewed by Carlos Garcia Campos. * UIProcess/API/gtk/WebKitWebViewBase.h: since this file can be included from C code, use void to explicitly specify that webkit_web_view_base_get_type() doesn't have parameters. Otherwise we get "warning: function declaration isn't a prototype" with -Wstrict-prototypes. 2012-12-10 Mikhail Pozdnyakov [WK2] TiledBackingStore: remove unneeded 'treatAsInitialValue' parameter from PageViewportControllerClient::setContentsScale https://bugs.webkit.org/show_bug.cgi?id=104544 Reviewed by Kenneth Rohde Christiansen. Removed 'treatAsInitialValue' parameter from PageViewportControllerClient::setContentsScale() as it was not used by anyone. * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::didRenderFrame): * UIProcess/PageViewportControllerClient.h: (PageViewportControllerClient): * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::setContentsScale): * UIProcess/efl/PageViewportControllerClientEfl.h: (PageViewportControllerClientEfl): * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::setContentsScale): * UIProcess/qt/PageViewportControllerClientQt.h: (PageViewportControllerClientQt): 2012-12-10 Zoltan Nyul Implement testRunner.setViewModeMediaFeature() in WebKitTestRunner https://bugs.webkit.org/show_bug.cgi?id=103886 Reviewed by Kenneth Rohde Christiansen. Add support for TestRunner::setViewModeMediaFeature(). This functionality is needed by the following LayoutTests: fast/media/media-query-list-02.html fast/media/media-query-list-03.html fast/media/media-query-list-04.html fast/media/media-query-list-05.html fast/media/media-query-list-06.html fast/media/media-query-list-07.html fast/media/view-mode-media-feature.html * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetViewMode): * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setViewMode): (WebKit): * WebProcess/WebPage/WebPage.h: (WebPage): 2012-12-10 Simon Hausmann [Qt] Fix QtWebProcess discovery on Windows https://bugs.webkit.org/show_bug.cgi?id=104552 Reviewed by Jocelyn Turcotte. Make sure to look for QtWebProcess.exe on Windows instead of QtWebProcess. * Shared/qt/ProcessExecutablePathQt.cpp: (WebKit::executablePath): 2012-12-10 Martin Robinson [GTK] Bring Harfbuzz-ng support to Gtk https://bugs.webkit.org/show_bug.cgi?id=92098 Reviewed by Gustavo Noronha Silva. Add a HarfBuzz dependency. * GNUmakefile.am: Add FreeType/HarfBuzz CFLAGS/LIBS to the libraries. 2012-12-10 Simon Hausmann [Qt] Use QLibraryInfo::LibraryExecutablesPath unconditionally https://bugs.webkit.org/show_bug.cgi?id=104541 Reviewed by Jocelyn Turcotte. We now depend on a Qt 5 version that is guaranteed to have this API, so we can remove the configure checks for it. * PluginProcess.pro: * Shared/qt/ProcessExecutablePathQt.cpp: (WebKit::executablePath): * WebProcess.pro: 2012-12-10 Simon Hausmann [Qt] Fix build without QtQuick 2 Unreviewed trivial build fix. This function is defined in QtWebContext, which is only used when QtQuick2 is available. * UIProcess/qt/WebContextQt.cpp: (WebKit::WebContext::platformInvalidateContext): 2012-12-10 Huang Dongsung Coordinated Graphics: Remove the dependency of ShareableSurface from Coordinated Graphics. https://bugs.webkit.org/show_bug.cgi?id=100819 Reviewed by Kenneth Rohde Christiansen. It is a follow-up patch of r137117. There are two changes 1. Add a const qualifier to supportsAlpha(). 2. Use << instead of encode() when using ArgumentEncoder. * Shared/CoordinatedGraphics/CoordinatedSurface.h: (WebKit::CoordinatedSurface::supportsAlpha): * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: (WebKit::WebCoordinatedSurface::Handle::encode): (WebKit::WebCoordinatedSurface::copyToTexture): 2012-12-10 Huang Dongsung Coordinated Graphics: Remove the dependency of ShareableSurface from Coordinated Graphics. https://bugs.webkit.org/show_bug.cgi?id=100819 Reviewed by Kenneth Rohde Christiansen. WebCoordinatedSurface::copyToTexture should return early if the backend is GraphicsSurface. * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: (WebKit::WebCoordinatedSurface::copyToTexture): 2012-12-10 Huang Dongsung Coordinated Graphics: Add CoordinatedSurface to remove the dependency of ShareableSurface from Coordinated Graphics. https://bugs.webkit.org/show_bug.cgi?id=100819 Reviewed by Noam Rosenthal. Internal Review by Gwang Yoon Hwang and Jae Hyun Park. It is a preparation patch for Threaded Coordinated Graphics on WK1. Create a CoordinatedSurface class that can be the base class both for the current IPC-based ShareableSurface, renamed here to WebCoordinatedSurface, and to a future thread-based surface implementation. * CMakeLists.txt: * Shared/CoordinatedGraphics/CoordinatedSurface.h: Added. (WebCore): (WebKit): (CoordinatedSurface): (WebKit::CoordinatedSurface::~CoordinatedSurface): (WebKit::CoordinatedSurface::supportsAlpha): * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: Renamed from Source/WebKit2/Shared/ShareableSurface.cpp. Extends CoordinatedSurface. (WebKit): (WebKit::WebCoordinatedSurface::Handle::Handle): (WebKit::WebCoordinatedSurface::Handle::encode): (WebKit::WebCoordinatedSurface::Handle::decode): (WebKit::CoordinatedSurface::create): (WebKit::WebCoordinatedSurface::create): (WebKit::WebCoordinatedSurface::createWithSurface): (WebKit::WebCoordinatedSurface::createGraphicsContext): (WebKit::WebCoordinatedSurface::WebCoordinatedSurface): (WebKit::WebCoordinatedSurface::~WebCoordinatedSurface): (WebKit::WebCoordinatedSurface::createHandle): (WebKit::WebCoordinatedSurface::copyToTexture): * Shared/CoordinatedGraphics/WebCoordinatedSurface.h: Renamed from Source/WebKit2/Shared/ShareableSurface.h. (WebCore): (WebKit): (WebCoordinatedSurface): (Handle): (WebKit::WebCoordinatedSurface::Handle::graphicsSurfaceToken): (WebKit::WebCoordinatedSurface::isBackedByGraphicsSurface): * Target.pri: * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp: (WebKit::CoordinatedBackingStoreTile::swapBuffers): (WebKit::CoordinatedBackingStoreTile::setBackBuffer): (WebKit::CoordinatedBackingStore::updateTile): * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h: (WebKit): (CoordinatedBackingStoreTile): (CoordinatedBackingStore): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp: (WebKit::LayerTreeCoordinatorProxy::createUpdateAtlas): (WebKit::LayerTreeCoordinatorProxy::updateImageBacking): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h: (LayerTreeCoordinatorProxy): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in: * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::updateImageBacking): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: (TileUpdate): (WebKit::LayerTreeRenderer::TileUpdate::TileUpdate): (LayerTreeRenderer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::beginContentUpdate): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayerClient): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.cpp: (WebKit::CoordinatedImageBacking::update): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h: (Coordinator): (CoordinatedImageBacking): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::updateImageBacking): (WebKit::LayerTreeCoordinator::createUpdateAtlas): (WebKit::LayerTreeCoordinator::beginContentUpdate): (WebKit::LayerTreeCoordinator::releaseInactiveAtlasesTimerFired): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h: (LayerTreeCoordinator): * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp: (WebKit::UpdateAtlas::UpdateAtlas): (WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer): * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h: (UpdateAtlasClient): (UpdateAtlas): (WebKit::UpdateAtlas::supportsAlpha): 2012-12-09 Huang Dongsung Coordinated Graphics: Reorder messages to LayerTreeCoordinatorProxy https://bugs.webkit.org/show_bug.cgi?id=103843 Reviewed by Noam Rosenthal. Send SetRootCompositingLayer message to the UI process before flushing compositing states of layer tree. This is in preparation for refactoring TextureMapper to work in an actor model (http://webkit.org/b/103854). * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::setLayerState): (WebKit::LayerTreeRenderer::setRootLayerID): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::LayerTreeCoordinator): (WebKit::LayerTreeCoordinator::flushPendingLayerChanges): (WebKit::LayerTreeCoordinator::initializeRootCompositingLayerIfNeeded): (WebKit): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h: (LayerTreeCoordinator): 2012-12-09 Jon Lee [WK2] Move button image to injected bundle https://bugs.webkit.org/show_bug.cgi?id=104107 Reviewed by Simon Fraser. Rely on the injected bundle to create the image used for the button in snapshotted plug-ins. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::plugInStartLabelImage): Forward the call to the injected bundle UI client. * WebProcess/WebCoreSupport/WebChromeClient.h: Implement plugInStartLabelImage(). * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::plugInStartLabelImage): Convert the WebCore enums to WK API enums. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Expose a new callback to generate the button image. * Shared/API/c/cg/WKImageCG.cpp: (WKImageCreateFromCGImage): Refactor to use GraphicsContext methods so that the image is flipped appropriately. 2012-12-09 Kangil Han Fix unused parameter compile warnings https://bugs.webkit.org/show_bug.cgi?id=104463 Reviewed by Kentaro Hara. Remove compile warning messages by omitting parameter name. * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::createCanvas): 2012-12-08 Seokju Kwon [EFL][WK2] Add Remote Web Inspector https://bugs.webkit.org/show_bug.cgi?id=98705 Reviewed by Gyuyoung Kim. Add Remote Web Inspector to EFL port. The WebInspectorSever will be started during WebKit context initialization. The IP address and port number for the server can be set in WEBKIT_INSPECTOR_SERVER. * CMakeLists.txt: * PlatformEfl.cmake: * UIProcess/InspectorServer/WebInspectorServer.h: (WebInspectorServer): * UIProcess/InspectorServer/WebSocketServer.h: (WebSocketServer): * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp: Added. (WebKit): (WebKit::inspectorResourcePath): (WebKit::WebInspectorServer::platformResourceForPath): (WebKit::WebInspectorServer::buildPageList): * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp: (WebKit::connectionCallback): * UIProcess/efl/WebContextEfl.cpp: (WebKit::initializeInspectorServer): (WebKit): (WebKit::WebContext::platformInitializeWebProcess): * config.h: 2012-12-08 Gustavo Noronha Silva Unreviewed. Make building the WebKit2 GIR file conditional on building the WebKit2 library. * GNUmakefile.am: 2012-12-08 Seokju Kwon Remove unused headers https://bugs.webkit.org/show_bug.cgi?id=104428 Reviewed by Kentaro Hara. Header inclusion cleanup. Remove . * Platform/qt/WorkQueueQt.cpp: * Platform/win/WorkQueueWin.cpp: * Shared/qt/ShareableBitmapQt.cpp: * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: * UIProcess/win/TextCheckerWin.cpp: * UIProcess/win/WebContextMenuProxyWin.cpp: * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: 2012-12-07 Jinwoo Song [EFL][WK2] Remove unused source file from PlatformEfl.cmake https://bugs.webkit.org/show_bug.cgi?id=104430 Reviewed by Kentaro Hara. Shared/API/c/gtk/WKGraphicsContextGtk.cpp is not used for building WebKit2/EFL. * PlatformEfl.cmake: 2012-12-07 Jer Noble Allow the WebProcess access to the CoreMedia preferences file. https://bugs.webkit.org/show_bug.cgi?id=104320 Reviewed by Alexey Proskuryakov. Allow read access to ~/Library/Preferences/com.apple.coremedia.plist and com.apple.avfoundation.plist by the WebProcess. The QuickTime.plugin uses CoreMedia for playback, so allow PluginProcess to access those preferences as well. * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb.in: * WebProcess/com.apple.WebProcess.sb.in: 2012-12-07 Tim Horton [wk2] WebProcessServiceForWebKitDevelopment should forward stdout and stderr to the UIProcess https://bugs.webkit.org/show_bug.cgi?id=104418 Reviewed by Simon Fraser. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToWebProcessServiceForWebKitDevelopment): Send stdout and stderr file descriptors to the WebProcess. * WebProcessServiceForWebKitDevelopment/WebProcessServiceForWebKitDevelopmentMain.mm: (WebProcessServiceForWebKitDevelopmentEventHandler): Replace the WebProcess' stdout and stderr with those from the UIProcess. 2012-12-07 Sheriff Bot Unreviewed, rolling out r136993. http://trac.webkit.org/changeset/136993 https://bugs.webkit.org/show_bug.cgi?id=104415 This patch breaks the mac build (Requested by cabanier on #webkit). * win/WebKit2.def.in: 2012-12-07 Alexey Proskuryakov There is no need to change cached resource storage policy through ResourceHandleClient https://bugs.webkit.org/show_bug.cgi?id=104413 Reviewed by Brady Eidson. * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkResourceLoader.h: Deleted overrides of the removed willCacheResponse. 2012-12-07 Alexey Proskuryakov Network process should use a correct storage session in private browsing mode https://bugs.webkit.org/show_bug.cgi?id=104401 Reviewed by Brady Eidson. Notify NetworkProcess when it needs to create or destroy a private browsing session, and add a NetworkResourceLoadParameters member telling if the particular resource should be requested using it. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::cookiesForDOM): (WebKit::NetworkConnectionToWebProcess::setCookiesFromDOM): (WebKit::NetworkConnectionToWebProcess::cookiesEnabled): (WebKit::NetworkConnectionToWebProcess::getRawCookies): (WebKit::NetworkConnectionToWebProcess::deleteCookie): (WebKit::NetworkConnectionToWebProcess::getHostnamesWithCookies): (WebKit::NetworkConnectionToWebProcess::deleteCookiesForHostname): (WebKit::NetworkConnectionToWebProcess::deleteAllCookies): Added another dummy argument to dummy networking context. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): Ensure private browsing session if it's needed due to a persistent preference, not an API call at runtime (which is handled below as ensure/destroy). * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::start): Pass private browsing state to RemoteNetworkingContext used for loading. (WebKit::NetworkResourceLoader::willCacheResponse): Added an implemntation that matches WebCore, but may be not needed. * NetworkProcess/mac/RemoteNetworkingContext.h: (WebKit::RemoteNetworkingContext::create): Store privateBrowsingEnabled flag. * NetworkProcess/mac/RemoteNetworkingContext.mm: (WebKit::RemoteNetworkingContext::storageSession): Return a private session when it's in use. * Shared/Network/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode): (WebKit::NetworkProcessCreationParameters::decode): * Shared/Network/NetworkProcessCreationParameters.h: Pass privateBrowsingEnabled flag to the new process. * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): (WebKit::NetworkResourceLoadParameters::encode): (WebKit::NetworkResourceLoadParameters::decode): * Shared/Network/NetworkResourceLoadParameters.h: (WebKit::NetworkResourceLoadParameters::inPrivateBrowsingMode): Pass inPrivateBrowsingMode flag for the request. * UIProcess/Network/NetworkProcessManager.h: (WebKit::NetworkProcessManager::process): Exposed, so that we can send messages without going through NetworkProcessManager. * UIProcess/WebContext.cpp: (WebKit::WebContext::usesNetworkProcess): (WebKit::anyContextUsesNetworkProcess): (WebKit::WebContext::willStartUsingPrivateBrowsing): (WebKit::WebContext::willStopUsingPrivateBrowsing): Notify NetworkProcess when entering or exiting private browsing. * UIProcess/WebContext.h: Exposed usesNetworkProcess() for the new static function anyContextUsesNetworkProcess to use. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::scheduleLoad): Put current private browsing state over in NetworkResourceLoadParameters. 2012-12-07 Helder Correia [CoordGfx] Variable name starts with upper case character https://bugs.webkit.org/show_bug.cgi?id=104327 Reviewed by Noam Rosenthal. Just fixing a typo. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setMaskLayer): 2012-12-07 Kenneth Rohde Christiansen [WK2][EFL][Qt] Pixel alignment is wrong in some cases involving a non-integral content scale https://webkit.org/b/103519 Reviewed by Noam Rosenthal. This patch removes the blurriness by pixel aligning the layers. It does not fully remove the shaking, only minimizes it. * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::transformFromScene): (EwkViewImpl::displayTimerFired): * UIProcess/API/efl/EwkViewImpl.h: (EwkViewImpl::pagePosition): As the pixel alignment of the main layer is moved to the PageViewportController, rename discretePagePosition to just pagePosition. It now returns a FloatPoint but the positions should still be discrete. * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp: (WebKit::LayerTreeCoordinatorProxy::setVisibleContentsRect): (WebKit::LayerTreeCoordinatorProxy::didChangeScrollPosition): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h: (LayerTreeCoordinatorProxy): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in: * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::didChangeScrollPosition): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: (LayerTreeRenderer): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::visibleContentsRect): (WebKit::LayerTreeCoordinator::setVisibleContentsRect): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h: (LayerTreeCoordinator): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.messages.in: * WebProcess/WebPage/LayerTreeHost.h: (WebCore): (WebKit::LayerTreeHost::setVisibleContentsRect): Change the internal scroll position/visible contents rect to be represented as float positions. The rounding to integer values not happens just before setFixesVisibleContentsRect. This makes it possible to know our exact positions and calculate proper scroll deltas. (WebKit::LayerTreeRenderer::setLayerState): Group anchor point, position and size together. * UIProcess/PageViewportController.h: (PageViewportController): * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::PageViewportController): (WebKit::PageViewportController::boundContentsPosition): (WebKit::PageViewportController::boundContentsPositionAtScale): (WebKit::PageViewportController::didRenderFrame): (WebKit::PageViewportController::pageDidRequestScroll): (WebKit::PageViewportController::didChangeContentsVisibility): (WebKit::PageViewportController::syncVisibleContents): (WebKit::PageViewportController::visibleContentsSize): (WebKit::PageViewportController::applyPositionAfterRenderingContents): * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::focusEditableArea): (WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded): (WebKit::PageViewportControllerClientQt::nearestValidVisibleContentsRect): Some renaming as what was called viewportPos was actually the contents position. Rename clampViewportToContents to boundContentsPosition and remove scale argument which is has direct access to. Make the boundContentsPosition allow one extra pixel in each orientation to allow for pixel alignment of fixed position layers (WebKit::isIntegral): (WebKit): (WebKit::PageViewportController::pixelAlignedFloatPoint): Introduce way to pixel align the main contents layer. Only in use for EFL so far. * UIProcess/efl/PageClientLegacyImpl.cpp: (WebKit::PageClientLegacyImpl::updateViewportSize): * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::setViewportPosition): * UIProcess/efl/PageViewportControllerClientEfl.h: (WebKit::PageViewportControllerClientEfl::contentPosition): (PageViewportControllerClientEfl): Store the contents position as a FloatPoint. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::flushCompositingStateForThisLayerOnly): (WebCore::CoordinatedGraphicsLayer::setMaskLayer): (WebCore::CoordinatedGraphicsLayer::syncLayerState): (WebCore::CoordinatedGraphicsLayer::tiledBackingStoreVisibleRect): (WebCore::isIntegral): (WebCore): (WebCore::CoordinatedGraphicsLayer::computePositionRelativeToBase): (WebCore::CoordinatedGraphicsLayer::computePixelAlignment): (WebCore::CoordinatedGraphicsLayer::computeTransformedVisibleRect): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayerClient): (CoordinatedGraphicsLayer): Pixel align layers when the effective scale is not an integer value. This code is based on code from GraphicsLayerCA. 2012-12-07 Alexey Proskuryakov REGRESSION (r136770): Assertion failure in sendMessage() whenever WebProcess crashes https://bugs.webkit.org/show_bug.cgi?id=104392 Reviewed by Anders Carlsson. * Shared/ChildProcessProxy.cpp: (WebKit::ChildProcessProxy::sendMessage): Changed back to using m_conection where it can be null. 2012-12-07 Jaehun Lim [EFL][WK2] Add ewk_settings APIs for text autosizing https://bugs.webkit.org/show_bug.cgi?id=103342 Reviewed by Kenneth Rohde Christiansen. Add ewk_settings_text_autosizing_enabled_get / set() functions. Text autosizing is disabled by default. * UIProcess/API/efl/ewk_settings.cpp: (ewk_settings_text_autosizing_enabled_set): (ewk_settings_text_autosizing_enabled_get): * UIProcess/API/efl/ewk_settings.h: * UIProcess/API/efl/tests/test_ewk2_settings.cpp: (TEST_F): 2012-12-06 Rick Byers CSS cursor property should support webkit-image-set https://bugs.webkit.org/show_bug.cgi?id=99493 Reviewed by Beth Dakin. Add ENABLE_MOUSE_CURSOR_SCALE - disabled by default. * Configurations/FeatureDefines.xcconfig: 2012-12-06 Jae Hyun Park Coordinated Graphics: Rename WebLayerTreeInfo to CoordinatedLayerInfo https://bugs.webkit.org/show_bug.cgi?id=103983 Reviewed by Noam Rosenthal. This patch refactors WebLayerTreeInfo in 2 areas. 1. WebLayerTreeInfo is only used by Coordinated Graphics. So, the file should be located in WebKit2/Shared/CoordinatedGraphics instead of WebKit2/Shared. 2. The name of WebLayerTreeInfo is incorrect. Currently, WebLayerTreeInfo only has WebLayerInfo struct. Also, it is hard to know what WebLayer is since we don't use that name anymore. More appropriate name for WebLayerInfo would be CoordinatedLayerInfo. No new test, because no behavioral change. * CMakeLists.txt: * Scripts/webkit2/messages.py: (headers_for_type): * Shared/CoordinatedGraphics/CoordinatedLayerInfo.cpp: Renamed from Source/WebKit2/Shared/WebLayerTreeInfo.cpp. (WebKit): (WebKit::CoordinatedLayerInfo::encode): (WebKit::CoordinatedLayerInfo::decode): * Shared/CoordinatedGraphics/CoordinatedLayerInfo.h: Renamed from Source/WebKit2/Shared/WebLayerTreeInfo.h. (WebKit): (WebKit::CoordinatedLayerInfo::CoordinatedLayerInfo): (CoordinatedLayerInfo): * Shared/LayerTreeContext.h: (LayerTreeContext): * Shared/efl/LayerTreeContextEfl.cpp: (WebKit::LayerTreeContext::LayerTreeContext): (WebKit::LayerTreeContext::encode): (WebKit::LayerTreeContext::decode): (WebKit::LayerTreeContext::isEmpty): (WebKit::operator==): * Shared/qt/LayerTreeContextQt.cpp: (WebKit::LayerTreeContext::LayerTreeContext): (WebKit::LayerTreeContext::encode): (WebKit::LayerTreeContext::decode): (WebKit::LayerTreeContext::isEmpty): (WebKit::operator==): * Target.pri: * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp: (WebKit::LayerTreeCoordinatorProxy::createTileForLayer): (WebKit::LayerTreeCoordinatorProxy::updateTileForLayer): (WebKit::LayerTreeCoordinatorProxy::removeTileForLayer): (WebKit::LayerTreeCoordinatorProxy::deleteCompositingLayer): (WebKit::LayerTreeCoordinatorProxy::setRootCompositingLayer): (WebKit::LayerTreeCoordinatorProxy::setCompositingLayerState): (WebKit::LayerTreeCoordinatorProxy::setCompositingLayerChildren): (WebKit::LayerTreeCoordinatorProxy::setCompositingLayerFilters): (WebKit::LayerTreeCoordinatorProxy::setLayerAnimations): (WebKit::LayerTreeCoordinatorProxy::createCanvas): (WebKit::LayerTreeCoordinatorProxy::syncCanvas): (WebKit::LayerTreeCoordinatorProxy::destroyCanvas): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h: (WebKit): (LayerTreeCoordinatorProxy): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in: * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::LayerTreeRenderer): (WebKit::LayerTreeRenderer::createLayer): (WebKit::LayerTreeRenderer::createCanvas): (WebKit::LayerTreeRenderer::syncCanvas): (WebKit::LayerTreeRenderer::destroyCanvas): (WebKit::LayerTreeRenderer::setLayerChildren): (WebKit::LayerTreeRenderer::setLayerFilters): (WebKit::LayerTreeRenderer::setLayerState): (WebKit::LayerTreeRenderer::deleteLayer): (WebKit::LayerTreeRenderer::ensureLayer): (WebKit::LayerTreeRenderer::setRootLayerID): (WebKit::LayerTreeRenderer::createTile): (WebKit::LayerTreeRenderer::removeTile): (WebKit::LayerTreeRenderer::updateTile): (WebKit::LayerTreeRenderer::ensureRootLayer): (WebKit::LayerTreeRenderer::purgeGLResources): (WebKit::LayerTreeRenderer::setLayerAnimations): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: (WebKit): (LayerTreeRenderer): (WebKit::LayerTreeRenderer::layerByID): * UIProcess/DrawingAreaProxy.h: (WebKit): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::layerByIDMap): (WebCore::toCoordinatedLayerID): (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::id): (WebCore::CoordinatedGraphicsLayer::syncChildren): (WebCore::CoordinatedGraphicsLayer::syncLayerState): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayerClient): (CoordinatedGraphicsLayer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedImageBacking.h: * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::LayerTreeCoordinator): (WebKit::LayerTreeCoordinator::syncLayerState): (WebKit::LayerTreeCoordinator::syncLayerChildren): (WebKit::LayerTreeCoordinator::createCanvas): (WebKit::LayerTreeCoordinator::syncCanvas): (WebKit::LayerTreeCoordinator::destroyCanvas): (WebKit::LayerTreeCoordinator::syncLayerFilters): (WebKit::LayerTreeCoordinator::createTile): (WebKit::LayerTreeCoordinator::updateTile): (WebKit::LayerTreeCoordinator::removeTile): (WebKit::LayerTreeCoordinator::setLayerAnimations): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h: (LayerTreeCoordinator): 2012-12-06 Sheriff Bot Unreviewed, rolling out r136900. http://trac.webkit.org/changeset/136900 https://bugs.webkit.org/show_bug.cgi?id=104318 Unreviewed build for Windows port. (Requested by rfong on #webkit). * win/WebKit2.def.in: 2012-12-06 Jon Lee Retry snapshots if they are too empty https://bugs.webkit.org/show_bug.cgi?id=104174 Reviewed by Simon Fraser. * WebProcess/Plugins/PluginView.h: Add a new variable that keeps track of the number of times we've retried to come up with a snapshot. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::PluginView): Initialize the count to 0. (WebKit::isAlmostSolidColor): Figure out if the image is almost a solid color by overlaying a grid of dots, and calculate the differences among them. If the average color difference is greater than a threshold, we consider it to have meaningful content. For now we expect a minimum size and a specific bitmap image format, otherwise we return early. (WebKit::PluginView::pluginSnapshotTimerFired): If we have a snapshot image to look at, and if it is evaluated to be too empty, then try again. 2012-12-06 Tony Chang Unreviewed, Apple Win Debug build fix. * win/WebKit2.def.in: Add 2 symbols that are needed by the debug build. 2012-12-06 Alexey Proskuryakov Track private browsing session in network process https://bugs.webkit.org/show_bug.cgi?id=104281 Reviewed by Jessie Berlin. Added ensure/destroy messages that match what's done in WebProcess. Also similarly, ensuring a private session may happen on demand if network process has been restarted after a crash, or if private browsing is enabled via a persistent preference. Eventually, we should find a way to share code between WebFrameNetworkingContext and RemoteNetworkingContext. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeNetworkProcess): (WebKit::NetworkProcess::ensurePrivateBrowsingSession): (WebKit::NetworkProcess::destroyPrivateBrowsingSession): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/mac/RemoteNetworkingContext.h: (RemoteNetworkingContext): * NetworkProcess/mac/RemoteNetworkingContext.mm: (WebKit::privateBrowsingStorageSessionIdentifierBase): (WebKit::RemoteNetworkingContext::setPrivateBrowsingStorageSessionIdentifierBase): (WebKit::RemoteNetworkingContext::ensurePrivateBrowsingSession): (WebKit::RemoteNetworkingContext::destroyPrivateBrowsingSession): * Shared/Network/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::encode): (WebKit::NetworkProcessCreationParameters::decode): * Shared/Network/NetworkProcessCreationParameters.h: (NetworkProcessCreationParameters): * UIProcess/Network/mac/NetworkProcessProxyMac.mm: (WebKit::NetworkProcessProxy::platformInitializeNetworkProcess): * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: (WebKit::WebFrameNetworkingContext::ensurePrivateBrowsingSession): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): 2012-12-06 Laszlo Gombos [EFL] Remove ENABLE_GLIB_SUPPORT CMake variable https://bugs.webkit.org/show_bug.cgi?id=104278 Reviewed by Brent Fulgham. The guards are not required as it is always set for EFL. * PlatformEfl.cmake: * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: (WebKit::PluginProcessProxy::scanPlugin): * WebProcess/efl/WebProcessMainEfl.cpp: (WebKit::WebProcessMainEfl): 2012-12-06 Tony Chang REGRESSION(r135082): Restore the ability to insert author level style sheets from script https://bugs.webkit.org/show_bug.cgi?id=104042 Reviewed by Antti Koivisto. Update exports for Internals.cpp. * win/WebKit2.def.in: 2012-12-06 Andras Becsi [Qt][WK2] Fix QWebKitTest's notification of device pixel ratio change https://bugs.webkit.org/show_bug.cgi?id=104269 Unreviewed, trivialy fixing last minute change. Move signal emission to the correct place. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewFlickablePrivate::onComponentComplete): * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::PageViewportControllerClientQt): 2012-12-06 Andras Becsi [Qt][WK2] Fix QWebKitTest's notification of device pixel ratio change https://bugs.webkit.org/show_bug.cgi?id=104269 Reviewed by Kenneth Rohde Christiansen. Since the ViewportInfoItem of MiniBrowser is created before the WebView finishes construction, thus before the viewport controller has been instantiated, the shown device pixel ratio was incorrect. Additionally QWebKitTest's notification signal was also not emitted when the value changed. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::PageViewportControllerClientQt): 2012-12-06 Sheriff Bot Unreviewed, rolling out r136788. http://trac.webkit.org/changeset/136788 https://bugs.webkit.org/show_bug.cgi?id=104260 Asserts on EFL WebKit2 Debug bot (Requested by yael on #webkit). * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::setLayerState): (WebKit::LayerTreeRenderer::setRootLayerID): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::LayerTreeCoordinator): (WebKit::LayerTreeCoordinator::flushPendingLayerChanges): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h: (LayerTreeCoordinator): 2012-12-06 Sheriff Bot Unreviewed, rolling out r136795. http://trac.webkit.org/changeset/136795 https://bugs.webkit.org/show_bug.cgi?id=104257 Asserts on EFL WebKit2 Debug bot (Requested by yael on #webkit). * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::setRootLayerID): 2012-12-06 Shinya Kawanaka Internals.getElementByIdInShadowRoot is nonsense now. https://bugs.webkit.org/show_bug.cgi?id=104241 Reviewed by Kent Tamura. * win/WebKit2.def.in: 2012-12-06 Christophe Dumez [EFL][WK2] Context clients should unregister themselves when destroyed https://bugs.webkit.org/show_bug.cgi?id=104113 Reviewed by Kenneth Rohde Christiansen. Make sure the context clients (History and Download clients) unregister themselves when destroyed to make sure their callback functions are never called after the client objects have been destroyed (i.e. when the parent Ewk_Context has been destroyed). This addresses crashing issues after a Ewk_Context object gets unref'd and destroyed. * UIProcess/efl/ContextHistoryClientEfl.cpp: (WebKit::ContextHistoryClientEfl::ContextHistoryClientEfl): (WebKit): (WebKit::ContextHistoryClientEfl::~ContextHistoryClientEfl): * UIProcess/efl/ContextHistoryClientEfl.h: (ContextHistoryClientEfl): * UIProcess/efl/DownloadManagerEfl.cpp: (WebKit::DownloadManagerEfl::~DownloadManagerEfl): (WebKit): * UIProcess/efl/DownloadManagerEfl.h: (DownloadManagerEfl): 2012-12-05 Huang Dongsung Coordinated Graphics: Reorder messages to LayerTreeCoordinatorProxy https://bugs.webkit.org/show_bug.cgi?id=103843 Reviewed by Noam Rosenthal. Clarify LayerTreeRenderer::setRootLayerID() can be called only once during its lifecycle. LayerTreeRenderer, LayerTreeCoordinator and LayerTreeCoordinatorProxy have the same lifecycle to WebPage and the root layer is reused even if loading new page, so it is impossible to call LayerTreeRenderer::setRootLayerID() more than twice. * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::setRootLayerID): 2012-12-05 Brent Fulgham [Windows, WinCairo] Regenerate .def files on changes https://bugs.webkit.org/show_bug.cgi?id=104136 Reviewed by Tim Horton. The new .def file generator is not regenerating the link export definitions once it creates the definition file the first time. You must clean the build directory for new symbols to be added (or removed). * win/WebKit2.vcproj: Change the WebKit2.def file reference to point to the generated version of the file. * win/WebKit2ExportGenerator.vcproj: Add WebKit2.def.in as a source file that participates in the build so that Visual Studio knows to build the project when the file changes. * win/WebKit2ExportGeneratorBuildCmd.cmd: Added. Refactor build command into its own shell script. * win/WebKit2ExportGeneratorPostBuild.cmd: Call new BuildCmd script. * win/WebKit2ExportGeneratorPreBuild.cmd: Delete the old generator and definition files to ensure a clean build. 2012-12-05 Halton Huo [CMake] Unify coding style for CMake files https://bugs.webkit.org/show_bug.cgi?id=103605 Reviewed by Laszlo Gombos. Update cmake files(.cmake, CMakeLists.txt) with following style rules: 1. Indentation 1.1 Use spaces, not tabs. 1.2 Four spaces as indent. 2. Spacing 2.1 Place one space between control statements and their parentheses. For eg, if (), else (), elseif (), endif (), foreach (), endforeach (), while (), endwhile (), break (). 2.2 Do not place spaces between function and macro statements and their parentheses. For eg, macro(), endmacro(), function(), endfunction(). 2.3 Do not place spaces between a command or function or macro and its parentheses, or between a parenthesis and its content. For eg, message("testing") not message( "testing") or message ("testing" ) 2.4 No space at line ending. 3. Lowercase when call commands macros and functions. For eg, add_executable() not ADD_EXECUTABLE(), set() not SET(). * CMakeLists.txt: * PlatformEfl.cmake: * win/WebKit2ExportGenerator.vcproj: * win/WebKit2ExportGeneratorCommon.vsprops: 2012-12-05 Huang Dongsung Coordinated Graphics: Reorder messages to LayerTreeCoordinatorProxy https://bugs.webkit.org/show_bug.cgi?id=103843 Reviewed by Noam Rosenthal. Send SetRootCompositingLayer message to the UI process in the constructor instead of sending it on the first flush. This is in preparation for refactoring TextureMapper to work in an actor model (http://webkit.org/b/103854). * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::setLayerState): (WebKit::LayerTreeRenderer::setRootLayerID): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::LayerTreeCoordinator): (WebKit::LayerTreeCoordinator::initializeRootCompositingLayer): (WebKit): (WebKit::LayerTreeCoordinator::flushPendingLayerChanges): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h: (LayerTreeCoordinator): 2012-12-05 Jinwoo Song [EFL][WK2] Don't use the C API internally in ewk_cookie_manager https://bugs.webkit.org/show_bug.cgi?id=103243 Reviewed by Gyuyoung Kim. Used the C++ classes directly instead of the C API wrappers to avoid a lot of toImpl/toAPI casts. * UIProcess/API/efl/ewk_context.cpp: (EwkContext::cookieManager): * UIProcess/API/efl/ewk_cookie_manager.cpp: (EwkCookieManager::EwkCookieManager): (EwkCookieManager::~EwkCookieManager): (EwkCookieManager::setPersistentStorage): (EwkCookieManager::setHTTPAcceptPolicy): (EwkCookieManager::clearHostnameCookies): (EwkCookieManager::clearAllCookies): (EwkCookieManager::watchChanges): (EwkCookieManager::getHostNamesWithCookies): (EwkCookieManager::getHTTPAcceptPolicy): * UIProcess/API/efl/ewk_cookie_manager_private.h: (EwkCookieManager::create): (EwkCookieManager): 2012-12-05 No'am Rosenthal Coordinated Graphics: Enable support for setContentsToBackgroundColor https://bugs.webkit.org/show_bug.cgi?id=104128 Reviewed by Kenneth Rohde Christiansen. Enable setContentsToBackgroundColor in CoordinatedGraphicsLayer, and pass it through to the UI process. * Shared/WebLayerTreeInfo.h: (WebLayerInfo): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::setLayerState): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setContentsToBackgroundColor): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayer): 2012-12-05 Alexey Proskuryakov Should allow sandbox lookup of com.apple.tccd Reviewed by Beth Dakin and Dan Bernstein. * WebProcess/com.apple.WebProcess.sb.in: 2012-12-05 Alexey Proskuryakov [WK2] Would like to queue messages while NetworkProcess is launching https://bugs.webkit.org/show_bug.cgi?id=104143 Reviewed by Anders Carlsson. Factored out process launching and message sending code to a ChildProcessProxy class. Process closing and crashing code should be moved once we better understand common requirements for the processes. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: Added ChildProcessProxy files. * Shared/ChildProcessProxy.cpp: Added. (WebKit::ChildProcessProxy::ChildProcessProxy): (WebKit::ChildProcessProxy::~ChildProcessProxy): (WebKit::ChildProcessProxy::fromConnection): (WebKit::ChildProcessProxy::connect): (WebKit::ChildProcessProxy::terminate): (WebKit::ChildProcessProxy::sendMessage): (WebKit::ChildProcessProxy::isLaunching): (WebKit::ChildProcessProxy::didFinishLaunching): (WebKit::ChildProcessProxy::clearConnection): * Shared/ChildProcessProxy.h: Added. (WebKit::ChildProcessProxy::connection): (WebKit::ChildProcessProxy::isValid): (WebKit::ChildProcessProxy::canSendMessage): (WebKit::ChildProcessProxy::processIdentifier): (WebKit::ChildProcessProxy::send): (WebKit::ChildProcessProxy::sendSync): Moved code from WebProcessProxy. Every ChildProcessProxy is a connection client, but every one is a connection queue client, so that latter is passed as an argument. * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Network/NetworkProcessProxy.cpp: Removed unused syncMessageSendTimedOut(), thank you OVERRIDE. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::NetworkProcessProxy): (WebKit::NetworkProcessProxy::getLaunchOptions): (WebKit::NetworkProcessProxy::~NetworkProcessProxy): (WebKit::NetworkProcessProxy::getNetworkProcessConnection): (WebKit::NetworkProcessProxy::didFinishLaunching): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Network/mac/NetworkProcessProxyMac.mm: (WebKit::NetworkProcessProxy::setApplicationIsOccluded): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::WebProcessProxy): (WebKit::WebProcessProxy::~WebProcessProxy): (WebKit::WebProcessProxy::getLaunchOptions): (WebKit::WebProcessProxy::disconnect): (WebKit::WebProcessProxy::didFinishLaunching): Use shared code. * UIProcess/WebProcessProxy.h: (WebKit::WebProcessProxy::fromConnection): NetworkProcess inherits from conneciton client privately, so we need to do most of the work in ClientProcessProxy, and further upcast here. * UIProcess/efl/WebProcessProxyEfl.cpp: (WebKit::WebProcessProxy::platformGetLaunchOptions): * UIProcess/gtk/WebProcessProxyGtk.cpp: (WebKit::WebProcessProxy::platformGetLaunchOptions): * UIProcess/mac/WebProcessProxyMac.mm: (WebKit::WebProcessProxy::platformGetLaunchOptions): * UIProcess/qt/WebProcessProxyQt.cpp: (WebKit::WebProcessProxy::platformGetLaunchOptions): * UIProcess/win/WebProcessProxyWin.cpp: (WebKit::WebProcessProxy::platformGetLaunchOptions): Updated for renaming, platformConnect -> platformGetLaunchOptions(). 2012-12-05 Kiran Muppala WebKit2 child processes need to initialize timer coalescing policy on Mac. https://bugs.webkit.org/show_bug.cgi?id=103613 Reviewed by Mark Rowe. Set timer coalescing policy of WebKit2 child processes to that of visible applications until they can manage the policy based on UI process visibility. * Shared/mac/ChildProcessMac.mm: (WebKit::initializeTimerCoalescingPolicy): Set task_latency and task_throughput QOS tiers as appropriate for visible applications. (WebKit::ChildProcess::platformInitialize): Add call to initializeTimerCoalescingPolicy. 2012-12-05 Anders Carlsson Connection::waitForMessage shouldn't use the message ID https://bugs.webkit.org/show_bug.cgi?id=104157 Reviewed by Andreas Kling. Pass the message receiver name and message name to waitForMessage and use them for lookups instead of the message ID. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::createSyncMessageEncoder): (CoreIPC::Connection::waitForMessage): (CoreIPC::Connection::processIncomingMessage): * Platform/CoreIPC/Connection.h: (CoreIPC::Connection::waitForAndDispatchImmediately): 2012-12-05 Jae Hyun Park Coordinated Graphics: Move AreaAllocator and UpdateAtlas to CoordinatedGraphics https://bugs.webkit.org/show_bug.cgi?id=103864 Reviewed by Noam Rosenthal. AreaAllocator and UpdateAtlas are only used for Coordinated Graphics. So, these should be moved to CoordinatedGraphics to clarify the code. No new test, because no change of behavior. * CMakeLists.txt: * Target.pri: * WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/AreaAllocator.cpp. (WebKit): (WebKit::AreaAllocator::AreaAllocator): (WebKit::AreaAllocator::~AreaAllocator): (WebKit::AreaAllocator::expand): (WebKit::AreaAllocator::expandBy): (WebKit::AreaAllocator::release): (WebKit::AreaAllocator::overhead): (WebKit::AreaAllocator::roundAllocation): (WebKit::GeneralAreaAllocator::GeneralAreaAllocator): (WebKit::GeneralAreaAllocator::~GeneralAreaAllocator): (WebKit::GeneralAreaAllocator::freeNode): (WebKit::GeneralAreaAllocator::expand): (WebKit::fitsWithin): (WebKit::GeneralAreaAllocator::allocate): (WebKit::GeneralAreaAllocator::allocateFromNode): (WebKit::GeneralAreaAllocator::splitNode): (WebKit::GeneralAreaAllocator::updateLargestFree): (WebKit::GeneralAreaAllocator::release): (WebKit::GeneralAreaAllocator::overhead): * WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.h: Renamed from Source/WebKit2/WebProcess/WebPage/AreaAllocator.h. (WebCore::nextPowerOfTwo): (WebCore): (WebKit): (AreaAllocator): (WebKit::AreaAllocator::size): (WebKit::AreaAllocator::minimumAllocation): (WebKit::AreaAllocator::setMinimumAllocation): (WebKit::AreaAllocator::margin): (WebKit::AreaAllocator::setMargin): (GeneralAreaAllocator): (Node): * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/UpdateAtlas.cpp. (WebKit): (WebKit::UpdateAtlas::UpdateAtlas): (WebKit::UpdateAtlas::~UpdateAtlas): (WebKit::UpdateAtlas::buildLayoutIfNeeded): (WebKit::UpdateAtlas::didSwapBuffers): (WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer): * WebProcess/WebPage/CoordinatedGraphics/UpdateAtlas.h: Renamed from Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h. (WebCore): (WebKit): (UpdateAtlasClient): (UpdateAtlas): (WebKit::UpdateAtlas::size): (WebKit::UpdateAtlas::flags): (WebKit::UpdateAtlas::addTimeInactive): (WebKit::UpdateAtlas::isInactive): (WebKit::UpdateAtlas::isInUse): 2012-12-05 Michael Brüning Fix compilation for Qt5.0.0 stable branch. https://bugs.webkit.org/show_bug.cgi?id=103870 Reviewed by Simon Hausmann. QWindow::pos() and QQuickItem::pos() have been renamed to position(). Patch by Lars Knoll * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::setContentRectVisiblePositionAtScale): (WebKit::PageViewportControllerClientQt::setViewportPosition): 2012-12-05 Christophe Dumez [EFL][WK2] EWK2UnitTestBase.ewk_favicon_database_async_icon_get is crashing with new Ewk_Context https://bugs.webkit.org/show_bug.cgi?id=104110 Reviewed by Laszlo Gombos. Unregister the WKFaviconDatabase client in EwkFaviconDatabase destructor to avoid crashing if the callbacks get called after the EwkFaviconDatabase object has been destroyed (i.e. the parent EwkContext object was destroyed). * UIProcess/API/efl/ewk_favicon_database.cpp: (EwkFaviconDatabase::~EwkFaviconDatabase): 2012-12-05 Andras Becsi [Qt][WK2] REGRESSION(r135399): It made qmltests::DoubleTapToZoom::test_double_zoomInAndBack() API test fail https://bugs.webkit.org/show_bug.cgi?id=103889 Reviewed by Jocelyn Turcotte. The client should always be notified in PageViewportController::didChangeViewportAttributes about the changed attributes not only if the minimum scale changed. This ensures that these changes are propagated to QWebKitTest and the zoom stack of double-tap-to-zoom is reset correctly. Also increase precision of scale comparisons since the current value resulted in flakyness in scale related API tests. * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::didChangeViewportAttributes): (WebKit::PageViewportController::updateMinimumScaleToFit): 2012-12-05 Christophe Dumez [CoordinatedGraphics] Use unsigned integers for CoordinatedTile IDs https://bugs.webkit.org/show_bug.cgi?id=103816 Reviewed by Jocelyn Turcotte. Use unsigned integer for CoordinatedTile identifier type. CoordinatedTile was previously using signed integers for its identifier which is unsafe because the generated ID will overflow at some point and the C and C++ language standards say that overflow of a signed value is undefined behaviour. * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp: (WebKit::CoordinatedBackingStore::createTile): (WebKit::CoordinatedBackingStore::removeTile): (WebKit::CoordinatedBackingStore::removeAllTiles): (WebKit::CoordinatedBackingStore::updateTile): (WebKit::CoordinatedBackingStore::texture): (WebKit::CoordinatedBackingStore::paintToTextureMapper): (WebKit::CoordinatedBackingStore::commitTileOperations): * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h: (CoordinatedBackingStore): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp: (WebKit::LayerTreeCoordinatorProxy::createTileForLayer): (WebKit::LayerTreeCoordinatorProxy::updateTileForLayer): (WebKit::LayerTreeCoordinatorProxy::removeTileForLayer): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h: (LayerTreeCoordinatorProxy): * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.messages.in: * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::createTile): (WebKit::LayerTreeRenderer::removeTile): (WebKit::LayerTreeRenderer::updateTile): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: (LayerTreeRenderer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::createTile): (WebCore::CoordinatedGraphicsLayer::updateTile): (WebCore::CoordinatedGraphicsLayer::removeTile): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayerClient): (CoordinatedGraphicsLayer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp: (WebKit): (WebKit::CoordinatedTile::CoordinatedTile): (WebKit::CoordinatedTile::~CoordinatedTile): (WebKit::CoordinatedTile::updateBackBuffer): (WebKit::CoordinatedTile::isReadyToPaint): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.h: (CoordinatedTile): (CoordinatedTileClient): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::createTile): (WebKit::LayerTreeCoordinator::updateTile): (WebKit::LayerTreeCoordinator::removeTile): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h: (LayerTreeCoordinator): 2012-12-05 Yuni Jeong [EFL][WK2] Add APIs to get/set private browsing. https://bugs.webkit.org/show_bug.cgi?id=102052 Reviewed by Gyuyoung Kim. Private Browsing allows a user to browse the Internet without saving any information about which sites and pages a user has visited. * UIProcess/API/efl/ewk_settings.cpp: (ewk_settings_private_browsing_enabled_set): (ewk_settings_private_browsing_enabled_get): * UIProcess/API/efl/ewk_settings.h: * UIProcess/API/efl/tests/test_ewk2_settings.cpp: (TEST_F): 2012-12-05 Joaquim Rocha URL schemes registered as local, no access, display isolated and as CORS enabled are not registered again after a web process crash https://bugs.webkit.org/show_bug.cgi?id=104013 Reviewed by Darin Adler. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Iterate through the schemes stored in urlSchemesRegisteredAsLocal, urlSchemesRegisteredAsNoAccess, urlSchemesRegisteredAsDisplayIsolated and urlSchemesRegisteredAsCORSEnabled and call the respective (already existing) methods for registering them. 2012-12-04 Yuni Jeong [EFL][WK2] Add APIs to get/set default font size. https://bugs.webkit.org/show_bug.cgi?id=101921 Reviewed by Gyuyoung Kim. Add setting APIs for default font size and a unit test. * UIProcess/API/efl/ewk_settings.cpp: (ewk_settings_default_font_size_set): (ewk_settings_default_font_size_get): * UIProcess/API/efl/ewk_settings.h: * UIProcess/API/efl/tests/test_ewk2_settings.cpp: (TEST_F): 2012-12-04 Anders Carlsson Remove #ifs that are always true https://bugs.webkit.org/show_bug.cgi?id=104080 Reviewed by Andreas Kling. __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070 is always true, so remove all the #ifs. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::initializeSandbox): (WebKit::PluginProcess::platformInitialize): * Shared/DictionaryPopupInfo.cpp: (WebKit::DictionaryPopupInfo::encode): (WebKit::DictionaryPopupInfo::decode): * Shared/DictionaryPopupInfo.h: * Shared/mac/WebEventFactory.mm: (WebKit::phaseForEvent): (WebKit::momentumPhaseForEvent): * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm: (WebKit::initializeSandbox): (WebKit::SharedWorkerProcess::platformInitialize): * UIProcess/API/mac/PDFViewController.mm: (WebKit::PDFViewScrollView_scrollWheel): (WebKit::PDFViewController::pdfKitBundle): * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::didPerformDictionaryLookup): (WebKit::PageClientImpl::dismissDictionaryLookupPanel): (WebKit::PageClientImpl::recordAutocorrectionResponse): (WebKit::PageClientImpl::recommendedScrollbarStyleDidChange): * UIProcess/API/mac/WKView.mm: (-[WKView displayIfNeeded]): (-[WKView draggingUpdated:]): (-[WKView viewDidMoveToWindow]): (-[WKView _intrinsicDeviceScaleFactor]): (-[WKView _cacheWindowBottomCornerRect]): (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): (+[WKView hideWordDefinitionWindow]): * UIProcess/Launcher/mac/EnvironmentVariables.cpp: * UIProcess/Launcher/mac/EnvironmentVariables.h: (EnvironmentVariables): * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::addDYLDEnvironmentAdditions): (WebKit::createWebProcessServiceForWebKitDevelopment): (WebKit): (WebKit::tryPreexistingProcess): (WebKit::createProcess): (WebKit::ProcessLauncher::launchProcess): * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: (WebKit::PluginInfoStore::shouldUsePlugin): (WebKit::PluginInfoStore::reactivateInactivePlugin): * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::platformInitializePluginProcess): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didCommitLoadForFrame): (WebKit::WebPageProxy::pageDidScroll): (WebKit::WebPageProxy::processDidCrash): (WebKit::WebPageProxy::recordAutocorrectionResponse): (WebKit::WebPageProxy::handleAlternativeTextUIResult): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * UIProcess/mac/TextCheckerMac.mm: (WebKit::initializeState): (WebKit::TextChecker::getGuessesForWord): * UIProcess/mac/WKFullScreenWindowController.mm: (convertRectToScreen): * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): * WebKit2Prefix.h: * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::shouldEraseMarkersAfterChangeSelection): * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): * WebProcess/WebPage/WebPage.cpp: (WebKit): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::performDictionaryLookupAtLocation): (WebKit::WebPage::performDictionaryLookupForSelection): (WebKit::WebPage::performDictionaryLookupForRange): * WebProcess/mac/SecItemShimMethods.mm: * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::secItemResponse): * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): * WebProcessService/WebProcessServiceMain.mm: (main): * WebProcessServiceForWebKitDevelopment/WebProcessServiceForWebKitDevelopmentMain.mm: (WebProcessServiceForWebKitDevelopmentEventHandler): (main): 2012-12-04 Anders Carlsson Remove more Snow Leopard only code https://bugs.webkit.org/show_bug.cgi?id=104079 Reviewed by Andreas Kling. All of the SecKeychainItem code was Snow Leopard only. * Shared/mac/SecKeychainItemRequestData.cpp: Removed. * Shared/mac/SecKeychainItemRequestData.h: Removed. * Shared/mac/SecKeychainItemResponseData.cpp: Removed. * Shared/mac/SecKeychainItemResponseData.h: Removed. * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.h: * UIProcess/Launcher/mac/DynamicLinkerEnvironmentExtractor.mm: * UIProcess/WebProcessProxy.h: (WebProcessProxy): * UIProcess/WebProcessProxy.messages.in: * UIProcess/mac/WebProcessProxyMac.mm: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: * WebProcess/mac/KeychainItemShimMethods.h: Removed. * WebProcess/mac/KeychainItemShimMethods.mm: Removed. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::initializeShim): * WebProcess/mac/WebProcessShim.mm: 2012-12-04 Anders Carlsson Remove PageClient::didChangeScrollbarsForMainFrame https://bugs.webkit.org/show_bug.cgi?id=104077 Reviewed by Andreas Kling. The aforementioned function was only used to implement some Snow Leopard specific behavior that we no longer support. * UIProcess/API/gtk/PageClientImpl.cpp: * UIProcess/API/gtk/PageClientImpl.h: (PageClientImpl): * UIProcess/API/mac/PageClientImpl.h: (PageClientImpl): * UIProcess/API/mac/PageClientImpl.mm: * UIProcess/API/mac/WKView.mm: (-[WKView viewWillMoveToWindow:]): * UIProcess/API/mac/WKViewInternal.h: * UIProcess/API/qt/raw/qrawwebview_p_p.h: * UIProcess/PageClient.h: (PageClient): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didChangeScrollbarsForMainFrame): * UIProcess/efl/PageClientBase.cpp: (WebKit): * UIProcess/efl/PageClientBase.h: (PageClientBase): * UIProcess/qt/QtPageClient.h: * UIProcess/win/WebView.cpp: * UIProcess/win/WebView.h: (WebView): 2012-12-04 Andy Estes [WebKit2] WKWebProcessPlugInBrowserContextControllers should be treated as type WKBrowsingContextControllerType for encoding purposes https://bugs.webkit.org/show_bug.cgi?id=104063 Reviewed by Sam Weinig. Objective-C message graphs can include browsing context controller objects, which are decoded as WKWebProcessPlugInBrowserContextControllers in the web process plug-in and as WKBrowsingContextControllers in the UI process. Ensure we correctly encode WKWebProcessPlugInBrowserContextControllers by treating them as type WKBrowsingContextControllerType. * Shared/mac/ObjCObjectGraphCoders.mm: (WebKit::typeFromObject): 2012-12-04 Simon Fraser Show a mini visualizer for the tile cache tiles https://bugs.webkit.org/show_bug.cgi?id=104053 Reviewed by Beth Dakin. Plumb through a preference that controls the visibility of a tiled scrolling indicator, and parent that layer in the TiledCoreAnimationDrawingArea. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetTiledScrollingIndicatorVisible): (WKPreferencesGetTiledScrollingIndicatorVisible): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): (WebKit::TiledCoreAnimationDrawingArea::mainFrameTiledBacking): (WebKit::TiledCoreAnimationDrawingArea::updateDebugInfoLayer): 2012-12-04 Anders Carlsson Set the visible process name before entering the sandbox https://bugs.webkit.org/show_bug.cgi?id=104030 Reviewed by Sam Weinig. Pass the UI process name along as a process initialization parameter so we can set it before entering the sandbox. Remove the UI process name from WebProcessCreationParameters. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: (WebProcessCreationParameters): * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToWebProcessServiceForWebKitDevelopment): (WebKit::createWebProcessService): (WebKit::createProcess): * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): * WebProcess/mac/WebProcessInitialization.h: (WebProcessInitializationParameters): * WebProcess/mac/WebProcessInitialization.mm: (WebKit::initializeWebProcess): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): * WebProcess/mac/WebProcessServiceEntryPoints.h: * WebProcess/mac/WebProcessServiceEntryPoints.mm: (WebKit::WebProcessServiceEventHandler): (initializeWebProcessForWebProcessServiceForWebKitDevelopment): * WebProcessServiceForWebKitDevelopment/WebProcessServiceForWebKitDevelopmentMain.mm: (WebProcessServiceForWebKitDevelopmentEventHandler): 2012-12-03 Alexey Proskuryakov [WK2] Track private browsing session explicitly https://bugs.webkit.org/show_bug.cgi?id=103953 Reviewed by Jessie Berlin. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): Fixed a confusing ifdef - this code is inside PLATFORM(WIN), so PLATFORM(MAC) makes no sense. * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPrivateBrowsingEnabled): This is the only place in WK2 where we can learn that private browsing got disabled - no other functions are called when there are no pages open. * UIProcess/WebContext.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::willStartUsingPrivateBrowsing): (WebKit::WebContext::willStopUsingPrivateBrowsing): Count the number of API calls. We only implement a single shared private browsing session, not one per page group as API implies. When private browsing gets disabled, we want to destroy its session. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Ensure a private browsing session if the current page needs it. * WebProcess/WebProcess.h: * WebProcess/WebProcess.messages.in: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::ensurePrivateBrowsingSession): (WebKit::WebProcess::destroyPrivateBrowsingSession): Call through to WebFrameNetworkingContext. 2012-12-04 Yuni Jeong [EFL][WK2] Add APIs to toggle plug-ins support. https://bugs.webkit.org/show_bug.cgi?id=101920 Reviewed by Gyuyoung Kim. Add setting APIs to toggle plug-ins support and add corresponding API tests. * UIProcess/API/efl/ewk_settings.cpp: (ewk_settings_plugins_enabled_set): (ewk_settings_plugins_enabled_get): * UIProcess/API/efl/ewk_settings.h: * UIProcess/API/efl/tests/test_ewk2_settings.cpp: (TEST_F): 2012-12-04 Andras Becsi [Qt][WK2] Do not override previously set flags of QQuickWebView when enabling drag&drop https://bugs.webkit.org/show_bug.cgi?id=103901 Reviewed by Jocelyn Turcotte. Setting the specific flag instead of resetting all the flags when enabling QQuickItem::ItemAcceptsDrops. This fixes clipping of the contents of QQuickWebView. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): 2012-12-04 Carlos Garcia Campos [GTK] Avoid unnecessary heap allocations during drag and drop operations https://bugs.webkit.org/show_bug.cgi?id=87938 Reviewed by Martin Robinson. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (webkitWebViewBaseDragDataReceived): Create DragData for the given DataObjectGtk in the stack. (webkitWebViewBaseDragMotion): Ditto. (webkitWebViewBaseDragDrop): Ditto. 2012-12-04 Jaehun Lim [EFL][WK2] Use consistent class names inside Ewk classes https://bugs.webkit.org/show_bug.cgi?id=103015 Reviewed by Gyuyoung Kim. WebKit EFL doesn't use '_' in class names. This patch removes the remaining uses of '_' inside Ewk classes. * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::EwkViewImpl): (EwkViewImpl::~EwkViewImpl): (EwkViewImpl::informIconChange): (EwkViewImpl::requestColorPicker): (EwkViewImpl::requestPopupMenu): * UIProcess/API/efl/ewk_back_forward_list.cpp: (EwkBackForwardList::nextItem): (EwkBackForwardList::previousItem): (EwkBackForwardList::currentItem): (EwkBackForwardList::itemAt): (EwkBackForwardList::getFromCacheOrCreate): (EwkBackForwardList::createEinaList): * UIProcess/API/efl/ewk_back_forward_list_private.h: (EwkBackForwardList): * UIProcess/API/efl/ewk_context.cpp: (EwkContext::EwkContext): (EwkContext::cookieManager): (EwkContext::databaseManager): (EwkContext::ensureFaviconDatabase): (EwkContext::faviconDatabase): (EwkContext::storageManager): * UIProcess/API/efl/ewk_context_private.h: (EwkContext): * UIProcess/API/efl/ewk_cookie_manager.cpp: (EwkCookieManager::cookiesDidChange): (getAcceptPolicyCallback): (getHostnamesWithCookiesCallback): * UIProcess/API/efl/ewk_cookie_manager_private.h: (EwkCookieManager::create): * UIProcess/API/efl/ewk_database_manager.cpp: (EwkDatabaseManager::createOriginList): (getDatabaseOriginsCallback): * UIProcess/API/efl/ewk_database_manager_private.h: (EwkDatabaseManager): * UIProcess/API/efl/ewk_favicon_database.cpp: (EwkFaviconDatabase::didChangeIconForPageURL): (EwkFaviconDatabase::iconDataReadyForPageURL): * UIProcess/API/efl/ewk_popup_menu.cpp: (EwkPopupMenu::EwkPopupMenu): (EwkPopupMenu::~EwkPopupMenu): * UIProcess/API/efl/ewk_storage_manager.cpp: (EwkStorageManager::createOriginList): (getStorageOriginsCallback): * UIProcess/API/efl/ewk_storage_manager_private.h: (EwkStorageManager): 2012-12-03 Huang Dongsung Coordinated Graphics: Reorder messages to LayerTreeCoordinatorProxy https://bugs.webkit.org/show_bug.cgi?id=103843 Reviewed by Noam Rosenthal. Remove updateViewport() in LayerTreeCoordinatorProxy::setRootCompositingLayer() because LayerTreeCoordinatorProxy::didRenderFrame() is always called after setting the root layer. There is no behaviour changes because setting the root layer isn't actually applied to TextureMapperLayer until DidRenderFrame message is received. This is in preparation for refactoring TextureMapper to work in an actor model (http://webkit.org/b/103854). * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp: (WebKit::LayerTreeCoordinatorProxy::setRootCompositingLayer): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::flushPendingLayerChanges): 2012-12-03 Anders Carlsson Make it easier to add more web process initialization parameters https://bugs.webkit.org/show_bug.cgi?id=103942 Reviewed by Andreas Kling. Add a WebProcessInitializationParameters struct to make it easier to add more initialization parameters in the future. Also, fix naming and spelling errors. * WebProcess/mac/WebProcessInitialization.h: (WebProcessInitializationParameters): (WebKit): * WebProcess/mac/WebProcessInitialization.mm: (WebKit::initializeWebProcess): * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMain): * WebProcess/mac/WebProcessServiceEntryPoints.h: * WebProcess/mac/WebProcessServiceEntryPoints.mm: (WebKit::WebProcessServiceEventHandler): (webProcessServiceMain): (initializeWebProcessForWebProcessServiceForWebKitDevelopment): * WebProcessService/WebProcessServiceMain.mm: (main): * WebProcessServiceForWebKitDevelopment/WebProcessServiceForWebKitDevelopmentMain.mm: (WebProcessServiceForWebKitDevelopmentEventHandler): 2012-12-03 Tim Horton PDFPlugin: and PDFs affect their parent frame's page scale https://bugs.webkit.org/show_bug.cgi?id=103286 Reviewed by Dan Bernstein. Style fixes after http://trac.webkit.org/changeset/136316. * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::isFullFramePlugin): 2012-12-03 Alexis Menard [Mac] Enable CSS3 background-position offset by default. https://bugs.webkit.org/show_bug.cgi?id=103905 Reviewed by Simon Fraser. Turn the flag on by default. * Configurations/FeatureDefines.xcconfig: 2012-12-03 Ryuan Choi [EFL][WK2] Add contents,size,changed signal to the ewk_view API https://bugs.webkit.org/show_bug.cgi?id=103094 Reviewed by Kenneth Rohde Christiansen. This patch emits signal to let applications know contents size. Applications can use this signal to give some additional behavior such as minimap, external scroll for quick movement. * UIProcess/API/efl/EwkViewCallbacks.h: Added contents,size,changed signal. * UIProcess/API/efl/EwkViewImpl.cpp: Removed dead code. * UIProcess/API/efl/EwkViewImpl.h: Ditto. (EwkViewImpl): * UIProcess/API/efl/ewk_view.h: Added test case. * UIProcess/API/efl/tests/test_ewk2_view.cpp: (onContentsSizeChanged): (TEST_F): * UIProcess/efl/PageClientDefaultImpl.cpp: Emitted contents,size,changed signal. (WebKit::PageClientDefaultImpl::didChangeContentsSize): * UIProcess/efl/PageClientLegacyImpl.cpp: Ditto. (WebKit::PageClientLegacyImpl::didChangeContentsSize): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::contentsSizeChanged): Sended DidChangeContentsSize message although TILED_BACKINGSTORE is disabled. 2012-12-03 Csaba Osztrogonác Unreviewed fix after r136292 to make GIT-SVN repositories happy. * win/WebKit2ExportGenerator.vcproj: Added property svn:eol-style. * win/WebKit2ExportGeneratorCommon.vsprops: Added property svn:eol-style. * win/WebKit2ExportGeneratorDebug.vsprops: Added property svn:eol-style. * win/WebKit2ExportGeneratorDebugAll.vsprops: Added property svn:eol-style. * win/WebKit2ExportGeneratorDebugCairoCFLite.vsprops: Added property svn:eol-style. * win/WebKit2ExportGeneratorPostBuild.cmd: Added property svn:eol-style. * win/WebKit2ExportGeneratorPreBuild.cmd: Added property svn:eol-style. * win/WebKit2ExportGeneratorProduction.vsprops: Added property svn:eol-style. * win/WebKit2ExportGeneratorRelease.vsprops: Added property svn:eol-style. * win/WebKit2ExportGeneratorReleaseCairoCFLite.vsprops: Added property svn:eol-style. 2012-12-03 Michael Brüning [Qt][WK2] New resize tests fail https://bugs.webkit.org/show_bug.cgi?id=103875 Reviewed by Jocelyn Turcotte. Removes reference to unused viewportSpy, adds clearing the sizeSpy to the init method instead. * UIProcess/API/qt/tests/qmltests/WebView/tst_resize.qml: 2012-12-03 Joaquim Rocha [GTK] Custom URI schemes stop working on Epiphany using WebKit2 after killing the web process https://bugs.webkit.org/show_bug.cgi?id=103729 Reviewed by Carlos Garcia Campos. When a URI scheme is registered and the WebProcess is killed, those schemes would not work anymore after the process is relaunched. This was observed in Epiphany and possibly affects any port that uses libsoup. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): Encode the registered URI schemes. (WebKit::WebProcessCreationParameters::decode): Decode the registered URI schemes. * Shared/WebProcessCreationParameters.h: Add the urlSchemesRegistered Vector to hold the registered URI schemes. (WebProcessCreationParameters): * UIProcess/efl/WebContextEfl.cpp: (WebKit::WebContext::platformInitializeWebProcess): Assign the parameters.urlSchemesRegistered from the URI schemes registered in the WebSoupRequestManagerProxy and removed the notImplemented() call. * UIProcess/gtk/WebContextGtk.cpp: (WebKit::WebContext::platformInitializeWebProcess): Assign the parameters.urlSchemesRegistered from the URI schemes registered in the WebSoupRequestManagerProxy. * UIProcess/soup/WebSoupRequestManagerProxy.cpp: (WebKit::WebSoupRequestManagerProxy::registerURIScheme): Add the given scheme to the m_registeredURISchemes Vector. * UIProcess/soup/WebSoupRequestManagerProxy.h: (WebKit::WebSoupRequestManagerProxy::registeredURISchemes): Return the m_registeredURISchemes. (WebSoupRequestManagerProxy): Define the m_registeredURISchemes to hold the schemes that are registered. * WebProcess/soup/WebProcessSoup.cpp: (WebKit::WebProcess::platformInitializeWebProcess): Call m_soupRequestManager.registerURIScheme for each URI scheme found in the parameters. * WebProcess/soup/WebSoupRequestManager.h: Make registerURIScheme public. (WebSoupRequestManager): 2012-12-03 Mikhail Pozdnyakov CSS Device Adaptation: window.innerWidth returns wrong value if CSS viewport descriptors are applied https://bugs.webkit.org/show_bug.cgi?id=103737 Reviewed by Kenneth Rohde Christiansen. ViewportStyleResolver used frame view visibleContentRect size as initial viewport size. This however caused a problem when page enabled/disabled CSS stylesheets, having viewport descriptors. Viewport descriptors from new stylesheet were applied to the visibleContentRect affected already by the viewport descriptors from the previous stylesheet. New 'initialViewportSize' property (http://dev.w3.org/csswg/css-device-adapt/#initial-viewport) was added to frame view so that viewport descriptors can always be applied to the reliable viewport size. Both newly added 'initialViewportSize' property and 'fixedVisibleContentRect' property are assigned appropriately now in WebPage::sendViewportAttributesChanged(). * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::sendViewportAttributesChanged): 2012-12-02 Huang Dongsung Coordinated Graphics: Reorder messages to LayerTreeCoordinatorProxy https://bugs.webkit.org/show_bug.cgi?id=103843 Reviewed by Noam Rosenthal. Send messages to the UI process by the tree order. This is in preparation for refactoring TextureMapper to work in an actor model (http://webkit.org/b/103854). * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::flushPendingLayerChanges): 2012-12-02 Ryuan Choi [EFL][WK2] Update comments of header files which mentions deprecated API https://bugs.webkit.org/show_bug.cgi?id=103718 Reviewed by Gyuyoung Kim. Updated comments which mentions XXX_unref() which was replaced to ewk_object_unref() * UIProcess/API/efl/ewk_context.h: * UIProcess/API/efl/ewk_database_manager.h: * UIProcess/API/efl/ewk_storage_manager.h: 2012-12-02 Huang Dongsung REGRESSION(r134376): ASSERT(!m_mainBackingStore) hits in CoordinatedGraphicsLayer::syncImageBacking(). https://bugs.webkit.org/show_bug.cgi?id=103845 Reviewed by Noam Rosenthal. flushCompositingStateForThisLayerOnly() calls syncImageBacking() before calling updateContentBuffers(). It means there can be the moment that CoordinatedGraphicsLayer has m_mainBackingStore although shouldHaveBackingStore() return false. This patch changes syncImageBacking() to check shouldHaveBackingStore() instead of m_mainBackingStore. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::syncImageBacking): (WebCore::CoordinatedGraphicsLayer::adjustContentsScale): (WebCore::CoordinatedGraphicsLayer::updateContentBuffers): (WebCore::CoordinatedGraphicsLayer::shouldHaveBackingStore): (WebCore): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayer): 2012-12-02 Seokju Kwon Rename WebSocketServerGtk.cpp as WebSocketServerSoup.cpp https://bugs.webkit.org/show_bug.cgi?id=103743 Reviewed by Gustavo Noronha Silva. EFL port is using a GSocket based implementation as well. WebSocketServerSoup can be used together. * GNUmakefile.list.am: * UIProcess/InspectorServer/soup/WebSocketServerSoup.cpp: Renamed from Source/WebKit2/UIProcess/InspectorServer/gtk/WebSocketServerGtk.cpp. (WebKit): (WebKit::connectionCallback): (WebKit::WebSocketServer::platformInitialize): (WebKit::WebSocketServer::platformListen): (WebKit::WebSocketServer::platformClose): 2012-12-02 Christophe Dumez [CoordinatedGraphics] LayerTreeRenderer::removeImageBacking() calls HashMap::find() twice https://bugs.webkit.org/show_bug.cgi?id=103815 Reviewed by Noam Rosenthal. Call HashMap::take() in LayerTreeRenderer::removeImageBacking() to avoid calling HashMap::find() twice. find() was called once explicitly to get an iterator and a second time to remove the value from the value from the HashMap. We could have used remove(iterator) instead of remove(key) but using take() results in simpler code. * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::removeImageBacking): 2012-12-02 Huang Dongsung Coordinated Graphics: Images disappear randomly https://bugs.webkit.org/show_bug.cgi?id=103522 Reviewed by Kenneth Rohde Christiansen. Currently, we delete layers before synchronizing layer states of layers. It causes flash. This patch deletes layers after the synchronization. In addiation, this patch removes updateViewport() in LayerTreeCoordinatorProxy::deleteCompositingLayer() because LayerTreeCoordinatorProxy::didRenderFrame() is always called after deleting layers. * UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp: (WebKit::LayerTreeCoordinatorProxy::deleteCompositingLayer): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::flushPendingLayerChanges): 2012-12-02 Brent Fulgham [Windows, WinCairo] Revise export definitions to match mac. https://bugs.webkit.org/show_bug.cgi?id=103687 Reviewed by Tim Horton. Update export definition files to use the same feature exclusion macros as other generated ports. * win/WebKit2.def.in: Added additional build macro guards. 2012-12-02 No'am Rosenthal [CoordinatedGraphics] Crash in TextureMapperLayer::setBackingStore() https://bugs.webkit.org/show_bug.cgi?id=103714 Reviewed by Kenneth Rohde Christiansen. Remove a layer from the m_pendingSyncBackingStores map when it is deleted. * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::deleteLayer): 2012-12-02 Yael Aharon [EFL][WK2] MiniBrowser should have a legacy mode https://bugs.webkit.org/show_bug.cgi?id=103679 Reviewed by Kenneth Rohde Christiansen. We need a way to create a web view in legacy mode, while still using the default context. WKViewCreate creates a legacy view, so change it to create a default context if a context was not passed. * UIProcess/API/efl/ewk_view.cpp: (ewk_view_base_add): 2012-12-01 Tim Horton PDFPlugin: Support PDF form editing in