2013-04-24 Claudio Saavedra Build break after r149004 https://bugs.webkit.org/show_bug.cgi?id=115091 Reviewed by Csaba Osztrogonác. * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::pageBackgroundTransparencyChanged): (WebKit): Add dummy method for new virtual method. * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: (LayerTreeHostGtk): Ditto. 2013-04-23 Ryuan Choi [EFL][WK2] Build break after r149004 https://bugs.webkit.org/show_bug.cgi?id=115066 Reviewed by Tim Horton. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::pageBackgroundTransparencyChanged): Added dummy method for new virtual method. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (CoordinatedLayerTreeHost): Ditto. 2013-04-23 Simon Fraser Turn off tiled drawing in the Web Inspector https://bugs.webkit.org/show_bug.cgi?id=115064 Reviewed by Tim Horton. We get little benefit from making the Web Inspector use tiled drawing; it doesn't scroll the main frame, so doesn't benefit from the ScrollingCoordinator. Not using tiled drawing also means that we won't make compositing layers for position: -webkit-sticky, which avoids a number of issues with compositing layer proliferation in the inspector. Also turn off accelerated drawing, since that pref will force a single compositing layer. * UIProcess/WebInspectorProxy.cpp: (WebKit::createInspectorPageGroup): * UIProcess/mac/WebInspectorProxyMac.mm: 2013-04-23 Simon Fraser When the web page transparency changes, DrawingAreaImpl needs to know about it https://bugs.webkit.org/show_bug.cgi?id=115062 Reviewed by Tim Horton. The non-composited contents layer owned by LayerTreeHostMac needs to be marked as opaque or not depending on whether the WebPage draws a background (or transparent background). It computed this at creation, but did not dynamically update the state. Fix it so it does. This fixes cases of garbage pixels in the Web Inspector toolbar area in some configurations. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::pageBackgroundTransparencyChanged): * WebProcess/WebPage/DrawingAreaImpl.h: (DrawingAreaImpl): * WebProcess/WebPage/LayerTreeHost.h: * WebProcess/WebPage/mac/LayerTreeHostMac.h: * WebProcess/WebPage/mac/LayerTreeHostMac.mm: (WebKit::LayerTreeHostMac::pageBackgroundTransparencyChanged): 2013-04-23 Anders Carlsson REGRESSION(r148922): Crash opening web archives or loading web pages https://bugs.webkit.org/show_bug.cgi?id=115061 Reviewed by Sam Weinig. * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): Calling ResourceLoader::didReceiveResponse can cause the WebResourceLoader object to go away, so protect it here and guard against a null core loader. 2013-04-23 Tim Horton Web process crashes at WebPage::determinePrimarySnapshottedPlugInTimerFired + 8 https://bugs.webkit.org/show_bug.cgi?id=115056 Reviewed by Simon Fraser. Stop the primary plugin detection timer if the WebPage is torn down. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): 2013-04-23 Carlos Garcia Campos [GTK] Add webkit_uri_request_get_http_headers to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=112160 Reviewed by Andreas Kling. It allows to load requests with custom headers, or to update the headers of a request before being sent to the server in the WebKitWebPage::send-request callback. * UIProcess/API/gtk/WebKitURIRequest.cpp: (_WebKitURIRequestPrivate): Add SoupMessageHeaders. (webkit_uri_request_get_http_headers): Return the HTTP headers of the request as a SoupMessageHeaders if the request is HTTP. A new SoupMessageHeaders is created on demand using the existing headers of the request. (webkitURIRequestGetResourceRequest): Instead of returning a const reference of the internal ResourceRequest, set a request passed as a reference and update its HTTP headers using the SoupMessageHeaders if present. * UIProcess/API/gtk/WebKitURIRequest.h: * UIProcess/API/gtk/WebKitURIRequestPrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_load_request): Update to the new webkitURIRequestGetResourceRequest API. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add webkit_uri_request_get_http_headers symbol. * UIProcess/API/gtk/tests/TestLoaderClient.cpp: (testWebPageURI): (testURIRequestHTTPHeaders): (serverCallback): (beforeAll): * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (willSendRequestForFrame): Update to the new webkitURIRequestGetResourceRequest API. 2013-04-23 Mikhail Pozdnyakov [WK2] Make EFL WKView API shareable between ports https://bugs.webkit.org/show_bug.cgi?id=114734 Reviewed by Anders Carlsson. EFL-independent part of WKView API (and its implementation) is now shareable between ports that use Coordinated Graphics and put to CoordinatedGraphics folders. * PlatformEfl.cmake: * UIProcess/API/C/CoordinatedGraphics/WKView.cpp: Renamed from Source/WebKit2/UIProcess/API/C/efl/WKView.cpp. (WKViewCreate): (WKViewInitialize): (WKViewGetSize): (WKViewSetSize): (WKViewSetViewClient): (WKViewIsFocused): (WKViewSetIsFocused): (WKViewIsVisible): (WKViewSetIsVisible): (WKViewGetContentScaleFactor): (WKViewSetContentScaleFactor): (WKViewGetContentPosition): (WKViewSetContentPosition): (WKViewSetUserViewportTranslation): (WKViewUserViewportToContents): (WKViewPaintToCurrentGLContext): (WKViewGetPage): (WKViewSetDrawsBackground): (WKViewGetDrawsBackground): (WKViewSetDrawsTransparentBackground): (WKViewGetDrawsTransparentBackground): (WKViewSetThemePath): (WKViewSuspendActiveDOMObjectsAndAnimations): (WKViewResumeActiveDOMObjectsAndAnimations): (WKViewSetShowsAsSource): (WKViewGetShowsAsSource): (WKViewExitFullScreen): * UIProcess/API/C/CoordinatedGraphics/WKView.h: Renamed from Source/WebKit2/UIProcess/API/C/efl/WKView.h. * UIProcess/API/C/efl/WKViewEfl.cpp: Added. (WKViewPaintToCairoSurface): (WKViewCreateSnapshot): * UIProcess/API/C/efl/WKViewEfl.h: Added. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): * UIProcess/API/efl/EwkView.h: * UIProcess/CoordinatedGraphics/WebView.cpp: Renamed from Source/WebKit2/UIProcess/efl/WebView.cpp. (WebKit): (WebKit::WebView::WebView): (WebKit::WebView::~WebView): (WebKit::WebView::initialize): (WebKit::WebView::setSize): (WebKit::WebView::setFocused): (WebKit::WebView::setVisible): (WebKit::WebView::setUserViewportTranslation): (WebKit::WebView::userViewportToContents): (WebKit::WebView::paintToCurrentGLContext): (WebKit::WebView::setThemePath): (WebKit::WebView::setDrawsBackground): (WebKit::WebView::drawsBackground): (WebKit::WebView::setDrawsTransparentBackground): (WebKit::WebView::drawsTransparentBackground): (WebKit::WebView::suspendActiveDOMObjectsAndAnimations): (WebKit::WebView::resumeActiveDOMObjectsAndAnimations): (WebKit::WebView::setShowsAsSource): (WebKit::WebView::showsAsSource): (WebKit::WebView::exitFullScreen): (WebKit::WebView::initializeClient): (WebKit::WebView::didChangeContentsSize): (WebKit::WebView::transformFromScene): (WebKit::WebView::transformToScene): (WebKit::WebView::coordinatedGraphicsScene): (WebKit::WebView::updateViewportSize): (WebKit::WebView::dipSize): (WebKit::WebView::createDrawingAreaProxy): (WebKit::WebView::setViewNeedsDisplay): (WebKit::WebView::displayView): (WebKit::WebView::scrollView): (WebKit::WebView::viewSize): (WebKit::WebView::isViewWindowActive): (WebKit::WebView::isViewFocused): (WebKit::WebView::isViewVisible): (WebKit::WebView::isViewInWindow): (WebKit::WebView::processDidCrash): (WebKit::WebView::didRelaunchProcess): (WebKit::WebView::pageClosed): (WebKit::WebView::toolTipChanged): (WebKit::WebView::setCursor): (WebKit::WebView::setCursorHiddenUntilMouseMoves): (WebKit::WebView::registerEditCommand): (WebKit::WebView::clearAllEditCommands): (WebKit::WebView::canUndoRedo): (WebKit::WebView::executeUndoRedo): (WebKit::WebView::screenToWindow): (WebKit::WebView::windowToScreen): (WebKit::WebView::doneWithKeyEvent): (WebKit::WebView::doneWithTouchEvent): (WebKit::WebView::createPopupMenuProxy): (WebKit::WebView::createContextMenuProxy): (WebKit::WebView::createColorChooserProxy): (WebKit::WebView::setFindIndicator): (WebKit::WebView::enterAcceleratedCompositingMode): (WebKit::WebView::exitAcceleratedCompositingMode): (WebKit::WebView::updateAcceleratedCompositingMode): (WebKit::WebView::didCommitLoadForMainFrame): (WebKit::WebView::didFinishLoadingDataForCustomRepresentation): (WebKit::WebView::customRepresentationZoomFactor): (WebKit::WebView::setCustomRepresentationZoomFactor): (WebKit::WebView::flashBackingStoreUpdates): (WebKit::WebView::findStringInCustomRepresentation): (WebKit::WebView::countStringMatchesInCustomRepresentation): (WebKit::WebView::updateTextInputState): (WebKit::WebView::handleDownloadRequest): (WebKit::WebView::convertToDeviceSpace): (WebKit::WebView::convertToUserSpace): (WebKit::WebView::didChangeViewportProperties): (WebKit::WebView::pageDidRequestScroll): (WebKit::WebView::didRenderFrame): (WebKit::WebView::pageTransitionViewportReady): * UIProcess/CoordinatedGraphics/WebView.h: Renamed from Source/WebKit2/UIProcess/efl/WebView.h. (WebCore): (WebKit): (WebView): (WebKit::WebView::size): (WebKit::WebView::isFocused): (WebKit::WebView::isVisible): (WebKit::WebView::setContentScaleFactor): (WebKit::WebView::contentScaleFactor): (WebKit::WebView::setContentPosition): (WebKit::WebView::contentPosition): (WebKit::WebView::pageRef): (WebKit::WebView::page): * UIProcess/CoordinatedGraphics/WebViewClient.cpp: Renamed from Source/WebKit2/UIProcess/efl/WebViewClient.cpp. (WebKit): (WebKit::WebViewClient::viewNeedsDisplay): (WebKit::WebViewClient::didChangeContentsSize): (WebKit::WebViewClient::webProcessCrashed): (WebKit::WebViewClient::webProcessDidRelaunch): (WebKit::WebViewClient::didChangeContentsPosition): (WebKit::WebViewClient::didRenderFrame): (WebKit::WebViewClient::didCompletePageTransition): (WebKit::WebViewClient::didChangeViewportAttributes): (WebKit::WebViewClient::didChangeTooltip): * UIProcess/CoordinatedGraphics/WebViewClient.h: Renamed from Source/WebKit2/UIProcess/efl/WebViewClient.h. (WebCore): (WebKit): * UIProcess/efl/WebViewEfl.cpp: Added. (WebKit): (WebKit::WebView::create): (WebKit::WebViewEfl::WebViewEfl): (WebKit::WebViewEfl::setEwkView): (WebKit::WebViewEfl::paintToCairoSurface): (WebKit::WebViewEfl::createPopupMenuProxy): (WebKit::WebViewEfl::createContextMenuProxy): (WebKit::WebViewEfl::setCursor): (WebKit::WebViewEfl::updateTextInputState): (WebKit::WebViewEfl::handleDownloadRequest): * UIProcess/efl/WebViewEfl.h: Added. (WebKit): (WebViewEfl): (WebKit::WebViewEfl::ewkView): 2013-04-23 Antoine Quint Initial advance of text runs should be taken into account https://bugs.webkit.org/show_bug.cgi?id=114949 Reviewed by Darin Adler. Adding support for new method CTRunGetInitialAdvance in WebKitSystemInterface. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2013-04-23 Noam Rosenthal [Coordinated Graphics] Remove the lockAnimations code path https://bugs.webkit.org/show_bug.cgi?id=114899 Remove locking/unlocking animations and checks for the lock state. The animation locking has been tested to create not-so-smooth animations, while the use case where the composited animations run out of sync from the non-composited animations is very rare and unnoticeable. Reviewed by Benjamin Poulain. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges): (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 2013-04-22 Sam Weinig Need WebKit SPI to detect whether a page contains form controls https://bugs.webkit.org/show_bug.cgi?id=115003 Reviewed by Beth Dakin. * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: (WKBundleFrameContainsAnyFormControls): * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::containsAnyFormControls): * WebProcess/WebPage/WebFrame.h: 2013-04-22 Alexey Proskuryakov [Mac] REGRESSION (r142806): "Just Leaking" Console errors on launch https://bugs.webkit.org/show_bug.cgi?id=115002 Reviewed by Sam Weinig. * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm: (WebKit::BootstrapMain): Added an autorelease pool for code that uses Objective-C. 2013-04-22 Anders Carlsson Web process should decide when to continue main resource loads https://bugs.webkit.org/show_bug.cgi?id=114995 Reviewed by Sam Weinig. Main resource loads can be converted to downloads, so we need the ability to let the web process decide when to continue loading after a response has been received. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didReceiveResponseAsync): For non-main resources, just call continueDidReceiveResponse directly; there's no need to ping-pong to the web process in that case. (WebKit::NetworkResourceLoader::continueDidReceiveResponse): Just call ResourceHandle::continueDidReceiveResponse. * NetworkProcess/NetworkResourceLoader.messages.in: Add ContinueDidReceiveResponse message. * NetworkProcess/SchedulableLoader.cpp: (WebKit::SchedulableLoader::SchedulableLoader): Initialize m_isLoadingMainResource. * NetworkProcess/SchedulableLoader.h: (WebKit::SchedulableLoader::isLoadingMainResource): Add getter. (SchedulableLoader): Move m_shouldClearReferrerOnHTTPSToHTTPRedirect next to the rest of the booleans. * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): (WebKit::NetworkResourceLoadParameters::encode): (WebKit::NetworkResourceLoadParameters::decode): * Shared/Network/NetworkResourceLoadParameters.h: (NetworkResourceLoadParameters): Add isMainResource flag. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad): Pass the cached resource to scheduleLoad. (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad): Pass null to scheduleLoad. (WebKit::WebResourceLoadScheduler::scheduleLoad): Initialize isMainResource. * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::didReceiveResponseWithCertificateInfo): If this is a main resource load, send back a ContinueDidReceiveResponse message. 2013-04-22 Tim Horton Plugin Snapshotting: Don't consume insane amounts of time detecting the primary plugin https://bugs.webkit.org/show_bug.cgi?id=114994 Reviewed by Anders Carlsson. On some pages, we currently waste a lot of time on every subframe load and every addPluginView doing primary plugin detection. This patch attempts to address this via a few minor changes: - Only allow detection after the main frame's didFinishLoad comes, instead of the first subframe. - Only explicitly detect on the main frame's didFinishLoad (not subframes). - Coalesce calls to determinePrimarySnapshottedPlugIn from both addPluginView (in case JS is adding lots of plugins in a loop) and didFinishLoad. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::addPluginView): Coalesce calls to determinePrimarySnapshottedPlugIn. (WebKit::WebPage::didFinishLoad): Coalesce calls to determinePrimarySnapshottedPlugIn. Bail on subframe loads, we're only interested in the main frame being complete. (WebKit::WebPage::determinePrimarySnapshottedPlugInTimerFired): Call determinePrimarySnapshottedPlugIn. * WebProcess/WebPage/WebPage.h: Add m_determinePrimarySnapshottedPlugInTimer and determinePrimarySnapshottedPlugInTimerFired 2013-04-22 Alexey Proskuryakov [Mac] Tweak sandbox profiles. Reviewed by Anders Carlsson. Unbreak Lion, which doesn't provide detailed control over IPC. * WebProcess/com.apple.WebProcess.sb.in: 2013-04-22 Martin Robinson [GTK] Enable introspection always for developer builds https://bugs.webkit.org/show_bug.cgi?id=114983 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Make warnings during gir scanning cause the build to fail. Eliminate warnings about deprecated API that the g-ir-scanner uses when generating the scanner program. Use --quiet. 2013-04-22 Anders Carlsson Make it easier to extend NetworkResourceLoadParameters https://bugs.webkit.org/show_bug.cgi?id=114992 Reviewed by Sam Weinig. Turn NetworkResourceLoadParameters into a struct which matches all our other parameter classes in WebKit2. Fill in the struct manually instead of having a constructor with 9 parameters. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad): (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad): * NetworkProcess/SchedulableLoader.cpp: (WebKit::SchedulableLoader::SchedulableLoader): * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): (WebKit::NetworkResourceLoadParameters::encode): (WebKit::NetworkResourceLoadParameters::decode): * Shared/Network/NetworkResourceLoadParameters.h: (NetworkResourceLoadParameters): * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::scheduleLoad): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::loadResourceSynchronously): 2013-04-22 Tim Horton PDFPlugin: Support unlocking encrypted PDFs https://bugs.webkit.org/show_bug.cgi?id=114938 Reviewed by Alexey Proskuryakov and Oliver Hunt. If we try to load an encrypted PDF, we need to provide a sane mechanism through which the user can provide the password. Add a slightly-below-center password field to match PDFKit's normal behavior. * WebKit2.xcodeproj/project.pbxproj: Add PDFPluginPasswordField.{h,mm} * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add attemptToUnlockWithPassword: * WebProcess/Plugins/PDF/PDFPlugin.h: Add createPasswordEntryForm, attemptToUnlockPDF, m_passwordField. * WebProcess/Plugins/PDF/PDFPlugin.mm: (annotationStyle): Make #annotationContainer a flexbox that centers its contents. This won't affect the normal absolutely-positioned form fields, but the inline password field will be centered vertically and horizontally. (WebKit::PDFPlugin::pdfDocumentDidLoad): If the document is locked when loaded, create a password field. (WebKit::PDFPlugin::createPasswordEntryForm): Create a PDFPluginPasswordField and attach it to the document. (WebKit::PDFPlugin::attemptToUnlockPDF): Try to unlock the PDF with the given password. If this succeeds, remove the password field and relayout the scroll view. (WebKit::PDFPlugin::calculateSizes): Make the document 0x0 if it is locked, preventing scrolling. (WebKit::PDFPlugin::handleMouseEvent): Don't pass mouse events to PDFLayerController while it is locked, as it has no useful events to provide, and will try to present a dialog asking for the password if we let a click through. * WebProcess/Plugins/PDF/PDFPluginAnnotation.h: (WebKit::PDFPluginAnnotation::eventListener): Added. * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: (WebKit::PDFPluginAnnotation::handleEvent): Move event-handling code here from PDFPluginAnnotationEventListener::handleEvent so that subclasses can override this instead of having to have their own event listeners (this is also why we now expose eventListener()). (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::handleEvent): Forward the event to our owning PDFPluginAnnotation. * WebProcess/Plugins/PDF/PDFPluginPasswordField.h: Added. (WebKit::PDFPluginPasswordField::PDFPluginPasswordField): * WebProcess/Plugins/PDF/PDFPluginPasswordField.mm: Added. (WebKit::PDFPluginPasswordField::create): (WebKit::PDFPluginPasswordField::~PDFPluginPasswordField): Unregister for keyup. (WebKit::PDFPluginPasswordField::createAnnotationElement): Register for keyup, and set our element's class to "password". (WebKit::PDFPluginPasswordField::updateGeometry): Added. Override updateGeometry and do nothing, as the password field has a geometry defined by CSS instead of by the PDF content. (WebKit::PDFPluginPasswordField::handleEvent): If the enter/return key is pressed, attempt to unlock the PDF. Also, we do not call either of our superclass' implementations of handleEvent, because blurring the password field should not destroy it, and tabbing between fields has no relevance when there can only be one field. * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h: (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener): Removed. We now share our superclass' event listener. (WebKit::PDFPluginTextAnnotation::textAnnotation): Const. * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: (WebKit::PDFPluginTextAnnotation::~PDFPluginTextAnnotation): PDFPluginTextAnnotation no longer has its own event listener, so there's nothing left to clear here. Just make sure to unregister our event from PDFPluginAnnotation's shared event listener! (WebKit::PDFPluginTextAnnotation::createAnnotationElement): Ensure that we can create a PDFPluginTextAnnotation with a null annotation. (WebKit::PDFPluginTextAnnotation::commit): Use value(). (WebKit::PDFPluginTextAnnotation::value): Factor retrieving the value of the form control out of commit(). (WebKit::PDFPluginTextAnnotation::handleEvent): Call up to PDFPluginAnnotation's handler so that defocus destroys the annotation. 2013-04-22 Anders Carlsson Slow/beachballing when using the find bar on a page with plug-ins https://bugs.webkit.org/show_bug.cgi?id=114990 Reviewed by Tim Horton. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::notifyWidget): Call shouldCreateTransientPaintingSnapshot(). (WebKit::PluginView::shouldCreateTransientPaintingSnapshot): Don't create a painting snapshot if we're asked to paint the find indicator. * WebProcess/Plugins/PluginView.h: Add new member function. 2013-04-22 Alexey Proskuryakov [Mac] Tweak sandbox profiles. Reviewed by Sam Weinig. * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: * WebProcess/com.apple.WebProcess.sb.in: 2013-04-22 Anders Carlsson Don't kill our XPC services in response to memory pressure https://bugs.webkit.org/show_bug.cgi?id=114985 Reviewed by Mark Rowe. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: (WebKit::XPCServiceInitializer): Call xpc_transaction_begin() so we'll never be killed by the kernel when there's memory pressure; we prefer to manage our own lifetime thank you very much! * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::platformInitialize): Remove call to disable sudden termination. 2013-04-22 Alexey Proskuryakov [Mac] Tweak WebProcess sandbox profile to use system-graphics function when available. Reviewed by Sam Weinig. * WebProcess/com.apple.WebProcess.sb.in: 2013-04-22 Zan Dobersek [GTK] Set up libPlatform.la https://bugs.webkit.org/show_bug.cgi?id=114168 Reviewed by Martin Robinson. * GNUmakefile.am: Add the new libPlatform.la library to the libwebkitgtk library. Link the WebKitPluginProcess executable against libPlatform.la as well. 2013-04-22 Sam Weinig Hard code plug-in sandbox profile lookup directories and move the profiles to WebKit2. Reviewed by Anders Carlsson. * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm: (WebKit::PluginProcessMainDelegate::getExtraInitializationData): * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm: (WebKit::PluginServiceInitializerDelegate::getExtraInitializationData): * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::platformGetLaunchOptions): Stop passing the sandbox-profile-directory-path to the plug-in process. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::loadSandboxProfileForDirectory): (WebKit::loadSandboxProfile): (WebKit::PluginProcess::initializeSandbox): Hard code the plug-in sandbox profile lookup to only look in the WebKit2 bundle and /System/Library/Sandbox/Profiles/. * Resources/PlugInSandboxProfiles: Added. Add profiles. * WebKit2.xcodeproj/project.pbxproj: Copy the profiles to the bundle. 2013-04-15 Jer Noble Refactor creation of the full screen window into an (overridable) method. https://bugs.webkit.org/show_bug.cgi?id=110369 Reviewed by Eric Carlson. Add a new WKView method -(NSWindow)createFullScreenWindow which can be overridden by subclasses to provide custom full screen windows to the WKFullScreenWindowController. * UIProcess/API/mac/WKView.mm: (-[WKView fullScreenWindowController]): (-[WKView createFullScreenWindow]): * UIProcess/API/mac/WKViewPrivate.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController initWithWindow:]): 2013-04-22 Carlos Garcia Campos [GTK] Add webkit_web_context_set_disk_cache_directory to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=111848 Reviewed by Anders Carlsson. This allow applications to set a custom directory for the disk cache. * UIProcess/API/gtk/WebKitWebContext.cpp: (webkit_web_context_set_disk_cache_directory): * UIProcess/API/gtk/WebKitWebContext.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol. * UIProcess/API/gtk/tests/TestMain.cpp: (removeNonEmptyDirectory): (main): Use a different temporary disk cache directory for every test. 2013-04-22 Carlos Garcia Campos [SOUP] Soup disk cache should respect the diskCacheDirectory from the process initial parameters https://bugs.webkit.org/show_bug.cgi?id=111845 Reviewed by Anders Carlsson. Move the cache initialization to platformInitializeWebProcess() to create the cache using the directory received from the UI process. This allows to add public API to set a different disk cache directory from the UI process. * UIProcess/efl/WebContextEfl.cpp: (WebKit::WebContext::platformDefaultDiskCacheDirectory): Return default disk cache directory. * UIProcess/gtk/WebContextGtk.cpp: (WebKit::WebContext::platformDefaultDiskCacheDirectory): Ditto. * WebProcess/efl/WebProcessMainEfl.cpp: (WebKit::WebProcessMainEfl): Remove soup cache initialization. * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): Ditto. * WebProcess/soup/WebProcessSoup.cpp: (WebKit::WebProcess::platformInitializeWebProcess): Initialize soup cache. 2013-04-22 Krzysztof Wolanski : [WK2] Fix build warning when GESTURE_EVENTS is ON. https://bugs.webkit.org/show_bug.cgi?id=114812 Reviewed by Andreas Kling. Handle GestureSingleTap in the event type switch. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformHandleMouseEvent): 2013-04-21 Carlos Garcia Campos [WebKit2] Plugins without a MIME Type fail to load https://bugs.webkit.org/show_bug.cgi?id=112834 Reviewed by Benjamin Poulain. The problem is that when the plugin is created and the MIME Type is empty, since the MIME Type guessed in the UI process using the plugin extension is not passed to the WebProcess, when the plugin is instantiated, the value of NPMIMEType parameter passed to NPP_New is NULL, and NPERR_INVALID_INSTANCE_ERROR is returned. GetPluginPath message has been renamed to FindPlugin, since it doesn't only return the path but also the new MIME Type and load policy. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::findPlugin): Receive an output newMIMEType parameter that is passed to PluginModuleInfo::findPlugin() so that in case of guessing the MIME Type, the new one is passed back to the WebProcess. * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createPlugin): Pass the MIME Type from the parameters to WebPage::createPlugin. (WebKit::WebFrameLoaderClient::recreatePlugin): Pass a newMIMEType parameter to WebPage::createPlugin. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Add newMIMEType out parameter and pass it to the FindPlugin message. (WebKit::WebPage::canPluginHandleResponse): Pass newMIMEType to FindPlugin message. * WebProcess/WebPage/WebPage.h: (WebPage): 2013-04-21 Carlos Garcia Campos Widget should not depend on AXObjectCache https://bugs.webkit.org/show_bug.cgi?id=114514 Reviewed by Chris Fleizach. Update to API changes. * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::createScrollbar): * WebProcess/Plugins/PDF/SimplePDFPlugin.mm: (WebKit::SimplePDFPlugin::createScrollbar): (WebKit::SimplePDFPlugin::destroyScrollbar): 2013-04-20 Manuel Rego Casasnovas [GTK] Fix unit test webkit2/WebKitFindController/hide https://bugs.webkit.org/show_bug.cgi?id=89810 Reviewed by Carlos Garcia Campos. The test had some hacks in order to compare a page with highlighted results after using the find command with the original page. Now it uses the snapshots API that allows to make the test simpler and more reliable. * UIProcess/API/gtk/tests/TestMain.h: (Test::cairoSurfacesEqual): Moved helper function to compare two cairo surfaces from TestWebKitWebView. (Test): * UIProcess/API/gtk/tests/TestWebKitFindController.cpp: (testFindControllerHide): Modify test to use snapshots. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewSnapshot): Move basic snapshop methods to WebViewTest to share them with TestWebKitFindController test. * UIProcess/API/gtk/tests/WebViewTest.cpp: (WebViewTest::WebViewTest): Initialize cairo surface. (WebViewTest::~WebViewTest): Destroy cairo surface. (onSnapshotReady): Callback to set the cairo surface when the snapshot is ready. (WebViewTest::getSnapshotAndWaitUntilReady): Method that takes a snapshot and returns the cairo surface when it is ready. * UIProcess/API/gtk/tests/WebViewTest.h: Add new method headers and attribute for the cairo surface. 2013-04-19 Jer Noble Unreviewed, revert r148782. It was not reviewed by a WebKit2 owner. * PluginProcess/mac/PluginProcessShim.mm: * Shared/mac/CookieStorageShim.cpp: Removed. * Shared/mac/CookieStorageShim.h: Removed. * Shared/mac/CookieStorageShimLibrary.cpp: Removed. * Shared/mac/CookieStorageShimLibrary.h: Removed. * Shared/mac/DYLDInterpose.h: Removed. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::addDYLDEnvironmentAdditions): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: (WebKit::WebContentProcessMainDelegate::doPreInitializationWork): * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: (WebContentServiceInitializer): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): * WebProcess/mac/SecItemShimLibrary.mm: * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist: * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: 2013-04-19 Jer Noble WWDC session videos don’t play at developer.apple.com https://bugs.webkit.org/show_bug.cgi?id=114858 Reviewed by Eric Carlson. AVFoundation uses CFNetwork to store and retrieve cookies from the global store. However, in the case where network access happens in the NetworkProcess, session cookies are stored in-memory, and are not accessable in the WebProcess. Until such a time as AVFoundation can provide an API which would allow us to provide cookies for a specific request, we will interpose the CFNetwork method which they use to retrieve the cookie string from the cookie store for their pending request. Duplicate the previous SecItemShim target to a new, WebProcessShim target. This target includes the SecItemShim functionality, but will add a new shim for cookie retrieval: * Shared/mac/CookieStorageShimLibrary.h: Added (CookieStorageShimCallbacks): * Shared/mac/CookieStorageShimLibrary.cpp: Added. (WebKit::ShimProtector::ShimProtector): A simple stack-based counter class. (WebKit::ShimProtector::~ShimProtector): (WebKit::ShimProtector::count): (WebKit::shimCFHTTPCookieStorageCopyRequestHeaderFieldsForURL): Interpose the CFNetwork call, and pass to the registered callback. (WebKit::WebKitCookieStorageShimInitialize): Register the callbacks. Add a helper singleton class which will talk to the shim through the registered callbacks: * Shared/mac/CookieStorageShim.h: Added (WebKit::CookieStorageShim::CookieStorageShim): * Shared/mac/CookieStorageShim.cpp: Added. (WebKit::webKitCookieStorageCopyRequestHeaderFieldsForURL): Pass the request over to the NetworkProcess. (WebKit::CookieStorageShim::shared): Simple singleton. (WebKit::CookieStorageShim::initialize): Call the library initializer. Initialize the shim only when the WebProcess is delegating network loading to the NetworkProcess: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): Rename the WebProcess's shim from SecItemShim -> WebProcessShim: * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::addDYLDEnvironmentAdditions): * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: (WebKit::WebContentProcessMainDelegate::doPreInitializationWork): * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: (WebContentServiceInitializer): As the DYLD_INTERPOSE macro is used in multiple files now, put it in its own header: * Shared/mac/DYLDInterpose.h: Added. * PluginProcess/mac/PluginProcessShim.mm: * WebProcess/mac/SecItemShimLibrary.mm: Add new files to the project: * WebKit2.xcodeproj/project.pbxproj: 2013-04-19 Brady Eidson Add JoinExistingSession to the WebContext XPC. and https://bugs.webkit.org/show_bug.cgi?id=114882 Reviewed by Sam Weinig. This fixes and maybe other things. * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist: * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: 2013-04-19 Martin Robinson [GTK] JSCore.gir.in has a few problems https://bugs.webkit.org/show_bug.cgi?id=114710 Reviewed by Philippe Normand. * GNUmakefile.am: Updated to reflect new location of JavaScriptCore gir file. Share the same autotools data task as the WebKit1 and JavaScriptCore gir installations. 2013-04-19 Noam Rosenthal [Texmap] Implementation for pattern compositing https://bugs.webkit.org/show_bug.cgi?id=109588 Reviewed by Allan Sandfeld Jensen. Serialize the two new properties from CoordinatedGraphicsLayer to CoordinatedGraphicsScene. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): Encode/decode the new tiling properties. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): Enable pattern compositing for coordinated graphics. This is needed since we don't want to enable pattern compositing for WebKit1 yet. 2013-04-18 Tim Horton PDFPlugin: Update PDFLayerController's scale factors earlier https://bugs.webkit.org/show_bug.cgi?id=114843 Reviewed by Simon Fraser. Inform PDFLayerController of the initial page/device scale factors so that it renders at the correct scale the first time, instead of first rendering at 1x and then flashing to 2x (on 2x devices). * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::pdfDocumentDidLoad): 2013-04-18 Tim Horton PDFPlugin: Hook up the search-in-Spotlight menu item https://bugs.webkit.org/show_bug.cgi?id=114837 Reviewed by Mark Rowe. * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add performSpotlightSearch: delegate callback. * WebProcess/Plugins/PDF/PDFPlugin.h: (WebKit::PDFPlugin::performSpotlightSearch): Add performSpotlightSearch() PDFPlugin method. * WebProcess/Plugins/PDF/PDFPlugin.mm: (-[WKPDFLayerControllerDelegate performSpotlightSearch:]): Hand the search string to PDFPlugin. (WebKit::PDFPlugin::performSpotlightSearch): Hand the search string to WebPageProxy. 2013-04-18 Anders Carlsson Dispatch local storage events https://bugs.webkit.org/show_bug.cgi?id=114838 Reviewed by Beth Dakin. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::StorageArea::dispatchEvents): Pass 0 as the storage area ID if the event originally comes from another process. * WebProcess/Storage/StorageAreaMap.cpp: (WebKit::StorageAreaMap::dispatchLocalStorageEvent): Gather all the frames for which we want to dispatch events. 2013-04-18 Anders Carlsson Use the page group id from the UI process as the local storage namespace ID https://bugs.webkit.org/show_bug.cgi?id=114836 Reviewed by Beth Dakin. The WebCore PageGroup identifier is different across processes, so use the one given to us by the UI process. * WebProcess/Storage/StorageNamespaceImpl.cpp: (WebKit::StorageNamespaceImpl::createLocalStorageNamespace): * WebProcess/WebPage/WebPageGroupProxy.h: (WebKit::WebPageGroupProxy::corePageGroup): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::webPageGroup): * WebProcess/WebProcess.h: 2013-04-18 Tim Horton Add a synchronous version of WKView endDeferringViewInWindowChanges https://bugs.webkit.org/show_bug.cgi?id=114780 Reviewed by Simon Fraser. Add new WKView SPI, endDeferringViewInWindowChangesSync, which synchronously (though with a 250 ms timeout) does the work required to reparent a WKView without flashing white. * UIProcess/API/mac/WKView.mm: (-[WKView beginDeferringViewInWindowChanges]): (-[WKView endDeferringViewInWindowChanges]): Make begin/endDeferringViewInWindowChanges not allow nested deferrals, as we don't need them, and they complicate synchronous-end a lot. (-[WKView endDeferringViewInWindowChangesSync]): Add a sync version of endDeferringViewInWindowChanges which waits for DidUpdateInWindowState. (-[WKView isDeferringViewInWindowChanges]): * UIProcess/API/mac/WKViewPrivate.h: Add endDeferringViewInWindowChangesSync. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::waitForDidUpdateInWindowState): Add waitForDidUpdateInWindowState(), which blocks for 250ms or until the WebProcess reparents all of its layers and spins the runloop once, to prevent flashing when parenting a WKView. If we've already timed out waiting for the WebProcess, don't block, as it's probably quite busy and is likely to time out again. * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::isInWindow): Added. (WebKit::WebPageProxy::waitForDidUpdateInWindowState): Added. (WebKit::WebPageProxy::didUpdateInWindowState): Added. * UIProcess/WebPageProxy.messages.in: Add DidUpdateInWindowState() * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didUpdateInWindowStateTimerFired): Send DidUpdateInWindowState to WebPageProxy. (WebKit::WebPage::setIsInWindow): When setIsInWindow completes, TileController tiles have been reparented, and the TiledCoreAnimationDrawingArea has reconnected the layer tree to the context, start a 0-delay runloop timer to allow painting and layer flushing to finish; when the timer fires, we'll send the UIProcess a DidUpdateInWindowState so it can stop blocking. * WebProcess/WebPage/WebPage.h: (WebPage): Add didUpdateInWindowStateTimerFired and m_sendDidUpdateInWindowStateTimer. 2013-04-18 Anders Carlsson StorageManager should keep track of local storage namespaces https://bugs.webkit.org/show_bug.cgi?id=114831 Reviewed by Beth Dakin. * UIProcess/Storage/StorageManager.cpp: (StorageManager::StorageArea): Add the local storage namespace, and security origin as member variables. (StorageManager::LocalStorageNamespace): New class that represents a local storage namespace. (WebKit::StorageManager::StorageArea::~StorageArea): If this storage area belongs to a local storage namespace, notify it that we've been destroyed. (WebKit::StorageManager::StorageArea::clone): Assert that we don't have a local storage namespace. (WebKit::StorageManager::LocalStorageNamespace::getOrCreateStorageArea): If we already have a storage area for the given security origin, return it. Otherwise, create a new storage area. Note that LocalStorageNamespace does not hold strong references to its StorageArea objects; they are being kept alive by a mapping inside the StorageManager. (WebKit::StorageManager::LocalStorageNamespace::didDestroyStorageArea): Remove the storage area from the map. If there are no more areas, remove the namespace from the manager. (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea): StorageArea::create now takes the security origin. (WebKit::StorageManager::createLocalStorageMap): Get (or create) the right local storage namespace and then create a storage area. 2013-04-17 Geoffrey Garen Renamed JSGlobalData to VM https://bugs.webkit.org/show_bug.cgi?id=114777 Reviewed by Phil Pizlo. * Shared/linux/WebMemorySamplerLinux.cpp: (WebKit::WebMemorySampler::sampleWebKit): * Shared/mac/WebMemorySampler.mac.mm: (WebKit::WebMemorySampler::sampleWebKit): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::javaScriptObjectsCount): * WebProcess/Plugins/Netscape/JSNPMethod.cpp: (WebKit::JSNPMethod::finishCreation): * WebProcess/Plugins/Netscape/JSNPMethod.h: (WebKit::JSNPMethod::create): (JSNPMethod): (WebKit::JSNPMethod::createStructure): * WebProcess/Plugins/Netscape/JSNPObject.cpp: (WebKit::JSNPObject::JSNPObject): (WebKit::JSNPObject::finishCreation): (WebKit::JSNPObject::callMethod): (WebKit::JSNPObject::callObject): (WebKit::JSNPObject::callConstructor): (WebKit::JSNPObject::put): (WebKit::JSNPObject::deleteProperty): (WebKit::JSNPObject::getOwnPropertyNames): (WebKit::JSNPObject::propertyGetter): * WebProcess/Plugins/Netscape/JSNPObject.h: (WebKit::JSNPObject::create): (WebKit::JSNPObject::createStructure): * WebProcess/Plugins/Netscape/NPJSObject.cpp: (WebKit::NPJSObject::create): (WebKit::NPJSObject::initialize): * WebProcess/Plugins/Netscape/NPJSObject.h: (JSC): (NPJSObject): * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::getOrCreateNPObject): (WebKit::NPRuntimeObjectMap::convertJSValueToNPVariant): (WebKit::NPRuntimeObjectMap::evaluate): * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: (JSC): (NPRuntimeObjectMap): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::windowScriptNPObject): (WebKit::PluginView::pluginElementNPObject): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::runJavaScriptInMainFrame): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::getWebCoreStatistics): 2013-04-18 Anders Carlsson Differentiate between creating local storage maps and session storage maps https://bugs.webkit.org/show_bug.cgi?id=114823 Reviewed by Beth Dakin. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::createLocalStorageMap): (WebKit::StorageManager::createSessionStorageMap): * UIProcess/Storage/StorageManager.h: * UIProcess/Storage/StorageManager.messages.in: * WebProcess/Storage/StorageAreaMap.cpp: (WebKit::StorageAreaMap::StorageAreaMap): 2013-04-18 Anders Carlsson StorageAreaMaps should not assume that a zero storage namespace ID is used for local storage https://bugs.webkit.org/show_bug.cgi?id=114822 Reviewed by Beth Dakin. Store the storage type directly in the storage area map. * WebProcess/Storage/StorageAreaMap.cpp: (WebKit::StorageAreaMap::StorageAreaMap): * WebProcess/Storage/StorageAreaMap.h: (WebKit::StorageAreaMap::storageType): 2013-04-18 Anders Carlsson Begin fleshing out UI side local storage https://bugs.webkit.org/show_bug.cgi?id=114820 Reviewed by Beth Dakin. * WebProcess/Storage/StorageNamespaceImpl.cpp: (WebKit::StorageNamespaceImpl::createLocalStorageNamespace): (WebKit::StorageNamespaceImpl::createSessionStorageNamespace): (WebKit::StorageNamespaceImpl::StorageNamespaceImpl): (WebKit::StorageNamespaceImpl::~StorageNamespaceImpl): * WebProcess/Storage/StorageNamespaceImpl.h: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::localStorageNamespace): 2013-04-18 Sam Weinig Fix spelling I thought I had fixed. * UIProcess/API/mac/WKBrowsingContextGroup.mm: (-[WKBrowsingContextGroup initWithIdentifier:]): 2013-04-18 Sam Weinig WebKit should not write WKPreferences to app user defaults when using the ObjC API https://bugs.webkit.org/show_bug.cgi?id=114821 Reviewed by Anders Carlsson. * UIProcess/API/mac/WKBrowsingContextGroup.mm: (-[WKBrowsingContextGroup initWithIdentifier:]): Use a identifier-less preferences for the ObjC-API. I think we will probably want this to be the default for the C-API at some point as well, but Safari currently uses this behavior. 2013-04-17 Anders Carlsson Change storage factory functions to take a PageGroup and Page respectively https://bugs.webkit.org/show_bug.cgi?id=114776 Reviewed by Beth Dakin. Update for WebCore changes. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::localStorageNamespace): (WebKit::WebPlatformStrategies::sessionStorageNamespace): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: (WebPlatformStrategies): 2013-04-18 Timothy Hatcher Remove an ASSERT that is causing flakeyness in Debug builds. https://webkit.org/b/113020 Reviewed by Jessie Berlin. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::open): Removed ASSERT(m_createdInspectorPage). 2013-04-18 Carlos Garcia Campos [GTK] Add WebKitWebPage::send-request signal to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=83681 Reviewed by Anders Carlsson. Add WebKitWebPage::send-request signal emitted in willSendRequest callback to allow web process extensions to modify requests before they are sent or cancel the resource load. This patch makes WebKitURIRequest and WebKitURIResponse objects shareable between UI process and web extensions APIs. Since both APIs force single header includes, the WebKitDefines.h header has been split moving the forward declarations specific to the UI process API to a new file WebKitForwardDeclarations.h. This way we can also share the WebKitDefines.h header and remove the WebKitWebExtensionDefines.h header used in the web extensions API. * GNUmakefile.list.am: Add new files to compilation. * UIProcess/API/gtk/WebKitContextMenu.h: Include WebKitForward.h. * UIProcess/API/gtk/WebKitContextMenuItem.h: Ditto. * UIProcess/API/gtk/WebKitDefines.h: Remove forward declarations. * UIProcess/API/gtk/WebKitDownload.h: Include WebKitForward.h. * UIProcess/API/gtk/WebKitFindController.h: Ditto. * UIProcess/API/gtk/WebKitForwardDeclarations.h: Added. Contains the forward declarations moved from WebKitDefines.h. * UIProcess/API/gtk/WebKitPrintOperation.h: Include WebKitForward.h. * UIProcess/API/gtk/WebKitURIRequest.cpp: (webkitURIRequestSetProperty): Use webkit_uri_request_set_uri() to set the new URI. (webkit_uri_request_class_init): Make URI property construct instead of construct-only, since it can be updated once constructed. It should never be NULL, so set default value to about:blank instad of NULL. (webkit_uri_request_set_uri): New public method to set the URI of the WebKitURIRequest. * UIProcess/API/gtk/WebKitURIRequest.h: Allow to include this file from webkit-web-extension.h. * UIProcess/API/gtk/WebKitURIResponse.h: Ditto. * UIProcess/API/gtk/WebKitURISchemeRequest.h: Include WebKitForward.h. * UIProcess/API/gtk/WebKitWebView.h: Ditto. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add webkit_uri_request_set_uri. * UIProcess/API/gtk/tests/TestResources.cpp: (testWebResourceSendRequest): (serverCallback): (beforeAll): * UIProcess/API/gtk/tests/WebExtensionTest.cpp: (sendRequestCallback): (pageCreatedCallback): * UIProcess/API/gtk/webkit2marshal.list: * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.h: Include WebKitDefines.h instead of WebKitWebExtensionDefines.h. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (willSendRequestForFrame): Emit WebKitWebPage::send-request and return early if the load is cancelled. (webkit_web_page_class_init): Add WebKitWebPage::send-request signal. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h: Include WebKitDefines.h instead of WebKitWebExtensionDefines.h. * WebProcess/InjectedBundle/API/gtk/webkit-web-extension.h: 2013-04-18 Bruno de Oliveira Abinader [WK2] CoordinatedGraphicsLayerState is a struct, not a class https://bugs.webkit.org/show_bug.cgi?id=108855 Reviewed by Andreas Kling. Fixes the forward declaration which takes CoordinatedGraphicsLayerState as a class. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (WebCore): 2013-04-18 Krzysztof Wolanski : [EFL][WK2] Change inadequate return value in method setDone(). https://bugs.webkit.org/show_bug.cgi?id=114806 Reviewed by Andreas Kling. Fix possible warning in EFL port: no return statement in function returning non-void. Change return value from bool to void in method setDone(). * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: (EWK2UnitTest::CallbackDataTimer::setDone): 2013-04-18 Grzegorz Czajkowski [WK2][EFL] Text Checker's settings refactor https://bugs.webkit.org/show_bug.cgi?id=111713 Reviewed by Andreas Kling. Use WK2's TextCheckerState object as the store for the text checker settings. It's shared between the client (Ewk API part) and WebProcess (read only). Thanks to it, we don't have to keep any additional structure with the settings on ewk side. In the consistency with WKTextChecker C API, move the Ewk's text checker settings APIs to the ewk_text_checker.h/cpp. They're not connected to Ewk_View/Ewk_Settings object to keep them in ewk_setting.h/cpp. Introduce a new class to implement WKTextCheckerClient callbacks to call spelling methods through WK2 C API. The main purpose of this change is to detach text checker initialization from ewk_context. * PlatformEfl.cmake: Add a new files to the build. * UIProcess/API/efl/ewk_context.cpp: (EwkContext::EwkContext): Detach the text checker initialization from context. There might be more than default context. There is one text checker object per application. * UIProcess/API/efl/ewk_settings.cpp: * UIProcess/API/efl/ewk_settings.h: Remove the text checker settings. * UIProcess/API/efl/ewk_text_checker.cpp: Add the text checker settings to the ewk_text_checker.h/cpp (convertLanguagesToEinaList): Add helper function to convert Vector's values to Eina_List. (clientCallbacks): Add the client callback responsible for the continuous spell checking setting change to the struct. (ewk_text_checker_continuous_spell_checking_enabled_set): Do not call the client's callback responsible for the setting change unless WebKit changes the setting (trough the context 'Check Spelling While Typing' option). * UIProcess/API/efl/ewk_text_checker.h: Adjust APIs name to the ewk_text_checker syntax. Update the documentation according to the changes. * UIProcess/API/efl/ewk_text_checker_private.h: (ClientCallbacks): Move ClientCallbacks structure to TextCheckerClientEfl. The client callbacks (Ewk API) have to be accessible in WKTextCheckerClient callbacks to choose what implementation will be used - the client's (if definied) or Enchant impl. * UIProcess/API/efl/tests/test_ewk2_text_checker.cpp: Update the unit tests according to the APIs change. Update the test responsible for the notification about the setting change according to changes in 'ewk_text_checker_continuous_spell_checking_enabled_set'. * UIProcess/efl/TextCheckerClientEfl.cpp: Added. Implement WKTextCheckerClient callbacks. (TextCheckerClientEfl::TextCheckerClientEfl): (TextCheckerClientEfl::instance): Allow to get and create TextCheckerClientEfl object. (TextCheckerClientEfl::isContinuousSpellCheckingEnabled): Get the setting value based on WK2 C API. (TextCheckerClientEfl::ensureSpellCheckingLanguage): Load the default languages if user didn't specify any. (TextCheckerClientEfl::updateSpellCheckingLanguages): (TextCheckerClientEfl::languagesUpdateTimerFired): (TextCheckerClientEfl::availableSpellCheckingLanguages): (TextCheckerClientEfl::loadedSpellCheckingLanguages): (TextCheckerClientEfl::availableSpellCheckingLanguages): (TextCheckerClientEfl::loadedSpellCheckingLanguages): Provide support for languages. (TextCheckerClientEfl::spellCheckingSettingChangeTimerFired): (TextCheckerClientEfl::callContinuousSpellCheckingChangeCallbackAsync): Notify the client about the setting change. (TextCheckerClientEfl::isContinuousSpellCheckingEnabledCallback): (TextCheckerClientEfl::setContinuousSpellCheckingEnabledCallback): (TextCheckerClientEfl::uniqueSpellDocumentTagCallback): (TextCheckerClientEfl::closeSpellDocumentWithTagCallback): (TextCheckerClientEfl::checkSpellingOfStringCallback): (TextCheckerClientEfl::guessesForWordCallback): (TextCheckerClientEfl::learnWordCallback): (TextCheckerClientEfl::ignoreWordCallback): WKTextCheckerClient callbacks implementation. * UIProcess/efl/TextCheckerClientEfl.h: Added. (TextCheckerClientEfl): (TextCheckerClientEfl::clientCallbacks): Return the client callbacks to be used in ewk_text_checker.cpp. * UIProcess/efl/TextCheckerEfl.cpp: (WebKit::TextChecker::state): Initialize the TextCheckerState's members to false. (WebKit::TextChecker::setContinuousSpellCheckingEnabled): Set the default language if user didn't specify any. Notify the client about the setting change. This method is called when context menu 'Check Spelling While Typing' option has been toggled. (WebKit::TextChecker::continuousSpellCheckingEnabledStateChanged): Set the default language if user didn't specify any. Called by WKTextChecker's API. 2013-04-18 Manuel Rego Casasnovas [GTK][WK2] Add WebKitWebPage::webkit_web_page_get_uri to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=111288 Reviewed by Anders Carlsson. Add new property URI to WebKitWebPage providing a method webkit_web_page_get_uri to get it and the signal "notify::uri" to monitor changes in the URI. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Include new method in GTK+ doc. * UIProcess/API/gtk/tests/TestLoaderClient.cpp: (testWebPageURI): (beforeAll): (afterAll): Add test to check that WebKitWebPage URI matches with WebKitWebView value. The tests is listening for changes in WebKitWebPage URI via D-Bus and checks that value is the same than WebKitWebView URI. It also checks that the order of the URIs in a redirection is right. When the test finishes the signals are disconnected properly. * UIProcess/API/gtk/tests/WebExtensionTest.cpp: (uriChangedCallback): (pageCreatedCallback): Add new D-Bus signal "URIChanged" connected to "notify::uri" signal of WebKitWebPage. * UIProcess/API/gtk/tests/WebKitTestBus.cpp: (WebKitTestBus::getOrCreateConnection): Rename method connection() to getOrCreateConnection(). (WebKitTestBus::createProxy): Use the new method name. * UIProcess/API/gtk/tests/WebKitTestBus.h: (WebKitTestBus::connection): Add public getter for m_connection. (WebKitTestBus): Add private method header getOrCreateConnection(). * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (_WebKitWebPagePrivate): Add new URI attribute. (webkitWebPageSetURI): Method to set the URI and emit the "notify:uri" signal if it has changed. (didStartProvisionalLoadForFrame): At this point it use the unreachable URL from provisional document loader if any. Otherwise, it uses the URL from provisional document loader. (didReceiveServerRedirectForProvisionalLoadForFrame): In the case of redirections it works like for didStartProvisionalLoadForFrame getting the unreachable URL if any. (didSameDocumentNavigationForFrame): In this case it gets the URL from the document loader. (webkitWebPageGetProperty): Add code related to URI property. (webkit_web_page_class_init): Add bits related to URI property. (webkitWebPageCreate): Implement callbacks to monitor URI changes. (webkit_web_page_get_uri): Return URI attribute. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h: Add new method header. 2013-04-18 Xan Lopez [GTK] When the WebProcess crashes, a signal should be emitted https://bugs.webkit.org/show_bug.cgi?id=105180 Emit a "web-process-crashed" signal when the WebProcess crashes. This is useful, for example, to show an error page in a web browser like Chrome does. Reviewed Carlos Garcia Campos. * UIProcess/API/gtk/WebKitLoaderClient.cpp: (processDidCrash): (attachLoaderClientToView): * UIProcess/API/gtk/WebKitWebContextPrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_class_init): (webkitWebViewWebProcessCrashed): * UIProcess/API/gtk/tests/TestWebExtensions.cpp: (testWebExtensionGetTitle): (webProcessCrashedCallback): (testWebKitWebViewProcessCrashed): (beforeAll): * UIProcess/API/gtk/tests/WebExtensionTest.cpp: (methodCallCallback): 2013-04-18 Kenneth Rohde Christiansen [EFL][WK2] Add tooltip API to the WKView client https://bugs.webkit.org/show_bug.cgi?id=111563 Reviewed by Andreas Kling. Add tooltip to the barebone Tizen C API, and implement the method so that the EFL API keeps working. * UIProcess/API/C/efl/WKView.h: * UIProcess/efl/ViewClientEfl.cpp: (WebKit::ViewClientEfl::didChangeTooltip): (WebKit): (WebKit::ViewClientEfl::ViewClientEfl): * UIProcess/efl/ViewClientEfl.h: (ViewClientEfl): * UIProcess/efl/WebView.cpp: (WebKit::WebView::toolTipChanged): * UIProcess/efl/WebViewClient.cpp: (WebKit::WebViewClient::didChangeTooltip): (WebKit): * UIProcess/efl/WebViewClient.h: 2013-04-17 Joone Hur [EFL][AC] m_pendingSurfaceResize needs to be guarded by USE(ACCELERATED_COMPOSITING) https://bugs.webkit.org/show_bug.cgi?id=114770 AC related code is guarded by USE(ACCELERATED_COMPOSITING) in order to build WebKitEfl with no-tiled-backing-store(r147792), but m_pendingSurfaceResize is not included. This patch allows m_pendingSurfaceResize to be guarded by USE(ACCELERATED_COMPOSITING). Reviewed by Simon Fraser. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): (EwkView::displayTimerFired): (EwkView::handleEvasObjectCalculate): * UIProcess/API/efl/EwkView.h: (EwkView): 2013-04-17 Anders Carlsson The storage manager should know the local storage directory https://bugs.webkit.org/show_bug.cgi?id=114765 Reviewed by Beth Dakin. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::create): (WebKit::StorageManager::setLocalStorageDirectory): (WebKit::StorageManager::setLocalStorageDirectoryInternal): * UIProcess/Storage/StorageManager.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): (WebKit::WebContext::setLocalStorageDirectory): * UIProcess/WebContext.h: 2013-04-17 Joone Hur [EFL][AC] MiniBrowser starts with a black empty view before painting a web page https://bugs.webkit.org/show_bug.cgi?id=103745 Reviewed by Kenneth Rohde Christiansen. Evas paints empty evas objects before rendering a web page, so it shows a black empty view for a moment. This patch prevents from painting the empty evas objects until a GL surface is ready for rendering. * UIProcess/API/efl/EwkView.cpp: (showEvasObjectsIfNeeded): (EwkView::displayTimerFired): (EwkView::handleEvasObjectShow): 2013-04-16 Carlos Garcia Campos [GTK] Add webkit_web_page_get_id() to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=111938 Reviewed by Anders Carlsson. Add API to the web extensions API to get the identifier of a web page. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add new symbol. * UIProcess/API/gtk/tests/WebExtensionTest.cpp: (methodCallCallback): Check the page ID matches the one returned by webkit_web_page_get_id(). * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (webkit_web_page_get_id): * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.h: 2013-04-16 Anders Carlsson Clone storage namespaces for window.open https://bugs.webkit.org/show_bug.cgi?id=114703 Reviewed by Sam Weinig. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::StorageArea::clone): New helper function for cloning a storage area. (WebKit::StorageManager::StorageArea::setItem): Correctly handle the copy-on-write feature of StorageMap if it has multiple storage areas pointing to it. (WebKit::StorageManager::StorageArea::removeItem): Ditto. (WebKit::StorageManager::SessionStorageNamespace::cloneTo): Add cloned storage areas. * WebProcess/Storage/StorageNamespaceImpl.cpp: (WebKit::StorageNamespaceImpl::copy): Create a new session storage namespace for the new page. 2013-04-16 Beth Dakin Need a new layout milestone to notify bundle clients when the header has been flushed https://bugs.webkit.org/show_bug.cgi?id=114706 -and corresponding- Reviewed by Simon Fraser. Make this new LayoutMilestone private at the API layer. * Shared/API/c/WKPageLoadTypes.h: * Shared/API/c/WKPageLoadTypesPrivate.h: Added. Handle the new milestone. * Shared/API/c/WKSharedAPICast.h: (WebKit::toWKLayoutMilestones): (WebKit::toLayoutMilestones): New file to make the milestone private. * WebKit2.xcodeproj/project.pbxproj: Add or remove the DidFirstFlushForHeaderLayer millstone based on whether we just added or removed a header. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::setHeaderLayerWithHeight): 2013-04-16 Ryosuke Niwa Another EFL build fix. * WebProcess/WebPage/efl/WebPageEfl.cpp: 2013-04-15 Sam Weinig Remove more #includes from Frame.h https://bugs.webkit.org/show_bug.cgi?id=114642 Reviewed by Anders Carlsson. * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: * WebProcess/Plugins/PluginView.cpp: * WebProcess/WebPage/WebFrame.cpp: * WebProcess/WebPage/gtk/WebPageGtk.cpp: * WebProcess/WebPage/mac/WebPageMac.mm: * WebProcess/WebPage/qt/WebPageQt.cpp: 2013-04-16 Timothy Hatcher Make resizing the docked Web Inspector stay in sync with the inspected view. https://webkit.org/b/114682 Reviewed by Joseph Pecoraro. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): Disable screen updates to make sure the layers for both views resize in sync. 2013-04-15 Anders Carlsson Remove unneeded headers from ScriptExecutionContext.h https://bugs.webkit.org/show_bug.cgi?id=114631 Reviewed by Alexey Proskuryakov. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: * WebProcess/WebPage/PageOverlay.cpp: 2013-04-16 Maciej Stachowiak Remove even yet still more traces of v8 https://bugs.webkit.org/show_bug.cgi?id=114693 Reviewed by Anders Carlsson. * Scripts/generate-forwarding-headers.pl: Remove v8 from list of platforms. 2013-04-16 Alexey Proskuryakov Remove unused AlternativeTextClient::dismissDictationAlternativeUI https://bugs.webkit.org/show_bug.cgi?id=114598 Reviewed by Ryosuke Niwa. * UIProcess/API/mac/PageClientImpl.h: * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::dictationAlternatives): * UIProcess/PageClient.h: * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebAlternativeTextClient.h: * WebProcess/WebCoreSupport/mac/WebAlternativeTextClient.cpp: 2013-04-16 Claudio Saavedra [GTK][WK2] Add API to retrieve a snapshot from a webview https://bugs.webkit.org/show_bug.cgi?id=98270 Reviewed by Anders Carlsson. This adds the GTK+ API necessary to retrieve a snapshot from a webview asynchronously. The API uses the injected bundle internally to get the snapshot from the WebProcess. * UIProcess/API/gtk/WebKitError.cpp: (webkit_snapshot_error_quark): Add snapshot API related error quark. * UIProcess/API/gtk/WebKitError.h: Add snapshot error handling. * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp: (didReceiveWebViewMessageFromInjectedBundle): Handle the new "DidGetSnapshot" message. * UIProcess/API/gtk/WebKitPrivate.h: Add SnapshotRegion enum. * UIProcess/API/gtk/WebKitWebView.cpp: (_WebKitWebViewPrivate): Add a map for the snapshot results. (GetSnapshotAsyncData): (webKitWebViewDidReceiveSnapshot): (webKitSnapshotRegionToSnapshotRegion): Helper method for casting the region option enumeration. (generateSnapshotCallbackID): Method to generate unique callback ids. (webkit_web_view_get_snapshot): (webkit_web_view_get_snapshot_finish): New snapshotting API. * UIProcess/API/gtk/WebKitWebView.h: Ditto. * UIProcess/API/gtk/WebKitWebViewPrivate.h: Add the private method to handle a received snapshot. * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add the new API bits. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (cairoSurfacesEqual): Add helper to compare cairo_surface_t structs. (testWebViewSnapshot): New test. (beforeAll): Add the new test. * UIProcess/API/gtk/tests/WebViewTest.cpp: (WebViewTest::selectAll): Add method to help test snapshots including selection. * UIProcess/API/gtk/tests/WebViewTest.h: Ditto * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: (didReceiveMessageToPage): Ditto. (webkitWebExtensionCreate): Register method above. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (webkitWebPageDidReceiveMessage): Add this method. It handles the new message "GetSnapshot". * WebProcess/InjectedBundle/API/gtk/WebKitWebPagePrivate.h: Add method above. 2013-04-16 Timothy Hatcher Create full rects for the inspector and inspected views when adjusting to an inspected view frame change. This ensures switching dock sides restores the inspected view and inspector to fill the parent's bounds. https://webkit.org/b/114666 rdar://problem/13660796 Reviewed by Joseph Pecoraro. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): 2013-04-16 Balazs Kelemen Initialize logging channels for web processes https://bugs.webkit.org/show_bug.cgi?id=114621 Reviewed by Sam Weinig. Use InitializeWebKit2 for initializing the web and plugin processes. It handles initializing the logging channels and it's better to have shared core for this. For the plugin process now we always create a RunLoop object which is not necessary with the -scanPlugin argument but it shouldn't be a problem. * PluginProcess/qt/PluginProcessMainQt.cpp: (WebKit::PluginProcessMain): * PluginProcess/unix/PluginProcessMainUnix.cpp: (WebKit::PluginProcessMainUnix): * WebProcess/efl/WebProcessMainEfl.cpp: (WebKit::WebProcessMainEfl): * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): * WebProcess/qt/WebProcessMainQt.cpp: (WebKit::WebProcessMainQt): 2013-04-16 Michał Pakuła vel Rutka [EFL][WK2] Add an API for getting context menu item's parent menu https://bugs.webkit.org/show_bug.cgi?id=107510 Reviewed by Kenneth Rohde Christiansen. Added parent menu support and API for Ewk_Context_Menu_Item, to allow selecting context menus using Elementary widgets. Context menu unit test updated with new function. * UIProcess/API/efl/ewk_context_menu.cpp: (EwkContextMenu::EwkContextMenu): * UIProcess/API/efl/ewk_context_menu_item.cpp: (EwkContextMenuItem::EwkContextMenuItem): (ewk_context_menu_item_parent_menu_get): * UIProcess/API/efl/ewk_context_menu_item.h: * UIProcess/API/efl/ewk_context_menu_item_private.h: (EwkContextMenuItem::create): (EwkContextMenuItem::parentMenu): (EwkContextMenuItem::setParentMenu): (EwkContextMenuItem): * UIProcess/API/efl/tests/test_ewk2_context_menu.cpp: (showContextMenu): 2013-04-16 Andreas Kling Fix release builds with !LOG_DISABLED. * Platform/mac/Logging.mac.mm: 2013-04-16 Manuel Rego Casasnovas [GTK][EFL] Remove deprecated libsoup API usage https://bugs.webkit.org/show_bug.cgi?id=104894 Reviewed by Philippe Normand. Remove LIBSOUP_USE_UNSTABLE_REQUEST_API and only include libsoup/soup.h. * WebProcess/Cookies/soup/WebKitSoupCookieJarSqlite.h: * WebProcess/efl/WebProcessMainEfl.cpp: * WebProcess/gtk/WebProcessMainGtk.cpp: * WebProcess/soup/WebKitSoupRequestGeneric.h: * WebProcess/soup/WebProcessSoup.cpp: * WebProcess/soup/WebSoupRequestManager.cpp: (WebKit::WebSoupRequestManager::registerURIScheme): Remove requester and use method soup_session_add_feature_by_type(). 2013-04-15 Dean Jackson Plugins that resize might need to be snapshotted. https://bugs.webkit.org/show_bug.cgi?id=102157 Reviewed by Tim Horton. Allow a running plugin to be snapshotted. All this means is that we start the snapshot timer again. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::beginSnapshottingRunningPlugin): Restart the timer. * WebProcess/Plugins/PluginView.h: Virtual method declaration. 2013-04-15 Seokju Kwon [EFL][WK2] build fix after r148434 https://bugs.webkit.org/show_bug.cgi?id=114647 Reviewed by Benjamin Poulain. * UIProcess/API/efl/EwkView.cpp: (EwkView::showContextMenu): 2013-04-15 Jer Noble After switching to another space and back, video races to catch up with audio https://bugs.webkit.org/show_bug.cgi?id=114634 Reviewed by Tim Horton. In Mountain Lion and previous, report that a view is "not visible" when its window is not in the active space. This causes us to notify AVFoundation that its CAImageQueues will not be serviced and results in not having the "catch up" behavior when returning to the browser's space. * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::isViewVisible): 2013-04-15 Seulgi Kim Schedule rendering at regular interval (60fps) https://bugs.webkit.org/show_bug.cgi?id=114617 Reviewed by Martin Robinson. Schedule rendering reguarly regardless of the time taken to render a frame. Otherwise, next flush delayed by the amount of the rendering time. * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::LayerTreeHostGtk): (WebKit::LayerTreeHostGtk::layerFlushTimerFired): (WebKit::LayerTreeHostGtk::flushAndRenderLayers): * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: 2013-04-15 Michał Pakuła vel Rutka [EFL][WK2] Use C API in ewk_context_menu https://bugs.webkit.org/show_bug.cgi?id=109698 Reviewed by Andreas Kling. EFL port unlike others does not handle context menus inside WebKit but exposes an API: ewk_context_menu and ewk_context_menu_item, and leaves context menu to application. Currently EFL port's context menu API uses internal C++ classes, while it should use WK2 C API, to avoid violating layering. This patch changes EFL context menu API to use only WK2 C API. * UIProcess/API/efl/EwkView.cpp: (EwkView::showContextMenu): * UIProcess/API/efl/EwkView.h: (WebKit): (EwkView): * UIProcess/API/efl/ewk_context_menu.cpp: (EwkContextMenu::EwkContextMenu): (EwkContextMenu::contextMenuItemSelected): (ewk_context_menu_item_select): (getWKTagFromEwkAction): * UIProcess/API/efl/ewk_context_menu_item.cpp: (EwkContextMenuItem::EwkContextMenuItem): (getEwkActionFromWKTag): * UIProcess/API/efl/ewk_context_menu_item.h: * UIProcess/API/efl/ewk_context_menu_item_private.h: (EwkContextMenuItem::create): (EwkContextMenuItem): * UIProcess/API/efl/ewk_context_menu_private.h: (EwkContextMenu::create): (EwkContextMenu): * UIProcess/efl/ContextMenuClientEfl.cpp: (showContextMenu): (hideContextMenu): (ContextMenuClientEfl::ContextMenuClientEfl): * UIProcess/efl/ContextMenuClientEfl.h: (WebKit::ContextMenuClientEfl::view): * UIProcess/efl/WebContextMenuProxyEfl.cpp: (WebKit::WebContextMenuProxyEfl::showContextMenu): (WebKit::WebContextMenuProxyEfl::hideContextMenu): * UIProcess/efl/WebContextMenuProxyEfl.h: (WebContextMenuProxyEfl): 2013-04-15 Balazs Kelemen [CoordGfx] Background color should not be part of GraphicsLayerState https://bugs.webkit.org/show_bug.cgi?id=113785 Reviewed by Andreas Kling. Page background is independent from layer state, send it to the UI as soon as possible. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::setBackgroundColor): 2013-04-15 Michał Pakuła vel Rutka [WK2] Add new callbacks and a function for WebKit2 context menu API https://bugs.webkit.org/show_bug.cgi?id=111552 Reviewed by Anders Carlsson. Add contextMenuHide and contextMenuShow callbacks to WKPageContextMenuClient and WKPageContextMenuSelected API so context menus can be handled outside WebKit. API version of this client was bumped so older client version still can be used * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * UIProcess/API/C/WKPage.cpp: (WKPageSelectContextMenuItem): * UIProcess/API/C/WKPage.h: * UIProcess/API/gtk/WebKitContextMenuClient.cpp: (attachContextMenuClientToView): * UIProcess/WebPageContextMenuClient.cpp: (WebKit::WebPageContextMenuClient::getContextMenuFromProposedMenu): (WebKit::WebPageContextMenuClient::showContextMenu): (WebKit): (WebKit::WebPageContextMenuClient::hideContextMenu): * UIProcess/WebPageContextMenuClient.h: (WebPageContextMenuClient): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::internalShowContextMenu): * UIProcess/efl/ContextMenuClientEfl.cpp: (ContextMenuClientEfl::ContextMenuClientEfl): 2013-04-14 Christophe Dumez [EFL][WK2] Regression(r148274): Broke rendering in the browser https://bugs.webkit.org/show_bug.cgi?id=114593 Reviewed by Anders Carlsson. r148274 added a new "didChangeViewportAttributes" callback to WKView but did not hook it up in ViewClientEfl. This patch fixes this and makes rendering work again in the browser. * UIProcess/efl/ViewClientEfl.cpp: (WebKit::ViewClientEfl::ViewClientEfl): 2013-04-14 Andreas Kling Move CSSOM classes to using MutableStylePropertySet over StylePropertySet. Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::shouldApplyStyle): 2013-04-14 Christophe Dumez Unreviewed build fix for WebKit2 EFL after r148373 due to missing header includes. * UIProcess/InspectorServer/efl/WebInspectorServerEfl.cpp: * UIProcess/efl/InputMethodContextEfl.cpp: 2013-04-13 Sam Weinig Add ObjC API for setting initialization data for the WKWebProcessPlugIn https://bugs.webkit.org/show_bug.cgi?id=103846 Reviewed by Darin Adler. * UIProcess/API/mac/WKProcessGroup.h: Adds a new optional processGroupWillCreateConnectionToWebProcessPlugIn: method for the WKProcessGroupDelegate protocol, which allows the user to pass (via an autoreleased return value) initialization data to the web process plugin. * UIProcess/API/mac/WKProcessGroup.mm: (getInjectedBundleInitializationUserData): (setUpInectedBundleClient): (-[WKProcessGroup initWithInjectedBundleURL:]): (-[WKProcessGroup dealloc]): Use the existing WKContextInjectedBundleClient infrastructure to pass the initialization data to the bundle via the new ObjCObjectGraph APIObject. * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.h: Adds webProcessPlugIn:initializeWithObject: to the WKWebProcessPlugIn protocol, replacing webProcessPlugInInitialize:. * WebProcess/InjectedBundle/mac/InjectedBundleMac.mm: (WebKit::InjectedBundle::load): Pass the initialization data to the web process plugin. 2013-04-13 Sam Weinig Attempt Build Fix. * WebProcess/Plugins/Netscape/NPJSObject.cpp: 2013-04-12 Sam Weinig Make Frame's ScriptController an OwnPtr and remove the #include https://bugs.webkit.org/show_bug.cgi?id=114105 Reviewed by Dean Jackson. * Shared/WebHitTestResult.cpp: * Shared/WebHitTestResult.h: * UIProcess/Plugins/PlugInAutoStartProvider.cpp: * UIProcess/WebContext.h: * UIProcess/WebPageProxy.h: * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp: * WebProcess/Plugins/Netscape/NPJSObject.cpp: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: * WebProcess/Plugins/PDF/PDFPlugin.h: * WebProcess/Plugins/PluginView.cpp: * WebProcess/Storage/StorageAreaImpl.cpp: * WebProcess/Storage/StorageAreaMap.cpp: * WebProcess/WebPage/WebFrame.cpp: * WebProcess/WebPage/WebPage.cpp: 2013-04-13 Zan Dobersek Unreviewed GTK build fix after r148311. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (resizeWebKitWebViewBaseFromAllocation): Passing IntSize() as the scroll offset argument to the DrawingAreaProxy::setSize method. 2013-04-12 Gavin Barraclough Add private interface to WKView to asynchronously update the drawing area size https://bugs.webkit.org/show_bug.cgi?id=114549 Reviewed by Simon Fraser. This will allow a client using the WKView to resize the contents without blocking waiting for the web process to repaint. * UIProcess/API/mac/WKView.mm: (-[WKView _setDrawingAreaSize:]): - if the new size of teh drawing area does not match the frame size, position it according to the contentAnchor. (-[WKView updateLayer]): - Don't let a subsequent frame size change block on a prior async resize. (-[WKView forceAsyncDrawingAreaSizeUpdate:]): - resize the drawing area asynchronously, even if frame size udpates are disabled. (-[WKView waitForAsyncDrawingAreaSizeUpdate]): - wait for asynchronous updates to complete. * UIProcess/API/mac/WKViewPrivate.h: - declare new methods. * UIProcess/DrawingAreaProxy.cpp: (WebKit): * UIProcess/DrawingAreaProxy.h: (DrawingAreaProxy): (WebKit::DrawingAreaProxy::waitForPossibleGeometryUpdate): * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: (TiledCoreAnimationDrawingAreaProxy): * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::waitForPossibleGeometryUpdate): - pass timeout for waitForPossibleGeometryUpdate as a parameter. 2013-04-12 Jessie Berlin 32-bit build fix. * UIProcess/API/mac/WKView.mm: (-[WKView setFrameSize:]): 2013-04-12 Jeffrey Pfau Query directly for cache partition names https://bugs.webkit.org/show_bug.cgi?id=114538 Reviewed by David Kilzer. Call back into WebKitSystemInterface to ask it for the cache partition names instead of trying to figure them out. * WebProcess/ResourceCache/WebResourceCacheManager.cpp: (WebKit::WebResourceCacheManager::getCacheOrigins): (WebKit): (WebKit::WebResourceCacheManager::returnCacheOrigins): * WebProcess/ResourceCache/WebResourceCacheManager.h: (WebResourceCacheManager): * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: (WebKit::WebResourceCacheManager::cfURLCacheHostNames): (WebKit): (WebKit::WebResourceCacheManager::cfURLCacheHostNamesWithCallback): 2013-04-12 Gavin Barraclough Build fix - too soon! * UIProcess/API/mac/WKViewPrivate.h: 2013-04-12 Gavin Barraclough Build fix - too soon! * UIProcess/API/mac/WKView.mm: (-[WKView setFrameSize:]): 2013-04-12 Adenilson Cavalcanti [WK2] WebPageProxy loadURL() won't work when called just after terminateProcess() https://bugs.webkit.org/show_bug.cgi?id=110743 Reviewed by Benjamin Poulain. A call to loadURL() just after terminating WebProcess will fail thanks to WebPageProxy being in an undefined state since it is in the middle of its own cleanup after process termination. To properly fix this, not only WebPageProxy cleanup should be made at WebProcess termination request, but also WebProcessProxy needs to only return to its caller after terminating the process and closing connections. Otherwise, WebPageProxy can even be able to detect that WebProcess is no longer running, but a call to respawn the process will fail. To fix these issues, this patch moves the cleanup code to a shared private function that is used for both the cases i.e. user termination and real crash. WebProcess shutdown is done using a new method that ensures that all cleanup was done before returning. A last change introduced in this patch is that for user requested termination, clients are no longer notified of a crash (since it is not a crash). * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::terminateProcess): (WebKit::WebPageProxy::processDidCrash): (WebKit): (WebKit::WebPageProxy::resetStateAfterProcessExited): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::userRequestedTerminate): (WebKit): * UIProcess/WebProcessProxy.h: (WebProcessProxy): 2013-04-12 Gavin Barraclough Add contentAnchor to WKView http://bugs.webkit.org/show_bug.cgi?id=114469 Currently if you call setFrameSize: while frame size updates are disabled, or if the geometry update times out, then the previously rendered page content will be rendered anchored to the top left corner of the frame. This is appropriate if the frame is being resized from the bottom right corner. In order to achieve a more desirable appearance if the frame is being resized from another corner we should allow the corner at which the content anchors to be specified. Reviewed by Simon Fraser. * UIProcess/API/mac/WKView.mm: (-[WKView setFrameSize:]): - If the content anchor has been set, then updating the frame size moves the origin within the layer. (-[WKView _setDrawingAreaSize:]): - Instruct the drawing area to paint at the correct position within the layer. (-[WKView _setAcceleratedCompositingModeRootLayer:]): - If the root layer is cleared this implicitly resets any origin position we had set within it. (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): - initialize new data members. (-[WKView setContentAnchor:]): (-[WKView contentAnchor]): - Accessor implementation for @property contentAnchor. * UIProcess/API/mac/WKViewPrivate.h: (NS_ENUM): - Added WKContentAnchor enum type, and @property contentAnchor. * UIProcess/DrawingAreaProxy.cpp: (WebKit::DrawingAreaProxy::setSize): - Don't suppress geometry updates where the layer poistion has changed. * UIProcess/DrawingAreaProxy.h: (DrawingAreaProxy): - Added m_layerPosition, layerPosition argument to setSize * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.h: (TiledCoreAnimationDrawingAreaProxy): - Added m_lastSentLayerPosition * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::didUpdateGeometry): - Don't suppress geometry updates where the layer poistion has changed. (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry): - Pass layer position in UpdateGeometry message. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::updateGeometry): - Added layerPosition argument to updateGeometry * WebProcess/WebPage/DrawingArea.messages.in: - Added layerPosition argument to updateGeometry * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): - Added layerPosition argument to updateGeometry * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): - Added layerPosition argument to updateGeometry 2013-04-12 Commit Queue Unreviewed, rolling out r148296 and r148297. http://trac.webkit.org/changeset/148296 http://trac.webkit.org/changeset/148297 https://bugs.webkit.org/show_bug.cgi?id=114536 Needs more thought (Requested by ap on #webkit). * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: 2013-04-12 Tim Horton REGRESSION (r138858): GIFs don't start playing when they come out of background tabs https://bugs.webkit.org/show_bug.cgi?id=108864 Reviewed by Antti Koivisto. Don't repaint the world when animations resume; instead, FrameView will cause all animated images to repaint. This line also had no effect for TiledCoreAnimationDrawingArea, which does not implement setNeedsDisplay. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::resumeActiveDOMObjectsAndAnimations): 2013-04-12 Alexey Proskuryakov [Mac] Tweak sandbox profile. Apply a post-landing review comment. * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: 2013-04-12 Alexey Proskuryakov [Mac] Tweak sandbox profile. Reviewed by Jessie Berlin. * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: 2013-04-12 Carlos Garcia Campos [GTK] Split GtkAuthenticationDialog in two widgets https://bugs.webkit.org/show_bug.cgi?id=103644 Reviewed by Xan Lopez. * GNUmakefile.list.am: Add new files to compilation. * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.cpp: Removed. * UIProcess/API/gtk/WebKit2GtkAuthenticationDialog.h: Removed. * UIProcess/API/gtk/WebKitAuthenticationDialog.cpp: Added. (webkitAuthenticationDialogAuthenticate): Use the AuthenticationChallengeProxy to authenticate and destroy the dialog. (okButtonClicked): Call webkitAuthenticationDialogAuthenticate() with the credential. (cancelButtonClicked): Call webkitAuthenticationDialogAuthenticate() with a NULL credential to continue without credential. (webkitAuthenticationDialogInitialize): Build the UI. (webkitAuthenticationDialogDraw): Draw a background. (webkitAuthenticationDialogMap): Grab default button. (webkitAuthenticationDialogConstructed): Create a GtkStyleContext with the GtkWindow path to draw the widget background like a real dialog. (webkit_authentication_dialog_class_init): (webkitAuthenticationDialogNew): Create a new WebKitAuthenticationDialog widget. * UIProcess/API/gtk/WebKitAuthenticationDialog.h: Added. * UIProcess/API/gtk/WebKitLoaderClient.cpp: * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewHandleAuthenticationChallenge): Create a WebKitAuthenticationDialog widget and pass add it to the container. * UIProcess/API/gtk/WebKitWebViewBase.cpp: (_WebKitWebViewBasePrivate): Updated to use the widget directly. (webkitWebViewChildIsInternalWidget): Ditto. (webkitWebViewBaseAddAuthenticationDialog): Ditto. (webkitWebViewBaseCancelAuthenticationDialog): Ditto. (webkitWebViewBaseContainerRemove): Ditto. (webkitWebViewBaseContainerForall): Ditto. (resizeWebKitWebViewBaseFromAllocation): Ditto. (webkitWebViewBaseFocus): Ditto. (webkitWebViewBaseDestroy): Destroy the auth widget is present. (webkit_web_view_base_class_init): Add implementation for GtkWidgetClass::destroy. * UIProcess/API/gtk/WebKitWebViewBasePrivate.h: 2013-04-12 Carlos Garcia Campos [GTK] Web Process crash when the UI process finishes too early https://bugs.webkit.org/show_bug.cgi?id=112729 Reviewed by Anders Carlsson. The problem is when creating the GSocket in the WorkQeue for the socket descriptor. GLib considers a programmer error to create a GSocket providing an invalid socket and finishes the process with g_error(). We are actually providing a valid socket when creating the GSocket, but it can be invalidated by the worker thread while the GSocket is being created. This is because registerEventSourceHandler is called from the main thread and unregisterEventSourceHandler can be called from the worker thread. We are currently registering two event handlers, one to read data from the socket and another one to close the CoreIPC connection when the socket connection is broken. Every event source registered uses its own GSocket (even if the file descriptor is actually the same), so that when the UI process finishes too early, the first event handler can be executed in the worker thread, closing the socket descriptor, while the main thread is creating the GSocket for the second one. We don't really need to use a separate event handler to monitor the connection, because GSocket always notifies when condition is G_IO_HUP and G_IO_ERR even if they haven't been explicitly set in g_socket_create_source(). We can register socket event sources differently, providing also a function to be called when the connection is closed, using a single socket and the same even source. * Platform/CoreIPC/unix/ConnectionUnix.cpp: (CoreIPC::Connection::platformInvalidate): (CoreIPC::Connection::open): Register a single socket event handler providing also a function to be called when the connection is closed. * Platform/WorkQueue.h: (WorkQueue): * Platform/gtk/WorkQueueGtk.cpp: The EventSource class has been split, moving everyting specific to socket event source to a derived class SocketEventSource. (WorkQueue::EventSource::EventSource): (WorkQueue::EventSource::performWork): (WorkQueue::EventSource::performWorkOnce): (WorkQueue::EventSource::performWorkOnTermination): (WorkQueue::EventSource::deleteEventSource): (WorkQueue::EventSource): (WorkQueue::SocketEventSource): (WorkQueue::SocketEventSource::SocketEventSource): (WorkQueue::SocketEventSource::cancel): (WorkQueue::SocketEventSource::didClose): (WorkQueue::SocketEventSource::checkCondition): (WorkQueue::SocketEventSource::eventCallback): (WorkQueue::registerSocketEventHandler): (WorkQueue::unregisterSocketEventHandler): (WorkQueue::dispatchOnSource): 2013-04-12 Alexey Proskuryakov [Mac] Tweak sandbox profile. Reviewed by Anders Carlsson. * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: * WebProcess/com.apple.WebProcess.sb.in: 2013-04-12 Manuel Rego Casasnovas [GTK][WK2] Add document-loaded signal to WebKitWebPage https://bugs.webkit.org/show_bug.cgi?id=110614 Reviewed by Carlos Garcia Campos. Add a new signal document-loaded to WebKitWebPage that will be emitted when the DOM document has been loaded for the main frame. * UIProcess/API/gtk/tests/TestWebExtensions.cpp: (documentLoadedCallback): (testDocumentLoadedSignal): (beforeAll): Add test for document-loaded signal. * UIProcess/API/gtk/tests/WebExtensionTest.cpp: (documentLoadedCallback): (pageCreatedCallback): (methodCallCallback): Add new D-Bus signal DocumentLoaded in order to test document-loaded signal. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (webkit_web_page_class_init): (webkitWebPageCreate): Add document-loaded signal and emit it when didFinishDocumentLoadForFrame is called. 2013-04-12 Hanyee Kim [GTK] Webkit fails to build webkit2gtk-tests-resources.gresource. https://bugs.webkit.org/show_bug.cgi?id=114485 Reviewed by Martin Robinson. Generating webkit2gtk-tests-resources.gresource can be failed due to the non-existing target directory. We need to make target directory before generating it. * UIProcess/API/gtk/tests/GNUmakefile.am: 2013-04-12 Andreas Kling REGRESSION(r145869): Right-click on SWF contents displays the context menu at the wrong place. Reviewed by Anders "Wesley Crusher" Carlsson. Mac plugins expect flipped-Y screen coordinates, while DOM APIs speak in unflipped coordinates, and we were mixing them up in the window frame caching optimization. Solve this by having the UIProcess send both flipped and unflipped window frames to the WebProcess. The flipped frame is passed on to plugins, and the unflipped frame is used for window.screenX/Y etc. * UIProcess/API/mac/WKView.mm: (-[WKView _updateWindowAndViewFrames]): No need to retrieve the window frame here as WebPageProxy::windowAndViewFramesChanged() will always override it anyway. * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::windowAndViewFramesChanged): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::windowRect): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::windowAndViewFramesChanged): * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::windowFrameInUnflippedScreenCoordinates): * WebProcess/WebPage/WebPage.messages.in: 2013-04-12 Mikhail Pozdnyakov [WK2][EFL] WebView: Add callbacks to the WKViewClient to handle page viewport update https://bugs.webkit.org/show_bug.cgi?id=110463 Reviewed by Anders Carlsson. * UIProcess/efl/ViewClientEfl.h: (ViewClientEfl): * UIProcess/efl/WebView.cpp: (WebKit::WebView::didChangeViewportProperties): * UIProcess/efl/WebViewClient.cpp: (WebKit::WebViewClient::didChangeViewportAttributes): (WebKit): * UIProcess/efl/WebViewClient.h: Added didChangeViewportAttributes callback to the WKViewClient to handle page viewport updates. * CMakeLists.txt: * Shared/API/c/WKBase.h: * Shared/APIObject.h: * UIProcess/API/C/WKAPICast.h: (WebKit): * UIProcess/API/C/WKViewportAttributes.cpp: Added. (WKViewportAttributesGetTypeID): * UIProcess/API/C/WKViewportAttributes.h: Added. * UIProcess/API/C/efl/WKView.h: * UIProcess/WebViewportAttributes.cpp: Added. (WebKit): (WebKit::WebViewportAttributes::WebViewportAttributes): (WebKit::WebViewportAttributes::~WebViewportAttributes): * UIProcess/WebViewportAttributes.h: Added. (WebKit): (WebViewportAttributes): (WebKit::WebViewportAttributes::create): (WebKit::WebViewportAttributes::originalAttributes): (WebKit::WebViewportAttributes::type): Added WKViewportAttributesRef - WK2 C API object that is wrapping WebCore::ViewportAttributes structure and is passed in didChangeViewportAttributes WKViewClient callback. * UIProcess/efl/ViewClientEfl.cpp: (WebKit::ViewClientEfl::didChangeViewportAttributes): (WebKit): Added implementaion of didChangeViewportAttributes WKViewClient callback so that existing EFL WK2 funtionality is kept. 2013-04-12 Carlos Garcia Campos [GTK] The style of visited links doesn't change in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=112175 Reviewed by Benjamin Poulain. The problem is that visited links were not tracked by the web process. There's a web process initial parameter to set whether web process should track visited links or not and it's disabled by default. * UIProcess/gtk/WebContextGtk.cpp: (WebKit::WebContext::platformInitializeWebProcess): Always set shouldTrackVisitedLinks to true. 2013-04-11 Tim Horton REGRESSION (r146956): ASSERTion failure: WebKit::WebProcess::pageWillLeaveWindow https://bugs.webkit.org/show_bug.cgi?id=114481 Reviewed by Simon Fraser. Inform the WebProcess of WebPages which are already in a window when created. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): 2013-04-11 Anders Carlsson Add support for clearing storage areas https://bugs.webkit.org/show_bug.cgi?id=114479 Reviewed by Beth Dakin. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::StorageArea::StorageArea): Store the quota size so we can recreate the underlying StorageMap when clearing. (WebKit::StorageManager::StorageArea::clear): Create a new storage map and dispatch events. (WebKit::StorageManager::clear): Find the right storage area and call clear. * UIProcess/Storage/StorageManager.messages.in: Add Clear message. * WebProcess/Storage/StorageAreaImpl.cpp: (WebKit::StorageAreaImpl::clear): Call the storage map. * WebProcess/Storage/StorageAreaMap.cpp: (WebKit::StorageAreaMap::clear): Reset the cached values and send a clear message. (WebKit::StorageAreaMap::resetValues): New helper function. (WebKit::StorageAreaMap::didClear): New stub. * WebProcess/Storage/StorageAreaMap.messages.in: Add DidClear message. 2013-04-11 Beth Dakin WebKit should set the header and footer layers' contentsScale when the device scale factor changes https://bugs.webkit.org/show_bug.cgi?id=114471 -and corresponding- Reviewed by Simon Fraser. Update the header and footer contentsScale when the device scale factor has changed. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setDeviceScaleFactor): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::updateHeaderAndFooterLayersForDeviceScaleChange): 2013-04-11 Anders Carlsson Implement removing storage area items https://bugs.webkit.org/show_bug.cgi?id=114472 Reviewed by Beth Dakin. * UIProcess/Storage/StorageManager.cpp: (StorageManager::StorageArea): (WebKit::StorageManager::StorageArea::setItem): Rename connection to sourceConnection. (WebKit::StorageManager::StorageArea::removeItem): Remove the item from the map and dispatch events if needed. (WebKit::StorageManager::removeItem): Find the right storage area, remove the item and send back a DidRemoveItem message. * UIProcess/Storage/StorageManager.messages.in: Add RemoveItem message. * WebProcess/Storage/StorageAreaImpl.cpp: (WebKit::StorageAreaImpl::removeItem): Call StorageAreaMap::removeItem. * WebProcess/Storage/StorageAreaMap.cpp: (WebKit::StorageAreaMap::removeItem): Send a RemoveItem message to the storage manager. (WebKit::StorageAreaMap::didRemoveItem): Add empty stub. * WebProcess/Storage/StorageAreaMap.messages.in: Add DidRemoveItem message. 2013-04-11 Tim Horton InjectedBundleNodeHandle::imageForRect doesn't respect device scale factor or highlighting option https://bugs.webkit.org/show_bug.cgi?id=114466 Reviewed by Simon Fraser. Respect the device scale factor when creating the snapshot image. Clear the snapshot image before drawing into it. Respect SnapshotOptionsExcludeSelectionHighlighting. * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::imageForRect): 2013-04-11 Commit Queue Unreviewed, rolling out r148034, r148052, r148097, and r148194. http://trac.webkit.org/changeset/148034 http://trac.webkit.org/changeset/148052 http://trac.webkit.org/changeset/148097 http://trac.webkit.org/changeset/148194 https://bugs.webkit.org/show_bug.cgi?id=114463 broke mutiresolution favicons, among other things (Requested by thorton on #webkit). * UIProcess/WebIconDatabase.cpp: (WebKit::WebIconDatabase::setIconDataForIconURL): * UIProcess/WebIconDatabase.h: (WebIconDatabase): * UIProcess/WebIconDatabase.messages.in: * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: (WebKit::WebIconDatabaseProxy::setIconDataForIconURL): * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::destroy): 2013-04-11 Anders Carlsson Implement StorageManager::getValues https://bugs.webkit.org/show_bug.cgi?id=114461 Reviewed by Beth Dakin. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::StorageArea::items): (WebKit::StorageManager::getValues): Return the items from the right storage area. 2013-04-11 Anders Carlsson Clean up related storage areas when a connection is destroyed https://bugs.webkit.org/show_bug.cgi?id=114459 Reviewed by Beth Dakin. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::processWillCloseConnection): Dispatch invalidateConnectionInternal on the work queue. (WebKit::StorageManager::createStorageMap): (WebKit::StorageManager::destroyStorageMap): Rename m_storageAreas to m_storageAreasByConnection. (WebKit::StorageManager::invalidateConnectionInternal): Go over all known storage areas and remove this connection as a listener. (WebKit::StorageManager::findStorageArea): Rename m_storageAreas to m_storageAreasByConnection. * UIProcess/Storage/StorageManager.h: Rename m_storageAreas to m_storageAreasByConnection. 2013-04-11 Anders Carlsson Make StorageAreaMap dispatch session storage events https://bugs.webkit.org/show_bug.cgi?id=114454 Reviewed by Beth Dakin. * WebProcess/Storage/StorageAreaMap.cpp: (WebKit::StorageAreaMap::dispatchStorageEvent): Depending on the storage area type, call dispatchSessionStorageEvent or dispatchLocalStorageEvent. (WebKit::StorageAreaMap::dispatchSessionStorageEvent): Enumerate all the frames in our page and dispatch the event to the relevant ones. (WebKit::StorageAreaMap::dispatchLocalStorageEvent): Add empty stub for now. 2013-04-11 Anders Carlsson Implement more logic in StorageAreaMap https://bugs.webkit.org/show_bug.cgi?id=114451 Reviewed by Alexey Proskuryakov. * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Add new overload. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::StorageArea::addListener): (WebKit::StorageManager::StorageArea::removeListener): These take storage map IDs. (WebKit::StorageManager::StorageArea::setItem): Rename storageAreaID to sourceStorageAreaID. (WebKit::StorageManager::StorageArea::dispatchEvents): Remove the code that would not dispatch to the source connection, there may still be storage areas interested in those events. (WebKit::StorageManager::setItem): This now takes the source storage area ID. (WebKit::StorageManager::findStorageArea): This takes a storage map ID. * UIProcess/Storage/StorageManager.messages.in: SetItem now takes the source storage area ID as well. * WebProcess/Storage/StorageAreaImpl.cpp: (WebKit::StorageAreaImpl::setItem): Pass the source frame to StorageAreaMap::setItem. * WebProcess/Storage/StorageAreaMap.cpp: (WebKit::StorageAreaMap::StorageAreaMap): Send CreateStorageMap and add the object as a message receiver. (WebKit::StorageAreaMap::~StorageAreaMap): Send DestroyStorageMap and remove the object as a message receiver. (WebKit::StorageAreaMap::length): (WebKit::StorageAreaMap::key): (WebKit::StorageAreaMap::item): (WebKit::StorageAreaMap::contains): Load values and forward calls to the storage map. (WebKit::StorageAreaMap::setItem): This now takes the source frame as well. Update the local storage map and send a SetItem message. (WebKit::StorageAreaMap::loadValuesIfNeeded): Get the values from the storage manager. (WebKit::StorageAreaMap::dispatchStorageEvent): This now takes the source storage area ID. * WebProcess/Storage/StorageAreaMap.messages.in: DispatchStorageEvent now takes the source storage area ID. 2013-04-10 Brady Eidson Web/Plugin process deadlock initializing async plugins. and https://bugs.webkit.org/show_bug.cgi?id=114217 Rubberstamped by Anders Carlsson. Rollout r147953 and r147968 as we identified other causes for this. * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::createPluginAsynchronously): * WebProcess/Plugins/PluginProxy.messages.in: 2013-04-11 Alexey Proskuryakov Remove some ResourceHandle.h includes https://bugs.webkit.org/show_bug.cgi?id=114416 Reviewed by Ryosuke Niwa. * WebProcess/Network/NetworkProcessConnection.cpp: Added an include that is now necessary. 2013-04-11 Allan Sandfeld Jensen [Qt] EventHandler should handle Space and BackSpace https://bugs.webkit.org/show_bug.cgi?id=114428 Reviewed by Jocelyn Turcotte. Remove our own handling of space and backspace. * WebProcess/WebPage/qt/WebPageQt.cpp: (WebKit::WebPage::performDefaultBehaviorForKeyEvent): 2013-04-11 Csaba Osztrogonác Unreviewed Qt buildfixes after r148147, r148148 and r148154. * DerivedSources.pri: * Target.pri: 2013-04-10 Zan Dobersek Unreviewed GTK build fix, fixing the WebKit2 build. * GNUmakefile.list.am: 2013-04-10 Gyuyoung Kim [WK2] Build warning in didReceiveMessage() generated by messages.py https://bugs.webkit.org/show_bug.cgi?id=112513 Reviewed by Anders Carlsson. Legacy receiver makes -Wunused-parameter build warnings. This patch is to fix them. * Scripts/webkit2/messages.py: (generate_message_handler): 2013-04-10 Jaehun Lim [CMAKE] Build fix after StorageArea refactoring https://bugs.webkit.org/show_bug.cgi?id=114398 Unreviewed build fix. Change StorageAreaImpl.messages.in with StorageAreaMap.messages.in. Add StorageAreaMap.cpp in CMakeLists.txt. * CMakeLists.txt: 2013-04-10 Anders Carlsson Make StorageAreaImpl a wrapper around StorageAreaMap https://bugs.webkit.org/show_bug.cgi?id=114404 Reviewed by Oliver Hunt. Prepare for moving all the code that deals with local storage values to StorageAreaMap, and make StorageAreaImpl a dumb wrapper that simply calls through to the map. * WebProcess/Storage/StorageAreaImpl.cpp: (WebKit::StorageAreaImpl::create): (WebKit::StorageAreaImpl::StorageAreaImpl): (WebKit::StorageAreaImpl::~StorageAreaImpl): (WebKit::StorageAreaImpl::storageType): (WebKit::StorageAreaImpl::length): (WebKit::StorageAreaImpl::key): (WebKit::StorageAreaImpl::getItem): (WebKit::StorageAreaImpl::setItem): (WebKit::StorageAreaImpl::contains): * WebProcess/Storage/StorageAreaImpl.h: (WebKit::StorageAreaImpl::storageAreaID): * WebProcess/Storage/StorageAreaMap.cpp: (WebKit::generateStorageMapID): (WebKit::StorageAreaMap::create): (WebKit::StorageAreaMap::StorageAreaMap): (WebKit::StorageAreaMap::storageType): (WebKit::StorageAreaMap::length): (WebKit::StorageAreaMap::key): (WebKit::StorageAreaMap::item): (WebKit::StorageAreaMap::setItem): (WebKit::StorageAreaMap::contains): (WebKit::StorageAreaMap::didSetItem): (WebKit::StorageAreaMap::dispatchStorageEvent): * WebProcess/Storage/StorageAreaMap.h: * WebProcess/Storage/StorageNamespaceImpl.cpp: (WebKit::StorageNamespaceImpl::storageArea): * WebProcess/Storage/StorageNamespaceImpl.h: (StorageNamespaceImpl): 2013-04-10 Anders Carlsson Rename StorageManager messages to refer to the StorageMap instead of the StorageArea https://bugs.webkit.org/show_bug.cgi?id=114401 Reviewed by Ryosuke Niwa. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::createStorageMap): (WebKit::StorageManager::destroyStorageMap): (WebKit::StorageManager::setItem): * UIProcess/Storage/StorageManager.h: * UIProcess/Storage/StorageManager.messages.in: * WebProcess/Storage/StorageAreaImpl.cpp: (WebKit::StorageAreaImpl::StorageAreaImpl): (WebKit::StorageAreaImpl::~StorageAreaImpl): 2013-04-10 Benjamin Poulain Mass remove all the empty directories Rubberstamped by Ryosuke Niwa. * Platform/CoreIPC/gtk: Removed. * Platform/CoreIPC/qt: Removed. * PluginProcess/EntryPoint/mac/XPCService/PluginService.32: Removed. * PluginProcess/EntryPoint/mac/XPCService/PluginService.64: Removed. * PluginProcess/gtk: Removed. * Shared/API/c/win: Removed. * Shared/Plugins/Netscape/win: Removed. * Shared/cg/win: Removed. * Shared/win: Removed. * UIProcess/API/C/win: Removed. * UIProcess/API/gtk/webkit: Removed. * UIProcess/Launcher/win: Removed. * UIProcess/Plugins/gtk: Removed. * UIProcess/Plugins/win: Removed. * UIProcess/texmap: Removed. * UIProcess/win: Removed. * WebProcess/Authentication/mac: Removed. * WebProcess/Cookies/efl: Removed. * WebProcess/Cookies/gtk: Removed. * WebProcess/Downloads/cf/win: Removed. * WebProcess/Downloads/cfnet: Removed. * WebProcess/Downloads/curl: Removed. * WebProcess/Downloads/efl: Removed. * WebProcess/Downloads/gtk: Removed. * WebProcess/Downloads/mac: Removed. * WebProcess/Downloads/qt: Removed. * WebProcess/Downloads/soup: Removed. * WebProcess/FullScreen/gtk: Removed. * WebProcess/FullScreen/mac: Removed. * WebProcess/FullScreen/qt: Removed. * WebProcess/FullScreen/win: Removed. * WebProcess/InjectedBundle/API/c/win: Removed. * WebProcess/InjectedBundle/win: Removed. * WebProcess/KeyValueStorage: Removed. * WebProcess/Network/CustomProtocols/mac: Removed. * WebProcess/Plugins/Netscape/gtk: Removed. * WebProcess/Plugins/Netscape/win: Removed. * WebProcess/WebCoreSupport/win: Removed. * WebProcess/WebPage/LayerTreeCoordinator: Removed. * WebProcess/WebPage/ca/mac: Removed. * WebProcess/WebPage/ca/win: Removed. * WebProcess/WebPage/win: Removed. * WebProcess/win: Removed. * qt/Resources: Removed. 2013-04-10 Jaehun Lim [CMAKE] Build fix after r148147, r148148 https://bugs.webkit.org/show_bug.cgi?id=114395 Unreviewed build fix. Use StorageAreaImpl, StorageNamespaceImpl instead of StorageAreaProxy, StorageNamespaceProxy. * CMakeLists.txt: 2013-04-10 Anders Carlsson Add a stubbed out StorageAreaMap class https://bugs.webkit.org/show_bug.cgi?id=114392 Reviewed by Andreas Kling. The intention is that StorageAreaMap is going to take over responsibility for storing the storage values in the web process, as well as dispatching events. A StorageAreaMap will be shared between multiple StorageAreaImpl objects, for example if multiple frames with the same origin use local storage. * DerivedSources.make: * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::StorageArea::dispatchEvents): (WebKit::StorageManager::setItem): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Storage/StorageAreaImpl.cpp: (WebKit::StorageAreaImpl::StorageAreaImpl): (WebKit::StorageAreaImpl::~StorageAreaImpl): * WebProcess/Storage/StorageAreaMap.cpp: Added. (WebKit): (WebKit::StorageAreaMap::create): (WebKit::StorageAreaMap::StorageAreaMap): (WebKit::StorageAreaMap::~StorageAreaMap): (WebKit::StorageAreaMap::didSetItem): (WebKit::StorageAreaMap::dispatchStorageEvent): * WebProcess/Storage/StorageAreaMap.h: Added. (WebKit): (StorageAreaMap): * WebProcess/Storage/StorageAreaMap.messages.in: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaImpl.messages.in. 2013-04-10 Anders Carlsson Rename StorageAreaProxy to StorageAreaImpl. Rubber-stamped by Beth Dakin. * DerivedSources.make: * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::StorageArea::dispatchEvents): (WebKit::StorageManager::setItem): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Storage/StorageAreaImpl.cpp: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.cpp. * WebProcess/Storage/StorageAreaImpl.h: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.h. * WebProcess/Storage/StorageAreaImpl.messages.in: Renamed from Source/WebKit2/WebProcess/Storage/StorageAreaProxy.messages.in. * WebProcess/Storage/StorageNamespaceImpl.cpp: (WebKit::StorageNamespaceImpl::storageArea): * WebProcess/Storage/StorageNamespaceImpl.h: (WebKit): (StorageNamespaceImpl): 2013-04-10 Anders Carlsson Rename StorageNamespaceProxy to StorageNamespaceImpl. Rubber-stamped by Beth Dakin. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::create): (WebKit::StorageAreaProxy::StorageAreaProxy): * WebProcess/Storage/StorageAreaProxy.h: (StorageAreaProxy): * WebProcess/Storage/StorageNamespaceImpl.cpp: Renamed from Source/WebKit2/WebProcess/Storage/StorageNamespaceProxy.cpp. * WebProcess/Storage/StorageNamespaceImpl.h: Renamed from Source/WebKit2/WebProcess/Storage/StorageNamespaceProxy.h. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::sessionStorageNamespace): 2013-04-10 Tim Horton [wk2] Un-pollute TCADA methods with "PageOverlayLayerMap::iterator end" https://bugs.webkit.org/show_bug.cgi?id=114387 Reviewed by Simon Fraser. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): (WebKit::TiledCoreAnimationDrawingArea::paintContents): (WebKit::TiledCoreAnimationDrawingArea::flushLayers): (WebKit::TiledCoreAnimationDrawingArea::setExposedRect): (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged): (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): 2013-04-10 Tim Horton [wk2] REGRESSION: Find highlight does not update when the view is resized https://bugs.webkit.org/show_bug.cgi?id=114382 Reviewed by Simon Fraser. Invalidate the page overlays from TiledCoreAnimationDrawingArea::updateGeometry. This will have no effect if the page overlay hasn't previously asked to be painted (as drawsContent will remain false on the layer). * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): Add invalidateAllPageOverlays. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::invalidateAllPageOverlays): Factor this out of didChangeScrollOffsetForAnyFrame. (WebKit::TiledCoreAnimationDrawingArea::didChangeScrollOffsetForAnyFrame): Call invalidateAllPageOverlays. (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): Call invalidateAllPageOverlays. 2013-04-10 Beth Dakin FindBanner matches are offset when the WKView has a header or footer https://bugs.webkit.org/show_bug.cgi?id=114314 -and corresponding- Reviewed by Simon Fraser. When calculating the matching rects, also adjust to the scroll offset that is relative to the Document. * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::rectsForTextMatches): 2013-04-10 Tobias Mueller Fixed build failure in Plugin.h: FloatPoint was not in namespace WebCore make[1]: *** Waiting for unfinished jobs.... In file included from Source/WebKit2/PluginProcess/PluginCreationParameters.h:31:0, from Source/WebKit2/PluginProcess/PluginCreationParameters.cpp:27: ./Source/WebKit2/WebProcess/Plugins/Plugin.h:268:58: error: 'FloatPoint' in namespace 'WebCore' does not name a type ./Source/WebKit2/WebProcess/Plugins/Plugin.h:268:77: error: ISO C++ forbids declaration of 'parameter' with no type [-fpermissive] cc1plus: warning: unrecognized command line option "-Wno-c++11-extensions" [enabled by default] make[1]: *** [Source/WebKit2/PluginProcess/libwebkit2gtk_3_0_la-PluginCreationParameters.lo] Error 1 It now passes that make target. https://bugs.webkit.org/show_bug.cgi?id=111862 Reviewed by Darin Adler. * WebProcess/Plugins/Plugin.h: (WebCore): Added FloatPoint to the WebCore namespace 2013-04-08 Anders Carlsson Remove unneeded headers from FrameLoader.h https://bugs.webkit.org/show_bug.cgi?id=114223 Reviewed by Geoffrey Garen. Include HistoryController.h from WebCore. * WebProcess/Plugins/PDF/SimplePDFPlugin.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebPage/WebPage.cpp: 2013-04-09 Geoffrey Garen Removed bitrotted TimeoutChecker code https://bugs.webkit.org/show_bug.cgi?id=114336 Reviewed by Alexey Proskuryakov. This mechanism hasn't worked for a while. MarkL is working on a new version of this feature with a distinct implementation. * WebProcess/Plugins/Netscape/NPJSObject.cpp: (WebKit::NPJSObject::construct): (WebKit::NPJSObject::invoke): * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.cpp: (WebKit::NPRuntimeObjectMap::evaluate): 2013-04-09 Mark Rowe WKNavigationData needs to expose the destination of the navigation Introduce WKNavigationDataCopyNavigationDestinationURL to access the destination of the navigation. Reviewed by Dan Bernstein. * UIProcess/API/C/WKNavigationData.cpp: (WKNavigationDataCopyURL): Add a note about returning the URL from the original request for sake of backwards-compatibility. (WKNavigationDataCopyNavigationDestinationURL): Return the URL from our underlying WebNavigationDataStore. * UIProcess/API/C/WKNavigationData.h: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::updateGlobalHistory): Store the current URL in to the WebNavigationDataStore object. WKNavigationData can retrieve the value that we were previously storing here via the originalRequest. 2013-04-09 Mark Rowe WKPageCopySessionState needs to provide more context to the filter callback Introduce a new value type for WKPageSessionStateFilterCallback that represents the passing of whole WKBackForwardListItemRefs to the filter callback. This allows clients to consider more than the original URL of the item when filtering entries from the session state. Reviewed by Darin Adler. * UIProcess/API/C/WKPage.cpp: (WKPageGetSessionBackForwardListItemValueType): Return a static string representing our new value type. * UIProcess/API/C/WKPage.h: * UIProcess/cf/WebBackForwardListCF.cpp: (WebKit::WebBackForwardList::createCFDictionaryRepresentation): Call the filter function with each of the possible value types in turn, respecting the first false value, if any, that is returned. 2013-04-10 Anton Obzhirov [GTK] Add support for Page Visibility https://bugs.webkit.org/show_bug.cgi?id=97324 Reviewed by Sam Weinig. Added new unittest to test page visibility using GTK Widget visibility API. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewPageVisibility): (beforeAll): * UIProcess/API/gtk/tests/WebViewTest.cpp: (WebViewTest::showInWindow): * UIProcess/API/gtk/tests/WebViewTest.h: 2013-04-10 Zan Dobersek REGRESSION (r146518): WebKit2APITests/TestInspector is failing https://bugs.webkit.org/show_bug.cgi?id=113281 Reviewed by Darin Adler. Changes to the WebInspectorProxy opening processing in r146518 caused the change in how the GTK-specific WebInspectorProxy code operates, specifically the 'bring-to-front' signal is not emitted anymore when opening the inspector due to the WebInspectorProxy::bringToFront method now only bringing the inspector window to front if it exists and opening it (and thus unable to bring it to front) otherwise. Closing of the inspector through the didClose method is now done immediately after sending the WebInspector::Close() message to the WebProcess rather than waiting for the WebProcess to communicate back the order of closing. Due to this the relevant code in the test cases had to be changed to not run the loop but rather just check that the closing was successful. (InspectorTest::InspectorTest): Remove the initialization of the now redundant m_quitOnBringToFront member variable. (InspectorTest::bringToFront): Quit the loop without checking the removed member variable. (InspectorTest::closed): Do not quit the loop as it is not run anymore. (InspectorTest::showIdle): A helper method that asynchronously calls the webkit_web_inspector_show method, removing some unnecessary complexity about under what exact circumstances to quit the loop in open-window/bring-to-front callbacks. (InspectorTest::show): Replaces the showAndWaitUntilFinished method, adding an idle invocation of the showIdle helper method and running the loop. (InspectorTest::close): Formerly closeAndWaitUntilClosed, now does not run the loop anymore as there's no need for it. (testInspectorDefault): Only the window opening event is now expected upon showing the inspector for the first time. Adjusting callsites to use InspectorTest::show and InspectorTest::close instead of InspectorTest::showAndWaitUntilFinished and InspectorTest::showAndWaitUntilFinished. (CustomInspectorTest::destroyWindow): Formerly destroyWindowAndWaitUntilClosed, the closing is not asynchronous anymore so the loop is not run. (testInspectorManualAttachDetach): Only the window opening event is now expected upon showing the inspector for the first time. Adjusting callsites to use InspectorTest::show and InspectorTest::close instead of InspectorTest::showAndWaitUntilFinished and InspectorTest::showAndWaitUntilFinished. (testInspectorCustomContainerDestroyed): Adjusting callsites to use InspectorTest::show and CustomInspectorTest::destroyWindow instead of InspectorTest::showAndWaitUntilFinished and CustomInspectorTest::destroyWindowAndWaitUntilClosed. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::show): When showing a connected WebInspectorProxy, call the bringToFront method which will open the inspector if it's not yet visible or bring it to the front otherwise. 2013-04-10 Zan Dobersek [GTK][WK2] Implement WebInspectorProxy::platformInspectedWindowWidth https://bugs.webkit.org/show_bug.cgi?id=113498 Reviewed by Martin Robinson. The method was introduced in r147004. * UIProcess/API/gtk/tests/TestInspector.cpp: Specify the gMinimumAttachedInspectorWidth variable, reflecting the value of WebInspectorProxy::minimumAttachedWidth. Use it as the width to which the inspected view should be resized in InspectorTest::resizeViewAndAttach. * UIProcess/gtk/WebInspectorProxyGtk.cpp: (WebKit::WebInspectorProxy::platformInspectedWindowHeight): Use the gtk_widget_get_allocated_height method to return the widget height. (WebKit::WebInspectorProxy::platformInspectedWindowWidth): Newly implemented, similarly uses the gtk_widget_get_allocated_width method to return the widget width. 2013-04-09 Antoine Quint WKFrameIsDisplayingMarkupDocument should return true for Web Archives https://bugs.webkit.org/show_bug.cgi?id=114291 Reviewed by Dean Jackson. Also return true for the Web Archive MIME type since a Web Archive is displaying a markup document by nature. * UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::isDisplayingMarkupDocument): 2013-04-09 Anders Carlsson REGRESSION (r147454): Youtube annotation links to new window broken https://bugs.webkit.org/show_bug.cgi?id=114242 Reviewed by Beth Dakin. Set the current user gesture to "DefinitelyProcessingNewUserGesture" if popups are allowed. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::performFrameLoadURLRequest): 2013-04-09 Anders Carlsson If we fail to decode a message name, pass the message length as the name https://bugs.webkit.org/show_bug.cgi?id=114305 Reviewed by Sam Weinig. * Platform/CoreIPC/ArgumentDecoder.h: (CoreIPC::ArgumentDecoder::length): * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::processIncomingMessage): 2013-04-08 Dean Jackson Don't create another plugin process for restarted plugins https://bugs.webkit.org/show_bug.cgi?id=114233 Reviewed by Geoff Garen. A snapshotting plugin starts in a separate process from regular plugins. This can be a little confusing to users because they might see two plugin processes. We can set the minimum life and timeout on the snapshotting process to much smaller values, since the process doesn't need to live that long. This will reduce some potential confusion. Also, since there is another plugin process running real plugins, it should be paged in if it needs to restart. There was, however, a bug in the process management. A restarted plugin received a special PluginProcess::Type, so that it could cross fade into the page nicely. This caused it to start a *third* plugin process. Instead mark a restarted flag directly on the PluginProxy and revert back to two process types. * PluginProcess/PluginProcess.h: Remove TypeRestartedProcess. * UIProcess/Plugins/PluginProcessProxy.cpp: Add two new timeout values for snapshotting processes. (WebKit::PluginProcessProxy::didFinishLaunching): Chose which of the timeout pairs to use. * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: (WebKit::PluginProxy::pluginLayer): Don't look at the process type, instead look at the process flag to see if we are restarted. * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::create): Copy the new flag into constructor. (WebKit::PluginProxy::PluginProxy): Remember the flag. * WebProcess/Plugins/PluginProxy.h: Add a new m_restartedProcess flag. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): When we are creating the proxy, separate the concept of snapshotting and restarting. 2013-04-09 Tim Horton [wk2] IconDatabase images should be decoded in the WebProcess https://bugs.webkit.org/show_bug.cgi?id=112524 Reviewed by Oliver Hunt. In the interests of keeping decoding of data coming in from the greater Internet in the WebProcess, move decoding of favicons from the UIProcess to the WebProcess. * UIProcess/WebIconDatabase.cpp: (WebKit::WebIconDatabase::setIconBitmapForIconURL): Receive a ShareableBitmap handle from the WebProcess instead of a DataReference. Use the new setIconBitmapForIconURL IconDatabase method. * UIProcess/WebIconDatabase.h: (WebIconDatabase): Rename setIconDataForIconURL to setIconBitmapForIconURL. * UIProcess/WebIconDatabase.messages.in: Ditto. * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: (WebKit::WebIconDatabaseProxy::setIconDataForIconURL): In the WebProcess, decode the incoming icon and draw it into a ShareableBitmap. 2013-04-09 Raphael Kubo da Costa [EFL] Declare TEST_THEME_DIR in a single place. https://bugs.webkit.org/show_bug.cgi?id=114285 Reviewed by Anders Carlsson. * PlatformEfl.cmake: Remove definition of `TEST_THEME_DIR', which is now defined in OptionsEfl.cmake. 2013-04-09 Rafael Brandao [CoordinatedGraphics] serviceScriptedAnimations expects time in seconds https://bugs.webkit.org/show_bug.cgi?id=112582 Reviewed by Andreas Kling. We've been exposing different time unit for requestAnimationFrame because of wrong conversion before serviceScriptedAnimations function calls. Fixed it to use seconds instead of milliseconds. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::syncDisplayState): Remove unnecessary conversion. 2013-04-09 Michael Brüning [Qt][WK2] Remove obsolete QtWebPageFindClient forward declaration from qquickwebview_p.h. https://bugs.webkit.org/show_bug.cgi?id=114284 Reviewed by Andreas Kling. The class QtWebPageFindClient was removed in r142073 when the functionality was folded into QQuickWebViewPrivate. * UIProcess/API/qt/qquickwebview_p.h: (WebKit): 2013-04-09 Michael Brüning Fix GTK WebKit2 build after r148005. https://bugs.webkit.org/show_bug.cgi?id=114270 Reviewed by Andreas Kling. Fix GTK build break that went through the buildbot undetected. * UIProcess/API/gtk/WebKitFileChooserRequest.cpp: (webkit_file_chooser_request_get_selected_files): 2013-04-09 Michael Brüning [Qt][WK2] Remove direct references to WebPageProxy from QQuickWebPage. https://bugs.webkit.org/show_bug.cgi?id=112850 Reviewed by Andreas Kling. Removes direct references to WebPageProxy from QQuickWebPage and prepares the class for the move to QRawWebView. The access to the device scale factor and CoordinatedGraphicsScene is provided through QQuickWebViewPrivate, and therefore accessors to these properties are temporarily added. Eventually, this access will be provided through QRawWebView when the move is complete. This also moves the pointer to QtWebPageEventHandler from QQuickWebPagePrivate to QQuickWebViewPrivate as it is mainly used from there. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPagePrivate::QQuickWebPagePrivate): (QQuickWebPagePrivate::paint): (QQuickWebPage::updatePaintNode): * UIProcess/API/qt/qquickwebpage_p.h: * UIProcess/API/qt/qquickwebpage_p_p.h: (QQuickWebPagePrivate): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::handleMouseEvent): (QQuickWebViewPrivate::processDidCrash): (QQuickWebViewPrivate::coordinatedGraphicsScene): (QQuickWebViewPrivate::deviceScaleFactor): (QQuickWebViewPrivate::setIntrinsicDeviceScaleFactor): (QQuickWebViewFlickablePrivate::onComponentComplete): (QQuickWebView::keyPressEvent): (QQuickWebView::keyReleaseEvent): (QQuickWebView::inputMethodEvent): (QQuickWebView::focusInEvent): (QQuickWebView::itemChange): (QQuickWebView::touchEvent): (QQuickWebView::wheelEvent): (QQuickWebView::hoverEnterEvent): (QQuickWebView::hoverMoveEvent): (QQuickWebView::hoverLeaveEvent): (QQuickWebView::dragMoveEvent): (QQuickWebView::dragEnterEvent): (QQuickWebView::dragLeaveEvent): (QQuickWebView::dropEvent): * UIProcess/API/qt/qquickwebview_p_p.h: (WebCore): (WebKit): (QQuickWebViewPrivate): 2013-04-09 Michael Brüning [Qt][WK2] Use C API to enable Navigator Qt Object. https://bugs.webkit.org/show_bug.cgi?id=112810 Reviewed by Andreas Kling. Replace the direct reference to the WebPageProxy with use of C API. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::setNavigatorQtObjectEnabled): 2013-04-09 Michael Brüning [WK2] Add C API to copy selected files from WebOpenPanelParameters. https://bugs.webkit.org/show_bug.cgi?id=112339 Reviewed by Andreas Kling. Replaces the existing WebOpenPanelParameters::selectedFileNames() method to return a copy of the selected file names and exposes it through the C API. This is done in order to reduce the direct use of WebKit2 internal classes. The implementation is very similar to the one in WebOpenPanelParameters::acceptMIMETypes(). This also updates the GTK port, which is the other user of selectedFileNames. * Shared/WebOpenPanelParameters.cpp: (WebKit::WebOpenPanelParameters::selectedFileNames): (WebKit): * Shared/WebOpenPanelParameters.h: (WebOpenPanelParameters): * UIProcess/API/C/WKOpenPanelParameters.cpp: (WKOpenPanelParametersCopySelectedFileNames): * UIProcess/API/C/WKOpenPanelParameters.h: * UIProcess/API/gtk/WebKitFileChooserRequest.cpp: (webkit_file_chooser_request_get_selected_files): * UIProcess/qt/QtWebPageUIClient.cpp: (WebKit::QtWebPageUIClient::runOpenPanel): 2013-04-09 Jinwoo Song [WK2] Remove build warnings for unused parameters https://bugs.webkit.org/show_bug.cgi?id=114234 Reviewed by Andreas Kling. Fix build warnings -Wunused-parameter. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::SessionStorageNamespace::cloneTo): * UIProcess/WebContext.cpp: (WebKit::WebContext::requestNetworkingStatistics): (WebKit::WebContext::pluginInfoStoreDidLoadPlugins): * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::removeItem): (WebKit::StorageAreaProxy::clear): (WebKit::StorageAreaProxy::dispatchSessionStorageEvent): (WebKit::StorageAreaProxy::dispatchLocalStorageEvent): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didFinishLoad): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): 2013-04-09 Thiago Marcos P. Santos [WK2] Drop WebProcess capabilities on Linux using seccomp filters https://bugs.webkit.org/show_bug.cgi?id=89875 Reviewed by Maciej Stachowiak. Introduce the foundations of the SeccompFilter-based sandbox. The hardening of the WebProcess (and potentially PluginProcess, etc) works by a combination of the two things: - Blocking syscalls that are not used, reducing the size of the attack surface. - Trapping sensitive syscalls and delegating the execution of these syscalls to a separated trusted process subject to a set of policies. The initial implementation traps the open()-family of syscalls on WebKit EFL's and Qt's WebProcess, but it could be easily used by any Linux port, since the code is suppose to be Linux-compliant. The list of syscalls handled by the broker process should definitely grow as we mature the implementation. Other syscalls needs to be handled to get this sandbox fully functional, like unlink(), mkdir(), etc. The broker process should be initialized as early as possible on the sandboxed process main() function, because it only does a fork(), which is cheap on Linux. That also aims to minimize the resident memory footprint of the broker process. Opening of files for upload and saving downloads is not supported yet, since it should be handled to the UIProcess in a similar fashion as the Mac port does. * PlatformEfl.cmake: * Shared/linux/SeccompFilters/OpenSyscall.cpp: Added. (WebKit): (WebKit::OpenSyscall::createFromOpenatContext): (WebKit::OpenSyscall::createFromCreatContext): (WebKit::OpenSyscall::OpenSyscall): (WebKit::OpenSyscall::setResult): (WebKit::OpenSyscall::execute): (WebKit::OpenSyscall::encode): (WebKit::OpenSyscall::decode): (WebKit::OpenSyscallResult::OpenSyscallResult): (WebKit::OpenSyscallResult::~OpenSyscallResult): (WebKit::OpenSyscallResult::encode): (WebKit::OpenSyscallResult::decode): * Shared/linux/SeccompFilters/OpenSyscall.h: Added. (CoreIPC): (WebKit): (OpenSyscall): (WebKit::OpenSyscall::setPath): (WebKit::OpenSyscall::setFlags): (WebKit::OpenSyscall::setMode): (OpenSyscallResult): (WebKit::OpenSyscallResult::fd): (WebKit::OpenSyscallResult::errorNumber): * Shared/linux/SeccompFilters/SeccompBroker.cpp: Added. (WebKit): (SeccompBrokerClient): (WebKit::sendMessage): (WebKit::receiveMessage): (WebKit::SIGSYSHandler): (WebKit::registerSIGSYSHandler): (WebKit::SeccompBrokerClient::shared): (WebKit::SeccompBrokerClient::SeccompBrokerClient): (WebKit::SeccompBrokerClient::~SeccompBrokerClient): (WebKit::SeccompBrokerClient::dispatch): (WebKit::SeccompBrokerClient::handleIfOpeningOnlineCPUCount): (WebKit::SeccompBroker::launchProcess): (WebKit::SeccompBroker::initialize): (WebKit::SeccompBroker::runLoop): * Shared/linux/SeccompFilters/SeccompBroker.h: Added. (WebKit): (SeccompBroker): (WebKit::SeccompBroker::setSyscallPolicy): (WebKit::SeccompBroker::SeccompBroker): * Shared/linux/SeccompFilters/SeccompFilters.cpp: Added. (WebKit): (WebKit::SeccompFilters::SeccompFilters): (WebKit::SeccompFilters::~SeccompFilters): (WebKit::SeccompFilters::addRule): (WebKit::SeccompFilters::initialize): * Shared/linux/SeccompFilters/SeccompFilters.h: Added. (WebKit): (SeccompFilters): (WebKit::SeccompFilters::context): (WebKit::SeccompFilters::platformInitialize): * Shared/linux/SeccompFilters/SigactionSyscall.cpp: Added. (WebKit): (WebKit::SigactionSyscall::createFromContext): * Shared/linux/SeccompFilters/SigactionSyscall.h: Added. (WebKit): (SigactionSyscall): * Shared/linux/SeccompFilters/SigprocmaskSyscall.cpp: Added. (WebKit): (WebKit::SigprocmaskSyscall::createFromContext): * Shared/linux/SeccompFilters/SigprocmaskSyscall.h: Added. (WebKit): (SigprocmaskSyscall): * Shared/linux/SeccompFilters/Syscall.cpp: Added. (WebKit): (WebKit::Syscall::createFromContext): (WebKit::Syscall::createFromDecoder): (WebKit::Syscall::Syscall): (WebKit::SyscallResult::createFromDecoder): (WebKit::SyscallResult::SyscallResult): * Shared/linux/SeccompFilters/Syscall.h: Added. (CoreIPC): (WebKit): (Syscall): (WebKit::Syscall::~Syscall): (WebKit::Syscall::type): (WebKit::Syscall::setContext): (WebKit::Syscall::context): (SyscallResult): (WebKit::SyscallResult::~SyscallResult): (WebKit::SyscallResult::type): * Shared/linux/SeccompFilters/SyscallPolicy.cpp: Added. (WebKit): (WebKit::removeTrailingSlash): (WebKit::SyscallPolicy::hasPermissionForPath): (WebKit::SyscallPolicy::addFilePermission): (WebKit::SyscallPolicy::addDirectoryPermission): (WebKit::SyscallPolicy::addDefaultWebProcessPolicy): * Shared/linux/SeccompFilters/SyscallPolicy.h: Added. (WebKit): (SyscallPolicy): * Target.pri: * WebKit2.pri: * WebProcess/efl/SeccompFiltersWebProcessEfl.cpp: Added. (WebKit): (WebKit::SeccompFiltersWebProcessEfl::SeccompFiltersWebProcessEfl): (WebKit::SeccompFiltersWebProcessEfl::platformInitialize): * WebProcess/efl/SeccompFiltersWebProcessEfl.h: Added. (WebKit): (SeccompFiltersWebProcessEfl): * WebProcess/qt/SeccompFiltersWebProcessQt.cpp: Added. (WebKit): (WebKit::SeccompFiltersWebProcessQt::SeccompFiltersWebProcessQt): (WebKit::SeccompFiltersWebProcessQt::platformInitialize): * WebProcess/qt/SeccompFiltersWebProcessQt.h: Added. (WebKit): (SeccompFiltersWebProcessQt): * WebProcess/qt/WebProcessQt.cpp: (WebKit::WebProcess::platformInitializeWebProcess): * WebProcess/soup/WebProcessSoup.cpp: (WebKit::WebProcess::platformInitializeWebProcess): 2013-04-08 Grzegorz Czajkowski [WK2][EFL] Mark not implemented methods in TextCheckerEfl. https://bugs.webkit.org/show_bug.cgi?id=112261 Reviewed by Anders Carlsson. There's no need to call client's methods in TextCheckerEfl.cpp if they are not implemented. Mark them as not implemented until we provide proper implementation. * UIProcess/efl/TextCheckerEfl.cpp: (WebKit::TextChecker::isContinuousSpellCheckingAllowed): (WebKit::TextChecker::setGrammarCheckingEnabled): (WebKit::TextChecker::grammarCheckingEnabledStateChanged): (WebKit::TextChecker::checkGrammarOfString): (WebKit::TextChecker::spellingUIIsShowing): (WebKit::TextChecker::toggleSpellingUIIsShowing): (WebKit::TextChecker::updateSpellingUIWithMisspelledWord): (WebKit::TextChecker::updateSpellingUIWithGrammarString): 2013-04-08 Benjamin Poulain Remove HTML Notification https://bugs.webkit.org/show_bug.cgi?id=114231 Reviewed by Ryosuke Niwa. * Configurations/FeatureDefines.xcconfig: 2013-04-08 Tim Horton Don't run primary plugin detection if plugin snapshotting is off https://bugs.webkit.org/show_bug.cgi?id=114222 Reviewed by Dean Jackson. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::determinePrimarySnapshottedPlugIn): 2013-04-08 Patrick Gansterer [WIN] Remove WebKit2 source code https://bugs.webkit.org/show_bug.cgi?id=114096 Reviewed by Anders Carlsson. Remove conditional includes for the windows platform. * Shared/API/c/WKBase.h: * UIProcess/API/C/WKAPICast.h: 2013-04-08 Geoffrey Garen Stop #include-ing all of JavaScriptCore in every DOM-related file https://bugs.webkit.org/show_bug.cgi?id=114220 Reviewed by Sam Weinig. * Shared/WebCoreArgumentCoders.cpp: * WebProcess/Plugins/Netscape/NPRuntimeObjectMap.h: 2013-04-08 Brady Eidson Web/Plugin process deadlock initializing async plugins. and https://bugs.webkit.org/show_bug.cgi?id=114217 Reviewed by Anders Carlsson. The "Async initialization complete" messages probably don't have to be synchronous. * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::createPluginAsynchronously): Notify of initialization success/failure asynchronously. * WebProcess/Plugins/PluginProxy.messages.in: 2013-04-08 Anders Carlsson Add an async version of ResourceHandle::didReceiveResponse https://bugs.webkit.org/show_bug.cgi?id=114215 Reviewed by Sam Weinig. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didReceiveResponseAsync): Send the message and then call continueDidReceiveResponse. 2013-04-08 Carlos Garcia Campos [GTK] Build Platform as a separate static library https://bugs.webkit.org/show_bug.cgi?id=114164 Reviewed by Martin Robinson. This way we reduce a bit the amount of files compiled twice because of the plugin process. * GNUmakefile.am: * GNUmakefile.list.am: * Platform/gtk/WorkQueueGtk.cpp: Remove unused header. * Platform/unix/SharedMemoryUnix.cpp: Ditto. 2013-04-08 Mikhail Pozdnyakov [WK2][EFL] WebView: Add callbacks to the WKViewClient to remove direct access to page viewport controller https://bugs.webkit.org/show_bug.cgi?id=110741 Reviewed by Anders Carlsson. Provided WKViewClient with didRequestScroll, didRenderFrame and didCompletePageTransition callbacks so that direct access from WebView to page viewport controller is avoided. Implementation of callbacks is also added to keep the current EFL WK2 functionality. * UIProcess/API/C/efl/WKView.h: * UIProcess/efl/PageLoadClientEfl.cpp: (WebKit::PageLoadClientEfl::didCommitLoadForFrame): Moved here code from deleted WebView::didCommitLoad. * UIProcess/efl/ViewClientEfl.cpp: (WebKit::ViewClientEfl::didChangeContentsPosition): (WebKit): (WebKit::ViewClientEfl::didRenderFrame): (WebKit::ViewClientEfl::didCompletePageTransition): (WebKit::ViewClientEfl::ViewClientEfl): * UIProcess/efl/ViewClientEfl.h: (ViewClientEfl): * UIProcess/efl/WebView.cpp: (WebKit::WebView::pageDidRequestScroll): (WebKit::WebView::didRenderFrame): (WebKit::WebView::pageTransitionViewportReady): * UIProcess/efl/WebViewClient.cpp: (WebKit::WebViewClient::didChangeContentsPosition): (WebKit): (WebKit::WebViewClient::didRenderFrame): (WebKit::WebViewClient::didCompletePageTransition): * UIProcess/efl/WebViewClient.h: (WebCore): 2013-04-08 Andras Becsi [Qt][WK2] WebView's interactive property is not fully respected https://bugs.webkit.org/show_bug.cgi?id=113066 Reviewed by Jocelyn Turcotte. WK2 sign-off by Benjamin Poulain. The QML WebView inherits the "interactive" property from Flickable which is true by default, and disables the interaction with the Flickable if set to false. Resulting from the design of the WebView panning and flicking is disabled by Flickable but to be consistent we also need to disable double-tap gestures and pinch gestures since they would trigger scale and position changes. * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::pinchGestureStarted): (WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate): (WebKit::PageViewportControllerClientQt::pinchGestureEnded): * UIProcess/qt/QtWebPageEventHandler.cpp: (WebKit::QtWebPageEventHandler::handleDoubleTapEvent): 2013-04-07 David Kilzer Remove the rest of SVG_DOM_OBJC_BINDINGS Reviewed by Geoffrey Garen. * Configurations/FeatureDefines.xcconfig: - Remove ENABLE_SVG_DOM_OBJC_BINDINGS macro. 2013-04-06 Geoffrey Garen Try to fix the WebKit2 build. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit): * NetworkProcess/NetworkResourceLoader.h: (NetworkResourceLoader): Removed a defunct function. 2013-04-05 Ed Bartosh [WK2] --no-tiled-backing-store build fails because FloatPoint is not declared https://bugs.webkit.org/show_bug.cgi?id=113618 Reviewed by Simon Fraser. * WebProcess/Plugins/Plugin.h: Forward declared FloatPoint 2013-04-05 Geoffrey Garen Made USE(JSC) unconditional https://bugs.webkit.org/show_bug.cgi?id=114058 Reviewed by Anders Carlsson. * Shared/linux/WebMemorySamplerLinux.cpp: (WebKit::WebMemorySampler::sampleWebKit): * config.h: 2013-04-05 Ed Bartosh [EFL] --no-tiled-backing-store build fails because of not used #if USE(ACCELERATED_COMPOSITING) https://bugs.webkit.org/show_bug.cgi?id=113627 Reviewed by Simon Fraser. Wrapped code with #if USE(ACCELERATED_COMPOSITING) to make it compilable with --no-tiled-backing-store build option: * UIProcess/API/C/efl/WKView.cpp: * UIProcess/API/efl/EvasGLContext.cpp: * UIProcess/API/efl/EvasGLContext.h: * UIProcess/API/efl/EvasGLSurface.cpp: * UIProcess/API/efl/EvasGLSurface.h: * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): (EwkView::displayTimerFired): (EwkView::takeSnapshot): * UIProcess/API/efl/EwkView.h: (WebKit): (EwkView): * UIProcess/API/efl/SnapshotImageGL.cpp: * UIProcess/API/efl/SnapshotImageGL.h: * UIProcess/PageViewportController.cpp: * UIProcess/PageViewportController.h: * UIProcess/efl/PageViewportControllerClientEfl.cpp: * UIProcess/efl/ViewClientEfl.cpp: (WebKit::ViewClientEfl::didChangeContentsSize): * UIProcess/efl/WebView.cpp: (WebKit::WebView::didCommitLoad): (WebKit::WebView::updateViewportSize): (WebKit::WebView::didChangeViewportProperties): (WebKit::WebView::pageDidRequestScroll): (WebKit::WebView::didRenderFrame): (WebKit::WebView::pageTransitionViewportReady): 2013-04-05 Ed Bartosh [EFL][WK2] --no-tiled-backing-store build fails because of not used #if USE(COORDINATED_GRAPHICS) https://bugs.webkit.org/show_bug.cgi?id=113629 Reviewed by Simon Fraser. Wrapped code related to coordinated graphics with #if USE(COORDINATED_GRAPHICS) * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp: * UIProcess/efl/WebView.cpp: (WebKit::WebView::initialize): (WebKit): (WebKit::WebView::paintToCairoSurface): (WebKit::WebView::updateViewportSize): 2013-04-05 Timothy Hatcher Allow the Web Inspector to use WebSQL. This fixes an exception on load in the Safari Web Inspector. https://webkit.org/b/114040 rdar://problem/13581422 Reviewed by Anders Carlsson. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::exceededDatabaseQuota): Added. (WebKit::WebInspectorProxy::platformCreateInspectorPage): Hook up exceededDatabaseQuota. 2013-04-04 Brady Eidson Add SPI to get a copy of the context menu at a given point. and https://bugs.webkit.org/show_bug.cgi?id=113958 Reviewed by Andy Estes. Add the new accessor: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::contextMenuAtPoint): * WebProcess/WebPage/WebPage.h: Expose the new SPI: * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageCopyContextMenuAtPoint): * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: 2013-04-05 Mikhail Pozdnyakov [WK2][EFL] WebView should own page position and scale factor https://bugs.webkit.org/show_bug.cgi?id=111075 Reviewed by Andreas Kling. View content position and content scale factor should belong to WebView rather than to EwkView as it decreases EwkView usage inside EFL-agnostic WebView and improves WebView encapsulation. * UIProcess/API/C/efl/WKView.cpp: (WKViewGetContentScaleFactor): (WKViewSetContentScaleFactor): New WKView API was added to set and get content scale factor. The view content scale factor is not the same as page scale factor: it always applies to content but not necessarily applies to the page. The view content scale factor is calculated by viewport controller and applies immediately for painting in UI process. Page scale factor is updated later after the frame is rendered to accomplish the pending scale change. (WKViewGetContentPosition): (WKViewSetContentPosition): New WKView API was added to set and get content position. Content position is set in UI units. * UIProcess/API/C/efl/WKView.h: * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): * UIProcess/API/efl/EwkView.h: (EwkView): * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::setViewportPosition): (WebKit::PageViewportControllerClientEfl::setPageScaleFactor): * UIProcess/efl/WebView.cpp: (WebKit::WebView::WebView): (WebKit::WebView::paintToCairoSurface): (WebKit::WebView::transformToScene): (WebKit::WebView::updateViewportSize): (WebKit::WebView::pageDidRequestScroll): * UIProcess/efl/WebView.h: (WebKit::WebView::setContentScaleFactor): (WebKit::WebView::contentScaleFactor): (WebView): (WebKit::WebView::setContentPosition): (WebKit::WebView::contentPosition): 2013-04-05 Alberto Garcia [GTK][WK2] WebKitLoaderClient: add missing initializers https://bugs.webkit.org/show_bug.cgi?id=112961 Reviewed by Carlos Garcia Campos. There are two new attributes: pluginLoadPolicy and pluginDidFail. * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): 2013-04-05 Mikhail Pozdnyakov [WK2][EFL] Encapsulate view states set-up within WebView https://bugs.webkit.org/show_bug.cgi?id=110877 Reviewed by Benjamin Poulain. View states set-up is encapsulated within WebView. This change reduces both usage of EwkView inside WebView class and usage of WebPageProxy inside EwkView class. New WKView API was added so that EwkView can define whether or not the view is visible and focused. * UIProcess/API/C/efl/WKView.cpp: (WKViewIsFocused): (WKViewSetIsFocused): (WKViewIsVisible): (WKViewSetIsVisible): * UIProcess/API/C/efl/WKView.h: * UIProcess/API/efl/EwkView.cpp: (::handleEvent): (EwkView::handleEvasObjectShow): (EwkView::handleEwkViewFocusIn): (EwkView::handleEwkViewFocusOut): * UIProcess/API/efl/EwkView.h: * UIProcess/efl/WebView.cpp: (WebKit::WebView::WebView): (WebKit::WebView::setFocused): (WebKit): (WebKit::WebView::setVisible): (WebKit::WebView::isViewFocused): (WebKit::WebView::isViewVisible): * UIProcess/efl/WebView.h: (WebKit::WebView::isFocused): (WebView): (WebKit::WebView::isVisible): 2013-04-04 KwangYong Choi [EFL][WK2] Add support for getting page contents as string https://bugs.webkit.org/show_bug.cgi?id=106752 Reviewed by Andreas Kling. Modified ewk_view_page_contents_get() API to get page contents as string. EWK_PAGE_CONTENTS_TYPE_STRING is added to Ewk_Page_Contents_Type. Now, we can use both EWK_PAGE_CONTENTS_TYPE_MHTML and EWK_PAGE_CONTENTS_TYPE_STRING for getting page contents. * UIProcess/API/efl/ewk_view.cpp: (Ewk_Page_Contents_Context): (ewkViewPageContentsAsMHTMLCallback): (ewkViewPageContentsAsStringCallback): (ewk_view_page_contents_get): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/tests/test_ewk2_view.cpp: (PageContentsAsMHTMLCallback): (PageContentsAsStringCallback): (TEST_F): 2013-04-04 Christophe Dumez [Cairo] Stop passing raw pointers to BitmapImage::create() https://bugs.webkit.org/show_bug.cgi?id=113945 Reviewed by Martin Robinson. Pass a smart pointer in to BitmapImage::create() instead of a raw one for the cairo surface. The factory method prototype was updated for cairo in r147643. * Shared/cairo/ShareableBitmapCairo.cpp: (WebKit::ShareableBitmap::createImage): 2013-04-03 Dean Jackson Expose settings to disable plugin snapshotting autostart and primary detection https://bugs.webkit.org/show_bug.cgi?id=113918 Reviewed by Tim Horton. Three new settings: snapshotAllPlugIns, primaryPlugInSnapshotDetectionEnabled and autostartOriginPlugInSnapshottingEnabled. These are exposed via WKPreferences (WebKit2 only, since that's the only port actively using the feature). * Shared/WebPreferencesStore.h: Add macros for new settings. * UIProcess/API/C/WKPreferences.cpp: Getters and setters for new settings. (WKPreferencesSetSnapshotAllPlugIns): (WKPreferencesGetSnapshotAllPlugIns): (WKPreferencesSetAutostartOriginPlugInSnapshottingEnabled): (WKPreferencesGetAutostartOriginPlugInSnapshottingEnabled): (WKPreferencesSetPrimaryPlugInSnapshotDetectionEnabled): (WKPreferencesGetPrimaryPlugInSnapshotDetectionEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Forward settings updates. (WebKit::WebPage::addPluginView): Don't run primary plugin detection if the setting is false. (WebKit::WebPage::didFinishLoad): Ditto. 2013-04-04 Christophe Dumez [Cairo] Fix canvas drawing of SVG-based patterns and remove NativeImageCairo https://bugs.webkit.org/show_bug.cgi?id=113929 Reviewed by Martin Robinson. Update code now that PassNativeImagePtr is now a typedef to PassRefPtr instead of NativeImageCairo*. * Shared/gtk/ArgumentCodersGtk.cpp: (CoreIPC::decodeImage): * UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp: (WKIconDatabaseTryGetCairoSurfaceForURL): * UIProcess/API/gtk/WebKitFaviconDatabase.cpp: (getIconSurfaceSynchronously): 2013-04-04 Sze Howe Koh [Qt] docs: Fix module name format https://bugs.webkit.org/show_bug.cgi?id=113209 Reviewed by Jocelyn Turcotte. Make QDoc-generated documentation follow the conventions at http://qt-project.org/wiki/Spelling_Module_Names_in_Qt_Documentation * UIProcess/API/qt/qquickwebview.cpp: 2013-04-04 Mikhail Pozdnyakov [WK2][EFL] WebView should own view size https://bugs.webkit.org/show_bug.cgi?id=110753 Reviewed by Andreas Kling. WebView owns view size. WKViewGetSize and WKViewSetSize API is exposed accordingly. Usage of EFL-specific ewkView inside toolkit-agnostic WebView class is reduced. * UIProcess/API/C/efl/WKView.cpp: (WKViewGetSize): (WKViewSetSize): * UIProcess/API/C/efl/WKView.h: * UIProcess/API/efl/EwkView.cpp: (EwkView::setDeviceScaleFactor): (EwkView::size): (EwkView::deviceSize): (EwkView::scheduleUpdateDisplay): (EwkView::handleEvasObjectCalculate): * UIProcess/API/efl/EwkView.h: (EwkView): * UIProcess/efl/WebView.cpp: (WebKit::WebView::setSize): (WebKit): (WebKit::WebView::paintToCurrentGLContext): (WebKit::WebView::updateViewportSize): (WebKit::WebView::viewSize): (WebKit::WebView::dipSize): * UIProcess/efl/WebView.h: (WebView): (WebKit::WebView::size): 2013-04-03 Anders Carlsson Don't try to set the exception port for server connections https://bugs.webkit.org/show_bug.cgi?id=113910 Reviewed by Darin Adler. Treat a SetExceptionPort message to the server connection as an invalid message. * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC::Connection::receiveSourceEventHandler): 2013-04-02 Mark Rowe Eliminate some code duplication by introducing an array of handlers to register / unregister. Reviewed by Antti Koivisto. * UIProcess/mac/WebContextMac.mm: (OcclusionNotificationHandler): Structure containing the notification name, type and handler. (WebKit::registerOcclusionNotificationHandlers): Register all of the handlers in the array. (WebKit::unregisterOcclusionNotificationHandlers): Unregister all of the handlers in the array. 2013-04-02 Mark Rowe Enable process suppression when no windows in the application have drawn recently. / Reviewed by Darin Adler. * UIProcess/mac/WebContextMac.mm: (WebKit::applicationWindowModificationsStarted): Note that modifications are no longer stopped. (WebKit::applicationWindowModificationsStopped): Note that modifications have stopped. (WebKit::registerOcclusionNotificationHandlers): Register handlers for the start and stop notifications. (WebKit::unregisterOcclusionNotificationHandlers): Unregister handlers for the start and stop notifications. (WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess): Allow suppression if the application is occluded or the application has not drawn recently. (WebKit::WebContext::canEnableProcessSuppressionForWebProcess): Ditto. (WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses): Ditto. 2013-04-03 Dean Jackson Cross fade into restarted plugin https://bugs.webkit.org/show_bug.cgi?id=113868 Reviewed by Tim Horton. Add a new plugin process type that indicates this is a plugin that has been restarted from snapshotting. On Apple ports, this allows us to animate the appearance of the plugin so that it crossfades with the snapshot. Other ports will have to add their own fading. * PluginProcess/PluginProcess.h: New Type: TypeRestartedProcess. * WebProcess/Plugins/Netscape/mac/PluginProxyMac.mm: (WebKit::PluginProxy::pluginLayer): When the plugin's CALayer is created, if it is a restarted plugin, add an opacity animation to fade it in. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Mark restarted plugins with the new process type. 2013-04-03 Alexey Proskuryakov Add a temporary workaround for a build failure. Fix suggested by Mark Rowe. * Shared/mac/ChildProcessMac.mm: 2013-04-03 Alexey Proskuryakov [WK2] XMLHttpRequest upload events don't work with NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=113887 Reviewed by Brady Eidson. Just forward didSendData client call to WebProcess. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didSendData): (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge): Tweaked a comment. * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::didSendData): * WebProcess/Network/WebResourceLoader.h: * WebProcess/Network/WebResourceLoader.messages.in: 2013-04-02 Ryosuke Niwa Remove code for Mac 10.5 and earlier from WTF and WebKit2 https://bugs.webkit.org/show_bug.cgi?id=113844 Reviewed by Benjamin Poulain. Removed the code for 10.5 and removed if-def for 10.6. * Shared/mac/PasteboardTypes.mm: (WebKit::PasteboardTypes::forEditing): 2013-04-02 Anders Carlsson Be more robust against empty message receiver names in incoming messages https://bugs.webkit.org/show_bug.cgi?id=113833 Reviewed by Beth Dakin. Turns out that we either send or receive messages whose receiver names are empty. This leads to bad things when we try to look up the message receiver name in a hash map since the empty name is used to represent an empty hash map value. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::addWorkQueueMessageReceiverOnConnectionWorkQueue): Sprinkle assertions. (CoreIPC::Connection::processIncomingMessage): If the message receiver name is not valid, make sure to call didReceiveInvalidMessage on the client thread. (CoreIPC::Connection::dispatchDidReceiveInvalidMessage): Add new helper function. 2013-04-02 Simon Cooper [Mac][WK2] Don’t let plug-ins use System V shared memory https://bugs.webkit.org/show_bug.cgi?id=113466 Reviewed, tweaked and landed by Alexey Proskuryakov. Instead of allowing plug-ins to request System V shm, give them a temporary but usable alternative if they try to request it. * PluginProcess/mac/PluginProcessShim.mm: 2013-04-02 Anders Carlsson Add WKContextSetInvalidMessageFunction https://bugs.webkit.org/show_bug.cgi?id=113820 Reviewed by Tim Horton. * UIProcess/API/C/WKContext.cpp: (WKContextSetInvalidMessageFunction): Call WebContext::didReceiveInvalidMessage. * UIProcess/API/C/WKContextPrivate.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::setInvalidMessageCallback): Set the global variable. (WebKit::WebContext::didReceiveInvalidMessage): Construct a message name string and call the invalid message callback. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveInvalidMessage): Call WebContext::didReceiveInvalidMessage. 2013-04-02 Alexey Proskuryakov [Mac] Remove WKCreateNSURLConnectionDelegateProxy https://bugs.webkit.org/show_bug.cgi?id=113810 Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2013-04-02 Alexey Proskuryakov [WK2] Crashes in NetworkProcess when canceling loads https://bugs.webkit.org/show_bug.cgi?id=113803 Reviewed by Darin Adler. * Shared/Downloads/mac/DownloadMac.mm: (WebKit::Download::startWithHandle): Just pass nil instead of proxy. 2013-04-02 Mikhail Pozdnyakov [WK2] Remove repeating code in declaration of WK2 API classes https://bugs.webkit.org/show_bug.cgi?id=112782 Reviewed by Benjamin Poulain. The following two lines of code had been repeated in every WK2 API object class: 1) static const Type APIType = SomeAPIType; 2) virtual Type type() const { return APIType; } This patch introduces template class 'TypedAPIObject' inherited from WebKit::APIObject and it contains the common functionality. So the new pattern is that API object classes are inherited from TypedAPIObject (rather than from WebKit::APIObject directly) passing the corresponding API object type as a template parameter. The existing API object classes are modified accordingly to the proposed pattern. * Shared/APIObject.h: (WebKit): (TypedAPIObject): (WebKit::TypedAPIObject::~TypedAPIObject): (WebKit::TypedAPIObject::TypedAPIObject): * Shared/ImmutableArray.h: (ImmutableArray): * Shared/ImmutableDictionary.h: (ImmutableDictionary): * Shared/WebArchive.h: (WebArchive): * Shared/WebArchiveResource.h: (WebArchiveResource): * Shared/WebBackForwardListItem.h: (WebBackForwardListItem): * Shared/WebBatteryStatus.h: (WebBatteryStatus): * Shared/WebCertificateInfo.h: * Shared/WebConnection.h: (WebConnection): * Shared/WebContextMenuItem.h: (WebContextMenuItem): * Shared/WebData.h: * Shared/WebError.h: (WebKit::WebError::errorCode): * Shared/WebGeolocationPosition.h: (WebGeolocationPosition): * Shared/WebGeometry.h: * Shared/WebGraphicsContext.h: (WebGraphicsContext): * Shared/WebHitTestResult.h: * Shared/WebImage.h: (WebImage): * Shared/WebNetworkInfo.h: (WebNetworkInfo): * Shared/WebNumber.h: * Shared/WebOpenPanelParameters.h: (WebOpenPanelParameters): * Shared/WebRenderLayer.h: * Shared/WebRenderObject.h: * Shared/WebSecurityOrigin.h: * Shared/WebSerializedScriptValue.h: (WebSerializedScriptValue): * Shared/WebString.h: * Shared/WebURL.h: * Shared/WebURLRequest.h: (WebURLRequest): * Shared/WebURLResponse.h: (WebURLResponse): * Shared/WebUserContentURLPattern.h: * Shared/mac/ObjCObjectGraph.h: * UIProcess/Authentication/AuthenticationChallengeProxy.h: (AuthenticationChallengeProxy): * UIProcess/Authentication/AuthenticationDecisionListener.h: (AuthenticationDecisionListener): * UIProcess/Authentication/WebCredential.h: (WebCredential): * UIProcess/Authentication/WebProtectionSpace.h: (WebProtectionSpace): * UIProcess/Downloads/DownloadProxy.h: (DownloadProxy): * UIProcess/GeolocationPermissionRequestProxy.h: (GeolocationPermissionRequestProxy): * UIProcess/Notifications/NotificationPermissionRequest.h: (NotificationPermissionRequest): * UIProcess/Notifications/WebNotification.h: (WebNotification): * UIProcess/Notifications/WebNotificationManagerProxy.h: (WebNotificationManagerProxy): * UIProcess/Plugins/WebPluginSiteDataManager.h: (WebPluginSiteDataManager): * UIProcess/WebApplicationCacheManagerProxy.h: (WebApplicationCacheManagerProxy): * UIProcess/WebBackForwardList.h: (WebBackForwardList): * UIProcess/WebBatteryManagerProxy.h: (WebBatteryManagerProxy): * UIProcess/WebContext.h: (WebContext): * UIProcess/WebCookieManagerProxy.h: (WebCookieManagerProxy): * UIProcess/WebDatabaseManagerProxy.h: (WebDatabaseManagerProxy): * UIProcess/WebEditCommandProxy.h: (WebEditCommandProxy): * UIProcess/WebFrameProxy.h: (WebFrameProxy): * UIProcess/WebGeolocationManagerProxy.h: (WebGeolocationManagerProxy): * UIProcess/WebGrammarDetail.h: (WebGrammarDetail): * UIProcess/WebIconDatabase.h: (WebIconDatabase): * UIProcess/WebInspectorProxy.h: (WebInspectorProxy): * UIProcess/WebKeyValueStorageManagerProxy.h: (WebKeyValueStorageManagerProxy): * UIProcess/WebMediaCacheManagerProxy.h: (WebMediaCacheManagerProxy): * UIProcess/WebNavigationData.h: (WebNavigationData): * UIProcess/WebNetworkInfoManagerProxy.h: (WebNetworkInfoManagerProxy): * UIProcess/WebOpenPanelResultListenerProxy.h: (WebOpenPanelResultListenerProxy): * UIProcess/WebPageGroup.h: (WebPageGroup): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPreferences.cpp: (WebKit::WebPreferences::WebPreferences): * UIProcess/WebPreferences.h: (WebPreferences): * UIProcess/WebResourceCacheManagerProxy.h: (WebResourceCacheManagerProxy): * UIProcess/WebTextChecker.h: (WebTextChecker): * UIProcess/WebVibrationProxy.h: (WebVibrationProxy): * UIProcess/efl/WebPopupItemEfl.h: (WebPopupItemEfl): * UIProcess/efl/WebView.h: * UIProcess/soup/WebSoupRequestManagerProxy.h: (WebSoupRequestManagerProxy): * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: (InjectedBundleNodeHandle): * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h: (InjectedBundleRangeHandle): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebProcess/InjectedBundle/InjectedBundleBackForwardList.h: * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h: * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.h: (InjectedBundleDOMWindowExtension): * WebProcess/InjectedBundle/InjectedBundleHitTestResult.h: * WebProcess/InjectedBundle/InjectedBundleNavigationAction.h: (InjectedBundleNavigationAction): * WebProcess/InjectedBundle/InjectedBundleScriptWorld.h: (InjectedBundleScriptWorld): * WebProcess/WebPage/PageOverlay.h: (PageOverlay): * WebProcess/WebPage/WebFrame.h: (WebFrame): * WebProcess/WebPage/WebInspector.h: (WebInspector): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPageGroupProxy.h: (WebPageGroupProxy): 2013-04-01 Timothy Hatcher Allow changing Web Inspector dock sides without undocking first. https://webkit.org/b/113661 rdar://problem/13543127 Reviewed by Joseph Pecoraro. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::createInspectorPage): Send AttachedBottom and AttachedRight messages so InspectorFrontendClientLocal knows which side we are attached. (WebKit::WebInspectorProxy::canAttach): If we are already attached, allow attaching again to allow switching sides. 2013-04-01 Anders Carlsson Nor this! (Who reviewed this anyway!) * WebProcess/Storage/StorageNamespaceProxy.cpp: (WebKit::StorageNamespaceProxy::storageArea): 2013-04-01 Anders Carlsson Didn't mean to commit this! * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: 2013-04-01 Alexey Proskuryakov https://bugs.webkit.org/show_bug.cgi?id=113721 REGRESSION (r146929): HTTP auth credentials not reused during session Reviewed by Brady Eidson. * NetworkProcess/NetworkResourceLoader.h: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): Added an override that we still need. It's not great, but causes no trouble for NetworkProcess. (WebKit::NetworkResourceLoader::shouldUseCredentialStorageAsync): Implement in terms of sync version to avoid duplicating logic. 2013-03-05 Anders Carlsson Apply changes from storage events locally https://bugs.webkit.org/show_bug.cgi?id=111502 Reviewed by Sam Weinig. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::StorageAreaProxy): Store the security origin as a member variable. (WebKit::StorageAreaProxy::dispatchStorageEvent): Set the item and call the appropriate event dispatch function. (WebKit::StorageAreaProxy::dispatchSessionStorageEvent): (WebKit::StorageAreaProxy::dispatchLocalStorageEvent): Add stubs. * WebProcess/Storage/StorageAreaProxy.h: 2013-04-01 Alexey Proskuryakov Sandbox extension tracking is incorrect when restoring a session https://bugs.webkit.org/show_bug.cgi?id=113709 Reviewed by Anders Carlsson. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): Added an assertion to catch extension tracking logic errors that could result in giving an extension to non-local pages. (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad): Just like below, clearing m_pendingProvisionalSandboxExtension appears incorrect, even though I am not aware of any scenarios where this happens in practice. (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad): The load may be failing exactly because a new one cancels it, so we shouldn't be preventing the new one from using its extension. 2013-04-01 Brady Eidson SharedMemory release build hardening. and https://bugs.webkit.org/show_bug.cgi?id=113710 Reviewed by Anders Carlsson. Successful creation of a memory entry with a size less than the size we requested should be treated as a failure to create the SharedMemory object. * Platform/mac/SharedMemoryMac.cpp: (WebKit::SharedMemory::createFromVMBuffer): Early return if the port we get is bogus for our needs. (WebKit::SharedMemory::createHandle): Ditto. (WebKit::SharedMemory::create): Guarantee we pass valid input in to mach_vm_map. 2013-03-30 Csaba Osztrogonác Unreviewed buildfix after r147260. * WebProcess/qt/QtBuiltinBundlePage.cpp: (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): 2013-03-29 Seokju Kwon [EFL] Unreviewed build fix after r147251 https://bugs.webkit.org/show_bug.cgi?id=113631 Unreviewed build fix. Add NETWORK_PROCESS guard. * UIProcess/WebResourceCacheManagerProxy.cpp: (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): 2013-03-29 Brady Eidson Crash when "willSendRequest" causes the ResourceLoader to be cancelled. and https://bugs.webkit.org/show_bug.cgi?id=113616 Reviewed by Alexey Proskuryakov. These callbacks to the WebCore ResourceLoader can cause the WebResourceLoader to be destroyed. A RefPtr<> protector fixes that. Additionally we can invalidate the WebResourceLoader to avoid unnecessary callbacks to the NetworkProcess. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::remove): Call detachFromCoreLoader() on a removed WebResourceLoader. * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::detachFromCoreLoader): Clear out the ResourceLoader pointer. (WebKit::WebResourceLoader::willSendRequest): Protect this, and don't message back to the NetworkProcess if its not needed. (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto (WebKit::WebResourceLoader::didReceiveResource): Paranoid hardening - Protect this before delivering the data to the WebCore ResourceLoader, and null check it before delivering the "didFinishLoader" call. * WebProcess/Network/WebResourceLoader.h: 2013-03-29 Brady Eidson Should never send events to plugins waiting on asynchronous initialization. and https://bugs.webkit.org/show_bug.cgi?id=113612 Reviewed by Anders Carlsson. Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly. A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return: * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::handleMouseEvent): (WebKit::PluginProxy::handleWheelEvent): (WebKit::PluginProxy::handleMouseEnterEvent): (WebKit::PluginProxy::handleMouseLeaveEvent): (WebKit::PluginProxy::handleKeyboardEvent): (WebKit::PluginProxy::handleEditingCommand): (WebKit::PluginProxy::isEditingCommandEnabled): (WebKit::PluginProxy::handlesPageScaleFactor): 2013-03-29 Brady Eidson Should never send events to plugins waiting on asynchronous initialization. and https://bugs.webkit.org/show_bug.cgi?id=113612 Reviewed by Anders Carlsson. Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly. A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return: * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::handleMouseEvent): (WebKit::PluginProxy::handleWheelEvent): (WebKit::PluginProxy::handleMouseEnterEvent): (WebKit::PluginProxy::handleMouseLeaveEvent): (WebKit::PluginProxy::handleKeyboardEvent): (WebKit::PluginProxy::handleEditingCommand): (WebKit::PluginProxy::isEditingCommandEnabled): (WebKit::PluginProxy::handlesPageScaleFactor): 2013-03-29 Alexey Proskuryakov Expose FeatureObserver data to WebKit clients https://bugs.webkit.org/show_bug.cgi?id=113613 Reviewed by Sam Weinig. * Shared/APIClientTraits.cpp: * Shared/APIClientTraits.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: (WebKit::InjectedBundlePageLoaderClient::featuresUsedInPage): * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: Added a new injected bundle client call, featuresUsedInPage. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::close): (WebKit::WebPage::didCommitLoad): (WebKit::WebPage::reportUsedFeatures): * WebProcess/WebPage/WebPage.h: Report features used in a page when navigating away, or when closing. 2013-03-29 Brady Eidson Crash when "willSendRequest" causes the ResourceLoader to be cancelled. and https://bugs.webkit.org/show_bug.cgi?id=113616 Reviewed by Alexey Proskuryakov. These callbacks to the WebCore ResourceLoader can cause the WebResourceLoader to be destroyed. A RefPtr<> protector fixes that. Additionally we can invalidate the WebResourceLoader to avoid unnecessary callbacks to the NetworkProcess. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::remove): Call detachFromCoreLoader() on a removed WebResourceLoader. * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::detachFromCoreLoader): Clear out the ResourceLoader pointer. (WebKit::WebResourceLoader::willSendRequest): Protect this, and don't message back to the NetworkProcess if its not needed. (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto (WebKit::WebResourceLoader::didReceiveResource): Paranoid hardening - Protect this before delivering the data to the WebCore ResourceLoader, and null check it before delivering the "didFinishLoader" call. * WebProcess/Network/WebResourceLoader.h: 2013-03-29 Brady Eidson Should never send events to plugins waiting on asynchronous initialization. and https://bugs.webkit.org/show_bug.cgi?id=113612 Reviewed by Anders Carlsson. Sending mouse and keyboard events to a plugin in the middle of asynchronous initialization is silly. A quick audit of the sendSync() messages in PluginProxy suggests the following 8 can just have an early return: * WebProcess/Plugins/PluginProxy.cpp: (WebKit::PluginProxy::handleMouseEvent): (WebKit::PluginProxy::handleWheelEvent): (WebKit::PluginProxy::handleMouseEnterEvent): (WebKit::PluginProxy::handleMouseLeaveEvent): (WebKit::PluginProxy::handleKeyboardEvent): (WebKit::PluginProxy::handleEditingCommand): (WebKit::PluginProxy::isEditingCommandEnabled): (WebKit::PluginProxy::handlesPageScaleFactor): 2013-03-29 Brady Eidson "Empty cache..." clears the disk cache from each WebProcess. and https://bugs.webkit.org/show_bug.cgi?id=113603 Reviewed by Sam Weinig. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::NetworkProcess): (WebKit::NetworkProcess::terminate): Override ChildProcess::terminate to allow us to finish clearing the cache. * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: Add the ClearCacheForAllOrigins message. * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::clearCacheForAllOrigins): Clear the disk cache. (WebKit::NetworkProcess::platformTerminate): Wait for the clear to complete. * UIProcess/WebResourceCacheManagerProxy.cpp: (WebKit::WebResourceCacheManagerProxy::clearCacheForAllOrigins): Message the network process, also. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformClearResourceCaches): Don't clear the disk cache if we use the network process. 2013-03-28 Brady Eidson We leak NetworkConnectionToWebProcess objects. and https://bugs.webkit.org/show_bug.cgi?id=113551 Reviewed by Anders Carlsson. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didClose): Remove this from the global set of NetworkConnectionToWebProcess objects. 2013-03-28 Brady Eidson Resources are never revalidated/reloaded if a cached response exists on disk. and https://bugs.webkit.org/show_bug.cgi?id=113542 Reviewed by Alexey Proskuryakov. Trying to get a cached resource in didReceiveResponse and then aborting the load meant we never performed any new loads. We can check and see if the data is cached data inside didReceiveBuffer, instead. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didReceiveResponse): Don't try for cached resources here. (WebKit::NetworkResourceLoader::didReceiveData): This callback should never be used. (WebKit::NetworkResourceLoader::didReceiveBuffer): Try to see if this data objected represents a file based mmaped buffer. * NetworkProcess/NetworkResourceLoader.h: Refactor these utility functions to start from either a CFURLCachedResponse or a SharedBuffer: * NetworkProcess/mac/NetworkResourceLoaderMac.mm: (CFCachedURLResponseGetMemMappedData): (CFURLCacheIsMemMappedData): (WebKit::tryGetShareableHandleFromCFData): (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse): (WebKit::NetworkResourceLoader::tryGetShareableHandleFromSharedBuffer): 2013-03-28 Tim Horton [wk2] REGRESSION (r125500): WebFrameLoaderClient's active m_pluginView can be zeroed by PluginDocuments leaving the page cache https://bugs.webkit.org/show_bug.cgi?id=113430 Reviewed by Brady Eidson. http://trac.webkit.org/changeset/147152 was wrong, and should have been (as the ChangeLog stated) testing the argument to redirectDataToPlugin, not the value of m_pluginView. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::redirectDataToPlugin): 2013-03-28 Tim Horton [wk2] REGRESSION (r125500): WebFrameLoaderClient's active m_pluginView can be zeroed by PluginDocuments leaving the page cache https://bugs.webkit.org/show_bug.cgi?id=113430 Reviewed by Brady Eidson. Ignore redirectDataToPlugin(0), which is only called from PluginDocument::detach(), and only after r125500. Otherwise, PluginDocuments that are put into the page cache but leave later can clear a totally different and legitimate PluginView from the WebFrameLoaderClient, causing data to be lost and PluginDocument loads to stall. This restores our behavior to the pre-r125500 state, which should be fine, as we clear WebFrameLoaderClient's m_pluginView when the load fails or finishes. This matches the changes made in r125500 for every platform other than Chromium and WebKit2. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::redirectDataToPlugin): 2013-03-28 Tim Horton PDFPlugin: shouldUsePDFPlugin can't use pdfLayerControllerClass() because it asserts if it's not available https://bugs.webkit.org/show_bug.cgi?id=113533 Reviewed by Simon Fraser. * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::shouldUsePDFPlugin): Move shouldUsePDFPlugin to WebPageMac, where it belongs, and explicitly look up PDFLayerController instead of using pdfLayerControllerClass(), which ASSERT()s if it isn't available. 2013-03-28 Brady Eidson Reduce PluginProcess lifetime. and https://bugs.webkit.org/show_bug.cgi?id=113523 Reviewed by Sam Weinig. Lower the minimum process lifetime from 30 minutes to 2 minutes. Lower the "shutdown after last plugin goes away" period from 10 minutes to 1 minute. * UIProcess/Plugins/PluginProcessProxy.cpp: 2013-03-28 Zan Dobersek [GTK] Build GTK-specific, non-layer-violating source code into WebCore-independent libPlatformGtk.la https://bugs.webkit.org/show_bug.cgi?id=112546 Reviewed by Martin Robinson. * GNUmakefile.am: Reference the platform_webcore_cppflags and GTK, libsecret and libsoup dependencies' cflags amongst the libPlatformGtk2's CPPFLAGS. * Scripts/generate-forwarding-headers.pl: Remove the Platform framework from the list of the frameworks to be searched for forwarding headers, it's at the moment not necessary to be included. * Shared/gtk/ArgumentCodersGtk.cpp: Adjust the forwarding header for GtkVersioning.h that's been moved back under the WebCore framework. * Shared/gtk/WebEventFactory.cpp: Ditto. * UIProcess/API/gtk/WebKitWebViewBase.cpp: Ditto. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: Ditto. 2013-03-27 Tim Horton Unreviewed Qt build fix after http://trac.webkit.org/changeset/147067. * WebProcess/WebPage/WebPage.cpp: 2013-03-27 Tim Horton PDFPlugin: Enable PDFPlugin only if its dependencies exist on the system https://bugs.webkit.org/show_bug.cgi?id=113372 Reviewed by Alexey Proskuryakov. * Shared/mac/PDFKitImports.h: Wrap in #if PLATFORM(MAC). * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Use shouldUsePDFPlugin. (WebKit::WebPage::shouldUsePDFPlugin): If the PDFPlugin setting is enabled but PDFLayerController is not available, don't use PDFPlugin. * WebProcess/WebPage/WebPage.h: (WebPage): Add shouldUsePDFPlugin * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::platformPreferencesDidChange): Use shouldUsePDFPlugin. 2013-03-27 Sam Weinig [WebKit2] Need SPI to determine whether a plug-in is blocked https://bugs.webkit.org/show_bug.cgi?id=113463 Reviewed by Anders Carlsson. Add new SPI, WKContextCopyPlugInInfoForBundleIdetifier, to get data about a plug-in, including whether it is blocked by x-protect. * UIProcess/WebLoaderClient.cpp: * UIProcess/API/C/WKAPICast.h: (WebKit::toWKPluginLoadPolicy): (WebKit::toPluginModuleLoadPolicy): Move to a shared location. * UIProcess/API/C/mac/WKContextPrivateMac.h: * UIProcess/API/C/mac/WKContextPrivateMac.mm: (WKContextIsPlugInUpdateAvailable): (WKPlugInInfoPathKey): (WKPlugInInfoBundleIdentifierKey): (WKPlugInInfoVersionKey): (WKPlugInInfoLoadPolicyKey): (WKPlugInInfoUpdatePastLastBlockedVersionIsKnownAvailableKey): (WKContextCopyPlugInInfoForBundleIdetifier): Add new SPI and dictionary keys. * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::PluginInfoStore::findPluginWithBundleIdentifer): * UIProcess/Plugins/PluginInfoStore.h: * UIProcess/Plugins/mac/PluginInfoStoreMac.mm: (WebKit::PluginInfoStore::findPluginWithBundleIdentifer): Add function to lookup plug-ins by bundle identifier. 2013-03-27 Beth Dakin WKBundlePagePrivateMac.h is not being exported https://bugs.webkit.org/show_bug.cgi?id=113470 -and corresponding- Reviewed by Sam Weinig. Mark it as private instead of project. * WebKit2.xcodeproj/project.pbxproj: 2013-03-26 Beth Dakin Need WK2 API to give a WebView a header and footer https://bugs.webkit.org/show_bug.cgi?id=113352 -and corresponding- Reviewed by Simon Fraser. New API allows setting and getting layers for a header and footer. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/InjectedBundle/API/c/mac: Added. * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.h: Added. * WebProcess/InjectedBundle/API/c/mac/WKBundlePagePrivateMac.mm: Added. (WKBundlePageGetHeaderLayer): (WKBundlePageSetHeaderLayer): (WKBundlePageGetFooterLayer): (WKBundlePageSetFooterLayer): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::setTopOverhangImage): (WebKit::WebPage::setBottomOverhangImage): (WebKit): (WebKit::WebPage::getHeaderLayer): (WebKit::WebPage::setHeaderLayerWithHeight): (WebKit::WebPage::getFooterLayer): (WebKit::WebPage::setFooterLayerWithHeight): 2013-03-27 Jer Noble Going full screen and cancelling gets system into a weird state https://bugs.webkit.org/show_bug.cgi?id=113445 Reviewed by Eric Carlson. Replace an array of BOOL member variables to track full screen state with a single enum, and add state tracking for the "waiting to enter" and "waiting to exit" states. Use this new, more specific enum to be more stringent about the state when responding to WebProcess messages. Also only set the placeholder view's target once in full screen mode. * UIProcess/mac/WKFullScreenWindowController.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController isFullScreen]): Yes when in full screen, entering full screen, or waiting to enter full screen. (-[WKFullScreenWindowController cancelOperation:]): Only requestExitFullScreen() if a watchdog has not already been made active. (-[WKFullScreenWindowController enterFullScreen:]): Use the new state variable. (-[WKFullScreenWindowController beganEnterFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Ditto. (-[WKFullScreenWindowController finishedEnterFullScreenAnimation:]): Ditto. Set the placeholder target. (-[WKFullScreenWindowController exitFullScreen]): Ditto. Clear the placeholder target. (-[WKFullScreenWindowController beganExitFullScreenWithInitialFrame:WebCore::finalFrame:WebCore::]): Ditto. (-[WKFullScreenWindowController completeFinishExitFullScreenAnimationAfterRepaint]): Ditto. (-[WKFullScreenWindowController performClose:]): Ditto. (-[WKFullScreenWindowController close]): Ditto. (-[WKFullScreenWindowController _startEnterFullScreenAnimationWithDuration:]): Ditto. 2013-03-27 Brady Eidson Blind attempt at fixing the release build. * NetworkProcess/mac/NetworkResourceLoaderMac.mm: (WebKit::NetworkResourceLoader::willCacheResponseAsync): 2013-03-27 Brady Eidson Mem mapped resource data improvements. and https://bugs.webkit.org/show_bug.cgi?id=113422 Reviewed by Alexey Proskuryakov (and looked over by Geoff Garen). Remove timer-based approach support code: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::NetworkResourceLoader): (WebKit::NetworkResourceLoader::abortInProgressLoad): (WebKit::NetworkResourceLoader::didFinishLoading): * NetworkProcess/NetworkResourceLoader.h: Add an object to encapsulate monitoring a resource going in to the disk cache. It listens for a callback on the cached response indicating it is disk backed and also sets a timeout so we don't keep the monitor alive and waiting forever. * NetworkProcess/mac/DiskCacheMonitor.h: Added. (WebKit::DiskCacheMonitor::destinationID): (WebKit::DiskCacheMonitor::connectionToWebProcess): (WebKit::DiskCacheMonitor::resourceRequest): * NetworkProcess/mac/DiskCacheMonitor.mm: Added. (CFCachedURLResponseSetBecameFileBackedCallBackBlock): (WebKit::monitorFileBackingStoreCreation): (WebKit::DiskCacheMonitor::DiskCachingMonitor): (WebKit::DiskCacheMonitor::connection): Refactoring and monitor certain cached responses: * NetworkProcess/mac/NetworkResourceLoaderMac.mm: (CFCachedURLResponseGetMemMappedData): (WebKit::NetworkResourceLoader::tryGetShareableHandleFromCFURLCachedResponse): Use CFCachedURLResponseGetMemMappedData to explicitly get an mem-mapped data object. (WebKit::NetworkResourceLoader::tryGetShareableHandleForResource): (WebKit::NetworkResourceLoader::willCacheResponseAsync): If the resource is over the minimum size then set up a disk caching monitor. * WebKit2.xcodeproj/project.pbxproj: 2013-03-26 Timothy Hatcher Add support for dock-to-right of the Web Inspector in the Mac port. Unfortunately this requires Safari changes, so it is disabled in the nightly builds. https://webkit.org/b/113341 rdar://problem/10368152 Reviewed by Joseph Pecoraro. * Resources/Dock.pdf: Removed. * Resources/DockBottom.pdf: Added. * Resources/DockRight.pdf: Added. * Shared/WebPreferencesStore.h: * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::WebInspectorProxy): (WebKit::WebInspectorProxy::attachBottom): (WebKit::WebInspectorProxy::attachRight): (WebKit::WebInspectorProxy::attach): (WebKit::WebInspectorProxy::detach): (WebKit::WebInspectorProxy::setAttachedWindowWidth): (WebKit::WebInspectorProxy::createInspectorPage): (WebKit::WebInspectorProxy::canAttach): * UIProcess/WebInspectorProxy.h: (WebInspectorProxy): * UIProcess/WebInspectorProxy.messages.in: * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter attachRight:]): (-[WKWebInspectorProxyObjCAdapter attachBottom:]): (-[WKWebInspectorWindow _cursorForResizeDirection:]): (-[WKWebInspectorWindow _customTitleFrame]): (WebKit::createDockButton): (WebKit::WebInspectorProxy::createInspectorWindow): (WebKit::WebInspectorProxy::platformCreateInspectorPage): (WebKit::WebInspectorProxy::platformAttachAvailabilityChanged): (WebKit::WebInspectorProxy::inspectedViewFrameDidChange): (WebKit::WebInspectorProxy::platformInspectedWindowWidth): (WebKit::WebInspectorProxy::platformAttach): (WebKit::WebInspectorProxy::platformDetach): (WebKit::WebInspectorProxy::platformSetAttachedWindowHeight): (WebKit::WebInspectorProxy::platformSetAttachedWindowWidth): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: (WebKit::WebInspectorFrontendClient::attachWindow): (WebKit::WebInspectorFrontendClient::setAttachedWindowWidth): * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: (WebInspectorFrontendClient): * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::attachBottom): (WebKit::WebInspector::attachRight): (WebKit::WebInspector::setAttachedWindowWidth): (WebKit::WebInspector::attachedBottom): (WebKit::WebInspector::attachedRight): (WebKit::WebInspector::detached): * WebProcess/WebPage/WebInspector.h: (WebInspector): * WebProcess/WebPage/WebInspector.messages.in: 2013-03-27 Kondapally Kalyan [CoordGfx] Support to share GraphicsSurface flags with client. https://bugs.webkit.org/show_bug.cgi?id=112982 Reviewed by Noam Rosenthal. Covered by existing WebGL tests. This patch adds support to pass GraphicsSurface flags during it's client creation. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): 2013-03-26 Hayato Ito Allow ShadowContents in HitTests by default. https://bugs.webkit.org/show_bug.cgi?id=113171 Reviewed by Dimitri Glazkov. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::hitTest): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::highlightPotentialActivation): (WebKit::WebPage::findZoomableAreaForPoint): (WebKit::WebPage::determinePrimarySnapshottedPlugIn): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::shouldDelayWindowOrderingEvent): (WebKit::WebPage::acceptsFirstMouse): 2013-03-26 Tim Horton [ca] Tell CA to clean up unused resources if a given WebProcess won't be drawing https://bugs.webkit.org/show_bug.cgi?id=107539 Reviewed by Simon Fraser. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Update WebCoreSystemInterface. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Initially move the Page out of the window if necessary; Page defaults to in-window, which is wrong in many cases - we depend on Page::isInWindow being accurate to decide whether WebPage::setIsInWindow is actually a state change or not. (WebKit::WebPage::setIsInWindow): * WebProcess/WebProcess.cpp: Inform WebProcess when we go on/off screen. (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::pageDidMoveOnscreen): Keep track of the number of on-screen pages in this process. (WebKit::WebProcess::pageWillMoveOffscreen): If the number of on-screen pages drops to zero, clean up unused rendering resources. * WebProcess/WebProcess.h: 2013-03-26 Dean Jackson When a primary plugin is restarted, also start similar plugins https://bugs.webkit.org/show_bug.cgi?id=113265 Reviewed by Tim Horton. Remember the origin of the primary plugin, so that we can autostart anything that is similar. * WebProcess/WebCoreSupport/WebPlugInClient.cpp: (WebKit::WebPlugInClient::WebPlugInClient): Keep a pointer to the WebPage. (WebKit::WebPlugInClient::shouldAutoStartFromOrigin): Pass the page onto the process. * WebProcess/WebCoreSupport/WebPlugInClient.h: (WebPlugInClient): New member variable for the WebPage we were created with. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Remember the origin information for the primary plugin. (WebKit::WebPage::matchesPrimaryPlugIn): Returns true if we're seeing something that looks like the primary plugin. * WebProcess/WebPage/WebPage.h: New method matchesPrimaryPlugIn. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Check if the page thinks this is the primary plugin. * WebProcess/WebProcess.h: Accept a reference to the page in shouldPlugInAutoStartFromOrigin. 2013-03-26 Alexey Proskuryakov Follow-up to: Crashes in NetworkProcess due to threading issues https://bugs.webkit.org/show_bug.cgi?id=113256 Reviewed by Mark Rowe. * NetworkProcess/NetworkResourceLoader.h: Added some forgotten OVERRIDEs. 2013-03-26 Alexey Proskuryakov Crashes in NetworkProcess due to threading issues https://bugs.webkit.org/show_bug.cgi?id=113256 Reviewed by Brady Eidson. Use asynchronous version of ResourceHandle/ResourceHandleClient in NetworkProcess. We now run WebCore code on main thread, so we can't block it. * DerivedSources.make: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): * NetworkProcess/NetworkResourceLoader.messages.in: Added. * WebKit2.xcodeproj/project.pbxproj: Made NetworkResourceLoader a message receiver. Messages that used to be sync are now async, and responses need to be sent to the loader. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::willSendRequestAsync): This now happens on main thread, and thus cannot be sync. (WebKit::NetworkResourceLoader::continueWillSendRequest): Notify the resource handle once a response is ready. (WebKit::NetworkResourceLoader::didSendData): Removed unnecessary WebCore prefixes. (WebKit::NetworkResourceLoader::didReceiveCachedMetadata): Ditto. (WebKit::NetworkResourceLoader::wasBlocked): Ditto. (WebKit::NetworkResourceLoader::cannotShowURL): Ditto. (WebKit::NetworkResourceLoader::shouldUseCredentialStorageAsync): This function doesn't call through to WebProcess, so we can keep it synchronous. But we still need to implement the async version, since that's what ResourceHandle calls. (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpaceAsync): Made async. (WebKit::NetworkResourceLoader::continueCanAuthenticateAgainstProtectionSpace): Notify ResourceHandle when response is ready. (WebKit::NetworkResourceLoader::didReceiveDataArray): Removed unnecessary WebCore prefixes. (WebKit::NetworkResourceLoader::willCacheResponseAsync): This matches default implementation, but we are overriding everything to make it clearer what's missing. (WebKit::NetworkResourceLoader::willStopBufferingData): Removed unnecessary WebCore prefixes. * NetworkProcess/NetworkResourceLoader.h: Updated to use async client methods. Keep ResourceRequest around while handling willSendRequest, as we need the original to recombine the request. Removed CFNet version of willCacheResponse for now, as we are not using it yet. * Shared/Authentication/AuthenticationManager.cpp: Assert that methods touching a global HashMap all run on main thread. Changed generateAuthenticationChallengeID() to use regular increment, as there is no need to run it from a secondary thread. * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveSyncMessage): We no longer have any sync messages. * WebProcess/Network/WebResourceLoader.h: * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::willSendRequest): (WebKit::WebResourceLoader::canAuthenticateAgainstProtectionSpace): * WebProcess/Network/WebResourceLoader.messages.in: Changed to use async messages. 2013-03-26 Tim Horton [wk2] Don't send intrinsic content size updates more than once per runloop https://bugs.webkit.org/show_bug.cgi?id=113258 Reviewed by Simon Fraser. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged): Only start the zero-delay timer if it's not already active. 2013-03-26 Tony Chang Autogenerate the scrollAnimatorEnabled setting in Settings.in https://bugs.webkit.org/show_bug.cgi?id=113253 Reviewed by James Robinson. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setUseFixedLayout): Update call to WebCore to use setScrollAnimatorEnabled(bool). (WebKit::WebPage::updatePreferences): Update call to WebCore to use setScrollAnimatorEnabled(bool). 2013-03-26 Andras Becsi [Qt][WK2] Fails to start QtWebProcess.exe if installed in a path containing spaces https://bugs.webkit.org/show_bug.cgi?id=113328 Reviewed by Jocelyn Turcotte. Downstream bugreport: https://bugreports.qt-project.org/browse/QTBUG-30249 We use QProcess::start() with a commandline string to start the web process and the string is treated by QProcess as a whitespace delimeted list of the command and the arguments, thus we have to escape the path to the process binaries so that if the path contains spaces we still run the appropriate command. * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: (WebKit::ProcessLauncher::launchProcess): 2013-03-26 Andras Becsi [Qt][WK2] QML WebView asserts when double clicking a link https://bugs.webkit.org/show_bug.cgi?id=113329 Reviewed by Jocelyn Turcotte. Downstream bugreport: https://bugreports.qt-project.org/browse/QTBUG-30288 Remove an erroneous assert which is no longer valid if mouse gestures are enabled. * UIProcess/qt/QtWebPageEventHandler.cpp: (WebKit::QtWebPageEventHandler::handleInputEvent): 2013-03-26 Tim Horton [wk2] Don't send intrinsic content size updates more than once per runloop https://bugs.webkit.org/show_bug.cgi?id=113258 Reviewed by Anders Carlsson. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): Add a zero-delay timer for intrinsic content size updates. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Add a zero-delay timer for intrinsic content size updates. (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged): Start our new one-shot zero-delay timer. (WebKit::TiledCoreAnimationDrawingArea::updateIntrinsicContentSizeTimerFired): Inform the WebPage that the intrinsic content size has changed. 2013-03-26 Simon Cooper bundle-ids need to be sanitized before using them in filesystem paths https://bugs.webkit.org/show_bug.cgi?id=113030 Reviewed by Alexey Proskuryakov. When choosing / looking for a specialized Sandbox for a Plugin the bundle-id needs to be sanitized before using it to construct a filesystem name to look up. The “/“ character should not be allowed and transformed into something else, in this case a “:” * PluginProcess/mac/PluginProcessMac.mm: (WebKit::loadSandboxProfile): 2013-03-26 Zeno Albisser [Qt] UIProcess should initialize WebCoreSystemInterface. https://bugs.webkit.org/show_bug.cgi?id=113300 The WebCoreSystemInterface is necessary to detect supported mime types on Mac OS. In particular it is needed for download support. This patch fixes in particular the previously failing Qt API qmltest WebViewDownload::test_downloadRequest. The test was crashing when using QTKit, because functions in WebCoreSystemInterface could not be resolved on the UIProcess side. Reviewed by Jocelyn Turcotte. * UIProcess/qt/WebContextQt.cpp: (WebKit::WebContext::platformInitializeWebProcess): 2013-03-25 Kent Tamura Rename ENABLE_INPUT_TYPE_DATETIME https://bugs.webkit.org/show_bug.cgi?id=113254 Reviewed by Kentaro Hara. Rename ENABLE_INPUT_TYPE_DATETIME to ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE. Actually I'd like to remove the code, but we shouldn't remove it yet because we shipped products with it on some platforms. * Configurations/FeatureDefines.xcconfig: 2013-03-25 Dean Jackson Cleanup plugin snapshotting autostart decision making https://bugs.webkit.org/show_bug.cgi?id=113231 Reviewed by Tim Horton. Two major changes to the way snapshotting plugins may autostart. The first is that previously WebCore was keeping a hash that represented the combination of page origin, plugin origin and mime type. WebKit was responsible for deciding if that particular hash should autostart. Now, WebKit keeps the hash, and WebCore just asks us whether the combination of origins and mimetype should start immediately. You can see this change the in WebPluginClient and WebProcess APIs. The second change is that we now keep two types of structures around to decide whether a plugin should autostart. One is the existing page + plugin origin combination. The other is simply the plugin origin, which allows plugins from major providers to autostart no matter what page they were embedded on. * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::encode): Encode the new parameter. (WebKit::WebProcessCreationParameters::decode): Decode the new parameter. * Shared/WebProcessCreationParameters.h: Also keep a list of strings around. * UIProcess/API/C/WKContext.cpp: (WKContextSetPlugInAutoStartOrigins): The C API to send the list of plugin origins over to the context. * UIProcess/API/C/WKContext.h: * UIProcess/Plugins/PlugInAutoStartProvider.cpp: (WebKit::PlugInAutoStartProvider::addAutoStartOriginHash): Renamed from addAutoStartOrigin. No functional change other than new names for members. (WebKit::PlugInAutoStartProvider::autoStartOriginHashesCopy): Ditto. (WebKit::PlugInAutoStartProvider::autoStartOriginsTableCopy): Ditto. (WebKit::PlugInAutoStartProvider::setAutoStartOriginsTable): Ditto. (WebKit::PlugInAutoStartProvider::setAutoStartOriginsArray): New method that converts the incoming ImmutableArray into a Vector of Strings. (WebKit::PlugInAutoStartProvider::didReceiveUserInteraction): Rename for new members. * UIProcess/Plugins/PlugInAutoStartProvider.h: Renaming member variables. Adding some typedefs to clean up code. (WebKit::PlugInAutoStartProvider::autoStartOrigins): New accessor. * UIProcess/WebContext.cpp: (WebKit::WebContext::createNewWebProcess): Renaming, and copy the new parameter into the process creation. (WebKit::WebContext::addPlugInAutoStartOriginHash): Renaming. (WebKit::WebContext::setPlugInAutoStartOriginHashes): Renaming. (WebKit::WebContext::setPlugInAutoStartOrigins): New method. * UIProcess/WebContext.h: Adds the new setPlugInAutoStartOrigin method. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::didInitializePlugin): Drive-by fix that was attempting to restart plugins that were in the process of restarting. (WebKit::PluginView::pluginDidReceiveUserInteraction): Temporarily suspend update of expiration time if the user interacts with a plugin. * WebProcess/WebCoreSupport/WebPlugInClient.cpp: (WebKit::WebPlugInClient::shouldAutoStartFromOrigin): Renaming. (WebKit::WebPlugInClient::didStartFromOrigin): Ditto. * WebProcess/WebCoreSupport/WebPlugInClient.h: Renaming. * WebProcess/WebProcess.cpp: Drive-by - noticed that we forgot to count seconds in a timeout threshold. (WebKit::WebProcess::initializeWebProcess): Also add the list of origins when we initialize. (WebKit::addCaseFoldedCharacters): Copied from WebCore - adds a String to a hash input. (WebKit::hashForPlugInOrigin): Copied from WebCore - hashing function. (WebKit::WebProcess::isPlugInAutoStartOriginHash): Renaming. (WebKit::WebProcess::shouldPlugInAutoStartFromOrigin): Check the list of pure origins first. If that fails, fall back to the hash list of pairs. (WebKit::WebProcess::plugInDidStartFromOrigin): Renaming. (WebKit::WebProcess::didAddPlugInAutoStartOriginHash): Ditto. (WebKit::WebProcess::resetPlugInAutoStartOriginHashes): Ditto. (WebKit::WebProcess::plugInDidReceiveUserInteraction): Ditto. * WebProcess/WebProcess.h: Renaming some methods, but also adding the input of the new origin-only list. * WebProcess/WebProcess.messages.in: Renaming a message. 2013-03-25 Maxim Ermilov [Qt] Qml WebKit needs preferences to change security knobs https://bugs.webkit.org/show_bug.cgi?id=111979 Reviewed by Jocelyn Turcotte. * UIProcess/API/qt/qwebpreferences.cpp: (QWebPreferencesPrivate::testAttribute): (QWebPreferencesPrivate::setAttribute): (QWebPreferences::universalAccessFromFileURLsAllowed): (QWebPreferences::setUniversalAccessFromFileURLsAllowed): (QWebPreferences::fileAccessFromFileURLsAllowed): (QWebPreferences::setFileAccessFromFileURLsAllowed): * UIProcess/API/qt/qwebpreferences_p.h: * UIProcess/API/qt/qwebpreferences_p_p.h: 2013-03-23 Geoffrey Garen Added a setting for whether JavaScript markup is enabled https://bugs.webkit.org/show_bug.cgi?id=112999 Rolled out a line from r146664 that was left over from before I adopted the Settings.in way of adding a new setting. Reviewed by Ryosuke Niwa. * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): No need to initialize / override -- Settings.in settings do this automatically. Also, dydx noticed that this line of code had a typo, and was totaly wrong. 2013-03-21 Kiran Muppala Add runtime setting for hidden page DOM timer throttling and CSS animation suspension https://bugs.webkit.org/show_bug.cgi?id=112308 Reviewed by Gavin Barraclough. Add private preference for enabling/disabling hidden page DOM timer throttling and CSS animation suspension. The preference should be enabled by default only on Mac, where WebKit2 is a private API and hence compatibility is less of a issue. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetHiddenPageDOMTimerThrottlingEnabled): (WKPreferencesGetHiddenPageDOMTimerThrottlingEnabled): (WKPreferencesSetHiddenPageCSSAnimationSuspensionEnabled): (WKPreferencesGetHiddenPageCSSAnimationSuspensionEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Allow WebKitTestRunner to override hiddenPageDOMTimerThrottlingEnabled. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2013-03-22 Tim Horton Plugin Snapshotting: Auto-start dominant plugins https://bugs.webkit.org/show_bug.cgi?id=113111 Reviewed by Dean Jackson. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::didInitializePlugin): (WebKit::PluginView::paint): (WebKit::PluginView::invalidateRect): (WebKit::PluginView::isAcceleratedCompositingEnabled): Acknowledge the new "Restarting" DisplayState. 2013-03-21 Jer Noble After switching to another space and back, video races to catch up with audio https://bugs.webkit.org/show_bug.cgi?id=113006 Reviewed by Anders Carlsson. Add an observer for the NSWorkspaceActiveSpaceDidChangeNotification notification, and trigger a visibility update when that notification is observed. * UIProcess/API/mac/WKView.mm: (-[WKView dealloc]): Unregister the observer. (-[WKView _activeSpaceDidChange:]): Notify the view that its visibility may have changed. (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Add the observer. 2013-03-21 Geoffrey Garen Added a setting for whether JavaScript markup is enabled https://bugs.webkit.org/show_bug.cgi?id=112999 Reviewed by Maciej Stachowiak. This setting is useful for clients that want protection from script injection attacks. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesGetJavaScriptMarkupEnabled): (WKPreferencesSetJavaScriptMarkupEnabled): (WKPreferencesGetJavaScriptEnabled): * UIProcess/API/C/WKPreferences.h: * UIProcess/API/mac/WKBrowsingContextGroup.mm: (-[WKBrowsingContextGroup allowsJavaScriptMarkup]): (-[WKBrowsingContextGroup setAllowsJavaScriptMarkup:]): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Plumbed through to API. 2013-03-22 Mario Sanchez Prada [GTK] Include the right GL header for GLES2 https://bugs.webkit.org/show_bug.cgi?id=113034 Reviewed by Martin Robinson. Include GLES2/gl2.h when using GLES2. * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: 2013-03-22 Timothy Hatcher Fix an assert when opening the Web Inspector window for the first time. rdar://problem/13471765 https://webkit.org/b/113053 Reviewed by Eric Carlson. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::createInspectorWindow): Assign m_inspectorWindow earlier so it is ready for when center is called and windowDidMove: gets called. 2013-03-21 Tim Horton [wk2] Page Overlays: Don't create backing store until the client asks us to paint https://bugs.webkit.org/show_bug.cgi?id=112989 Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::highlight): * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::updateFindUIAfterPageScroll): Invalidate the entire overlay on installation, to maintain existing behavior on platforms where the fade-in animation is not performed by invalidating the overlay. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::installPageOverlay): Don't invalidate the overlay upon installation. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay): Create backing store for the page overlay layer the first time it is painted into. (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): Don't update the size of the page overlay layer unless we intend for it to have backing store. (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): Don't create backing store when we create the page overlay layer. 2013-03-21 Brady Eidson If a previously loaded resource is later stored to the disk cache, replace the buffer with MMAP'ed memory. and https://bugs.webkit.org/show_bug.cgi?id=112943 Reviewed by Geoff Garen. Add a timer that will try to look up the disk cached buffer for the resource a few seconds after the load completes and - if the resource is disk backed - send it to the WebProcess for sharing: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::NetworkResourceLoader): (WebKit::NetworkResourceLoader::diskCacheTimerFired): (WebKit::NetworkResourceLoader::didReceiveResponse): (WebKit::NetworkResourceLoader::didReceiveData): (WebKit::NetworkResourceLoader::didFinishLoading): * NetworkProcess/NetworkResourceLoader.h: * NetworkProcess/mac/NetworkResourceLoaderMac.mm: (WebKit::NetworkResourceLoader::tryGetShareableHandleForResource): Refactor SharedMemory to remove the unnecessary vm_copy and only vm_allocate when an appropriate buffer doesn't already exist: * Platform/SharedMemory.h: * Platform/mac/SharedMemoryMac.cpp: (WebKit::SharedMemory::create): (WebKit::SharedMemory::createFromVMBuffer): (WebKit::SharedMemory::~SharedMemory): Give ShareableResource the ability to create a CFDataRef that wraps "this", and return it in a SharedBuffer: * Shared/ShareableResource.cpp: (WebKit::shareableResourceDeallocate): (WebKit::createShareableResourceDeallocator): (WebKit::ShareableResource::Handle::tryWrapInSharedBuffer): * Shared/ShareableResource.h: * Shared/WebCoreArgumentCoders.cpp: Encode/decode the cache partition for ResourceRequest. * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): (WebKit::NetworkProcessConnection::didCacheResource): Lookup the CachedResource in the WebCore memory cache and try to replace its encoded data with the shared mmap'ed buffer. * WebProcess/Network/NetworkProcessConnection.h: * WebProcess/Network/NetworkProcessConnection.messages.in: * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::didReceiveResource): 2013-03-21 Tim Horton Unreviewed build fix, forgot to stage one file. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::didChangeScrollOffsetForAnyFrame): (DrawingArea): 2013-03-21 Tim Horton [wk2] Page overlays shouldn't dirty the entire layer when flushing if the main frame can't scroll https://bugs.webkit.org/show_bug.cgi?id=111662 Reviewed by Dean Jackson. Instead of setNeedsDisplay()ing the whole page overlay layer every time through TCADA::flushLayers, do it at scroll time instead. Repainting on scroll is necessary to keep things painted in the right place when we scroll (the overlay is fixed to the size of the view), but is quite wasteful in apps that don’t scroll. This works with threaded scrolling because overlay installation forces us into main-thread scrolling mode. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::didChangeScrollOffset): Plumb scroll offset changes through to the drawing area, so it can invalidate the page overlay. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): Add didChangeScrollOffsetForAnyFrame, for WebFrameLoaderClient to call us back when any frame scrolls. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::didChangeScrollOffsetForAnyFrame): Invalidate the page overlay when any frame scrolls, so that find indicators in subframes are kept in the right place. (WebKit::TiledCoreAnimationDrawingArea::flushLayers): Stop unconditionally invalidating the page overlay when we flush layers. 2013-03-21 Alexey Proskuryakov [Mac] Move NSOperationQueue out of NetworkingContext https://bugs.webkit.org/show_bug.cgi?id=112970 Reviewed by Brady Eidson. * NetworkProcess/NetworkResourceLoader.h: * NetworkProcess/mac/RemoteNetworkingContext.h: * NetworkProcess/mac/RemoteNetworkingContext.mm: Tell ResourceHandle to use an operation queue in the new way. 2013-03-21 Timothy Hatcher Support connecting the Web Inspector without showing it. This allows you to get the debugger attached in the background. When a breakpoint is hit the Inspector will open. This change also reduces some WebProcess messaging by removing the DidLoadInspectorPage message and stops sending the SetAttachedWindow message on close. https://bugs.webkit.org/show_bug.cgi?id=112445 Reviewed by Sam Weinig. * UIProcess/API/C/WKInspector.cpp: (WKInspectorIsConnected): Added. (WKInspectorConnect): Added. (WKInspectorHide): Added. * UIProcess/API/C/WKInspector.h: Added new APIs. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::WebInspectorProxy): Initialize new state booleans. (WebKit::WebInspectorProxy::invalidate): Don't set state booleans that didClose already resets. (WebKit::WebInspectorProxy::connect): Added. (WebKit::WebInspectorProxy::show): Open if we are already connected. Call connect(). (WebKit::WebInspectorProxy::hide): Added. (WebKit::WebInspectorProxy::close): Call didClose we can detach or close the window immediately instead of waiting for a message from the WebProcess. (WebKit::WebInspectorProxy::attach): (WebKit::WebInspectorProxy::detach): Check for !m_page to match other functions. (WebKit::WebInspectorProxy::createInspectorPage): (WebKit::WebInspectorProxy::didLoadInspectorPage): Removed. Moved logic to open(). (WebKit::WebInspectorProxy::open): Added. (WebKit::WebInspectorProxy::didClose): Clear new state booleans. Don't perform work again if already closed. Use platformDetach() instead of detach() to avoid sending the SetAttachedWindow message. (WebKit::WebInspectorProxy::bringToFront): Call open() if we are not visible yet, otherwise platformBringToFront. * UIProcess/WebInspectorProxy.h: (WebKit::WebInspectorProxy::isConnected): Added. * UIProcess/WebInspectorProxy.messages.in: Removed DidLoadInspectorPage. * UIProcess/gtk/WebInspectorProxyGtk.cpp: (WebKit::WebInspectorProxy::platformHide): Added stub. * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformHide): Added. * UIProcess/qt/WebInspectorProxyQt.cpp: (WebKit::WebInspectorProxy::platformHide): Added stub. * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: Removed frontendLoaded(). * WebProcess/WebPage/WebInspector.cpp: * WebProcess/WebPage/WebInspector.h: Removed didLoadInspectorPage(). 2013-03-21 Alexey Proskuryakov Build fix. * NetworkProcess/mac/NetworkResourceLoaderMac.mm: Include CurrentTime.h, as needed to call currentTime(). 2013-03-21 Tim Horton Tiled page overlay layers don't create tiles until the first flush after they switch to being tiled https://bugs.webkit.org/show_bug.cgi?id=112860 Reviewed by Simon Fraser. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): Add storage for m_clipsToExposedRect. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::flushLayers): The page overlay layer will never have children, so we can use flushCompositingState instead of the ForThisLayerOnly variant. Pass the visible rect of the page overlay layer (computed by intersecting its bounds with the exposed rect that comes from the WKView) to flushCompositingState; don't bother setting the visible rect manually. (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged): Store m_clipsToExposedRect so we can use it in flushLayers. 2013-03-20 Benjamin Poulain [WK2] Remove VIEW_MODE_CSS_MEDIA from WebKit2 https://bugs.webkit.org/show_bug.cgi?id=112849 Reviewed by Sam Weinig. The code was added in r137148 for the sole purpose of testing, and it is not even being properly tested. Remove the code until someone actually implement the feature in WebKit2. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageCanShowMIMEType): * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: (WebPage): 2013-03-20 Zan Dobersek [GTK] Build ANGLE sources into a separate library from libWebCore.la https://bugs.webkit.org/show_bug.cgi?id=112778 Reviewed by Martin Robinson. * GNUmakefile.am: Add libLevelDB.la to the libwebkit2gtk library if using the OpenGL accelerated backend. 2013-03-20 Andras Becsi [Qt][WK2] Clean up sanity checks related to gesture recognition https://bugs.webkit.org/show_bug.cgi?id=112679 Reviewed by Jocelyn Turcotte. The only callers of the panGestureActive and pinchGestureActive member functions of the page viewport controller client are event delivery related sanity check assers, thus they can be replaced by checking for the corresponding internal states and therefore the superfluous members can be removed. Also update other asserts in the page viewport controller client to be more accurate about the expected states. * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::animateContentRectVisible): (WebKit::PageViewportControllerClientQt::touchBegin): (WebKit::PageViewportControllerClientQt::panGestureStarted): (WebKit::PageViewportControllerClientQt::pinchGestureStarted): * UIProcess/qt/PageViewportControllerClientQt.h: (PageViewportControllerClientQt): * UIProcess/qt/QtWebPageEventHandler.cpp: (WebKit::QtWebPageEventHandler::handleInputEvent): 2013-03-20 Andras Becsi [Qt][WK2] Refactor handling of content suspension to properly cover corner cases https://bugs.webkit.org/show_bug.cgi?id=111751 Reviewed by Jocelyn Turcotte. The current suspend / resume infrastructure turned out to be insufficient to cover all corner cases during transitions between gestures of complex gesture chains. The requirements for robust suspend / resume handling are: - Keep the content suspended while the user is continuously interacting, eg. does not lift the finger between transition from a pan to a pinch gesture and vice versa. - The content should not be suspended unnecessarily (like for a tap gesture), only during panning and scroll animation (flick), as well as pinch zoom and scale animation (also includes double-tap-to-zoom). - The content should never end up stuck in suspended state after long gesture chains and continuous interaction. This patch reintroduces reference counting based suspension in form of a new ViewportInteractionTracker member class to make it possible to reliably control the suspend / resume cycles during scrolling and scaling. During continuous gestures, while the user is interacting, the reference count is increased without actually suspending the content to prevent resuming unnecessarily during continuous interaction. At the same time this also assures that the page is not suspended for simple tap gestures, which was a side-effect of the previous approach based on update deferrers. The newly added functionality replaces boolean members that tried to achive the above requirements. Additionally this patch also removes the redundant m_hasSuspendedContent member from the PageViewportController since WebPageProxy already keeps this information. * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::PageViewportController): (WebKit::PageViewportController::pageDidRequestScroll): (WebKit::PageViewportController::updateMinimumScaleToFit): * UIProcess/PageViewportController.h: (PageViewportController): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::areActiveDOMObjectsAndAnimationsSuspended): * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::PageViewportControllerClientQt): (WebKit::PageViewportControllerClientQt::ViewportInteractionTracker::begin): (WebKit): (WebKit::PageViewportControllerClientQt::ViewportInteractionTracker::end): (WebKit::PageViewportControllerClientQt::animateContentRectVisible): (WebKit::PageViewportControllerClientQt::flickMoveStarted): (WebKit::PageViewportControllerClientQt::flickMoveEnded): (WebKit::PageViewportControllerClientQt::pageItemPositionChanged): (WebKit::PageViewportControllerClientQt::scaleAnimationStateChanged): (WebKit::PageViewportControllerClientQt::touchBegin): (WebKit::PageViewportControllerClientQt::touchEnd): (WebKit::PageViewportControllerClientQt::zoomToAreaGestureEnded): (WebKit::PageViewportControllerClientQt::pinchGestureStarted): (WebKit::PageViewportControllerClientQt::pinchGestureRequestUpdate): (WebKit::PageViewportControllerClientQt::pinchGestureEnded): (WebKit::PageViewportControllerClientQt::pinchGestureCancelled): (WebKit::PageViewportControllerClientQt::didChangeContentsSize): * UIProcess/qt/PageViewportControllerClientQt.h: (ViewportInteractionTracker): (WebKit::PageViewportControllerClientQt::ViewportInteractionTracker::ViewportInteractionTracker): (WebKit::PageViewportControllerClientQt::ViewportInteractionTracker::inProgress): (PageViewportControllerClientQt): 2013-03-19 Kenneth Rohde Christiansen and Mikhail Pozdnyakov [EFL][WK2] Separate WebView further from EwkView https://bugs.webkit.org/show_bug.cgi?id=111591 Reviewed by Caio Marcelo de Oliveira Filho. Main points are: - WKView API has no dependency on EFL types - WebView class does not store the Evas_Object * UIProcess/API/C/efl/WKView.cpp: (WKViewCreate): WKView creation does not require any EFL objects to be passed. * UIProcess/API/C/efl/WKView.h: * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): (EwkView::create): WKViewRef is passed to EwkView constructor from outside rather than created inside. (EwkView::webView): * UIProcess/API/efl/EwkView.h: (EwkView): (EwkView::wkView): (EwkView::page): EwkView keeps WKViewRef rather than pointer to WebView class. * UIProcess/API/efl/ewk_view_private.h: Added. (EWKViewCreate): (EWKViewGetWKView): Added private API to create ewk view evas object and return its WKViewRef. * UIProcess/API/efl/ewk_view.cpp: (ewkCreateEvasObject): (ewk_view_smart_add): (ewk_view_add): (ewk_view_add_with_context): * UIProcess/efl/WebInspectorProxyEfl.cpp: (WebKit::WebInspectorProxy::platformCreateInspectorPage): Updated accordingly to the new APIs. * UIProcess/efl/WebView.cpp: (WebKit::WebView::WebView): (WebKit::WebView::create): (WebKit): (WebKit::WebView::setEwkView): (WebKit::WebView::isViewFocused): (WebKit::WebView::isViewVisible): * UIProcess/efl/WebView.h: (WebView): Implementation of updated WKView API. 2013-03-19 Dean Jackson Allow PlugIn Snapshotting to be tested https://bugs.webkit.org/show_bug.cgi?id=98696 Reviewed by Tim Horton. Use the new maximumPlugInSnapshotAttempts setting rather than a hardcoded value. At the same time, if this value is 0, then snapshot immediately (don't wait to get a snapshot and test it). * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::didInitializePlugin): Snapshot immediately if maximum attempts are 0. (WebKit::PluginView::pluginSnapshotTimerFired): Use setting rather than file local variable. 2013-03-19 Dean Jackson Restarting a snapshotted plugin should restart all plugins from the same domain on the page https://bugs.webkit.org/show_bug.cgi?id=112725 Reviewed by Tim Horton. When we add a plugin domain hash to the list of sites that autostart, we send a message to our owning process. That message might not return before another plugin queries if it is in the list. So, before we send the message, add the current hash to the list with a very small timeout. That way the response will be to either extend the timeout, or not add the hash (in which case it will expire soon). * WebProcess/WebProcess.cpp: (WebKit::WebProcess::addPlugInAutoStartOrigin): 2013-03-19 Zan Dobersek [GTK] Fix WebKit2 builds after r146193 https://bugs.webkit.org/show_bug.cgi?id=112700 Reviewed by Martin Robinson. Apply changes to the LayerTreeHostGtk class that are analogous to changes made in r146193 to the LayerTreeHostMac class, namely introducing a PageOverlayLayersMap and using that as the source of GraphicsLayer objects that should be operated on, making it possible to support multiple page overlays. * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::initialize): (WebKit::LayerTreeHostGtk::invalidate): (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay): (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplayInRect): (WebKit::LayerTreeHostGtk::sizeDidChange): (WebKit::LayerTreeHostGtk::didInstallPageOverlay): (WebKit::LayerTreeHostGtk::didUninstallPageOverlay): (WebKit::LayerTreeHostGtk::setPageOverlayNeedsDisplay): (WebKit::LayerTreeHostGtk::paintContents): (WebKit::LayerTreeHostGtk::flushPendingLayerChanges): (WebKit::LayerTreeHostGtk::createPageOverlayLayer): (WebKit::LayerTreeHostGtk::destroyPageOverlayLayer): * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: (LayerTreeHostGtk): 2013-03-19 Tim Horton [wk2] Should support multiple page overlays, like the API suggests https://bugs.webkit.org/show_bug.cgi?id=112505 Reviewed by Simon Fraser. * WebProcess/WebPage/DrawingAreaImpl.h: * WebProcess/WebPage/LayerTreeHost.h: * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::didInstallPageOverlay): (WebKit::DrawingArea::didUninstallPageOverlay): (WebKit::DrawingArea::setPageOverlayNeedsDisplay): (WebKit::DrawingArea::setPageOverlayOpacity): Add PageOverlay argument. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::didInstallPageOverlay): (WebKit::DrawingAreaImpl::didUninstallPageOverlay): (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay): (WebKit::DrawingAreaImpl::setPageOverlayOpacity): Add PageOverlay argument, forward it to LayerTreeHost. (WebKit::DrawingAreaImpl::display): Paint all of the PageOverlays that WebPage knows about. * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::setNeedsDisplay): (WebKit::PageOverlay::fadeAnimationTimerFired): Pass the relevant PageOverlay into the DrawingArea methods that now take it. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawPageOverlay): Take the PageOverlay to draw as an argument. (WebKit::WebPage::installPageOverlay): (WebKit::WebPage::uninstallPageOverlay): Allow (un)installation of multiple PageOverlays. (WebKit::WebPage::mouseEvent): (WebKit::WebPage::mouseEventSyncForTesting): Hit-test PageOverlays in reverse order of installation (most recently installed should be topmost). * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::drawPageOverlay): Take the PageOverlay to draw as an argument. (WebKit::WebPage::hasPageOverlay): Return true if we have any number of overlays. (WebKit::WebPage::pageOverlays): Return the whole vector of overlays. * WebProcess/WebPage/mac/LayerTreeHostMac.h: Add PageOverlay argument to a few methods. Add storage for a map of PageOverlay->GraphicsLayers. * WebProcess/WebPage/mac/LayerTreeHostMac.mm: (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay): (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect): (WebKit::LayerTreeHostMac::sizeDidChange): (WebKit::LayerTreeHostMac::flushPendingLayerChanges): Operate on all installed PageOverlays, not just the most recently installed one. (WebKit::LayerTreeHostMac::didInstallPageOverlay): (WebKit::LayerTreeHostMac::didUninstallPageOverlay): Forward the passed-in PageOverlay on to createPageOverlayLayer/destroyPageOverlayLayer. (WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay): Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it. (WebKit::LayerTreeHostMac::paintContents): Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it. While not ideal (crawling the map), the vast majority of the time there will only be one entry. (WebKit::LayerTreeHostMac::initialize): Create layers for all of WebPage's active PageOverlays. (WebKit::LayerTreeHostMac::createPageOverlayLayer): Stick the newly-created GraphicsLayer into the m_pageOverlays map. Also, drive-by add support for accelerated overlays and debug borders/repaint counters in overlays. (WebKit::LayerTreeHostMac::destroyPageOverlayLayer): Remove the relevant overlay from the m_pageOverlays map and tear it down. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): Add PageOverlay argument to a few methods. Add storage for a map of PageOverlay->GraphicsLayers. Add storage for a map of GraphicsLayer->CALayers. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay): Pass PageOverlay argument on to createPageOverlayLayer. (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay): Pass PageOverlay argument on to destroyPageOverlayLayer. Refrain from re-enabling threaded scrolling if there are still more overlays installed. (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay): Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it. (WebKit::TiledCoreAnimationDrawingArea::paintContents): Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it. While not ideal (crawling the map), the vast majority of the time there will only be one entry. (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): (WebKit::TiledCoreAnimationDrawingArea::flushLayers): (WebKit::TiledCoreAnimationDrawingArea::setExposedRect): (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged): (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): Operate on all installed PageOverlays, not just the most recently installed one. (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): Stick the newly-created GraphicsLayer into the m_pageOverlays map. Also, add its platformLayer to our m_pageOverlayPlatformLayers map. (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer): Remove the relevant overlay from the m_pageOverlays and m_pageOverlayPlatformLayers maps and tear it down. (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer): When we commit changes for the layer, if the GraphicsLayer's backing platform CALayer has changed out from under us (we have a reference to the previous one in the m_pageOverlayPlatformLayers map), the GraphicsLayer has probably switched to/from a tiled layer, and we need to swap out the layer we have inserted into the root layer. We need to keep the layer ordering consistent with installation order, as well. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay): Assert if we try to install more than one page overlay into a CoordinatedLayerTreeHost, as this patch does not implement multiple overlay support for Coordinated Graphics. Keep track of the current PageOverlay so that paintContents can hand WebPage the right one. (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): Remove our reference to the PageOverlay. (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): Add unused PageOverlay argument. (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): Add unused PageOverlay argument. (WebKit::CoordinatedLayerTreeHost::paintContents): Hand WebPage the PageOverlay we're currently displaying. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (CoordinatedLayerTreeHost): Add PageOverlay* argument to relevant functions, and storage for m_pageOverlay. 2013-03-19 Sheriff Bot Unreviewed, rolling out r146183. http://trac.webkit.org/changeset/146183 https://bugs.webkit.org/show_bug.cgi?id=112673 Caused a few dozens of editing tests to fail on Mac WK2 (Requested by rniwa on #webkit). * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay): (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): (WebKit::CoordinatedLayerTreeHost::paintContents): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (CoordinatedLayerTreeHost): * WebProcess/WebPage/DrawingArea.h: (WebKit): (WebKit::DrawingArea::didInstallPageOverlay): (WebKit::DrawingArea::didUninstallPageOverlay): (WebKit::DrawingArea::setPageOverlayNeedsDisplay): (WebKit::DrawingArea::setPageOverlayOpacity): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::didInstallPageOverlay): (WebKit::DrawingAreaImpl::didUninstallPageOverlay): (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay): (WebKit::DrawingAreaImpl::setPageOverlayOpacity): (WebKit::DrawingAreaImpl::display): * WebProcess/WebPage/DrawingAreaImpl.h: (DrawingAreaImpl): * WebProcess/WebPage/LayerTreeHost.h: (LayerTreeHost): (WebKit::LayerTreeHost::setPageOverlayOpacity): * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::setNeedsDisplay): (WebKit::PageOverlay::fadeAnimationTimerFired): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawPageOverlay): (WebKit::WebPage::installPageOverlay): (WebKit::WebPage::uninstallPageOverlay): (WebKit::WebPage::mouseEvent): (WebKit::WebPage::mouseEventSyncForTesting): * WebProcess/WebPage/WebPage.h: (WebKit): (WebPage): (WebKit::WebPage::hasPageOverlay): * WebProcess/WebPage/mac/LayerTreeHostMac.h: (WebKit): (LayerTreeHostMac): * WebProcess/WebPage/mac/LayerTreeHostMac.mm: (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay): (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect): (WebKit::LayerTreeHostMac::sizeDidChange): (WebKit::LayerTreeHostMac::didInstallPageOverlay): (WebKit::LayerTreeHostMac::didUninstallPageOverlay): (WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay): (WebKit::LayerTreeHostMac::paintContents): (WebKit::LayerTreeHostMac::initialize): (WebKit::LayerTreeHostMac::flushPendingLayerChanges): (WebKit::LayerTreeHostMac::createPageOverlayLayer): (WebKit::LayerTreeHostMac::destroyPageOverlayLayer): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay): (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay): (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay): (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): (WebKit::TiledCoreAnimationDrawingArea::paintContents): (WebKit::TiledCoreAnimationDrawingArea::flushLayers): (WebKit::TiledCoreAnimationDrawingArea::setExposedRect): (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged): (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer): (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer): 2013-03-18 Tim Horton [wk2] Should support multiple page overlays, like the API suggests https://bugs.webkit.org/show_bug.cgi?id=112505 Reviewed by Simon Fraser. * WebProcess/WebPage/DrawingAreaImpl.h: * WebProcess/WebPage/LayerTreeHost.h: * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::didInstallPageOverlay): (WebKit::DrawingArea::didUninstallPageOverlay): (WebKit::DrawingArea::setPageOverlayNeedsDisplay): (WebKit::DrawingArea::setPageOverlayOpacity): Add PageOverlay argument. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::didInstallPageOverlay): (WebKit::DrawingAreaImpl::didUninstallPageOverlay): (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay): (WebKit::DrawingAreaImpl::setPageOverlayOpacity): Add PageOverlay argument, forward it to LayerTreeHost. (WebKit::DrawingAreaImpl::display): Paint all of the PageOverlays that WebPage knows about. * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::setNeedsDisplay): (WebKit::PageOverlay::fadeAnimationTimerFired): Pass the relevant PageOverlay into the DrawingArea methods that now take it. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::drawPageOverlay): Take the PageOverlay to draw as an argument. (WebKit::WebPage::installPageOverlay): (WebKit::WebPage::uninstallPageOverlay): Allow (un)installation of multiple PageOverlays. (WebKit::WebPage::mouseEvent): (WebKit::WebPage::mouseEventSyncForTesting): Hit-test PageOverlays in reverse order of installation (most recently installed should be topmost). * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::drawPageOverlay): Take the PageOverlay to draw as an argument. (WebKit::WebPage::hasPageOverlay): Return true if we have any number of overlays. (WebKit::WebPage::pageOverlays): Return the whole vector of overlays. * WebProcess/WebPage/mac/LayerTreeHostMac.h: Add PageOverlay argument to a few methods. Add storage for a map of PageOverlay->GraphicsLayers. * WebProcess/WebPage/mac/LayerTreeHostMac.mm: (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay): (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect): (WebKit::LayerTreeHostMac::sizeDidChange): (WebKit::LayerTreeHostMac::flushPendingLayerChanges): Operate on all installed PageOverlays, not just the most recently installed one. (WebKit::LayerTreeHostMac::didInstallPageOverlay): (WebKit::LayerTreeHostMac::didUninstallPageOverlay): Forward the passed-in PageOverlay on to createPageOverlayLayer/destroyPageOverlayLayer. (WebKit::LayerTreeHostMac::setPageOverlayNeedsDisplay): Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it. (WebKit::LayerTreeHostMac::paintContents): Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it. While not ideal (crawling the map), the vast majority of the time there will only be one entry. (WebKit::LayerTreeHostMac::initialize): Create layers for all of WebPage's active PageOverlays. (WebKit::LayerTreeHostMac::createPageOverlayLayer): Stick the newly-created GraphicsLayer into the m_pageOverlayLayers map. Also, drive-by add support for accelerated overlays and debug borders/repaint counters in overlays. (WebKit::LayerTreeHostMac::destroyPageOverlayLayer): Remove the relevant overlay from the m_pageOverlayLayers map and tear it down. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): Add PageOverlay argument to a few methods. Add storage for a map of PageOverlay->GraphicsLayers. Add storage for a map of GraphicsLayer->CALayers. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::didInstallPageOverlay): Pass PageOverlay argument on to createPageOverlayLayer. (WebKit::TiledCoreAnimationDrawingArea::didUninstallPageOverlay): Pass PageOverlay argument on to destroyPageOverlayLayer. Refrain from re-enabling threaded scrolling if there are still more overlays installed. (WebKit::TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay): Look up the GraphicsLayer for the PageOverlay we need to dirty, and dirty it. (WebKit::TiledCoreAnimationDrawingArea::paintContents): Find the PageOverlay corresponding to the GraphicsLayer that we're painting, and ask WebPage to paint it. While not ideal (crawling the map), the vast majority of the time there will only be one entry. (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): (WebKit::TiledCoreAnimationDrawingArea::flushLayers): (WebKit::TiledCoreAnimationDrawingArea::setExposedRect): (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged): (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): Operate on all installed PageOverlays, not just the most recently installed one. (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): Stick the newly-created GraphicsLayer into the m_pageOverlayLayers map. Also, add its platformLayer to our m_pageOverlayPlatformLayers map. (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer): Remove the relevant overlay from the m_pageOverlayLayers and m_pageOverlayPlatformLayers maps and tear it down. (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer): When we commit changes for the layer, if the GraphicsLayer's backing platform CALayer has changed out from under us (we have a reference to the previous one in the m_pageOverlayPlatformLayers map), the GraphicsLayer has probably switched to/from a tiled layer, and we need to swap out the layer we have inserted into the root layer. We need to keep the layer ordering consistent with installation order, as well. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::didInstallPageOverlay): Assert if we try to install more than one page overlay into a CoordinatedLayerTreeHost, as this patch does not implement multiple overlay support for Coordinated Graphics. Keep track of the current PageOverlay so that paintContents can hand WebPage the right one. (WebKit::CoordinatedLayerTreeHost::didUninstallPageOverlay): Remove our reference to the PageOverlay. (WebKit::CoordinatedLayerTreeHost::setPageOverlayNeedsDisplay): Add unused PageOverlay argument. (WebKit::CoordinatedLayerTreeHost::setPageOverlayOpacity): Add unused PageOverlay argument. (WebKit::CoordinatedLayerTreeHost::paintContents): Hand WebPage the PageOverlay we're currently displaying. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (CoordinatedLayerTreeHost): Add PageOverlay* argument to relevant functions, and storage for m_pageOverlay. 2013-03-18 Sam Weinig Need a bundle SPI to generate a snapshot of a specific DOM node (like [DOMNode renderedImage]) https://bugs.webkit.org/show_bug.cgi?id=110034 Reviewed by Tim Horton. * WebProcess/InjectedBundle/API/c/WKBundleNodeHandle.cpp: (WKBundleNodeHandleCopySnapshotWithOptions): * WebProcess/InjectedBundle/API/c/WKBundleNodeHandlePrivate.h: Add WKBundleNodeHandleCopySnapshotWithOptions function. * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm: * WebProcess/InjectedBundle/API/mac/WKDOMNodePrivate.h: Fix conversion method between WKDOMNode and WKBundleNodeHandleRef to have the same name in the header and implementation. * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::imageForRect): (WebKit): (WebKit::InjectedBundleNodeHandle::renderedImage): * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.h: Add implementation of WKBundleNodeHandleCopySnapshotWithOptions. * Shared/ImageOptions.h: (WebKit::snapshotOptionsToImageOptions): * WebProcess/WebPage/WebPage.cpp: Move snapshotOptionsToImageOptions conversion function to a location where it can be shared. 2013-03-18 Andreas Kling [WK2][Mac] Don't consider empty window frames cacheable. Reviewed by Anders Carlsson. If the UI client overrides getWindowFrame() and returns an empty rect, send that over to the web process and mark it as uncached. This forces the next ChromeClient::windowRect() call to synchronously retrieve the window frame from the other side. Fixes an issue with the Mac Web Inspector which uses empty rects to signify that there is no known window frame yet. In this case, we should not be falling back to the native frame. * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::windowAndViewFramesChanged): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::windowAndViewFramesChanged): 2013-03-18 Brady Eidson Mac build fix after http://trac.webkit.org/changeset/146088 * NetworkProcess/mac/NetworkResourceLoaderMac.mm: (WebKit::NetworkResourceLoader::platformDidReceiveResponse): 2013-03-18 Brady Eidson NetworkProcess should send vm_copied, mmap'ed memory to WebProcesses when a resource is already in the disk cache. and https://bugs.webkit.org/show_bug.cgi?id=112387 Reviewed by Geoff Garen. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::sendAbortingOnFailure): (WebKit::NetworkResourceLoader::didReceiveResponse): After notifying about the response, call platformDidReceiveResponse. * NetworkProcess/NetworkResourceLoader.h: * NetworkProcess/mac/NetworkResourceLoaderMac.mm: Added. (WebKit::NetworkResourceLoader::platformDidReceiveResponse): Attempt to pull a filesystem mmap'ed buffer from the CFNetwork cache and - if it exists - abort the traditional load and send that to the WebProcess instead. (WebKit::NetworkResourceLoader:: fileBackedResourceMinimumSize): For now, use the VM page size. * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::platformInitializeNetworkProcess): Set the threshold for what should be backed by a file on disk instead of stored in the database. Change SharedMemory to do a vm_copy if a previously existing buffer is being passed in: * Platform/SharedMemory.h: * Platform/mac/SharedMemoryMac.cpp: (WebKit::SharedMemory::create): (WebKit::SharedMemory::createWithVMCopy): * WebProcess/Network/WebResourceLoader.cpp: (WebKit::shareableResourceDeallocate): (WebKit::createShareableResourceDeallocator): (WebKit::WebResourceLoader::didReceiveResource): Create a special CFDataRef whose buffer is backed by a ShareableResource to send to the ResourceLoader in one chunk. * Shared/ShareableResource.h: Fix some comments. * WebKit2.xcodeproj/project.pbxproj: 2013-03-18 Mikhail Pozdnyakov [WK2][EFL] Fix code wrapping WKPageGroupRef https://bugs.webkit.org/show_bug.cgi?id=112364 Reviewed by Alexey Proskuryakov. The patch fixes following problems in EWK2 WKPageGroupRef wrapping code: firstly it makes sure that there is only one EwkPageGroup instance per WKPageGroup instance, secondly it allows web page to to use the default page group (which is implicitly created inside web context). * UIProcess/API/C/efl/WKView.cpp: (createWKView): Now may pass '0' page group as a WebView creation argument so that the default page group is used. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): (EwkView::createEvasObject): * UIProcess/API/efl/EwkView.h: (EwkView): Web view should be created before page group, so they are rearranged inside class declaration. * UIProcess/API/efl/ewk_page_group.cpp: (pageGroupMap): A map to track corresponding EwkPageGroup and WKPageGroup instances. (EwkPageGroup::findOrCreateWrapper): Returns the same EwkPageGroup instance for the same WKPageGroup instance. (EwkPageGroup::create): (EwkPageGroup::EwkPageGroup): Now there is only one constructor accepting WKPageGroupRef. (EwkPageGroup::~EwkPageGroup): * UIProcess/API/efl/ewk_page_group_private.h: (EwkPageGroup): * UIProcess/efl/WebInspectorProxyEfl.cpp: (WebKit::WebInspectorProxy::platformCreateInspectorPage): 2013-03-17 Carlos Garcia Campos [GTK] Invalid charset encoding using when substituting a misspelled word in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=112517 Reviewed by Alexey Proskuryakov. The problem is that we are creating the WebContextMenuItemData with the GtkAction label as UTF-8. * UIProcess/gtk/WebContextMenuProxyGtk.cpp: (WebKit::contextMenuItemActivatedCallback): Use String::fromUTF8() to convert the GtkAction label to UTF-16. 2013-03-16 Pratik Solanki Disable High DPI Canvas on iOS https://bugs.webkit.org/show_bug.cgi?id=112511 Reviewed by Joseph Pecoraro. * Configurations/FeatureDefines.xcconfig: 2013-03-15 Timothy Hatcher Disable suppressesIncrementalRendering for the Web Inspector. This ends up causing the Inspector to show blank for a couple seconds before it does its first paint. During that time the bare window chrome is showing when the Inspector's background and other simple elements count be painting. This causes the Inspector to look like it is loading slower than reality. https://bugs.webkit.org/show_bug.cgi?id=112300 rdar://problem/13412219 Reviewed by Geoff Garen. * UIProcess/WebInspectorProxy.cpp: (WebKit::createInspectorPageGroup): Disable suppressesIncrementalRendering. 2013-03-13 Timothy Hatcher Delay creating the Inspector window so we don't cause a CoreIPC deadlock. Other changes include: * Create the Inspector WKView at the correct size so it does not need to resize later when added to the window. * Update the minimum and initial window sizes to better match the new UI. * Store the Inspector window frame in WebKit preferences so each page group can have different saved window frames. Handy for inspecting the Inspector. https://bugs.webkit.org/show_bug.cgi?id=112300 rdar://problem/13412219 Reviewed by Geoff Garen. * Shared/WebPreferencesStore.cpp: (WebKit::defaultValueForKey): Added FOR_EACH_WEBKIT_STRING_PREFERENCE_NOT_IN_WEBCORE. * Shared/WebPreferencesStore.h: (FOR_EACH_WEBKIT_STRING_PREFERENCE_NOT_IN_WEBCORE): Added. Needed to keep WebPage::updatePreferences for trying to set WebCore::Settings. * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::minimumWindowWidth): (WebKit::WebInspectorProxy::initialWindowWidth): Bumped the values to work better with the new UI. * UIProcess/WebInspectorProxy.h: (WebKit::WebInspectorProxy::windowFrameDidChange): Added. * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorProxyObjCAdapter windowDidMove:]): (-[WKWebInspectorProxyObjCAdapter windowDidResize:]): Call WebInspectorProxy::windowFrameDidChange. (WebKit::WebInspectorProxy::createInspectorWindow): Use the preferences for the page group to get the window frame. (WebKit::WebInspectorProxy::platformCreateInspectorPage): Stop calling platformAttach or createInspectorWindow, do it in platformOpen. (WebKit::WebInspectorProxy::platformOpen): Call platformAttach or createInspectorWindow here instead. (WebKit::WebInspectorProxy::windowFrameDidChange): Added. Store the frame in the page group's preferences. (WebKit::WebInspectorProxy::platformAttach): (WebKit::WebInspectorProxy::platformDetach): Remove code that called setHidden:. We don't need to do that anymore. 2013-03-15 Zan Dobersek [GTK] Enforce the C++11 standard when compiling WebKit2 https://bugs.webkit.org/show_bug.cgi?id=112169 Reviewed by Gustavo Noronha Silva. With a limited set of supported compilers the WebKit2 source code can now be built with the C++11 language standard enforced. * GNUmakefile.am: * UIProcess/API/gtk/WebKitWebContext.cpp: (injectedBundleDirectory): Adjust the string literals concatenation, moving away from empty strings (which C++11 refuses to handle as concatenation operators) and using whitespace instead. * UIProcess/InspectorServer/gtk/WebInspectorServerGtk.cpp: (WebKit::WebInspectorServer::platformResourceForPath): Ditto. * UIProcess/gtk/WebInspectorProxyGtk.cpp: (WebKit::inspectorFilesBasePath): Ditto. 2013-03-15 Nate Chapin Hide MainResourceLoader from the outside world https://bugs.webkit.org/show_bug.cgi?id=109971 Reviewed by Adam Barth. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::convertMainResourceLoadToDownload): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: (WebFrameLoaderClient): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::convertMainResourceLoadToDownload): * WebProcess/WebPage/WebFrame.h: (WebFrame): 2013-03-15 Abhishek Arya Replace static_casts with to* helper functions. https://bugs.webkit.org/show_bug.cgi?id=112401 Reviewed by Stephen Chenney. to* helper functions are preferred over static_cast calls since they help to catch bad casts easily on the testing infrastructure. * Shared/WebRenderObject.cpp: (WebKit::WebRenderObject::WebRenderObject): 2013-03-15 Mikhail Pozdnyakov [WK2][EFL] Get rid of WebPageProxy::viewWidget() method https://bugs.webkit.org/show_bug.cgi?id=112289 Reviewed by Alexey Proskuryakov. Web page should not be aware of platform-specific view. * UIProcess/API/efl/EwkView.cpp: (wkPageToEvasObjectMap): (EwkView::EwkView): (EwkView::~EwkView): (EwkView::toEvasObject): EwkView::toEvasObject() relies on static map rather than on removed WebPageProxy::viewWidget() method. * UIProcess/API/efl/EwkView.h: * UIProcess/API/efl/ewk_text_checker.cpp: (uniqueSpellDocumentTag): * UIProcess/cairo/BackingStoreCairo.cpp: (WebKit::BackingStore::incorporateUpdate): Now uses EwkView::toEvasObject(). * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/efl/WebPageProxyEfl.cpp: Removed WebPageProxy::viewWidget() method. 2013-03-14 Andreas Kling REGRESSION(r145169): [Mac][WK2] http/tests/security/cross-frame-access-put.html fails. Reviewed by Anders Carlsson. Call getWindowFrame() to see if the UI client wants to override the window frame before sending a WindowAndViewFramesChanged message to the web process. This fixes a glitch in WTR and the Web Inspector where incorrect window frames were being used. * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::windowAndViewFramesChanged): 2013-03-14 Andy Estes [WebKit2] Only preprocess sandbox profiles if we're building for the OS X SDK https://bugs.webkit.org/show_bug.cgi?id=112330 Reviewed by David Kilzer. We shouldn't preprocess sandbox profiles just because the computer we're building on is a Mac. We should only do it if we're actually building for the OS X SDK. * DerivedSources.make: Check if $PLATFORM_NAME is macosx rather than if $OS is MACOS. 2013-03-14 Sam Weinig Support private browsing on a per-page basis Reviewed by Timothy Horton. Adds WKPageSetOverridePrivateBrowsingEnabled and WKPageGetOverridePrivateBrowsingEnabled. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: (WebPageCreationParameters): * UIProcess/API/C/WKPage.cpp: (WKPageSetOverridePrivateBrowsingEnabled): (WKPageGetOverridePrivateBrowsingEnabled): * UIProcess/API/C/WKPagePrivate.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::creationParameters): (WebKit::WebPageProxy::setOverridePrivateBrowsingEnabled): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::overridePrivateBrowsingEnabled): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::updatePreferences): (WebKit::WebPage::setOverridePrivateBrowsingEnabled): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: Pipe through. 2013-03-14 Abhishek Arya Replace static_casts with to* helper functions. https://bugs.webkit.org/show_bug.cgi?id=112296 Reviewed by Kentaro Hara. to* helper functions are preferred over static_cast calls since they help to catch bad casts easily on the testing infrastructure. * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: (WebKit::InjectedBundleNodeHandle::elementBounds): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::containsAnyFormElements): 2013-03-14 Jinwoo Song [EFL][WK2] Add an API for adding and removing user style sheets from a page group https://bugs.webkit.org/show_bug.cgi?id=110728 Reviewed by Gyuyoung Kim. This patch implements EwkPageGroup API to provide the interface of WKPageGroup. Using the EwkPageGroup, applications may create the views with a page group for the specific identifier. Also, this patch encapsulates the APIs WKPageGroupAddUserStyleSheet and WKPageGroupRemoveAllUserStyleSheets behind the EwkPageGroup class for adding and removing user style sheets from a page group. WKArrayCreateWithEinaList() is added as a generic WKArray creation API from Eina_List. * PlatformEfl.cmake: * UIProcess/API/C/efl/WKView.cpp: (createWKView): * UIProcess/API/efl/EWebKit2.h: * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): (EwkView::createEvasObject): * UIProcess/API/efl/EwkView.h: (EwkView::ewkPageGroup): (EwkView): * UIProcess/API/efl/ewk_view.cpp: (ewk_view_smart_add): (ewk_view_page_group_get): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: (EWK2UnitTest::EWK2UnitTestBase::SetUp): * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.h: (EWK2UnitTest::EWK2UnitTestBase::setWebView): * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): * UIProcess/efl/WebInspectorProxyEfl.cpp: (WebKit::WebInspectorProxy::platformCreateInspectorPage): 2013-03-14 Simon Hausmann [Qt] Improve the handling of mock geolocation, device orientation and motion clients Reviewed by Tor Arne Vestbø. The mock versions of these web facing features should be instantiated when running in DumpRenderTree only. In order for them to work, no extra Qt modules such as QtLocation are actually needed. This patch decouples enabling device orientation/motion and geolocation from the underlying Qt modules and makes them available in developer builds (!production_build) and backed by mock backends when running in drt. So if the Qt 5 modules are available, they'll be used (unless drtRun). For developers the web facing features are always enabled (although requests will time out) and the mock backends are enabled inside DRT, allowing for the layout tests to run with less dependencies. In addition this also enables the mock device motion client, which was previously never instantiated. * Target.pri: * UIProcess/qt/WebContextQt.cpp: (WebKit::WebContext::platformInitializeWebProcess): * UIProcess/qt/WebGeolocationProviderQt.cpp: * WebKit2.pri: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): 2013-03-14 Alice Liu Add to HistoryItem a way to know if its underlying CachedPage has expired. https://bugs.webkit.org/show_bug.cgi?id=110652 Reviewed by Brady Eidson. Hook up hasCachedPageExpired in InjectedBundle's BackForwardListItem. * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.cpp: (WKBundleBackForwardListItemHasCachedPageExpired): * WebProcess/InjectedBundle/API/c/WKBundleBackForwardListItem.h: * WebProcess/InjectedBundle/InjectedBundleBackForwardListItem.h: (WebKit::InjectedBundleBackForwardListItem::hasCachedPageExpired): 2013-03-13 Rik Cabanier create runtime flags for CSS Compositing https://bugs.webkit.org/show_bug.cgi?id=111818 Reviewed by Ryosuke Niwa. Added a preference to enable CSS compositing. * Shared/WebPreferencesStore.h: (WebKit): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): (WebKit::InjectedBundle::setCSSCompositingEnabled): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2013-03-13 Ryosuke Niwa Threaded HTML Parser is missing feature define flags in all but Chromium port's build files https://bugs.webkit.org/show_bug.cgi?id=112277 Reviewed by Adam Barth. * Configurations/FeatureDefines.xcconfig: 2013-03-13 Brady Eidson Small ResourceLoader cleanups. https://bugs.webkit.org/show_bug.cgi?id=112279 Reviewed by Geoff Garen. Replace the "bool allAtOnce" flag with a descriptive enum to make reading code easier. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didReceiveData): * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::didReceiveData): (WebKit::WebResourceLoader::didReceiveResource): * WebProcess/Network/WebResourceLoader.h: * WebProcess/Network/WebResourceLoader.messages.in: Get rid of the "allAtOnce" flag since it was always false. 2013-03-13 Abhishek Arya Replace static_casts with to* functions for document types. https://bugs.webkit.org/show_bug.cgi?id=112225 Reviewed by Ryosuke Niwa. * WebProcess/InjectedBundle/API/mac/WKDOMDocument.mm: Remove the redundant helper. 2013-03-13 Zan Dobersek [GTK] Build fixes after 145552 https://bugs.webkit.org/show_bug.cgi?id=112267 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Narrow down the dependency CFLAGS list to only ones that are actually needed to build the platformgtk_sources into libPlatformGtk2.la. At the moment this means only GTK+-2.0 CFLAGS are used. 2013-03-13 Antoine Quint Calling WebInspectorClient::highlight() during a fade-out animation of the PageOverlay won't stop its animation https://bugs.webkit.org/show_bug.cgi?id=112271 Reviewed by Tim Horton. Add a new stopFadeOutAnimation() on PageOverlay that we call when WebInspectorClient::highlight() is called and a page overlay is already available. This ensures that any fade-out animation is cleared before proceeding with showing the page overlay for the new highlight. * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::highlight): * WebProcess/WebPage/PageOverlay.cpp: (WebKit::PageOverlay::stopFadeOutAnimation): (WebKit): * WebProcess/WebPage/PageOverlay.h: (PageOverlay): 2013-03-13 Pavel Feldman Web Inspector: get rid of hiddenPanels filter https://bugs.webkit.org/show_bug.cgi?id=112252 Reviewed by Vsevolod Vlasov. * WebProcess/WebCoreSupport/WebInspectorFrontendClient.cpp: * WebProcess/WebCoreSupport/WebInspectorFrontendClient.h: (WebInspectorFrontendClient): 2013-03-13 Jocelyn Turcotte [WK2][Qt] Regression(145517) WebProcess asserts in debug build on WebKitTestRunner start https://bugs.webkit.org/show_bug.cgi?id=112223 Reviewed by Simon Hausmann. We need to only enable the cookie jar and the disk cache conditionally in the web process since we removed default paths and WKTR doesn't provide them. * WebProcess/qt/WebProcessQt.cpp: (WebKit::WebProcess::platformSetCacheModel): (WebKit::WebProcess::platformInitializeWebProcess): 2013-03-12 Christophe Dumez [EFL][WK2] ewk_popup_menu_close() does not work as intended https://bugs.webkit.org/show_bug.cgi?id=110209 Reviewed by Laszlo Gombos. ewk_popup_menu_close() is called by the browser to notify WebKit that the popup menu was closed. However, the implementation was calling EwkView::closePopupMenu() which was asking the browser to close the popup menu via an Evas smart function. This patch fixes the behavior and ewk_popup_menu_close() now calls WKPopupMenuListenerSetSelection() C API so that the WebProcess is notified that the popup menu was hidden. * UIProcess/API/efl/ewk_popup_menu.cpp: (EwkPopupMenu::close): 2013-03-12 Huang Dongsung Coordinated Graphics: Remove CoordinatedGraphicsLayer::setRootLayer(). https://bugs.webkit.org/show_bug.cgi?id=111835 Reviewed by Luiz Agostini. Amend CoordinatedLayerTreeHost because CoordinatedGraphicsLayer::setRootLayer() is removed. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): 2013-03-12 Dean Jackson Primary plugin hit detection needs to run after plugin creation https://bugs.webkit.org/show_bug.cgi?id=112206 Reviewed by Tim Horton. On some pages, the plugins are created after the page has loaded, and thus our heuristic to determine the primary plugin fails. Run this heuristic more often: after each PluginView is created. It already exits early if it has found a primary. But we also need to make sure that it doesn't run before load. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::addPluginView): Run detection when view is added. (WebKit::WebPage::didFinishLoad): Remember that we have loaded. (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Look at the PluginViews to see if we have a plugin. (WebKit::WebPage::resetPrimarySnapshottedPlugIn): Reset both flags. * WebProcess/WebPage/WebPage.h: (WebPage): New member variable, m_readyToFindPrimarySnapshottedPlugin. 2013-03-12 Beth Dakin WKView -printOperationWithPrintInfo:forFrame: doesn’t use the print info that is passed in https://bugs.webkit.org/show_bug.cgi?id=112212 -and corresponding- Reviewed by Anders Carlsson. We should call [NSPrintOperation printOperationWithView: printInfo:] to use the printInfo parameter instead of [NSPrintOperation printOperationWithView:] which will just use the sharedPrintInfo. * UIProcess/API/mac/WKView.mm: (-[WKView printOperationWithPrintInfo:forFrame:]): 2013-03-12 Geoffrey Garen Moved RunLoopTimer and SchedulePair to WTF https://bugs.webkit.org/show_bug.cgi?id=112171 Reviewed by Oliver Hunt. This will allow us to use timers in lower level primitives without duplicating all the code. * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: (WebFrameNetworkingContext): 2013-03-12 Zan Dobersek [GTK] Remove HILDON_CPPFLAGS and HILDON_CFLAGS references from GNUmakefiles https://bugs.webkit.org/show_bug.cgi?id=112163 Reviewed by Martin Robinson. * GNUmakefile.am: The Hildon dependency doesn't exist anymore so there's no need for references to HILDON_CPPFLAGS and HILDON_CFLAGS. 2013-03-12 Zan Dobersek [GTK] Set up the libPlatformGtk.la library https://bugs.webkit.org/show_bug.cgi?id=111738 Reviewed by Martin Robinson. * GNUmakefile.am: Reference platformgtk_cppflags variable, libPlatformGtk.la along with webcoregtk_cppflags variable, libWebCoreGtk.la. Adjust the path to GtkVersioning.c, the file has moved under Source/Platform. 2013-03-12 Mikhail Pozdnyakov [WK2][EFL] Fix EwkContext class API https://bugs.webkit.org/show_bug.cgi?id=111706 Reviewed by Alexey Proskuryakov. * UIProcess/API/C/efl/WKView.cpp: (createWKView): * UIProcess/API/efl/ewk_context.cpp: (EwkContext::findOrCreateWrapper): Renamed from create() as it returns the same instance of EwkContext for the given WKContextRef if present. (EwkContext::create): (EwkContext::defaultContext): Returns raw pointer rather than PassRefPtr as ownership is not transferred. (ewk_context_default_get): * UIProcess/API/efl/ewk_context_private.h: (EwkContext): * UIProcess/efl/WebInspectorProxyEfl.cpp: (WebKit::WebInspectorProxy::platformCreateInspectorPage): 2013-03-12 Zan Dobersek [GTK] Enable Web Audio in development builds https://bugs.webkit.org/show_bug.cgi?id=111831 Reviewed by Philippe Normand. * GNUmakefile.am: Link the plugin process against libWebCoreModules.la as well. 2013-03-11 Jocelyn Turcotte [Qt][WK2] Layer QtDownloadManager on the C API https://bugs.webkit.org/show_bug.cgi?id=109562 Reviewed by Simon Hausmann. Signed off for WebKit2 by Benjamin Poulain. * UIProcess/API/cpp/qt/WKURLQt.cpp: (WebKit::adoptToQString): (WebKit): (WebKit::adoptToQUrl): * UIProcess/API/cpp/qt/WKURLQt.h: (WebKit): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::handleDownloadRequest): * UIProcess/qt/QtDownloadManager.cpp: (WebKit::toQtDownloadManager): (WebKit): (WebKit::QtDownloadManager::QtDownloadManager): (WebKit::QtDownloadManager::addDownload): (WebKit::QtDownloadManager::didReceiveResponse): (WebKit::QtDownloadManager::didCreateDestination): (WebKit::QtDownloadManager::didFinishDownload): (WebKit::QtDownloadManager::didFailDownload): (WebKit::QtDownloadManager::didReceiveDataForDownload): * UIProcess/qt/QtDownloadManager.h: (WebKit): (QtDownloadManager): * UIProcess/qt/QtWebContext.cpp: (WebKit::QtWebContext::QtWebContext): * UIProcess/qt/QtWebError.cpp: (WebKit::QtWebError::url): (WebKit::QtWebError::description): 2013-03-11 Jocelyn Turcotte [Qt][WK2] Layer QtWebIconDatabaseClient on the C API https://bugs.webkit.org/show_bug.cgi?id=109564 Reviewed by Simon Hausmann. Signed off for WebKit2 by Benjamin Poulain. * Target.pri: * UIProcess/API/C/qt/WKIconDatabaseQt.cpp: Added. (WKIconDatabaseTryGetQImageForURL): - New API added to get a QImage from the IconDatabase. Based on WKIconDatabaseCG.h/cpp * UIProcess/API/C/qt/WKIconDatabaseQt.h: Added. * UIProcess/API/cpp/qt/WKURLQt.cpp: (WKURLCreateWithQString): (WKURLCopyQString): (WKURLCreateWithQUrl): (WKURLCopyQUrl): - The WKUrlRef behind the scene is a WTF::String and encoding it back and forth to a QUrl can slightly change its string representation. Allow converting a WKUrlRef to and from a QString to ensure this. * UIProcess/API/cpp/qt/WKURLQt.h: * UIProcess/API/qt/qwebiconimageprovider.cpp: (QWebIconImageProvider::iconURLForPageURLInContext): - The icon URL isn't accessible form the C API and shouldn't need to be. Use an ID incremented on each update to trigger an update of the QML Image component. (QWebIconImageProvider::requestImage): - The IconDatabase was previously assumed to resize the image to the requested size, but this parameter is ignored, as stated in a comment in WebIconDatabase::imageForPageURL. Explicitely do the resize after fetching the original icon to also be able to report the original size properly to QtQuick. * UIProcess/API/qt/qwebiconimageprovider_p.h: * UIProcess/API/qt/tests/qmltests/WebView/tst_favIconLoad.qml: - Set the image to load asynchronously to further test the possibility of threading issues in QtWebIconDatabaseClient::iconImageForPageURL - Add a few barriers to fix some issues where the load succeeded signal would be wrongly catched by init() before the next test. * UIProcess/qt/QtWebContext.cpp: (WebKit::QtWebContext::QtWebContext): * UIProcess/qt/QtWebIconDatabaseClient.cpp: (WebKit): (WebKit::QtWebIconDatabaseClient::QtWebIconDatabaseClient): (WebKit::QtWebIconDatabaseClient::~QtWebIconDatabaseClient): (WebKit::QtWebIconDatabaseClient::updateID): (WebKit::QtWebIconDatabaseClient::didChangeIconForPageURL): (WebKit::QtWebIconDatabaseClient::iconImageForPageURL): - Remove the Mutex. This mutex was useless given that it would only be locked from a single thread. Since the IconDatabase runs in its own thread, it already is thread-safe to access. (WebKit::QtWebIconDatabaseClient::retainIconForPageURL): (WebKit::QtWebIconDatabaseClient::releaseIconForPageURL): * UIProcess/qt/QtWebIconDatabaseClient.h: (QtWebIconDatabaseClient): * WebKit2.pri: 2013-03-11 Jocelyn Turcotte [Qt][WK2] Specify storage paths through the C API https://bugs.webkit.org/show_bug.cgi?id=111435 Reviewed by Simon Hausmann. Signed off for WebKit2 by Benjamin Poulain. The WKIconDatabase should be opened through a call to WKContextSetIconDatabasePath. To avoid having some paths returned through WebContext::platformDefault* and some others through the C API, make sure that all those paths are set through the C API. * Shared/qt/QtDefaultDataLocation.cpp: Removed. * Shared/qt/QtDefaultDataLocation.h: Removed. * Target.pri: * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: (WebKit::cacheFile): - This part is left alone behind the C API. Since PluginProcessProxy have no knowledge of the WebContext it is rather difficult to fetch a configured directory that could be used for this purpose (like the disk cache storage). Hard-code a compatible logic to keep the current behavior. (WebKit::removeCacheFile): (WebKit): (WebKit::readMetaDataFromCacheFile): (WebKit::writeToCacheFile): (WebKit::tryReadPluginMetaDataFromCacheFile): - Update the code to better handle an empty cache file path. * UIProcess/qt/QtWebContext.cpp: (WebKit::QtWebContext::defaultContext): (WebKit::defaultLocation): (WebKit): (WebKit::QtWebContext::preparedStoragePath): * UIProcess/qt/QtWebContext.h: * UIProcess/qt/QtWebIconDatabaseClient.cpp: (WebKit::QtWebIconDatabaseClient::QtWebIconDatabaseClient): * UIProcess/qt/WebContextQt.cpp: (WebKit::WebContext::applicationCacheDirectory): (WebKit::WebContext::platformDefaultDatabaseDirectory): (WebKit::WebContext::platformDefaultIconDatabasePath): (WebKit::WebContext::platformDefaultLocalStorageDirectory): (WebKit::WebContext::platformDefaultDiskCacheDirectory): (WebKit::WebContext::platformDefaultCookieStorageDirectory): 2013-02-14 Jocelyn Turcotte [Qt] Properly layer QtWebContext on top of the C API https://bugs.webkit.org/show_bug.cgi?id=108475 Reviewed by Simon Hausmann. Signed off for WebKit2 by Benjamin Poulain. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): * UIProcess/qt/QtWebContext.cpp: (WebKit::initializeContextInjectedBundleClient): (WebKit::QtWebContext::QtWebContext): (WebKit::QtWebContext::create): (WebKit::QtWebContext::defaultContext): * UIProcess/qt/QtWebContext.h: (WebKit): (QtWebContext): (WebKit::QtWebContext::context): 2013-02-14 Jocelyn Turcotte [Qt][WK2] Allow QtWebContext to call directly to QQuickWebView with a WKPageRef https://bugs.webkit.org/show_bug.cgi?id=109829 Reviewed by Allan Sandfeld Jensen. Signed off for WebKit2 by Benjamin Poulain. Instead of going through WebPageProxy and PageClient to forward injected bundle messages received by the context, maintain a static map of WKPageRef to QQuickWebViewPrivate. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::get): (QQuickWebViewPrivate::~QQuickWebViewPrivate): (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::didReceiveMessageFromNavigatorQtObject): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/raw/qrawwebview.cpp: * UIProcess/API/qt/raw/qrawwebview_p_p.h: * UIProcess/PageClient.h: (PageClient): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/qt/QtPageClient.cpp: * UIProcess/qt/QtPageClient.h: (QtPageClient): * UIProcess/qt/QtWebContext.cpp: (WebKit::didReceiveMessageFromInjectedBundle): * UIProcess/qt/WebPageProxyQt.cpp: 2013-02-14 Jocelyn Turcotte [Qt][WK2] Keep the WebContext alive during the whole application's lifetime https://bugs.webkit.org/show_bug.cgi?id=109827 Reviewed by Simon Hausmann. Signed off for WebKit2 by Benjamin Poulain. The lifetime of the WebContext is difficult to manage because of a circular reference kept with the WebProcessProxy until it shuts itself down, 60 seconds after the last page is closed. There was some notification in place to handle this in the upper layer, but having to go through the C API (done in a following patch) makes this quite awkward. Keeping the WebContext alive also includes the icon database which is quite heavy, in the future we should only enable it once the QQuickWebView::icon property is read. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::QQuickWebViewPrivate): (QQuickWebViewPrivate::handleDownloadRequest): (QQuickWebViewPrivate::updateIcon): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/qwebiconimageprovider.cpp: (QWebIconImageProvider::requestImage): * UIProcess/qt/QtWebContext.cpp: (WebKit): (WebKit::QtWebContext::QtWebContext): (WebKit::QtWebContext::~QtWebContext): (WebKit::QtWebContext::create): (WebKit::QtWebContext::defaultContext): * UIProcess/qt/QtWebContext.h: (QtWebContext): (WebKit::QtWebContext::downloadManager): (WebKit::QtWebContext::iconDatabase): * UIProcess/qt/WebContextQt.cpp: (WebKit::WebContext::platformInvalidateContext): 2013-02-14 Jocelyn Turcotte [Qt][WK2] Favor QUrl and QString over WTF::String in the Qt API layer https://bugs.webkit.org/show_bug.cgi?id=109468 Reviewed by Allan Sandfeld Jensen. Signed off for WebKit2 by Benjamin Poulain. In preparation for patches using the C API types in some areas, remove the usage of WTF::String on the affected line. Use a QUrl for icon URL to avoid unnecessary conversion. Use a QString for the page URL to keep it compatible with WebPageProxy and WebIconDatabase and avoid QUrl parsing. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::_q_onIconChangedForPageURL): (QQuickWebViewPrivate::updateIcon): (QQuickWebView::emitUrlChangeIfNeeded): (QQuickWebView::icon): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/qwebiconimageprovider.cpp: (QWebIconImageProvider::iconURLForPageURLInContext): * UIProcess/API/qt/qwebiconimageprovider_p.h: * UIProcess/qt/QtWebIconDatabaseClient.cpp: (WebKit::QtWebIconDatabaseClient::iconForPageURL): (WebKit::QtWebIconDatabaseClient::iconImageForPageURL): (WebKit::QtWebIconDatabaseClient::retainIconForPageURL): (WebKit::QtWebIconDatabaseClient::releaseIconForPageURL): * UIProcess/qt/QtWebIconDatabaseClient.h: (QtWebIconDatabaseClient): 2013-03-12 Manuel Rego Casasnovas [GTK][WK2] REGRESSION(r145081): Unit tests not working if locale is not English https://bugs.webkit.org/show_bug.cgi?id=111973 Reviewed by Carlos Garcia Campos. The problem is that the UIProcess locale is reseted to C in gtk_test_init, however the WebProcess does not inherit the locale set in the UIProcess and it uses the system one (that could be different to English). So, there were problems in some tests that are comparing strings from both processes like WebKit2APITests/TestPrinting and WebKit2APITests/TestWebKitWebContext. The solution is to set the locale environment variable LC_ALL to C in order to reset WebProcess locale too. * UIProcess/API/gtk/tests/TestMain.cpp: (main): Set environment variable LC_ALL to C. 2013-03-11 Brady Eidson Loads are never canceled in the NetworkProcess and https://bugs.webkit.org/show_bug.cgi?id=112103 Reviewed by Alexey Proskuryakov. If a connection to a WebProcess is closed (gracefully or by crashing) then: - All scheduled loads for that connection should be forgotten. - All in-progress loads for that connection should be aborted asap. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::requestsToCleanupMutex): The "request to stop" mechanism is now called "request to cleanup" (WebKit::requestsToCleanup): (WebKit::NetworkResourceLoader::scheduleCleanupOnMainThread): (WebKit::NetworkResourceLoader::performCleanups): (WebKit::NetworkResourceLoader::cleanup): (WebKit::NetworkResourceLoader::didFinishLoading): (WebKit::NetworkResourceLoader::didFail): (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose): If there is a resource handle, let the loading thread notice the connection is invalid. Otherwise request to cleanup the loader. (WebKit::NetworkResourceLoader::sendAbortingOnFailure): (WebKit::NetworkResourceLoader::sendSyncAbortingOnFailure): (WebKit::NetworkResourceLoader::abortInProgressLoad): Cancel the resource handle and schedule main thread cleanup. (WebKit::NetworkResourceLoader::didReceiveResponse): Use sendAbortingOnFailure instead of send. (WebKit::NetworkResourceLoader::didReceiveData): Ditto. (WebKit::NetworkResourceLoader::willSendRequest): Call abortInProgressLoad if the sync message failed. (WebKit::NetworkResourceLoader::canAuthenticateAgainstProtectionSpace): Ditto. * NetworkProcess/NetworkResourceLoader.h: Make connectionToWebProcessDidClose() pure virtual, moving its implementation to the subclasses: * NetworkProcess/SchedulableLoader.cpp: * NetworkProcess/SchedulableLoader.h: * NetworkProcess/SyncNetworkResourceLoader.cpp: (WebKit::SyncNetworkResourceLoader::start): Call cleanup(). (WebKit::SyncNetworkResourceLoader::connectionToWebProcessDidClose): Call cleanup(). (WebKit::SyncNetworkResourceLoader::cleanup): Factor out the sync loader cleanup code. * NetworkProcess/SyncNetworkResourceLoader.h: 2013-03-11 Tim Horton PDFPlugin: Return PDFKit's data instead of the original resource data for save/etc. https://bugs.webkit.org/show_bug.cgi?id=111956 Reviewed by Alexey Proskuryakov. If we return the original resource data, we lose changes made to annotations. * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::pdfDocumentDidLoad): Adopt the renamed rawData(). (WebKit::PDFPlugin::saveToPDF): Use liveData so that "Save to PDF" persists changes to annotations. (WebKit::PDFPlugin::openWithNativeApplication): Use liveData so that "Open With [native application]" persists changes to annotations. * WebProcess/Plugins/PDF/PDFPluginAnnotation.h: * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: (WebKit::PDFPluginAnnotation::commit): Added, inform PDFPlugin that we're mutating the document. * WebProcess/Plugins/PDF/PDFPluginChoiceAnnotation.mm: (WebKit::PDFPluginChoiceAnnotation::commit): Let PDFPluginAnnotation do what it needs to inform PDFPlugin that we're going to mutate the document. * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: (WebKit::PDFPluginTextAnnotation::commit): Let PDFPluginAnnotation do what it needs to inform PDFPlugin that we're going to mutate the document. * WebProcess/Plugins/PDF/SimplePDFPlugin.h: (WebKit::SimplePDFPlugin::didMutatePDFDocument): Added. (WebKit::SimplePDFPlugin::liveData): Added. (WebKit::SimplePDFPlugin::rawData): Renamed from data(). Return NSData for consistency. (WebKit::SimplePDFPlugin::pdfDocumentWasMutated): Added. * WebProcess/Plugins/PDF/SimplePDFPlugin.mm: (WebKit::SimplePDFPlugin::liveData): Return PDFKit's data if the user has mutated the document, otherwise the raw data. This way, PDFs that PDFKit can't process will still be downloadable as long as the user doesn't interact with annotations. (WebKit::SimplePDFPlugin::liveResourceData): Return a SharedData wrapping the PDFDocument's data. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/PDF/SimplePDFPlugin.h: * WebProcess/Plugins/Plugin.h: * WebProcess/Plugins/PluginProxy.h: * WebProcess/Plugins/PluginView.cpp: * WebProcess/Plugins/PluginView.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::getMainResourceDataOfFrame): Use a SharedData instead of raw data for getResourceData, and rename it liveResourceData(). 2013-03-11 Tim Horton [wk2] WebProcess and WebContentService don't respect system localization https://bugs.webkit.org/show_bug.cgi?id=112091 Reviewed by Dan Bernstein. Allow CFBundle to use localizations that don't exist in the main bundle, so that, for example, injected bundles can load and use strings from localized frameworks. * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist: * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist: * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: 2013-03-11 Jochen Eisinger Rename DefinitelyProcessingUserGesture to DefinitelyProcessingNewUserGesture https://bugs.webkit.org/show_bug.cgi?id=111959 Reviewed by Alexey Proskuryakov. * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::didClickNotification): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::evaluate): * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: (WebKit::WebContextMenuClient::searchWithGoogle): 2013-03-11 Tim Horton PDFPlugin: Make scrolling between pages in non-continuous modes work https://bugs.webkit.org/show_bug.cgi?id=111415 Reviewed by Alexey Proskuryakov. * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add some more PDFLayerController SPI. * WebProcess/Plugins/PDF/PDFPlugin.h: (PDFPlugin): Override handleWheelEvent. * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::handleWheelEvent): If PDFLayerController is in non-continuous mode, allow scrolling between pages by intercepting scroll events, and checking whether we're at the top or bottom of a page. If we are, and a single event exceeds the threshold of 20px (0px for legacy scroll wheels), we jump to the next or previous page and scroll to the right place. Do not allow momentum scrolling to switch pages. 2013-03-11 Mark Lam Fix some WebDatabaseManagerProxy methods to only send to one WebProcsess instead of broadcasting to all WebProcesses. https://bugs.webkit.org/show_bug.cgi?id=112074. Reviewed by Alexey Proskuryakov. The reason for this is because the intent of these messages is to act on the tracker database that is shared between all WebProcesses. It is redundant and inefficient for multiple WebProcesses to service the same request/message. And because of multi-process contention on accessing the tracker database, the results returned to the UIProcess may also be erroneous. For example, if getDatabaseOrigins() is broadcasted to all WebProcesses, they will contend to open the tracker database at the same time. If one of these processes fails because the database is already in use, then it may return with an empty list when it should not be empty. With this fix, only one WebProcess gets the message and will perform the requested query/action on behalf of all WebProcesses. * UIProcess/WebContext.h: (WebKit::WebContext::sendToOneProcess): * UIProcess/WebDatabaseManagerProxy.cpp: (WebKit::WebDatabaseManagerProxy::getDatabasesByOrigin): (WebKit::WebDatabaseManagerProxy::getDatabaseOrigins): (WebKit::WebDatabaseManagerProxy::deleteDatabaseWithNameForOrigin): (WebKit::WebDatabaseManagerProxy::deleteDatabasesForOrigin): (WebKit::WebDatabaseManagerProxy::deleteAllDatabases): (WebKit::WebDatabaseManagerProxy::setQuotaForOrigin): 2013-03-11 Jeffrey Pfau List cache partitions as units instead of as their contents https://bugs.webkit.org/show_bug.cgi?id=111909 Reviewed by Maciej Stachowiak. * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: (WebKit::WebResourceCacheManager::cfURLCacheHostNames): Attempt to enumerate cache partitions based on information we have 2013-01-30 Jer Noble Full screen mode should not exit when application resigns active state. https://bugs.webkit.org/show_bug.cgi?id=106129 Reviewed by Darin Adler. Allow the user to close the full screen window with Cmd-w by making the full screen window closable, and by intercepting performClose:. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController init]): Create a closable full screen window. (-[WKFullScreenWindowController performClose:]): When we receive a close request in full screen mode, animate out of full screen. 2013-03-11 Zan Dobersek [GTK] WebKit2-only build fails https://bugs.webkit.org/show_bug.cgi?id=112033 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Introduce the artifical dependency of libwebkit2gtk on libwebkitgtk only if building WebKit1 as well. Similarly with the WebKitPluginProcess, depend on libwebkitgtk only if building WebKit1, the dependency is otherwise not necessary. 2013-03-11 Tim Horton [wk2] Search With [your search provider here] should use NSPerformService in WebKit2/Mac https://bugs.webkit.org/show_bug.cgi?id=111995 Reviewed by Sam Weinig. * UIProcess/WebPageProxy.h: (WebPageProxy): Add searchTheWeb(). * UIProcess/WebPageProxy.messages.in: Add SearchTheWeb message. * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::searchTheWeb): Added. Call out to NSPerformService to search with the system default search provider, in the browser. * WebProcess/Plugins/PDF/PDFPlugin.h: (PDFPlugin): Add performWebSearch(). * WebProcess/Plugins/PDF/PDFPlugin.mm: (-[WKPDFLayerControllerDelegate performWebSearch:]): Added, forward the delegate callback to PDFPlugin. (WebKit::PDFPlugin::performWebSearch): Added, forward the search string to WebPageProxy. * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: (WebKit::WebContextMenuClient::searchWithGoogle): Don't build the old load-Google-in-the-main-frame code on Mac. * WebProcess/WebCoreSupport/mac/WebContextMenuClientMac.mm: (WebKit::WebContextMenuClient::searchWithGoogle): Instead, send the search string to WebPageProxy. 2013-03-11 Helder Correia [WK2] Add C API preference: accelerated compositing for overflow scroll https://bugs.webkit.org/show_bug.cgi?id=111916 Reviewed by Simon Fraser. * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetAcceleratedCompositingForOverflowScrollEnabled): (WKPreferencesGetAcceleratedCompositingForOverflowScrollEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: 2013-03-11 Brady Eidson CoreIPC crash in NetworkProcess after WebProcess crash. and https://bugs.webkit.org/show_bug.cgi?id=112046 Reviewed by Alexey Proskuryakov. * NetworkProcess/SchedulableLoader.cpp: (WebKit::SchedulableLoader::connectionToWebProcessDidClose): Don't null out the connection backpointer on crash. 2013-03-11 Alexey Proskuryakov Make it possible to reuse sandbox extensions https://bugs.webkit.org/show_bug.cgi?id=111883 Reviewed by Anders Carlsson. This allows for properly keeping extensions in NetworkBlobRegistry for as long as they are needed. The patch also fixes a bug where extensions would leak when navigating between file:// pages. * NetworkProcess/SchedulableLoader.cpp: Revoke the extensions, but don't invalidate - we may need them later. * Shared/Downloads/Download.cpp: (WebKit::Download::didFinish): (WebKit::Download::didFail): (WebKit::Download::didCancel): Replaced invalidate() with revoke() and clearing out. SandboxExtension destructor now requires revocations wto be balanced, as otherwise understanding dual reference counting in SandboxExtension would be too difficult. * Shared/SandboxExtension.h: We now keep track of how many times the extension was consumed. Eventually, we should refactor the class to not have such duplicate reference counting. * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::SandboxExtension): Initialize use count. (WebKit::SandboxExtension::~SandboxExtension): We now require consume/revoke calls to be balanced. This is not hard to do in existing usage, and makes the design much more reliable. (WebKit::SandboxExtension::revoke): Don't permanently destroy the extension when invalidatid, we may need it in the future. (WebKit::SandboxExtension::consume): Added use counting. * Shared/WebMemorySampler.cpp: (WebKit::WebMemorySampler::stop): This extension is not going to be reused. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): Pending extensions are not consumed, so there is no need to revoke. (WebKit::WebPage::SandboxExtensionTracker::invalidate): Pending extension is not consumed, and the other two always are. (WebKit::WebPage::SandboxExtensionTracker::setPendingProvisionalSandboxExtension): Pending extension is never consumed in place, no need to revoke. (WebKit::WebPage::SandboxExtensionTracker::didStartProvisionalLoad): Do not unset reused committed extension yet - we may need it later if provisional load fails. Thanks to use counting, we can now consume the same extension as both committed and provisional. (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad): Now the committed extension can be revoked and replaced. (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad): Just revoke provisional extension, committed one is still in place. 2013-03-11 Grzegorz Czajkowski [EFL] Build fix after r143192 when SPELLCHECK is off Unreviewed build fix when SPELLCHECK macro is off. * UIProcess/efl/TextCheckerEfl.cpp: (WebKit): 2013-03-10 Tim Horton WebPage::scaledSnapshotWithOptions returns a corrupt snapshot if you request a rect larger than the FrameView’s size https://bugs.webkit.org/show_bug.cgi?id=111820 Reviewed by Simon Fraser. We have to clear the image - there could be area that won’t be painted by the FrameView, or the FrameView could have a transparent background. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::scaledSnapshotWithOptions): 2013-03-10 Tim Horton Fix a typo in http://trac.webkit.org/changeset/145332. Unreviewed. ENABLE() doesn't use the WTF_ prefix. * WebProcess/WebPage/WebPage.h: 2013-03-10 Sam Weinig Add bundle API to get the current selection as a WKDOMRange https://bugs.webkit.org/show_bug.cgi?id=111947 Reviewed by Gavin Barraclough. * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.h: * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInBrowserContextController.mm: (-[WKWebProcessPlugInBrowserContextController selectedRange]): Add new selectedRange property. * WebProcess/WebPage/WebPage.cpp: (WebKit::frameWithSelection): (WebKit::WebPage::currentSelectionAsRange): * WebProcess/WebPage/WebPage.h: Get the range by finding the frame that has a selection, and then normalizing it. 2013-03-10 Tim Horton Add a heuristic to determine the “primary” snapshotted plugin https://bugs.webkit.org/show_bug.cgi?id=111932 Reviewed by Dean Jackson. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidCommitLoad): Forward didCommitLoad to WebPage. Move existing code that manipulated WebPage itself during didCommitLoad into WebPage, where it belongs. (WebKit::WebFrameLoaderClient::dispatchDidFinishLoad): Forward didFinishLoad to WebPage. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Initialize m_didFindPrimarySnapshottedPlugin to false. (WebKit::WebPage::didCommitLoad): Move code from WebPageFrameLoaderClient. Reset the flag that says we've already found a snapshotted plugin. (WebKit::WebPage::didFinishLoad): Call determinePrimarySnapshottedPlugIn when any frame finishes loading. We call this for subframes, not just the main frame, in case the main frame loads with no "primary" plugins, but a subframe later loads with one. (WebKit::WebPage::determinePrimarySnapshottedPlugIn): Attempt to find the primary snapshotted plugin on the page, by hit-testing a grid of points spaced 200px apart. A plugin is considered if it is snapshotted and > 450x300. We scan vertically and left-to-right, only discarding a previous candidate if another candidate is at least 110% the size of the previous candidate. This tends to select plugins near the top left of the page, unless there is a significantly larger plugin elsewhere. (WebKit::WebPage::resetPrimarySnapshottedPlugIn): * WebProcess/WebPage/WebPage.h: (WebPage): 2013-03-10 Sheriff Bot Unreviewed, rolling out r145039 and r145096. http://trac.webkit.org/changeset/145039 http://trac.webkit.org/changeset/145096 https://bugs.webkit.org/show_bug.cgi?id=111945 broke find indicator updates with scrolling subframes (Requested by thorton on #webkit). * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::scroll): (WebKit::TiledCoreAnimationDrawingArea::flushLayers): 2013-03-10 Andreas Kling WebPluginSiteDataManager should use OwnPtr. Reviewed by Anders Carlsson. * UIProcess/Plugins/WebPluginSiteDataManager.cpp: (WebKit::WebPluginSiteDataManager::invalidate): (WebKit::WebPluginSiteDataManager::getSitesWithData): (WebKit::WebPluginSiteDataManager::clearSiteData): (WebKit::WebPluginSiteDataManager::didGetSitesWithDataForAllPlugins): (WebKit::WebPluginSiteDataManager::didClearSiteDataForAllPlugins): * UIProcess/Plugins/WebPluginSiteDataManager.h: (WebPluginSiteDataManager): 2013-03-09 Manuel Rego Casasnovas [GTK][WK2] Fix compilation warning missing-field-initializers in webkit-2.0 stable branch https://bugs.webkit.org/show_bug.cgi?id=111863 Reviewed by Benjamin Poulain. * UIProcess/API/gtk/WebKitUIClient.cpp: (attachUIClientToView): Include missing initializer for pluginLoadPolicy. 2013-03-08 Sheriff Bot Unreviewed, rolling out r145254, r145264, and r145288. http://trac.webkit.org/changeset/145254 http://trac.webkit.org/changeset/145264 http://trac.webkit.org/changeset/145288 https://bugs.webkit.org/show_bug.cgi?id=111917 Test breakage hints at conceptual unsoundness (Requested by ap on #webkit). * NetworkProcess/SchedulableLoader.cpp: (WebKit::SchedulableLoader::invalidateSandboxExtensions): * Shared/Downloads/Download.cpp: (WebKit::Download::didFinish): (WebKit::Download::didFail): (WebKit::Download::didCancel): * Shared/SandboxExtension.h: (SandboxExtension): (WebKit::SandboxExtension::invalidate): * Shared/WebMemorySampler.cpp: (WebKit::WebMemorySampler::stop): * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::SandboxExtension): (WebKit::SandboxExtension::invalidate): (WebKit::SandboxExtension::consume): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): (WebKit::WebPage::SandboxExtensionTracker::invalidate): (WebKit::WebPage::SandboxExtensionTracker::setPendingProvisionalSandboxExtension): (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad): (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad): 2013-03-08 Dean Jackson Don't snapshot Java plugins https://bugs.webkit.org/show_bug.cgi?id=111899 Reviewed by Tim Horton. If the plugin is Java, return true from shouldAlwaysAutoStart. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::shouldAlwaysAutoStart): Check the mimetype for Java. 2013-03-08 Alexey Proskuryakov Fix sandbox profile preprocessor flags for compatibility with new clang. Reviewed by Alexey Proskuryakov. Patch by Bob Wilson. * DerivedSources.make: Only use -traditional when we have to work around old behavior of -std=c89. 2013-03-08 Joone Hur Unreviewed build fix for EFL, GTK and Qt after r145254. * Shared/SandboxExtension.h: (WebKit::SandboxExtension::revoke): 2013-03-08 Ryosuke Niwa non-Mac ports build fix after r145235. * UIProcess/WebInspectorProxy.cpp: (WebKit::createInspectorPageGroup): 2013-03-08 Benjamin Poulain [Mac] Add a feature flag for 'view-mode' Media Feature, disable it on Mac https://bugs.webkit.org/show_bug.cgi?id=111297 Reviewed by Kenneth Rohde Christiansen. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: * WebProcess/InjectedBundle/API/c/WKBundlePagePrivate.h: * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: 2013-03-08 Alexey Proskuryakov Make it possible to reuse sandbox extensions https://bugs.webkit.org/show_bug.cgi?id=111883 Reviewed by Anders Carlsson. Replaced invalidate() with revoke(). We now count how many times consume() was called, and keep the extension active for as long as revoke() hasn't been called as many times. Also, we only permanently destroy the extension in destructor. This allows for properly keeping extensions in NetworkBlobRegistry for as long as they are needed. * NetworkProcess/SchedulableLoader.cpp: (WebKit::SchedulableLoader::invalidateSandboxExtensions): * Shared/Downloads/Download.cpp: (WebKit::Download::didFinish): (WebKit::Download::didFail): (WebKit::Download::didCancel): * Shared/SandboxExtension.h: (SandboxExtension): * Shared/WebMemorySampler.cpp: (WebKit::WebMemorySampler::stop): * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::SandboxExtension): (WebKit::SandboxExtension::revoke): (WebKit::SandboxExtension::consume): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::performDragControllerAction): (WebKit::WebPage::SandboxExtensionTracker::invalidate): (WebKit::WebPage::SandboxExtensionTracker::setPendingProvisionalSandboxExtension): (WebKit::WebPage::SandboxExtensionTracker::didCommitProvisionalLoad): (WebKit::WebPage::SandboxExtensionTracker::didFailProvisionalLoad): 2013-03-08 Carlos Garcia Campos [WK2][GTK] Invalid request returned by webkit_download_get_request if called before download starts https://bugs.webkit.org/show_bug.cgi?id=111574 Reviewed by Alexey Proskuryakov. webkit_download_get_request() creates the WebKitURIRequest object on demand using the ResourceRequest from the DownloadProxy. The ResourceRequest of the DownloadProxy is set in DownloadProxy::didStart(), so if we call webkit_download_get_request() before didStart we return an invalid WebKitURIRequest created from a NULL ResourceRequest. This is not a problem for downloads started in the web process, because we create the WebKitDownload after DownloadProxy::didStart(). For downloads started manually with webkit_web_context_download_uri() we need to create download object with the ResourceRequest passed to the DownloadProxy. * UIProcess/API/gtk/WebKitDownload.cpp: (webkitDownloadCreateForRequest): New helper function for downloads started manually to created them with a given ResourceRequest. * UIProcess/API/gtk/WebKitDownloadPrivate.h: * UIProcess/API/gtk/WebKitWebContext.cpp: (webkitWebContextStartDownload): Use webkitDownloadCreateForRequest(). * UIProcess/API/gtk/tests/TestDownloads.cpp: (testDownloadLocalFile): (testDownloadLocalFileError): (testDownloadRemoteFile): (testDownloadRemoteFileError): (testPolicyResponseDownload): 2013-03-07 Alexey Proskuryakov Blobs are not cleaned up when WebProcess terminates https://bugs.webkit.org/show_bug.cgi?id=111803 Reviewed by Brady Eidson. Track which blobs were created for each connection, and unregister them when the connection closes. Normally, this happens when a document is destroyed through PublicURLManager in WebProcess. But we don't get there when the web process crashes, or is terminated without waiting for document destruction. * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: (WebKit::NetworkBlobRegistry::registerBlobURL): (WebKit::NetworkBlobRegistry::unregisterBlobURL): (WebKit::NetworkBlobRegistry::connectionToWebProcessDidClose): * NetworkProcess/FileAPI/NetworkBlobRegistry.h: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didClose): (WebKit::NetworkConnectionToWebProcess::registerBlobURL): (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL): (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL): 2013-03-08 Timothy Hatcher Make the WebKit2 Web Inspector use tiled drawing and accelerated drawing. Reviewed by David Kilzer. * UIProcess/WebInspectorProxy.cpp: (WebKit::createInspectorPageGroup): Call setAcceleratedDrawingEnabled with true on 10.8+. * UIProcess/mac/WebInspectorProxyMac.mm: (-[WKWebInspectorWKView _shouldUseTiledDrawingArea]): Added. Return YES on 10.8+. 2013-03-08 Huang Dongsung Coordinated Graphics: Handle scrolling correctly. https://bugs.webkit.org/show_bug.cgi?id=111406 Reviewed by Simon Fraser. Coordinated Graphics deals with fast scrolling and slow scrolling in the same routine, so WebChromeClient::invalidateContentsForSlowScroll() should call DrawingArea:scroll(). When CoordinatedLayerTreeHost::scrollNonCompositedContents() is called, we should call scheduleLayerFlush() to notify to UI Process. In addition, when we don't use fixed layout, we should call setNonCompositedContentsNeedDisplay() to update non composited contents. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::invalidateContentsForSlowScroll): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents): 2013-03-08 Mikhail Pozdnyakov [WK2][EFL] Remove EwkView::setImageData() https://bugs.webkit.org/show_bug.cgi?id=111849 Reviewed by Andreas Kling. EwkView::setImageData() removed as it is not used at the moment (it used to be part of eliminated non coord graphics code path). * UIProcess/API/efl/EwkView.cpp: * UIProcess/API/efl/EwkView.h: (EwkView): * UIProcess/cairo/BackingStoreCairo.cpp: (WebKit::BackingStore::incorporateUpdate): 2013-03-08 Carlos Garcia Campos [GTK] Memory leak in webkit_web_view_load_request() in WebKit2 API https://bugs.webkit.org/show_bug.cgi?id=111160 Reviewed by Benjamin Poulain. leakRef() is used for the returned PassRefPtr without taking the ownership of the leaked ref. * UIProcess/API/gtk/WebKitWebView.cpp: (webkit_web_view_load_request): Use RefPtr local variable. 2013-03-07 Huang Dongsung [EFL] EwkView should keep css position instead of scroll position in device pixel. https://bugs.webkit.org/show_bug.cgi?id=110847 Reviewed by Kenneth Rohde Christiansen. Signed off for WebKit2 by Benjamin Poulain. There are bugs that some code expect that EwkView::pagePosition() returns css position while others expect that it returns scroll position in device pixel. In addition, some code call EwkView::setPagePosition() with css position while others call it with scroll position in device pixel. This patch makes all code use setPagePosition() and pagePosition() with UI pixels (a.k.a Density Independent Pixel). * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::setViewportPosition): * UIProcess/efl/WebView.cpp: (WebKit::WebView::paintToCairoSurface): (WebKit::WebView::updateViewportSize): (WebKit::WebView::transformToScene): (WebKit::WebView::pageDidRequestScroll): 2013-03-07 Alexey Proskuryakov https://bugs.webkit.org/show_bug.cgi?id=111801 https://bugs.webkit.org/show_bug.cgi?id=111801 Reviewed by Geoff Garen. Move unnecessary includes out of headers. * NetworkProcess/HostRecord.h: * NetworkProcess/NetworkConnectionToWebProcess.cpp: * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkResourceLoadScheduler.cpp: * NetworkProcess/NetworkResourceLoadScheduler.h: * NetworkProcess/NetworkResourceLoader.h: * NetworkProcess/SchedulableLoader.cpp: * NetworkProcess/SchedulableLoader.h: * NetworkProcess/SyncNetworkResourceLoader.cpp: 2013-03-07 Andreas Kling Resizing Cappuccino is very laggy on WebKit since Safari 5.1 Reviewed by Anders Carlsson. On Mac, we already cache the window rect through the WindowAndViewFramesChanged message, so simply return that in WebChromeClient::windowRect() instead of sending a synchronous query to the UIProcess. If a programmatic resize is requested, we bypass the cache until we've received a new WindowAndViewFramesChanged message. This compromise allows us to return cached rects in the common case, and handles creating a new window and immediately resizing it gracefully. Changed WindowAndViewFramesChanged to pass FloatRect/FloatPoint rather than IntRect/IntPoint to match the ChromeClient::windowRect() return type. * UIProcess/API/mac/WKView.mm: (-[WKView _updateWindowAndViewFrames]): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::windowAndViewFramesChanged): * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::windowAndViewFramesChanged): * WebProcess/Plugins/PluginView.h: (PluginView): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::setWindowRect): (WebKit::WebChromeClient::windowRect): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): (WebKit::WebPage::sendSetWindowFrame): (WebKit::WebPage::windowAndViewFramesChanged): * WebProcess/WebPage/WebPage.h: (WebPage): (WebKit::WebPage::windowFrameInScreenCoordinates): (WebKit::WebPage::viewFrameInWindowCoordinates): (WebKit::WebPage::hasCachedWindowFrame): (WebKit::WebPage::accessibilityPosition): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/WKAccessibilityWebPageObject.mm: (-[WKAccessibilityWebPageObject accessibilityAttributeValue:]): 2013-03-07 Alexey Proskuryakov Don't try to create a sandbox extension when path is empty https://bugs.webkit.org/show_bug.cgi?id=111788 Reviewed by Anders Carlsson. * Shared/FileAPI/BlobRegistrationData.cpp: (WebKit::BlobRegistrationData::BlobRegistrationData): Skip File objects with empty paths to avoid logging an error to console. 2013-03-07 Mark Lam WebPageProxy::exceededDatabaseQuota() needs to be serialized. https://bugs.webkit.org/show_bug.cgi?id=111631. Reviewed by Geoffrey Garen. Previously, WebPageProxy::exceededDatabaseQuota() is called synchronously with script execution in the WebProcess. Hence, it is never called in a recursive manner. In webkit2, we can have multiple WebProcesses concurrently triggering a call to this function. While the function is waiting on feedback from a UI dialog, the wait loop may re-enter the function to service a second request to call this function from another WebProcess. This results in problems where some of the WebProcesses will not get a proper reply, and therefore hangs perpetually waiting for a non-forthcoming reply. This changeset changes the function to queue the requests and ensure that we do not recursively callback to the UI client. * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): * UIProcess/WebPageProxy.cpp: (ExceededDatabaseQuotaRecords): (Record): (WebKit::ExceededDatabaseQuotaRecords::areBeingProcessed): (WebKit::ExceededDatabaseQuotaRecords::ExceededDatabaseQuotaRecords): (WebKit::ExceededDatabaseQuotaRecords::~ExceededDatabaseQuotaRecords): (WebKit::ExceededDatabaseQuotaRecords::shared): (WebKit::ExceededDatabaseQuotaRecords::createRecord): (WebKit::ExceededDatabaseQuotaRecords::add): (WebKit::ExceededDatabaseQuotaRecords::next): (WebKit::WebPageProxy::exceededDatabaseQuota): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: 2013-03-07 Jeffrey Pfau CFNetwork cache partitioning does not work properly on subdomains https://bugs.webkit.org/show_bug.cgi?id=111772 Reviewed by David Kilzer. Ensure that the CFString is UTF-8 so that WKCFURLCacheCopyAllHostNamesInPersistentStoreForPartition will always work. * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: (WebKit::partitionName): Create a UTF-8 CFString explicitly 2013-03-07 Beth Dakin Need API to draw custom overhang area https://bugs.webkit.org/show_bug.cgi?id=111679 -and corresponding- Reviewed by Simon Fraser. The new API is WKBundlePageSetTopOverhangImage() and WKBundlePageSetBottomOverhangImage(). When the API is called, WebPage will get GraphicsLayers for the appropriate area from FrameView, and then set the image as the contents of the layer. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageSetTopOverhangImage): (WKBundlePageSetBottomOverhangImage): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::setTopOverhangImage): (WebKit): (WebKit::WebPage::setBottomOverhangImage): 2013-03-07 Gavin Barraclough Reduce page cache size on Mac https://bugs.webkit.org/show_bug.cgi?id=111795 Rubber stamped by Geoff Garen 5 entries is unnecessarily large; research show 3 should suffice. On a low memory warning we should clear this completely. * Shared/CacheModel.cpp: (WebKit::calculateCacheSizes): - reduce maximum to 3. 2013-03-07 Anders Carlsson Add a didFocusTextField callback to the injected bundle form client https://bugs.webkit.org/show_bug.cgi?id=111771 Reviewed by Andreas Kling. Add a new client callback that's invoked whenever a text input field is focused. * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageFormClient.cpp: (WebKit::InjectedBundlePageFormClient::didFocusTextField): (WebKit): * WebProcess/InjectedBundle/InjectedBundlePageFormClient.h: (InjectedBundlePageFormClient): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::focusedNodeChanged): 2013-03-07 Tim Horton Null-check the page overlay before trying to use it. Reviewed by Simon Fraser. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::scroll): 2013-03-07 Zan Dobersek [GTK] Limit the supported compilers to GCC >= 4.7 and Clang >= 3.0 https://bugs.webkit.org/show_bug.cgi?id=109932 Reviewed by Martin Robinson. * GNUmakefile.am: Replace references to SYMBOL_VISIBILITY_INLINES and SYMBOL_VISIBILITY variables with the actual flags. They are now available by default due to the limited set of supported compilers. 2013-03-05 Gustavo Noronha Silva [GTK] Enable translations for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=111398 Reviewed by Martin Robinson. * GNUmakefile.am: define PACKAGE_LOCALE_DIR when building WebProcess's main module. * WebProcess/gtk/WebProcessMainGtk.cpp: (WebKit::WebProcessMainGtk): register the i18n domain name, and prefer UTF-8, since we're GTK+; at the moment we're just using the same name as WebKitGTK+, pro: the translation module can be reused, con: you can't have different versions of WebKitGTK+ and WebKit2GTK+ installed, because the module would not be fit for reuse in that case. * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::childSetupFunction): do not set LC_ALL environment variable explicitly, the child process will already inherit the environment of the parent, which should have all the variables set properly. 2013-03-06 Alexey Proskuryakov SandboxExtension::createHandle raises an uncaught Objective-C exception if path is empty https://bugs.webkit.org/show_bug.cgi?id=111689 Reviewed by Filip Pizlo. * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::createHandle): Use a function from WebCore platform layer instead of Foundation one equivalent. We already do this elsewhere in this file. 2013-03-06 Tim Horton [wk2] Page overlays shouldn't dirty the entire layer when flushing if the main frame can't scroll https://bugs.webkit.org/show_bug.cgi?id=111662 Reviewed by Simon Fraser. Instead of setNeedsDisplay()ing the whole page overlay layer every time through TCADA::flushLayers, do it at scroll time instead. Repainting on scroll is necessary to keep things painted in the right place when we scroll (the overlay is fixed to the size of the view), but is quite wasteful in apps that don’t scroll. This works with threaded scrolling because overlay installation forces us into main-thread scrolling mode. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::scroll): (WebKit::TiledCoreAnimationDrawingArea::flushLayers): 2013-03-06 Tim Horton [wk2] Page overlays should use the accelerated drawing setting instead of hardcoding it on https://bugs.webkit.org/show_bug.cgi?id=111654 Reviewed by Simon Fraser. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): 2013-03-06 Gyuyoung Kim [EFL][WK2] Enable interactive form validation for email and url input type validation https://bugs.webkit.org/show_bug.cgi?id=111026 Reviewed by Laszlo Gombos. WebKit EFL can check if input value is valid by enabling this feature. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): 2013-03-06 Alexey Proskuryakov [Mac] Synthetic ResourceResponses cannot be sent over IPC without losing most information https://bugs.webkit.org/show_bug.cgi?id=111623 Reviewed by Brady Eidson. * Shared/WebCoreArgumentCoders.cpp: * Shared/WebCoreArgumentCoders.h: (CoreIPC::::encode): Made the decision on whether to serialize WebCore data in ResourceResponse dynamic. If the platform data is out of date, we need both (because some platforms use encodePlatformData() to pass additional information). (CoreIPC::::decode): Decode platform data first, because this overwrites the ResourceResponse. * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::::encodePlatformData): Don't encode NSURLResponse if it's out of date. We may have a bad NSURLResponse with 0 status code given to client, but it was almost certainly the same on sending side. WebCore doesn't mutate real responses - it either keeps them as is, or builds entirely synthetic ones. 2013-03-04 Jer Noble Default mouse cursor behavior should be auto-hide for full screen video with custom controls https://bugs.webkit.org/show_bug.cgi?id=107601 Reviewed by Beth Dakin. Enable the CURSOR_VISIBILITY feature. * Configurations/FeatureDefines.xcconfig: 2013-03-06 Sudarsana Nagineni [GTK][WK2] Implement WebInspector::localizedStringsURL() to return the file URL of localizedStrings.js https://bugs.webkit.org/show_bug.cgi?id=111448 Reviewed by Alexey Proskuryakov. Implement WebInspector::localizedStringsURL() method to return the file URL of the localizedStrings.js. This prevents printing warnings about "Localized string not found" in the console. * WebProcess/WebPage/gtk/WebInspectorGtk.cpp: (WebKit::WebInspector::localizedStringsURL): 2013-03-06 Sudarsana Nagineni [EFL][WK2] REGRESSION(r143582): API test EWK2UnitTestBase.ewk_view_contents_size_changed failing https://bugs.webkit.org/show_bug.cgi?id=110608 Reviewed by Kenneth Rohde Christiansen. Test was expecting ContentsSizeChanged signal from ViewClientEfl, but WebView was not calling client callback if useFixedLayout() is true. This patch prevent early return if useFixedLayout() is true and call client callback didChangeContentsSize(), which will emit the signal. * UIProcess/efl/ViewClientEfl.cpp: (WebKit::ViewClientEfl::didChangeContentsSize): * UIProcess/efl/WebView.cpp: (WebKit::WebView::didChangeContentsSize): 2013-03-06 Manuel Rego Casasnovas [WK2][GTK] Fix unit test WebKit2APITests/WebKitWebView/mouse-target https://bugs.webkit.org/show_bug.cgi?id=82866 Reviewed by Martin Robinson. Test was failing because of new media controls needs more space to be painted than just 10x10 pixels. This is similar to r144070. * UIProcess/API/gtk/tests/TestWebKitWebView.cpp: (testWebViewMouseTarget): Modified HTML in order to give more space to the media controls. 2013-03-06 Tim Horton [wk2] Page Overlays: Hook up the layer border/repaint counter setting to the overlay layer https://bugs.webkit.org/show_bug.cgi?id=111547 Reviewed by Simon Fraser. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): Keep the page overlay layer's debug border and repaint counter settings updated. 2013-03-06 Geoffrey Garen Joing the adoptNS/adoptCF/adoptRef club. https://bugs.webkit.org/show_bug.cgi?id=111467 Reviewed by Darin Adler. Responding to review comments by Darin Adler. * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::platformInitializeNetworkProcess): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): Tighten up this code by reducing extraneous local variables. 2013-03-05 Alexey Proskuryakov Track sandbox extensions for blobs in NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=111484 Reviewed by Sam Weinig. * WebKit2.xcodeproj/project.pbxproj: * NetworkProcess/FileAPI: Added. * NetworkProcess/FileAPI/NetworkBlobRegistry.cpp: Added. * NetworkProcess/FileAPI/NetworkBlobRegistry.h: Added. Added a registry that wraps normal in-process "BlobRegistryImpl", and also tracks sandbox extensions for blobs. It will also track process connections, so that blobs could be removed when a process crashes. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::registerBlobURL): (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL): (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL): Use NetworkBlobRegistry. * NetworkProcess/SchedulableLoader.h: * NetworkProcess/SchedulableLoader.cpp: (WebKit::SchedulableLoader::SchedulableLoader): Add extensions for blobs, both in request URL and in request data. (WebKit::SchedulableLoader::consumeSandboxExtensions): Request may now have multiple extensions. (WebKit::SchedulableLoader::invalidateSandboxExtensions): Ditto. * Shared/FileAPI/BlobRegistrationData.cpp: Fixed extension creation - actually store the result. 2013-03-06 Andras Becsi [Qt][WK2] Fix the Mac build after r144787 https://bugs.webkit.org/show_bug.cgi?id=111569 Reviewed by Csaba Osztrogonác. Use uint_64 explicitly instead of size_t. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): 2013-03-05 Kent Tamura Rename WebCore/editing/visible_units.* to VisibleUnits.* https://bugs.webkit.org/show_bug.cgi?id=111426 Reviewed by Alexey Proskuryakov. * WebProcess/WebPage/mac/WebPageMac.mm: 2013-03-06 Zeno Albisser DataReference::vector() should be const. https://bugs.webkit.org/show_bug.cgi?id=109928 Reviewed by Anders Carlsson. * Platform/CoreIPC/DataReference.h: (CoreIPC::DataReference::vector): 2013-03-06 Luiz Agostini Accelerated overflow scrolling for Coordinated Graphics. https://bugs.webkit.org/show_bug.cgi?id=110323 Reviewed by Noam Rosenthal. Signed off for WebKit2 by Simon Fraser. A scroll offset is applied to individual layers on UI process and the web process is notified assynchronously. The new API WKCoordinatedScene may be used to scroll layers in the UI process. * CMakeLists.txt: Encoding and decoding the new members of CoordinatedGraphicsLayerState. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): Adding acceleratedCompositingForOverflowScrollEnabled to WebPreferencesStore. * Shared/WebPreferencesStore.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): New API WKCoordinatedScene is used to scroll layers on UI side. * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.cpp: * UIProcess/API/CoordinatedGraphics/WKCoordinatedScene.h: * UIProcess/CoordinatedGraphics/WKCoordinatedSceneAPICast.h: A new message is used to send scroll commit messages to web process. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::commitScrollOffset): (WebKit): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (CoordinatedLayerTreeHostProxy): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::~CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::detachLayer): (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer): (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect): (WebKit::CoordinatedLayerTreeHost::purgeBackingStores): (WebKit::CoordinatedLayerTreeHost::commitScrollOffset): (WebKit): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (CoordinatedLayerTreeHost): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in: 2013-03-06 Huang Dongsung [EFL][WK2] Convert from device view size to UI view size only in EwkView. https://bugs.webkit.org/show_bug.cgi?id=110197 Reviewed by Kenneth Rohde Christiansen. Signed off for WebKit2 by Benjamin Poulain. Device scale factor is a property of the physical display, so only EwkView should deal with converting device view size to UI (a.k.a Density Independent Pixel) view size. It increases readability because we can regard a view size in other classes (e.g. WebView, PageViewportController, WebPage) except for EwkView as UI size. * UIProcess/API/efl/EwkView.cpp: (EwkView::setDeviceScaleFactor): (EwkView::setDeviceSize): (EwkView::size): (EwkView::deviceSize): (EwkView::scheduleUpdateDisplay): (EwkView::createGLSurface): (EwkView::handleEvasObjectCalculate): * UIProcess/API/efl/EwkView.h: (EwkView): * UIProcess/efl/WebView.cpp: (WebKit::WebView::paintToCurrentGLContext): (WebKit::WebView::updateViewportSize): 2013-03-06 Christophe Dumez [EFL][WK2] Use Vector::reserveInitialCapacity() in WebEventFactory::createWebTouchEvent() https://bugs.webkit.org/show_bug.cgi?id=111530 Reviewed by Benjamin Poulain. In WebEventFactory::createWebTouchEvent(), when constructing the vector of touch points, we already know in advance the total number of touch points. Therefore, we should leverage WTF::Vector::reserveInitialCapacity() and WTF::Vector::uncheckedAppend() to save some capacity checks. * Shared/efl/WebEventFactory.cpp: (WebKit::WebEventFactory::createWebTouchEvent): 2013-03-05 Grzegorz Czajkowski [WK2][EFL] Enable asynchronous spell checking by default https://bugs.webkit.org/show_bug.cgi?id=111295 Reviewed by Benjamin Poulain. Asynchronous spell checking feature is disabled by default for wk2 platforms. It means all requests of spell checking are sent synchronously. WebKit-EFL implements requestCheckingOfString method which allows to check spelling asynchronously. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): 2013-03-05 Kondapally Kalyan [EFL] Ensure right format is used in SnapshotImageGL. https://bugs.webkit.org/show_bug.cgi?id=111333 Reviewed by Benjamin Poulain. GL_BGRA format is not standard for glReadPixels with GLES. This patch ensures that GL_RGBA is used in SnapshotImageGL while using GLES. * UIProcess/API/efl/SnapshotImageGL.cpp: (getImageSurfaceFromFrameBuffer): 2013-03-05 Geoffrey Garen Each web process truncates the disk cache to zero on launch https://bugs.webkit.org/show_bug.cgi?id=111467 Reviewed by Darin Adler. Let's not do that. * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeWebProcess): 2013-03-05 Anders Carlsson Reset the values if there is a quota error https://bugs.webkit.org/show_bug.cgi?id=111500 Reviewed by Beth Dakin. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::didSetItem): (WebKit::StorageAreaProxy::resetValues): (WebKit): * WebProcess/Storage/StorageAreaProxy.h: (StorageAreaProxy): 2013-03-05 Anders Carlsson Keep track of pending value changes in StorageAreaProxy https://bugs.webkit.org/show_bug.cgi?id=111496 Reviewed by Beth Dakin. Add a HashCountedSet to keep track of the number of pending value changes for a given key. If we get incoming storage events from other processes while we have pending value changes, ignore the events. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::setItem): (WebKit::StorageAreaProxy::didSetItem): (WebKit::StorageAreaProxy::dispatchStorageEvent): (WebKit::StorageAreaProxy::shouldApplyChangesForKey): (WebKit): * WebProcess/Storage/StorageAreaProxy.h: (StorageAreaProxy): 2013-03-05 Ryuan Choi [EFL] Build break with latest EFL libraries https://bugs.webkit.org/show_bug.cgi?id=111028 Reviewed by Dirk Pranke. * PlatformEfl.cmake: Added ECORE_XXX_INCLUDE_DIRS. 2013-03-05 Anders Carlsson Use a named parameter for whether a quota error ocurred or not https://bugs.webkit.org/show_bug.cgi?id=111490 Reviewed by Beth Dakin. This is clearer than setItem returning true on error. Also, actually set the item in the storage map. * UIProcess/Storage/StorageManager.cpp: (StorageManager::StorageArea): (WebKit::StorageManager::StorageArea::setItem): (WebKit::StorageManager::setItem): 2013-03-05 Kiran Muppala Use new assertion API for process suppression on Mac https://bugs.webkit.org/show_bug.cgi?id=111387 Reviewed by Alexey Proskuryakov. * Shared/ChildProcess.h: (WebKit::ChildProcess::processSuppressionEnabled): Rename m_processVisibleAssertion to m_processSuppressionAssertion. * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::setProcessSuppressionEnabled): Ditto. And, replace calls to WKNSProcessInfoProcessAssertionWithTypes() with call to -[NSProcessInfo beginSuspensionOfSystemBehaviors:]. 2013-03-05 Anders Carlsson Move storageType() to StorageAreaProxy https://bugs.webkit.org/show_bug.cgi?id=111488 Reviewed by Andreas Kling. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::StorageAreaProxy): (WebKit::StorageAreaProxy::storageType): (WebKit::StorageAreaProxy::disabledByPrivateBrowsingInFrame): * WebProcess/Storage/StorageAreaProxy.h: (StorageAreaProxy): * WebProcess/Storage/StorageNamespaceProxy.cpp: * WebProcess/Storage/StorageNamespaceProxy.h: 2013-03-05 Jeffrey Pfau Clear associated cache partitions when deleting origins' cache https://bugs.webkit.org/show_bug.cgi?id=111383 Reviewed by Maciej Stachowiak. Clear the cache partitions associated with the origin being cleared. * WebProcess/ResourceCache/cf/WebResourceCacheManagerCFNet.cpp: (WebKit): (WebKit::partitionName): (WebKit::WebResourceCacheManager::clearCFURLCacheForHostNames): 2013-03-05 Mikhail Pozdnyakov [WK2][EFL] WebPageProxy::setThemePath() should check that the page is valid https://bugs.webkit.org/show_bug.cgi?id=109917 Reviewed by Alexey Proskuryakov. WebPageProxy::setThemePath() should check that the page is valid before sending IPC message. * UIProcess/efl/WebPageProxyEfl.cpp: (WebKit::WebPageProxy::setThemePath): 2013-03-05 Alexey Proskuryakov Crashes creating WebKit processes in WKSandboxExtensionConsume https://bugs.webkit.org/show_bug.cgi?id=111456 Reviewed by Anders Carlsson. It's too late to be draconian about this condition here, crashing doesn't help diagnose what went wrong when creating a sandbox extension. Other SandboxExtension functions already have null checks for WKSandboxExtensionRef, and so should consumePermanently(). * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::createHandle): For now, added logging when extension creation fails. If that proves insufficiently helpful in practice, we can change to a CRASH() later. (WebKit::SandboxExtension::createHandleForTemporaryFile): Ditto. (WebKit::SandboxExtension::consumePermanently): Gracefully fail if there is no extension to consume. 2013-03-05 Gwang Yoon Hwang Coordinated Graphics: CoordinatedGraphicsLayer makes CoordinatedGraphicsScene perform via CoordinatedGraphicsState. https://bugs.webkit.org/show_bug.cgi?id=108294 Reviewed by Anders Carlsson. There are two changes in WK2. 1. Change CoordinatedLayerTreeHostProxy to use CoordinatedGraphicsState. 2. Add encode/decode of CoordinatedGraphicsState in CoordinatedGraphicsArgumentCoders. This patch is based on Dongsung Huang, and Noam's work in https://bugs.webkit.org/show_bug.cgi?id=108294 No new tests, covered by existing tests. * Scripts/webkit2/messages.py: (headers_for_type): * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::::encode): Encoding UpdateImageBacking and CreateUpdateAtlas can fail when encoding WebCoordinatedSurface::Handle fails, but we don't recover in the case. (CoreIPC::::decode): (CoreIPC): * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h: (WebCore): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::commitCoordinatedGraphicsState): (WebKit): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (WebCore): (CoordinatedLayerTreeHostProxy): (WebKit::CoordinatedLayerTreeHostProxy::coordinatedGraphicsScene): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges): (WebKit::CoordinatedLayerTreeHost::initializeRootCompositingLayerIfNeeded): (WebKit::CoordinatedLayerTreeHost::syncLayerState): (WebKit::CoordinatedLayerTreeHost::prepareCustomFilterProxiesIfNeeded): (WebKit): (WebKit::CoordinatedLayerTreeHost::updateImageBacking): (WebKit::CoordinatedLayerTreeHost::setBackgroundColor): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (CoordinatedLayerTreeHost): 2013-03-05 Sam Weinig Follow up to https://bugs.webkit.org/show_bug.cgi?id=111453, forgot to mark the files as Private. * WebKit2.xcodeproj/project.pbxproj: 2013-03-05 Sam Weinig Elevate accessors of C-SPI API variants to Objective-C SPI https://bugs.webkit.org/show_bug.cgi?id=111453 Reviewed by Alexey Proskuryakov. * Shared/mac/ObjCObjectGraphCoders.mm: * UIProcess/API/mac/WKBrowsingContextControllerInternal.h: * UIProcess/API/mac/WKBrowsingContextControllerPrivate.h: * UIProcess/API/mac/WKBrowsingContextGroup.mm: * UIProcess/API/mac/WKBrowsingContextGroupPrivate.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKBrowsingContextGroupInternal.h. * UIProcess/API/mac/WKProcessGroup.mm: * UIProcess/API/mac/WKProcessGroupPrivate.h: Copied from Source/WebKit2/UIProcess/API/mac/WKProcessGroupInternal.h. * UIProcess/API/mac/WKView.mm: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugIn.mm: (-[WKWebProcessPlugInController _bundleRef]): * WebProcess/InjectedBundle/API/mac/WKWebProcessPlugInPrivate.h: Renamed from Source/WebKit2/UIProcess/API/mac/WKProcessGroupInternal.h. Add access to C-SPI WebKit types as Objective-C SPI. 2013-03-04 Alexey Proskuryakov Make AsyncFileReader work without ScriptExecutionContext https://bugs.webkit.org/show_bug.cgi?id=111376 Reviewed by Anders Carlsson. * NetworkProcess/NetworkResourceLoader.cpp: * NetworkProcess/NetworkResourceLoader.h: Removed a dummy implementation of createAsyncFileStream, which is no longer needed. 2013-03-05 Alexey Proskuryakov REGRESSION: Child processes get access to user cache and temporary directories instead of private ones Reviewed by Sam Weinig. * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::initializeSandbox): Restore the correct order of calls, so sandbox parameters respect WebKit pseudo containers. 2013-03-05 David Kilzer BUILD FIX (r144698): Only enable SPEECH_SYNTHESIS for Mac Fixes the following build failures: Undefined symbols for architecture i386: "__ZTVN7WebCore25PlatformSpeechSynthesizerE", referenced from: __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o NOTE: a missing vtable usually means the first non-inline virtual member function has no definition. "__ZN7WebCore25PlatformSpeechSynthesizer19initializeVoiceListEv", referenced from: __ZN7WebCore25PlatformSpeechSynthesizerC2EPNS_31PlatformSpeechSynthesizerClientE in PlatformSpeechSynthesizer.o ld: symbol(s) not found for architecture i386 * Configurations/FeatureDefines.xcconfig: - Only set ENABLE_SPEECH_SYNTHESIS for the macosx platform. 2013-03-05 Tim Horton , Grzegorz Czajkowski [WK2] WTR needs an implementation of setAsynchronousSpellCheckingEnabled https://bugs.webkit.org/show_bug.cgi?id=81042 Reviewed by Enrica Casucci. Expose WK2 setting to enable/disabled asynchronous spell checking. It's used by WebKitTestRunner to reset the setting at the beginning of the test. WebKit2 ports might be interested in this setting if they are going to enable this feature. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetAsynchronousSpellCheckingEnabled): (WKPreferencesGetAsynchronousSpellCheckingEnabled): * UIProcess/API/C/WKPreferences.h: * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetAsynchronousSpellCheckingEnabled): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setAsynchronousSpellCheckingEnabled): * WebProcess/InjectedBundle/InjectedBundle.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): 2013-03-03 Grzegorz Czajkowski [WK2][EFL] Add requestCheckingOfString implementation. https://bugs.webkit.org/show_bug.cgi?id=108172 Reviewed by Hajime Morrita. Provide implementation of 'requestCheckingOfString' for WK2-EFL. It uses the unified text checker feature. * UIProcess/efl/TextCheckerEfl.cpp: (WebKit::TextChecker::requestCheckingOfString): 2013-03-04 Chris Fleizach Support WebSpeech - Speech Synthesis https://bugs.webkit.org/show_bug.cgi?id=106742 Reviewed by Simon Fraser. Enable speech synthesis for the Mac. * Configurations/FeatureDefines.xcconfig: 2013-03-04 Anders Carlsson UI process storage areas should hold on to storage maps https://bugs.webkit.org/show_bug.cgi?id=111374 Reviewed by Beth Dakin. Pass the session storage quota size through to the storage area constructor and create a StorageMap with the given quota size. * UIProcess/Storage/StorageManager.cpp: (StorageManager::StorageArea): (WebKit::StorageManager::StorageArea::create): (WebKit::StorageManager::StorageArea::StorageArea): (StorageManager::SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::create): (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea): (WebKit::StorageManager::createSessionStorageNamespace): (WebKit::StorageManager::createSessionStorageNamespaceInternal): * UIProcess/Storage/StorageManager.h: (StorageManager): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): 2013-03-04 Raphael Kubo da Costa Unreviewed build fix after r144675. Work around picky/old C++ compilers by separating the '>>' in nested templates with a space. * UIProcess/Storage/StorageManager.cpp: (StorageManager::StorageArea): 2013-03-04 Anders Carlsson More work on UI side storage https://bugs.webkit.org/show_bug.cgi?id=111370 Reviewed by Andreas Kling. Add a DispatchStorageEvent message and begin hooking it up. * UIProcess/Storage/StorageManager.cpp: (StorageManager::StorageArea): (WebKit::StorageManager::StorageArea::setItem): (WebKit): (WebKit::StorageManager::StorageArea::dispatchEvents): (WebKit::StorageManager::setItem): (WebKit::StorageManager::findStorageArea): * UIProcess/Storage/StorageManager.h: (StorageManager): * UIProcess/Storage/StorageManager.messages.in: * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::setItem): (WebKit::StorageAreaProxy::dispatchStorageEvent): (WebKit): * WebProcess/Storage/StorageAreaProxy.h: (StorageAreaProxy): * WebProcess/Storage/StorageAreaProxy.messages.in: 2013-03-04 Jer Noble Unreviewed build fix: wrap references to PluginInfoStore with guards for platforms which do not enable NETSCAPE_PLUGIN_AP. * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): (WebKit::WebContext::~WebContext): * UIProcess/WebContext.h: 2013-03-04 Anders Carlsson Create and destroy storage areas in the UI process https://bugs.webkit.org/show_bug.cgi?id=111361 Reviewed by Sam Weinig. * UIProcess/Storage/StorageManager.cpp: (StorageManager::StorageArea): Keep track of listener connection and storage area ID pairs. (WebKit::StorageManager::StorageArea::~StorageArea): Assert that we don't have any listeners left. (WebKit::StorageManager::StorageArea::addListener): Add the pair to the set of listeners. (WebKit::StorageManager::StorageArea::removeListener): Remove the pair from the set of listeners. (WebKit::StorageManager::SessionStorageNamespace::getOrCreateStorageArea): Given an origin, look up or create the storage area. (WebKit::StorageManager::createStorageArea): Create the storage area if it doesn't already exist. (WebKit::StorageManager::destroyStorageArea): Look up the storage area and destroy it. * UIProcess/Storage/StorageManager.h: Add a map of open storage areas. 2013-03-04 Jer Noble Add API to allow WK2 clients to query the list of installed plug-ins. https://bugs.webkit.org/show_bug.cgi?id=111245 Reviewed by Alexey Proskuryakov. Add API in WKContext, implemented by WebContext, that allows callers to register a callback retrieve an array containing installed plugin information. This API is exposed through WebContext because it owns the PluginInfoStore used to fulfill the request. Bump the WKContextClient API by 1: * Shared/APIClientTraits.cpp: * Shared/APIClientTraits.h: * UIProcess/API/C/WKContext.h: Add a client protocol to PluginInfoStore to notify the client when plugIn information has been successfully loaded: * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::PluginInfoStore::PluginInfoStore): Initialize m_client to 0. (WebKit::PluginInfoStore::loadPluginsIfNecessary): If the client is present, notify after loading the plugin store. * UIProcess/Plugins/PluginInfoStore.h: (WebKit::PluginInfoStoreClient::~PluginInfoStoreClient): Default destructor. (WebKit::PluginInfoStoreClient::PluginInfoStoreClient): Default constructor. (WebKit::PluginInfoStore::setClient): Simple setter. (WebKit::PluginInfoStore::client): Simple getter. * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): Set self as the client of PluginInfoStore. (WebKit::WebContext::~WebContext): Clear the client of PluginInfoStore. (WebKit::WebContext::pluginInfoStoreDidLoadPlugins): Pass the callback to own client. * UIProcess/WebContext.h: * UIProcess/WebContextClient.cpp: (WebKit::WebContextClient::plugInInformationBecameAvailable): Pass the callback to the registered WK callback, if present. * UIProcess/WebContextClient.h: 2013-03-04 Tim Horton PDFPlugin: Hook up Services https://bugs.webkit.org/show_bug.cgi?id=111246 Reviewed by Alexey Proskuryakov. Make the Application->Services menu work when the focused selection is a PDFPlugin. * Shared/EditorState.cpp: (WebKit::EditorState::encode): (WebKit::EditorState::decode): * Shared/EditorState.h: (WebKit::EditorState::EditorState): (EditorState): Add isInPlugin property to EditorState. * UIProcess/API/mac/WKView.mm: (-[WKView validRequestorForSendType:returnType:]): If the selection is currently in a Plugin, we only currently have the ability to retrieve the selection as a plain-text string, so restrict sendType to NSStringPboardType. * WebProcess/Plugins/PDF/SimplePDFPlugin.h: * WebProcess/Plugins/Plugin.h: * WebProcess/Plugins/PluginView.h: * WebProcess/Plugins/PluginProxy.h: * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add getStringSelection. * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add pdfLayerController:didChangeSelection: delegate method. * WebProcess/Plugins/PDF/PDFPlugin.h: (PDFPlugin): Add getStringSelection and notifySelectionChanged. * WebProcess/Plugins/PDF/PDFPlugin.mm: (-[WKPDFLayerControllerDelegate pdfLayerController:didChangeSelection:]): Forward selection change notifications to our PDFPlugin. (WebKit::PDFPlugin::notifySelectionChanged): Forward selection change notifications to our WebPage. (WebKit::PDFPlugin::getStringSelection): Retrieve PDFLayerController's selection as a plain text string. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::countFindMatches): (WebKit::PluginView::findString): Drive-bys, check for existance and initialization of the plugin before using it. (WebKit::PluginView::getStringSelection): Added. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::respondToChangedSelection): Use didChangeSelection instead of sending the EditorStateChanged message directly. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::editorState): If a plugin is focused and has a selection, return a EditorState that reflects that. Since PDFs aren't editable (when editing annotations, the plugin doesn't have focus), I'm not adding support for the editing-related properties when a plugin has focus. (WebKit::WebPage::focusedPluginViewForFrame): (WebKit::WebPage::pluginViewForFrame): Make these class methods instead of static functions so we can use them from WebPageMac too, instead of duplicating code there. (WebKit::WebPage::didChangeSelection): Added. * WebProcess/WebPage/WebPage.h: Add didChangeSelection and [focused]PluginViewForFrame. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::getStringSelectionForPasteboard): Defer to the focused plugin (if it exists) when retrieving the plain-text selection. 2013-03-04 Mikhail Pozdnyakov [WK2][EFL] Add callbacks to the WKViewClient to handle Web Process crash and relaunch https://bugs.webkit.org/show_bug.cgi?id=109828 Reviewed by Kenneth Rohde Christiansen. Providing WKViewClient with Web Process crash and Web Process relaunch callbacks brings better design as WebView should not be aware of EFL-specific code handling the corresponding events. The implementation of the mentioned Web Process callbacks was also added. * UIProcess/API/C/efl/WKView.cpp: (WKViewSetThemePath): * UIProcess/API/C/efl/WKView.h: * UIProcess/efl/ViewClientEfl.cpp: (WebKit::ViewClientEfl::webProcessCrashed): (WebKit): (WebKit::ViewClientEfl::webProcessDidRelaunch): (WebKit::ViewClientEfl::ViewClientEfl): * UIProcess/efl/ViewClientEfl.h: (ViewClientEfl): * UIProcess/efl/WebView.cpp: (WebKit::WebView::setThemePath): Accepts WTF::String instead of WKStringRef as it is more appropriate for C++ API implementation class. (WebKit::WebView::processDidCrash): (WebKit::WebView::didRelaunchProcess): * UIProcess/efl/WebView.h: (WebView): * UIProcess/efl/WebViewClient.cpp: (WebKit::WebViewClient::webProcessCrashed): (WebKit): (WebKit::WebViewClient::webProcessDidRelaunch): * UIProcess/efl/WebViewClient.h: 2013-03-04 Anders Carlsson Complete the plug-in URL string before sending it to the UI process https://bugs.webkit.org/show_bug.cgi?id=111355 Reviewed by Andreas Kling. If the URL is not absolute, we won't be able to find it by path extension in the plug-in info store. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::unavailablePluginButtonClicked): 2013-03-04 Carlos Garcia Campos [GTK] Some WebKit2 GTK+ unit tests are failing in 32 bits bot https://bugs.webkit.org/show_bug.cgi?id=111346 Reviewed by Martin Robinson. The problem is the use of a temporary CString object in the macro g_assert_cmpstr. It's a common mistake because we usually forget that g_assert_cmpstr is not a function but a macro, that expands to multiple lines. This patch adds a new macro ASSERT_CMP_CSTRING with the same implementation that g_assert_cmpstr, but using CStrings instead of const char*. It fixes all the cases where a temporary CString was used in g_assert_cmpstr, and uses the new macro also for the cases where we were caching the CString just for g_assert_cmpstr. * UIProcess/API/gtk/tests/TestDownloads.cpp: (testDownloadRemoteFile): * UIProcess/API/gtk/tests/TestInspectorServer.cpp: (testInspectorServerPageList): * UIProcess/API/gtk/tests/TestLoaderClient.cpp: * UIProcess/API/gtk/tests/TestMain.h: * UIProcess/API/gtk/tests/TestResources.cpp: * UIProcess/API/gtk/tests/TestWebKitFaviconDatabase.cpp: (testGetFaviconURI): * UIProcess/API/gtk/tests/TestWebKitSettings.cpp: (assertThatUserAgentIsSentInHeaders): (testWebKitSettingsUserAgent): 2013-03-04 Kunihiko Sakamoto Add build flag for FontLoader https://bugs.webkit.org/show_bug.cgi?id=111289 Reviewed by Benjamin Poulain. Add ENABLE_FONT_LOAD_EVENTS build flag (disabled by default). * Configurations/FeatureDefines.xcconfig: 2013-03-03 Tim Horton PDFPlugin: Rename delegate method from openWithPreview to openWithNativeApplication https://bugs.webkit.org/show_bug.cgi?id=111258 Reviewed by Alexey Proskuryakov. * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: * WebProcess/Plugins/PDF/PDFPlugin.mm: (-[WKPDFLayerControllerDelegate openWithNativeApplication]): Rename from openWithPreview to openWithNativeApplication to match PDFKit. 2013-03-03 Huang Dongsung [EFL][QT][WK2] Turn on ApplyDeviceScaleFactorInCompositor always. https://bugs.webkit.org/show_bug.cgi?id=110298 Reviewed by Kenneth Rohde Christiansen. Currently, EFL and Qt turn on ApplyDeviceScaleFactorInCompositor when using fixed layout, but ApplyDeviceScaleFactorInCompositor is not related to fixed layout. It is confusing that a platform WebView deals with device view size or DIP view size case by case. So this patch always turns on ApplyDeviceScaleFactorInCompositor. In addition, move the code that turns on ScrollingCoordinatorEnabled to CoordinatedLayerTreeHost. * UIProcess/API/efl/EwkView.cpp: (EwkView::setDeviceScaleFactor): We should make WebPage know new DIP size. (EwkView::setSize): When we set ApplyDeviceScaleFactorInCompositor to true, make WebPage know the DIP size as a view size. * UIProcess/efl/WebView.cpp: (WebKit::WebView::updateViewportSize): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setUseFixedLayout): WebPage sends the DIP size to Web Process even when we don't use fixed layout. 2013-03-03 Sam Weinig Shared Web Workers have an incorrect visible process name https://bugs.webkit.org/show_bug.cgi?id=111277 Reviewed by Dan Bernstein. * SharedWorkerProcess/SharedWorkerProcess.cpp: (WebKit::SharedWorkerProcess::initializeSharedWorkerProcess): * SharedWorkerProcess/SharedWorkerProcess.h: (SharedWorkerProcess): * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm: (WebKit::SharedWorkerProcess::initializeProcessName): The SharedWorkerProcess is not an internet plug-in! 2013-03-03 Adam Barth Unreviewed attempted build fix. Adds back some includes removed in http://trac.webkit.org/changeset/144565. * Shared/WebRenderLayer.cpp: * Shared/WebRenderObject.cpp: * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp: * WebProcess/Plugins/PDF/PDFPlugin.mm: * WebProcess/Plugins/PluginView.cpp: * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: * WebProcess/WebCoreSupport/WebEditorClient.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: * WebProcess/WebPage/mac/WebPageMac.mm: * WebProcess/WebProcess.cpp: * WebProcess/soup/WebProcessSoup.cpp: 2013-03-03 Adam Barth Unreviewed rollout of http://trac.webkit.org/r144530 As described in https://bugs.webkit.org/show_bug.cgi?id=111167 and https://bugs.webkit.org/show_bug.cgi?id=111035, this patch caused a large number of ASSERTs in chromium-win. * NetworkProcess/HostRecord.h: * NetworkProcess/NetworkResourceLoadScheduler.h: * NetworkProcess/NetworkResourceLoader.h: (WebCore): * Shared/WebRenderLayer.cpp: * Shared/WebRenderObject.cpp: * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp: * WebProcess/Plugins/PDF/PDFPlugin.mm: * WebProcess/Plugins/PluginView.cpp: * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: * WebProcess/WebCoreSupport/WebEditorClient.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: * WebProcess/WebPage/mac/WebPageMac.mm: * WebProcess/WebProcess.cpp: * WebProcess/soup/WebProcessSoup.cpp: 2013-03-02 Sam Weinig WebKit2 is missing the setShowsURLsInToolTips preference https://bugs.webkit.org/show_bug.cgi?id=111259 Reviewed by Maciej Stachowiak. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetShowsURLsInToolTipsEnabled): (WKPreferencesGetShowsURLsInToolTipsEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Pipe it through. 2013-03-02 Benjamin Poulain Move computedStyleIncludingVisitedInfo from TestRunner to Internals https://bugs.webkit.org/show_bug.cgi?id=109772 Reviewed by Andreas Kling. * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: * WebProcess/WebPage/WebFrame.cpp: * WebProcess/WebPage/WebFrame.h: (WebFrame): 2013-03-01 Kiran Muppala Remove call to set task priority of WebKit2 processes on Mac https://bugs.webkit.org/show_bug.cgi?id=111239 Reviewed by Darin Adler. Remove call to set task prioirty of WebKit2 processes on Mac as it is no longer necessary. * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::platformInitialize): Remove call to setpriority(). 2013-02-28 Alexey Proskuryakov Reduce amount of rebuilding when touching networking headers https://bugs.webkit.org/show_bug.cgi?id=111035 Reviewed by Eric Seidel. Adding includes that are now necessary because WebCore headers don't have them any more. * NetworkProcess/HostRecord.h: * NetworkProcess/NetworkResourceLoadScheduler.h: * NetworkProcess/NetworkResourceLoader.h: * Shared/WebRenderLayer.cpp: * Shared/WebRenderObject.cpp: * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp: * WebProcess/Plugins/PDF/PDFPlugin.mm: * WebProcess/Plugins/PluginView.cpp: * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: * WebProcess/WebCoreSupport/WebEditorClient.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: * WebProcess/WebPage/mac/WebPageMac.mm: * WebProcess/WebProcess.cpp: * WebProcess/soup/WebProcessSoup.cpp: 2013-02-28 Alexey Proskuryakov Make in-memory blobs work in NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=111132 Reviewed by Sam Weinig. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::registerBlobURL): (WebKit::NetworkConnectionToWebProcess::registerBlobURLFromURL): (WebKit::NetworkConnectionToWebProcess::unregisterBlobURL): * NetworkProcess/NetworkConnectionToWebProcess.h: Implement BlobRegistry interface by using BlobRegistryImpl (same one as used in WebProcess in non-PPT mode). * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Added three messages needed for BlobRegistry. * NetworkProcess/NetworkProcess.cpp: * NetworkProcess/NetworkProcessPlatformStrategies.cpp: Added. * NetworkProcess/NetworkProcessPlatformStrategies.h: Added. Added a mostly empty platform strategy, just for FormData to talk to BlobRegistry. Perhaps we'll find a way to avoid this WebCore code path in NetworkProcess, because we obviously know which registry implementation is in use in this process. * Shared/FileAPI: Added. * Shared/FileAPI/BlobRegistrationData.cpp: Added. * Shared/FileAPI/BlobRegistrationData.h: Added. Added a class for passing BlobData and extension handles over IPC. This uses a trick with mutable a member to avoid copying decoded BlobStorageData. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/FileAPI: Added. * WebProcess/FileAPI/BlobRegistryProxy.cpp: Added. * WebProcess/FileAPI/BlobRegistryProxy.h: Added. A proxy implementation of BlobRegistry that just sends requests over IPC. We only need async ones. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::createBlobRegistry): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: Create an appropriate BlobRegistry. 2013-03-01 Zan Dobersek Uncomment ENABLE_SVG guards to avoid having WebKitPluginProcess link against libWebCoreSVG.la when SVG is disabled. Rubber-stamped by Gustavo Noronha. * GNUmakefile.am: 2013-02-28 Sam Weinig Add SPI for marking a WebView as doing things on behalf of another process https://bugs.webkit.org/show_bug.cgi?id=111125 Reviewed by Alexey Proskuryakov. * NetworkProcess/mac/RemoteNetworkingContext.h: * NetworkProcess/mac/RemoteNetworkingContext.mm: (WebKit::RemoteNetworkingContext::sourceApplicationAuditData): * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.h: * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: (WebKit::WebFrameNetworkingContext::sourceApplicationAuditData): Stub out sourceApplicationAuditData() client function. 2013-03-01 Sheriff Bot Unreviewed, rolling out r144422 and r144424. http://trac.webkit.org/changeset/144422 http://trac.webkit.org/changeset/144424 https://bugs.webkit.org/show_bug.cgi?id=111167 Caused over 20 tests to fail assertion on Chromium Win port as ASSERTION FAILED: m_platformRequestUpdated (Requested by toyoshim on #webkit). * NetworkProcess/HostRecord.h: * NetworkProcess/NetworkResourceLoadScheduler.h: * NetworkProcess/NetworkResourceLoader.h: (WebCore): * Shared/WebRenderLayer.cpp: * Shared/WebRenderObject.cpp: * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp: * WebProcess/Plugins/PDF/PDFPlugin.mm: * WebProcess/Plugins/PluginView.cpp: * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: * WebProcess/WebCoreSupport/WebEditorClient.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: * WebProcess/WebPage/mac/WebPageMac.mm: * WebProcess/WebProcess.cpp: * WebProcess/soup/WebProcessSoup.cpp: 2013-03-01 Andras Becsi [Qt][WK2] Fix failing API tests after r143935 https://bugs.webkit.org/show_bug.cgi?id=111086 Reviewed by Jocelyn Turcotte. Convert a leftorver resume call to the new resumeAndUpdateContent() call in PageViewportControllerClientQt so that the notifications about zoom animation state changes reach the API tests. * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::scaleAnimationStateChanged): 2013-03-01 Grzegorz Czajkowski , Mariusz Grzegorczyk [WK2] Asynchronous spell checking implementation https://bugs.webkit.org/show_bug.cgi?id=109577 Reviewed by Enrica Casucci. Associate the abstract 'WebCore::TextCheckingRequest' object with the unique identifier on WebProcess side. The request data from the 'TextCheckingRequest' are retrieved and passed to the UIProcess. The WK2 client (TextChecker{Gtk/Mac/Efl/Qt}.cpp) gets the 'TextCheckerCompletion' object with the request data and possibility to notify the WebProcess about the spelling results. Finally, the WebPage object calls on the proper 'TextCheckingRequest' object didSuccess/didCancel method to notify the WebCore about the spelling result. * CMakeLists.txt: * GNUmakefile.list.am: Add 'TextCheckerCompletion.{h/cpp}' to the WebKit2 cmake based and WK2-Gtk+ builds. * Scripts/webkit2/messages.py: (headers_for_type): Add exception for 'TextCheckingRequestData' class to properly find header file for it. * Shared/WebCoreArgumentCoders.cpp: * Shared/WebCoreArgumentCoders.h: Teach 'ArgumentCoder' how to encode/decode 'TextCheckingRequestData' class. * Target.pri: Add 'TextCheckerCompletion.{h/cpp}' to the WK2-Qt build. * UIProcess/TextChecker.h: Add 'requestCheckingOfString' method to the TextChecker's interface. * UIProcess/TextCheckerCompletion.cpp: Added. (WebKit::TextCheckerCompletion::create): (WebKit::TextCheckerCompletion::TextCheckerCompletion): (WebKit::TextCheckerCompletion::spellDocumentTag): Return the WebPageProxy's spellDocumentTag as the client might be interested in from which page the request came. (WebKit::TextCheckerCompletion::textCheckingRequestData): Allow to retrieve 'TextCheckingRequestData' object. (WebKit::TextCheckerCompletion::didFinishCheckingText): (WebKit::TextCheckerCompletion::didCancelCheckingText): Notify the 'WebPageProxy' object that the given request has been handled or canceled. * UIProcess/TextCheckerCompletion.h: Added. Introduce a new class for WK2 to retrieve the request data and call didFinishCheckingText/didCancelCheckingText. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::requestCheckingOfString): Create 'TextCheckerCompletion' object and pass it to the 'TextChecker::requestCheckingOfString' method. (WebKit::WebPageProxy::didFinishCheckingText): (WebKit::WebPageProxy::didCancelCheckingText): Send the messages to WebProcess that the given request has been handled or canceled. * UIProcess/WebPageProxy.h: (WebPageProxy): Add public declarations for 'didFinishCheckingText', 'didCancelCheckingText'. Add private declarations for 'requestCheckingOfString'. Move the 'spellDocumentTag()' method to to the public section to be accessible from 'TextCheckerCompletion' class. * UIProcess/WebPageProxy.messages.in: A new entry for 'RequestCheckingOfString'. * UIProcess/efl/TextCheckerEfl.cpp: (WebKit::TextChecker::requestCheckingOfString): (WebKit): * UIProcess/gtk/TextCheckerGtk.cpp: (WebKit::TextChecker::requestCheckingOfString): (WebKit): * UIProcess/mac/TextCheckerMac.mm: (WebKit::TextChecker::requestCheckingOfString): (WebKit): * UIProcess/qt/TextCheckerQt.cpp: (WebKit::TextChecker::requestCheckingOfString): (WebKit): Add dummy implementations for 'requestCheckingOfString'. * WebKit2.xcodeproj/project.pbxproj: Add 'TextCheckerCompletion.{h/cpp} to Mac build. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::generateTextCheckingRequestID): Helper function to generate the unique identifier for the abstract 'TextCheckingRequest' object. (WebKit::WebEditorClient::requestCheckingOfString): Associate 'TextCheckingRequest' with the unique identifier and add them to the map object. Get the request data and send it to the UIProcess. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::addTextCheckingRequest): Add the identifier and the request to the map object. (WebKit::WebPage::didFinishCheckingText): (WebKit::WebPage::didCancelCheckingText): Call didSucceed/didCancel on the 'TextCheckingRequest' to notify the WebCore about spellcheking results. Remove the request from the map object. * WebProcess/WebPage/WebPage.h: Add declarations for 'addTextCheckingRequest', 'didFinishCheckingText' and 'didCancelCheckingText.' * WebProcess/WebPage/WebPage.messages.in: Add a new entry for DidFinishCheckingText, DidCancelCheckingText. 2013-02-28 Alexey Proskuryakov Reduce amount of rebuilding when touching networking headers https://bugs.webkit.org/show_bug.cgi?id=111035 Reviewed by Eric Seidel. Adding includes that are now necessary because WebCore headers don't have them any more. * NetworkProcess/HostRecord.h: * NetworkProcess/NetworkResourceLoadScheduler.h: * NetworkProcess/NetworkResourceLoader.h: * Shared/WebRenderLayer.cpp: * Shared/WebRenderObject.cpp: * WebProcess/Geolocation/GeolocationPermissionRequestManager.cpp: * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: * WebProcess/InjectedBundle/DOM/InjectedBundleNodeHandle.cpp: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/InjectedBundle/InjectedBundleDOMWindowExtension.cpp: * WebProcess/Plugins/PDF/PDFPlugin.mm: * WebProcess/Plugins/PluginView.cpp: * WebProcess/WebCoreSupport/WebContextMenuClient.cpp: * WebProcess/WebCoreSupport/WebEditorClient.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebCoreSupport/mac/WebFrameNetworkingContext.mm: * WebProcess/WebPage/mac/WebPageMac.mm: * WebProcess/WebProcess.cpp: * WebProcess/soup/WebProcessSoup.cpp: 2013-02-28 Seokju Kwon [WK2] Refactoring : Fix indentation and braces in WebInspectorClient.h|cpp https://bugs.webkit.org/show_bug.cgi?id=109925 Reviewed by Benjamin Poulain. The contents of an outermost namespace block should not be indented. And One-line control clauses should not use braces. * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::closeInspectorFrontend): * WebProcess/WebCoreSupport/WebInspectorClient.h: (WebCore): 2013-02-28 Kiran Muppala Add a pre-bootstrap message for NetworkProcess XPC service https://bugs.webkit.org/show_bug.cgi?id=111127 Reviewed by Sam Weinig. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm: (WebKit::XPCServiceEventHandler): Hold on to the pre-bootstrap message. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm: (WebKit::XPCServiceEventHandler): Ditto. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService): Send a pre-bootstrap message for NetworkProcess XPC service. 2013-02-28 Conrad Shultz Need API to control page underlay color https://bugs.webkit.org/show_bug.cgi?id=110918 Reviewed by Simon Fraser. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): Encode underlayColor. (WebKit::WebPageCreationParameters::decode): Decode underlayColor. * Shared/WebPageCreationParameters.h: (WebPageCreationParameters): Add underlayColor member. * UIProcess/API/mac/WKView.mm: (-[WKView underlayColor]): Accessor; retrieves the WebCore::Color from the WebPageProxy and converts it to an NSColor. (-[WKView setUnderlayColor:]): Mutator; converts the NSColor to a WebCore::Color and passes it to the WebPageProxy. * UIProcess/API/mac/WKViewPrivate.h: Add underlayColor @property. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setUnderlayColor): Mutator; dispatches SetUnderlayColor to WebPage. (WebKit::WebPageProxy::creationParameters): Set the parameters' underlayColor member appropriately. * UIProcess/WebPageProxy.h: Declare new member functions and variable. (WebKit::WebPageProxy::underlayColor): Accessor. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::underlayColor): Return the associated WebPage's underlayColor. * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): Declare underlayColor(). * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Apply any underlayColor that was supplied as part of the WebPageCreationParameters. * WebProcess/WebPage/WebPage.h: Declare new member functions and variable. (WebKit::WebPage::underlayColor): Accessor. * WebProcess/WebPage/WebPage.messages.in: Add SetUnderlayColor message. 2013-02-28 Anders Carlsson Add the notion of an allowed connection to SessionStorageNamespace https://bugs.webkit.org/show_bug.cgi?id=111122 Reviewed by Sam Weinig. Group together each session storage namespace with an allowed connection. This will help ensure that rouge web processes will not be able to access session storage from pages in other processes. * UIProcess/Storage/StorageManager.cpp: (StorageManager::SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::allowedConnection): (WebKit::StorageManager::SessionStorageNamespace::create): (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::setAllowedConnection): Add an m_allowedConnection member variable, as well as setters and getters. (WebKit::StorageManager::createSessionStorageNamespace): Take an optional allowed connection. (It can be null if the process has not finished launching). (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection): New function to set the allowed connection for a session storage namespace. (WebKit::StorageManager::createStorageArea): Add another FIXME. (WebKit::StorageManager::createSessionStorageNamespaceInternal): Pass the connection to the SessionStorageNamespace constructor. (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnectionInternal): Set the allowed connection. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): Pass the connection to createSessionStorageNamespace. (WebKit::WebPageProxy::connectionWillOpen): Call setAllowedSessionStorageNamespaceConnection. (WebKit::WebPageProxy::connectionWillClose): Call setAllowedSessionStorageNamespaceConnection with a null connection. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::connectionWillOpen): Call connectionWillOpen on all pages. (WebKit::WebProcessProxy::connectionWillClose): Call connectionWillClose on all pages. 2013-02-28 Kiran Muppala Add private API to disable WKView window occlusion detection https://bugs.webkit.org/show_bug.cgi?id=111107 Reviewed by Simon Fraser. * UIProcess/API/mac/WKView.mm: (-[WKView _enableWindowOcclusionNotifications]): Check if occlusion detection is enabled before enabling notifications. (windowBecameOccluded): Ditto before changing window occlusion state. (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Initialize occlusion detection enabled flag to "YES". (-[WKView windowOcclusionDetectionEnabled]): (-[WKView setWindowOcclusionDetectionEnabled:]): * UIProcess/API/mac/WKViewPrivate.h: 2013-02-28 Anders Carlsson Add the notion of an allowed connection to SessionStorageNamespace https://bugs.webkit.org/show_bug.cgi?id=111122 Reviewed by Sam Weinig. Group together each session storage namespace with an allowed connection. This will help ensure that rouge web processes will not be able to access session storage from pages in other processes. * UIProcess/Storage/StorageManager.cpp: (StorageManager::SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::allowedConnection): (WebKit::StorageManager::SessionStorageNamespace::create): (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::setAllowedConnection): Add an m_allowedConnection member variable, as well as setters and getters. (WebKit::StorageManager::createSessionStorageNamespace): Take an optional allowed connection. (It can be null if the process has not finished launching). (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnection): New function to set the allowed connection for a session storage namespace. (WebKit::StorageManager::createStorageArea): Add another FIXME. (WebKit::StorageManager::createSessionStorageNamespaceInternal): Pass the connection to the SessionStorageNamespace constructor. (WebKit::StorageManager::setAllowedSessionStorageNamespaceConnectionInternal): Set the allowed connection. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): Pass the connection to createSessionStorageNamespace. (WebKit::WebPageProxy::connectionWillOpen): Call setAllowedSessionStorageNamespaceConnection. (WebKit::WebPageProxy::connectionWillClose): Call setAllowedSessionStorageNamespaceConnection with a null connection. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::connectionWillOpen): Call connectionWillOpen on all pages. (WebKit::WebProcessProxy::connectionWillClose): Call connectionWillClose on all pages. 2013-02-28 Anders Carlsson Implement more StorageAreaProxy member functions https://bugs.webkit.org/show_bug.cgi?id=111103 Reviewed by Sam Weinig. * Shared/SecurityOriginData.cpp: (WebKit::SecurityOriginData::securityOrigin): * Shared/SecurityOriginData.h: Add helper to create a WebCore::SecurityOrigin from a SecurityOriginData object. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::key): Fill the storage map and call through to StorageMap::key. (WebKit::StorageAreaProxy::contains): Fill the storage map and call through to StorageMap::contains. (WebKit::StorageAreaProxy::memoryBytesUsedByCache): Return 0; this matches StorageAreaImpl. 2013-02-28 Tim Horton PDFPlugin: PDF orientation isn't respected when printing or print-previewing https://bugs.webkit.org/show_bug.cgi?id=110925 Reviewed by Alexey Proskuryakov. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::drawPDFPage): Teach drawPDFPage about PDFPage's rotation property, and use it to swap the PDF's cropbox. Painting now matches PDFViewController's historical behavior. 2013-02-28 Sam Weinig Don't install unused XPCServices on Lion Rubber-stamped by Anders Carlsson * Configurations/BaseXPCService.xcconfig: 2013-02-28 David Kilzer BUILD FIX (r144221): SetSmartInsertDeleteEnabled should be wrapped in PLATFORM(MAC) * WebProcess/WebPage/WebPage.messages.in: Move SetSmartInsertDeleteEnabled from USE(APPKIT) to PLATFORM(MAC). 2013-02-27 Csaba Osztrogonác [WK2] One more unreviewed buildfix for EFL, GTK and Qt after r144218. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebProcess/Storage/StorageNamespaceProxy.cpp: (WebKit::StorageNamespaceProxy::copy): 2013-02-27 Zan Dobersek Unreviewed (speculative) build fixes for EFL, GTK and Qt after r144218. * CMakeLists.txt: * DerivedSources.pri: * GNUmakefile.list.am: * Target.pri: 2013-02-27 John Bauman Plugin in iframe may not display https://bugs.webkit.org/show_bug.cgi?id=109879 Reviewed by Simon Fraser. Update geometry when cliprect changes. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::clipRectChanged): * WebProcess/Plugins/PluginView.h: 2013-02-27 Jer Noble REGRESSION (48533): Full-frame plugins stopped working (download instead of loading the plugin) https://bugs.webkit.org/show_bug.cgi?id=111003 Reviewed by Anders Carlsson. Also query the Page's pluginData when determining whether a given MIME type can be shown. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageCanShowMIMEType): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::canShowMIMEType): * WebProcess/WebPage/WebPage.h: 2013-02-27 Manuel Rego Casasnovas Add smartInsertDeleteEnabled setting to WebCore::Page https://bugs.webkit.org/show_bug.cgi?id=107840 Reviewed by Ryosuke Niwa. * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::encode): (WebKit::WebPageCreationParameters::decode): Remove code related to isSmartInsertDeleteEnabled. * Shared/WebPageCreationParameters.h: (WebPageCreationParameters): Remove isSmartInsertDeleteEnabled. * Shared/WebPreferencesStore.h: (WebKit): Add macro for smartInsertDeleteEnabled setting. * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetSmartInsertDeleteEnabled): (WKPreferencesGetSmartInsertDeleteEnabled): Implement methods using the new setting. * UIProcess/API/C/WKPreferencesPrivate.h: Add new methods headers. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::initializeWebPage): Set smartInsertDeleteEnabled setting using m_isSmartInsertDeleteEnabled to keep initial value on Mac. (WebKit::WebPageProxy::creationParameters): Remove usage of parameters.isSmartInsertDeleteEnabled. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::smartInsertDeleteEnabled): Enable method for all platforms. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Remove m_isSmartInsertDeleteEnabled initialization. (WebKit::WebPage::updatePreferences): Set smartInsertDeleteEnabled setting. (WebKit::WebPage::isSmartInsertDeleteEnabled): Implement method using settings. (WebKit): (WebKit::WebPage::setSmartInsertDeleteEnabled): Implement method using settings. * WebProcess/WebPage/WebPage.h: (WebPage): Enable methods dealing with smartInsertDeleteEnabled for all platforms and remove m_isSmartInsertDeleteEnabled as it will be a setting. 2013-02-27 Anders Carlsson More storage scaffolding https://bugs.webkit.org/show_bug.cgi?id=110997 Reviewed by Andreas Kling. * DerivedSources.make: Add StorageAreaProxy. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::setItem): Send back a DidSetItem message. * WebKit2.xcodeproj/project.pbxproj: Add generated files. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::StorageAreaProxy): Add the message receiver. (WebKit::StorageAreaProxy::~StorageAreaProxy): Remove the message receiver. (WebKit::StorageAreaProxy::didSetItem): add stub. * WebProcess/Storage/StorageAreaProxy.h: (StorageAreaProxy): * WebProcess/Storage/StorageAreaProxy.messages.in: Added. 2013-02-27 Sam Weinig REGRESSION: Loading flash switches to discrete graphics, 100 MB on membuster Reviewed by Dan Bernstein. Due the change in CFBundleIdentifier, the WebProcess and PluginProcess were unnecessarily muxing (they used to be whitelisted by OpenGL) to the discrete GPU. * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist: * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist: * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist: * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist: * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist: * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: Add NSSupportsAutomaticGraphicsSwitching YES. * WebKit2.xcodeproj/project.pbxproj: Re-add the PluginService.32-64.Info.plist plist to the project file. 2013-02-26 Alexey Proskuryakov Don't add a body to platform request until necessary https://bugs.webkit.org/show_bug.cgi?id=110900 Reviewed by Brady Eidson. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::willSendRequest): Restore body after IPC. There is no way for the client to change it. * Shared/Downloads/mac/DownloadMac.mm: (WebKit::Download::start): (WebKit::Download::startWithHandle): Pass UpdateHTTPBody when passing a request to NSURLConnection. * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::::encodePlatformData): Never serialize the request body. It's slow, and sometimes impossible, so just keeping things consistent. * Shared/mac/WebURLRequestMac.mm: (WebKit::WebURLRequest::platformRequest): Pass DoNotUpdateHTTPBody, as we can't update it outside NetworkProcess. * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm: (WebKit::CustomProtocolManagerProxy::startLoading): Ditto. * WebProcess/InjectedBundle/InjectedBundlePageResourceLoadClient.cpp: (WebKit::InjectedBundlePageResourceLoadClient::willSendRequestForFrame): Restore existing body after a client call.. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::platformCanHandleRequest): Pass DoNotUpdateHTTPBody, as we can't update it outside NetworkProcess. 2013-02-27 Glenn Adams Add ENABLE_CSS3_TEXT_LINE_BREAK flag. https://bugs.webkit.org/show_bug.cgi?id=110944 Reviewed by Dean Jackson. * Configurations/FeatureDefines.xcconfig: 2013-02-27 Michael Brüning [Qt][WK2] Replace use of WebPreferences with use of WKPrefences C API https://bugs.webkit.org/show_bug.cgi?id=108952 Reviewed by Simon Hausmann. Signed off for WebKit2 by Benjamin Poulain. This patch moves the view classes and preferences in the Qt API to use the C API for accessing and manipulating preferences as part of the cleanup and move towards using the C API as base for the Qt WebKit2 API. Adds the function WebKit::adoptToQString for convenience when dealing with QString and copied String objects. Removes the ScrollAnimatorEnabled options from QWebPreferences. * UIProcess/API/cpp/qt/WKStringQt.cpp: (WebKit::adoptToQString): * UIProcess/API/cpp/qt/WKStringQt.h: (WebKit): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): * UIProcess/API/qt/qwebpreferences.cpp: (QWebPreferencesPrivate::testAttribute): (QWebPreferencesPrivate::setAttribute): (QWebPreferencesPrivate::setFontFamily): (QWebPreferencesPrivate::fontFamily): (QWebPreferencesPrivate::setFontSize): (QWebPreferencesPrivate::fontSize): * UIProcess/API/qt/qwebpreferences_p.h: * UIProcess/API/qt/qwebpreferences_p_p.h: 2013-02-26 Anders Carlsson Implement StorageAreaProxy::getItem and StorageAreaProxy::setItem https://bugs.webkit.org/show_bug.cgi?id=110927 Reviewed by Sam Weinig. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::setItem): * UIProcess/Storage/StorageManager.h: Add empty stub. * UIProcess/Storage/StorageManager.messages.in: Add SetItem message. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::getItem): Fill the storage map and get the item from it. (WebKit::StorageAreaProxy::setItem): Update the storage map and send a SetItem message to the UI process. 2013-02-26 Anders Carlsson StorageAreaProxy should hold on to a StorageMap and not a HashMap https://bugs.webkit.org/show_bug.cgi?id=110919 Reviewed by Jessie Berlin. Create a storage map instead of a hash map. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::length): (WebKit::StorageAreaProxy::loadValuesIfNeeded): * WebProcess/Storage/StorageAreaProxy.h: (WebCore): (StorageAreaProxy): 2013-02-26 Anders Carlsson Fix a copy/paste error in WebLoaderClient::didBlockInsecurePluginVersion https://bugs.webkit.org/show_bug.cgi?id=110914 Reviewed by Beth Dakin. Pass kWKErrorCodeInsecurePlugInVersion to the pluginDidFail callback. * UIProcess/WebLoaderClient.cpp: (WebKit::WebLoaderClient::didBlockInsecurePluginVersion): 2013-02-26 Jer Noble Unreviewed build fix; use correct macro for platform name in FeatureDefines.xcconfig. * Configurations/FeatureDefines.xcconfig: 2013-02-26 Manuel Rego Casasnovas [WK2][GTK] REGRESSION (r143463): unit test failure in WebKit2APITests/TestContextMenu https://bugs.webkit.org/show_bug.cgi?id=110869 Reviewed by Martin Robinson. Test was failing because of new media controls needs more space to be painted than just 10x10 pixels. * UIProcess/API/gtk/tests/TestContextMenu.cpp: (testContextMenuDefaultMenu): Modified test in order to give more space to the media controls. 2013-02-26 Dean Jackson Draw intermediate snapshots if possible https://bugs.webkit.org/show_bug.cgi?id=110811 Reviewed by Simon Fraser. After http://webkit.org/b/110495 we delayed snapshotting until we've received a nice image, but this made the page look like it is broken. We should draw any intermediate snapshots that we find, which might include content such as progress bars/spinners. * WebProcess/Plugins/PluginView.cpp: (WebKit): Reinstate 60 attempts at snapshots before giving up. (WebKit::PluginView::isAcceleratedCompositingEnabled): We do not want accelerated compositing enabled when we are trying to capture snapshots. 2013-02-26 Andras Becsi Remove nonexistent StringPairVector.h from Target.pri after r142839 Unreviewed gardening. * Target.pri: 2013-02-26 Simon Hausmann Unreviewed trivial !ENABLE(NETSCAPE_PLUGIN_API) build fix Add an intermediate pluginName string variable instead of accessing plugin.info outside the feature #ifdef. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::unavailablePluginButtonClicked): 2013-02-25 Huang Dongsung Coordinated Graphics: remove redundant update of non compositing layer. https://bugs.webkit.org/show_bug.cgi?id=110444 Reviewed by Noam Rosenthal. Currently, we update non compositing layer when the page scrolled. However, it is not needed, because TiledBackingStore can scroll without tile update. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (CoordinatedLayerTreeHost): 2013-02-25 Jer Noble REGRESSION(r143981): Crash in WebFrameLoaderClient::dispatchDidStartProvisionalLoad() https://bugs.webkit.org/show_bug.cgi?id=110848 Reviewed by Ryosuke Niwa. NULL-check the result of document->documentElement(). * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad): 2013-02-25 Anders Carlsson Add a new unavailablePluginButtonClicked callback that takes a WKDictionary of plug-in information https://bugs.webkit.org/show_bug.cgi?id=110821 Reviewed by Beth Dakin. * UIProcess/API/C/WKPage.cpp: (WKPageGetPluginInformationPluginspageAttributeURLKey): (WKPageGetPluginInformationPluginURLKey): Add two new API key getters. * UIProcess/API/C/WKPage.h: Add a new callback and deprecate the old callback. * UIProcess/WebLoaderClient.cpp: (WebKit::WebLoaderClient::didFailToInitializePlugin): (WebKit::WebLoaderClient::didBlockInsecurePluginVersion): (WebKit::WebLoaderClient::pluginLoadPolicy): Make the pluginInformationDictionary a static member function of WebPageProxy so it can be called from WebUIClient as well. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::getPluginPath): Pass the bundle version as well. (WebKit::WebPageProxy::pluginInformationPluginspageAttributeURLKey): (WebKit::WebPageProxy::pluginInformationPluginURLKey): Add two new keys. (WebKit::WebPageProxy::pluginInformationDictionary): Handle more keys. (WebKit::WebPageProxy::unavailablePluginButtonClicked): Get the plug-in bundle identifier and version. * UIProcess/WebPageProxy.messages.in: Pass along more information; the frame and page URLs. * UIProcess/WebUIClient.cpp: (WebKit::WebUIClient::unavailablePluginButtonClicked): Call the new callback if it's supported. * UIProcess/WebUIClient.h: (WebUIClient): * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformCreateInspectorPage): Update for API changes. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::unavailablePluginButtonClicked): Ensure that the pluginspage attribute is a valid URL. 2013-02-21 Jeffrey Pfau Optionally partition cache to prevent using cache for tracking https://bugs.webkit.org/show_bug.cgi?id=110269 Reviewed by Maciej Stachowiak. Update WKSI bindings and add feature defines. * Configurations/FeatureDefines.xcconfig: Add defines for cache partitioning and public suffix list usage * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2013-02-25 Jer Noble Normalize ENABLE_ENCRYPTED_MEDIA definitions across all FeatureDefines files. https://bugs.webkit.org/show_bug.cgi?id=110806 Ensure both ENCRYPTED_MEDIA and ENCRYPTED_MEDIA_V2 are enabled on macosx_1090. Reviewed by Alexey Proskuryakov. * Configurations/FeatureDefines.xcconfig: 2013-02-25 Jer Noble Full screen mode should not exit when application resigns active state. https://bugs.webkit.org/show_bug.cgi?id=106129 Reviewed by Darin Adler. Now that full screen windows get their own full screen space, there is no reason to exit full screen mode when the application resigns active state. Instead, the windowserver will bring the space containing the newly active application to the foreground. The user can then swipe back to the full screen space (or use Mission Control) to get back to the full screen window. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController windowDidLoad]): Remove the applicationDidResignActive: notification from WKFullScreenWindowController. 2013-02-25 Jer Noble Safari shows empty window and paints webpage in full-screen background https://bugs.webkit.org/show_bug.cgi?id=103712 Reviewed by Darin Adler. When canceling full screen mode due to a provisional load, exit normally instead of closing the full screen window controller. Additionally, to ensure full screen is cancelled when the enclosing frame around a full screen iframe is navigated, check to see if the navigating document contains a full screen element, rather than checking whether the document itself is full screen. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidStartProvisionalLoad): 2013-02-25 Anders Carlsson Fix build. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didBlockInsecurePluginVersion): 2013-02-25 Anders Carlsson Add a new pluginDidFail callback that takes a WKDictionary of plug-in information https://bugs.webkit.org/show_bug.cgi?id=110793 Reviewed by Sam Weinig. Add a new pluginDidFail callback that takes a WKDictionaryRef and also pass in the frame and page URLs. * UIProcess/API/C/WKPage.h: * UIProcess/WebLoaderClient.cpp: (WebKit::pluginInformationDictionary): (WebKit::WebLoaderClient::didFailToInitializePlugin): (WebKit::WebLoaderClient::didBlockInsecurePluginVersion): (WebKit::WebLoaderClient::pluginLoadPolicy): * UIProcess/WebLoaderClient.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didFailToInitializePlugin): (WebKit::WebPageProxy::didBlockInsecurePluginVersion): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::didFailToInitializePlugin): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::createJavaAppletWidget): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): 2013-02-25 Tim Horton PDFPlugin: Tab between text annotations https://bugs.webkit.org/show_bug.cgi?id=106539 Reviewed by Darin Adler. Use [PDFLayerController activateNextAnnotation:] to advance focus when the tab key is hit while inside a PDF form. Also, a drive-by fix to make the lifetime of PDFPluginAnnotationEventListener's m_annotation pointer more explicit. * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add activateNextAnnotation: SPI. * WebProcess/Plugins/PDF/PDFPlugin.h: (PDFPlugin): Add focus(Next|Previous)Annotation. * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::focusNextAnnotation): Ask PDFLayerController to focus the next annotation. (WebKit::PDFPlugin::focusPreviousAnnotation): Ask PDFLayerController to focus the next annotation. * WebProcess/Plugins/PDF/PDFPluginAnnotation.h: Drive-by, initialize m_parent to 0. (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::setAnnotation): Added. * WebProcess/Plugins/PDF/PDFPluginAnnotation.mm: (WebKit::PDFPluginAnnotation::attach): Use eventNames() instead of string literals. (WebKit::PDFPluginAnnotation::~PDFPluginAnnotation): Clear the event listener's reference to its annotation. (WebKit::PDFPluginAnnotation::PDFPluginAnnotationEventListener::handleEvent): Null-check the event listener's annotation. * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.h: (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotation): Create our PDFPluginTextAnnotationEventListener. (PDFPluginTextAnnotationEventListener): Added an event listener (for keydown events in form fields). (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener::create): (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener::setTextAnnotation): (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener::PDFPluginTextAnnotationEventListener): * WebProcess/Plugins/PDF/PDFPluginTextAnnotation.mm: (WebKit::PDFPluginTextAnnotation::~PDFPluginTextAnnotation): Unregister our keydown event listener. (WebKit::PDFPluginTextAnnotation::createAnnotationElement): Register our keydown event listener. (WebKit::PDFPluginTextAnnotation::PDFPluginTextAnnotationEventListener::handleEvent): Ask PDFPlugin to focus the next/previous annotation when the tab key is pressed (Shift-Tab goes backwards). 2013-02-25 Alexey Proskuryakov Remove rule to silence attempts to create the ~/Library/Caches/com.apple.WebKit2.WebProcessService directory Reviewed by Anders Carlsson. * WebProcess/com.apple.WebProcess.sb.in: Remove the obsolete rule. We no longer have a "WebProcessService". 2013-02-25 Andras Becsi [Qt][WK2] Remove unneeded method didResumeContent from PageViewportController clients https://bugs.webkit.org/show_bug.cgi?id=110751 Reviewed by Jocelyn Turcotte. This is a clean-up in the PageViewportController clients that removes leftover code from previous design that is partially unused and unnecessary, to simplify the interaction between PageViewportController and clients. * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::resumeContent): * UIProcess/PageViewportControllerClient.h: (PageViewportControllerClient): * UIProcess/efl/PageViewportControllerClientEfl.cpp: * UIProcess/efl/PageViewportControllerClientEfl.h: (PageViewportControllerClientEfl): * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::animateContentRectVisible): (WebKit::PageViewportControllerClientQt::flickMoveEnded): (WebKit::PageViewportControllerClientQt::resumeAndUpdateContent): (WebKit::PageViewportControllerClientQt::pinchGestureCancelled): * UIProcess/qt/PageViewportControllerClientQt.h: (PageViewportControllerClientQt): 2013-02-25 Andreas Kling Reduce amount of code that includes StylePropertySet.h Reviewed by Antti Koivisto. * WebProcess/WebCoreSupport/WebEditorClient.cpp: 2013-02-24 Andreas Kling Reduce include graph of JSDOMBinding.h Reviewed by Antti Koivisto. * Shared/WebRenderObject.cpp: (WebKit::WebRenderObject::WebRenderObject): * WebProcess/Storage/StorageAreaProxy.cpp: 2013-02-22 Sam Weinig Add temporary work around for 32-bit plugins not working in production builds as XPCServices https://bugs.webkit.org/show_bug.cgi?id=110680 Reviewed by Anders Carlsson. * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::shouldUseXPC): Temporarily don't use XPC for plug-ins for Safari while we figure out why the 32-bit XPCService is being built universal. 2013-02-22 Tim Horton [WK2] The root and page overlay layers should be the size of the view, not the content https://bugs.webkit.org/show_bug.cgi?id=110660 Reviewed by Simon Fraser. Use the view size for the size of the root and page overlay layers. For one, we never update these layers' sizes when the content size changes, causing size mismatches. In addition, there's no reason an overlay shouldn't be able to draw outside of the bounds of the content. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): 2013-02-22 Anders Carlsson pluginLoadStrategy should take a WKDictionaryRef for extensibility https://bugs.webkit.org/show_bug.cgi?id=110656 Reviewed by Jessie Berlin. Change pluginLoadStrategy to take a WKDictionaryRef instead of a number of parameters; this lets us add more plug-in information if needed. Also add the page URL and rename documentURL to frameURL. * UIProcess/API/C/WKPage.cpp: (WKPageGetPluginInformationBundleIdentifierKey): (WKPageGetPluginInformationBundleVersionKey): (WKPageGetPluginInformationDisplayNameKey): (WKPageGetPluginInformationFrameURLKey): (WKPageGetPluginInformationMIMETypeKey): (WKPageGetPluginInformationPageURLKey): * UIProcess/API/C/WKPage.h: * UIProcess/WebLoaderClient.cpp: (WebKit): (WebKit::WebLoaderClient::pluginLoadPolicy): * UIProcess/WebLoaderClient.h: (WebLoaderClient): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::getPluginPath): (WebKit::WebPageProxy::pluginInformationBundleIdentifierKey): (WebKit): (WebKit::WebPageProxy::pluginInformationBundleVersionKey): (WebKit::WebPageProxy::pluginInformationDisplayNameKey): (WebKit::WebPageProxy::pluginInformationFrameURLKey): (WebKit::WebPageProxy::pluginInformationMIMETypeKey): (WebKit::WebPageProxy::pluginInformationPageURLKey): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): (WebKit::WebPage::canPluginHandleResponse): 2013-02-22 Anders Carlsson Move pluginLoadPolicy to the page loader client https://bugs.webkit.org/show_bug.cgi?id=110635 Reviewed by Sam Weinig. Move the pluginLoadPolicy callback to the page loader client where it belongs. * UIProcess/API/C/WKPage.h: * UIProcess/WebLoaderClient.cpp: (WebKit::toWKPluginLoadPolicy): (WebKit): (WebKit::toPluginModuleLoadPolicy): (WebKit::WebLoaderClient::pluginLoadPolicy): * UIProcess/WebLoaderClient.h: (WebLoaderClient): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::getPluginPath): * UIProcess/WebUIClient.cpp: (WebKit): * UIProcess/WebUIClient.h: (WebUIClient): * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformCreateInspectorPage): 2013-02-21 Jer Noble Two video contollers appear after exiting the fullscreen video when using menubar to exit. https://bugs.webkit.org/show_bug.cgi?id=110506 Reviewed by Eric Carlson. When we are notified that the fullscreen window is about to exit fullscreen mode unrequested, call requestExitFullScreen(), as that will result in Document::webkitExitFullScreen() correctly tearing down the fullscreen state. * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController _startExitFullScreenAnimationWithDuration:]): 2013-02-22 Balazs Kelemen Yet another unreviewed buildfix after r143714. * UIProcess/efl/WebView.cpp: (WebKit::WebView::paintToCairoSurface): 2013-02-22 Balazs Kelemen Unreviewed preventive buildfix after my last commit. * UIProcess/API/efl/EwkView.cpp: * UIProcess/efl/WebView.cpp: 2013-02-22 Balazs Kelemen [CoordGfx] Minor cleanup in CoordinatedGraphicsScene::paintToGraphicsContext https://bugs.webkit.org/show_bug.cgi?id=109824 Reviewed by Andreas Kling. Avoid ugly ifdefs by using PlatformGraphicsContext. * UIProcess/API/efl/EwkView.cpp: (EwkView::displayTimerFired): 2013-02-22 Mikhail Pozdnyakov [WK2][EFL] Remove declaration of non-existent functions from EwkView https://bugs.webkit.org/show_bug.cgi?id=110572 Reviewed by Kenneth Rohde Christiansen. Removed declarations of non-existent EwkView::paintToCurrentGLContext() and EwkView::paintToCairoSurface(cairo_surface_t*) that were accidentally left at r143699. * UIProcess/API/efl/EwkView.h: (EwkView): 2013-02-22 Mikhail Pozdnyakov [WK2][EFL] Clean up PageViewportControllerClientEfl class https://bugs.webkit.org/show_bug.cgi?id=110438 Reviewed by Andreas Kling. Cleaned up PageViewportControllerClientEfl class from unused methods and class members, eliminated access to WK2 internals from this class. * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::didChangeContentsSize): * UIProcess/efl/PageViewportControllerClientEfl.h: (WebKit::PageViewportControllerClientEfl::~PageViewportControllerClientEfl): (PageViewportControllerClientEfl): * UIProcess/efl/WebView.cpp: (WebKit::WebView::WebView): (WebKit::WebView::updateViewportSize): 2013-02-22 Michał Pakuła vel Rutka [WK2][EFL][GTK][Qt] Add context menu item tags for C API https://bugs.webkit.org/show_bug.cgi?id=109815 Reviewed by Anders Carlsson. This patch adds context menu item tags used by EFL, GTK and Qt ports, defined in WebCore to WK2 C API. * Shared/API/c/WKContextMenuItemTypes.h: * Shared/API/c/WKSharedAPICast.h: (WebKit::toAPI): (WebKit::toImpl): 2013-02-22 Mikhail Pozdnyakov [WK2][EFL] Move AC code from EwkView to WebView https://bugs.webkit.org/show_bug.cgi?id=110216 Reviewed by Anders Carlsson. Accelerated compositing code is moved from EwkView to WebView. Added new WKView API to be used from EwkView instead of direct accessing to coordinated graphics scene. * UIProcess/API/C/efl/WKView.cpp: (WKViewSetUserViewportTranslation): (WKViewUserViewportToContents): (WKViewPaintToCurrentGLContext): (WKViewPaintToCairoSurface): * UIProcess/API/C/efl/WKView.h: Added WKView API functions. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): (EwkView::displayTimerFired): (EwkView::feedTouchEvent): (EwkView::createGLSurface): (EwkView::handleEvasObjectCalculate): (EwkView::handleEwkViewMouseWheel): (EwkView::handleEwkViewMouseDown): (EwkView::handleEwkViewMouseUp): (EwkView::handleEwkViewMouseMove): * UIProcess/API/efl/EwkView.h: (EwkView): Using new WKView API. * UIProcess/efl/WebView.cpp: (WebKit::WebView::initialize): (WebKit): (WebKit::WebView::paintToCurrentGLContext): (WebKit::WebView::paintToCairoSurface): (WebKit::WebView::userViewportToContents): (WebKit::WebView::transformFromScene): (WebKit::WebView::transformToScene): (WebKit::WebView::coordinatedGraphicsScene): (WebKit::WebView::enterAcceleratedCompositingMode): (WebKit::WebView::exitAcceleratedCompositingMode): * UIProcess/efl/WebView.h: (WebCore): (WebKit::WebView::setUserViewportTranslation): (WebView): Added WebView methods to support new WKView API. 2013-02-21 Dima Gorbik QuickTime plugin doesn't load when accelerated compositing is disabled https://bugs.webkit.org/show_bug.cgi?id=110534 Reviewed by Anders Carlsson. We shouldn't disable accelerated compositing for plugins, because plugins such as QuickTime rely on this and will try to set other drawing models that we don't support. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::isAcceleratedCompositingEnabled): 2013-02-21 Dean Jackson Plug-in snapshotting code always accepts first snapshot https://bugs.webkit.org/show_bug.cgi?id=110495 Reviewed by Tim Horton. When we detect a plugin that can be snapshotted we start capturing images until we find one that we believe isn't blank, or we timeout. I introduced a regression recently where we swap renderers as soon as the snapshot arrives, whether or not is is blank. The fix was to have the embedder (currently only WK2) be the one who tells the HTMLPlugInElement to start displaying snapshots. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::pluginSnapshotTimerFired): When we find a snapshot that we like, tell the HTMLPlugInElement to move to the snapshot view. 2013-02-21 Carlos Garcia Campos Unreviewed. Fix make distcheck. * GNUmakefile.am: Add -DBUILDING_WEBKIT flags to introspection scanner. * GNUmakefile.list.am: Add missing header to compilation and remove one that no longer exists. 2013-02-21 Mikhail Pozdnyakov [WK2][EFL] Move PageViewportController and PageViewportControllerClientEfl out from WebView https://bugs.webkit.org/show_bug.cgi?id=110345 Reviewed by Andreas Kling. WebView does not need to know about both PageViewportController and PageViewportControllerClientEfl. Considering the fact that PageViewportController will stop being WK2 internal and will be based on WK2 C API, it should be owned by EwkView rather than WebView. This patch is also a preparation for WKViewClient API extension to cover all the places where PageViewportController and PageViewportControllerClientEfl are accessed directly from WebView at the moment. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): * UIProcess/API/efl/EwkView.h: (WebKit): (EwkView::pageViewportControllerClient): (EwkView::pageViewportController): (EwkView): * UIProcess/efl/WebView.cpp: (WebKit::WebView::didCommitLoad): (WebKit::WebView::updateViewportSize): (WebKit::WebView::didChangeContentsSize): (WebKit::WebView::didChangeViewportProperties): (WebKit::WebView::pageDidRequestScroll): (WebKit::WebView::didRenderFrame): (WebKit::WebView::pageTransitionViewportReady): * UIProcess/efl/WebView.h: (WebView): 2013-02-20 Tim Horton Provide WKView SPI to defer telling the WebPageProxy and WebProcess about changes in the hosting window https://bugs.webkit.org/show_bug.cgi?id=110415 Reviewed by Simon Fraser. * UIProcess/API/mac/WKView.mm: Add _viewInWindowChangesDeferredCount and _viewInWindowChangeWasDeferred to WKViewData. (-[WKView viewDidMoveToWindow]): If we're deferring window changes, don't include the ViewIsInWindow flag when sending viewStateDidChange. Instead, save the fact that we want to do that later aside. (-[WKView beginDeferringViewInWindowChanges]): (-[WKView endDeferringViewInWindowChanges]): Straightforward begin/end pair. When we exit the last pair and have a pending window change, let the WebPageProxy know. WebPageProxy will do the check to ensure that the in-window state has actually changed. (-[WKView isDeferringViewInWindowChanges]): * UIProcess/API/mac/WKViewPrivate.h: 2013-02-20 Kiran Muppala Disable window occlusion notifications for App Store on Mac. https://bugs.webkit.org/show_bug.cgi?id=110417 Reviewed by Simon Fraser. Temporary fix to workaround issues with window occlusion notifications in App Store. * UIProcess/API/mac/WKView.mm: (+[WKView _registerWindowOcclusionNotificationHandlers]): Return early if the main bundle identifier matches that of App Store. 2013-02-20 Mark Rowe Specify the plug-in process / service entitlements via the Xcode configuration. This is the modern mechanism for applying entitlements to production builds, and it simplifies the maintenance of entitlements going forward. It also allows us to fix the new XPC PluginServices to have the same entitlements as PluginProcess. Reviewed by Alexey Proskuryakov. * Configurations/Base.xcconfig: Ad-hoc sign all WebKit2 components. * Configurations/PluginProcess.xcconfig: Specify the entitlements to use. * Configurations/PluginService.32.xcconfig: Ditto. * Configurations/PluginService.64.xcconfig: Ditto. * Configurations/PluginService.Development.xcconfig: Ditto. * Configurations/PluginService.entitlements: Renamed from Source/WebKit2/PluginProcess/mac/PluginProcess.entitlements. Move the entitlements in to the Configurations directory to make them easier to find. * PluginProcess/mac/add-entitlements.sh: Removed. In my testing the dependency issue mentioned in the script is not an issue with current versions of Xcode. If we see it again we can come up with a workaround that doesn't involve performing the signing via a script phase. * WebKit2.xcodeproj/project.pbxproj: 2013-02-20 Mark Rowe Remove duplication between 32- and 64-bit PluginService plists. Reviewed by Dan Bernstein. The only difference between the plists was the CFBundleIdentifier. Since the values are the same as the product name, we can just use the value of the PRODUCT_NAME configuration setting. * Configurations/PluginService.32.xcconfig: * Configurations/PluginService.64.xcconfig: * PluginProcess/EntryPoint/mac/XPCService/PluginService.32-64.Info.plist: Renamed from Source/WebKit2/PluginProcess/EntryPoint/mac/XPCService/PluginService.32/Info.plist. * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/Info.plist: Removed. 2013-02-20 Simon Fraser Zoomed, slow-scrolling pages keep recreating tiles when scrolled https://bugs.webkit.org/show_bug.cgi?id=110379 Reviewed by Tim Horton. Make the visible rect and exposed rects passed through the drawing area to the tile cache FloatRects instead of IntRects. * UIProcess/API/mac/WKView.mm: (-[WKView setFrameSize:]): (-[WKView _updateWindowAndViewFrames]): (-[WKView enableFrameSizeUpdates]): (-[WKView setMinimumWidthForAutoLayout:]): * UIProcess/WebPageProxy.h: * UIProcess/mac/WebPageProxyMac.mm: (WebKit::WebPageProxy::viewExposedRectChanged): * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::setExposedRect): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::viewExposedRectChanged): * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::setExposedRect): 2013-02-20 Dirk Schulze Enable CANVAS_PATH flag https://bugs.webkit.org/show_bug.cgi?id=108508 Reviewed by Simon Fraser. Enable CANVAS_PATH flag on trunk. * Configurations/FeatureDefines.xcconfig: 2013-02-20 Laszlo Gombos Remove unnecessary includes for Platform.h from headers https://bugs.webkit.org/show_bug.cgi?id=110300 Reviewed by Alexey Proskuryakov. wtf/Platform.h only need to be included in a few places directly as it is included in config.h. Remove the unnecessay duplicate as it can be confusing. * Shared/PrintInfo.h: 2013-02-20 Huang Dongsung [WK2] Remove m_viewportSize in WebPage. https://bugs.webkit.org/show_bug.cgi?id=110311 Reviewed by Anders Carlsson. EFL and Qt use m_viewSize as a contents size while Apple use it as a viewport size, so EFL and Qt introduced m_viewportSize to make WebPage know a viewport size. EFL and Qt use m_viewSize as a contents size because the size of non compositing layer is contents size, and EFL and Qt mark whole non compositing layer as dirty using m_viewSize. Bug 110299 (http://webkit.org/b/110299) changes that it is not necessary to know m_viewSize when marking whole non compositing layer as dirty. So we can make EFL and Qt use m_viewSize as a viewport size also. This patch removes m_viewportSize and related methods to increase readability. * UIProcess/API/qt/raw/qrawwebview.cpp: (QRawWebView::setSize): * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::didChangeViewportSize): * UIProcess/WebPageProxy.cpp: (WebKit): * UIProcess/WebPageProxy.h: (WebPageProxy): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::pageRect): (WebKit::WebChromeClient::contentsSizeChanged): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::updateBackingStoreState): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setSize): (WebKit::WebPage::sendViewportAttributesChanged): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPage.messages.in: 2013-02-20 Huang Dongsung [WK2] add setNeedsDisplay in DrawingArea to mark whole layer as dirty. https://bugs.webkit.org/show_bug.cgi?id=110299 Reviewed by Anders Carlsson. Currently, we call setNeedsDisplay with the size of WebPage to mark whole backing store as dirty. However, the size of non compositing layer can be inconsistent with the size of WebPage. For example, in Coordinated Graphics, the size of non compositing layer is contents size. So, WebPage should not assume the size of non compositing layer, and should just call setNeedsDisplay when marking whole layer as dirty. In addition, this patch renames from setNeedsDisplay() with a rect argument to setNeedsDisplayInRect(), which matches to the terms of GraphicsLayer. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::invalidateContentsAndRootView): (WebKit::WebChromeClient::invalidateContentsForSlowScroll): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::restoreViewState): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplay): (WebKit): (WebKit::CoordinatedLayerTreeHost::setNonCompositedContentsNeedDisplayInRect): (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (CoordinatedLayerTreeHost): * WebProcess/WebPage/DrawingArea.h: (DrawingArea): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::setNeedsDisplay): (WebKit): (WebKit::DrawingAreaImpl::setNeedsDisplayInRect): (WebKit::DrawingAreaImpl::scroll): (WebKit::DrawingAreaImpl::forceRepaint): (WebKit::DrawingAreaImpl::didUninstallPageOverlay): (WebKit::DrawingAreaImpl::setPageOverlayNeedsDisplay): (WebKit::DrawingAreaImpl::resumePainting): * WebProcess/WebPage/DrawingAreaImpl.h: (DrawingAreaImpl): * WebProcess/WebPage/LayerTreeHost.h: (LayerTreeHost): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setSize): (WebKit::WebPage::setDrawsBackground): (WebKit::WebPage::setDrawsTransparentBackground): (WebKit::WebPage::resumeActiveDOMObjectsAndAnimations): * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplay): (WebKit): (WebKit::LayerTreeHostGtk::setNonCompositedContentsNeedDisplayInRect): (WebKit::LayerTreeHostGtk::scrollNonCompositedContents): * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: (LayerTreeHostGtk): * WebProcess/WebPage/mac/LayerTreeHostMac.h: (LayerTreeHostMac): * WebProcess/WebPage/mac/LayerTreeHostMac.mm: (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplay): (WebKit): (WebKit::LayerTreeHostMac::setNonCompositedContentsNeedDisplayInRect): (WebKit::LayerTreeHostMac::scrollNonCompositedContents): * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: (RemoteLayerTreeDrawingArea): * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::setNeedsDisplay): (WebKit): (WebKit::RemoteLayerTreeDrawingArea::setNeedsDisplayInRect): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplay): (WebKit): (WebKit::TiledCoreAnimationDrawingArea::setNeedsDisplayInRect): 2013-02-20 Christophe Dumez [EFL][WK2] Port EwkPopupMenuItem to the C API https://bugs.webkit.org/show_bug.cgi?id=108798 Reviewed by Kenneth Rohde Christiansen. Make use of the new WKPopupItem C API inside EwkPopupMenuItem to remove dependency on internal WebPopupItem type. Eina shared string members are now lazily initialized to make the object cheaper to construct. * UIProcess/API/efl/ewk_popup_menu.cpp: (EwkPopupMenu::EwkPopupMenu): * UIProcess/API/efl/ewk_popup_menu_item.cpp: (EwkPopupMenuItem::EwkPopupMenuItem): (EwkPopupMenuItem::type): (EwkPopupMenuItem::textDirection): (EwkPopupMenuItem::text): (EwkPopupMenuItem::tooltipText): (EwkPopupMenuItem::accessibilityText): (EwkPopupMenuItem::hasTextDirectionOverride): (EwkPopupMenuItem::isEnabled): (EwkPopupMenuItem::isLabel): (EwkPopupMenuItem::isSelected): * UIProcess/API/efl/ewk_popup_menu_item_private.h: (EwkPopupMenuItem::create): (EwkPopupMenuItem): 2013-02-19 Tim Horton Clarify isInWindow vs. isVisible path through to RenderLayerCompositor https://bugs.webkit.org/show_bug.cgi?id=110261 Reviewed by Simon Fraser. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setIsInWindow): Use Page::setIsInWindow in addition to willMoveOffscreen/didMoveOnscreen. 2013-02-19 Conrad Shultz Allow UI clients to handle vertical wheel events. https://bugs.webkit.org/show_bug.cgi?id=110006 Reviewed by Tim Horton. Add API to allow clients to selectively control rubber-banding at vertical page extrema. * UIProcess/API/C/WKPage.cpp: (WKPageRubberBandsAtBottom): Proxy for the corresponding function in WebCore::Page. (WKPageSetRubberBandsAtBottom): Ditto. (WKPageRubberBandsAtTop): Ditto. (WKPageSetRubberBandsAtTop): Ditto. * UIProcess/API/C/WKPage.h: Declare new API. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): Initialize new member variables. (WebKit::WebPageProxy::setRubberBandsAtBottom): New function; dispatches a matching message to the WebKit::WebPage. (WebKit::WebPageProxy::setRubberBandsAtTop): Ditto. * UIProcess/WebPageProxy.h: (WebPageProxy): Declare new API. (WebKit::WebPageProxy::rubberBandsAtBottom): New accessor function. (WebKit::WebPageProxy::rubberBandsAtTop): Ditto. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setRubberBandsAtBottom): New function; call the matching function on the associated WebCore::Page. (WebKit::WebPage::setRubberBandsAtTop): Ditto. * WebProcess/WebPage/WebPage.h: (WebPage): Declare new rubber-banding API. * WebProcess/WebPage/WebPage.messages.in: Declare new rubber-banding API. 2013-02-19 Anders Carlsson StorageAreaProxy should know its quota https://bugs.webkit.org/show_bug.cgi?id=110268 Reviewed by Sam Weinig. Begin stubbing out StorageAreaProxy::setItem and add some quota member variables. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::StorageAreaProxy): (WebKit::StorageAreaProxy::setItem): * WebProcess/Storage/StorageAreaProxy.h: (StorageAreaProxy): * WebProcess/Storage/StorageNamespaceProxy.cpp: (WebKit::StorageNamespaceProxy::createSessionStorageNamespace): (WebKit::StorageNamespaceProxy::StorageNamespaceProxy): * WebProcess/Storage/StorageNamespaceProxy.h: (WebKit::StorageNamespaceProxy::quota): (StorageNamespaceProxy): 2013-02-19 Alexey Proskuryakov NetworkProcess generates timeout spindump logs Reviewed by Mark Rowe. Don't keep a window server connection in processes that don't need it, and don't run an NSApplication run loop. * Shared/ChildProcess.h: * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::shutdownWindowServerConnection): Added a function to shut down connections, and to make sure we don't get one in the future. * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::initializeProcessName): * OfflineStorageProcess/mac/OfflineStorageProcessMac.mm: (WebKit::OfflineStorageProcess::initializeProcessName): * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm: (WebKit::SharedWorkerProcess::platformInitializeSharedWorkerProcess): Also removed some unused includes and forward declarations. 2013-02-18 Alexey Proskuryakov [WK2] Cannot load documents with blob urls https://bugs.webkit.org/show_bug.cgi?id=110160 Reviewed by Sam Weinig. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::canHandleRequest): Added knowledge about blobs. 2013-02-19 Carlos Garcia Campos [GTK] Move the API to get TLS certificate from WebKitURIResponse to WebKitWebView https://bugs.webkit.org/show_bug.cgi?id=110190 Reviewed by Anders Carlsson. Add webkit_web_view_get_tls_info() and remove webkit_uri_response_get_https_status(). This way I can be sure that when called after load has been committed the certificate will be available. It also makes the API easier to use. * UIProcess/API/gtk/WebKitURIResponse.cpp: * UIProcess/API/gtk/WebKitURIResponse.h: * UIProcess/API/gtk/WebKitURIResponsePrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewLoadChanged): (mainResourceResponseChangedCallback): (webkit_web_view_get_tls_info): * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: * UIProcess/API/gtk/tests/TestSSL.cpp: 2013-02-19 Mikhail Pozdnyakov [WK2][EFL] Eliminate access to WK2 C++ internals from ewk_view functions https://bugs.webkit.org/show_bug.cgi?id=109794 Reviewed by Anders Carlsson. * UIProcess/API/C/efl/WKView.cpp: (WKViewSetShowsAsSource): (WKViewGetShowsAsSource): Added new WKView API to wrap WebPageProxy::setMainFrameInViewSourceMode() and WebPageProxy::mainFrameInViewSourceMode() calls. (WKViewExitFullScreen): Added new WKView API to wrap WebFullScreenManagerProxy::exitFullScreen() calls. * UIProcess/API/C/efl/WKView.h: * UIProcess/API/efl/EwkView.cpp: (EwkView::feedTouchEvent): Added feedTouchEvent() method so that: at first ewk_view_feed_touch_event() is not invoked from EwkView class, secondly ewk_view_feed_touch_event() does not access WebPage instance directly. (EwkView::feedTouchEvents): * UIProcess/API/efl/EwkView.h: (EwkView): * UIProcess/API/efl/ewk_view.cpp: (ewk_view_feed_touch_event): (ewk_view_pagination_mode_set): (ewk_view_pagination_mode_get): (ewk_view_fullscreen_exit): (ewkViewPageContentsCallback): (ewk_view_page_contents_get): (ewk_view_source_mode_set): (ewk_view_source_mode_get): Those are now using exported C API. * UIProcess/efl/WebView.cpp: (WebKit::WebView::setShowsAsSource): (WebKit): (WebKit::WebView::showsAsSource): (WebKit::WebView::exitFullScreen): * UIProcess/efl/WebView.h: (WebView): Added WebView methods to support added WKView API. 2013-02-19 Andras Becsi [Qt][WK2] ASSERT(node) hit in WebPage::findZoomableAreaForPoint if no zoomable area found https://bugs.webkit.org/show_bug.cgi?id=110220 Reviewed by Allan Sandfeld Jensen. If EventHandler::bestZoomableAreaForTouchPoint was unsuccessfull, eg. no node was found for a given point, we hit ASSERT(node). We should only assert for a valid node if a zoomable area was found. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::findZoomableAreaForPoint): 2013-02-19 Christophe Dumez Regression(r143273): Caused a lot of tests to time out https://bugs.webkit.org/show_bug.cgi?id=110212 Reviewed by Anders Carlsson. StorageManager::destroySessionStorageNamespace() and StorageManager::cloneSessionStorageNamespace() should call their respective "*Internal" equivalent instead of calling themselves. This lead to a lot of time outs on our build bots. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::destroySessionStorageNamespace): (WebKit::StorageManager::cloneSessionStorageNamespace): 2013-02-18 Carlos Garcia Campos [GTK] Remove webkit_web_view_get_subresources from WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=110125 Reviewed by Anders Carlsson. This API is currently implemented caching all resources in the WebView which causes some problems in documents loading resources indefinitely. This API was used in WebKit1 mainly to implement webkit_web_view_save(), but we already have such API in WebKit2. * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp: (didReceiveWebViewMessageFromInjectedBundle): * UIProcess/API/gtk/WebKitWebView.cpp: (_WebKitWebViewPrivate): (webkitWebViewLoadChanged): * UIProcess/API/gtk/WebKitWebView.h: * UIProcess/API/gtk/WebKitWebViewPrivate.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: * UIProcess/API/gtk/tests/TestResources.cpp: (testWebViewResources): (testWebResourceGetData): 2013-02-18 Christophe Dumez [WK2][EFL] Stop using internal C++ API in ewk_error https://bugs.webkit.org/show_bug.cgi?id=108796 Reviewed by Benjamin Poulain. Stop using internal C++ API in ewk_error and use C API instead of avoid violating API layering. * UIProcess/API/efl/ewk_error.cpp: (EwkError::domain): (EwkError::isCancellation): (ewk_error_type_get): * UIProcess/API/efl/ewk_error_private.h: (EwkError): 2013-02-18 Simon Fraser Clean up the boolean argument to visibleContentRect https://bugs.webkit.org/show_bug.cgi?id=110167 Reviewed by Simon Fraser. Replace the boolean argument to visibleContentRect() with an enum. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::visibleContentBounds): (WebKit::WebFrame::visibleContentBoundsExcludingScrollbars): 2013-02-18 Anders Carlsson Add a DefaultHash for RefPtr https://bugs.webkit.org/show_bug.cgi?id=110170 Reviewed by Andreas Kling. Remove all explicit uses of SecurityOriginHash. * UIProcess/Storage/StorageManager.cpp: (StorageManager::SessionStorageNamespace): * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: (WebKit::WebApplicationCacheManager::getApplicationCacheOrigins): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::originsWithApplicationCache): * WebProcess/Notifications/NotificationPermissionRequestManager.h: Include SecurityOriginHash.h. This fixes a bug where m_originToIDMap used pointer-equality for looking up security origins. * WebProcess/ResourceCache/WebResourceCacheManager.cpp: (WebKit::WebResourceCacheManager::clearCacheForOrigin): This can just take a const reference. * WebProcess/ResourceCache/WebResourceCacheManager.h: 2013-02-18 Anders Carlsson Begin stubbing out session storage classes https://bugs.webkit.org/show_bug.cgi?id=110168 Reviewed by Andreas Kling. * UIProcess/Storage/StorageManager.cpp: (StorageManager::StorageArea): (WebKit): (WebKit::StorageManager::StorageArea::create): (WebKit::StorageManager::StorageArea::StorageArea): (WebKit::StorageManager::StorageArea::~StorageArea): (StorageManager::SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::isEmpty): (WebKit::StorageManager::SessionStorageNamespace::create): (WebKit::StorageManager::SessionStorageNamespace::SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::~SessionStorageNamespace): (WebKit::StorageManager::SessionStorageNamespace::cloneTo): (WebKit::StorageManager::createSessionStorageNamespaceInternal): (WebKit::StorageManager::destroySessionStorageNamespaceInternal): (WebKit::StorageManager::cloneSessionStorageNamespaceInternal): * UIProcess/Storage/StorageManager.h: (StorageManager): 2013-02-18 Christophe Dumez [EFL][WK2] Add C API for popup menu and popup item https://bugs.webkit.org/show_bug.cgi?id=109083 Reviewed by Anders Carlsson. WK2 EFL delegates display of the popup menu to the browser which causes us to have a strong interdependency between internal C++ classes (WebPopupMenuProxyEfl, WebPopupItem) and our EFL API implementation (EwkView, EwkPopupMenu, EwkPopupMenuItem). Since we want to remove this interdependency, this patch introduces a for WebPopupMenuProxyEfl (WKPopupMenuListener) and for WebPopupItem (WKPopupItem). It also introduces a WKPage client with callbacks for showPopupMenu and hidePopupMenu. Note that the popup menu functionality is covered by ewk_popup_menu API tests and no functionality is lost. * PlatformEfl.cmake: Add new files to EFL CMake config. * Shared/API/c/efl/WKBaseEfl.h: Add typedefs for WKPopupItemRef and WKPopupMenuListenerRef. * Shared/APIObject.h: Add new TypePopupMenuItem APIObject type for EFL platform. * UIProcess/API/C/efl/WKAPICastEfl.h: Add mapping for WKPopupItemRef and WKPopupMenuListenerRef API types. (WebKit): (WebKit::toAPI): * UIProcess/API/C/efl/WKPageEfl.cpp: Added. (WKPageSetUIPopupMenuClient): Add new C API to set the UI Popup Menu client on the page. * UIProcess/API/C/efl/WKPageEfl.h: Added. * UIProcess/API/C/efl/WKPopupItem.cpp: Added. Add C API for WebPopupItem. (WKPopupItemGetType): (WKPopupItemGetTextDirection): (WKPopupItemHasTextDirectionOverride): (WKPopupItemCopyText): (WKPopupItemCopyToolTipText): (WKPopupItemCopyAccessibilityText): (WKPopupItemIsEnabled): (WKPopupItemIsLabel): (WKPopupItemIsSelected): * UIProcess/API/C/efl/WKPopupItem.h: Added. * UIProcess/API/C/efl/WKPopupMenuListener.cpp: Added. Add C API for WebPopupMenuListenerEfl (formerly WebPopupMenuProxyEfl) so that the client can report which popup menu item was selected. (WKPopupMenuListenerSetSelection): * UIProcess/API/C/efl/WKPopupMenuListener.h: Added. * UIProcess/API/efl/EwkView.cpp: Remove dependency on internal C++ types (WebPopupMenuProxyEfl and WebPopupItem) and use C API types instead. (EwkView::requestPopupMenu): * UIProcess/API/efl/EwkView.h: (WebKit): (EwkView): * UIProcess/API/efl/ewk_popup_menu.cpp: Use C API for Popup menu. (EwkPopupMenu::EwkPopupMenu): (EwkPopupMenu::setSelectedIndex): * UIProcess/API/efl/ewk_popup_menu_private.h: (EwkPopupMenu::create): (EwkPopupMenu): * UIProcess/WebPageProxy.cpp: Use WKPageUIPopupMenuClient to show / hide the popup menu on EFL port instead of asking the WebPopupMenuProxy. (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::showPopupMenu): (WebKit::WebPageProxy::hidePopupMenu): * UIProcess/WebPageProxy.h: Add new WKPageUIPopupMenuClient member and corresponding initialization method. (WebPageProxy): * UIProcess/WebPopupMenuProxy.h: Disable showPopupMenu / hidePopupMenu virtual methods on EFL port since we go via WKPageUIPopupMenuClient for this now. (WebPopupMenuProxy): * UIProcess/efl/PageUIClientEfl.cpp: (WebKit::PageUIClientEfl::PageUIClientEfl): Handle WKPageUIPopupMenuClient callbacks and call corresponding EwkView methods. Previously, the EwkView methods were called by the internal WebPageProxyEfl class which is no longer needed. (WebKit::PageUIClientEfl::showPopupMenu): (WebKit): (WebKit::PageUIClientEfl::hidePopupMenu): * UIProcess/efl/PageUIClientEfl.h: (PageUIClientEfl): * UIProcess/efl/WebPageProxyEfl.cpp: (WebKit::WebPageProxy::initializeUIPopupMenuClient): (WebKit): * UIProcess/efl/WebPopupItemEfl.cpp: Added. Add APIObject wrapper for WebPopupItem so that we can use it in WKPageUIPopupMenuClient. (WebKit): (WebKit::WebPopupItemEfl::WebPopupItemEfl): (WebKit::WebPopupItemEfl::~WebPopupItemEfl): * UIProcess/efl/WebPopupItemEfl.h: Added. (WebKit): (WebPopupItemEfl): (WebKit::WebPopupItemEfl::create): (WebKit::WebPopupItemEfl::data): (WebKit::WebPopupItemEfl::itemType): (WebKit::WebPopupItemEfl::text): (WebKit::WebPopupItemEfl::textDirection): (WebKit::WebPopupItemEfl::hasTextDirectionOverride): (WebKit::WebPopupItemEfl::toolTipText): (WebKit::WebPopupItemEfl::accessibilityText): (WebKit::WebPopupItemEfl::isEnabled): (WebKit::WebPopupItemEfl::isLabel): (WebKit::WebPopupItemEfl::isSelected): (WebKit::WebPopupItemEfl::type): * UIProcess/efl/WebPopupMenuListenerEfl.cpp: Renamed from Source/WebKit2/UIProcess/efl/WebPopupMenuProxyEfl.cpp. Use WebPopupMenuListenerEfl name instead of WebPopupMenuProxyEfl since it more accurately represents its functionality now. (WebKit): (WebKit::WebPopupMenuListenerEfl::WebPopupMenuListenerEfl): (WebKit::WebPopupMenuListenerEfl::valueChanged): * UIProcess/efl/WebPopupMenuListenerEfl.h: Renamed from Source/WebKit2/UIProcess/efl/WebPopupMenuProxyEfl.h. (WebKit): (WebPopupMenuListenerEfl): (WebKit::WebPopupMenuListenerEfl::create): * UIProcess/efl/WebUIPopupMenuClient.cpp: Added. (WebUIPopupMenuClient::showPopupMenu): (WebUIPopupMenuClient::hidePopupMenu): * UIProcess/efl/WebUIPopupMenuClient.h: Added. (WebKit): (WebUIPopupMenuClient): * UIProcess/efl/WebView.cpp: (WebKit::WebView::createPopupMenuProxy): 2013-02-18 Anders Carlsson Add StorageManager member functions for keeping track of session storage namespaces https://bugs.webkit.org/show_bug.cgi?id=110163 Reviewed by Andreas Kling. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::createSessionStorageNamespace): (WebKit): (WebKit::StorageManager::destroySessionStorageNamespace): (WebKit::StorageManager::cloneSessionStorageNamespace): (WebKit::StorageManager::createSessionStorageNamespaceInternal): (WebKit::StorageManager::destroySessionStorageNamespaceInternal): (WebKit::StorageManager::cloneSessionStorageNamespaceInternal): * UIProcess/Storage/StorageManager.h: (StorageManager): * UIProcess/WebContext.h: (WebKit::WebContext::storageManager): (WebContext): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::createNewPage): 2013-02-18 Anders Carlsson StorageManager message handlers should take the connection https://bugs.webkit.org/show_bug.cgi?id=110151 Reviewed by Andreas Kling. * Platform/CoreIPC/HandleMessage.h: (CoreIPC): (CoreIPC::callMemberFunction): (CoreIPC::handleMessage): * Scripts/webkit2/messages.py: (sync_message_statement): (generate_message_handler): * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::createStorageArea): (WebKit::StorageManager::destroyStorageArea): (WebKit::StorageManager::getValues): * UIProcess/Storage/StorageManager.h: (StorageManager): * UIProcess/Storage/StorageManager.messages.in: 2013-02-18 Christophe Dumez [EFL][WK2] Use C API inside ewk_security_origin https://bugs.webkit.org/show_bug.cgi?id=107923 Reviewed by Alexey Proskuryakov. Use C API inside ewk_security_origin instead of accessing directly internal C++ classes, to avoid breaking API layering. * UIProcess/API/efl/EwkView.cpp: (EwkView::enterFullScreen): * UIProcess/API/efl/ewk_security_origin.cpp: (EwkSecurityOrigin::EwkSecurityOrigin): * UIProcess/API/efl/ewk_security_origin_private.h: (EwkSecurityOrigin::create): (EwkSecurityOrigin): 2013-01-04 Jer Noble pinch-zooming webpage messes up full-screening of embedded video https://bugs.webkit.org/show_bug.cgi?id=106115 Reviewed by Maciej Stachowiak. Reset the page scale when entering full screen, and reset to the original scale when exiting. * UIProcess/mac/WKFullScreenWindowController.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController enterFullScreen:]): (-[WKFullScreenWindowController finishedExitFullScreenAnimation:]): 2013-02-18 Christophe Dumez [EFL][WK2] Disable failing API tests https://bugs.webkit.org/show_bug.cgi?id=110081 Reviewed by Kenneth Rohde Christiansen. Disable EWK2UnitTestBase.ewk_view_scale API test as it is failing. * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): 2013-02-15 Allan Sandfeld Jensen [Qt][WK2] Support WK2 API tests https://bugs.webkit.org/show_bug.cgi?id=109843 Reviewed by Jocelyn Turcotte. * UIProcess/API/qt/qquickwebview_p.h: (TestWebKitAPI): 2013-02-18 Andras Becsi [Qt][WK2] Changing WebView.contentY and WebView.contentX does not redraw content https://bugs.webkit.org/show_bug.cgi?id=108337 Reviewed by Jocelyn Turcotte. We should not ignore content position changes unless pinch zoom or bounce-back animation is ongoing. This way we notify the web process about visible rect changes if the contentX and contentY properties are used to programmatically scroll the content from QML. One important usecase for this is when implementing scrollbars. * UIProcess/qt/PageViewportControllerClientQt.cpp: (WebKit::PageViewportControllerClientQt::PageViewportControllerClientQt): (WebKit::PageViewportControllerClientQt::flickMoveStarted): (WebKit::PageViewportControllerClientQt::flickMoveEnded): (WebKit::PageViewportControllerClientQt::pageItemPositionChanged): (WebKit::PageViewportControllerClientQt::scaleAnimationStateChanged): (WebKit::PageViewportControllerClientQt::pinchGestureStarted): 2013-02-18 Grzegorz Czajkowski [WK2][EFL] Unified text checker implementation https://bugs.webkit.org/show_bug.cgi?id=107682 Reviewed by Anders Carlsson. * UIProcess/efl/TextCheckerEfl.cpp: (WebKit): (WebKit::nextWordOffset): Helper function to determine the word offset to do not call client's checkSpellingOfString for the word separators. (WebKit::TextChecker::checkTextOfParagraph): Allow to check spelling for multiple words, their misspelling location and length are saved to the vector. * WebProcess/WebCoreSupport/WebEditorClient.h: Add UNIFIED_TEXT_CHECKING guard to checkTextOfParagraph. * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: (WebKit): (WebKit::WebEditorClient::checkTextOfParagraph): As spelling implementation is exposed to UIProcess, send a meesage to UIProcess to call TextChecker::checkTextOfParagraph. 2013-02-18 Christophe Dumez [EFL][WK2] Refactor Ewk_Favicon code and stop relying on internal C++ API https://bugs.webkit.org/show_bug.cgi?id=108598 Reviewed by Kenneth Rohde Christiansen. Refactor the Ewk_Favicon code so that it no longer relies on internal C++ API and so that it is based solely on the C API. The API is changed a little as well so that the Favicon URL is no longer exposed to the client. Also the client is now only notified of icon changes once the favicon data is actually available. The API is covered by existing API tests and by MiniBrowser which are both updated accordingly in this patch. * UIProcess/API/efl/EwkView.cpp: (EwkView::informURLChange): (EwkView::createFavicon): (EwkView::onFaviconChanged): * UIProcess/API/efl/EwkView.h: (EwkView): * UIProcess/API/efl/EwkViewCallbacks.h: * UIProcess/API/efl/ewk_favicon_database.cpp: Client are now notified of favicon changes only when the favicon data becomes available and make API to retrieve a favicon synchronous. NULL is returned if the favicon data is not available. (EwkFaviconDatabase::EwkFaviconDatabase): (EwkFaviconDatabase::getIconSurfaceSynchronously): (EwkFaviconDatabase::iconDataReadyForPageURL): (ewk_favicon_database_icon_get): * UIProcess/API/efl/ewk_favicon_database.h: * UIProcess/API/efl/ewk_favicon_database_private.h: (EwkFaviconDatabase): * UIProcess/API/efl/ewk_view.cpp: (ewk_view_favicon_get): * UIProcess/API/efl/ewk_view.h: Rename 'icon,changed' signal to 'favicon,changed' for clarity and consistency with the rest of the favicon API. Remove API to retrieve the favicon URL and replace it by one to retrieve the favicon image as an Evas_Object instead. * UIProcess/API/efl/tests/test_ewk2_favicon_database.cpp: Update API tests to use the new favicon API. 2013-02-17 Jae Hyun Park Remove unnecessary public method DrawingAreaImpl::createGraphicsContext() https://bugs.webkit.org/show_bug.cgi?id=109893 Reviewed by Anders Carlsson. DrawingAreaImpl::createGraphicsContext() is unnecessary since createGraphicsContext can be called directly using ShareableBitmap. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::display): * WebProcess/WebPage/DrawingAreaImpl.h: (DrawingAreaImpl): 2013-02-17 Sudarsana Nagineni [WK2][EFL] Remove fullscreen manager proxy as a message receiver on invalidate() https://bugs.webkit.org/show_bug.cgi?id=109451 Reviewed by Anders Carlsson. Remove fullscreen manager proxy as a message receiver on invalidate(), like other ports do after r142160. * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp: (WebKit::WebFullScreenManagerProxy::invalidate): 2013-02-17 Christophe Dumez Regression(r143124): Caused plugins/plugin-javascript-access.html to fail https://bugs.webkit.org/show_bug.cgi?id=110053 Reviewed by Alexey Proskuryakov. Clear m_plugins in loadPluginsIfNecessary() before populating the vector again. We get duplicates otherwise. * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::PluginInfoStore::loadPluginsIfNecessary): 2013-02-16 Andreas Kling Remove multi-threading gunk from PluginInfoStore. Reviewed by Alexey Proskuryakov. PluginInfoStore is never accessed from multiple threads anymore, so remove the Mutex locking and stop making isolated copies of everything. * Shared/Plugins/PluginModuleInfo.h: (PluginModuleInfo): * UIProcess/Plugins/PluginInfoStore.cpp: (WebKit::PluginInfoStore::loadPluginsIfNecessary): (WebKit::PluginInfoStore::plugins): (WebKit::PluginInfoStore::findPluginForMIMEType): (WebKit::PluginInfoStore::findPluginForExtension): (WebKit::PluginInfoStore::findPlugin): (WebKit::PluginInfoStore::infoForPluginWithPath): * UIProcess/Plugins/PluginInfoStore.h: (PluginInfoStore): 2013-02-16 Sam Weinig Fix non-production builds. * WebKit2.xcodeproj/project.pbxproj: 2013-02-16 Sam Weinig The Plugin.32 target does not build https://bugs.webkit.org/show_bug.cgi?id=110032 Reviewed by Anders Carlsson. * PluginProcess/EntryPoint/mac/XPCService/PluginService.32/PluginService.32.Main.mm: Removed. This was meant to be removed already. * WebKit2.xcodeproj/project.pbxproj: Add Plugin.32 as dependency in All as it should be. 2013-02-16 Darin Adler Fix WKDOMRangePrivate.h mistakes https://bugs.webkit.org/show_bug.cgi?id=110028 Reviewed by Ryosuke Niwa. * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm: Added include of WKDOMRangePrivate.h. * WebProcess/InjectedBundle/API/mac/WKDOMRangePrivate.h: Fixed class name and include to be WKDOMRange. Fixed method name, _copyBundleRangeHandleRef, to match the name in the source file. 2013-02-15 Eric Carlson [Mac] remove wkCaptionAppearance from WebKitSystemInterface https://bugs.webkit.org/show_bug.cgi?id=109996 Reviewed by Simon Fraser. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2013-02-15 Sheriff Bot Unreviewed, rolling out r143088. http://trac.webkit.org/changeset/143088 https://bugs.webkit.org/show_bug.cgi?id=110000 Breaks the build (Requested by dgorbik on #webkit). * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2013-02-15 Kiran Muppala Disable sudden termination on Mac https://bugs.webkit.org/show_bug.cgi?id=109990 Reviewed by Mark Rowe. Sudden Termination is causing WebContent XPC services to be killed in response to memory pressure. Hence, disable it until we can identify if it is being enabled in error or not. * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::platformInitialize): Add call to [NSProcessInfo disableSuddenTermination]. 2013-02-15 Eric Carlson [Mac] remove wkCaptionAppearance from WebKitSystemInterface https://bugs.webkit.org/show_bug.cgi?id=109996 Reviewed by Simon Fraser. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2013-02-15 Adenilson Cavalcanti [Qt][WK2] Crash on window resize if WebProcess is closed/crashed https://bugs.webkit.org/show_bug.cgi?id=109216 Reviewed by Benjamin Poulain. Only make calls into DrawingAreaProxy pointer after checking its state. When the WebProcess was closed or crashed, WebKit::WebPageProxy will set its DrawingAreaProxy pointer to null. Resize events on UIProcess/client will try to access the object to update the geometry and forward this information into the WebProcess. This would create a crash scenario that is fixed by this patch. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::didRelaunchProcess): (QQuickWebViewLegacyPrivate::updateViewportSize): 2013-02-15 Anders Carlsson Add HashMap::isValidKey and HashSet::isValidValue https://bugs.webkit.org/show_bug.cgi?id=109977 Reviewed by Sam Weinig and Darin Adler. Just call HashMap::isValidKey directly. * UIProcess/WebProcessProxy.cpp: (WebKit::generatePageID): Initialize the id to 0 and use prefix increment. (WebKit::WebProcessProxy::webFrame): (WebKit::WebProcessProxy::canCreateFrame): (WebKit::WebProcessProxy::didDestroyFrame): 2013-02-15 Csaba Osztrogonác Typo fix after r143064. * Platform/CoreIPC/win/ConnectionWin.cpp: (CoreIPC::Connection::sendOutgoingMessage): 2013-02-15 Csaba Osztrogonác One more buildfix after r143052. * Platform/CoreIPC/win/ConnectionWin.cpp: (CoreIPC::Connection::sendOutgoingMessage): 2013-02-15 Csaba Osztrogonác Unreviewed buildfix after r143052 for Qt/GTK/EFL ports. * Platform/unix/SharedMemoryUnix.cpp: (WebKit::SharedMemory::Handle::encode): * Platform/win/SharedMemoryWin.cpp: (WebKit::SharedMemory::Handle::encode): * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::encode): * Shared/WebBatteryStatus.cpp: (WebKit::WebBatteryStatus::Data::encode): * Shared/WebNetworkInfo.cpp: (WebKit::WebNetworkInfo::Data::encode): * Shared/efl/LayerTreeContextEfl.cpp: (WebKit::LayerTreeContext::encode): * Shared/gtk/LayerTreeContextGtk.cpp: (WebKit::LayerTreeContext::encode): * Shared/qt/LayerTreeContextQt.cpp: (WebKit::LayerTreeContext::encode): * Shared/qt/QtNetworkReplyData.cpp: (WebKit::QtNetworkReplyData::encode): * Shared/qt/QtNetworkRequestData.cpp: (WebKit::QtNetworkRequestData::encode): * Shared/soup/PlatformCertificateInfo.cpp: (WebKit::PlatformCertificateInfo::encode): 2013-02-15 Anders Carlsson Make most ArgumentEncoder::encode member functions private https://bugs.webkit.org/show_bug.cgi?id=109973 Reviewed by Sam Weinig. Make the encode overloads private; the stream operator should be used instead. * Platform/CoreIPC/ArgumentEncoder.h: (ArgumentEncoder): * Platform/CoreIPC/Arguments.h: (CoreIPC::Arguments1::encode): (CoreIPC::Arguments2::encode): (CoreIPC::Arguments3::encode): (CoreIPC::Arguments4::encode): (CoreIPC::Arguments5::encode): (CoreIPC::Arguments6::encode): (CoreIPC::Arguments7::encode): (CoreIPC::Arguments8::encode): (CoreIPC::Arguments10::encode): * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::createSyncMessageEncoder): * Platform/CoreIPC/MessageEncoder.cpp: (CoreIPC::MessageEncoder::MessageEncoder): * Scripts/webkit2/messages.py: (generate_message_handler): * Scripts/webkit2/messages_unittest.py: * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::encode): * WebProcess/WebPage/EncoderAdapter.cpp: (WebKit::EncoderAdapter::EncoderAdapter): (WebKit::EncoderAdapter::encodeBytes): (WebKit::EncoderAdapter::encodeBool): (WebKit::EncoderAdapter::encodeUInt16): (WebKit::EncoderAdapter::encodeUInt32): (WebKit::EncoderAdapter::encodeUInt64): (WebKit::EncoderAdapter::encodeInt32): (WebKit::EncoderAdapter::encodeInt64): (WebKit::EncoderAdapter::encodeFloat): (WebKit::EncoderAdapter::encodeDouble): (WebKit::EncoderAdapter::encodeString): 2013-02-15 Anders Carlsson Add a synchronous GetValues message to StorageManager https://bugs.webkit.org/show_bug.cgi?id=109968 Reviewed by Sam Weinig. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::dispatchWorkQueueMessageReceiverMessage): Handle synchronous messages. (CoreIPC::Connection::processIncomingMessage): Check for work queue message receivers before doing any other processing. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::getValues): Add empty stub. * UIProcess/Storage/StorageManager.h: * UIProcess/Storage/StorageManager.messages.in: Add GetValues message. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::loadValuesIfNeeded): Send the GetValues message. 2013-02-15 Anders Carlsson A storage area should know its storage type https://bugs.webkit.org/show_bug.cgi?id=109964 Reviewed by Andreas Kling. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::StorageAreaProxy): (WebKit::StorageAreaProxy::disabledByPrivateBrowsingInFrame): * WebProcess/Storage/StorageAreaProxy.h: (StorageAreaProxy): * WebProcess/Storage/StorageNamespaceProxy.cpp: (WebKit::StorageNamespaceProxy::storageType): (WebKit): * WebProcess/Storage/StorageNamespaceProxy.h: (StorageNamespaceProxy): 2013-02-15 Anders Carlsson Implement StorageAreaProxy::length https://bugs.webkit.org/show_bug.cgi?id=109962 Reviewed by Andreas Kling. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::length): Load the values if needed and then return the length. (WebKit::StorageAreaProxy::disabledByPrivateBrowsingInFrame): Add helper function. (WebKit::StorageAreaProxy::loadValuesIfNeeded): Just allocate the hash map for now. * WebProcess/Storage/StorageAreaProxy.h: (StorageAreaProxy): 2013-02-15 Anders Carlsson Remove const from a bunch of StorageArea member functions https://bugs.webkit.org/show_bug.cgi?id=109957 Reviewed by Beth Dakin. Update for WebCore changes. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::length): (WebKit::StorageAreaProxy::key): (WebKit::StorageAreaProxy::getItem): (WebKit::StorageAreaProxy::contains): (WebKit::StorageAreaProxy::canAccessStorage): (WebKit::StorageAreaProxy::memoryBytesUsedByCache): * WebProcess/Storage/StorageAreaProxy.h: (StorageAreaProxy): 2013-02-15 Sudarsana Nagineni [EFL][WK2] Use C API inside BatteryProvider and NetworkInfoProvider https://bugs.webkit.org/show_bug.cgi?id=107821 Reviewed by Anders Carlsson. BatteryProvider and NetworkInfoProvider should use C API instead of accessing the internal C++ classes directly. * UIProcess/API/efl/ewk_context.cpp: (EwkContext::EwkContext): * UIProcess/efl/BatteryProvider.cpp: (BatteryProvider::~BatteryProvider): (BatteryProvider::create): (BatteryProvider::BatteryProvider): (BatteryProvider::didChangeBatteryStatus): * UIProcess/efl/BatteryProvider.h: (BatteryProvider): * UIProcess/efl/NetworkInfoProvider.cpp: (NetworkInfoProvider::create): (NetworkInfoProvider::NetworkInfoProvider): (NetworkInfoProvider::~NetworkInfoProvider): * UIProcess/efl/NetworkInfoProvider.h: (NetworkInfoProvider): 2013-02-15 Mikhail Pozdnyakov [WK2][EFL]REGRESSION (r141978): ewk_view_type_check api test failing https://bugs.webkit.org/show_bug.cgi?id=109038 Reviewed by Anders Carlsson. EFL API is defensive by its nature and expects graceful handling of wrong function arguments whereas webkit implementation code does not. This patch adds new 'toEwkViewChecked' function, which provides handling of wrong arguments, to be used within EFL API layer code. * UIProcess/API/efl/EwkView.cpp: (toEwkView): EwkView* toEwkView(const Ewk_View_Smart_Data* smartData) is not exported anymore as it's used within EwkView class only. (EwkView::handleTouchMove): * UIProcess/API/efl/EwkView.h: * UIProcess/API/efl/ewk_view.cpp: (toEwkViewChecked): 2013-02-15 Christophe Dumez [EFL][WK2] Have WebView subclass PageClient https://bugs.webkit.org/show_bug.cgi?id=109684 Reviewed by Anders Carlsson. Stop constructing the PageClient in EwkView. PageClient is an internal class and we should not use it directly in our Ewk implementation. Instead, have WebView subclass PageClient. The PageClient implementation just calls WebView methods otherwise. * PlatformEfl.cmake: * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): (EwkView::setSize): * UIProcess/API/efl/EwkView.h: (WebKit): (EwkView): (EwkView::webView): * UIProcess/API/efl/ewk_view.cpp: * UIProcess/efl/PageClientBase.cpp: Removed. * UIProcess/efl/PageClientBase.h: Removed. * UIProcess/efl/PageClientDefaultImpl.cpp: Removed. * UIProcess/efl/PageClientDefaultImpl.h: Removed. * UIProcess/efl/PageClientLegacyImpl.cpp: Removed. * UIProcess/efl/PageClientLegacyImpl.h: Removed. * UIProcess/efl/PageLoadClientEfl.cpp: (WebKit::PageLoadClientEfl::didCommitLoadForFrame): * UIProcess/efl/PageViewportControllerClientEfl.h: * UIProcess/efl/WebPageProxyEfl.cpp: (WebKit::WebPageProxy::viewWidget): * UIProcess/efl/WebView.cpp: (WebKit::WebView::WebView): (WebKit::WebView::~WebView): (WebKit::WebView::initialize): (WebKit): (WebKit::WebView::evasObject): (WebKit::WebView::setThemePath): (WebKit::WebView::setDrawsBackground): (WebKit::WebView::drawsBackground): (WebKit::WebView::setDrawsTransparentBackground): (WebKit::WebView::drawsTransparentBackground): (WebKit::WebView::suspendActiveDOMObjectsAndAnimations): (WebKit::WebView::resumeActiveDOMObjectsAndAnimations): (WebKit::WebView::didCommitLoad): (WebKit::WebView::updateViewportSize): (WebKit::WebView::didChangeContentsSize): (WebKit::WebView::createDrawingAreaProxy): (WebKit::WebView::setViewNeedsDisplay): (WebKit::WebView::displayView): (WebKit::WebView::scrollView): (WebKit::WebView::viewSize): (WebKit::WebView::isViewWindowActive): (WebKit::WebView::isViewFocused): (WebKit::WebView::isViewVisible): (WebKit::WebView::isViewInWindow): (WebKit::WebView::processDidCrash): (WebKit::WebView::didRelaunchProcess): (WebKit::WebView::pageClosed): (WebKit::WebView::toolTipChanged): (WebKit::WebView::setCursor): (WebKit::WebView::setCursorHiddenUntilMouseMoves): (WebKit::WebView::registerEditCommand): (WebKit::WebView::clearAllEditCommands): (WebKit::WebView::canUndoRedo): (WebKit::WebView::executeUndoRedo): (WebKit::WebView::screenToWindow): (WebKit::WebView::windowToScreen): (WebKit::WebView::doneWithKeyEvent): (WebKit::WebView::doneWithTouchEvent): (WebKit::WebView::createPopupMenuProxy): (WebKit::WebView::createContextMenuProxy): (WebKit::WebView::createColorChooserProxy): (WebKit::WebView::setFindIndicator): (WebKit::WebView::enterAcceleratedCompositingMode): (WebKit::WebView::exitAcceleratedCompositingMode): (WebKit::WebView::updateAcceleratedCompositingMode): (WebKit::WebView::didCommitLoadForMainFrame): (WebKit::WebView::didFinishLoadingDataForCustomRepresentation): (WebKit::WebView::customRepresentationZoomFactor): (WebKit::WebView::setCustomRepresentationZoomFactor): (WebKit::WebView::flashBackingStoreUpdates): (WebKit::WebView::findStringInCustomRepresentation): (WebKit::WebView::countStringMatchesInCustomRepresentation): (WebKit::WebView::updateTextInputState): (WebKit::WebView::handleDownloadRequest): (WebKit::WebView::convertToDeviceSpace): (WebKit::WebView::convertToUserSpace): (WebKit::WebView::didChangeViewportProperties): (WebKit::WebView::pageDidRequestScroll): (WebKit::WebView::didRenderFrame): (WebKit::WebView::pageTransitionViewportReady): * UIProcess/efl/WebView.h: (WebKit): (WebView): (WebKit::WebView::pageRef): (WebKit::WebView::page): (WebKit::WebView::canScrollView): 2013-02-15 Milian Wolff [Qt] Restore URL Scheme Delegates after QtWebProcess crash https://bugs.webkit.org/show_bug.cgi?id=108808 When the QtWebProcess crashes, the registered URL Scheme Delegates are not properly restored over IPC in the newly launched process instance. Reviewed by Simon Hausmann. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::didRelaunchProcess): (QQuickWebViewPrivate::updateSchemeDelegates): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): 2013-02-15 Allan Sandfeld Jensen Simplify hitTestResultAtPoint and nodesFromRect APIs https://bugs.webkit.org/show_bug.cgi?id=95720 Reviewed by Julien Chaffraix and Maciej Stachowiak. Update calls to new API and update exported symbols. * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::hitTest): * WebProcess/WebPage/WebPage.cpp: (WebKit::handleContextMenuEvent): (WebKit::WebPage::highlightPotentialActivation): (WebKit::WebPage::findZoomableAreaForPoint): * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::characterIndexForPoint): (WebKit::WebPage::performDictionaryLookupAtLocation): (WebKit::WebPage::shouldDelayWindowOrderingEvent): (WebKit::WebPage::acceptsFirstMouse): 2013-02-14 Huang Dongsung [WK2] Rename from scrollOffset to scrollDelta in WebChromeClient. https://bugs.webkit.org/show_bug.cgi?id=109885 Reviewed by Simon Fraser. Chrome sends a scroll delta to WebChromeClient but WebChromeClient names it scrollOffset. So this patch corrects this misnaming. In addition, all subclasses of LayerTreeHost don't use the misnamed scrollOffset in scrollNonCompositedContents(), so this patch removes the scrollOffset argument. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::scroll): * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::scrollNonCompositedContents): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (CoordinatedLayerTreeHost): * WebProcess/WebPage/DrawingArea.h: (DrawingArea): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::scroll): * WebProcess/WebPage/DrawingAreaImpl.h: (DrawingAreaImpl): * WebProcess/WebPage/LayerTreeHost.h: (LayerTreeHost): * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::scrollNonCompositedContents): * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: (LayerTreeHostGtk): * WebProcess/WebPage/mac/LayerTreeHostMac.h: (LayerTreeHostMac): * WebProcess/WebPage/mac/LayerTreeHostMac.mm: (WebKit::LayerTreeHostMac::scrollNonCompositedContents): * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.h: (RemoteLayerTreeDrawingArea): * WebProcess/WebPage/mac/RemoteLayerTreeDrawingArea.mm: (WebKit::RemoteLayerTreeDrawingArea::scroll): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::scroll): 2013-02-14 Alexey Proskuryakov REGRESSION: Safari is unable to make SSL connections when running from recovery partition Reviewed by Sam Weinig. * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: * WebProcess/com.apple.WebProcess.sb.in: Re-added /private/var/db/mds/system rules lost in r141445. 2013-02-14 Anders Carlsson Add WKContextIsPlugInUpdateAvailable https://bugs.webkit.org/show_bug.cgi?id=109862 Reviewed by Sam Weinig. * UIProcess/API/C/mac/WKContextPrivateMac.h: * UIProcess/API/C/mac/WKContextPrivateMac.mm: Renamed from Source/WebKit2/UIProcess/API/C/mac/WKContextPrivateMac.cpp. (WKContextGetProcessSuppressionEnabled): (WKContextSetProcessSuppressionEnabled): (WKContextIsPlugInUpdateAvailable): * WebKit2.xcodeproj/project.pbxproj: 2013-02-14 Zan Dobersek [GTK] Errors when building WebKit2 with Clang https://bugs.webkit.org/show_bug.cgi?id=109603 Reviewed by Alexey Proskuryakov. * UIProcess/API/gtk/WebKitUIClient.cpp: (setWindowFrame): Cast the position parameters to the integer type when constructing the GdkRectangle. * UIProcess/Authentication/WebCredential.cpp: Add an empty implementation of the newly specified destructor. * UIProcess/Authentication/WebCredential.h: Work around the incomplete WebCertificateInfo type errors thrown in the inline RefPtr destructor of the m_certificateInfo class member by defining a destructor in the class. * WebProcess/WebCoreSupport/WebEditorClient.h: The GTK-specific methods are not virtual and as such cannot be overriden. The OVERRIDE keywords are thus unnecessary. 2013-02-14 David Kilzer [Mac] Clean up WARNING_CFLAGS Reviewed by Mark Rowe. * Configurations/Base.xcconfig: Use GCC_WARN_64_TO_32_BIT_CONVERSION to enable and disable -Wshorten-64-to-32 rather than WARNING_CFLAGS. 2013-02-14 Sam Weinig Add conversions between ObjC and C DOM wrappers https://bugs.webkit.org/show_bug.cgi?id=109851 Reviewed by Anders Carlsson. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/InjectedBundle/API/c/WKBundleRangeHandle.cpp: (WKBundleRangeHandleCreate): * WebProcess/InjectedBundle/API/c/WKBundleRangeHandlePrivate.h: Added. * WebProcess/InjectedBundle/API/mac/WKDOMNode.mm: (-[WKDOMNode _copyBundleNodeHandleRef]): * WebProcess/InjectedBundle/API/mac/WKDOMNodePrivate.h: Added. * WebProcess/InjectedBundle/API/mac/WKDOMRange.mm: (-[WKDOMRange _copyBundleRangeHandleRef]): * WebProcess/InjectedBundle/API/mac/WKDOMRangePrivate.h: Added. * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.cpp: (WebKit::InjectedBundleRangeHandle::getOrCreate): * WebProcess/InjectedBundle/DOM/InjectedBundleRangeHandle.h: (InjectedBundleRangeHandle): 2013-02-13 Anders Carlsson Remove StringPairVector https://bugs.webkit.org/show_bug.cgi?id=109778 Reviewed by Ryosuke Niwa. Our message generation scripts can handle nested template parameter types now, so we no longer need to use StringPairVector. * Shared/StringPairVector.h: Removed. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::willSubmitForm): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchWillSubmitForm): 2013-02-13 Dean Jackson PlugIn Autostart should expire in 30 days, not half a day https://bugs.webkit.org/show_bug.cgi?id=109767 Reviewed by Brian Weinstein. We forgot to multiply by 60 seconds in a minute. * UIProcess/Plugins/PlugInAutoStartProvider.cpp: 2013-02-13 Anders Carlsson Message generation should handle nested templates https://bugs.webkit.org/show_bug.cgi?id=109771 Reviewed by Ryosuke Niwa. Make it possible to have nested class template types as message parameters and correctly gather all the needed headers and argument coder headers. * Scripts/webkit2/messages.py: (class_template_headers): Recursively figure out the types and template headers needed for a given type. (argument_coder_headers_for_type): (headers_for_type): Call class_template_headers. * Scripts/webkit2/messages_unittest.py: (CoreIPC): * Scripts/webkit2/parser.py: (split_parameters_string): (parse_parameters_string): 2013-02-13 David Farler Make WebKit2 Derived Sources work with SDK identifiers too https://bugs.webkit.org/show_bug.cgi?id=109763 Reviewed by David Kilzer. * WebKit2.xcodeproj/project.pbxproj: Pass SDKROOT=${SDKROOT} to DerivedSources.make 2013-02-13 Csaba Osztrogonác One more buildfix for !ENABLE(PLUGIN_PROCESS) platforms. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): 2013-02-13 Csaba Osztrogonác Unreviewed Qt-Mac and Qt-Win buildfix after r142768. * WebProcess/WebProcess.h: (WebKit): 2013-02-13 Adam Barth Remove bogus ASSERT in WebFrameProxy::didStartProvisionalLoad https://bugs.webkit.org/show_bug.cgi?id=109733 Reviewed by Sam Weinig. After http://trac.webkit.org/changeset/142555, this ASSERT is triggering on these tests: fast/dom/window-load-crash.html fast/frames/seamless/seamless-hyperlink-named.html fast/frames/seamless/seamless-hyperlink.html The ASSERT appears to be bogus. This patch removes it. * UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::didStartProvisionalLoad): 2013-02-13 Sam Weinig Consolidate main functions in WebKit2 now that they are all identical https://bugs.webkit.org/show_bug.cgi?id=109748 Reviewed by Anders Carlsson. - Consolidates all the LegacyProcess main functions into ChildProcessMain.mm - Consolidates all the XPCService main functions into XPCServiceMain.mm and XPCServiceMain.Development.mm - Rename existing ChildProcessMain.h/mm to ChildProcessEntryPoint.h/mm to match the XPCService ones. - Switch LegacyProcess to use the "entry point in the plist" idiom, instead of hard coding each one, again matching the XPCService. * Configurations/BaseLegacyProcess.xcconfig: Add base configuration to hold common legacy process options. * Configurations/BaseXPCService.xcconfig: * Configurations/NetworkProcess.xcconfig: * Configurations/OfflineStorageProcess.xcconfig: * Configurations/PluginProcess.xcconfig: * Configurations/SharedWorkerProcess.xcconfig: * Configurations/WebContentProcess.xcconfig: Renamed form WebProcess.xcconfig. * NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist: * NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm: * NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMainBootstrapper.cpp: Removed. * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/NetworkServiceMain.Development.mm: Removed. * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm: Removed. * OfflineStorageProcess/EntryPoint/mac/LegacyProcess/Info.plist: * OfflineStorageProcess/EntryPoint/mac/LegacyProcess/OfflineStorageProcessMain.mm: * OfflineStorageProcess/EntryPoint/mac/LegacyProcess/OfflineStorageProcessMainBootstrapper.cpp: Removed. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development/OfflineStorageServiceMain.Development.mm: Removed. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService/OfflineStorageServiceMain.mm: Removed. * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist: * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm: * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMainBootstrapper.cpp: Removed. * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/PluginService.64.Main.mm: Removed. * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/PluginService.Development.Main.mm: Removed. * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.h: * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessEntryPoint.mm: * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.h: Removed. * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm: Replaced. * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMainBootstrapper.h: Removed. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.Development.h: Removed. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.h: Removed. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.Development.mm: * Shared/EntryPointUtilities/mac/XPCService/XPCServiceMain.mm: * SharedWorkerProcess/EntryPoint/mac/LegacyProcess/Info.plist: * SharedWorkerProcess/EntryPoint/mac/LegacyProcess/SharedWorkerProcessMain.mm: * SharedWorkerProcess/EntryPoint/mac/LegacyProcess/SharedWorkerProcessMainBootstrapper.cpp: Removed. * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist: * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMainBootstrapper.cpp: Removed. * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm: Removed. * WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm: Removed. * WebKit2.xcodeproj/project.pbxproj: 2013-02-13 Christophe Dumez [EFL][WK2] Stop using WebString in ewk_cookie_manager, ewk_form_submission_request and ewk_text_checker https://bugs.webkit.org/show_bug.cgi?id=108794 Reviewed by Alexey Proskuryakov. Stop using WebString in ewk_cookie_manager, ewk_form_submission_request and ewk_text_checker as it is internal C++ API. WKString and WKEinaSharedString are used instead. * UIProcess/API/cpp/efl/WKEinaSharedString.cpp: (WKEinaSharedString::leakString): Add leakString() method to WKEinaSharedString so that we can conveniently convert a WKString to a Eina shared string and take ownership of it. * UIProcess/API/cpp/efl/WKEinaSharedString.h: * UIProcess/API/efl/ewk_cookie_manager.cpp: (getHostnamesWithCookiesCallback): * UIProcess/API/efl/ewk_form_submission_request.cpp: (EwkFormSubmissionRequest::copyFieldValue): (ewk_form_submission_request_field_names_get): (ewk_form_submission_request_field_value_get): * UIProcess/API/efl/ewk_form_submission_request_private.h: (EwkFormSubmissionRequest): * UIProcess/API/efl/ewk_text_checker.cpp: (checkSpellingOfString): (guessesForWord): (learnWord): (ignoreWord): * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp: (TEST_F): Add API test for new WKEinaSharedString::leakString() method. 2013-02-13 Anders Carlsson Remove Connection::QueueClient https://bugs.webkit.org/show_bug.cgi?id=109744 Reviewed by Sam Weinig. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::processIncomingMessage): (CoreIPC::Connection::connectionDidClose): * Platform/CoreIPC/Connection.h: (Connection): 2013-02-13 Anders Carlsson Try to fix the Lion build. * WebProcess/WebPage/EventDispatcher.h: (EventDispatcher): 2013-02-13 Anders Carlsson Remove support for the DispatchOnConnectionQueue message attribute https://bugs.webkit.org/show_bug.cgi?id=109743 Reviewed by Sam Weinig. * Platform/CoreIPC/HandleMessage.h: (CoreIPC): * Scripts/webkit2/messages.py: (handler_function): (generate_message_handler): * Scripts/webkit2/messages_unittest.py: 2013-02-13 Anders Carlsson StorageManager should be a WorkQueueMessageReceiver https://bugs.webkit.org/show_bug.cgi?id=109741 Reviewed by Sam Weinig. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::processWillOpenConnection): (WebKit::StorageManager::processWillCloseConnection): (WebKit::StorageManager::createStorageArea): (WebKit::StorageManager::destroyStorageArea): * UIProcess/Storage/StorageManager.h: (StorageManager): * UIProcess/Storage/StorageManager.messages.in: 2013-02-13 Anders Carlsson EventDispatcher should be a WorkQueueMessageReceiver https://bugs.webkit.org/show_bug.cgi?id=109736 Reviewed by Andreas Kling. * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::create): (WebKit): (WebKit::EventDispatcher::EventDispatcher): (WebKit::EventDispatcher::initializeConnection): (WebKit::EventDispatcher::wheelEvent): (WebKit::EventDispatcher::gestureEvent): * WebProcess/WebPage/EventDispatcher.h: (EventDispatcher): * WebProcess/WebPage/EventDispatcher.messages.in: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::initializeConnection): * WebProcess/WebProcess.h: (WebKit): (WebKit::WebProcess::eventDispatcher): (WebProcess): 2013-02-13 Christophe Dumez Unreviewed build fix after r142768. r142768 broke the EFL WK2 build due to wrong member initialization order in the WebProcess constructor initialization list. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): 2013-02-13 Anders Carlsson Make PluginProcessConnectionManager a WorkQueueMessageReceiver https://bugs.webkit.org/show_bug.cgi?id=109727 Reviewed by Andreas Kling. * WebProcess/Plugins/PluginProcessConnectionManager.cpp: (WebKit::PluginProcessConnectionManager::create): (WebKit): (WebKit::PluginProcessConnectionManager::PluginProcessConnectionManager): (WebKit::PluginProcessConnectionManager::initializeConnection): (WebKit::PluginProcessConnectionManager::pluginProcessCrashed): * WebProcess/Plugins/PluginProcessConnectionManager.h: (PluginProcessConnectionManager): * WebProcess/Plugins/PluginProcessConnectionManager.messages.in: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::initializeConnection): (WebKit::WebProcess::pluginProcessConnectionManager): * WebProcess/WebProcess.h: (WebKit): (WebProcess): 2013-02-13 Anders Carlsson Make SecItemShimProxy be a WorkQueueMessageReceiver https://bugs.webkit.org/show_bug.cgi?id=109719 Reviewed by Sam Weinig. This adds a WantsConnection message attribute to be used for messages whose handlers should take the connection the message was delivered to. * Platform/CoreIPC/HandleMessage.h: (CoreIPC::handleMessage): Add new handleMessage overload. * Scripts/webkit2/messages.py: (async_message_statement): (generate_message_handler): Handle the WantsMessage attribute. * UIProcess/mac/SecItemShimProxy.cpp: (WebKit::SecItemShimProxy::shared): Use dispatch_once and adoptRef. (WebKit::SecItemShimProxy::SecItemShimProxy): Initialize the queue. (WebKit::SecItemShimProxy::initializeConnection): Add the proxy as a work queue message receiver. (WebKit::SecItemShimProxy::secItemRequest): This no longer needs to call out to a dispatch queue, it's already on a queue. * UIProcess/mac/SecItemShimProxy.messages.in: This doesn't need to be a legacy receiver. Also, add the WantsConnection message. 2013-02-13 Sheriff Bot Unreviewed, rolling out r142736. http://trac.webkit.org/changeset/142736 https://bugs.webkit.org/show_bug.cgi?id=109716 Broke ABI, nightly builds crash on launch (Requested by ap on #webkit). * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * UIProcess/API/C/WKPage.h: * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/qt/QtBuiltinBundlePage.cpp: (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): 2013-02-13 Kenneth Rohde Christiansen [WK2][EFL] Cleanup of graphics related code in EwkView https://bugs.webkit.org/show_bug.cgi?id=109377 Reviewed by Anders Carlsson. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): Initialize the evasGL dependencies here and set m_isAccelerated to false if this fails. Set the coordinated graphics scene as active when using fixed layout. (EwkView::setSize): Add a method to set the size and user-viewport transform from the outside. The idea is moving this to our pure WK C API in the future. (EwkView::transformFromScene): (EwkView::transformToScene): Update the transform methods to use the user- viewport transform. (EwkView::paintToCurrentGLContext): (EwkView::paintToCairoSurface): Add methods to paint to either the current GL context or to a given cairo_surface_t (for software fallback cases). (EwkView::displayTimerFired): Clean up and use the two above methods. (EwkView::scheduleUpdateDisplay): Use the new size() methods instead of using the smart-object data directly. (EwkView::createGLSurface): Make this method use size() to query the surface size and avoid creating the context (done in ctor now). Also avoid using the smart-object data directly. (EwkView::enterAcceleratedCompositingMode): (EwkView::exitAcceleratedCompositingMode): Turn on/off the use of the coord. graphics scene. (EwkView::handleEvasObjectCalculate): Use the new setSize and setUserViewportTransform. (EwkView::takeSnapshot): * UIProcess/API/efl/EwkView.h: (WebCore): (EwkView): (EwkView::size): (EwkView::setUserViewportTransform): (EwkView::userViewportTransform): Add the new method definitions and rename isHardwareAccelerated to isAccelerated which fits better with the naming in WebCore. 2013-02-13 Christophe Dumez [EFL][WK2] Introduce WKViewClient C API https://bugs.webkit.org/show_bug.cgi?id=109559 Reviewed by Anders Carlsson. This patch introduces the WKViewClient C API for EFL's WKView. The purpose of this new C API is to eventually remove the interdependency between EFL's PageClient and EwkView. When completed, PageClient should only interact with WebView and not be aware of EwkView so that we have a clean separation between internal WebKit2 classes and our EFL Ewk API implementation. This patch is only a first step towards this goal as there is a lot of work to do to achieve complete separation between EwkView and PageClient. The purpose of this patch is to introduce the needed architecture which will later be extended by introducing new WKViewClient callbacks. * PlatformEfl.cmake: Add new ViewClientEfl.cpp and WebViewClient.cpp to EFL's CMake configuration. * UIProcess/API/C/efl/WKView.cpp: (WKViewSetViewClient): * UIProcess/API/C/efl/WKView.h: Introduce new WKViewClient C API. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): Initialize ViewClientEfl. * UIProcess/API/efl/EwkView.h: Add new ViewClientEfl member. (WebKit): (EwkView): * UIProcess/API/efl/EwkViewCallbacks.h: Update ContentsSizeChanged smart callback to accept a WKSize in parameter instead of an IntRect. * UIProcess/efl/PageClientBase.cpp: Start calling WKViewClient callbacks instead of interacting directly with EwkView to avoid violating API layering. (WebKit::PageClientBase::view): (WebKit::PageClientBase::setViewNeedsDisplay): * UIProcess/efl/PageClientBase.h: (WebKit): (PageClientBase): * UIProcess/efl/PageClientDefaultImpl.cpp: Start calling WKViewClient callbacks instead of interacting directly with EwkView to avoid violating API layering. (WebKit::PageClientDefaultImpl::didChangeContentsSize): * UIProcess/efl/PageClientLegacyImpl.cpp: Start calling WKViewClient callbacks instead of interacting directly with EwkView to avoid violating API layering. (WebKit::PageClientLegacyImpl::didChangeContentsSize): * UIProcess/efl/ViewClientEfl.cpp: (WebKit): (WebKit::ViewClientEfl::toEwkView): (WebKit::ViewClientEfl::viewNeedsDisplay): (WebKit::ViewClientEfl::didChangeContentsSize): (WebKit::ViewClientEfl::ViewClientEfl): (WebKit::ViewClientEfl::~ViewClientEfl): * UIProcess/efl/ViewClientEfl.h: Introduce new ViewClientEfl which handles WKViewClient callbacks and interacts with EwkView. (WebKit): (ViewClientEfl): (WebKit::ViewClientEfl::create): * UIProcess/efl/WebView.cpp: (WebKit::WebView::initializeClient): (WebKit): (WebKit::WebView::setViewNeedsDisplay): (WebKit::WebView::didChangeContentsSize): * UIProcess/efl/WebView.h: Add new WebViewClient member and corresponding methods to interact with it. (WebView): * UIProcess/efl/WebViewClient.cpp: (WebKit): (WebKit::WebViewClient::viewNeedsDisplay): (WebKit::WebViewClient::didChangeContentsSize): * UIProcess/efl/WebViewClient.h: Add new WebViewClient APIClient for WKViewClient. (WebCore): (WebKit): 2013-02-13 Mikhail Pozdnyakov [WK2][EFL][WTR] Regression(r141836): WTR crashes on exit https://bugs.webkit.org/show_bug.cgi?id=109456 Reviewed by Anders Carlsson. WebView destructor now considers the situation if its WebPageProxy instance had been closed from outside the class (explicitly by client code). * UIProcess/efl/WebView.cpp: (WebKit::WebView::~WebView): 2013-02-13 Gyuyoung Kim [WK2] Remove web intents callbacks https://bugs.webkit.org/show_bug.cgi?id=109654 Reviewed by Benjamin Poulain. Web intents was removed by r142549. * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * UIProcess/API/C/WKPage.h: * UIProcess/API/gtk/WebKitLoaderClient.cpp: (attachLoaderClientToView): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/qt/QtBuiltinBundlePage.cpp: (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): 2013-02-12 Adenilson Cavalcanti [WK2] Page reloading will crash UIProcess after WebProcess was killed https://bugs.webkit.org/show_bug.cgi?id=109305 Reviewed by Benjamin Poulain. Re-initialize the pointer to a WebInspectorProxy object before calling initializeWebPage(). When the WebProcess crashes, WebPageProxy::processDidCrash() will set WebInspectorProxy pointer to null, which later is accessed by initializeWebPage(). This patch avoids a crash scenario where calls into a null pointer would be made. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::reattachToWebProcess): 2013-02-12 Joseph Pecoraro [iOS] Enable PAGE_VISIBILITY_API https://bugs.webkit.org/show_bug.cgi?id=109399 Reviewed by David Kilzer. * Configurations/FeatureDefines.xcconfig: 2013-02-12 Brady Eidson Update a comment in NetworkProcess to be more accurate. Rubberstamped by Sam Weinig. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::didClose): 2013-02-12 Anders Carlsson SecItemShim should be a WorkQueueMessageReceiver https://bugs.webkit.org/show_bug.cgi?id=109636 Reviewed by Sam Weinig. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::dispatchWorkQueueMessageReceiverMessage): Add a helper function for dispatching a work queue message receiver message. (CoreIPC::Connection::processIncomingMessage): Check if there are any work queue message receivers registered for this message. * Shared/mac/SecItemShim.cpp: (WebKit::SecItemShim::shared): Use dispatch_once instead of the AtomicallyInitializedStatic macro. (WebKit::SecItemShim::SecItemShim): Initialize the queue. (WebKit::SecItemShim::secItemResponse): Remove the connection parameter. (WebKit::SecItemShim::initializeConnection): Register the shim object as a work queue message receiver. * Shared/mac/SecItemShim.h: Inherit from WorkQueueMessageReceiver. * Shared/mac/SecItemShim.messages.in: Remove LegacyReceiver and DispatchOnConnectionQueue. 2013-02-12 Sam Weinig Make Plug-in XPC services "join existing sessions" Reviewed by Mark Rowe. * PluginProcess/EntryPoint/mac/XPCService/PluginService.32/Info.plist: * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/Info.plist: * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist: 2013-02-12 Sam Weinig Add skeleton of the OfflineStorageProcess https://bugs.webkit.org/show_bug.cgi?id=109615 Reviewed by Anders Carlsson. This adds the skeleton of a new process to contain Database and Local Storage backends in (hence, offline storage). We're adding a new process, rather than using the Network or UIProcesses, to allow us to tightly sandbox these activities away from networking and full filesystem access. * Configurations/OfflineStorageProcess.xcconfig: Added. * Configurations/OfflineStorageService.Development.xcconfig: Added. * Configurations/OfflineStorageService.xcconfig: Added. * DerivedSources.make: * OfflineStorageProcess: Added. * OfflineStorageProcess/EntryPoint: Added. * OfflineStorageProcess/EntryPoint/mac: Added. * OfflineStorageProcess/EntryPoint/mac/LegacyProcess: Added. * OfflineStorageProcess/EntryPoint/mac/LegacyProcess/Info.plist: Added. * OfflineStorageProcess/EntryPoint/mac/LegacyProcess/OfflineStorageProcessMain.mm: Added. * OfflineStorageProcess/EntryPoint/mac/LegacyProcess/OfflineStorageProcessMainBootstrapper.cpp: Added. * OfflineStorageProcess/EntryPoint/mac/XPCService: Added. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService: Added. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development: Added. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development/Info.plist: Added. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService.Development/OfflineStorageServiceMain.Development.mm: Added. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService/Info.plist: Added. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageService/OfflineStorageServiceMain.mm: Added. * OfflineStorageProcess/EntryPoint/mac/XPCService/OfflineStorageServiceEntryPoint.mm: Added. * OfflineStorageProcess/OfflineStorageProcess.cpp: Added. * OfflineStorageProcess/OfflineStorageProcess.h: Added. * OfflineStorageProcess/OfflineStorageProcess.messages.in: Added. * OfflineStorageProcess/mac: Added. * OfflineStorageProcess/mac/OfflineStorageProcessMac.mm: Added. (WebKit::OfflineStorageProcess::initializeProcessName): (WebKit::OfflineStorageProcess::initializeSandbox): * OfflineStorageProcess/mac/com.apple.WebKit.OfflineStorage.sb: Added. * Shared/OfflineStorage: Added. * Shared/OfflineStorage/OfflineStorageProcessCreationParameters.cpp: Added. * Shared/OfflineStorage/OfflineStorageProcessCreationParameters.h: Added. * Scripts/webkit2/messages.py: (struct_or_class): Added OfflineStorageProcessCreationParameters. * WebKit2.xcodeproj/project.pbxproj: 2013-02-12 Jinwoo Song [EFL][WK2] Fix build warning after r142579 https://bugs.webkit.org/show_bug.cgi?id=109547 Reviewed by Alexey Proskuryakov. Use UNUSED_PARAM macro to fix -Wunused-parameter build warning. * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::didChangeContentsSize): 2013-02-12 Christophe Dumez [EFL][WK2] Reenable ewk_auth_request API tests https://bugs.webkit.org/show_bug.cgi?id=108451 Reviewed by Benjamin Poulain. ewk_auth_request API tests were temporarily disabled after the C API for resource loading was removed from WebKit2. This patches updates the tests so that they no longer rely on the resource loading events and renables them. This patch also corrects the naming of the static variables in the test to follow more closely the WebKit coding style. * PlatformEfl.cmake: * UIProcess/API/efl/tests/test_ewk2_auth_request.cpp: (serverCallback): (TEST_F): (onLoadFinished): 2013-02-12 Anders Carlsson Introduce a WorkQueueMessageReceiver class as a replacement for QueueClient https://bugs.webkit.org/show_bug.cgi?id=109612 Reviewed by Andreas Kling. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::addWorkQueueMessageReceiver): (CoreIPC): (CoreIPC::Connection::removeWorkQueueMessageReceiver): (CoreIPC::Connection::addWorkQueueMessageReceiverOnConnectionWorkQueue): (CoreIPC::Connection::removeWorkQueueMessageReceiverOnConnectionWorkQueue): * Platform/CoreIPC/Connection.h: (Connection): 2013-02-12 Csaba Osztrogonác Typo fix after r142663. * GNUmakefile.list.am: 2013-02-12 Csaba Osztrogonác [WK2] Unreviewed trivial buildfix after r142630 and r142651. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::didFinishLaunching): * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: (WebKit::PluginProcessProxy::platformGetLaunchOptions): * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: (WebKit::PluginProcessProxy::platformGetLaunchOptions): 2013-02-12 Anders Carlsson Change the queue client base class to be private everywhere https://bugs.webkit.org/show_bug.cgi?id=109604 Reviewed by Andreas Kling. Move connection queue client registration inside of the respective queue client classes. Also, it's too late to add queue clients in ChildProcessProxy::didFinishLaunching, so do this in ChildProcessProxy::connectionWillOpen instead. Finally, assert that queue clients are only being added and removed from the client thread. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeConnection): * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::addQueueClient): (CoreIPC::Connection::removeQueueClient): * Shared/mac/SecItemShim.cpp: (WebKit::SecItemShim::initializeConnection): (WebKit): * Shared/mac/SecItemShim.h: (SecItemShim): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::connectionWillOpen): (WebKit): (WebKit::NetworkProcessProxy::connectionWillClose): (WebKit::NetworkProcessProxy::didFinishLaunching): * UIProcess/Network/NetworkProcessProxy.h: (NetworkProcessProxy): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::connectionWillOpen): (WebKit::WebProcessProxy::didFinishLaunching): * UIProcess/mac/SecItemShimProxy.cpp: (WebKit::SecItemShimProxy::initializeConnection): (WebKit): * UIProcess/mac/SecItemShimProxy.h: (SecItemShimProxy): * WebProcess/Plugins/PluginProcessConnectionManager.cpp: (WebKit::PluginProcessConnectionManager::initializeConnection): (WebKit): * WebProcess/Plugins/PluginProcessConnectionManager.h: (PluginProcessConnectionManager): * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::initializeConnection): (WebKit): * WebProcess/WebPage/EventDispatcher.h: (EventDispatcher): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeConnection): 2013-02-12 Brady Eidson Add WKContext API to retrieve basic network process statistics https://bugs.webkit.org/show_bug.cgi?id=109329 Reviewed by Sam Weinig. This patch adds a WKContextGetStatisticsWithOptions which allows the client to ask for certain types of statistics. It also expands the "get statistics" callback mechanism to allow for a statistics request to be answered by multiple child processes. That mechanism still has some rough edges but will eventually allow for getting statistics from multiple web processes, as well. * NetworkProcess/HostRecord.cpp: (WebKit::HostRecord::pendingRequestCount): (WebKit::HostRecord::activeLoadCount): * NetworkProcess/HostRecord.h: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::getNetworkProcessStatistics): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::hostsPendingCount): (WebKit::NetworkResourceLoadScheduler::loadsPendingCount): (WebKit::NetworkResourceLoadScheduler::hostsActiveCount): (WebKit::NetworkResourceLoadScheduler::loadsActiveCount): * NetworkProcess/NetworkResourceLoadScheduler.h: * Shared/Authentication/AuthenticationManager.h: (WebKit::AuthenticationManager::outstandingAuthenticationChallengeCount): * Shared/Downloads/DownloadManager.h: * UIProcess/API/C/WKContext.cpp: (WKContextGetStatistics): (WKContextGetStatisticsWithOptions): * UIProcess/API/C/WKContext.h: * UIProcess/StatisticsRequest.cpp: Added. (WebKit::StatisticsRequest::StatisticsRequest): (WebKit::StatisticsRequest::~StatisticsRequest): (WebKit::StatisticsRequest::addOutstandingRequest): (WebKit::addToDictionaryFromHashMap): (WebKit::createDictionaryFromHashMap): (WebKit::StatisticsRequest::completedRequest): * UIProcess/StatisticsRequest.h: Added. (WebKit::StatisticsRequest::create): * UIProcess/WebContext.cpp: (WebKit::WebContext::networkingProcessConnection): (WebKit::WebContext::getStatistics): (WebKit::WebContext::requestWebContentStatistics): (WebKit::WebContext::requestNetworkingStatistics): (WebKit::WebContext::didGetStatistics): * UIProcess/WebContext.h: * UIProcess/WebContext.messages.in: * WebProcess/WebProcess.cpp: (WebKit::WebProcess::getWebCoreStatistics): * WebKit2.xcodeproj/project.pbxproj: 2013-02-12 Anders Carlsson Build fix. Add back the files to the Xcode project that were removed in r142580. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Plugins/PluginProcessConnectionManager.cpp: 2013-02-12 Jessie Berlin Build fix after r142540 and r142518 * WebProcess/Plugins/PluginProcessConnectionManager.cpp: (WebKit::PluginProcessConnectionManager::didReceivePluginProcessConnectionManagerMessageOnConnectionWorkQueue): This function was added to the header in r142518 but not implemented in that revision. It wasn't a problem until r142540 started using it. Add a stub implementation for it. 2013-02-11 Brady Eidson Make PluginProcessProxy a ChildProcessProxy. https://bugs.webkit.org/show_bug.cgi?id=109513 Reviewed by Anders Carlsson. * Shared/ChildProcessProxy.h: Inherit from ThreadSafeRefCounted. * UIProcess/Network/NetworkProcessProxy.h: Don't inherit from RefCounted. * UIProcess/WebProcessProxy.h: Don't inherit from ThreadSafeRefCounted * UIProcess/Plugins/PluginProcessProxy.h: Don't inherit from RefCounted, do inherit from ChildProcessProxy Rely on ChildProcessProxy for process launcher management and launch options: * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::PluginProcessProxy): (WebKit::PluginProcessProxy::getLaunchOptions): (WebKit::PluginProcessProxy::getPluginProcessConnection): (WebKit::PluginProcessProxy::getSitesWithData): (WebKit::PluginProcessProxy::clearSiteData): * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::platformGetLaunchOptions): (WebKit::PluginProcessProxy::getPluginProcessSerialNumber): 2013-02-11 Alexey Proskuryakov NetworkProcess deny mach-lookup com.apple.PowerManagement.control Reviewed by Sam Weinig. * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: 2013-02-11 Huang Dongsung Coordinated Graphics: Make CoordinatedGraphicsScene not know contents size. https://bugs.webkit.org/show_bug.cgi?id=108922 Reviewed by Noam Rosenthal. Signed off for WebKit2 by Benjamin Poulain. Currently, CoordinatedGraphicsScene has two methods to know contents size: setContentsSize() and setVisibleContentsRect(). Contents size is used when adjusting a scroll position, but adjustment is not needed because EFL and Qt platform code (currently PageViewportController) already adjusts a scroll position, and it is natural for each platform to be in charge of adjusting. So this patch makes CoordinatedGraphicsScene not know contents size. In addition, now DrawingAreaProxy::coordinatedLayerTreeHostProxy() is only used to get CoordinatedGraphicsScene. * UIProcess/API/qt/qquickwebpage.cpp: (QQuickWebPagePrivate::updateSize): * UIProcess/API/qt/raw/qrawwebview.cpp: (QRawWebView::setSize): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (CoordinatedLayerTreeHostProxy): * UIProcess/efl/PageClientLegacyImpl.cpp: (WebKit::PageClientLegacyImpl::didChangeContentsSize): * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::didChangeContentsSize): 2013-02-11 Huang Dongsung Coordinated Graphics: remove the DidChangeScrollPosition message. https://bugs.webkit.org/show_bug.cgi?id=108051 Reviewed by Noam Rosenthal. Signed off for WebKit2 by Benjamin Poulain. Currently, we use the DidChangeScrollPosition message to send the scroll position that WebCore used in this frame to UI Process. We had to have some member variables for the DidChangeScrollPosition message. However, we can send a scroll position via the DidRenderFrame message, because CoordinatedGraphicsScene::m_renderedContentsScrollPosition is updated at the moment of flushing. So we can remove the DidChangeScrollPosition message and some redundant member variables. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::didRenderFrame): (WebKit): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (CoordinatedLayerTreeHostProxy): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: Remove the DidChangeScrollPosition message. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges): Send a scroll position via the DidChangeScrollPosition message. (WebKit::CoordinatedLayerTreeHost::syncLayerState): Don't send a scroll position because flushPendingLayerChanges() does that. In addition, it is weird to check if we must send a scroll position at the moment of sending the SyncLayerState message of every layers. (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 2013-02-11 Ryosuke Niwa Disable delete button controller on non-Mac ports and delete EditorClient::shouldShowDeleteInterface https://bugs.webkit.org/show_bug.cgi?id=109534 Reviewed by Anders Carlsson. * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit): * WebProcess/WebCoreSupport/WebEditorClient.h: 2013-02-11 Jae Hyun Park [EFL] Build fix https://bugs.webkit.org/show_bug.cgi?id=109518 Reviewed by Laszlo Gombos. Fix EFL build by including PluginProcessConnectionManager.messages.in in CMakeLists.txt * CMakeLists.txt: 2013-02-11 Anders Carlsson Fix build. * WebProcess/Plugins/PluginProcessConnectionManager.cpp: (WebKit::PluginProcessConnectionManager::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebProcess.cpp: 2013-02-11 Seulgi Kim [GTK] Build fix. https://bugs.webkit.org/show_bug.cgi?id=109516 Reviewed by Csaba Osztrogonác. PluginProcessConnectionManagerMessages are omitted from messages list. * GNUmakefile.list.am: 2013-02-11 Tim Horton [WK2] setMinimumLayoutWidth should bail if there's no WebProcess https://bugs.webkit.org/show_bug.cgi?id=109512 Reviewed by Anders Carlsson. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setMinimumLayoutWidth): 2013-02-11 Anders Carlsson PluginProcessConnectionManager should be a QueueClient https://bugs.webkit.org/show_bug.cgi?id=109496 Reviewed by Andreas Kling. * WebProcess/Plugins/PluginProcessConnectionManager.cpp: (WebKit::PluginProcessConnectionManager::didReceiveMessageOnConnectionWorkQueue): (WebKit): (WebKit::PluginProcessConnectionManager::didCloseOnConnectionWorkQueue): * WebProcess/Plugins/PluginProcessConnectionManager.h: (PluginProcessConnectionManager): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeConnection): * WebProcess/WebProcess.h: (WebProcess): 2013-02-11 Csaba Osztrogonác Unreviewed WK2 buildfix after r142518. * DerivedSources.pri: 2013-02-11 Gavin Barraclough PluginProcess should quit immediately if idle in response to low-memory notifications https://bugs.webkit.org/show_bug.cgi?id=109103 Reviewed by Brady Eidson. PluginProcess now installs a MemoryPressureHandler for the process, providing a custom callback which will call terminate if appropriate (if the plugin is not currently in use). * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::lowMemoryHandler): - Custom callback to terminate if appropriate. (WebKit::PluginProcess::initializeProcess): - Install the MemoryPressureHandler. (WebKit::PluginProcess::shouldTerminate): - This method now also needs to be callable in situations where it might return false. * PluginProcess/PluginProcess.h: (PluginProcess): - Added declaration for lowMemoryHandler. 2013-02-11 Anders Carlsson Move the PluginProcessCrashed message to PluginProcessConnectionManager https://bugs.webkit.org/show_bug.cgi?id=109493 Reviewed by Andreas Kling. This is in preparation for making PluginProcessConnectionManager a connection queue client. * DerivedSources.make: * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::didClose): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Plugins/PluginProcessConnectionManager.cpp: (WebKit::PluginProcessConnectionManager::pluginProcessCrashed): * WebProcess/Plugins/PluginProcessConnectionManager.h: (PluginProcessConnectionManager): * WebProcess/Plugins/PluginProcessConnectionManager.messages.in: Added. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue): (WebKit::WebProcess::webResourceLoadScheduler): * WebProcess/WebProcess.h: (WebProcess): * WebProcess/WebProcess.messages.in: 2013-02-11 Benjamin Poulain Kill TestRunner::setMinimumTimerInterval; implement the feature with InternalSettings https://bugs.webkit.org/show_bug.cgi?id=109349 Reviewed by Sam Weinig. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2013-02-11 Dean Jackson Snapshotted plug-in should use shadow root https://bugs.webkit.org/show_bug.cgi?id=108284 Reviewed by Simon Fraser. Take three of this commit - after rollout in r142400 and r142405. We no longer have any need for plugInStartLabelImage. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Remove plugInStartLabelImage. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Ditto. * WebProcess/WebCoreSupport/WebChromeClient.cpp: Ditto. * WebProcess/WebCoreSupport/WebChromeClient.h: Ditto. 2013-02-11 Anders Carlsson The plug-in process connection manager doesn't need to be heap allocated https://bugs.webkit.org/show_bug.cgi?id=109479 Reviewed by Andreas Kling. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::WebProcess): (WebKit::WebProcess::pluginProcessConnectionManager): (WebKit::WebProcess::pluginProcessCrashed): * WebProcess/WebProcess.h: (WebKit): (WebProcess): 2013-02-11 Tony Chang Move setFrameFlatteningEnabled from layoutTestController to window.internals.settings https://bugs.webkit.org/show_bug.cgi?id=87149 Reviewed by Simon Fraser. * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::overrideBoolPreferenceForTestRunner): Add setFrameFlatteningEnabled to the list of overridable values. 2013-02-11 Claudio Saavedra [WK2][Notifications] Missing early return in populateCopyOfNotificationPermissions https://bugs.webkit.org/show_bug.cgi?id=108459 Reviewed by Alexey Proskuryakov. * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::populateCopyOfNotificationPermissions): Providers might return 0 and we will end up with a null-pointer dereference. Early check against this. 2013-02-10 Sam Weinig Make the Plug-in XPCService build work even when building in Xcode https://bugs.webkit.org/show_bug.cgi?id=109392 Reviewed by Anders Carlsson. * Configurations/DebugRelease.xcconfig: Add a DEBUG_OR_RELEASE variable to test against. * Configurations/PluginService.32.xcconfig: * Configurations/PluginService.64.xcconfig: In non-production builds, don't link against WebKit2, so that we don't get warnings about WebKit2.framework not containing the right architectures. This is ok, as these services are not used in non-production builds. * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist: * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/NetworkServiceMain.Development.mm: * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist: * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm: * PluginProcess/EntryPoint/mac/XPCService/PluginService.32/Info.plist: * PluginProcess/EntryPoint/mac/XPCService/PluginService.32/PluginService.32.Main.mm: * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/Info.plist: * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/PluginService.64.Main.mm: * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist: * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/PluginService.Development.Main.mm: * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist: * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm: * WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist: * WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm: Switch off the the old idiom of defining a macro for the initializer function, and instead set it in the Info.plist, so the XPCServiceBootstrapper can grab it. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.Development.h: (WebKit::XPCServiceEventHandler): * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.h: (WebKit::XPCServiceEventHandler): Get the entry point from the bundle, rather than the macro. This is not only a bit less gross, but also allows us to build without having linked against WebKit2.framework. * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::shouldUseXPC): Re-enable using XPC for plug-ins. * WebKit2.xcodeproj/project.pbxproj: Update project. 2013-02-10 Anders Carlsson Add back code that was accidentally removed when moving plug-in enumeration back to the main thread https://bugs.webkit.org/show_bug.cgi?id=109379 Reviewed by Andreas Kling. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getPlugins): 2013-02-10 Kent Tamura Unreviewed, rolling out r142347. http://trac.webkit.org/changeset/142347 https://bugs.webkit.org/show_bug.cgi?id=108273 Because a depending change r142343 was rolled out. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle): (WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle): 2013-02-10 Kent Tamura Unreviewed, rolling out r142343. http://trac.webkit.org/changeset/142343 https://bugs.webkit.org/show_bug.cgi?id=108284 It might make inspector/profiler/selector-profiler-url.html crashy. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::plugInStartLabelImage): (WebKit): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: (InjectedBundlePageUIClient): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::plugInStartLabelImage): (WebKit): * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): 2013-02-10 Zan Dobersek [WebKit2][Gtk] Remove the fullscreen manager proxy message receiver upon invalidating https://bugs.webkit.org/show_bug.cgi?id=109352 Reviewed by Sam Weinig. As added for the Mac port in r142160 due to the changes in the same revision, remove the fullscreen manager proxy as a message receiver. Also fixes a failing unit test. * UIProcess/gtk/WebFullScreenManagerProxyGtk.cpp: (WebKit::WebFullScreenManagerProxy::invalidate): 2013-02-10 Zoltan Arvai [WK2] Fix build on PLUGIN_ARCHITECTURE(UNSUPPORTED) after r142314 https://bugs.webkit.org/show_bug.cgi?id=109364 Reviewed by Simon Hausmann. void NetscapePlugin::platformPreInitialize() is need to be added to NetscapePluginNone.cpp. * WebProcess/Plugins/Netscape/NetscapePluginNone.cpp: (WebKit::NetscapePlugin::platformPreInitialize): (WebKit): 2013-02-09 Sheriff Bot Unreviewed, rolling out r137328. http://trac.webkit.org/changeset/137328 https://bugs.webkit.org/show_bug.cgi?id=109367 causes memory usage to balloon if connection queue is filling faster than sending (Requested by kling on #webkit). * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::ArgumentEncoder): (CoreIPC::ArgumentEncoder::grow): * Platform/CoreIPC/ArgumentEncoder.h: (CoreIPC::ArgumentEncoder::buffer): (ArgumentEncoder): 2013-02-08 Sam Weinig Fix ASSERT when the Web Content Process crashes https://bugs.webkit.org/show_bug.cgi?id=109346 Reviewed by Simon Fraser. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::processDidCrash): We need to remove ourselves as a message receiver before calling out to the client, as the client might want to re-add us (as Safari does). 2013-02-08 Benjamin Poulain Move workerThreadCount from TestRunner to WebCore Internals https://bugs.webkit.org/show_bug.cgi?id=109239 Reviewed by Darin Adler. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebProcess/WebPage/WebFrame.cpp: Remove a useless #include. 2013-02-08 Dean Jackson Remove use of plugInStartLabelImage https://bugs.webkit.org/show_bug.cgi?id=108273 Reviewed by Simon Fraser. Remove any use of plugInStartLabelImage. While there, implement plugInStartLabelTitle and plugInStartLabelSubtitle to return the values from the client. implement them. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Remove callback and entry from client structure. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Remove plugInStartLabelImage. (WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle): Ask the client bundle for value. (WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle): Ditto. 2013-02-08 Dean Jackson Snapshotted plug-in should use shadow root https://bugs.webkit.org/show_bug.cgi?id=108284 Reviewed by Simon Fraser. Take two of this commit! We no longer have any need for plugInStartLabelImage. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Remove plugInStartLabelImage. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Ditto. * WebProcess/WebCoreSupport/WebChromeClient.cpp: Ditto. * WebProcess/WebCoreSupport/WebChromeClient.h: Ditto. 2013-02-08 Dean Jackson Rolling out r142333 and r142337 which broke Mac Release builds. 2013-02-08 Anders Carlsson Move plug-in enumeration back to the main thread https://bugs.webkit.org/show_bug.cgi?id=109337 Reviewed by Andreas Kling. Plug-in enumeration was moved to a separate work queue to improve responsiveness, but doing so lead to crashes when WebKit1 would enumerate plug-ins on the main thread at the same time. Bug tracks fixing the responsiveness issue by spawning a plug-in process and have it do the enumeration. * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::getPluginInfoFromCarbonResources): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::connectionWillOpen): (WebKit::WebProcessProxy::connectionWillClose): (WebKit::WebProcessProxy::getPlugins): * UIProcess/WebProcessProxy.h: (WebCore): (WebProcessProxy): * UIProcess/WebProcessProxy.messages.in: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit): (WebKit::WebPlatformStrategies::populatePluginCache): * WebProcess/WebProcess.cpp: * WebProcess/WebProcess.h: (WebProcess): * WebProcess/WebProcess.messages.in: 2013-02-08 Dean Jackson Snapshotted plug-in should use shadow root https://bugs.webkit.org/show_bug.cgi?id=108284 Reviewed by Simon Fraser. We no longer have any need for plugInStartLabelImage. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Remove plugInStartLabelImage. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: Ditto. * WebProcess/WebCoreSupport/WebChromeClient.cpp: Ditto. * WebProcess/WebCoreSupport/WebChromeClient.h: Ditto. 2013-02-08 Raphael Kubo da Costa [WK2] Fix the build on !Mac after r142314. https://bugs.webkit.org/show_bug.cgi?id=109327 Reviewed by Benjamin Poulain. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformPreInitialize): Add a stub for the newly-added function. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: (WebKit::NetscapePlugin::platformPreInitialize): (WebKit): 2013-02-07 Anders Carlsson Work around a bug in Flash where NSException objects can be released too early https://bugs.webkit.org/show_bug.cgi?id=109242 Reviewed by Darin Adler. * Shared/Plugins/Netscape/mac/NetscapePluginModuleMac.mm: (WebKit::NetscapePluginModule::determineQuirks): Set the new plug-in quirk. * Shared/Plugins/PluginQuirks.h: Add a new plug-in quirk. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::initialize): Call platformPreInitialize. * WebProcess/Plugins/Netscape/NetscapePlugin.h: (NetscapePlugin): Add platformPreInitialize. * WebProcess/Plugins/Netscape/mac/NetscapePluginMac.mm: (WebKit::NSException_release): Add new empty function. (WebKit::NetscapePlugin::platformPreInitialize): Patch -[NSException release] to be a no-op. 2013-02-08 Dean Jackson Do not register autostart for plugins from file:// (or nowhere) https://bugs.webkit.org/show_bug.cgi?id=108271 Reviewed by Tim Horton. If the pageOrigin is the empty string don't add it to the auto-start origin list for snapshotting. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::addPlugInAutoStartOrigin): 2013-02-07 Sheriff Bot Unreviewed, rolling out r142212. http://trac.webkit.org/changeset/142212 https://bugs.webkit.org/show_bug.cgi?id=109255 Causes ASSERT(!m_installed) on launch (Requested by smfr on #webkit). * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::initializeProcess): (WebKit::PluginProcess::shouldTerminate): * PluginProcess/PluginProcess.h: (PluginProcess): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): 2013-02-07 Gyuyoung Kim [EFL][WK2] Remove dead code after r142169 https://bugs.webkit.org/show_bug.cgi?id=109251 Reviewed by Benjamin Poulain. * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::contentsSizeChanged): 2013-02-06 Gavin Barraclough PluginProcess should quit immediately if idle in response to low-memory notifications https://bugs.webkit.org/show_bug.cgi?id=109103 Reviewed by Darin Adler. PluginProcess now initializes a MemoryPressureHandler for the process, providing a custom callback which will call terminate if appropriate (if the plugin is not currently in use). * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::lowMemoryHandler): - Custom callback to terminate if appropriate. (WebKit::PluginProcess::initializeProcess): - Initialize the MemoryPressureHandler. (WebKit::PluginProcess::shouldTerminate): - This method now also needs to be callable in situations where it might return false. * PluginProcess/PluginProcess.h: (PluginProcess): - Added declaration for lowMemoryHandler. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeWebProcess): - MemoryPressureHandler::install is now called via MemoryPressureHandler::initialize. 2013-02-07 KwangYong Choi Fix build warning after r142017 https://bugs.webkit.org/show_bug.cgi?id=109119 Reviewed by Alexey Proskuryakov. Use UNUSED_PARAM macro to fix -Wunused-parameter build warning. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::getPluginPath): 2013-02-07 Martin Robinson [GTK] Cleanup command-line defines https://bugs.webkit.org/show_bug.cgi?id=109213 Reviewed by Xan Lopez. * GNUmakefile.am: Remove references to flags that are now provided by autotoolsconfig.h. 2013-02-07 Benjamin Poulain Move pauseAnimation/pauseTransition from TestRunner to Internals https://bugs.webkit.org/show_bug.cgi?id=109107 Reviewed by Anders Carlsson. * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: * WebProcess/WebPage/WebFrame.cpp: * WebProcess/WebPage/WebFrame.h: (WebFrame): 2013-02-07 Mikhail Pozdnyakov [WK2][EFL] Removal of non coordinated graphics code path from WK2 EFL https://bugs.webkit.org/show_bug.cgi?id=109165 Reviewed by Anders Carlsson. Removed non coordinated graphics code path from WK2 EFL as it was not used by anyone and caused a lot of preprocessor macros in the code making it less readable. * UIProcess/API/efl/EvasGLContext.cpp: * UIProcess/API/efl/EvasGLContext.h: (WebKit::EvasGLContext::context): * UIProcess/API/efl/EvasGLSurface.cpp: * UIProcess/API/efl/EvasGLSurface.h: (WebKit::EvasGLSurface::surface): Removed also 'inline' and 'const' keywords from functions declaration, as both EvasGLContext::context() and EvasGLSurface::surface() are defined inside their classes and return mutable pointer. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): (EwkView::transformFromScene): (EwkView::transformToScreen): (EwkView::coordinatedGraphicsScene): (EwkView::displayTimerFired): (EwkView::scheduleUpdateDisplay): Renamed from EwkView::update(). (EwkView::exitAcceleratedCompositingMode): (EwkView::handleEvasObjectCalculate): (EwkView::takeSnapshot): * UIProcess/API/efl/EwkView.h: (WebCore): (EwkView): * UIProcess/API/efl/SnapshotImageGL.cpp: (getImageSurfaceFromFrameBuffer): * UIProcess/API/efl/SnapshotImageGL.h: * UIProcess/API/efl/ewk_view.cpp: * UIProcess/efl/PageClientBase.cpp: (WebKit::PageClientBase::setViewNeedsDisplay): (WebKit::PageClientBase::updateAcceleratedCompositingMode): * UIProcess/efl/PageClientBase.h: (PageClientBase): * UIProcess/efl/PageClientDefaultImpl.cpp: (WebKit::PageClientDefaultImpl::didCommitLoad): (WebKit::PageClientDefaultImpl::updateViewportSize): (WebKit::PageClientDefaultImpl::didChangeViewportProperties): (WebKit::PageClientDefaultImpl::didChangeContentsSize): (WebKit::PageClientDefaultImpl::pageTransitionViewportReady): * UIProcess/efl/PageClientDefaultImpl.h: (PageClientDefaultImpl): * UIProcess/efl/PageClientLegacyImpl.cpp: (WebKit::PageClientLegacyImpl::didCommitLoad): (WebKit::PageClientLegacyImpl::updateViewportSize): (WebKit::PageClientLegacyImpl::didChangeViewportProperties): (WebKit::PageClientLegacyImpl::didChangeContentsSize): (WebKit::PageClientLegacyImpl::pageDidRequestScroll): (WebKit::PageClientLegacyImpl::didRenderFrame): (WebKit::PageClientLegacyImpl::pageTransitionViewportReady): * UIProcess/efl/PageClientLegacyImpl.h: (PageClientLegacyImpl): * UIProcess/efl/PageLoadClientEfl.cpp: (WebKit::PageLoadClientEfl::didCommitLoadForFrame): (WebKit::PageLoadClientEfl::PageLoadClientEfl): * UIProcess/efl/PageLoadClientEfl.h: (PageLoadClientEfl): * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::didChangeContentsSize): (WebKit::PageViewportControllerClientEfl::didChangeVisibleContents): * UIProcess/efl/PageViewportControllerClientEfl.h: * UIProcess/efl/WebInspectorProxyEfl.cpp: (WebKit::WebInspectorProxy::platformCreateInspectorPage): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::contentsSizeChanged): 2013-02-06 Sam Weinig Make WebPageProxy and sub-objects MessageReceivers https://bugs.webkit.org/show_bug.cgi?id=108785 Reviewed by Anders Carlsson. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy): (WebKit::CoordinatedLayerTreeHostProxy::~CoordinatedLayerTreeHostProxy): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (CoordinatedLayerTreeHostProxy): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: * UIProcess/DrawingAreaProxy.cpp: (WebKit::DrawingAreaProxy::DrawingAreaProxy): (WebKit::DrawingAreaProxy::~DrawingAreaProxy): (WebKit::DrawingAreaProxy::contentsRect): * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::setVisibleContentsRect): * UIProcess/DrawingAreaProxy.messages.in: * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect): * UIProcess/DrawingAreaProxyImpl.h: * UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::WebFullScreenManagerProxy): * UIProcess/WebFullScreenManagerProxy.h: (WebFullScreenManagerProxy): * UIProcess/WebFullScreenManagerProxy.messages.in: * UIProcess/WebInspectorProxy.cpp: (WebKit::WebInspectorProxy::WebInspectorProxy): (WebKit::WebInspectorProxy::invalidate): * UIProcess/WebInspectorProxy.h: * UIProcess/WebInspectorProxy.messages.in: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::reattachToWebProcess): (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::inspector): (WebKit::WebPageProxy::fullScreenManager): (WebKit::WebPageProxy::processDidCrash): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveMessage): (WebKit::WebProcessProxy::didReceiveSyncMessage): * UIProcess/mac/WebFullScreenManagerProxyMac.mm: (WebKit::WebFullScreenManagerProxy::invalidate): 2013-02-07 Zan Dobersek [Autotools] Remove uses of Automake FARSTREAM_(CFLAGS|LIBS) variables, USE_FARSTREAM conditional https://bugs.webkit.org/show_bug.cgi?id=109198 Reviewed by Martin Robinson. * GNUmakefile.am: Remove the FARSTREAM_(CFLAGS|LIBS) variables, they're not set to anything. 2013-02-07 Kenneth Rohde Christiansen [WK2][EFL] Add WKView methods related to background drawing https://bugs.webkit.org/show_bug.cgi?id=109159 Reviewed by Anders Carlsson. * UIProcess/API/C/efl/WKView.cpp: (WKViewSetDrawsBackground): (WKViewGetDrawsBackground): (WKViewSetDrawsTransparentBackground): (WKViewGetDrawsTransparentBackground): * UIProcess/efl/WebView.cpp: (WebKit::WebView::setDrawsBackground): (WebKit): (WebKit::WebView::drawsBackground): (WebKit::WebView::setDrawsTransparentBackground): (WebKit::WebView::drawsTransparentBackground): * UIProcess/efl/WebView.h: (WebView): * UIProcess/API/C/efl/WKView.h: New methods added * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): (EwkView::displayTimerFired): (EwkView::handleEvasObjectColorSet): * UIProcess/API/efl/EwkView.h: (EwkView): * UIProcess/API/efl/ewk_view.cpp: (ewk_view_draws_page_background_set): Remove the unneeded m_setDrawsBackground and replace it with the WKView setting. 2013-02-07 Christophe Dumez [EFL][WK2] EWK2UnitTestBase.ewk_view_page_contents_get API test is sometimes failing https://bugs.webkit.org/show_bug.cgi?id=108634 Reviewed by Alexey Proskuryakov. Use more robust data validation in EWK2UnitTestBase.ewk_view_page_contents_get so that the test passes consistently. The issue was that the header before the data includes the current date. Depending on the date, the data may start at a different index in the returned string. Instead of hardcoding the data start index in the test, we now use String::contains(). * UIProcess/API/efl/tests/test_ewk2_view.cpp: (PageContentsCallback): (TEST_F): 2013-02-07 Gavin Peters Unreviewed, rolling out r142141. http://trac.webkit.org/changeset/142141 https://bugs.webkit.org/show_bug.cgi?id=108990 Reland r142112, will update Chromium expectations and create a Chromium bug instead for the crash. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): 2013-02-07 Gavin Peters Unreviewed, rolling out r142112. http://trac.webkit.org/changeset/142112 https://bugs.webkit.org/show_bug.cgi?id=108990 The new test scrollingcoordinator/non-fast-scrollable-region-transformed- iframe.html crashes on Lion. See http://test-results.appspot.com/dashboards/flakiness_dashboard.html#tests=scrollingcoordinator%2Fnon-fast-scrollable-region-transformed-iframe.html * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::updateOffsetFromViewportForSelf): (WebKit): (WebKit::updateOffsetFromViewportForLayer): (WebKit::CoordinatedLayerTreeHost::syncFixedLayers): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): 2013-02-07 Caio Marcelo de Oliveira Filho [CoordinatedGraphics] Use ScrollingCoordinator to track fixed layers https://bugs.webkit.org/show_bug.cgi?id=108990 Reviewed by Noam Rosenthal. Signed off for WebKit2 by Simon Fraser. WebCore keeps ScrollingCoordinator up-to-date about whether layers are fixed or not, so we don't need to traverse the tree every frame to get this information. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: remove syncFixedLayers() and its helper functions. Those were used to identify the fixed layers and are not needed anymore. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::DrawingAreaImpl): enable the scrolling coordinator usage for Coordinated Graphics. 2013-02-07 Michael Brüning [Qt][WK2] Fold QtWebPageLoadClient into QQuickWebViewPrivate and move to C API. https://bugs.webkit.org/show_bug.cgi?id=108473 Reviewed by Simon Hausmann. Signed off for WebKit2 by Benjamin Poulain. This patch removes the QtWebPageLoadClient and moves the functionality into the QQuickWebViewPrivate as most callback methods are calling the private webview indirectly anyway. The patch also moves as much of the functionality to the C API as is possible with the current C API. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::didStartProvisionalLoadForFrame): (QQuickWebViewPrivate::didReceiveServerRedirectForProvisionalLoadForFrame): (QQuickWebViewPrivate::didFailLoad): (QQuickWebViewPrivate::didCommitLoadForFrame): (QQuickWebViewPrivate::didFinishLoadForFrame): (QQuickWebViewPrivate::didSameDocumentNavigationForFrame): (QQuickWebViewPrivate::didReceiveTitleForFrame): (QQuickWebViewPrivate::didStartProgress): (QQuickWebViewPrivate::didChangeProgress): (QQuickWebViewPrivate::didFinishProgress): (QQuickWebViewPrivate::didChangeBackForwardList): (QQuickWebViewPrivate::setTransparentBackground): (QQuickWebViewPrivate::transparentBackground): (QQuickWebViewPrivate::loadProgressDidChange): * UIProcess/API/qt/qquickwebview_p.h: (WebKit): * UIProcess/API/qt/qquickwebview_p_p.h: (WebKit): (QQuickWebViewPrivate): * UIProcess/qt/QtWebError.cpp: (WebKit::QtWebError::url): * UIProcess/qt/QtWebPageLoadClient.cpp: Removed. * UIProcess/qt/QtWebPageLoadClient.h: Removed. 2013-02-05 Eunmi Lee and Raphael Kubo da Costa [EFL][WK2] Refactoring initialization and shutdown codes of EFL libraries. https://bugs.webkit.org/show_bug.cgi?id=97173 Reviewed by Kenneth Rohde Christiansen, signed-off by Benjamin Poulain. Initialize and shutdown the EFL libraries in the ewk_main.cpp for UIProcess and WebProcessMainEfl.cpp for WebProcess. This allows us to shut down the libraries in a proper way, since RunLoop persist until the process exits. * UIProcess/API/efl/ewk_main.cpp: (ewk_init): (ewk_shutdown): * WebProcess/efl/WebProcessMainEfl.cpp: (WebKit::WebProcessMainEfl): 2013-02-07 Gyuyoung Kim Unreviewed build fix. * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::processDidClose): m_process can't be initialized nullptr yet. Use 0 instead of nullptr. 2013-02-07 Simon Hausmann [Qt][WK2] Fold QtWebPageFindClient into QQuickWebViewPrivate https://bugs.webkit.org/show_bug.cgi?id=108920 Reviewed by Jocelyn Turcotte, signed off for WK2 by Benjamin. Employ the pattern suggested by Jocelyn to simply implement the C callbacks directly using static functions. * Target.pri: * UIProcess/API/qt/qquickwebview.cpp: (toQQuickWebViewPrivate): (QQuickWebViewPrivate::initialize): (QQuickWebViewPrivate::didFindString): (QQuickWebViewPrivate::didFailToFindString): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/qt/QtWebPageFindClient.cpp: Removed. * UIProcess/qt/QtWebPageFindClient.h: Removed. 2013-02-03 Sam Weinig Make CustomProtocolManagerProxy a MessageReceiver https://bugs.webkit.org/show_bug.cgi?id=108787 Reviewed by Anders Carlsson. * Shared/ChildProcessProxy.cpp: (WebKit::ChildProcessProxy::addMessageReceiver): (WebKit::ChildProcessProxy::removeMessageReceiver): (WebKit::ChildProcessProxy::dispatchMessage): (WebKit::ChildProcessProxy::dispatchSyncMessage): * Shared/ChildProcessProxy.h: Sink the MessageReceiverMap down into the ChildProcessProxy. * UIProcess/Downloads/DownloadProxyMap.cpp: (WebKit::DownloadProxyMap::DownloadProxyMap): (WebKit::DownloadProxyMap::createDownloadProxy): (WebKit::DownloadProxyMap::downloadFinished): (WebKit::DownloadProxyMap::processDidClose): * UIProcess/Downloads/DownloadProxyMap.h: Pass the ChildProcessProxy rather than the MessageReceiverMap to the constructor. * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h: * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in: * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm: (WebKit::CustomProtocolManagerProxy::CustomProtocolManagerProxy): Convert to a MessageReceiver. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::createDownloadProxy): (WebKit::NetworkProcessProxy::didReceiveMessage): (WebKit::NetworkProcessProxy::didReceiveSyncMessage): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveMessage): (WebKit::WebProcessProxy::didReceiveSyncMessage): (WebKit::WebProcessProxy::createDownloadProxy): * UIProcess/WebProcessProxy.h: (WebProcessProxy): Remove direct chaining to CustomProtocolManagerProxy. 2013-02-06 Enrica Casucci ASSERT(!m_findPageOverlay) in FindController.cpp after r140769. https://bugs.webkit.org/show_bug.cgi?id=109105. Reviewed by Tim Horton. In r140769 we changed the way the overlay is destroyed, therefore the assert is no longer valid and should be removed. * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::updateFindUIAfterPageScroll): 2013-02-06 Anders Carlsson Dispatch storage manager messages to the storage work queue https://bugs.webkit.org/show_bug.cgi?id=109099 Reviewed by Andreas Kling. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::didReceiveMessageOnConnectionWorkQueue): (WebKit::StorageManager::dispatchMessageOnStorageManagerQueue): (WebKit): * UIProcess/Storage/StorageManager.h: (StorageManager): 2013-02-06 Anders Carlsson Pass the document source URL to the pluginLoadPolicy callback https://bugs.webkit.org/show_bug.cgi?id=109084 Reviewed by Andreas Kling. * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::getPluginPath): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * UIProcess/WebUIClient.cpp: (WebKit::WebUIClient::pluginLoadPolicy): * UIProcess/WebUIClient.h: (WebUIClient): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): (WebKit::WebPage::canPluginHandleResponse): 2013-02-06 Alexey Proskuryakov Get rid of unneeded writeable preferences. Reviewed by Anders Carlsson. com.apple.HIToolbox.plist and com.apple.WebProcess.plist were made writeable very early in WebKit2 development, before we moved a lot of functionality to UI process. They don't appear to be needed any more. Note that we do not even need to allow reading for com.apple.WebProcess.plist - it's read at process initialization before we enter the sandbox, and services have a different plist anyway. * WebProcess/com.apple.WebProcess.sb.in: 2013-02-06 Sudarsana Nagineni [EFL][WK2] Assertion failure on MiniBrowser exit https://bugs.webkit.org/show_bug.cgi?id=108932 Reviewed by Anders Carlsson. WorkQueue is now refcounted after r141497, so increase ref count when a new job is scheduled and unref it when it finishes. * Platform/efl/WorkQueueEfl.cpp: (WorkQueue::performWork): (WorkQueue::performTimerWork): (WorkQueue::dispatch): (WorkQueue::dispatchAfterDelay): 2013-02-06 Simon Hausmann , Zoltan Arvai [WK2][Win] Fix build after MessageID.h related changes and after r141619. https://bugs.webkit.org/show_bug.cgi?id=108612 Reviewed by Anders Carlsson. * Platform/CoreIPC/win/ConnectionWin.cpp: (CoreIPC::Connection::platformInvalidate): (CoreIPC::Connection::readEventHandler): (CoreIPC::Connection::open): (CoreIPC::Connection::sendOutgoingMessage): * Platform/WorkQueue.h: (WorkQueue::WorkItemWin::queue): (WorkItemWin): * Platform/win/SharedMemoryWin.cpp: (WebKit::SharedMemory::Handle::decode): * Platform/win/WorkQueueWin.cpp: (WorkQueue::handleCallback): (WorkQueue::performWorkOnRegisteredWorkThread): 2013-02-06 Mike West Add an ENABLE_NOSNIFF feature flag. https://bugs.webkit.org/show_bug.cgi?id=109029 Reviewed by Jochen Eisinger. This new flag will control the behavior of 'X-Content-Type-Options: nosniff' when processing script and other resource types. * Configurations/FeatureDefines.xcconfig: 2013-02-06 Marja Hölttä Take referrer policy into account when clearing the referrer header https://bugs.webkit.org/show_bug.cgi?id=86000 Reviewed by Alexey Proskuryakov. The referrer should only be cleared when doing a https -> http redirect, if the policy is "default". Otherwise the referrer should be left intact. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::start): * NetworkProcess/SchedulableLoader.cpp: (WebKit::SchedulableLoader::SchedulableLoader): * NetworkProcess/SchedulableLoader.h: (WebKit::SchedulableLoader::shouldClearReferrerOnHTTPSToHTTPRedirect): (SchedulableLoader): * NetworkProcess/SyncNetworkResourceLoader.cpp: (WebKit::SyncNetworkResourceLoader::start): * NetworkProcess/mac/RemoteNetworkingContext.h: (WebKit::RemoteNetworkingContext::create): (RemoteNetworkingContext): * NetworkProcess/mac/RemoteNetworkingContext.mm: (WebKit::RemoteNetworkingContext::shouldClearReferrerOnHTTPSToHTTPRedirect): (WebKit): (WebKit::RemoteNetworkingContext::RemoteNetworkingContext): * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): (WebKit::NetworkResourceLoadParameters::encode): (WebKit::NetworkResourceLoadParameters::decode): * Shared/Network/NetworkResourceLoadParameters.h: (NetworkResourceLoadParameters): (WebKit::NetworkResourceLoadParameters::shouldClearReferrerOnHTTPSToHTTPRedirect): * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::scheduleSubresourceLoad): (WebKit::WebResourceLoadScheduler::schedulePluginStreamLoad): (WebKit::WebResourceLoadScheduler::scheduleLoad): * WebProcess/Network/WebResourceLoadScheduler.h: (WebResourceLoadScheduler): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::loadResourceSynchronously): 2013-02-06 Mikhail Pozdnyakov [EFL][WK2] Encapsulate Ewk View evas smart object code inside EwkView class https://bugs.webkit.org/show_bug.cgi?id=108062 Reviewed by Kenneth Rohde Christiansen. The Ewk View implementation is encapsulated within EwkView class. Besides multiple refactoring of Ewk View evas smart object code was made. * UIProcess/API/C/efl/WKView.cpp: (createWKView): Aux function to share WKView creation implementation. * UIProcess/API/efl/EwkView.cpp: (smartDataChanged): (defaultSmartClassInstance): (toSmartData): (EwkView::initSmartClassInterface): (EwkView::toEvasObject): (EwkView::smartData): Renamed and moved here from ewk_view. (EwkViewEventHandler): (EwkViewEventHandler::subscribe): (EwkViewEventHandler::unsubscribe): (::handleEvent): Added a new template class to encapsulate Ewk View Evas events handling. (EwkView::EwkView): (EwkView::~EwkView): Constructor and desctructor are private. (EwkView::createEvasObject): Added factory function for ewk view evas objects creation. (EwkView::handleEvasObjectAdd): (EwkView::handleEvasObjectDelete): (EwkView::handleEvasObjectResize): (EwkView::handleEvasObjectMove): (EwkView::handleEvasObjectCalculate): (EwkView::handleEvasObjectShow): (EwkView::handleEvasObjectHide): (EwkView::handleEvasObjectColorSet): Evas_Smart_Class interface callbacks moved into the EwkView class. (EwkView::handleEwkViewFocusIn): (EwkView::handleEwkViewFocusOut): (EwkView::handleEwkViewMouseWheel): (EwkView::handleEwkViewMouseDown): (EwkView::handleEwkViewMouseUp): (EwkView::handleEwkViewMouseMove): (EwkView::handleEwkViewKeyDown): (EwkView::handleEwkViewKeyUp): Ewk_View_Smart_Class interface callback moved into the EwkView class. (EwkView::handleTouchDown): (EwkView::handleTouchUp): (EwkView::handleTouchMove): Renamed. (toEwkView): Aux function to get the EwkView instance fromevas object. (isViewEvasObject): Aux function to check that given evas object is ewk view. * UIProcess/API/efl/EwkView.h: (EwkView::evasObject): (EwkView): * UIProcess/API/efl/ewk_view.cpp: (ewk_view_smart_class_set): (ewk_view_smart_add): (ewk_view_add_with_context): (ewk_view_feed_touch_event): (Ewk_Page_Contents_Context): * UIProcess/API/efl/ewk_view_private.h: Removed. * UIProcess/API/C/efl/WKView.cpp: (WKViewCreate): (WKViewCreateWithFixedLayout): (WKViewCreateSnapshot): * UIProcess/cairo/BackingStoreCairo.cpp: (WebKit::BackingStore::incorporateUpdate): * UIProcess/efl/ContextHistoryClientEfl.cpp: (WebKit::ContextHistoryClientEfl::didNavigateWithNavigationData): (WebKit::ContextHistoryClientEfl::didPerformClientRedirect): (WebKit::ContextHistoryClientEfl::didPerformServerRedirect): (WebKit::ContextHistoryClientEfl::didUpdateHistoryTitle): * UIProcess/efl/PageClientBase.cpp: (WebKit::PageClientBase::processDidCrash): * UIProcess/efl/PageLoadClientEfl.cpp: (WebKit::PageLoadClientEfl::didChangeBackForwardList): * UIProcess/efl/PageUIClientEfl.cpp: (WebKit::PageUIClientEfl::takeFocus): (WebKit::PageUIClientEfl::focus): (WebKit::PageUIClientEfl::unfocus): * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp: (WebKit::WebFullScreenManagerProxy::enterFullScreen): (WebKit::WebFullScreenManagerProxy::exitFullScreen): * UIProcess/efl/WebInspectorProxyEfl.cpp: (WebKit::WebInspectorProxy::platformCreateInspectorPage): * UIProcess/efl/WebPageProxyEfl.cpp: (WebKit::WebPageProxy::viewWidget): Updated due to changes in EwkView interface. 2013-02-05 Tim Horton [wk2] TiledCoreAnimationDrawingArea has one more layer in its CAContext when we're in the background https://bugs.webkit.org/show_bug.cgi?id=108992 Reviewed by Anders Carlsson. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): Add storage for m_isInWindow. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updateLayerHostingContext): Only set the root layer on our layer hosting context if we're in the window when swapping out contexts. (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): Update m_isInWindow, and set the root layer of the layer hosting context (or unset it if we're out of the window). 2013-02-05 Anders Carlsson WebKit clients should be able to override loading of blocked plug-ins https://bugs.webkit.org/show_bug.cgi?id=108968 Reviewed by Sam Weinig. Replace the shouldInstantiatePlugin callback with a new pluginLoadPolicy which is called regardless of whether the plug-in is blocked or not. This lets clients override the plug-in load policy and force loading of blacklisted plug-ins (and vice versa). * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::getPluginPath): * UIProcess/WebUIClient.cpp: (WebKit::toWKPluginLoadPolicy): (WebKit): (WebKit::toPluginModuleLoadPolicy): (WebKit::WebUIClient::pluginLoadPolicy): * UIProcess/WebUIClient.h: (WebUIClient): 2013-02-05 Simon Hausmann [Qt][WK2] Replace more uses of WebPageProxy with WKPage in QQuickWebView https://bugs.webkit.org/show_bug.cgi?id=108826 Reviewed by Kenneth Rohde Christiansen and signed off for WK2 by Benjamin Poulain. This patch converts a few more usages of WebPageProxy to functions in the WKPage API. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (QQuickWebViewLegacyPrivate::zoomFactor): (QQuickWebViewLegacyPrivate::setZoomFactor): (QQuickWebViewExperimental::postMessage): (QQuickWebViewExperimental::userAgent): (QQuickWebViewExperimental::setUserAgent): (QQuickWebViewExperimental::evaluateJavaScript): (QQuickWebViewExperimental::findText): (QQuickWebView::goBack): (QQuickWebView::goForward): (QQuickWebView::stop): (QQuickWebView::reload): (QQuickWebView::setUrl): (QQuickWebView::canGoBack): (QQuickWebView::canGoForward): (QQuickWebView::loading): (QQuickWebView::title): (QQuickWebView::pageRef): (QQuickWebView::loadHtml): (QQuickWebView::runJavaScriptInMainFrame): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): 2013-02-04 Gwang Yoon Hwang Coordinated Graphics : disconnectCustomFilterProgram does not do anything. https://bugs.webkit.org/show_bug.cgi?id=108807 Reviewed by Anders Carlsson. We need to add newly created WebCustomFilterProgramProxy to a hashset to disconnect when CoordinatedLayerTreeHost gets destructed. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::checkCustomFilterProgramProxies): 2013-02-04 Benjamin Poulain Kill suspendAnimation(), resumeAnimation() and numberOfActiveAnimations() from DRT/WTR; use Internals https://bugs.webkit.org/show_bug.cgi?id=108741 Reviewed by Tony Chang. Suspending and resuming application has been useless for a one. Someone just "forgot" WebKit2. * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: * WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h: * WebProcess/WebPage/WebFrame.cpp: * WebProcess/WebPage/WebFrame.h: (WebFrame): 2013-02-04 Jaehun Lim [EFL][WK2] Implement runBeforeUnloadConfirmPanel on EFL https://bugs.webkit.org/show_bug.cgi?id=106979 Reviewed by Benjamin Poulain. Implement runBeforeUnloadConfirmPanel() to support window.onbeforeunload. We can show confirmation window when beforeunload event is fired. * UIProcess/efl/PageUIClientEfl.cpp: (WebKit::PageUIClientEfl::PageUIClientEfl): (WebKit::PageUIClientEfl::runBeforeUnloadConfirmPanel): (WebKit): * UIProcess/efl/PageUIClientEfl.h: (PageUIClientEfl): 2013-02-04 Kenneth Rohde Christiansen [EFL][WK2] Introduce a WebView class as counterpart for WKViewRef https://bugs.webkit.org/show_bug.cgi?id=107931 Reviewed by Anders Carlsson. This is just one step of the new plan for the EFL API. The plan is to move the public EFL-like API on top of the shared WK2 C API, plus a few EFL extensions (WKView class mostly). The EFL-like API can be seen as a convenience API which ties well into EFL and which makes it easy to add web experiences to existing and new EFL applications. It provides a smart object like API and a Evas_Object based view. For more advanced use cases, such as browser and runtime, it is possible to use the WK* C API, which is gives more flexibility while being more low level. The idea is that the WKView class will not depend on Evas_Object and X11 (future plan) unlike the current EFL-like API. This should make it possible to use it for cases where none of these are available. This patch introduces the WebView class which serves as our counterpart for the WKView class, and adds a few needed methods. The EwkView owns the WebView class (and will be constructing it in the near future when the EwkView class has been changed to handle all smart object related code) The clean up of the smart object related code as the proper construction of EwkView and WebView will be done in follow-up patches. * UIProcess/API/C/efl/WKAPICastEfl.h: (WebKit): The WKView API is not based on WebView and not Evas_Object* * UIProcess/API/C/efl/WKView.cpp: (WKViewCreate): (WKViewCreateWithFixedLayout): (WKViewInitialize): (WKViewGetPage): (WKViewSetThemePath): (WKViewSuspendActiveDOMObjectsAndAnimations): (WKViewResumeActiveDOMObjectsAndAnimations): (WKViewGetEvasObject): (WKViewCreateSnapshot): Add a few new WKView EFL C methods, and update existing methods to reflect that the WKViewRef is now a WebView* The construction methods will be rewritten when the smart object construction has been solved. * UIProcess/API/C/efl/WKView.h: * UIProcess/efl/WebView.cpp: Added. (WebKit): (WebKit::WebView::WebView): (WebKit::WebView::~WebView): (WebKit::WebView::initialize): (WebKit::WebView::setThemePath): (WebKit::WebView::suspendActiveDOMObjectsAndAnimations): (WebKit::WebView::resumeActiveDOMObjectsAndAnimations): * UIProcess/efl/WebView.h: Added. (WebKit): (WebView): (WebKit::WebView::pageRef): (WebKit::WebView::evasObject): (WebKit::WebView::page): (WebKit::WebView::type): Add a new WebKit::WebView class for EFL. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): (EwkView::~EwkView): (EwkView::wkPage): (EwkView::setThemePath): (EwkView::createGLSurface): Base methods on C API instead of internal API as much as currently possible. * UIProcess/API/efl/EwkView.h: (WebKit): (WebView): (EwkView): (EwkView::wkView): (EwkView::page): * UIProcess/API/efl/ewk_view.cpp: (createEwkView): (ewk_view_base_add): (ewk_view_smart_add): Modify to return the EwkView class for now. * UIProcess/API/efl/ewk_view_private.h: * UIProcess/efl/WebInspectorProxyEfl.cpp: (WebKit::WebInspectorProxy::platformCreateInspectorPage): Updated due to changed API. 2013-02-04 Anders Carlsson Set up the storage manager as a connection queue https://bugs.webkit.org/show_bug.cgi?id=108879 Reviewed by Sam Weinig. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::processWillOpenConnection): Add the storage manager as a connection queue client. (WebKit::StorageManager::processWillCloseConnection): Remove the storage manager. * UIProcess/WebContext.cpp: (WebKit::WebContext::processWillOpenConnection): Call the storage manager. (WebKit::WebContext::processWillCloseConnection): Call the storage manager. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::connectionWillOpen): Call the context. (WebKit::WebProcessProxy::connectionWillClose): Call the context. (WebKit::WebProcessProxy::didFinishLaunching): Remove a comment. 2013-02-04 Anders Carlsson Send message when creating and destroying StorageAreaProxy objects https://bugs.webkit.org/show_bug.cgi?id=108874 Reviewed by Sam Weinig. * Shared/SecurityOriginData.cpp: (WebKit::SecurityOriginData::fromSecurityOrigin): * Shared/SecurityOriginData.h: (SecurityOriginData): Add helper function for creating a SecurityOriginData object given a WebCore::SecurityOrigin object. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::generateStorageAreaID): New function to create a unique storage area ID. (WebKit::StorageAreaProxy::StorageAreaProxy): Send a CreateStorageArea message. (WebKit::StorageAreaProxy::~StorageAreaProxy): Send a DestroyStorageArea message. (WebKit::StorageAreaProxy::contains): Remove this assertion for now, it fires too often. * WebProcess/Storage/StorageNamespaceProxy.h: (WebKit::StorageNamespaceProxy::storageNamespaceID): Add getter. 2013-02-04 Kenneth Rohde Christiansen [EFL][WK2] Use C API inside EwkView https://bugs.webkit.org/show_bug.cgi?id=108825 Reviewed by Anders Carlsson. A straight-forward port towards the C API. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): Use C API for common default preferences. (EwkView::wkPage): Make it const and remove useless comment. (EwkView::deviceScaleFactor): (EwkView::title): (EwkView::customTextEncodingName): (EwkView::setCustomTextEncodingName): (EwkView::informURLChange): * UIProcess/API/efl/EwkView.h: (EwkView): 2013-02-04 Alexey Proskuryakov Remove an unnecessary sandbox rule. Reviewed by Sam Weinig. * WebProcess/com.apple.WebProcess.sb.in: We already have a file-read rule for /Library/Managed Preferences, no need for another rule for something inside it. 2013-02-04 Brady Eidson WebProcess crashes handling repeated NetworkProcess crashes. and https://bugs.webkit.org/show_bug.cgi?id=108861 Reviewed by Alexey Proskuryakov. - Rename the concept of "unschedulable loader" to "internally failed loader" - When the NetworkProcess crashes, add all outstanding ResourceLoaders into the unschedulable pile. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::WebResourceLoadScheduler): (WebKit::WebResourceLoadScheduler::scheduleLoad): (WebKit::WebResourceLoadScheduler::scheduleInternallyFailedLoad): (WebKit::WebResourceLoadScheduler::internallyFailedLoadTimerFired): (WebKit::WebResourceLoadScheduler::remove): Also remove a non-helpful, out of date comment. (WebKit::WebResourceLoadScheduler::networkProcessCrashed): * WebProcess/Network/WebResourceLoadScheduler.h: WebResourceLoader no longer responds to crashes directly, but now exposes its WebCore ResourceLoader: * WebProcess/Network/WebResourceLoader.cpp: * WebProcess/Network/WebResourceLoader.h: (WebKit::WebResourceLoader::resourceLoader): 2013-02-04 Anders Carlsson Update message generation to use the new queue client semantics https://bugs.webkit.org/show_bug.cgi?id=108865 Reviewed by Andreas Kling. * Scripts/webkit2/messages.py: (connection_work_queue_message_statement): (async_message_statement): (generate_message_handler): * Scripts/webkit2/messages_unittest.py: * Shared/mac/SecItemShim.cpp: (WebKit::SecItemShim::didReceiveMessageOnConnectionWorkQueue): * Shared/mac/SecItemShim.h: (SecItemShim): * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::didReceiveMessageOnConnectionWorkQueue): * UIProcess/Storage/StorageManager.h: (StorageManager): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue): * UIProcess/WebProcessProxy.h: (WebProcessProxy): * UIProcess/mac/SecItemShimProxy.cpp: (WebKit::SecItemShimProxy::didReceiveMessageOnConnectionWorkQueue): * UIProcess/mac/SecItemShimProxy.h: (SecItemShimProxy): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebPage/EventDispatcher.h: (EventDispatcher): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebProcess.h: (WebProcess): 2013-02-04 Abhishek Arya Add ASSERT_WITH_SECURITY_IMPLICATION to detect out of bounds access https://bugs.webkit.org/show_bug.cgi?id=108668 Reviewed by Eric Seidel. * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::HandleArray::operator[]): 2013-02-04 Anders Carlsson Change didReceiveMessageOnConnectionWorkQueue semantics https://bugs.webkit.org/show_bug.cgi?id=108859 Reviewed by Sam Weinig. Change didReceiveMessageOnConnectionWorkQueue to take a reference to an OwnPtr. This lets queue clients handle a message later, on a different work queue for example. Also, get rid of the didHandleMessage boolean, since taking ownership of the decoder implicitly means that the message was handled. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::processIncomingMessage): * Platform/CoreIPC/Connection.h: (QueueClient): * Shared/mac/SecItemShim.cpp: (WebKit::SecItemShim::didReceiveMessageOnConnectionWorkQueue): * Shared/mac/SecItemShim.h: (SecItemShim): * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::StorageManager): (WebKit::StorageManager::didReceiveMessageOnConnectionWorkQueue): * UIProcess/Storage/StorageManager.h: (WebKit): (StorageManager): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue): * UIProcess/WebProcessProxy.h: (WebProcessProxy): * UIProcess/mac/SecItemShimProxy.cpp: (WebKit::SecItemShimProxy::didReceiveMessageOnConnectionWorkQueue): * UIProcess/mac/SecItemShimProxy.h: (SecItemShimProxy): * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebPage/EventDispatcher.h: (EventDispatcher): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebProcess.h: (WebProcess): 2013-02-04 Alexey Proskuryakov Sandbox violation due to MediaAccessibility code trying to access ~/Library/Preferences/com.apple.mediaaccessibility.plist Reviewed by Sam Weinig. * WebProcess/com.apple.WebProcess.sb.in: 2013-02-04 Anders Carlsson Add didCloseOnConnectionWorkQueue to Connection::QueueClient https://bugs.webkit.org/show_bug.cgi?id=108853 Reviewed by Andreas Kling. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::connectionDidClose): * Platform/CoreIPC/Connection.h: (QueueClient): * Shared/mac/SecItemShim.cpp: (WebKit::SecItemShim::didCloseOnConnectionWorkQueue): * Shared/mac/SecItemShim.h: (SecItemShim): * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::didCloseOnConnectionWorkQueue): (WebKit): * UIProcess/Storage/StorageManager.h: (StorageManager): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didCloseOnConnectionWorkQueue): (WebKit): * UIProcess/WebProcessProxy.h: (WebProcessProxy): * UIProcess/mac/SecItemShimProxy.cpp: (WebKit::SecItemShimProxy::didCloseOnConnectionWorkQueue): * UIProcess/mac/SecItemShimProxy.h: (SecItemShimProxy): * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::didCloseOnConnectionWorkQueue): (WebKit): * WebProcess/WebPage/EventDispatcher.h: (EventDispatcher): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didCloseOnConnectionWorkQueue): (WebKit): * WebProcess/WebProcess.h: (WebProcess): 2013-02-04 Martin Robinson Fix GTK+ 'make dist' in preparation for the 1.11.5 release. * GNUmakefile.am: * GNUmakefile.list.am: 2013-02-04 Enrica Casucci Add specific EditActions for Bold and Italic commands. https://bugs.webkit.org/show_bug.cgi?id=108842. Reviewed by Ryosuke Niwa. * UIProcess/WebEditCommandProxy.cpp: (WebKit::WebEditCommandProxy::nameForEditAction): 2013-02-04 Anders Carlsson Use a separate queue for the connection watchdog callback in the web process https://bugs.webkit.org/show_bug.cgi?id=108844 Reviewed by Andreas Kling. Don't pass the connection work queue to the didCloseOnConnectionWorkQueue callback. Instead, create a new, temporary work queue where the exit call will be dispatched to. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::connectionDidClose): * Platform/CoreIPC/Connection.h: (Connection): * Shared/ChildProcess.cpp: (WebKit::didCloseOnConnectionWorkQueue): 2013-02-04 Tim Horton Allow TiledCoreAnimationDrawingArea overlay layers to become tiled https://bugs.webkit.org/show_bug.cgi?id=108729 Reviewed by Anders Carlsson. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): Add didCommitChangesForLayer and storage for the current PlatformLayer corresponding to m_pageOverlayLayer. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::flushLayers): Update the TileCache's visible rect. (WebKit::TiledCoreAnimationDrawingArea::setExposedRect): Forward exposed rect changes to the page overlay layer, if it's tiled. (WebKit::TiledCoreAnimationDrawingArea::mainFrameScrollabilityChanged): Forward scrollability changes to the page overlay layer, if it's tiled. (WebKit::TiledCoreAnimationDrawingArea::createPageOverlayLayer): Allow the page overlay layer to become tiled. Update its exposed rect and whether or not it respects the exposed rect if it's tiled upon creation. (WebKit::TiledCoreAnimationDrawingArea::didCommitChangesForLayer): If a GraphicsLayer's platform layer changes (because it switched to or from a tiled layer), reparent it. If it's switching to a tiled layer, update the exposed rect and whether or not it should respect the exposed rect. 2013-02-04 Anders Carlsson Use UNUSED_PARAM instead of C style comments. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::createStorageArea): 2013-02-04 Christophe Dumez [EFL][WK2] Stop using libsoup in ewk_url_scheme_request https://bugs.webkit.org/show_bug.cgi?id=108816 Reviewed by Anders Carlsson. As we are trying to minimize use of external dependencies in our WK2 EFL API implementation, we should stop using libsoup in ewk_url_scheme_request and use the WK2 C API instead. * UIProcess/API/efl/ewk_url_scheme_request.cpp: (EwkUrlSchemeRequest::EwkUrlSchemeRequest): 2013-02-04 Mikhail Pozdnyakov [WK2][EFL] Weird stripe at the end of the page https://bugs.webkit.org/show_bug.cgi?id=108820 Reviewed by Noam Rosenthal. The page scroll bound was artificially enlarged by one causing the artifact appearance. * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::boundContentsPositionAtScale): 2013-02-04 David Kilzer Sort WebKit2 Xcode project file * WebKit2.xcodeproj/project.pbxproj: 2013-02-04 Simon Hausmann [WK2][Qt] Replace WebPageGroup usage for user scripts with WKPageGroupRef https://bugs.webkit.org/show_bug.cgi?id=108651 Reviewed by Sam Weinig. It's straight-forward port towards the C API. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (readUserScript): (QQuickWebViewPrivate::updateUserScripts): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): 2013-02-04 Balazs Kelemen [Soup] Wrap SoupSession by NetworkStorageSession https://bugs.webkit.org/show_bug.cgi?id=108615 Reviewed by Alexey Proskuryakov. * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp: (WebKit::WebFrameNetworkingContext::storageSession): * WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.h: (WebFrameNetworkingContext): 2013-02-03 David Kilzer Upstream ENABLE_PDFKIT_PLUGIN settting Reviewed by Tim Horton. * Configurations/FeatureDefines.xcconfig: Disable PDFKIT_PLUGIN on iOS since PDFKit is a Mac-only framework. 2013-02-01 Alexey Proskuryakov Silently block one more directory needed for NSApplication initialization. Reviewed by Sam Weinig. * WebProcess/com.apple.WebProcess.sb.in: 2013-02-03 KwangYong Choi Fix build warning after r141648 https://bugs.webkit.org/show_bug.cgi?id=108784 Reviewed by Kentaro Hara. Fix -Wunused-parameter build warning. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::createStorageArea): (WebKit::StorageManager::destroyStorageArea): 2013-02-03 Joanmarie Diggs [GTK] Make distcheck fails https://bugs.webkit.org/show_bug.cgi?id=108756 Reviewed by Kentaro Hara. * GNUmakefile.list.am: Remove header files which no longer exist 2013-02-02 Sam Weinig Remove more LegacyReceivers https://bugs.webkit.org/show_bug.cgi?id=108758 Reviewed by Anders Carlsson. * UIProcess/Downloads/DownloadProxy.cpp: * UIProcess/Downloads/DownloadProxy.messages.in: * UIProcess/WebApplicationCacheManagerProxy.cpp: * UIProcess/WebApplicationCacheManagerProxy.h: (WebApplicationCacheManagerProxy): * UIProcess/WebApplicationCacheManagerProxy.messages.in: * UIProcess/WebCookieManagerProxy.cpp: * UIProcess/WebCookieManagerProxy.h: (WebCookieManagerProxy): * UIProcess/WebCookieManagerProxy.messages.in: * UIProcess/WebDatabaseManagerProxy.cpp: * UIProcess/WebDatabaseManagerProxy.h: (WebDatabaseManagerProxy): * UIProcess/WebDatabaseManagerProxy.messages.in: * UIProcess/mac/RemoteLayerTreeHost.h: (RemoteLayerTreeHost): * UIProcess/mac/RemoteLayerTreeHost.messages.in: * UIProcess/mac/RemoteLayerTreeHost.mm: * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: * WebProcess/ApplicationCache/WebApplicationCacheManager.h: (WebApplicationCacheManager): * WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in: * WebProcess/Cookies/WebCookieManager.cpp: * WebProcess/Cookies/WebCookieManager.h: (WebCookieManager): * WebProcess/Cookies/WebCookieManager.messages.in: * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: * WebProcess/WebCoreSupport/WebDatabaseManager.h: (WebDatabaseManager): * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in: 2013-02-02 Sam Weinig Convert CustomProtocolManagerProxy, CustomProtocolManager and AuthenticationManager to be non-LegacyReceivers https://bugs.webkit.org/show_bug.cgi?id=108757 Reviewed by Anders Carlsson. * Shared/Authentication/AuthenticationManager.cpp: * Shared/Authentication/AuthenticationManager.h: (AuthenticationManager): * Shared/Authentication/AuthenticationManager.messages.in: * Shared/Network/CustomProtocols/CustomProtocolManager.h: (CustomProtocolManager): * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h: (CustomProtocolManagerProxy): * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in: * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm: 2013-02-02 Christophe Dumez [EFL][WK2] Use C API inside ewk_file_chooser_request https://bugs.webkit.org/show_bug.cgi?id=107811 Reviewed by Sam Weinig. Use C API inside ewk_file_chooser_request instead of accessing the internal C++ classes directly, to avoid violating API layering. * UIProcess/API/efl/ewk_file_chooser_request.cpp: (EwkFileChooserRequest::EwkFileChooserRequest): (EwkFileChooserRequest::~EwkFileChooserRequest): (EwkFileChooserRequest::allowMultipleFiles): (EwkFileChooserRequest::acceptedMIMETypes): (EwkFileChooserRequest::cancel): (EwkFileChooserRequest::chooseFiles): (ewk_file_chooser_request_accepted_mimetypes_get): (ewk_file_chooser_request_files_choose): (ewk_file_chooser_request_file_choose): * UIProcess/API/efl/ewk_file_chooser_request_private.h: (EwkFileChooserRequest::create): (EwkFileChooserRequest): * UIProcess/efl/PageUIClientEfl.cpp: (WebKit::PageUIClientEfl::runOpenPanel): 2013-02-02 Sam Weinig Stop keeping a frame tree in the UIProcess https://bugs.webkit.org/show_bug.cgi?id=81728 Reviewed by Oliver Hunt. This patch removes the parent/child relationships of WebFrameProxys in the UIProcess * UIProcess/API/C/WKFrame.cpp: (WKFrameCopyChildFrames): (WKFrameGetParentFrame): * UIProcess/API/C/WKFrame.h: Null out the implementations of WKFrameCopyChildFrames and WKFrameGetParentFrame, but keep them around as their symbols are still needed for nightlies. * UIProcess/WebFrameProxy.cpp: (WebKit::WebFrameProxy::WebFrameProxy): (WebKit::WebFrameProxy::disconnect): * UIProcess/WebFrameProxy.h: Remove parent/child connections. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didCreateSubframe): (WebKit::WebPageProxy::didRemoveFrameFromHierarchy): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::didSaveToPageCache): (WebKit::WebFrameLoaderClient::didRestoreFromPageCache): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::createSubframe): Remove/Update messages that only served to update the parent/child connection. 2013-02-02 Sam Weinig Make it possible to modify the connection from ChildProcessProxy subclasses. Reviewed by Anders Carlsson. * Shared/ChildProcessProxy.cpp: (WebKit::ChildProcessProxy::ChildProcessProxy): (WebKit::ChildProcessProxy::didFinishLaunching): (WebKit::ChildProcessProxy::clearConnection): (WebKit::ChildProcessProxy::connectionWillOpen): (WebKit::ChildProcessProxy::connectionWillClose): * Shared/ChildProcessProxy.h: (ChildProcessProxy): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::WebProcessProxy): (WebKit::WebProcessProxy::connectionWillOpen): (WebKit::WebProcessProxy::connectionWillClose): * UIProcess/WebProcessProxy.h: (WebProcessProxy): 2013-02-02 David Kilzer Upstream iOS FeatureDefines Reviewed by Anders Carlsson. * Configurations/FeatureDefines.xcconfig: - ENABLE_DEVICE_ORIENTATION: Add iOS configurations. - ENABLE_PLUGIN_PROXY_FOR_VIDEO: Ditto. - FEATURE_DEFINES: Add ENABLE_PLUGIN_PROXY_FOR_VIDEO. Add PLATFORM_NAME variant to reduce future merge conflicts. 2013-02-02 Csaba Osztrogonác [Qt][WK2] Unreviewed buildfix after r141648. * DerivedSources.pri: 2013-02-02 Zan Dobersek Follow-up to r141682. Adding build targets for the files that should be generated from the new message.in file. Unreviewed. * GNUmakefile.list.am: 2013-02-01 Zan Dobersek Unreviewed GTK build fix after r141648. * GNUmakefile.am: Add UIProcess/Storage to the list of paths that should be searched for *.messages.in files. 2013-02-01 Gyuyoung Kim Unreviewed build fix after r141648 Needs to add StorageManager.messages.in to CMakeLists.txt. * CMakeLists.txt: 2013-02-01 Benjamin Poulain Build fix for CustomProtocolManagerMac after r141658. * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: (WebKit::CustomProtocolManager::supplementName): I accidentally typed "const" twice twice. 2013-02-01 Benjamin Poulain [WK2] Use light supplement names instead of static AtomicStrings https://bugs.webkit.org/show_bug.cgi?id=108570 Reviewed by Anders Carlsson. Since all the supplement names are just string literals and are all different, we can just use their pointer as the key in the supplement hashmaps. This is lighter and faster than using AtomicString. WebCore already moved to this in Supplementable. * NetworkProcess/NetworkProcess.h: (WebKit::NetworkProcess::addSupplement): (NetworkProcess): * Shared/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::supplementName): * Shared/Authentication/AuthenticationManager.h: (AuthenticationManager): * Shared/Network/CustomProtocols/CustomProtocolManager.h: (CustomProtocolManager): * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: (WebKit::CustomProtocolManager::supplementName): * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::supplementName): * UIProcess/Notifications/WebNotificationManagerProxy.h: (WebNotificationManagerProxy): * UIProcess/WebApplicationCacheManagerProxy.cpp: (WebKit::WebApplicationCacheManagerProxy::supplementName): * UIProcess/WebApplicationCacheManagerProxy.h: (WebApplicationCacheManagerProxy): * UIProcess/WebContext.h: (WebContext): * UIProcess/WebCookieManagerProxy.cpp: (WebKit::WebCookieManagerProxy::supplementName): * UIProcess/WebCookieManagerProxy.h: (WebCookieManagerProxy): * UIProcess/WebDatabaseManagerProxy.cpp: (WebKit::WebDatabaseManagerProxy::supplementName): * UIProcess/WebDatabaseManagerProxy.h: (WebDatabaseManagerProxy): * UIProcess/WebGeolocationManagerProxy.cpp: (WebKit::WebGeolocationManagerProxy::supplementName): * UIProcess/WebGeolocationManagerProxy.h: (WebGeolocationManagerProxy): * UIProcess/WebKeyValueStorageManagerProxy.cpp: (WebKit::WebKeyValueStorageManagerProxy::supplementName): * UIProcess/WebKeyValueStorageManagerProxy.h: (WebKeyValueStorageManagerProxy): * UIProcess/WebMediaCacheManagerProxy.cpp: (WebKit::WebMediaCacheManagerProxy::supplementName): * UIProcess/WebMediaCacheManagerProxy.h: (WebMediaCacheManagerProxy): * UIProcess/WebResourceCacheManagerProxy.cpp: (WebKit::WebResourceCacheManagerProxy::supplementName): * UIProcess/WebResourceCacheManagerProxy.h: (WebResourceCacheManagerProxy): * UIProcess/soup/WebSoupRequestManagerProxy.cpp: (WebKit::WebSoupRequestManagerProxy::supplementName): * UIProcess/soup/WebSoupRequestManagerProxy.h: (WebSoupRequestManagerProxy): * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: (WebKit::WebApplicationCacheManager::supplementName): * WebProcess/ApplicationCache/WebApplicationCacheManager.h: (WebApplicationCacheManager): * 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/MediaCache/WebMediaCacheManager.cpp: (WebKit::WebMediaCacheManager::supplementName): * WebProcess/MediaCache/WebMediaCacheManager.h: (WebMediaCacheManager): * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::supplementName): * WebProcess/Notifications/WebNotificationManager.h: (WebNotificationManager): * WebProcess/ResourceCache/WebResourceCacheManager.cpp: (WebKit::WebResourceCacheManager::supplementName): * WebProcess/ResourceCache/WebResourceCacheManager.h: (WebResourceCacheManager): * WebProcess/Storage/WebKeyValueStorageManager.cpp: (WebKit::WebKeyValueStorageManager::supplementName): * WebProcess/Storage/WebKeyValueStorageManager.h: (WebKeyValueStorageManager): * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: (WebKit::WebDatabaseManager::supplementName): * WebProcess/WebCoreSupport/WebDatabaseManager.h: (WebDatabaseManager): * WebProcess/WebProcess.h: (WebKit::WebProcess::addSupplement): (WebProcess): 2013-02-01 Benjamin Poulain Clean the String->AtomicString conversion for AnimationController::pauseAnimationAtTime https://bugs.webkit.org/show_bug.cgi?id=108558 Reviewed by Dean Jackson. * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: (WKBundleFramePauseAnimationOnElementWithId): * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::pauseAnimationOnElementWithId): * WebProcess/WebPage/WebFrame.h: (WebFrame): 2013-02-01 Anders Carlsson More work on UI side storage https://bugs.webkit.org/show_bug.cgi?id=108700 Reviewed by Sam Weinig. * DerivedSources.make: Add StorageManager.messages.in. * Platform/CoreIPC/HandleMessage.h: (CoreIPC::callMemberFunction): Add new overload. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::didReceiveMessageOnConnectionWorkQueue): Call the right function. (WebKit::StorageManager::createStorageArea): (WebKit::StorageManager::destroyStorageArea): Add stubs. * UIProcess/Storage/StorageManager.messages.in: Added. Add new messages files. * WebKit2.xcodeproj/project.pbxproj: Add new files. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::~StorageAreaProxy): Add another FIXME. (WebKit::StorageAreaProxy::canAccessStorage): (WebKit::StorageAreaProxy::incrementAccessCount): (WebKit::StorageAreaProxy::decrementAccessCount): Implement these. 2013-02-01 Caio Marcelo de Oliveira Filho [Gtk] [WK2] Fix build after r141619 https://bugs.webkit.org/show_bug.cgi?id=108687 Reviewed by Benjamin Poulain. Take a reference instead of a pointer for decoding functions. * Platform/gtk/SharedMemoryGtk.cpp: (WebKit::SharedMemory::Handle::decode): * Shared/gtk/ArgumentCodersGtk.cpp: (CoreIPC::decodeImage): (CoreIPC::decodeDataObject): (CoreIPC::::decode): (CoreIPC::decodeGKeyFile): (CoreIPC::decode): * Shared/gtk/ArgumentCodersGtk.h: * Shared/gtk/LayerTreeContextGtk.cpp: (WebKit::LayerTreeContext::decode): 2013-02-01 Caio Marcelo de Oliveira Filho [EFL] [WK2] Fix build after r141619 https://bugs.webkit.org/show_bug.cgi?id=108683 Reviewed by Benjamin Poulain. Take a reference instead of a pointer for decoding functions. * Shared/WebBatteryStatus.cpp: (WebKit::WebBatteryStatus::Data::decode): * Shared/WebBatteryStatus.h: (Data): * Shared/WebNetworkInfo.cpp: (WebKit::WebNetworkInfo::Data::decode): * Shared/WebNetworkInfo.h: (Data): * Shared/cairo/LayerTreeContextCairo.cpp: (WebKit::LayerTreeContext::decode): * Shared/efl/LayerTreeContextEfl.cpp: (WebKit::LayerTreeContext::decode): * Shared/soup/PlatformCertificateInfo.cpp: (WebKit::PlatformCertificateInfo::decode): * Shared/soup/PlatformCertificateInfo.h: (PlatformCertificateInfo): * Shared/soup/WebCoreArgumentCodersSoup.cpp: (CoreIPC::::decodePlatformData): 2013-02-01 Brady Eidson Clean up WebArchive loading with the NetworkProcess and https://bugs.webkit.org/show_bug.cgi?id=108673 Reviewed by Alexey Proskuryakov. * NetworkProcess/HostRecord.cpp: (WebKit::HostRecord::servePendingRequestsForQueue): Add new logging. (WebKit::HostRecord::servePendingRequests): Tweak existing logging. * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::servePendingRequests): Tweak existing logging. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::scheduleLoad): Handle archive resource scheduling better, and add new logging to better explore archive loading behavior in the future. 2013-02-01 Caio Marcelo de Oliveira Filho [Qt] [WK2] Fix build after r141619 https://bugs.webkit.org/show_bug.cgi?id=108680 Reviewed by Benjamin Poulain. Take a reference instead of a pointer for decoding functions. * Platform/unix/SharedMemoryUnix.cpp: (WebKit::SharedMemory::Handle::decode): * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::::decode): (CoreIPC::decodeTimingFunction): * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h: * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: (WebKit::WebCoordinatedSurface::Handle::decode): * Shared/CoordinatedGraphics/WebCoordinatedSurface.h: (Handle): * Shared/qt/ArgumentCodersQt.cpp: (CoreIPC::::decode): * Shared/qt/ArgumentCodersQt.h: (CoreIPC): * Shared/qt/LayerTreeContextQt.cpp: (WebKit::LayerTreeContext::decode): * Shared/qt/PlatformCertificateInfo.h: (WebKit::PlatformCertificateInfo::decode): * Shared/qt/QtNetworkReplyData.cpp: (WebKit::QtNetworkReplyData::decode): * Shared/qt/QtNetworkReplyData.h: (QtNetworkReplyData): * Shared/qt/QtNetworkRequestData.cpp: (WebKit::QtNetworkRequestData::decode): * Shared/qt/QtNetworkRequestData.h: (QtNetworkRequestData): * Shared/qt/WebCoreArgumentCodersQt.cpp: (CoreIPC::::decodePlatformData): 2013-02-01 Anders Carlsson Message decoding functions should take a MessageDecoder reference https://bugs.webkit.org/show_bug.cgi?id=108669 Reviewed by Andreas Kling. Message encoding functions already take a reference instead of a pointer, so make the decoding functions take a reference as well. * Platform/CoreIPC/ArgumentCoder.h: (CoreIPC::ArgumentCoder::decode): * Platform/CoreIPC/ArgumentCoders.cpp: (CoreIPC::::decode): (CoreIPC::decodeStringText): * Platform/CoreIPC/ArgumentCoders.h: (CoreIPC::SimpleArgumentCoder::decode): * Platform/CoreIPC/ArgumentDecoder.h: (CoreIPC::ArgumentDecoder::decode): * Platform/CoreIPC/Arguments.h: (CoreIPC::Arguments0::decode): (CoreIPC::Arguments1::decode): (CoreIPC::Arguments2::decode): (CoreIPC::Arguments3::decode): (CoreIPC::Arguments4::decode): (CoreIPC::Arguments5::decode): (CoreIPC::Arguments6::decode): (CoreIPC::Arguments7::decode): (CoreIPC::Arguments8::decode): (CoreIPC::Arguments10::decode): * Platform/CoreIPC/Attachment.cpp: (CoreIPC::Attachment::decode): * Platform/CoreIPC/Attachment.h: (Attachment): * Platform/CoreIPC/DataReference.cpp: (CoreIPC::DataReference::decode): * Platform/CoreIPC/DataReference.h: (DataReference): * Platform/CoreIPC/StringReference.cpp: (CoreIPC::StringReference::decode): * Platform/CoreIPC/StringReference.h: (StringReference): * Platform/CoreIPC/mac/MachPort.h: (CoreIPC::MachPort::decode): * Platform/SharedMemory.h: (Handle): * Platform/mac/SharedMemoryMac.cpp: (WebKit::SharedMemory::Handle::decode): * PluginProcess/PluginCreationParameters.cpp: (WebKit::PluginCreationParameters::decode): * PluginProcess/PluginCreationParameters.h: (PluginCreationParameters): * Shared/DictionaryPopupInfo.cpp: (WebKit::DictionaryPopupInfo::decode): * Shared/DictionaryPopupInfo.h: (DictionaryPopupInfo): * Shared/EditorState.cpp: (WebKit::EditorState::decode): * Shared/EditorState.h: (EditorState): * Shared/FontInfo.cpp: (WebKit::FontInfo::decode): * Shared/FontInfo.h: (FontInfo): * Shared/LayerTreeContext.h: (LayerTreeContext): * Shared/Network/NetworkProcessCreationParameters.cpp: (WebKit::NetworkProcessCreationParameters::decode): * Shared/Network/NetworkProcessCreationParameters.h: (NetworkProcessCreationParameters): * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::decode): * Shared/Network/NetworkResourceLoadParameters.h: (NetworkResourceLoadParameters): * Shared/OriginAndDatabases.cpp: (WebKit::OriginAndDatabases::decode): * Shared/OriginAndDatabases.h: (OriginAndDatabases): * Shared/PlatformPopupMenuData.cpp: (WebKit::PlatformPopupMenuData::decode): * Shared/PlatformPopupMenuData.h: (PlatformPopupMenuData): * Shared/Plugins/NPIdentifierData.cpp: (WebKit::NPIdentifierData::decode): * Shared/Plugins/NPIdentifierData.h: (NPIdentifierData): * Shared/Plugins/NPVariantData.cpp: (WebKit::NPVariantData::decode): * Shared/Plugins/NPVariantData.h: (NPVariantData): * Shared/Plugins/PluginProcessCreationParameters.cpp: (WebKit::PluginProcessCreationParameters::decode): * Shared/Plugins/PluginProcessCreationParameters.h: (PluginProcessCreationParameters): * Shared/PrintInfo.cpp: (WebKit::PrintInfo::decode): * Shared/PrintInfo.h: (PrintInfo): * Shared/SandboxExtension.h: (Handle): (HandleArray): (WebKit::SandboxExtension::Handle::decode): (WebKit::SandboxExtension::HandleArray::decode): * Shared/SecurityOriginData.cpp: (WebKit::SecurityOriginData::decode): * Shared/SecurityOriginData.h: (SecurityOriginData): * Shared/SessionState.cpp: (WebKit::SessionState::decode): * Shared/SessionState.h: (SessionState): * Shared/ShareableBitmap.cpp: (WebKit::ShareableBitmap::Handle::decode): * Shared/ShareableBitmap.h: (Handle): * Shared/ShareableResource.cpp: (WebKit::ShareableResource::Handle::decode): * Shared/ShareableResource.h: (Handle): * Shared/SharedWorkerProcessCreationParameters.cpp: (WebKit::SharedWorkerProcessCreationParameters::decode): * Shared/SharedWorkerProcessCreationParameters.h: (SharedWorkerProcessCreationParameters): * Shared/StatisticsData.cpp: (WebKit::StatisticsData::decode): * Shared/StatisticsData.h: (StatisticsData): * Shared/StringPairVector.h: (WebKit::StringPairVector::decode): * Shared/UpdateInfo.cpp: (WebKit::UpdateInfo::decode): * Shared/UpdateInfo.h: (UpdateInfo): * Shared/UserMessageCoders.h: (WebKit::UserMessageDecoder::baseDecode): * Shared/WebContextMenuItemData.cpp: (WebKit::WebContextMenuItemData::decode): * Shared/WebContextMenuItemData.h: (WebContextMenuItemData): * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::decode): (CoreIPC::decodeImage): * Shared/WebCoreArgumentCoders.h: * Shared/WebEvent.cpp: (WebKit::WebEvent::decode): * Shared/WebEvent.h: (WebEvent): (WebMouseEvent): (WebWheelEvent): (WebKeyboardEvent): (WebGestureEvent): (WebPlatformTouchPoint): (WebTouchEvent): * Shared/WebGeolocationPosition.cpp: (WebKit::WebGeolocationPosition::Data::decode): * Shared/WebGeolocationPosition.h: (Data): * Shared/WebGestureEvent.cpp: (WebKit::WebGestureEvent::decode): * Shared/WebHitTestResult.cpp: (WebKit::WebHitTestResult::Data::decode): * Shared/WebHitTestResult.h: (Data): * Shared/WebKeyboardEvent.cpp: (WebKit::WebKeyboardEvent::decode): * Shared/WebMouseEvent.cpp: (WebKit::WebMouseEvent::decode): * Shared/WebNavigationDataStore.h: (WebKit::WebNavigationDataStore::decode): * Shared/WebPageCreationParameters.cpp: (WebKit::WebPageCreationParameters::decode): * Shared/WebPageCreationParameters.h: (WebPageCreationParameters): * Shared/WebPageGroupData.cpp: (WebKit::WebPageGroupData::decode): * Shared/WebPageGroupData.h: (WebPageGroupData): * Shared/WebPlatformTouchPoint.cpp: (WebKit::WebPlatformTouchPoint::decode): * Shared/WebPopupItem.cpp: (WebKit::WebPopupItem::decode): * Shared/WebPopupItem.h: * Shared/WebPreferencesStore.cpp: (WebKit::WebPreferencesStore::decode): * Shared/WebPreferencesStore.h: (WebPreferencesStore): * Shared/WebProcessCreationParameters.cpp: (WebKit::WebProcessCreationParameters::decode): * Shared/WebProcessCreationParameters.h: (WebProcessCreationParameters): * Shared/WebTouchEvent.cpp: (WebKit::WebTouchEvent::decode): * Shared/WebWheelEvent.cpp: (WebKit::WebWheelEvent::decode): * Shared/cf/ArgumentCodersCF.cpp: (CoreIPC::decode): * Shared/cf/ArgumentCodersCF.h: (CoreIPC): * Shared/mac/ArgumentCodersMac.h: (CoreIPC): * Shared/mac/ArgumentCodersMac.mm: (CoreIPC::decode): * Shared/mac/AttributedString.h: (AttributedString): * Shared/mac/AttributedString.mm: (WebKit::AttributedString::decode): * Shared/mac/ColorSpaceData.h: (ColorSpaceData): * Shared/mac/ColorSpaceData.mm: (WebKit::ColorSpaceData::decode): * Shared/mac/LayerTreeContextMac.mm: (WebKit::LayerTreeContext::decode): * Shared/mac/ObjCObjectGraphCoders.h: (WebContextObjCObjectGraphDecoder): (InjectedBundleObjCObjectGraphDecoder): * Shared/mac/ObjCObjectGraphCoders.mm: (WebKit::ObjCObjectGraphDecoder::baseDecode): (WebKit::WebContextObjCObjectGraphDecoderImpl::decode): (WebKit::InjectedBundleObjCObjectGraphDecoderImpl::decode): (WebKit::WebContextObjCObjectGraphDecoder::decode): (WebKit::InjectedBundleObjCObjectGraphDecoder::decode): * Shared/mac/PlatformCertificateInfo.h: (PlatformCertificateInfo): * Shared/mac/PlatformCertificateInfo.mm: (WebKit::PlatformCertificateInfo::decode): * Shared/mac/RemoteLayerTreeTransaction.h: (LayerProperties): (RemoteLayerTreeTransaction): * Shared/mac/RemoteLayerTreeTransaction.mm: (WebKit::RemoteLayerTreeTransaction::LayerProperties::decode): (WebKit::RemoteLayerTreeTransaction::decode): * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::Handle::decode): (WebKit::SandboxExtension::HandleArray::decode): * Shared/mac/SecItemRequestData.cpp: (WebKit::SecItemRequestData::decode): * Shared/mac/SecItemRequestData.h: * Shared/mac/SecItemResponseData.cpp: (WebKit::SecItemResponseData::decode): * Shared/mac/SecItemResponseData.h: (SecItemResponseData): * Shared/mac/WebCoreArgumentCodersMac.mm: (CoreIPC::::decodePlatformData): (CoreIPC::::decode): * UIProcess/WebContextUserMessageCoders.h: (WebKit::WebContextUserMessageDecoder::decode): * WebProcess/InjectedBundle/InjectedBundleUserMessageCoders.h: (WebKit::InjectedBundleUserMessageDecoder::decode): * WebProcess/Plugins/Plugin.cpp: (WebKit::Plugin::Parameters::decode): * WebProcess/Plugins/Plugin.h: (Parameters): 2013-02-01 Carlos Garcia Campos [GTK] Adapt WorkQueueGtk to the latest changes in WebKit2 after r141497 https://bugs.webkit.org/show_bug.cgi?id=108607 Reviewed by Anders Carlsson. * Platform/gtk/WorkQueueGtk.cpp: (WorkQueue::EventSource::executeEventSource): Remove the is valid work queue check. (WorkQueue::EventSource): WorkQueue is now refcounted, so keep a reference when a new job is scheduled and unref it when it finishes. 2013-02-01 Sheriff Bot Unreviewed, rolling out r141319. http://trac.webkit.org/changeset/141319 https://bugs.webkit.org/show_bug.cgi?id=108629 This patch is causing the UIProcess to hang on GTK port when loading plugins (Requested by chris-qBT_laptop on #webkit). * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: (WebKit::PluginProcessProxy::scanPlugin): 2013-02-01 Mikhail Pozdnyakov [EFL][WK2] EwkContext should be based on C WK2 API https://bugs.webkit.org/show_bug.cgi?id=107666 Reviewed by Andreas Kling. EwkContext should be based on C WK2 API so that API layering is not violated. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): * UIProcess/API/efl/ewk_context.cpp: (EwkContext::EwkContext): (EwkContext::create): (EwkContext::cookieManager): (EwkContext::ensureFaviconDatabase): (EwkContext::setFaviconDatabaseDirectoryPath): (EwkContext::addVisitedLink): (EwkContext::setCacheModel): (EwkContext::cacheModel): (EwkContext::setAdditionalPluginPath): (EwkContext::clearResourceCache): * UIProcess/API/efl/ewk_context_private.h: (EwkContext): * UIProcess/API/efl/ewk_view.cpp: (ewk_view_base_add): 2013-02-01 Christophe Dumez [EFL][WK2] Use C API inside ewk_auth_request https://bugs.webkit.org/show_bug.cgi?id=107806 Reviewed by Andreas Kling. Use C API inside ewk_auth_request instead of accessing C++ internal classes directly, to avoid violating layering. * UIProcess/API/efl/ewk_auth_request.cpp: (EwkAuthRequest::EwkAuthRequest): (EwkAuthRequest::suggestedUsername): (EwkAuthRequest::realm): (EwkAuthRequest::host): (EwkAuthRequest::continueWithoutCredential): (EwkAuthRequest::authenticate): (EwkAuthRequest::isRetrying): (ewk_auth_request_authenticate): * UIProcess/API/efl/ewk_auth_request_private.h: (EwkAuthRequest::create): (EwkAuthRequest): * UIProcess/efl/PageLoadClientEfl.cpp: (WebKit::PageLoadClientEfl::didReceiveAuthenticationChallengeInFrame): 2013-02-01 Seulgi Kim [Gtk][WK2] Fix build after recent WebKit2 changes https://bugs.webkit.org/show_bug.cgi?id=108588 Reviewed by Andreas Kling. Don't remove WorkQueue during execution. Following the logic on https://bugs.webkit.org/show_bug.cgi?id=108544 * Platform/gtk/WorkQueueGtk.cpp: (WorkQueue::EventSource::~EventSource): (WorkQueue::EventSource::executeEventSource): (WorkQueue::dispatch): (WorkQueue::dispatchAfterDelay): (WorkQueue::dispatchOnTermination): 2013-02-01 Alexis Menard Enable unprefixed CSS transitions by default. https://bugs.webkit.org/show_bug.cgi?id=108216 Reviewed by Dean Jackson. Rename the flag CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED to CSS_TRANSFORMS_ANIMATIONS_UNPREFIXED which will be used later to guard the unprefixing work for CSS Transforms and animations. * Configurations/FeatureDefines.xcconfig: 2013-02-01 Jae Hyun Park Coordinated Graphics : Sort Target.pri and class declarations in alphabetical order. https://bugs.webkit.org/show_bug.cgi?id=108590 Reviewed by Noam Rosenthal. Sort class declarations in alphabetical order. * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h: (WebCore): 2013-02-01 Gwang Yoon Hwang [EFL][WK2] MiniBrowser segfaults on loading google.com https://bugs.webkit.org/show_bug.cgi?id=108597 Reviewed by Andreas Kling. * Platform/CoreIPC/unix/ConnectionUnix.cpp: (CoreIPC::Connection::processMessage): oolMessageBody should be properly initialized before it is used. This patch also adds omitted break statement. 2013-01-31 Jae Hyun Park [Qt] Add MessageFlags.h in Target.pri https://bugs.webkit.org/show_bug.cgi?id=108583 Reviewed by Kentaro Hara. Since MessageDecoder and MessageEncoder include MessageFlags.h, it should be included in Target.pri. * Target.pri: 2013-01-31 Jae Hyun Park Coordinated Graphics : Move CoordinatedGraphics related files to WebCore https://bugs.webkit.org/show_bug.cgi?id=108149 Reviewed by Noam Rosenthal. This patch moves Coordinated Graphics related code to WebCore. To implement Threaded Coordinated Graphics, most of Coordianted Graphics code should be shared. Therefore, they should reside in WebCore instead of WebKit2. When moving to WebCore, two renamings have been done. 1. Rename LayerTreeRenderer to CoordinatedGraphicsScene. 2. Rename WebCustomFilterProgram and WebCustomFilterOperation to CoordinatedCustomFilterProgram and CoordinatedCustomFilterOperation, respectively. No new tests, covered by existing tests. * CMakeLists.txt: * Scripts/webkit2/messages.py: * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h: * Shared/CoordinatedGraphics/WebCoordinatedSurface.h: * Target.pri: * UIProcess/API/efl/EwkView.cpp: * UIProcess/API/efl/EwkView.h: * UIProcess/API/qt/qquickwebpage.cpp: * UIProcess/API/qt/raw/qrawwebview.cpp: * UIProcess/API/qt/raw/qrawwebview_p.h: * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: * UIProcess/efl/PageClientBase.cpp: * UIProcess/efl/PageViewportControllerClientEfl.cpp: * UIProcess/qt/QtWebPageSGNode.cpp: * UIProcess/qt/QtWebPageSGNode.h: * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 2013-01-31 Rafael Brandao [Qt][WK2] Another attempt to fix build after recent WebKit2 changes https://bugs.webkit.org/show_bug.cgi?id=108548 Reviewed by Anders Carlsson. * Platform/CoreIPC/unix/ConnectionUnix.cpp: (CoreIPC::Connection::platformInvalidate): (CoreIPC::Connection::processMessage): Change Deque to Vector and do similar logic as on patch for https://bugs.webkit.org/show_bug.cgi?id=108517 (CoreIPC::Connection::open): (CoreIPC::Connection::setShouldCloseConnectionOnProcessTermination): * Platform/qt/WorkQueueQt.cpp: Reflect changes on Qt WorkQueue to increase ref count when the execution is started and decrease it when the work item is deleted, following the logic on https://bugs.webkit.org/show_bug.cgi?id=108544 (WorkQueue::WorkItemQt::~WorkItemQt): (WorkQueue::WorkItemQt::execute): (WorkQueue::dispatch): (WorkQueue::dispatchAfterDelay): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::getPluginPath): This function was moved from WebProcessProxy but mac specific code was not protected properly: https://bugs.webkit.org/show_bug.cgi?id=108407 2013-01-31 Changhun Kang Rename from parentOrHost* to parentOrShadowHost* in Node.h. https://bugs.webkit.org/show_bug.cgi?id=108308 Reviewed by Dimitri Glazkov. 2013-01-31 Anders Carlsson StorageManager should be ref-counted https://bugs.webkit.org/show_bug.cgi?id=108553 Reviewed by Beth Dakin. It's likely we'd want to have the storage manager outlive its context at times, so make it reference counted. * UIProcess/Storage/StorageManager.cpp: (WebKit::StorageManager::create): (WebKit): * UIProcess/Storage/StorageManager.h: (StorageManager): * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): * UIProcess/WebContext.h: (WebContext): 2013-01-31 Anders Carlsson WorkQueue should be a ref-counted class https://bugs.webkit.org/show_bug.cgi?id=108544 Reviewed by Sam Weinig. Make WorkQueue a ref-counted class that's implicitly ref()'d when dispatching a function to it, and then implicitly deref()'d when the function is done executing. This matches the behavior of dispatch queues, and ensures that the WorkQueue object won't go away while dispatched functions are running. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::Connection): (CoreIPC::Connection::~Connection): (CoreIPC::Connection::addQueueClient): (CoreIPC::Connection::removeQueueClient): (CoreIPC::Connection::invalidate): (CoreIPC::Connection::sendMessage): (CoreIPC::Connection::postConnectionDidCloseOnConnectionWorkQueue): (CoreIPC::Connection::connectionDidClose): * Platform/CoreIPC/Connection.h: (Connection): * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC::createDataAvailableSource): (CoreIPC::Connection::open): (CoreIPC::Connection::initializeDeadNameSource): * Platform/WorkQueue.cpp: (WorkQueue::create): (WorkQueue::WorkQueue): (WorkQueue::~WorkQueue): * Platform/WorkQueue.h: (WorkQueue): * Platform/mac/WorkQueueMac.cpp: (WorkQueue::dispatch): (WorkQueue::dispatchAfterDelay): * Shared/ChildProcess.cpp: (WebKit::didCloseOnConnectionWorkQueue): * UIProcess/Launcher/ProcessLauncher.cpp: (WebKit::processLauncherWorkQueue): (WebKit::ProcessLauncher::ProcessLauncher): * UIProcess/WebProcessProxy.cpp: (WebKit::pluginWorkQueue): (WebKit::WebProcessProxy::getPlugins): 2013-01-31 Rafael Brandao [Qt][WK2] Fix build after removal of MessageID.h https://bugs.webkit.org/show_bug.cgi?id=108534 Reviewed by Anders Carlsson. * Platform/CoreIPC/unix/ConnectionUnix.cpp: (CoreIPC::MessageInfo::MessageInfo): (CoreIPC::MessageInfo::setMessageBodyIsOutOfLine): (CoreIPC::MessageInfo::isMessageBodyIsOutOfLine): (MessageInfo): (CoreIPC::Connection::processMessage): (CoreIPC::Connection::sendOutgoingMessage): * Target.pri: * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: * UIProcess/DrawingAreaProxy.cpp: * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: * WebProcess/soup/WebSoupRequestManager.cpp: 2013-01-31 Brady Eidson Assertion failure in WebResourceLoadScheduler::remove when loading .webarchives and https://bugs.webkit.org/show_bug.cgi?id=108520 Reviewed by Alexey Proskuryakov. * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::scheduleLoad): Even if it isn't to be scheduled with the NetworkProcess, still add this ResourceLoader to the scheduler's records. 2013-01-31 Simon Hausmann Unreviewed trivial Unix build fix. Use Vector<> instead of Deque<> when iterating over m_attachments in the USE(UNIX_DOMAIN_SOCKETS) case. * Platform/CoreIPC/ArgumentDecoder.cpp: 2013-01-30 Brian Weinstein Add a call to the page UI client to determine if a plug-in should load https://bugs.webkit.org/show_bug.cgi?id=108407 Reviewed by Anders Carlsson. This patch adds a client call to the WKPageUIClient to be called to determine whether or not a plug-in should load. * UIProcess/API/C/WKPage.h: Add shouldLoadPlugin. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::getPluginPath): Moved from WebProcessProxy, and added a call to m_uiClient.shouldInstantiatePlugin. * UIProcess/WebPageProxy.h: * UIProcss/WebPageProxy.messages.in: Moved GetPluginPath from WebProcessProxy to WebPageProxy. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::getPluginPath): Moved to WebPageProxy. * UIProcess/WebProcessProxy.h: * UIProcess/WebUIClient.cpp: (WebKit::WebUIClient::shouldInstantiatePlugin): Return that we should load the plug-in if the client function isn't defined, and call the function if it is. * UIProcess/WebUIClient.h: * UIProcess/mac/WebInspectorProxyMac.mm: (WebKit::WebInspectorProxy::platformCreateInspectorPage): Add an entry for the new client function. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::createPlugin): Send the message to the WebPageProxy, not the WebProcessProxy. (WebKit::WebPage::canPluginHandleResponse): Made a member function, so it can call sendSync, and send the message to the WebPageProxy, not the WebProcessProxy. * WebProcess/WebPage/WebPage.h: 2013-01-31 Anders Carlsson Use a Vector for IPC attachments https://bugs.webkit.org/show_bug.cgi?id=108517 Reviewed by Sam Weinig. We don't need to use a Deque for attachments - we can just deserialize the attachments backwards instead. * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::ArgumentDecoder::create): (CoreIPC::ArgumentDecoder::ArgumentDecoder): (CoreIPC::ArgumentDecoder::removeAttachment): * Platform/CoreIPC/ArgumentDecoder.h: (ArgumentDecoder): * Platform/CoreIPC/Connection.h: * Platform/CoreIPC/MessageDecoder.cpp: (CoreIPC::MessageDecoder::create): (CoreIPC::MessageDecoder::MessageDecoder): * Platform/CoreIPC/MessageDecoder.h: (MessageDecoder): * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC::createMessageDecoder): 2013-01-31 Joseph Pecoraro Disable ENABLE_FULLSCREEN_API on iOS https://bugs.webkit.org/show_bug.cgi?id=108250 Reviewed by Benjamin Poulain. * Configurations/FeatureDefines.xcconfig: 2013-01-31 Enrica Casucci WebKit2: provide new bundle APIs to allow bundle clients to be notified of pasteboard access. https://bugs.webkit.org/show_bug.cgi?id=108396. Reviewed by Alexey Proskuryakov. This patch adds new bundle client API to receive notifications relative the pasteboard activity. There are 2 new API added to InjectedBundleEditorClient, to receive notification before and after the pasteboard content is added and one API to provide additional content to add to the pasteboard. In order to create content to add to the pasteboard, WKWebArchiveRef and WKWebArchiveResourcesRef have been added to the set of API level object. This work is a joint effort with Sam Weinig who contributed the support for WKWebArchiveRef, WKWebArchiveResourcesRef and related files. Sam is the author of the first chunk of changes listed below. * Shared/API/c/WKBase.h: * Shared/API/c/WKSharedAPICast.h: * Shared/API/c/mac/WKWebArchive.cpp: Added. (WKWebArchiveGetTypeID): (WKWebArchiveCreate): (WKWebArchiveCreateWithData): (WKWebArchiveCreateFromRange): (WKWebArchiveCopyMainResource): (WKWebArchiveCopySubresources): (WKWebArchiveCopySubframeArchives): (WKWebArchiveCopyData): * Shared/API/c/mac/WKWebArchive.h: Added. * Shared/API/c/mac/WKWebArchiveResource.cpp: Added. (WKWebArchiveResourceGetTypeID): (WKWebArchiveResourceCreate): (WKWebArchiveResourceCopyData): (WKWebArchiveResourceCopyURL): (WKWebArchiveResourceCopyMIMEType): (WKWebArchiveResourceCopyTextEncoding): * Shared/API/c/mac/WKWebArchiveResource.h: Added. * Shared/APIObject.h: * Shared/WebArchive.cpp: Added. (WebKit::WebArchive::create): (WebKit::WebArchive::WebArchive): (WebKit::WebArchive::~WebArchive): (WebKit::WebArchive::mainResource): (WebKit::WebArchive::subresources): (WebKit::WebArchive::subframeArchives): (WebKit::releaseCFData): (WebKit::WebArchive::data): (WebKit::WebArchive::coreLegacyWebArchive): * Shared/WebArchive.h: Added. (WebKit::WebArchive::type): * Shared/WebArchiveResource.cpp: Added. (WebKit::WebArchiveResource::create): (WebKit::WebArchiveResource::WebArchiveResource): (WebKit::WebArchiveResource::~WebArchiveResource): (WebKit::releaseCFData): (WebKit::WebArchiveResource::data): (WebKit::WebArchiveResource::URL): (WebKit::WebArchiveResource::MIMEType): (WebKit::WebArchiveResource::textEncoding): (WebKit::WebArchiveResource::coreArchiveResource): * Shared/WebArchiveResource.h: Added. (WebKit::WebArchiveResource::type): * WebKit2.xcodeproj/project.pbxproj: * Shared/APIClientTraits.cpp: Added versioning to InjectedBundlePageEditorClient. * Shared/APIClientTraits.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.cpp: (WebKit::InjectedBundlePageEditorClient::willWriteToPasteboard): Added. (WebKit::InjectedBundlePageEditorClient::getPasteboardDataForRange): Added. (WebKit::InjectedBundlePageEditorClient::didWriteToPasteboard): Added. * WebProcess/InjectedBundle/InjectedBundlePageEditorClient.h: * WebProcess/WebCoreSupport/WebEditorClient.cpp: (WebKit::WebEditorClient::didWriteSelectionToPasteboard): (WebKit::WebEditorClient::willWriteSelectionToPasteboard): (WebKit::WebEditorClient::getClientPasteboardDataForRange): * WebProcess/WebCoreSupport/WebEditorClient.h: 2013-01-31 Anders Carlsson Remove MessageID.h https://bugs.webkit.org/show_bug.cgi?id=108516 Reviewed by Sam Weinig. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::processIncomingMessage): (CoreIPC::Connection::sendOutgoingMessages): (CoreIPC::Connection::dispatchSyncMessage): (CoreIPC::Connection::dispatchMessage): * Platform/CoreIPC/Connection.h: (CoreIPC): (Connection): * Platform/CoreIPC/MessageID.h: Removed. * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC::Connection::sendOutgoingMessage): (CoreIPC::Connection::receiveSourceEventHandler): * Shared/CoreIPCSupport/WebConnectionMessageKinds.h: Removed. * Shared/CoreIPCSupport/WebContextMessageKinds.h: * UIProcess/DrawingAreaProxy.h: (CoreIPC): * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h: * UIProcess/WebApplicationCacheManagerProxy.h: * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): (WebKit::WebContext::didReceiveMessage): (WebKit::WebContext::didReceiveSyncMessage): * UIProcess/WebCookieManagerProxy.h: * UIProcess/WebFrameProxy.h: (CoreIPC): * UIProcess/WebFullScreenManagerProxy.h: (CoreIPC): * UIProcess/WebIconDatabase.h: (CoreIPC): * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: (CoreIPC): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/FullScreen/WebFullScreenManager.cpp: * WebProcess/FullScreen/WebFullScreenManager.h: (CoreIPC): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::postMessage): (WebKit::InjectedBundle::postSynchronousMessage): * WebProcess/InjectedBundle/InjectedBundle.h: (CoreIPC): * WebProcess/WebPage/DrawingArea.h: (CoreIPC): * WebProcess/WebPage/LayerTreeHost.h: (CoreIPC): * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: (CoreIPC): * WebProcess/WebPage/WebPageGroupProxy.h: (CoreIPC): 2013-01-31 Mike West Cleanup: Use ScriptExecutionContext::topOrigin when relevant. https://bugs.webkit.org/show_bug.cgi?id=108476 Reviewed by Anders Carlsson. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::storageBlockingStateChanged): (WebKit::PluginView::isPrivateBrowsingEnabled): 2013-01-31 Anders Carlsson Get rid of IncomingMessage https://bugs.webkit.org/show_bug.cgi?id=108514 Reviewed by Sam Weinig. * Platform/CoreIPC/Connection.cpp: (Connection::SyncMessageState): (ConnectionAndIncomingMessage): (CoreIPC::Connection::SyncMessageState::~SyncMessageState): (CoreIPC::Connection::SyncMessageState::processIncomingMessage): (CoreIPC::Connection::SyncMessageState::dispatchMessages): (CoreIPC::Connection::waitForMessage): (CoreIPC::Connection::processIncomingMessage): (CoreIPC::Connection::enqueueIncomingMessage): (CoreIPC::Connection::dispatchMessage): (CoreIPC::Connection::dispatchOneMessage): * Platform/CoreIPC/Connection.h: (Connection): 2013-01-31 Patrick Gansterer Remove PLATFORM(WIN_CAIRO) from NetscapePluginX11.cpp https://bugs.webkit.org/show_bug.cgi?id=108439 Reviewed by Brent Fulgham. PLATFORM(WIN_CAIRO) is Windows only, where no X11 exists. * WebProcess/Plugins/Netscape/x11/NetscapePluginX11.cpp: 2013-01-31 Simon Hausmann Unreviewed build fix: Remove Web Intents files from the Qt build system. * Target.pri: 2013-01-31 Zan Dobersek Unreviewed GTK build fix. Removing build targets for Web Intents files that were removed in r141448. * GNUmakefile.list.am: 2013-01-31 Anders Carlsson Remove Web Intents code from WebKit2 https://bugs.webkit.org/show_bug.cgi?id=108506 Reviewed by Simon Fraser. Since nobody builds with Web Intents enabled anymore, and since the code is going to be removed from WebCore, remove it from WebKit2. * Shared/API/c/WKBase.h: * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIObject.h: * Shared/IntentData.cpp: Removed. * Shared/IntentData.h: Removed. * Shared/IntentServiceInfo.cpp: Removed. * Shared/IntentServiceInfo.h: Removed. * Shared/WebIntentServiceInfo.cpp: Removed. * Shared/WebIntentServiceInfo.h: Removed. * UIProcess/API/C/WKAPICast.h: (WebKit): * UIProcess/API/C/WKIntentData.cpp: Removed. * UIProcess/API/C/WKIntentData.h: Removed. * UIProcess/API/C/WKIntentServiceInfo.cpp: Removed. * UIProcess/API/C/WKIntentServiceInfo.h: Removed. * UIProcess/API/C/WKPage.cpp: * UIProcess/API/C/WKPage.h: * UIProcess/WebIntentData.cpp: Removed. * UIProcess/WebIntentData.h: Removed. * UIProcess/WebLoaderClient.cpp: * UIProcess/WebLoaderClient.h: (WebKit): (WebLoaderClient): * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: (WebKit): (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * UIProcess/WebProcessProxy.cpp: * UIProcess/WebProcessProxy.h: (WebProcessProxy): * WebProcess/InjectedBundle/API/c/WKBundleAPICast.h: (WebKit): * WebProcess/InjectedBundle/API/c/WKBundleIntent.cpp: Removed. * WebProcess/InjectedBundle/API/c/WKBundleIntent.h: Removed. * WebProcess/InjectedBundle/API/c/WKBundleIntentRequest.cpp: Removed. * WebProcess/InjectedBundle/API/c/WKBundleIntentRequest.h: Removed. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundleIntent.cpp: Removed. * WebProcess/InjectedBundle/InjectedBundleIntent.h: Removed. * WebProcess/InjectedBundle/InjectedBundleIntentRequest.cpp: Removed. * WebProcess/InjectedBundle/InjectedBundleIntentRequest.h: Removed. * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: (WebKit): (InjectedBundlePageLoaderClient): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit): * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: (WebFrameLoaderClient): * WebProcess/WebPage/WebFrame.cpp: * WebProcess/WebPage/WebFrame.h: (WebCore): (WebKit): (WebFrame): * WebProcess/WebPage/WebPage.cpp: * WebProcess/WebPage/WebPage.h: (WebCore): (WebKit): (WebPage): * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebProcess.cpp: * WebProcess/WebProcess.h: (WebCore): (WebProcess): * WebProcess/WebProcess.messages.in: 2013-01-31 Brady Eidson Lack of a log level string should not obliterate compiled in logging channel state. https://bugs.webkit.org/show_bug.cgi?id=108502 Reviewed by Alexey Proskuryakov and Sam Weinig. * Platform/mac/Logging.mac.mm: (WebKit::initializeLogChannel): If there's no log level string, leave the channel state alone. 2013-01-31 Alexey Proskuryakov WebProcess sandbox profile overhaul. Reviewed by Sam Weinig. Moves some rules together by susbystem for easier maintenance. Addresses , , , . * WebProcess/com.apple.WebProcess.sb.in: 2013-01-31 Simon Hausmann Unreviewed trivial build fix: Pre C++11 the use of >> in nested templates is ambiguous in the grammar and requires the insertion of a space here. Since these files are not Mac specific we don't require C++11 yet and a space fixes the build. * Platform/CoreIPC/Connection.h: (Connection): * Shared/ChildProcessProxy.h: (ChildProcessProxy): 2013-01-31 Christophe Dumez [EFL] Disable Web Intents https://bugs.webkit.org/show_bug.cgi?id=108457 Reviewed by Alexey Proskuryakov. Remove code related to Web Intents from EFL WebKit2. * CMakeLists.txt: * PlatformEfl.cmake: * UIProcess/API/efl/EWebKit2.h: * UIProcess/API/efl/EwkViewCallbacks.h: * UIProcess/API/efl/ewk_intent.cpp: Removed. * UIProcess/API/efl/ewk_intent.h: Removed. * UIProcess/API/efl/ewk_intent_private.h: Removed. * UIProcess/API/efl/ewk_intent_service.cpp: Removed. * UIProcess/API/efl/ewk_intent_service.h: Removed. * UIProcess/API/efl/ewk_intent_service_private.h: Removed. * UIProcess/API/efl/ewk_view.cpp: * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/tests/resources/intent-request.html: Removed. * UIProcess/API/efl/tests/resources/intent-service.html: Removed. * UIProcess/API/efl/tests/test_ewk2_intents.cpp: Removed. * UIProcess/efl/PageLoadClientEfl.cpp: (WebKit::PageLoadClientEfl::PageLoadClientEfl): * UIProcess/efl/PageLoadClientEfl.h: (PageLoadClientEfl): 2013-01-31 Alexey Proskuryakov PPT: Make loading file URLs work with a sandboxed NetworkProcess Address review comments. * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: * WebProcess/com.apple.WebProcess.sb.in: 2013-01-31 Anders Carlsson Stop using OutgoingMessage https://bugs.webkit.org/show_bug.cgi?id=108495 Reviewed by Sam Weinig. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendMessage): (CoreIPC::Connection::sendOutgoingMessages): * Platform/CoreIPC/Connection.h: (Connection): * Shared/ChildProcessProxy.cpp: (WebKit::ChildProcessProxy::~ChildProcessProxy): (WebKit::ChildProcessProxy::sendMessage): (WebKit::ChildProcessProxy::didFinishLaunching): * Shared/ChildProcessProxy.h: (ChildProcessProxy): 2013-01-31 Simon Hausmann [Qt] Make it possible to compile WebKit2 Qt related files without access to internal WK2 C++ API https://bugs.webkit.org/show_bug.cgi?id=108472 Reviewed by Andreas Kling. Add a new module to the qmake build system that represents the part of the WebKit2 Qt integration that doesn't depend on WebKit2 internals. Changed qwebnavigationhistory.cpp to not use any internal headers and compile it as part of the internals-free module. * Target.pri: * UIProcess/API/qt/qwebnavigationhistory.cpp: * WebKit2.pro: * WebKit2QML.pri: Added. 2013-01-31 Simon Hausmann Unreviewed trivial build fix: Add missing virtual destructor to LayerTreeRendererClient. Otherwise the build with -Werror breaks, which complains (rightly so) that we're deleting a sub-class where the super class doesn't have a virtual destructor. * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: (WebKit::LayerTreeRendererClient::~LayerTreeRendererClient): 2013-01-31 Seulgi Kim Coordinated Graphics: view the debug border/repaint count of the non composited layer. https://bugs.webkit.org/show_bug.cgi?id=108401 Reviewed by Noam Rosenthal. Make non-compositing layer draw debug border and show repaint counter accroding to settings. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): 2013-01-31 Paweł Forysiuk InjectedBundle is being built even with --disable-webkit2 https://bugs.webkit.org/show_bug.cgi?id=108364 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: Wrap Injected bundle with ENABLE_WEBKIT2 condition 2013-01-31 Mikhail Pozdnyakov [EFL][WK2] RequestManagerClientEfl, DownloadManagerEfl and ContextHistoryClientEfl should be based on C API https://bugs.webkit.org/show_bug.cgi?id=107685 Reviewed by Benjamin Poulain. RequestManagerClientEfl, DownloadManagerEfl and ContextHistoryClientEfl should be based on C API so that API layering is not violated. * UIProcess/API/efl/ewk_context.cpp: (EwkContext::EwkContext): * UIProcess/efl/ContextHistoryClientEfl.cpp: (WebKit::ContextHistoryClientEfl::ContextHistoryClientEfl): (WebKit::ContextHistoryClientEfl::~ContextHistoryClientEfl): * UIProcess/efl/ContextHistoryClientEfl.h: (WebKit::ContextHistoryClientEfl::create): (ContextHistoryClientEfl): * UIProcess/efl/DownloadManagerEfl.cpp: (WebKit::DownloadManagerEfl::DownloadManagerEfl): (WebKit::DownloadManagerEfl::~DownloadManagerEfl): * UIProcess/efl/DownloadManagerEfl.h: (WebKit::DownloadManagerEfl::create): (DownloadManagerEfl): * UIProcess/efl/RequestManagerClientEfl.cpp: (WebKit::RequestManagerClientEfl::RequestManagerClientEfl): * UIProcess/efl/RequestManagerClientEfl.h: (WebKit::RequestManagerClientEfl::create): (RequestManagerClientEfl): 2013-01-31 Sheriff Bot Unreviewed, rolling out r141110. http://trac.webkit.org/changeset/141110 https://bugs.webkit.org/show_bug.cgi?id=108349 This patch broke WK2-EFL unit tests (Requested by grzegorz on #webkit). * UIProcess/efl/TextCheckerEfl.cpp: * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: 2013-01-31 Jae Hyun Park Coordinated Graphics : Remove WebCoordinatedSurface dependency from CoordinatedSurface https://bugs.webkit.org/show_bug.cgi?id=108259 Reviewed by Noam Rosenthal. This is a preparation patch for Threaded Coordinated Graphics. WebCoordinatedSurface dependency should be removed from CoordinatedSurface so as to share CoordinatedSurface between WebCoordinatedSurface and CoordinatedSurface of WebKit1, which will be implemented for Threaded Coordinated Graphics. This patch introduces CoordinatedSurface::Factory, which is a function pointer that creates CoordinatedSurfaces. CoordinatedLayerTreeHost sets static CoordinatedSurface::Factory member variable. Classes that use CoordinatedSurface, which are CoordinatedImageBacking and UpdateAtlas, create CoordinatedSurfaces by calling CoordinatedSurface::create, which will call the function set by CoordinatedLayerTreeHost. This way, we can remove the WebCoordinatedSurface dependency from CoordinatedSurface and be able to share the code in Threaded Coordinated Graphics. No new tests. No change in behavior. * CMakeLists.txt: * Shared/CoordinatedGraphics/CoordinatedSurface.cpp: Added. (WebKit): (WebKit::CoordinatedSurface::setFactory): (WebKit::CoordinatedSurface::create): * Shared/CoordinatedGraphics/CoordinatedSurface.h: (CoordinatedSurface): * Shared/CoordinatedGraphics/WebCoordinatedSurface.cpp: * Target.pri: * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::createCoordinatedSurface): (WebKit): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 2013-01-30 Tim Horton Unreviewed build fix after http://trac.webkit.org/changeset/141372. * WebProcess/Plugins/PDF/PDFPlugin.mm: (WebKit::PDFPlugin::performDictionaryLookupAtLocation): 2013-01-30 Jae Hyun Park Coordinated Graphics : Remove CoordinatedLayerTreeHostProxy dependency from LayerTreeRenderer https://bugs.webkit.org/show_bug.cgi?id=108164 Reviewed by Benjamin Poulain. This is a preparation patch for Threaded Coordinated Graphics. LayerTreeRenderer should not depend on CoordinatedLayerTreeHostProxy so that it can be moved to WebCore. This patch introduces LayerTreeRendererClient which is implemented in CoordinatedLayerTreeHostProxy. LayerTreeRenderer uses this client, instead of using CoordinatedLayerTreeHostProxy directly. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (CoordinatedLayerTreeHostProxy): * 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): (LayerTreeRendererClient): (LayerTreeRenderer): 2013-01-30 Tim Horton PDFPlugin: Should respond to three-finger tap for dictionary definitions https://bugs.webkit.org/show_bug.cgi?id=108418 Reviewed by Simon Fraser. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Add default implementation of performDictionaryLookupAtLocation. * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add getSelectionForWordAtPoint and searchInDictionaryWithSelection. * WebProcess/Plugins/PDF/PDFPlugin.h: Add performDictionaryLookupAtLocation. * WebProcess/Plugins/PDF/PDFPlugin.mm: Grab a PDFSelection representing the word encompassing the given point, and throw up a dictionary popover. (WebKit::PDFPlugin::performDictionaryLookupAtLocation): * WebProcess/Plugins/PDF/SimplePDFPlugin.h: Add default implementation of performDictionaryLookupAtLocation. * WebProcess/Plugins/Plugin.h: Add performDictionaryLookupAtLocation. * WebProcess/Plugins/PluginProxy.h: Add default implementation of performDictionaryLookupAtLocation. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::performDictionaryLookupAtLocation): Forward performDictionaryLookupAtLocation to the plugin. * WebProcess/Plugins/PluginView.h: Add performDictionaryLookupAtLocation. * WebProcess/WebPage/mac/WebPageMac.mm: (WebKit::WebPage::performDictionaryLookupAtLocation): Intercept performDictionaryLookupAtLocation, and give the main-frame plugin (if it exists) a chance to handle it. 2013-01-30 Gyuyoung Kim [WK2] Cleanup MessageID parameter after r141332 https://bugs.webkit.org/show_bug.cgi?id=108419 Unreviewed to fix build breaks. r141332 didn't remove MessageID parameter on some features. (battery, vibration, coordinate graphics, network info and so on) * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (CoordinatedLayerTreeHostProxy): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::didReceiveCoordinatedLayerTreeHostProxyMessage): * UIProcess/WebBatteryManagerProxy.h: (WebBatteryManagerProxy): * UIProcess/WebNetworkInfoManagerProxy.h: (WebNetworkInfoManagerProxy): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveMessage): * UIProcess/WebVibrationProxy.h: (WebVibrationProxy): * UIProcess/soup/WebSoupRequestManagerProxy.h: (WebSoupRequestManagerProxy): * WebProcess/Battery/WebBatteryManager.h: (WebBatteryManager): * WebProcess/NetworkInfo/WebNetworkInfoManager.h: (WebNetworkInfoManager): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::didReceiveCoordinatedLayerTreeHostMessage): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didReceiveMessage): * WebProcess/soup/WebSoupRequestManager.h: (WebSoupRequestManager): 2013-01-30 Anders Carlsson Remove MessageID from MessageSender https://bugs.webkit.org/show_bug.cgi?id=108413 Reviewed by Andreas Kling. This is another step towards eliminating MessageID. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage): * NetworkProcess/NetworkConnectionToWebProcess.h: (NetworkConnectionToWebProcess): * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::didReceiveMessage): (WebKit::NetworkProcess::didReceiveSyncMessage): * NetworkProcess/NetworkProcess.h: (NetworkProcess): * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::processIncomingMessage): (CoreIPC::Connection::dispatchSyncMessage): (CoreIPC::Connection::dispatchMessage): * Platform/CoreIPC/Connection.h: (QueueClient): (CoreIPC::Connection::waitForAndDispatchImmediately): * Platform/CoreIPC/MessageReceiver.h: (MessageReceiver): (CoreIPC::MessageReceiver::didReceiveSyncMessage): * Platform/CoreIPC/MessageReceiverMap.cpp: (CoreIPC::MessageReceiverMap::dispatchMessage): (CoreIPC::MessageReceiverMap::dispatchSyncMessage): * Platform/CoreIPC/MessageReceiverMap.h: (MessageReceiverMap): * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::didReceiveMessage): * PluginProcess/PluginProcess.h: (PluginProcess): * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::didReceiveMessage): (WebKit::WebProcessConnection::didReceiveSyncMessage): * PluginProcess/WebProcessConnection.h: (WebProcessConnection): * Scripts/webkit2/messages.py: (forward_declarations_and_headers): (generate_message_handler): * Scripts/webkit2/messages_unittest.py: * Shared/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::didReceiveMessage): * Shared/Authentication/AuthenticationManager.h: (AuthenticationManager): * Shared/ChildProcessProxy.cpp: (WebKit::ChildProcessProxy::sendMessage): * Shared/ChildProcessProxy.h: (ChildProcessProxy): (WebKit::ChildProcessProxy::send): * Shared/Network/CustomProtocols/CustomProtocolManager.h: (CustomProtocolManager): * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: (WebKit::CustomProtocolManager::didReceiveMessage): * Shared/Plugins/NPRemoteObjectMap.cpp: (WebKit::NPRemoteObjectMap::didReceiveSyncMessage): * Shared/Plugins/NPRemoteObjectMap.h: (NPRemoteObjectMap): * Shared/WebConnection.cpp: (WebKit::WebConnection::didReceiveMessage): * Shared/WebConnection.h: (WebConnection): * Shared/mac/SecItemShim.cpp: (WebKit::SecItemShim::didReceiveMessageOnConnectionWorkQueue): * Shared/mac/SecItemShim.h: (SecItemShim): * SharedWorkerProcess/SharedWorkerProcess.cpp: (WebKit::SharedWorkerProcess::didReceiveMessage): * SharedWorkerProcess/SharedWorkerProcess.h: (SharedWorkerProcess): * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::didReceiveMessage): (WebKit::DownloadProxy::didReceiveSyncMessage): * UIProcess/Downloads/DownloadProxy.h: (DownloadProxy): * UIProcess/DrawingAreaProxy.cpp: (WebKit::DrawingAreaProxy::didReceiveCoordinatedLayerTreeHostProxyMessage): * UIProcess/DrawingAreaProxy.h: (DrawingAreaProxy): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::didReceiveCoordinatedLayerTreeHostProxyMessage): * UIProcess/DrawingAreaProxyImpl.h: * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h: (CustomProtocolManagerProxy): * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm: (WebKit::CustomProtocolManagerProxy::didReceiveMessage): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didReceiveMessage): (WebKit::NetworkProcessProxy::didReceiveSyncMessage): * UIProcess/Network/NetworkProcessProxy.h: (NetworkProcessProxy): * UIProcess/Notifications/WebNotificationManagerProxy.h: (WebNotificationManagerProxy): * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::didReceiveMessage): * UIProcess/Plugins/PluginProcessProxy.h: (PluginProcessProxy): * UIProcess/SharedWorkers/SharedWorkerProcessProxy.cpp: (WebKit::SharedWorkerProcessProxy::didReceiveMessage): * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h: (SharedWorkerProcessProxy): * UIProcess/WebApplicationCacheManagerProxy.cpp: (WebKit::WebApplicationCacheManagerProxy::didReceiveMessage): * UIProcess/WebApplicationCacheManagerProxy.h: (WebApplicationCacheManagerProxy): * UIProcess/WebContext.cpp: (WebKit::WebContext::dispatchMessage): (WebKit::WebContext::dispatchSyncMessage): (WebKit::WebContext::didReceiveMessage): (WebKit::WebContext::didReceiveSyncMessage): * UIProcess/WebContext.h: (WebContext): * UIProcess/WebCookieManagerProxy.cpp: (WebKit::WebCookieManagerProxy::didReceiveMessage): * UIProcess/WebCookieManagerProxy.h: (WebCookieManagerProxy): * UIProcess/WebDatabaseManagerProxy.cpp: (WebKit::WebDatabaseManagerProxy::didReceiveMessage): * UIProcess/WebDatabaseManagerProxy.h: (WebDatabaseManagerProxy): * UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::didReceiveMessage): (WebKit::WebFullScreenManagerProxy::didReceiveSyncMessage): * UIProcess/WebFullScreenManagerProxy.h: (WebFullScreenManagerProxy): * UIProcess/WebGeolocationManagerProxy.h: (WebGeolocationManagerProxy): * UIProcess/WebIconDatabase.h: (WebIconDatabase): * UIProcess/WebKeyValueStorageManagerProxy.h: (WebKeyValueStorageManagerProxy): * UIProcess/WebMediaCacheManagerProxy.h: (WebMediaCacheManagerProxy): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveMessage): (WebKit::WebPageProxy::didReceiveSyncMessage): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveMessage): (WebKit::WebProcessProxy::didReceiveSyncMessage): (WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue): * UIProcess/WebProcessProxy.h: (WebProcessProxy): * UIProcess/WebResourceCacheManagerProxy.h: (WebResourceCacheManagerProxy): * UIProcess/mac/RemoteLayerTreeHost.h: (RemoteLayerTreeHost): * UIProcess/mac/RemoteLayerTreeHost.mm: (WebKit::RemoteLayerTreeHost::didReceiveMessage): * UIProcess/mac/SecItemShimProxy.cpp: (WebKit::SecItemShimProxy::didReceiveMessageOnConnectionWorkQueue): * UIProcess/mac/SecItemShimProxy.h: (SecItemShimProxy): * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: (WebKit::WebApplicationCacheManager::didReceiveMessage): * WebProcess/ApplicationCache/WebApplicationCacheManager.h: (WebApplicationCacheManager): * WebProcess/Cookies/WebCookieManager.cpp: (WebKit::WebCookieManager::didReceiveMessage): * WebProcess/Cookies/WebCookieManager.h: (WebCookieManager): * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::didReceiveMessage): * WebProcess/FullScreen/WebFullScreenManager.h: (WebFullScreenManager): * WebProcess/Geolocation/WebGeolocationManager.h: (WebGeolocationManager): * WebProcess/IconDatabase/WebIconDatabaseProxy.h: (WebIconDatabaseProxy): * WebProcess/MediaCache/WebMediaCacheManager.h: (WebMediaCacheManager): * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): (WebKit::NetworkProcessConnection::didReceiveSyncMessage): * WebProcess/Network/NetworkProcessConnection.h: (NetworkProcessConnection): * WebProcess/Notifications/WebNotificationManager.h: (WebNotificationManager): * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::PluginProcessConnection::didReceiveMessage): (WebKit::PluginProcessConnection::didReceiveSyncMessage): * WebProcess/Plugins/PluginProcessConnection.h: (PluginProcessConnection): * WebProcess/ResourceCache/WebResourceCacheManager.h: (WebResourceCacheManager): * WebProcess/Storage/WebKeyValueStorageManager.h: (WebKeyValueStorageManager): * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: (WebKit::WebDatabaseManager::didReceiveMessage): * WebProcess/WebCoreSupport/WebDatabaseManager.h: (WebDatabaseManager): * WebProcess/WebPage/DrawingArea.h: (DrawingArea): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::didReceiveCoordinatedLayerTreeHostMessage): * WebProcess/WebPage/DrawingAreaImpl.h: (DrawingAreaImpl): * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebPage/EventDispatcher.h: (EventDispatcher): * WebProcess/WebPage/LayerTreeHost.h: (LayerTreeHost): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didReceiveMessage): (WebKit::WebPage::didReceiveSyncMessage): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/WebPageGroupProxy.h: (WebPageGroupProxy): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveSyncMessage): (WebKit::WebProcess::didReceiveMessage): (WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebProcess.h: (WebProcess): 2013-01-30 Tim Horton PDFPlugin: Update scrollbars if PDFLayerController's display mode changes https://bugs.webkit.org/show_bug.cgi?id=108412 Reviewed by Simon Fraser. * WebProcess/Plugins/PDF/PDFLayerControllerDetails.h: Add pdfLayerController:didChangeDisplayMode: * WebProcess/Plugins/PDF/PDFPlugin.h: Add notifyDisplayModeChanged(). * WebProcess/Plugins/PDF/PDFPlugin.mm: (-[WKPDFLayerControllerDelegate pdfLayerController:didChangeDisplayMode:]): Forward didChangeDisplayMode to notifyDisplayModeChanged. (WebKit::PDFPlugin::notifyDisplayModeChanged): Update content size and scrollbar size when display mode changes. 2013-01-30 Alexey Proskuryakov PPT: Make loading file URLs work with a sandboxed NetworkProcess Reviewed by Sam Weinig. * DerivedSources.make: Preprocess a .sb.in file to build the profile. * NetworkProcess/mac/NetworkProcessMac.mm: Don't prevent entering the sandbox. Override sandbox path, because service gets a differnt one by default. * WebKit2.xcodeproj/project.pbxproj: * NetworkProcess/mac/com.apple.WebKit.NetworkProcess.sb.in: Added. 2013-01-30 Huang Dongsung Coordinated Graphics: LayerTreeRenderer manages the surface of UpdateAtlas. https://bugs.webkit.org/show_bug.cgi?id=107224 Reviewed by Benjamin Poulain. Currently, CoordinatedLayerTreeHostProxy manages the surface of UpdateAtlas, but all other resources are managed by LayerTreeRenderer. This patch matches the surface of UpdateAtlas to other resources. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::updateTileForLayer): (WebKit::CoordinatedLayerTreeHostProxy::createUpdateAtlas): (WebKit::CoordinatedLayerTreeHostProxy::removeUpdateAtlas): (WebKit::CoordinatedLayerTreeHostProxy::purgeBackingStores): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (CoordinatedLayerTreeHostProxy): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::updateTile): (WebKit::LayerTreeRenderer::createUpdateAtlas): (WebKit): (WebKit::LayerTreeRenderer::removeUpdateAtlas): (WebKit::LayerTreeRenderer::purgeGLResources): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: (TileUpdate): (WebKit::LayerTreeRenderer::TileUpdate::TileUpdate): (LayerTreeRenderer): 2013-01-30 Anders Carlsson Remove MessageID parameter from generated message receivers https://bugs.webkit.org/show_bug.cgi?id=108379 Reviewed by Beth Dakin. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage): * NetworkProcess/NetworkConnectionToWebProcess.h: (NetworkConnectionToWebProcess): * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::didReceiveMessage): * NetworkProcess/NetworkProcess.h: (NetworkProcess): * PluginProcess/PluginControllerProxy.h: (PluginControllerProxy): * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::didReceiveMessage): * PluginProcess/PluginProcess.h: (PluginProcess): * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::didReceiveMessage): (WebKit::WebProcessConnection::didReceiveSyncMessage): * PluginProcess/WebProcessConnection.h: (WebProcessConnection): * Scripts/webkit2/messages.py: (generate_message_handler): * Scripts/webkit2/messages_unittest.py: * Shared/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::didReceiveMessage): * Shared/Authentication/AuthenticationManager.h: (AuthenticationManager): * Shared/Network/CustomProtocols/CustomProtocolManager.h: (CustomProtocolManager): * Shared/Network/CustomProtocols/mac/CustomProtocolManagerMac.mm: (WebKit::CustomProtocolManager::didReceiveMessage): * Shared/Plugins/NPObjectMessageReceiver.h: (NPObjectMessageReceiver): * Shared/Plugins/NPRemoteObjectMap.cpp: (WebKit::NPRemoteObjectMap::didReceiveSyncMessage): * Shared/WebConnection.cpp: (WebKit::WebConnection::didReceiveMessage): * Shared/WebConnection.h: (WebConnection): * Shared/mac/SecItemShim.cpp: (WebKit::SecItemShim::didReceiveMessageOnConnectionWorkQueue): * Shared/mac/SecItemShim.h: (SecItemShim): * SharedWorkerProcess/SharedWorkerProcess.cpp: (WebKit::SharedWorkerProcess::didReceiveMessage): * SharedWorkerProcess/SharedWorkerProcess.h: (SharedWorkerProcess): * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::didReceiveMessage): (WebKit::DownloadProxy::didReceiveSyncMessage): * UIProcess/Downloads/DownloadProxy.h: (DownloadProxy): * UIProcess/DrawingAreaProxy.h: (DrawingAreaProxy): * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.h: (CustomProtocolManagerProxy): * UIProcess/Network/CustomProtocols/mac/CustomProtocolManagerProxyMac.mm: (WebKit::CustomProtocolManagerProxy::didReceiveMessage): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didReceiveMessage): * UIProcess/Network/NetworkProcessProxy.h: (NetworkProcessProxy): * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::didReceiveMessage): * UIProcess/Plugins/PluginProcessProxy.h: (PluginProcessProxy): * UIProcess/SharedWorkers/SharedWorkerProcessProxy.cpp: (WebKit::SharedWorkerProcessProxy::didReceiveMessage): * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h: (SharedWorkerProcessProxy): * UIProcess/WebApplicationCacheManagerProxy.cpp: (WebKit::WebApplicationCacheManagerProxy::didReceiveMessage): * UIProcess/WebApplicationCacheManagerProxy.h: (WebApplicationCacheManagerProxy): * UIProcess/WebContext.cpp: (WebKit::WebContext::didReceiveMessage): (WebKit::WebContext::didReceiveSyncMessage): * UIProcess/WebContext.h: (WebContext): * UIProcess/WebCookieManagerProxy.cpp: (WebKit::WebCookieManagerProxy::didReceiveMessage): * UIProcess/WebCookieManagerProxy.h: (WebCookieManagerProxy): * UIProcess/WebDatabaseManagerProxy.cpp: (WebKit::WebDatabaseManagerProxy::didReceiveMessage): * UIProcess/WebDatabaseManagerProxy.h: (WebDatabaseManagerProxy): * UIProcess/WebFullScreenManagerProxy.cpp: (WebKit::WebFullScreenManagerProxy::didReceiveMessage): (WebKit::WebFullScreenManagerProxy::didReceiveSyncMessage): * UIProcess/WebFullScreenManagerProxy.h: (WebFullScreenManagerProxy): * UIProcess/WebInspectorProxy.h: (WebInspectorProxy): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveMessage): (WebKit::WebPageProxy::didReceiveSyncMessage): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveMessage): (WebKit::WebProcessProxy::didReceiveSyncMessage): (WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue): * UIProcess/WebProcessProxy.h: (WebProcessProxy): * UIProcess/mac/RemoteLayerTreeHost.h: (RemoteLayerTreeHost): * UIProcess/mac/RemoteLayerTreeHost.mm: (WebKit::RemoteLayerTreeHost::didReceiveMessage): * UIProcess/mac/SecItemShimProxy.cpp: (WebKit::SecItemShimProxy::didReceiveMessageOnConnectionWorkQueue): * UIProcess/mac/SecItemShimProxy.h: (SecItemShimProxy): * WebProcess/ApplicationCache/WebApplicationCacheManager.cpp: (WebKit::WebApplicationCacheManager::didReceiveMessage): * WebProcess/ApplicationCache/WebApplicationCacheManager.h: (WebApplicationCacheManager): * WebProcess/Cookies/WebCookieManager.cpp: (WebKit::WebCookieManager::didReceiveMessage): * WebProcess/Cookies/WebCookieManager.h: (WebCookieManager): * WebProcess/FullScreen/WebFullScreenManager.cpp: (WebKit::WebFullScreenManager::didReceiveMessage): * WebProcess/FullScreen/WebFullScreenManager.h: (WebFullScreenManager): * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): (WebKit::NetworkProcessConnection::didReceiveSyncMessage): * WebProcess/Network/WebResourceLoader.h: (WebResourceLoader): * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::PluginProcessConnection::didReceiveMessage): (WebKit::PluginProcessConnection::didReceiveSyncMessage): * WebProcess/Plugins/PluginProcessConnection.h: (PluginProcessConnection): * WebProcess/Plugins/PluginProxy.h: (PluginProxy): * WebProcess/WebCoreSupport/WebDatabaseManager.cpp: (WebKit::WebDatabaseManager::didReceiveMessage): * WebProcess/WebCoreSupport/WebDatabaseManager.h: (WebDatabaseManager): * WebProcess/WebPage/DrawingArea.h: (DrawingArea): * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebPage/EventDispatcher.h: (EventDispatcher): * WebProcess/WebPage/WebInspector.h: (WebInspector): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didReceiveMessage): (WebKit::WebPage::didReceiveSyncMessage): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessage): (WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebProcess.h: (WebProcess): 2013-01-30 Christophe Dumez [WK2][UNIX] g_spawn_sync() generates warning in PluginProcessProxy::scanPlugin() https://bugs.webkit.org/show_bug.cgi?id=108371 Reviewed by Martin Robinson. g_spawn_sync() was sometimes displaying a warning about the SIGCHLD signal disposition not being set to SIG_DFL, despite the fix in r133755. The reason was that the code was only setting the disposition to SIG_DFL if the previous disposition was SIG_IGN. In this patch, we set the SIGCHLD signal disposition to SIG_DFL, no matter what its previous disposition was. Also, the signal disposition is now restored to its previous state after the call to g_spawn_sync() to avoid side effects. Finally, we now use SIGCHLD instead of SIDCLD since this is the more compatible POSIX name. * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: (WebKit::spawnProcessSync): (WebKit): (WebKit::PluginProcessProxy::scanPlugin): 2013-01-30 Huang Dongsung [EFL][Qt][WK2] We should consider a page scale factor in WebCore instead of our own scale factor. https://bugs.webkit.org/show_bug.cgi?id=105978 Reviewed by Simon Fraser. Currently, PageViewportController sends a page scale factor to Coordinated Graphics System regardless of the page scale factor in WebCore. This patch makes Coordinated Graphics System use the page scale factor in WebCore to match other ports. When it is needed to change a page scale, PageViewportController sends the scale to Page in Web Process via WebPageProxy::scalePage. When the page scale in WebCore is changed, CoordinatedGraphicsLayer gets notified via deviceOrPageScaleFactorChanged callback. CoordinatedGraphicsLayer uses the page scale factor like previous our own scale factor. We set true to applyDeviceScaleFactorInCompositor and ApplyPageScaleFactorInCompositor in Settings like chromium, because TiledBackingStore that is a backing store of each GraphicsLayer applies the scale to our raster graphics engines instead of applying the scale to the local transform of each render object. Thank Kenneth Rohde Christiansen for implementing the base patch of this patch. No new tests. Covered by existing tests. * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewLegacyPrivate::updateViewportSize): * UIProcess/API/qt/raw/qrawwebview.cpp: (QRawWebView::setSize): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::CoordinatedLayerTreeHostProxy): (WebKit::CoordinatedLayerTreeHostProxy::setVisibleContentsRect): Does not receive a pageScaleFactor argument because PageViewportController sends a page scale factor to Page. However, this method still receives a scroll position because we enable delegates scrolling. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (CoordinatedLayerTreeHostProxy): * UIProcess/DrawingAreaProxy.h: (WebKit::DrawingAreaProxy::setVisibleContentsRect): * UIProcess/DrawingAreaProxyImpl.cpp: (WebKit::DrawingAreaProxyImpl::setVisibleContentsRect): * UIProcess/DrawingAreaProxyImpl.h: * UIProcess/PageViewportController.cpp: (WebKit::PageViewportController::didRenderFrame): (WebKit::PageViewportController::didChangeContentsVisibility): (WebKit::PageViewportController::syncVisibleContents): (WebKit::PageViewportController::applyScaleAfterRenderingContents): (WebKit::PageViewportController::applyPositionAfterRenderingContents): * UIProcess/efl/PageClientLegacyImpl.cpp: (WebKit::PageClientLegacyImpl::updateViewportSize): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::deviceOrPageScaleFactorChanged): (WebCore::CoordinatedGraphicsLayer::effectiveContentsScale): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::CoordinatedLayerTreeHost): (WebKit::CoordinatedLayerTreeHost::createGraphicsLayer): (WebKit::CoordinatedLayerTreeHost::deviceScaleFactor): (WebKit): (WebKit::CoordinatedLayerTreeHost::pageScaleFactor): (WebKit::CoordinatedLayerTreeHost::setVisibleContentsRect): (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (CoordinatedLayerTreeHost): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setUseFixedLayout): 2013-01-30 Zoltan Arvai [Qt] Fix Win build after r141177 https://bugs.webkit.org/show_bug.cgi?id=108325 Reviewed by Anders Carlsson. * Platform/CoreIPC/win/ConnectionWin.cpp: (CoreIPC::Connection::readEventHandler): (CoreIPC::Connection::sendOutgoingMessage): 2013-01-30 Thiago Marcos P. Santos REGRESSION (r141051): Broke plugin support on non-Mac WebKit2 Ports https://bugs.webkit.org/show_bug.cgi?id=108182 Reviewed by Sam Weinig. Send the plugin path to the PluginProcess as a parameter. * PluginProcess/qt/PluginProcessMainQt.cpp: (WebKit::PluginProcessMain): * PluginProcess/unix/PluginProcessMainUnix.cpp: (WebKit::PluginProcessMainUnix): * UIProcess/Launcher/efl/ProcessLauncherEfl.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Launcher/gtk/ProcessLauncherGtk.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: (WebKit::ProcessLauncher::launchProcess): * UIProcess/Plugins/qt/PluginProcessProxyQt.cpp: (WebKit::PluginProcessProxy::platformInitializeLaunchOptions): * UIProcess/Plugins/unix/PluginProcessProxyUnix.cpp: (WebKit::PluginProcessProxy::platformInitializeLaunchOptions): 2013-01-30 Christophe Dumez [EFL][WK2] Use C API inside ewk_window_features https://bugs.webkit.org/show_bug.cgi?id=107924 Reviewed by Sam Weinig. Use C API inside ewk_window_features instead of accessing internal C++ classes directly, to avoid violating API layering. * UIProcess/API/efl/EwkView.cpp: (EwkView::createNewPage): * UIProcess/API/efl/EwkView.h: (EwkView): * UIProcess/API/efl/ewk_window_features.cpp: (EwkWindowFeatures::EwkWindowFeatures): (getWindowFeatureValue): (EwkWindowFeatures::getWindowFeatureBoolValue): (EwkWindowFeatures::getWindowFeatureDoubleValue): (ewk_window_features_geometry_get): * UIProcess/API/efl/ewk_window_features_private.h: (EwkWindowFeatures::create): (EwkWindowFeatures::geometry): (EwkWindowFeatures::setGeometry): (EwkWindowFeatures): * UIProcess/efl/PageUIClientEfl.cpp: (WebKit::PageUIClientEfl::createNewPage): 2013-01-30 Zeno Albisser [Qt] Fix Qt/Mac build after r141024 and r141037 https://bugs.webkit.org/show_bug.cgi?id=108318 Reviewed by Kentaro Hara. * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC::Connection::platformInvalidate): Replace nullptr with 0 to allow compiling without C++11 support. 2013-01-30 Kondapally Kalyan [EFL][Qt][WebGL] Avoid deleting an uncreated canvas. https://bugs.webkit.org/show_bug.cgi?id=106878 Reviewed by Benjamin Poulain. setContentsToCanvas is responsible for marking canvas for creation or deletion. The issue here is that the canvas is marked for deletion even though it has not been created. This causes an assert in LayerTreeRenderer::destroyCanvas. This patch adds a seperate check to ensure that CoordinatedGraphicsLayer tries to issue a request for canvas deletion only after request for canvas creation has been handled. New test: fast/canvas/webgl/canvas-resize-crash.html * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::setContentsToCanvas): (WebCore::CoordinatedGraphicsLayer::destroyCanvasIfNeeded): (WebCore::CoordinatedGraphicsLayer::createCanvasIfNeeded): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayer): (WebCore::CoordinatedGraphicsLayer::fixedToViewport): 2013-01-30 Zan Dobersek Unreviewed GTK build fix. * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: Include GraphicsLayerTextureMapper.h as a forwarding header from WebCore. 2013-01-30 Huang Dongsung Coordinated Graphics: Remove m_pendingSyncBackingStores in LayerTreeRenderer. https://bugs.webkit.org/show_bug.cgi?id=107099 Reviewed by Noam Rosenthal. Instead of queuing the setting of backing stores in LayerTreeRenderer, and then setting them directly to TextureMapperLayer, we allow GraphicsLayerTextureMapper's existing queuing mechanism to handle that. Instead of a m_pendingSyncBackingStores queue, we have a m_backingStores queue which can be applied much more easily to the layer tree. In addition, LayerTreeRenderer::purgeGLResources() does not call TextureMapperLayer::clearBackingStoresRecursive() because TextureMapperLayer will be destructed soon. * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::deleteLayer): (WebKit::LayerTreeRenderer::createBackingStoreIfNeeded): (WebKit::LayerTreeRenderer::removeBackingStoreIfNeeded): (WebKit::LayerTreeRenderer::resetBackingStoreSizeToLayerSize): (WebKit::LayerTreeRenderer::createTile): (WebKit::LayerTreeRenderer::removeTile): (WebKit::LayerTreeRenderer::updateTile): (WebKit::LayerTreeRenderer::commitPendingBackingStoreOperations): (WebKit::LayerTreeRenderer::purgeGLResources): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: 2013-01-29 Anders Carlsson Update the expected generated message results https://bugs.webkit.org/show_bug.cgi?id=108293 Reviewed by Beth Dakin. * Scripts/webkit2/messages.py: (generate_messages_header): * Scripts/webkit2/messages_unittest.py: 2013-01-29 Sam Weinig Replace unnecessary ArgumentDecoder member functions with decode overloads https://bugs.webkit.org/show_bug.cgi?id=102013 Reviewed by Anders Carlsson. * Platform/CoreIPC/ArgumentCoders.cpp: (CoreIPC::::decode): * Platform/CoreIPC/ArgumentCoders.h: * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::ArgumentDecoder::decodeVariableLengthByteArray): (CoreIPC::ArgumentDecoder::decode): * Platform/CoreIPC/ArgumentDecoder.h: (ArgumentDecoder): (CoreIPC::ArgumentDecoder::decodeEnum): (CoreIPC): * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::dispatchSyncMessage): * Platform/CoreIPC/MessageDecoder.cpp: (CoreIPC::MessageDecoder::MessageDecoder): * Platform/mac/SharedMemoryMac.cpp: (WebKit::SharedMemory::Handle::decode): * Platform/win/SharedMemoryWin.cpp: (WebKit::SharedMemory::Handle::decode): * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::::decode): (CoreIPC::decodeTimingFunction): * Shared/DictionaryPopupInfo.cpp: (WebKit::DictionaryPopupInfo::decode): * Shared/UserMessageCoders.h: (WebKit::UserMessageDecoder::baseDecode): * Shared/cf/ArgumentCodersCF.cpp: (CoreIPC::decode): * Shared/mac/ArgumentCodersMac.mm: (CoreIPC::decode): * Shared/mac/ObjCObjectGraphCoders.mm: (WebKit::ObjCObjectGraphDecoder::baseDecode): * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::HandleArray::decode): * Shared/mac/SecItemRequestData.cpp: (WebKit::SecItemRequestData::decode): * Shared/mac/SecItemResponseData.cpp: (WebKit::SecItemResponseData::decode): * Shared/qt/ArgumentCodersQt.cpp: (CoreIPC::::decode): * Shared/qt/QtNetworkReplyData.cpp: (WebKit::QtNetworkReplyData::decode): * WebProcess/WebPage/DecoderAdapter.cpp: (WebKit::DecoderAdapter::decodeBool): (WebKit::DecoderAdapter::decodeUInt16): (WebKit::DecoderAdapter::decodeUInt32): (WebKit::DecoderAdapter::decodeUInt64): (WebKit::DecoderAdapter::decodeInt32): (WebKit::DecoderAdapter::decodeInt64): (WebKit::DecoderAdapter::decodeFloat): (WebKit::DecoderAdapter::decodeDouble): 2013-01-29 Gyuyoung Kim [WK2] Adjust missing MessageID removals to fix build breaks https://bugs.webkit.org/show_bug.cgi?id=108276 Unreviewed to fix build breaks. Some MessageID removals wasn't adjusted into ConnectionUnix.cpp and coordinated graphics. * Platform/CoreIPC/unix/ConnectionUnix.cpp: (CoreIPC::MessageInfo::MessageInfo): (CoreIPC::MessageInfo::setMessageBodyIsOutOfLine): (CoreIPC::MessageInfo::isMessageBodyIsOutOfLine): (CoreIPC::Connection::processMessage): (CoreIPC::Connection::sendOutgoingMessage): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveMessage): * UIProcess/WebProcessProxy.cpp: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didReceiveMessage): 2013-01-29 Sheriff Bot Unreviewed, rolling out r140983. http://trac.webkit.org/changeset/140983 https://bugs.webkit.org/show_bug.cgi?id=108277 Unfortunately, this API has one last client (Requested by abarth on #webkit). * Configurations/FeatureDefines.xcconfig: 2013-01-29 Anders Carlsson Remove MessageID parameter from Connection::sendMessage https://bugs.webkit.org/show_bug.cgi?id=108269 Reviewed by Sam Weinig. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendMessage): (CoreIPC::Connection::sendSyncReply): (CoreIPC::Connection::sendSyncMessage): (CoreIPC::Connection::sendSyncMessageFromSecondaryThread): * Platform/CoreIPC/Connection.h: (Connection): (CoreIPC::Connection::send): (CoreIPC::Connection::sendSync): * Platform/CoreIPC/MessageSender.h: (CoreIPC::MessageSender::send): (CoreIPC::MessageSender::sendMessage): * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC::Connection::open): * Shared/ChildProcessProxy.cpp: (WebKit::ChildProcessProxy::sendMessage): (WebKit::ChildProcessProxy::didFinishLaunching): * Shared/WebConnection.cpp: (WebKit::WebConnection::postMessage): * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::postMessage): (WebKit::InjectedBundle::postSynchronousMessage): 2013-01-29 Anders Carlsson Stop generating the message kind enum https://bugs.webkit.org/show_bug.cgi?id=108258 Reviewed by Beth Dakin. * Platform/CoreIPC/Connection.h: (CoreIPC::Connection::send): (CoreIPC::Connection::sendSync): (CoreIPC::Connection::waitForAndDispatchImmediately): * Platform/CoreIPC/MessageSender.h: (CoreIPC::MessageSender::send): * Scripts/webkit2/messages.py: (surround_in_condition): (message_to_struct_declaration): (generate_messages_header): * Scripts/webkit2/messages_unittest.py: * Scripts/webkit2/model.py: (Message.__init__): * Shared/ChildProcessProxy.h: (WebKit::ChildProcessProxy::send): * Shared/WebConnection.cpp: (WebKit::WebConnection::postMessage): 2013-01-29 Kiran Muppala Fix erroneous semicolon causing build failure: if statement has empty body [-Werror,-Wempty-body] https://bugs.webkit.org/show_bug.cgi?id=108241 Reviewed by Anders Carlsson. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::addExistingWebPage): Remove erroneous semicolon following the if condition. 2013-01-29 Anders Carlsson Remove almost everything from MessageID https://bugs.webkit.org/show_bug.cgi?id=108244 Reviewed by Beth Dakin. * Platform/CoreIPC/MessageID.h: (CoreIPC::MessageID::MessageID): * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC): (CoreIPC::Connection::sendOutgoingMessage): (CoreIPC::createMessageDecoder): (CoreIPC::Connection::receiveSourceEventHandler): 2013-01-29 Anders Carlsson Get rid of MessageID::is() https://bugs.webkit.org/show_bug.cgi?id=108234 Reviewed by Beth Dakin. Add explicit message receiver name equality checks instead of using MessageID::is. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::didReceiveSyncMessage): * Platform/CoreIPC/MessageID.h: * PluginProcess/WebProcessConnection.cpp: (WebKit::WebProcessConnection::didReceiveMessage): (WebKit::WebProcessConnection::didReceiveSyncMessage): * Shared/mac/SecItemShim.cpp: (WebKit::SecItemShim::didReceiveMessageOnConnectionWorkQueue): * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didReceiveMessage): * UIProcess/WebContext.cpp: (WebKit::WebContext::didReceiveMessage): (WebKit::WebContext::didReceiveSyncMessage): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveMessage): (WebKit::WebPageProxy::didReceiveSyncMessage): * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::didReceiveMessage): (WebKit::WebProcessProxy::didReceiveSyncMessage): (WebKit::WebProcessProxy::didReceiveMessageOnConnectionWorkQueue): * UIProcess/mac/SecItemShimProxy.cpp: (WebKit::SecItemShimProxy::didReceiveMessageOnConnectionWorkQueue): * WebProcess/Network/NetworkProcessConnection.cpp: (WebKit::NetworkProcessConnection::didReceiveMessage): (WebKit::NetworkProcessConnection::didReceiveSyncMessage): * WebProcess/Plugins/PluginProcessConnection.cpp: (WebKit::PluginProcessConnection::didReceiveSyncMessage): * WebProcess/WebPage/EventDispatcher.cpp: (WebKit::EventDispatcher::didReceiveMessageOnConnectionWorkQueue): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::didReceiveMessage): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::didReceiveMessage): (WebKit::WebProcess::didReceiveMessageOnConnectionWorkQueue): 2012-11-28 Jer Noble Allow clients to ask for the WebView/WKView placeholder view when in full screen mode. https://bugs.webkit.org/show_bug.cgi?id=103558 Reviewed by Benjamin Poulain. Clients may want to behave differently when their WebView/WKView has been swapped out by a placeholder view when in full screen mode. Add a simple accessor for the existing placeholder view to WKFullScreenWindowController and WKView. * UIProcess/API/mac/WKView.mm: (-[WKView fullScreenPlaceholderView]): Added simple accessor. * UIProcess/API/mac/WKViewPrivate.h: * UIProcess/mac/WKFullScreenWindowController.h: * UIProcess/mac/WKFullScreenWindowController.mm: (-[WKFullScreenWindowController webViewPlaceholder]): Added simple accessor. 2013-01-29 Huang Dongsung [WK2] Call LayerTreeHost::deviceOrPageScaleFactorChanged() when a device or page scale factor is changed. https://bugs.webkit.org/show_bug.cgi?id=107802 Reviewed by Simon Fraser. Currently, LayerTreeHostMac and *GTK call deviceOrPageScaleFactorChanged() of the non compositing GraphicsLayer when a device scale factor is changed. There are two problems. 1. We don't notify LayerTreeHost when a page scale factor is changed. 2. When using TiledCoreAnimationDrawingAreaProxy, LayerTreeHostMac does not receive the device scale factor changed callback. So this patch changes three points. 1. Rename from deviceScaleFactorDidChange() to deviceOrPageScaleFactorChanged() in LayerTreeHost. 2. WebPage::setDeviceScaleFactor() calls LayerTreeHost::deviceScaleFactorDidChange() because of dealing with TiledCoreAnimationDrawingAreaProxy. 3. WebPage::pageScaleFactor() calls LayerTreeHost::deviceScaleFactorDidChange() to call deviceOrPageScaleFactorChanged() of the non compositing GraphicsLayer. Unfortunately, I couldn't think of a way to test this in an automated fashion. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: (WebKit::CoordinatedLayerTreeHost::deviceOrPageScaleFactorChanged): * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::updateBackingStoreState): Don't call LayerTreeHost::deviceScaleFactorDidChange() because this method calls WebPage::setDeviceScaleFactor() and then LayerTreeHost::deviceScaleFactorDidChange() is called. * WebProcess/WebPage/LayerTreeHost.h: (LayerTreeHost): * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::scalePage): (WebKit::WebPage::setDeviceScaleFactor): * WebProcess/WebPage/gtk/LayerTreeHostGtk.cpp: (WebKit::LayerTreeHostGtk::deviceOrPageScaleFactorChanged): * WebProcess/WebPage/gtk/LayerTreeHostGtk.h: (LayerTreeHostGtk): * WebProcess/WebPage/mac/LayerTreeHostMac.h: (LayerTreeHostMac): * WebProcess/WebPage/mac/LayerTreeHostMac.mm: (WebKit::LayerTreeHostMac::deviceOrPageScaleFactorChanged): 2013-01-29 Anders Carlsson Get rid of MessageID::get() https://bugs.webkit.org/show_bug.cgi?id=108235 Reviewed by Beth Dakin. Just check for the message receiver name and message name explicitly instead. * Platform/CoreIPC/MessageID.h: (CoreIPC::MessageID::is): * Shared/CoreIPCSupport/WebContextMessageKinds.h: (WebContextLegacyMessage::messageReceiverName): (WebContextLegacyMessage): (WebContextLegacyMessage::postMessageMessageName): (WebContextLegacyMessage::postSynchronousMessageMessageName): * UIProcess/WebContext.cpp: (WebKit::WebContext::didReceiveMessage): (WebKit::WebContext::didReceiveSyncMessage): 2013-01-29 Kiran Muppala Add support for enabling process suppression in WebProcesses with no visible pages https://bugs.webkit.org/show_bug.cgi?id=108054 Reviewed by Anders Carlsson. Provide a preference to enable process suppression in WebProcesses with no visible pages even if the application is not completely occluded. This provides more opportunities for process suppression to take effect. Replace the messaging of application occlusion status from UI process to ChildProcesses with messages that indicate the current required process suppression state. WebProcessProxy should determine if the process is eligible for process suppression based on both application occlusion and page visibility. When either of these parameters changes, the proxy should message the child process of the updated process suppression state. * NetworkProcess/NetworkProcess.messages.in: Rename SetApplicationIsOccluded to SetProcessSuppressionEnabled. * PluginProcess/PluginProcess.messages.in: Ditto. * Shared/ChildProcess.h: (WebKit::ChildProcess::processSuppressionEnabled): Rename applicationIsOccluded. * Shared/WebPreferencesStore.h: Add a new preference pageVisibilityBasedProcessSuppressionEnabled, to enabled/disable process suppression of WebProcesses when all pages are hidden. * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::setProcessSuppressionEnabled): Rename setApplicationIsOccluded. (WebKit::ChildProcess::platformInitialize): Replace call to setApplicationIsOccluded with setProcessSuppressionEnabled. * SharedWorkerProcess/SharedWorkerProcess.messages.in: Rename SetApplicationIsOccluded to SetProcessSuppressionEnabled. * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetPageVisibilityBasedProcessSuppressionEnabled): (WKPreferencesGetPageVisibilityBasedProcessSuppressionEnabled): * UIProcess/API/C/WKPreferencesPrivate.h: * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didFinishLaunching): Use setter to update process suppression state instead of messaging directly. Use WebContext::canEnableProcessSuppressionForNetworkProcess() helper method to determine if process suppression should be enabled. * UIProcess/Network/NetworkProcessProxy.h: Rename setApplicationIsOccluded to setProcessSuppresionEnabled. * UIProcess/Network/mac/NetworkProcessProxyMac.mm: (WebKit::NetworkProcessProxy::setProcessSuppressionEnabled): Ditto. * UIProcess/Plugins/PluginProcessManager.h: Ditto. * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::didFinishLaunching): Use setter to update process suppression state instead of messaging directly. Use WebContext::canEnableProcessSuppressionForGlobalChildProcesses() helper method to determine if process suppression should be enabled. * UIProcess/Plugins/PluginProcessProxy.h: Rename setApplicationIsOccluded to setProcessSuppresionEnabled. * UIProcess/Plugins/mac/PluginProcessManagerMac.mm: (WebKit::PluginProcessManager::setProcessSuppressionEnabled): Ditto. * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::setProcessSuppressionEnabled): Ditto. * UIProcess/SharedWorkers/SharedWorkerProcessManager.h: Ditto. * UIProcess/SharedWorkers/SharedWorkerProcessProxy.cpp: (WebKit::SharedWorkerProcessProxy::didFinishLaunching): Use setter to update process suppression state instead of messaging directly. Use WebContext::canEnableProcessSuppressionForGlobalChildProcesses() helper method to determine if process suppression should be enabled. * UIProcess/SharedWorkers/SharedWorkerProcessProxy.h: Rename setApplicationIsOccluded to setProcessSuppresionEnabled. * UIProcess/SharedWorkers/mac/SharedWorkerProcessManagerMac.mm: (WebKit::SharedWorkerProcessManager::setProcessSuppressionEnabled): Ditto. * UIProcess/SharedWorkers/mac/SharedWorkerProcessProxyMac.mm: (WebKit::SharedWorkerProcessProxy::setProcessSuppressionEnabled): Ditto. * UIProcess/WebContext.h: Replace applicationIsOccluded() getter with helper methods to determine if a child process can have process suppression enabled. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::viewStateDidChange): Notify WebProcessProxy of page visibility change. (WebKit::WebPageProxy::preferencesDidChange): Notify WebProcessProxy of change in preferences. * UIProcess/WebProcessProxy.cpp: (WebKit::WebProcessProxy::WebProcessProxy): Initialize member variable tracking process suppression state to false. (WebKit::WebProcessProxy::createWebPage): Update set of pages which can be process suppressed and the resulting process suppression state for the child process. (WebKit::WebProcessProxy::addExistingWebPage): Ditto. (WebKit::WebProcessProxy::removeWebPage): Ditto. (WebKit::WebProcessProxy::pageVisibilityChanged): Ditto. (WebKit::WebProcessProxy::pagePreferencesChanged): Ditto. (WebKit::WebProcessProxy::didFinishLaunching): Call updateProcessSuppressionState(). * UIProcess/WebProcessProxy.h: * UIProcess/mac/WebContextMac.mm: (WebKit::updateProcessSuppressionStateOfGlobalChildProcesses): Use new helper method canEnableProcessSuppressionForGlobalChildProcesses() to determine if process suppression should be enabled. (WebKit::applicationOcclusionStateChanged): Update renamed methods and variables. (WebKit::enableOcclusionNotifications): Move OmitProcessSuppression user default check into canEnableProcessSuppression methods. (WebKit::omitProcessSuppression): (WebKit::WebContext::updateProcessSuppressionStateOfChildProcesses): Use new helper method canEnableProcessSuppressionForNetworkProcess() to determine if process suppression should be enabled for NetworkProcess. Let WebProcess update process suppression state based on application occlusion state and page visibility. (WebKit::WebContext::canEnableProcessSuppressionForNetworkProcess): (WebKit::WebContext::canEnableProcessSuppressionForWebProcess): (WebKit::WebContext::canEnableProcessSuppressionForGlobalChildProcesses): (WebKit::WebContext::processSuppressionEnabledChanged): Reevaluate if process suppression is enabled for all contexts and update process suppression state of global child processes. * UIProcess/mac/WebProcessProxyMac.mm: (WebKit::WebProcessProxy::pageIsProcessSuppressible): (WebKit::WebProcessProxy::allPagesAreProcessSuppressible): (WebKit::WebProcessProxy::updateProcessSuppressionState): * WebProcess/WebProcess.messages.in: 2013-01-29 Anders Carlsson Start using the message flag in MessageEncoder/MessageDecoder https://bugs.webkit.org/show_bug.cgi?id=108227 Reviewed by Beth Dakin. Stop using the flags in MessageID and store the flags directly in the message instead. This is another step towards eliminating MessageID. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::SyncMessageState::processIncomingMessage): (CoreIPC::Connection::createSyncMessageEncoder): (CoreIPC::Connection::sendMessage): (CoreIPC::Connection::sendSyncMessage): (CoreIPC::Connection::sendSyncMessageFromSecondaryThread): (CoreIPC::Connection::dispatchSyncMessage): (CoreIPC::Connection::dispatchMessage): * Platform/CoreIPC/Connection.h: * Platform/CoreIPC/MessageDecoder.cpp: (CoreIPC::MessageDecoder::MessageDecoder): (CoreIPC::MessageDecoder::isSyncMessage): (CoreIPC): (CoreIPC::MessageDecoder::shouldDispatchMessageWhenWaitingForSyncReply): * Platform/CoreIPC/MessageDecoder.h: (MessageDecoder): * Platform/CoreIPC/MessageEncoder.cpp: (CoreIPC): (CoreIPC::MessageEncoder::MessageEncoder): (CoreIPC::MessageEncoder::~MessageEncoder): (CoreIPC::MessageEncoder::setIsSyncMessage): (CoreIPC::MessageEncoder::setShouldDispatchMessageWhenWaitingForSyncReply): * Platform/CoreIPC/MessageEncoder.h: (MessageEncoder): * Platform/CoreIPC/MessageFlags.h: Copied from Source/WebKit2/Platform/CoreIPC/MessageEncoder.h. (CoreIPC): * Platform/CoreIPC/MessageID.h: * WebKit2.xcodeproj/project.pbxproj: 2013-01-29 Anders Carlsson Encode/decode message send flags in the message https://bugs.webkit.org/show_bug.cgi?id=108208 Reviewed by Beth Dakin. This is another step towards getting rid of MessageID. * Platform/CoreIPC/ArgumentDecoder.cpp: (CoreIPC::ArgumentDecoder::decodeUInt8): (CoreIPC): * Platform/CoreIPC/ArgumentDecoder.h: (ArgumentDecoder): (CoreIPC::ArgumentDecoder::decode): (CoreIPC): * Platform/CoreIPC/ArgumentEncoder.cpp: (CoreIPC::ArgumentEncoder::encode): (CoreIPC): * Platform/CoreIPC/ArgumentEncoder.h: (ArgumentEncoder): * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendMessage): * Platform/CoreIPC/MessageDecoder.cpp: (CoreIPC::MessageDecoder::MessageDecoder): * Platform/CoreIPC/MessageDecoder.h: (CoreIPC::MessageDecoder::messageSendFlags): (MessageDecoder): * Platform/CoreIPC/MessageEncoder.cpp: (CoreIPC): (CoreIPC::MessageEncoder::MessageEncoder): (CoreIPC::MessageEncoder::~MessageEncoder): (CoreIPC::MessageEncoder::setMessageSendFlags): * Platform/CoreIPC/MessageEncoder.h: (MessageEncoder): * UIProcess/Authentication/AuthenticationChallengeProxy.h: (CoreIPC): 2013-01-29 Mario Sanchez Prada [GTK] Missing build flags when building with Harfbuzz https://bugs.webkit.org/show_bug.cgi?id=108174 Reviewed by Martin Robinson. Add FREETYPE_CFLAGS and FREETYPE_LIBS to makefiles so -lharfbuzz parameter will be added to linking lines when needed. * GNUmakefile.am: Added FREETYPE_CFLAGS and FREETYPE_LIBS. * UIProcess/API/gtk/tests/GNUmakefile.am: Ditto. 2013-01-29 Grzegorz Czajkowski [EFL] Unified text checker implementation. https://bugs.webkit.org/show_bug.cgi?id=107682 Reviewed by Anders Carlsson. * UIProcess/efl/TextCheckerEfl.cpp: (WebKit): (WebKit::TextChecker::checkTextOfParagraph): Allow to check spelling for multiple words, their misspelling location and length are saved to the vector. * WebProcess/WebCoreSupport/WebEditorClient.h: * WebProcess/WebCoreSupport/efl/WebEditorClientEfl.cpp: (WebKit::WebEditorClient::checkTextOfParagraph): (WebKit): As spelling implementation is exposed to UIProcess, send a meesage to UIProcess to call TextChecker::checkTextOfParagraph. 2013-01-29 Carlos Garcia Campos [GTK] Add API to prefetch DNS of a given hostname to WebKit2 GTK+ API https://bugs.webkit.org/show_bug.cgi?id=99695 Reviewed by Anders Carlsson. * UIProcess/API/gtk/WebKitWebContext.cpp: (webkit_web_context_prefetch_dns): Public method to resolve the domain name in advance for the given hostname. * UIProcess/API/gtk/WebKitWebContext.h: * UIProcess/API/gtk/docs/webkit2gtk-sections.txt: Add webkit_web_context_prefetch_dns. * WebProcess/InjectedBundle/API/gtk/WebKitWebExtension.cpp: (webkitWebExtensionDidReceiveMessage): Parse PrefetchDNS message and call WebCore::prefetchDNS() with the given hostname. (didReceiveMessage): Call webkitWebExtensionDidReceiveMessage(). (webkitWebExtensionCreate): Add implementation for didReceiveMessage callback. 2013-01-29 Carlos Garcia Campos [GTK] Implement resources API using injected bundle https://bugs.webkit.org/show_bug.cgi?id=107457 Reviewed by Sam Weinig. The ResourceLoaderClient was removed from the UI process in r140285, and most of the GTK+ API depends on resources. This patch implements the same API using the ResourceLoaderClient from injected bundle. It fixes the resources unit tests, as well as other 14 unit tests that are timing out because they depend on resource API. * GNUmakefile.list.am: Add new files to compilation. * Shared/UserMessageCoders.h: (WebKit::UserMessageEncoder::baseEncode): Add support for encoding WebURLResponse and WebError objects in user messages. (WebKit::UserMessageDecoder::baseDecode): Add support for decoding WebURLResponse and WebError objects from user messages. * UIProcess/API/gtk/WebKitInjectedBundleClient.cpp: Added. (didReceiveWebViewMessageFromInjectedBundle): Handle messages sent to the WebView. For now it hanldes all the sresource loader client messages. (didReceiveMessageFromInjectedBundle): Handle messages received from injected bundle. (attachInjectedBundleClientToContext): Initialize the injected bundle client. * UIProcess/API/gtk/WebKitInjectedBundleClient.h: Added. * UIProcess/API/gtk/WebKitWebContext.cpp: (_WebKitWebContextPrivate): Add a HashMap to map page IDs to WebKitWebViews. (createDefaultWebContext): Call attachInjectedBundleClientToContext() to intialize the injected bundle client. (webkitWebContextCreatePageForWebView): Use webkitWebViewBaseCreateWebPage() to create and initialize a new WebPageProxy and map the newly created page with the given WebKitWebView. (webkitWebContextWebViewDestroyed): Called when the given WebKitWebView is being destroyed to remove it from the views map. (webkitWebContextGetWebViewForPage): Returns the WebKitWebView associated to the given page ID. * UIProcess/API/gtk/WebKitWebContextPrivate.h: * UIProcess/API/gtk/WebKitWebView.cpp: (webkitWebViewConstructed): Use webkitWebContextCreatePageForWebView() instead of webkitWebViewBaseCreateWebPage() directly. (webkitWebViewDispose): Call webkitWebContextWebViewDestroyed() to notify the context. * WebProcess/InjectedBundle/API/gtk/WebKitWebPage.cpp: (didInitiateLoadForResource): Send a message to the UI process with the callback parameters encoded. (willSendRequestForFrame): Ditto. (didReceiveResponseForResource): Ditto. (didReceiveContentLengthForResource): Ditto. (didFinishLoadForResource): Ditto. (didFailLoadForResource): Ditto. (webkitWebPageCreate): Initialize the WKBundlePageResourceLoadClient. 2013-01-29 Laszlo Gombos [Qt] Remove misspelled ENABLE(SPEECH_INPUT) guard https://bugs.webkit.org/show_bug.cgi?id=105683 Reviewed by Simon Hausmann. The ENABLE(SPEECH_INPUT) guard is only used in one location in the source tree and as such it is always 0. I believe that this guard is a left over and is not needed any more as the code guarded is not guarded anywhere else. * WebProcess/qt/WebProcessQt.cpp: (WebKit::WebProcess::platformInitializeWebProcess): 2013-01-29 Zan Dobersek Unreviewed build fix after r141024. Adding new files to the build. * GNUmakefile.am: * GNUmakefile.list.am: 2013-01-29 Jinwoo Song [WK2] Fix unused parameter build warning https://bugs.webkit.org/show_bug.cgi?id=108156 Reviewed by Kentaro Hara. Comment out the unused parameters to fix the build warnings. * WebProcess/Plugins/Netscape/NetscapePlugin.h: * WebProcess/Plugins/PluginProxy.h: 2013-01-28 Jae Hyun Park [Qt] Build fix https://bugs.webkit.org/show_bug.cgi?id=108142 Reviewed by Gyuyoung Kim. Build fix. Though StorageManager was added to WK2 in r141024, it is not added to Target.pri for qt port. * Target.pri: 2013-01-28 Huang Dongsung Coordinated Graphics: Refactor code related to debug border and repaint count. https://bugs.webkit.org/show_bug.cgi?id=107910 Reviewed by Noam Rosenthal. There are two big changes: 1. CoordinatedGraphicsLayer sends debugging visuals to UI Process. 2. When updating a backing store, increment a repaint count. In addition, we don't use QT_WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS environment. EFL, GTK and QT will use WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS after http://webkit.org/b/107198. * Shared/CoordinatedGraphics/CoordinatedLayerInfo.h: (WebKit::CoordinatedLayerInfo::CoordinatedLayerInfo): (CoordinatedLayerInfo): * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp: (WebKit::CoordinatedBackingStore::removeAllTiles): (WebKit::CoordinatedBackingStore::updateTile): (WebKit::CoordinatedBackingStore::texture): (WebKit::CoordinatedBackingStore::paintTilesToTextureMapper): (WebKit::CoordinatedBackingStore::adjustedTransformForRect): (WebKit::CoordinatedBackingStore::paintToTextureMapper): (WebKit): (WebKit::CoordinatedBackingStore::drawBorder): Override TextureMapperPlatformLayer::drawBorder() to draw the border for each tile. (WebKit::CoordinatedBackingStore::drawRepaintCounter): (WebKit::CoordinatedBackingStore::commitTileOperations): * UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h: (WebKit::CoordinatedBackingStoreTile::CoordinatedBackingStoreTile): (CoordinatedBackingStoreTile): (CoordinatedBackingStore): (WebKit::CoordinatedBackingStore::rect): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::setLayerRepaintCount): (WebKit): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (CoordinatedLayerTreeHostProxy): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::setLayerRepaintCount): (WebKit): (WebKit::LayerTreeRenderer::setLayerState): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: (LayerTreeRenderer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setShowDebugBorder): (WebCore): (WebCore::CoordinatedGraphicsLayer::setShowRepaintCounter): (WebCore::CoordinatedGraphicsLayer::syncLayerState): (WebCore::CoordinatedGraphicsLayer::setDebugBorder): (WebCore::CoordinatedGraphicsLayer::tiledBackingStorePaintEnd): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.h: (CoordinatedGraphicsLayerClient): (CoordinatedGraphicsLayer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::setLayerRepaintCount): (WebKit): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h: 2013-01-28 Sam Weinig Remove support from ArgumentEncoder for deprecated encode functions https://bugs.webkit.org/show_bug.cgi?id=108155 Reviewed by Dan Bernstein. * Platform/CoreIPC/ArgumentEncoder.h: (CoreIPC::ArgumentEncoder::encode): 2013-01-28 Sam Weinig Disable default use of the Plug-in XPCService until we can figure out how to deal with the 32-bit one. * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::shouldUseXPC): (WebKit::PluginProcessProxy::platformInitializeLaunchOptions): 2013-01-28 Sam Weinig Plug-ins should initialize their sandbox at creation time https://bugs.webkit.org/show_bug.cgi?id=108098 Reviewed by Anders Carlsson. Add the ability to add string key/value pairs to process creation parameters to allow the plugin process to get passed the plugin path which in turn allows the plugin to initialize its sandbox at the correct time. * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/NetworkServiceMain.Development.mm: * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm: * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm: (NetworkServiceInitializer): * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm: (WebKit::PluginProcessMainDelegate::getExtraData): (PluginProcessMainDelegate): * PluginProcess/EntryPoint/mac/XPCService/PluginService.32/PluginService.32.Main.mm: * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/PluginService.64.Main.mm: * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/PluginService.Development.Main.mm: * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm: (WebKit): (PluginServiceInitializerDelegate): (WebKit::PluginServiceInitializerDelegate::PluginServiceInitializerDelegate): (WebKit::PluginServiceInitializerDelegate::getExtraData): (PluginServiceInitializer): * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::initializeProcess): (WebKit::PluginProcess::initializePluginProcess): (WebKit::PluginProcess::initializeProcessName): (WebKit::PluginProcess::initializeSandbox): * PluginProcess/PluginProcess.h: * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitializePluginProcess): (WebKit::PluginProcess::platformInitializeProcess): (WebKit::PluginProcess::initializeProcessName): (WebKit::PluginProcess::initializeSandbox): * Shared/ChildProcess.h: (ChildProcessInitializationParameters): * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.h: (ChildProcessMainDelegate): (WebKit::ChildProcessMain): * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm: (WebKit::ChildProcessMainDelegate::getExtraData): * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.Development.h: (WebKit::XPCServiceEventHandler): * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.h: (WebKit::XPCServiceEventHandler): * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.h: Added. (XPCServiceInitializerDelegate): (WebKit::XPCServiceInitializerDelegate::XPCServiceInitializerDelegate): (WebKit::XPCServiceInitializer): * Shared/EntryPointUtilities/mac/XPCService/XPCServiceEntryPoint.mm: Added. (WebKit::XPCServiceInitializerDelegate::~XPCServiceInitializerDelegate): (WebKit::XPCServiceInitializerDelegate::getConnectionIdentifier): (WebKit::XPCServiceInitializerDelegate::getClientIdentifier): (WebKit::XPCServiceInitializerDelegate::getClientProcessName): (WebKit::XPCServiceInitializerDelegate::getExtraData): * Shared/Plugins/PluginProcessCreationParameters.cpp: (WebKit::PluginProcessCreationParameters::encode): (WebKit::PluginProcessCreationParameters::decode): * Shared/Plugins/PluginProcessCreationParameters.h: (PluginProcessCreationParameters): * UIProcess/Launcher/ProcessLauncher.h: (LaunchOptions): * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToService): (WebKit::connectToReExecService): (WebKit::createService): (WebKit::createProcess): (WebKit::ProcessLauncher::launchProcess): * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit::PluginProcessProxy::didFinishLaunching): * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::PluginProcessProxy::platformInitializeLaunchOptions): (WebKit::PluginProcessProxy::platformInitializePluginProcess): * WebKit2.xcodeproj/project.pbxproj: * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm: * WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm: * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: (WebContentServiceInitializer): 2013-01-28 Kiran Muppala Add window occlusion criteria to determine page visibility on Mac https://bugs.webkit.org/show_bug.cgi?id=107494 Reviewed by Simon Fraser. * UIProcess/API/mac/PageClientImpl.mm: (WebKit::PageClientImpl::isViewVisible): Add window occlusion check. * UIProcess/API/mac/WKView.mm: (-[WKView dealloc]): Remove self from the all views vector. (-[WKView addWindowObserversForWindow:]): Register observer for NSWindowWillOrderOffScreenNotification. (-[WKView removeWindowObservers]): Unregister observer for NSWindowWillOrderOffScreenNotification. (-[WKView viewWillMoveToWindow:]): Disable occlusion notifications. (-[WKView viewDidMoveToWindow]): Enable occlusion notifications. (-[WKView _windowWillOrderOffScreen:]): Disable occlusion notifications. (-[WKView _windowDidOrderOnScreen:]): Enable occlusion notifications. This notification ensures that occlusion notifications are registered correctly even if the NSWindow object is assigned a window number after the viewDidMoveToWindow notification has been received. This occurs for instance during application launch. (-[WKView _setIsWindowOccluded:]): (-[WKView _enableWindowOcclusionNotifications]): (-[WKView _disableWindowOcclusionNotifications]): (windowBecameVisible): (windowBecameOccluded): (+[WKView _registerWindowOcclusionNotificationHandlers]): (+[WKView _unregisterWindowOcclusionNotificationHandlers]): (+[WKView _allViews]): (-[WKView _isWindowOccluded]): (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Add self to the all views vector. * UIProcess/API/mac/WKViewInternal.h: 2013-01-28 Huang Dongsung [TexMap] Enable debug borders and repaint counter via Settings. https://bugs.webkit.org/show_bug.cgi?id=107198 Reviewed by Benjamin Poulain. Currently, if the environment variable WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS is set to 1, only CoordinatedBacking shows debug borders and repaint counter. This patch makes the environment variable change Settings. In addition, Qt uses WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS instead of QT_WEBKIT_SHOW_COMPOSITING_DEBUG_VISUALS from now. After Bug 105787, all backing stores and platform layers in TextureMapper can show debug borders and repaint counter. * UIProcess/API/efl/EwkView.cpp: (EwkView::EwkView): * UIProcess/API/gtk/WebKitSettings.cpp: (webKitSettingsSetProperty): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): 2013-01-28 Anders Carlsson Move Mach port handling from WorkQueue to Connection https://bugs.webkit.org/show_bug.cgi?id=108140 Reviewed by Sam Weinig. Instead of having WorkQueue know about Mach port sources, just fold that functionality directly into Connection. This lets us get rid of the generic source handling from WorkQueue. * Platform/CoreIPC/Connection.h: (Connection): * Platform/CoreIPC/mac/ConnectionMac.cpp: (CoreIPC::Connection::platformInvalidate): (CoreIPC::createDataAvailableSource): (CoreIPC): (CoreIPC::Connection::open): (CoreIPC::Connection::initializeDeadNameSource): * Platform/WorkQueue.h: (WorkQueue::dispatchQueue): (WorkQueue): * Platform/mac/WorkQueueMac.cpp: (WorkQueue::platformInvalidate): 2013-01-28 Gyuyoung Kim Add StorageManager class to cmake ports Unreviewed build fix. Though StorageManager was added to WK2 in r141024, it is not added to cmake ports(EFL). * CMakeLists.txt: * PlatformEfl.cmake: 2013-01-28 Sam Weinig Add (allow mach-lookup (global-name "com.apple.tccd.system")) Reviewed by Maciej Stachowiak. * WebProcess/com.apple.WebProcess.sb.in: 2013-01-28 Brady Eidson WebKit2 should notify the client if the NetworkProcess crashes. and https://bugs.webkit.org/show_bug.cgi?id=108126 Reviewed by Sam Weinig. Add new client callback to the ContextClient: * UIProcess/API/C/WKContext.h: * UIProcess/WebContextClient.cpp: (WebKit::WebContextClient::networkProcessDidCrash): * UIProcess/WebContextClient.h: Call out to the client when the NetworkProcess crashes: * UIProcess/WebContext.cpp: (WebKit::WebContext::networkProcessCrashed): * UIProcess/WebContext.h: * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::networkProcessCrashedOrFailedToLaunch): 2013-01-28 Pratik Solanki PLATFORM(IOS) should come before __MAC_OS_X_VERSION_MIN_REQUIRED https://bugs.webkit.org/show_bug.cgi?id=108101 Reviewed by Benjamin Poulain. Since iOS does not define __MAC_OS_X_VERSION_MIN_REQUIRED, any usage of __MAC_OS_X_VERSION_MIN_REQUIRED should be after a PLATFORM(IOS) check. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): 2013-01-28 Anders Carlsson Add StorageManager class https://bugs.webkit.org/show_bug.cgi?id=108127 Reviewed by Sam Weinig. The StorageManager will be in charge of handling access to local and session storage in the UI process. * UIProcess/Storage/StorageManager.cpp: Added. * UIProcess/Storage/StorageManager.h: Added. * WebKit2.xcodeproj/project.pbxproj: 2013-01-28 Anders Carlsson More work on UI side local storage https://bugs.webkit.org/show_bug.cgi?id=108119 Reviewed by Beth Dakin. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Storage/StorageNamespaceProxy.cpp: (WebKit::StorageNamespaceProxy::createSessionStorageNamespace): Rename create to createSessionStorageNamespace and make it take a WebPage. (WebKit::StorageNamespaceProxy::StorageNamespaceProxy): Add WebPage parameter. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::sessionStorageNamespace): Add an #ifdef for enabling UI side storage. * WebProcess/WebPage/WebFrame.cpp: (WebKit::WebFrame::page): Call new WebPage::fromCorePage helper. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::fromCorePage): Add new function for getting a WebPage from a WebCore::Page. 2013-01-28 Joseph Pecoraro Improve PageVisibility API with enums https://bugs.webkit.org/show_bug.cgi?id=107364 Reviewed by Sam Weinig. * Shared/API/c/WKPageVisibilityTypes.h: Added. * Shared/API/c/WKSharedAPICast.h: (WebKit::toPageVisibilityState): Create an enum for page visibility APIs and a conversion function for the WK2 values to WebCore values. * Target.pri: * GNUmakefile.list.am: * WebKit2.xcodeproj/project.pbxproj: Add WKPageVisibilityTypes.h to the build as a private export. * UIProcess/API/C/WKPage.h: * UIProcess/API/C/WKPage.cpp: (WKPageSetVisibilityState): * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setVisibilityState): UIProcess API to set visibility state. WebPageProxy already had m_visibilityState, so update that when setter is used. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/InjectedBundle/InjectedBundle.h: Remove the old SPI for WebKitTestRunner. Tests now use the C API. * WebProcess/WebPage/WebPage.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setVisibilityState): * WebProcess/WebPage/WebPage.messages.in: Update the existing WebPage API to use uint32_t, which matches other enum message types. 2013-01-28 Christophe Dumez [EFL][WK2] Use C API inside ewk_download_job https://bugs.webkit.org/show_bug.cgi?id=107810 Reviewed by Anders Carlsson. Use C API inside ewk_download_job instead of accessing internal C++ classes directly, to avoid violating API layering. * UIProcess/API/C/WKDownload.cpp: (WKDownloadGetID): Add C API to get the download ID as we need it to support our public API and it seems like a useful addition. * UIProcess/API/C/WKDownload.h: * UIProcess/API/efl/ewk_download_job.cpp: (EwkDownloadJob::EwkDownloadJob): (EwkDownloadJob::id): (EwkDownloadJob::request): (EwkDownloadJob::cancel): * UIProcess/API/efl/ewk_download_job_private.h: (EwkDownloadJob::create): (EwkDownloadJob): * UIProcess/efl/DownloadManagerEfl.cpp: (WebKit::DownloadManagerEfl::decideDestinationWithSuggestedFilename): (WebKit::DownloadManagerEfl::didReceiveResponse): (WebKit::DownloadManagerEfl::didCreateDestination): (WebKit::DownloadManagerEfl::didReceiveData): (WebKit::DownloadManagerEfl::didFail): (WebKit::DownloadManagerEfl::didCancel): (WebKit::DownloadManagerEfl::didFinish): (WebKit::DownloadManagerEfl::registerDownloadJob): Rename registerDownload() to registerDownloadJob() for consistency with unregisterDownloadJob(). (WebKit::DownloadManagerEfl::ewkDownloadJob): Rename downloadJob() to ewkDownloadJob() for clarity since it returns a EwkDownload object. Also take a WKDownloadRef in argument instead of an identifier since all the callers have a WKDownloadRef and it makes their code simpler. Finally, make the getter non-const since it returns a non-const pointer. (WebKit::DownloadManagerEfl::unregisterDownloadJob): Take a WKDownloadRef in argument instead of an identifier since all the callers have a WKDownloadRef and it makes their code simpler. * UIProcess/efl/DownloadManagerEfl.h: (DownloadManagerEfl): * UIProcess/efl/PageClientBase.cpp: (WebKit::PageClientBase::handleDownloadRequest): 2013-01-28 Tim Horton PDFPlugin: getMainResourceDataOfFrame should return PDFPlugin's data so that Save... works https://bugs.webkit.org/show_bug.cgi?id=108060 Reviewed by Sam Weinig. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Implement getResourceData. * WebProcess/Plugins/PDF/SimplePDFPlugin.h: * WebProcess/Plugins/PDF/SimplePDFPlugin.mm: Implement getResourceData, returning the accumulated data if it exists and has finished loading. (WebKit::SimplePDFPlugin::getResourceData): * WebProcess/Plugins/Plugin.h: Add getResourceData, which hands out a raw pointer/size pair to the plugin's "main resource" data. * WebProcess/Plugins/PluginProxy.h: Implement getResourceData. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::getResourceData): Forward getResourceData through to the plugin. * WebProcess/Plugins/PluginView.h: * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::getMainResourceDataOfFrame): If the requested frame is backed by a PluginDocument, attempt to ask the PluginView for its resource data. 2013-01-28 Tim Horton [wk2] WKView's intrinsicContentSize should only report a flexible width if the content width is less than the minimum width https://bugs.webkit.org/show_bug.cgi?id=108056 Reviewed by Simon Fraser. We're currently reporting a flexible width if the intrinsic content size is less than *or equal* to the minimum layout width. This is wrong and causes ping-ponging between flexible and inflexible width in cases where autolayout fits our view to exactly the intrinsic content size. It should be strictly less than instead. * UIProcess/API/mac/WKView.mm: (-[WKView _setIntrinsicContentSize:]): 2013-01-28 Anders Carlsson Add StorageStrategy member functions to WebKit2 https://bugs.webkit.org/show_bug.cgi?id=108105 Reviewed by Tim Horton. Add default implementations that just chain up to the base class for now. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::localStorageNamespace): (WebKit::WebPlatformStrategies::sessionStorageNamespace): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: (WebPlatformStrategies): 2013-01-28 Adam Barth Remove webkitNotifications.createHTMLNotification https://bugs.webkit.org/show_bug.cgi?id=107598 Reviewed by Benjamin Poulain. * Configurations/FeatureDefines.xcconfig: 2013-01-28 Andy Estes Fix non-fat builds by excluding PluginService.32 as a target dependency for WebKit2. * WebKit2.xcodeproj/project.pbxproj: 2013-01-28 Renata Hodovan [Qt][Win][WK2] Build fix after r140957. Rubber-stamped by Csaba Osztrogonác. is only needed and available on linux therefore it's moved into an ifdef block. * WebProcess/qt/WebProcessMainQt.cpp: 2013-01-28 Kenneth Rohde Christiansen [EFL][WK2] Use C API inside ewk_url_response https://bugs.webkit.org/show_bug.cgi?id=107826 Reviewed by Andreas Kling. * Shared/API/c/WKURLResponse.cpp: (WKURLResponseGetExpectedContentsLength): * Shared/API/c/WKURLResponse.h: Add new WK2 C API to get the expected contents length. * UIProcess/API/efl/ewk_url_response.cpp: (EwkUrlResponse::EwkUrlResponse): (EwkUrlResponse::httpStatusCode): (EwkUrlResponse::contentLength): * UIProcess/API/efl/ewk_url_response_private.h: (EwkUrlResponse::create): (EwkUrlResponse): Change the methods to not call WebCore methods. 2013-01-28 Kenneth Rohde Christiansen [WK2][EFL] Remove unneeded private methods https://bugs.webkit.org/show_bug.cgi?id=107693 Reviewed by Andreas Kling. Care has been taken to verify that the wrappers can never be null when called. * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::displayTimerFired): (EwkViewImpl::createGLSurface): * UIProcess/API/efl/EwkViewImpl.h: (EwkViewImpl): 2013-01-28 Renata Hodovan [WK2] Putting QtWebProcess into a chrooted sandbox https://bugs.webkit.org/show_bug.cgi?id=90005 Reviewed by Anders Carlsson and Zoltan Herczeg. This new feature makes possible to run WebProcess inside a chroot. In this case UIProcess calls the internal SandboxProcess binary what makes up an environment for WebProcess inside the sandbox and runs the WebProcess. SandboxProcess first creates two needed device files (random and urandom), mounts filesystems (proc and shared memory), then links run-time dependencies of WebProcess. After this, SandboxProcess moves to a new pid namespace (cloning with CLONE_NEWPID flag). Then after an other cloning (with CLONE_FS flag) we share our filesystem with our children. This is needed because we want to call chroot() function from here and jail our child (WebProcess) too. This will be performed when WebProcess sends a request for it via an socketpair. If sandboxing is done, SandboxProcess exits. Since chroot() system call needs sudoer rights SandboxProcess binary should have set its suid flag. However we can reduce its capabilites. First we restrict the capabilities of the process and the number of its possible resources. Furthermore we fallback to the nobody or the real user. * Configurations/FeatureDefines.xcconfig: * SandboxProcess.pro: Added. * Shared/linux/SandboxProcess/SandboxEnvironmentLinux.cpp: Added. (launchChangeRootHelper): (setEnvironmentVariablesForChangeRootHelper): (prepareAndStartChangeRootHelper): (setCapabilities): (dropPrivileges): (fileExists): (directoryPermissions): (createDirectory): (createDirectoryPath): (createDeviceFiles): (mountFileSystems): (linkFile): (linkDirectory): (collectRunTimeDependencies): (setupXauthorityForNobodyUser): (initSandbox): (restrictCapabilities): (moveToNewPidNamespace): (run): (main): * Shared/linux/SandboxProcess/SandboxEnvironmentLinux.h: Added. * Shared/linux/SandboxProcess/StringOperations.cpp: Added. (stringCopy): (stringConcat): (stringAppend): * Shared/linux/SandboxProcess/StringOperations.h: Added. * UIProcess/Launcher/qt/ProcessLauncherQt.cpp: (WebKit::ProcessLauncher::launchProcess): * WebKit2.pri: * WebProcess.pro: * WebProcess/qt/WebProcessMainQt.cpp: (WebKit): (WebKit::chrootMe): (WebKit::WebProcessMainQt): 2013-01-28 Christophe Dumez [EFL][WK2] Rely more on C API in ewk_favicon_database https://bugs.webkit.org/show_bug.cgi?id=108035 Reviewed by Benjamin Poulain. Rely less on internal C++ API in ewk_favicon_database and use C API instead of avoid breaking API layering. * PlatformEfl.cmake: * UIProcess/API/C/cairo/WKIconDatabaseCairo.cpp: Added. (WKIconDatabaseTryGetCairoSurfaceForURL): Add C API for getting the favicon for a given page URL as a cairo_surface_t*. * UIProcess/API/C/cairo/WKIconDatabaseCairo.h: Added. * UIProcess/API/efl/ewk_favicon_database.cpp: (EwkFaviconDatabase::didChangeIconForPageURL): (EwkFaviconDatabase::getIconSurfaceSynchronously): (EwkFaviconDatabase::iconDataReadyForPageURL): 2013-01-27 Alexey Proskuryakov Fix location of sandbox profiles in built products https://bugs.webkit.org/show_bug.cgi?id=108026 Reviewed by Sam Weinig. * WebKit2.xcodeproj/project.pbxproj: Sandbox profiles go into WebKit2 framework resources. 2013-01-27 Zoltan Arvai Fixing atomicIncrement implementation for Windows by dropping support before XP SP2. https://bugs.webkit.org/show_bug.cgi?id=106740 Reviewed by Benjamin Poulain. * config.h: 2013-01-27 Sam Weinig Add support for launching WebKit2 plugins using XPC https://bugs.webkit.org/show_bug.cgi?id=108040 Reviewed by Dan Bernstein. * Configurations/PluginService.32.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.xcconfig. * Configurations/PluginService.64.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.xcconfig. * Configurations/PluginService.Development.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.xcconfig. Add configurations. * PluginProcess/EntryPoint/mac/XPCService: Added. * PluginProcess/EntryPoint/mac/XPCService/PluginService.32: Added. * PluginProcess/EntryPoint/mac/XPCService/PluginService.32/Info.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist. * PluginProcess/EntryPoint/mac/XPCService/PluginService.32/PluginService.32.Main.mm: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm. * PluginProcess/EntryPoint/mac/XPCService/PluginService.64: Added. * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/Info.plist: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist. * PluginProcess/EntryPoint/mac/XPCService/PluginService.64/PluginService.64.Main.mm: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm. * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development: Added. * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/Info.plist: Added. * PluginProcess/EntryPoint/mac/XPCService/PluginService.Development/PluginService.Development.Main.mm: Added. (main): * PluginProcess/EntryPoint/mac/XPCService/PluginServiceEntryPoint.mm: Copied from Source/WebKit2/NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm. (initializePluginService): Add entry points. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): Add plugin process service names and move into correct #ifdef. * UIProcess/Plugins/mac/PluginProcessProxyMac.mm: (WebKit::shouldUseXPC): (WebKit::PluginProcessProxy::platformInitializeLaunchOptions): Opt into xpc using the same rules as the WebProcess. * WebKit2.xcodeproj/project.pbxproj: Add files. 2013-01-26 Alexey Proskuryakov Use shared ChildProcess code to enter plug-in sandbox. Reviewed by Sam Weinig. There is one known behavior change from this refactoring: getpwuid_r is used instead of NSHomeDirectory for home directory, mathcing other client processes. * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::enterSandbox): * PluginProcess/PluginProcess.h: PluginProcess prevents ChildProcess attempt to enter the sandbox immediately on launch for now, because we don't have a sandbox profile directory path yet. It now keeps a copy of ChildProcessInitializationParameters, so that ChildProcess::initializeSandbox() could be called later. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitializeProcess): Store a copy of ChildProcessInitializationParameters for later. (WebKit::loadSandboxProfile): Build a sandbox profile from a common prefix and a plugin-specific part. (WebKit::PluginProcess::platformInitializePluginProcess): We can enter the sandbox now. (WebKit::PluginProcess::enterSandbox): Prepare SandboxInitializationParameters, and call ChildProcess::initializeSandbox(). * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::initializeSandbox): Actually handle system directory suffix from parameters. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h: Removed. * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: Removed. 2013-01-26 Sam Weinig Add support for running the networking process as an XPCService https://bugs.webkit.org/show_bug.cgi?id=108025 Reviewed by Dan Bernstein. * Configurations/NetworkService.Development.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.Development.xcconfig. * Configurations/NetworkService.xcconfig: Copied from Source/WebKit2/Configurations/WebContentService.xcconfig. Add configurations. * NetworkProcess/EntryPoint/mac/XPCService: Added. * NetworkProcess/EntryPoint/mac/XPCService/NetworkService: Added. * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development: Added. * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/Info.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/Info.plist. * NetworkProcess/EntryPoint/mac/XPCService/NetworkService.Development/NetworkServiceMain.Development.mm: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm. * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/Info.plist: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/Info.plist. * NetworkProcess/EntryPoint/mac/XPCService/NetworkService/NetworkServiceMain.mm: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm. * NetworkProcess/EntryPoint/mac/XPCService/NetworkServiceEntryPoint.mm: Copied from Source/WebKit2/WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm. (initializeNetworkService): Add entry points. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::serviceName): (WebKit::connectToServiceForDevelopment): (WebKit::createServiceForDevelopment): (WebKit::createService): (WebKit::createProcess): (WebKit::ProcessLauncher::launchProcess): Rework service creation to work for arbitrary services. * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::~NetworkProcessProxy): (WebKit::NetworkProcessProxy::getLaunchOptions): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Network/mac/NetworkProcessProxyMac.mm: (WebKit::shouldUseXPC): (WebKit::NetworkProcessProxy::platformGetLaunchOptions): Opt into xpc using the same rules as the WebProcess. * WebKit2.xcodeproj/project.pbxproj: Update files. * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: (initializeWebContentService): Fix the comment to refer to the shim correctly. 2013-01-26 Sam Weinig Simplify environment creation in XPC service re-exec https://bugs.webkit.org/show_bug.cgi?id=108017 Reviewed by Dan Bernstein. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.Development.h: (WebKit::XPCServiceEventHandler): There is no need to copy these strings. 2013-01-26 Alexey Proskuryakov Remove code for handling NetworkProcess authentication challenges in WebProcess https://bugs.webkit.org/show_bug.cgi?id=108003 Reviewed by Sam Weinig. * DerivedSources.make: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): * WebKit2.xcodeproj/project.pbxproj: * NetworkProcess/NetworkResourceLoader.messages.in: Removed. We no longer have an messages to NetworkResourceLoader. * Shared/WebCoreArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC::::decode): There is no longer an identifier inside AuthenticationChallenge. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): (WebKit::NetworkResourceLoader::didCancelAuthenticationChallenge): * NetworkProcess/NetworkResourceLoader.h: Removed code for receiving authentication responses from WebProcess. Removed m_currentAuthenticationChallenge - AuthenticationMAnager now keeps track of that. * WebProcess/Network/WebResourceLoader.cpp: * WebProcess/Network/WebResourceLoader.h: * WebProcess/Network/WebResourceLoader.messages.in: Removed code for handling authentication challenges. They are now sent directly to UI Process. The only thing WebProcess still does is decide whether is can authenticate against a particular authentication space. 2013-01-26 Sam Weinig Fix the development build. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.Development.h: (WebKit::XPCServiceEventHandler): Use the right stringizer. 2013-01-26 Sam Weinig Refactor XPCService initialization to make it easier to add more services https://bugs.webkit.org/show_bug.cgi?id=108015 Reviewed by Dan Bernstein. * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.Development.h: Added. (WebKit::XPCServiceEventHandler): * Shared/EntryPointUtilities/mac/XPCService/XPCServiceBootstrapper.h: Added. (WebKit::XPCServiceEventHandler): Move bootstrapping to Shared (like we have for the legacy process). For now, we use a macro to define the actual initialization point function to use, in the future, we could consider alternatives, such as getting the function name from the bundle. * WebKit2.xcodeproj/project.pbxproj: Update files. * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm: * WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm: Simplify to use the new XPCServiceBootstrapper. * WebProcess/EntryPoint/mac/XPCService/WebContentServiceEntryPoint.mm: Copied from Source/WebKit2/WebProcess/mac/WebProcessServiceEntryPoints.mm. (initializeWebContentService): * WebProcess/mac/WebProcessServiceEntryPoints.h: Removed. * WebProcess/mac/WebProcessServiceEntryPoints.mm: Removed. Move the entry point to where it belongs and extract the bootstrapping parts. 2013-01-26 Adenilson Cavalcanti [Qt]Qt build fix https://bugs.webkit.org/show_bug.cgi?id=108013 Changes on process initialization classes broke webkit building with Qt5. This patch fix it. Reviewed by Sam Weinig. * PluginProcess/qt/PluginProcessMainQt.cpp: 2013-01-26 Sam Weinig Hoist command line parsing into ChildProcessMain https://bugs.webkit.org/show_bug.cgi?id=108010 Reviewed by Dan Bernstein. * NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm: (NetworkProcessMain): * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm: (PluginProcessMain): * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.h: (WebKit::ChildProcessMain): * SharedWorkerProcess/EntryPoint/mac/LegacyProcess/SharedWorkerProcessMain.mm: (SharedWorkerProcessMain): * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: (WebContentProcessMain): 2013-01-26 Sam Weinig Move LegacyProcess entry points into new EntryPoint directories https://bugs.webkit.org/show_bug.cgi?id=108008 Reviewed by Anders Carlsson. Also refactors to remove the need for the overly general WebKitMain, by putting the framework lazy loading into a helper function each legacy process can call (in ChildProcessMainBootstrapper.h) * Configurations/NetworkProcess.xcconfig: * Configurations/PluginProcess.xcconfig: * Configurations/SharedWorkerProcess.xcconfig: * Configurations/WebProcess.xcconfig: * NetworkProcess/EntryPoint: Added. * NetworkProcess/EntryPoint/mac: Added. * NetworkProcess/EntryPoint/mac/LegacyProcess: Added. * NetworkProcess/EntryPoint/mac/LegacyProcess/Info.plist: Copied from Source/WebKit2/NetworkProcess/Info.plist. * NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMain.mm: Copied from Source/WebKit2/NetworkProcess/mac/NetworkProcessMainMac.mm. (NetworkProcessMain): * NetworkProcess/EntryPoint/mac/LegacyProcess/NetworkProcessMainBootstrapper.cpp: Added. (main): * NetworkProcess/Info.plist: Removed. * NetworkProcess/NetworkProcessMain.h: Removed. * NetworkProcess/mac/NetworkProcessMainMac.mm: Removed. * PluginProcess/EntryPoint: Added. * PluginProcess/EntryPoint/mac: Added. * PluginProcess/EntryPoint/mac/LegacyProcess: Added. * PluginProcess/EntryPoint/mac/LegacyProcess/Info.plist: Copied from Source/WebKit2/PluginProcess/Info.plist. * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMain.mm: Copied from Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm. (PluginProcessMain): * PluginProcess/EntryPoint/mac/LegacyProcess/PluginProcessMainBootstrapper.cpp: Added. (main): * PluginProcess/Info.plist: Removed. * PluginProcess/PluginProcessMain.h: Removed. * PluginProcess/mac/PluginProcessMainMac.mm: Removed. * Shared/EntryPointUtilities: Added. * Shared/EntryPointUtilities/mac: Added. * Shared/EntryPointUtilities/mac/LegacyProcess: Added. * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.h: Copied from Source/WebKit2/Shared/mac/ChildProcessMain.h. * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMain.mm: Copied from Source/WebKit2/Shared/mac/ChildProcessMain.mm. * Shared/EntryPointUtilities/mac/LegacyProcess/ChildProcessMainBootstrapper.h: Added. (closeUnusedFileDescriptors): (getBootstrapMainFunction): * Shared/EntryPointUtilities/mac/XPCService: Added. * Shared/mac/ChildProcessMain.h: Removed. * Shared/mac/ChildProcessMain.mm: Removed. * SharedWorkerProcess/EntryPoint: Added. * SharedWorkerProcess/EntryPoint/mac: Added. * SharedWorkerProcess/EntryPoint/mac/LegacyProcess: Added. * SharedWorkerProcess/EntryPoint/mac/LegacyProcess/Info.plist: Copied from Source/WebKit2/SharedWorkerProcess/Info.plist. * SharedWorkerProcess/EntryPoint/mac/LegacyProcess/SharedWorkerProcessMain.mm: Copied from Source/WebKit2/SharedWorkerProcess/mac/SharedWorkerProcessMainMac.mm. (SharedWorkerProcessMain): * SharedWorkerProcess/EntryPoint/mac/LegacyProcess/SharedWorkerProcessMainBootstrapper.cpp: Added. (main): * SharedWorkerProcess/Info.plist: Removed. * SharedWorkerProcess/SharedWorkerProcessMain.h: Removed. * SharedWorkerProcess/mac/SharedWorkerProcessMainMac.mm: Removed. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/EntryPoint/mac/LegacyProcess/Info.plist: Copied from Source/WebKit2/WebProcess/Info.plist. * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMain.mm: Copied from Source/WebKit2/WebProcess/mac/WebProcessMainMac.mm. (WebKit::WebContentProcessMainDelegate::WebContentProcessMainDelegate): (WebKit): (WebContentProcessMain): * WebProcess/EntryPoint/mac/LegacyProcess/WebContentProcessMainBootstrapper.cpp: Added. (main): * WebProcess/Info.plist: Removed. * WebProcess/WebKitMain.cpp: Removed. * WebProcess/WebProcessMain.h: Removed. * WebProcess/mac/WebProcessMainMac.mm: Removed. * mac/MainMacProcess.cpp: Removed. 2013-01-25 Christophe Dumez [EFL][WK2] Use C API inside ewk_database_manager and ewk_storage_manager https://bugs.webkit.org/show_bug.cgi?id=107920 Reviewed by Benjamin Poulain. Use C API inside ewk_database_manager and ewk_storage_manager instead of accessing internal C++ classes directly, to avoid violating API layering. * UIProcess/API/efl/ewk_context.cpp: (EwkContext::EwkContext): * UIProcess/API/efl/ewk_database_manager.cpp: (EwkDatabaseManager::EwkDatabaseManager): (EwkDatabaseManager::getDatabaseOrigins): * UIProcess/API/efl/ewk_database_manager_private.h: (EwkDatabaseManager::create): (EwkDatabaseManager): * UIProcess/API/efl/ewk_storage_manager.cpp: (EwkStorageManager::EwkStorageManager): (EwkStorageManager::getStorageOrigins): * UIProcess/API/efl/ewk_storage_manager_private.h: (EwkStorageManager::create): (EwkStorageManager): 2013-01-25 Andreas Kling [Mac] Defer loading the Web Inspector bundle until it's necessary. Reviewed by Anders Carlsson. Don't instantiate an NSBundle for the Web Inspector before it's needed. 1.51MB progression on Membuster3. * WebProcess/WebPage/WebInspector.cpp: (WebKit::WebInspector::WebInspector): * WebProcess/WebPage/WebInspector.h: (WebInspector): * WebProcess/WebPage/mac/WebInspectorMac.mm: (WebKit::WebInspector::setInspectorUsesWebKitUserInterface): (WebKit::WebInspector::localizedStringsURL): 2013-01-25 Gyuyoung Kim [EFL][WK2] Fix build break after r140891. Unreviewed build fix. SerializedScriptValue needs to use PassRefPtr in WK2 as well. * Shared/WebSerializedScriptValue.h: (WebKit::WebSerializedScriptValue::create): 2013-01-25 Mark Rowe Don't crash when the WKBundlePageUIClient doesn't implement createPlugInExtraStyleSheet. Reviewed by Dean Jackson. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::plugInExtraStyleSheet): Check that createPlugInExtraStyleSheet is provided before calling it. 2013-01-25 Andy Estes Wrap content filtering code in an object https://bugs.webkit.org/show_bug.cgi?id=107914 Reviewed by Alexey Proskuryakov. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Updated to reflect changes in WKSI. 2013-01-25 Brady Eidson HTTP Authentication should be directly between the NetworkProcess and the UIProcess and https://bugs.webkit.org/show_bug.cgi?id=107974 Reviewed by Alexey Proskuryakov. Some of this patch is refactoring to enable more flexibility in the authentication mechanism and the rest is actually implementing Network->UI process authentication. Expose the same AuthenticationManager to anyone in the NetworkProcess asking for it: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::authenticationManager): (WebKit::NetworkProcess::downloadsAuthenticationManager): * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::didReceiveAuthenticationChallenge): Instead of messaging to the WebProcess, tell the NetworkProcess AuthenticationManager. Add WebPageID and WebFrameID members to SchedulableLoader that they receive from * NetworkProcess/SchedulableLoader.cpp: * NetworkProcess/SchedulableLoader.h: (WebKit::SchedulableLoader::webPageID): (WebKit::SchedulableLoader::webFrameID): Add a 3rd form of "didReceiveAuthenticationChallenge" for NetworkProcess use: * Shared/Authentication/AuthenticationManager.cpp: (WebKit::AuthenticationManager::mapChallengeToIdentifier): (WebKit::AuthenticationManager::didReceiveAuthenticationChallenge): * Shared/Authentication/AuthenticationManager.h: * Shared/Authentication/mac/AuthenticationManager.mac.mm: (WebKit::AuthenticationManager::tryUsePlatformCertificateInfoForChallenge): Remove a now obsolete comment Include the WebPage and WebFrame ID for the originator of this request in case it results in a challenge: * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): (WebKit::NetworkResourceLoadParameters::encode): (WebKit::NetworkResourceLoadParameters::decode): * Shared/Network/NetworkResourceLoadParameters.h: (WebKit::NetworkResourceLoadParameters::webPageID): (WebKit::NetworkResourceLoadParameters::webFrameID): Create a AuthenticationChallengeProxy pointing back to the NetworkProcess (instead of a WebProcess), and send the challenge to the appropriate WebPageProxy: * UIProcess/Network/NetworkProcessProxy.cpp: (WebKit::NetworkProcessProxy::didReceiveAuthenticationChallenge): * UIProcess/Network/NetworkProcessProxy.h: * UIProcess/Network/NetworkProcessProxy.messages.in: Refactor didReceiveAuthenticationChallenge so an outsider can directly hand over an AuthenticationChallengeProxy: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::didReceiveAuthenticationChallenge): (WebKit::WebPageProxy::didReceiveAuthenticationChallengeProxy): * UIProcess/WebPageProxy.h: Add a global WebPageID -> WebPageProxy map so parties with an ID don't need to know which process it belongs to: * UIProcess/WebProcessProxy.cpp: (WebKit::globalPageMap): (WebKit::WebProcessProxy::webPage): (WebKit::WebProcessProxy::createWebPage): (WebKit::WebProcessProxy::addExistingWebPage): (WebKit::WebProcessProxy::removeWebPage): * UIProcess/WebProcessProxy.h: * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::scheduleLoad): * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::loadResourceSynchronously): Pass 0 for WebFrameID and WebPageID since synchronous loads don't go through "normal" authentication channels and don't need them. Yet. 2013-01-25 Alexey Proskuryakov Crash in WKSandboxExtensionGetSerializedFormat when opening Web Inspector Reviewed by Brady Eidson. * WebProcess/com.apple.WebProcess.sb.in: Should be able to issue extensions for Inspector files. 2013-01-25 Sam Weinig Try to fix the debug build. * WebKit2.xcodeproj/project.pbxproj: 2013-01-25 Sam Weinig Move the WebContentServices to WebProcess/EntryPoint/mac/XPCService/. Reviewed by Anders Carlsson. * Configurations/WebContentService.Development.xcconfig: * Configurations/WebContentService.xcconfig: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/EntryPoint: Added. * WebProcess/EntryPoint/mac: Added. * WebProcess/EntryPoint/mac/LegacyProcess: Added. * WebProcess/EntryPoint/mac/XPCService: Added. * WebProcess/EntryPoint/mac/XPCService/WebContentService: Copied from WebProcessService. * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development: Copied from WebProcessServiceForWebKitDevelopment. * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebContentServiceMain.Development.mm: Copied from WebProcessServiceForWebKitDevelopment/WebProcessServiceForWebKitDevelopmentMain.mm. * WebProcess/EntryPoint/mac/XPCService/WebContentService.Development/WebProcessServiceForWebKitDevelopmentMain.mm: Removed. * WebProcess/EntryPoint/mac/XPCService/WebContentService/WebContentServiceMain.mm: Copied from WebProcessService/WebProcessServiceMain.mm. * WebProcess/EntryPoint/mac/XPCService/WebContentService/WebProcessServiceMain.mm: Removed. * WebProcessService: Removed. * WebProcessService/Info.plist: Removed. * WebProcessService/WebProcessServiceMain.mm: Removed. * WebProcessServiceForWebKitDevelopment: Removed. * WebProcessServiceForWebKitDevelopment/Info.plist: Removed. * WebProcessServiceForWebKitDevelopment/WebProcessServiceForWebKitDevelopmentMain.mm: Removed. 2013-01-25 Ivan Krstić Prepend common plugin sandbox profile to specific per-plugin one. Reviewed by Alexey Proskuryakov. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::initializeSandbox): 2013-01-25 Dean Jackson Add a user agent stylesheet for plugins https://bugs.webkit.org/show_bug.cgi?id=107890 Reviewed by Alexey Proskuryakov. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Rename client callbacks to have a "create" prefix, making it clear that these generate new Strings. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Actually call into the injected bundle to retrieve any custom stylesheet for plugins. (WebKit::InjectedBundlePageUIClient::plugInExtraStyleSheet): * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): Add override keyword onto virtual functions now that the base class has implementations. 2013-01-25 Alexey Proskuryakov NetworkProcess cannot load files with non-ASCII names https://bugs.webkit.org/show_bug.cgi?id=107977 Reviewed by Brady Eidson. * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::encode): Use the correct path accessor. 2013-01-25 Alexey Proskuryakov REGRESSION: System directory prefix doesn't have a "+" https://bugs.webkit.org/show_bug.cgi?id=107971 Reviewed by Brady Eidson. * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::initializeSandbox): Re-added the "+". 2013-01-25 Brady Eidson New NetworkProcess can ASSERT after old NetworkProcess crashes https://bugs.webkit.org/show_bug.cgi?id=107970 Reviewed by Alexey Proskuryakov. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): Don't tell the scheduler to remove a loader that doesn't exist, as we might be recovering from a crash. 2013-01-25 Alexey Proskuryakov Send sandbox extensions for local files to NetworkProcess https://bugs.webkit.org/show_bug.cgi?id=107872 Reviewed by Brady Eidson. Send sandbox extensions in NetworkResourceLoadParameters, and consume/invalidate them during loading. Changed NetworkProcess code to only use that class for IPC, not for actual implementation. * NetworkProcess/HostRecord.cpp: (WebKit::HostRecord::scheduleResourceLoader): * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::scheduleLoader): (WebKit::NetworkResourceLoadScheduler::removeLoader): (WebKit::NetworkResourceLoadScheduler::receivedRedirect): * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::destinationID): (WebKit::NetworkResourceLoader::start): (WebKit::NetworkResourceLoader::resourceHandleStopped): (WebKit::NetworkResourceLoader::didReceiveResponse): (WebKit::NetworkResourceLoader::didFinishLoading): (WebKit::NetworkResourceLoader::didFail): (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): * NetworkProcess/SchedulableLoader.cpp: (WebKit::SchedulableLoader::SchedulableLoader): (WebKit::SchedulableLoader::consumeSandboxExtensions): (WebKit::SchedulableLoader::invalidateSandboxExtensions): * NetworkProcess/SchedulableLoader.h: (WebKit::SchedulableLoader::identifier): (WebKit::SchedulableLoader::request): (WebKit::SchedulableLoader::priority): (WebKit::SchedulableLoader::contentSniffingPolicy): (WebKit::SchedulableLoader::allowStoredCredentials): (WebKit::SchedulableLoader::inPrivateBrowsingMode): (SchedulableLoader): * NetworkProcess/SyncNetworkResourceLoader.cpp: (WebKit::SyncNetworkResourceLoader::start): * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::encode): (WebKit::NetworkResourceLoadParameters::decode): * Shared/Network/NetworkResourceLoadParameters.h: (WebKit::NetworkResourceLoadParameters::requestBodyExtensions): (WebKit::NetworkResourceLoadParameters::resourceSandboxExtension): 2013-01-25 Claudio Saavedra Remove stale class include https://bugs.webkit.org/show_bug.cgi?id=107945 Reviewed by Andreas Kling. * UIProcess/Notifications/NotificationPermissionRequestManagerProxy.h: GeolocationPermissionRequestProxy has nothing to do here. 2013-01-25 Zan Dobersek Unreviewed. Now searching for *.messages.in in Source/WebKit2/WebProcess/Storage instead of Source/WebKit2/WebProcess/KeyValueStorage after the WebKeyValueStorageManager.messages.in was moved there. * GNUmakefile.am: 2013-01-25 Zan Dobersek Unreviewed. Reincluding the input file for WebKeyValueStorageManager IPC messages into the extra distribution list after the file was moved. * GNUmakefile.am: 2013-01-25 Zan Dobersek Further GTK build fixing. Adding Source/WebKit2/WebProcess/Storage to the list of directories to be searched for header inclusion. * GNUmakefile.am: 2013-01-25 Zan Dobersek Unreviewed GTK build fix. Adjusting the build targets after WebKeyValueStorageManager.cpp was moved to a different directory. * GNUmakefile.list.am: 2013-01-25 Mikhail Pozdnyakov [WK2][EFL] PagePolicyClientEfl should be based on C WK2 API https://bugs.webkit.org/show_bug.cgi?id=107854 Reviewed by Benjamin Poulain. PagePolicyClientEfl should be based on C WK2 API in order not to break API layering. * UIProcess/efl/PagePolicyClientEfl.cpp: (WebKit::PagePolicyClientEfl::decidePolicyForResponseCallback): 2013-01-25 Huang Dongsung [Qt][Gtk] build fix after r140752. https://bugs.webkit.org/show_bug.cgi?id=107908 Reviewed by Kentaro Hara. Build break after r140752. Move Authentication and Downloads to Shared. * DerivedSources.pri: * GNUmakefile.am: * WebKit2.pri: 2013-01-24 Tim Horton [wk2] Page overlays should do their own animation, instead of relying on implicit animation https://bugs.webkit.org/show_bug.cgi?id=107896 Reviewed by Sam Weinig. Use PageOverlay's animation instead of CA implicit animations for uninstallPageOverlay. Make WKBundlePageInstallPageOverlay/WKBundlePageUninstallPageOverlay default to no animation. Add WKBundlePageInstallPageOverlayWithAnimation/WKBundlePageUninstallPageOverlayWithAnimation. * WebProcess/InjectedBundle/API/c/WKBundlePage.cpp: (WKBundlePageUninstallPageOverlay): The default for shouldFadeOut is now false, so we don't need to pass it. (WKBundlePageInstallPageOverlayWithAnimation): Add a version of WKBundlePageInstallPageOverlay that fades in. (WKBundlePageUninstallPageOverlayWithAnimation): Add a version of WKBundlePageUninstallPageOverlay that fades out. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/WebCoreSupport/WebInspectorClient.cpp: (WebKit::WebInspectorClient::highlight): installPageOverlay used to animate by default, now we need to ask for it. (WebKit::WebInspectorClient::hideHighlight): uninstallPageOverlay used to implicitly animate accidentally, now we need to ask for it. * WebProcess/WebPage/FindController.cpp: (WebKit::FindController::updateFindUIAfterPageScroll): Ditto. (WebKit::FindController::hideFindUI): Ditto. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::installPageOverlay): Add shouldFadeIn parameter. (WebKit::WebPage::uninstallPageOverlay): * WebProcess/WebPage/WebPage.h: (WebPage): Add shouldFadeIn to installPageOverlay; make both it and uninstallPageOverlay's shouldFade out default to false. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::destroyPageOverlayLayer): Disable implicit animations when removing a page overlay. 2013-01-24 Huang Dongsung [EFL] Unreviewed build fix after r140752. https://bugs.webkit.org/show_bug.cgi?id=107886 Build break after r140752. * PlatformEfl.cmake: Move DownloadSoupErrorsEfl and DownloadSoup to Shared/Downloads. 2013-01-24 Tim Horton Fix NetworkProcess loading after r140730. Reviewed by Sam Weinig. If a process' sandbox profile path is empty, don't try to initialize the sandbox. * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::initializeSandbox): 2013-01-24 Ryosuke Niwa Mac build fix after r140752. * DerivedSources.make: 2013-01-24 Jae Hyun Park Redundant LegacyReceiver attribute in WebPage.messages.in https://bugs.webkit.org/show_bug.cgi?id=107875 Reviewed by Anders Carlsson. To generate WebPageMessageReceiver with legacy, just one LegacyReceiver attribute in WebPage.messages.in is enough. This patch removes this redundant attribute. * WebProcess/WebPage/WebPage.messages.in: 2013-01-24 Anders Carlsson Fix release build. * WebProcess/Storage/StorageAreaProxy.cpp: (WebKit::StorageAreaProxy::length): 2013-01-24 Alexey Proskuryakov [WK2] Update sandbox extension usage https://bugs.webkit.org/show_bug.cgi?id=107861 Reviewed by Sam Weinig. * Shared/SandboxExtension.h: * Shared/mac/SandboxExtensionMac.mm: (WebKit::wkSandboxExtensionType): * UIProcess/Downloads/DownloadProxy.cpp: (WebKit::DownloadProxy::decideDestinationWithSuggestedFilename): * UIProcess/WebContext.cpp: (WebKit::WebContext::createNewWebProcess): (WebKit::WebContext::processDidFinishLaunching): (WebKit::WebContext::startMemorySampler): * WebProcess/com.apple.WebProcess.sb.in: 2013-01-24 Brady Eidson Move Authentication and Downloads from WebProcess to Shared. https://bugs.webkit.org/show_bug.cgi?id=107879 Reviewed by Anders Carlsson. * Shared/Authentication/AuthenticationManager.cpp: Renamed from Source/WebKit2/WebProcess/Authentication/AuthenticationManager.cpp. * Shared/Authentication/AuthenticationManager.h: Renamed from Source/WebKit2/WebProcess/Authentication/AuthenticationManager.h. * Shared/Authentication/AuthenticationManager.messages.in: Renamed from Source/WebKit2/WebProcess/Authentication/AuthenticationManager.messages.in. * Shared/Authentication/mac/AuthenticationManager.mac.mm: Renamed from Source/WebKit2/WebProcess/Authentication/mac/AuthenticationManager.mac.mm. * Shared/Downloads/Download.cpp: Renamed from Source/WebKit2/WebProcess/Downloads/Download.cpp. * Shared/Downloads/Download.h: Renamed from Source/WebKit2/WebProcess/Downloads/Download.h. * Shared/Downloads/DownloadAuthenticationClient.cpp: Renamed from Source/WebKit2/WebProcess/Downloads/DownloadAuthenticationClient.cpp. * Shared/Downloads/DownloadAuthenticationClient.h: Renamed from Source/WebKit2/WebProcess/Downloads/DownloadAuthenticationClient.h. * Shared/Downloads/DownloadManager.cpp: Renamed from Source/WebKit2/WebProcess/Downloads/DownloadManager.cpp. * Shared/Downloads/DownloadManager.h: Renamed from Source/WebKit2/WebProcess/Downloads/DownloadManager.h. * Shared/Downloads/cfnet/DownloadCFNet.cpp: Renamed from Source/WebKit2/WebProcess/Downloads/cfnet/DownloadCFNet.cpp. * Shared/Downloads/curl/DownloadCurl.cpp: Renamed from Source/WebKit2/WebProcess/Downloads/curl/DownloadCurl.cpp. * Shared/Downloads/efl/DownloadSoupErrorsEfl.cpp: Renamed from Source/WebKit2/WebProcess/Downloads/efl/DownloadSoupErrorsEfl.cpp. * Shared/Downloads/gtk/DownloadSoupErrorsGtk.cpp: Renamed from Source/WebKit2/WebProcess/Downloads/gtk/DownloadSoupErrorsGtk.cpp. * Shared/Downloads/mac/DownloadMac.mm: Renamed from Source/WebKit2/WebProcess/Downloads/mac/DownloadMac.mm. * Shared/Downloads/qt/DownloadQt.cpp: Renamed from Source/WebKit2/WebProcess/Downloads/qt/DownloadQt.cpp. * Shared/Downloads/qt/QtFileDownloader.cpp: Renamed from Source/WebKit2/WebProcess/Downloads/qt/QtFileDownloader.cpp. * Shared/Downloads/qt/QtFileDownloader.h: Renamed from Source/WebKit2/WebProcess/Downloads/qt/QtFileDownloader.h. * Shared/Downloads/soup/DownloadSoup.cpp: Renamed from Source/WebKit2/WebProcess/Downloads/soup/DownloadSoup.cpp. * Shared/Downloads/soup/DownloadSoupErrors.h: Renamed from Source/WebKit2/WebProcess/Downloads/soup/DownloadSoupErrors.h. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: * WebKit2.xcodeproj/project.pbxproj: 2013-01-24 Seokju Kwon [EFL] Unreviewed build fix after r140711 https://bugs.webkit.org/show_bug.cgi?id=107873 Unreviewed build fix. Build break after r140711. * CMakeLists.txt: Move WebKeyValueStorageManager to WebProcess/Storage. 2013-01-24 Jae Hyun Park Coordinated Graphics: remove SurfaceUpdateInfo::encode/decode https://bugs.webkit.org/show_bug.cgi?id=107794 Reviewed by Anders Carlsson. We want to remove the dependency on CoreIPC from SurfaceUpdateInfo because we will extract Coordinated Graphics from WK2. Since SurfaceUpdateInfo is only used in Coordinated Graphics, this patch moves it to Shared/CoordinatedGraphics, and removes CoreIPC dependency. No new tests, no change in behavior. * CMakeLists.txt: * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC): (CoreIPC::::decode): * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h: (WebKit): * Shared/CoordinatedGraphics/SurfaceUpdateInfo.h: Renamed from Source/WebKit2/Shared/SurfaceUpdateInfo.h. (WebKit): (SurfaceUpdateInfo): (WebKit::SurfaceUpdateInfo::SurfaceUpdateInfo): * Shared/SurfaceUpdateInfo.cpp: Removed. * Target.pri: 2013-01-24 Anders Carlsson More StorageAreaProxy cleanup https://bugs.webkit.org/show_bug.cgi?id=107870 Reviewed by Beth Dakin. Remove some unnecessary 'WebCore::' qualifications, and implement StorageNamespaceProxy::storageArea. * WebProcess/Storage/StorageAreaProxy.cpp: * WebProcess/Storage/StorageAreaProxy.h: * WebProcess/Storage/StorageNamespaceProxy.cpp: 2013-01-24 Sam Weinig Cleanup sandbox initialization a bit https://bugs.webkit.org/show_bug.cgi?id=107847 Reviewed by Alexey Proskuryakov. * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeSandbox): * NetworkProcess/NetworkProcess.h: * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::NetworkProcess::initializeSandbox): * PluginProcess/PluginProcess.h: * Shared/ChildProcess.cpp: (WebKit::ChildProcess::initialize): (WebKit::ChildProcess::initializeSandbox): * Shared/ChildProcess.h: (ChildProcess): * Shared/SandboxInitializationParameters.h: (SandboxInitializationParameters): (WebKit::SandboxInitializationParameters::mode): (WebKit::SandboxInitializationParameters::setOverrideSandboxProfilePath): (WebKit::SandboxInitializationParameters::overrideSandboxProfilePath): (WebKit::SandboxInitializationParameters::setSandboxProfile): (WebKit::SandboxInitializationParameters::sandboxProfile): (WebKit::SandboxInitializationParameters::SandboxInitializationParameters): (WebKit::SandboxInitializationParameters::~SandboxInitializationParameters): * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::platformInitialize): (WebKit::ChildProcess::initializeSandbox): * Shared/mac/SandboxInitialiationParametersMac.mm: (WebKit::SandboxInitializationParameters::SandboxInitializationParameters): * WebProcess/WebProcess.cpp: (WebKit::WebProcess::initializeSandbox): * WebProcess/WebProcess.h: * WebProcess/mac/WebProcessMac.mm: (WebKit::ChildProcess::initializeSandbox): 2013-01-24 Anders Carlsson Add stubbed out StorageAreaProxy class https://bugs.webkit.org/show_bug.cgi?id=107864 Reviewed by Beth Dakin. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Storage/StorageAreaProxy.cpp: Added. * WebProcess/Storage/StorageAreaProxy.h: Added. 2013-01-24 Csaba Osztrogonác Unreviewed trivial buildfix after r140711. * DerivedSources.pri: * Target.pri: 2013-01-24 Mark Hahnenberg Objective-C API: Rename JSValue.h/APIJSValue.h to JSCJSValue.h/JSValue.h https://bugs.webkit.org/show_bug.cgi?id=107327 Reviewed by Filip Pizlo. We're renaming these two files, so we have to replace the names everywhere. * WebProcess/WebPage/WebPage.cpp: 2013-01-24 Dean Jackson Allow some plugin snapshot UI content to come from Injected Bundle https://bugs.webkit.org/show_bug.cgi?id=107852 Reviewed by Anders Carlsson. Hook up three new methods: plugInStartLabelTitle, plugInStartLabelSubtitle and plugInExtraStyleSheet to allow some custom styling and content to come from the InjectedBundle. * WebProcess/InjectedBundle/API/c/WKBundlePage.h: Callbacks added to WKBundlePageUIClient structure. * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: Stub implementations of the three new methods. (WebKit::InjectedBundlePageUIClient::plugInStartLabelTitle): (WebKit::InjectedBundlePageUIClient::plugInStartLabelSubtitle): (WebKit::InjectedBundlePageUIClient::plugInExtraStyleSheet): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: (InjectedBundlePageUIClient): * WebProcess/WebCoreSupport/WebChromeClient.cpp: Call into the injected bundle for each of these methods. (WebKit::WebChromeClient::plugInStartLabelTitle): (WebKit::WebChromeClient::plugInStartLabelSubtitle): (WebKit::WebChromeClient::plugInExtraStyleSheet): * WebProcess/WebCoreSupport/WebChromeClient.h: (WebChromeClient): Declare the virtual methods in the Chrome Client so that they can accessed from WebCore eventually. 2013-01-24 Anders Carlsson Add stubbed out StorageNamespaceProxy class https://bugs.webkit.org/show_bug.cgi?id=107846 Reviewed by Sam Weinig. Add new class. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Storage/StorageNamespaceProxy.cpp: Added. * WebProcess/Storage/StorageNamespaceProxy.h: Added. 2013-01-24 Anders Carlsson Move WebKeyValueStorageManager to WebProcess/Storage. Rubber-stamped by Sam Weinig. Try this again, with DerivedSources.make correctly updated this time. * DerivedSources.make: * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Storage/WebKeyValueStorageManager.cpp: Renamed from Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp. * WebProcess/Storage/WebKeyValueStorageManager.h: Renamed from Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.h. * WebProcess/Storage/WebKeyValueStorageManager.messages.in: Renamed from Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in. 2013-01-24 Christophe Dumez [EFL][WK2] Use C API inside ewk_favicon_database https://bugs.webkit.org/show_bug.cgi?id=107680 Reviewed by Kenneth Rohde Christiansen. Use C API inside ewk_favicon_database instead of accessible the C++ classes and violating layering. We still rely on some C++ methods but this will be addressed later since there is no equivalent in the C API and it will require more refactoring. * UIProcess/API/efl/ewk_context.cpp: (EwkContext::ensureFaviconDatabase): * UIProcess/API/efl/ewk_favicon_database.cpp: (EwkFaviconDatabase::EwkFaviconDatabase): (EwkFaviconDatabase::~EwkFaviconDatabase): (EwkFaviconDatabase::iconURLForPageURL): (EwkFaviconDatabase::iconForPageURL): (EwkFaviconDatabase::getIconSurfaceSynchronously): (EwkFaviconDatabase::iconDataReadyForPageURL): (ewk_favicon_database_async_icon_get): * UIProcess/API/efl/ewk_favicon_database_private.h: (EwkFaviconDatabase::create): (EwkFaviconDatabase): 2013-01-24 Mikhail Pozdnyakov [EFL][WK2] Rename EwkViewImpl class to EwkView https://bugs.webkit.org/show_bug.cgi?id=107719 Reviewed by Andreas Kling. Rename EwkViewImpl class to EwkView, due to ewk view refactoring plan (https://bugs.webkit.org/show_bug.cgi?id=107662#c1). * PlatformEfl.cmake: * UIProcess/API/C/efl/WKView.cpp: (WKViewCreate): (WKViewCreateWithFixedLayout): (WKViewGetPage): (WKViewCreateSnapshot): * UIProcess/API/efl/EwkView.cpp: Renamed from Source/WebKit2/UIProcess/API/efl/EwkViewImpl.cpp. (pageViewMap): (EwkView::addToPageViewMap): (EwkView::removeFromPageViewMap): (EwkView::viewFromPageViewMap): (EwkView::EwkView): (EwkView::~EwkView): (EwkView::smartData): (EwkView::fromEvasObject): (EwkView::wkPage): (EwkView::setCursor): (EwkView::setDeviceScaleFactor): (EwkView::deviceScaleFactor): (EwkView::transformFromScene): (EwkView::transformToScene): (EwkView::transformToScreen): (EwkView::layerTreeRenderer): (EwkView::displayTimerFired): (EwkView::update): (EwkView::enterFullScreen): (EwkView::exitFullScreen): (EwkView::windowGeometry): (EwkView::setWindowGeometry): (EwkView::setImageData): (EwkView::size): (EwkView::isFocused): (EwkView::isVisible): (EwkView::title): (EwkView::inputMethodContext): (EwkView::themePath): (EwkView::setThemePath): (EwkView::customTextEncodingName): (EwkView::setCustomTextEncodingName): (EwkView::setMouseEventsEnabled): (EwkView::setTouchEventsEnabled): (EwkView::informIconChange): (EwkView::createGLSurface): (EwkView::enterAcceleratedCompositingMode): (EwkView::exitAcceleratedCompositingMode): (EwkView::requestColorPicker): (EwkView::dismissColorPicker): (EwkView::showContextMenu): (EwkView::hideContextMenu): (EwkView::requestPopupMenu): (EwkView::closePopupMenu): (EwkView::requestJSAlertPopup): (EwkView::requestJSConfirmPopup): (EwkView::requestJSPromptPopup): (EwkView::informDatabaseQuotaReached): (EwkView::informURLChange): (EwkView::windowFeatures): (EwkView::createNewPage): (EwkView::close): (EwkView::onMouseDown): (EwkView::onMouseUp): (EwkView::onMouseMove): (EwkView::feedTouchEvents): (EwkView::onTouchDown): (EwkView::onTouchUp): (EwkView::onTouchMove): (EwkView::onFaviconChanged): (EwkView::takeSnapshot): * UIProcess/API/efl/EwkView.h: Renamed from Source/WebKit2/UIProcess/API/efl/EwkViewImpl.h. (WebKit): (WebCore): (EwkView): (EwkView::view): (EwkView::page): (EwkView::ewkContext): (EwkView::settings): (EwkView::backForwardList): (EwkView::url): (EwkView::faviconURL): (EwkView::mouseEventsEnabled): (EwkView::touchEventsEnabled): (EwkView::setNeedsSurfaceResize): (EwkView::smartCallback): (EwkView::pageClient): (EwkView::setPageScaleFactor): (EwkView::pageScaleFactor): (EwkView::setPagePosition): (EwkView::pagePosition): (EwkView::isHardwareAccelerated): (EwkView::setDrawsBackground): (EwkView::evasGLContext): (EwkView::evasGLSurface): * UIProcess/API/efl/ewk_context_menu.cpp: (EwkContextMenu::EwkContextMenu): * UIProcess/API/efl/ewk_context_menu_private.h: (EwkContextMenu::create): (EwkContextMenu): * UIProcess/API/efl/ewk_download_job.cpp: (EwkDownloadJob::EwkDownloadJob): (EwkDownloadJob::view): * UIProcess/API/efl/ewk_download_job_private.h: (EwkDownloadJob::create): (EwkDownloadJob): * UIProcess/API/efl/ewk_popup_menu.cpp: (EwkPopupMenu::EwkPopupMenu): (EwkPopupMenu::close): * UIProcess/API/efl/ewk_popup_menu_private.h: (EwkPopupMenu::create): (EwkPopupMenu): * UIProcess/API/efl/ewk_settings.cpp: (EwkSettings::preferences): * UIProcess/API/efl/ewk_settings_private.h: (EwkSettings::create): (EwkSettings::EwkSettings): (EwkSettings): * UIProcess/API/efl/ewk_view.cpp: (createEwkView): (ewk_view_base_add): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/ewk_view_private.h: * UIProcess/API/efl/ewk_window_features.cpp: (EwkWindowFeatures::EwkWindowFeatures): (EwkWindowFeatures::setToolbarVisible): (EwkWindowFeatures::setStatusBarVisible): (EwkWindowFeatures::setMenuBarVisible): (EwkWindowFeatures::setResizable): * UIProcess/API/efl/ewk_window_features_private.h: (EwkWindowFeatures::create): (EwkWindowFeatures): * UIProcess/cairo/BackingStoreCairo.cpp: (WebKit::BackingStore::incorporateUpdate): * UIProcess/efl/ContextHistoryClientEfl.cpp: (WebKit::ContextHistoryClientEfl::didNavigateWithNavigationData): (WebKit::ContextHistoryClientEfl::didPerformClientRedirect): (WebKit::ContextHistoryClientEfl::didPerformServerRedirect): (WebKit::ContextHistoryClientEfl::didUpdateHistoryTitle): * UIProcess/efl/ContextMenuClientEfl.cpp: (ContextMenuClientEfl::ContextMenuClientEfl): * UIProcess/efl/ContextMenuClientEfl.h: (WebKit::ContextMenuClientEfl::create): (ContextMenuClientEfl): * UIProcess/efl/DownloadManagerEfl.cpp: (WebKit::DownloadManagerEfl::decideDestinationWithSuggestedFilename): (WebKit::DownloadManagerEfl::didFail): (WebKit::DownloadManagerEfl::didCancel): (WebKit::DownloadManagerEfl::didFinish): (WebKit::DownloadManagerEfl::registerDownload): * UIProcess/efl/DownloadManagerEfl.h: (DownloadManagerEfl): * UIProcess/efl/FindClientEfl.cpp: (WebKit::FindClientEfl::didFindString): (WebKit::FindClientEfl::didFailToFindString): (WebKit::FindClientEfl::FindClientEfl): * UIProcess/efl/FindClientEfl.h: (WebKit::FindClientEfl::create): (FindClientEfl): * UIProcess/efl/FormClientEfl.cpp: (WebKit::FormClientEfl::willSubmitForm): (WebKit::FormClientEfl::FormClientEfl): * UIProcess/efl/FormClientEfl.h: (WebKit::FormClientEfl::create): (FormClientEfl): * UIProcess/efl/InputMethodContextEfl.cpp: (WebKit::InputMethodContextEfl::InputMethodContextEfl): (WebKit::InputMethodContextEfl::onIMFInputSequenceComplete): (WebKit::InputMethodContextEfl::onIMFPreeditSequenceChanged): (WebKit::InputMethodContextEfl::updateTextInputState): * UIProcess/efl/InputMethodContextEfl.h: (WebKit::InputMethodContextEfl::create): (InputMethodContextEfl): * UIProcess/efl/PageClientBase.cpp: (WebKit::PageClientBase::PageClientBase): (WebKit::PageClientBase::view): (WebKit::PageClientBase::createDrawingAreaProxy): (WebKit::PageClientBase::setViewNeedsDisplay): (WebKit::PageClientBase::viewSize): (WebKit::PageClientBase::isViewFocused): (WebKit::PageClientBase::isViewVisible): (WebKit::PageClientBase::processDidCrash): (WebKit::PageClientBase::didRelaunchProcess): (WebKit::PageClientBase::toolTipChanged): (WebKit::PageClientBase::setCursor): (WebKit::PageClientBase::createPopupMenuProxy): (WebKit::PageClientBase::createContextMenuProxy): (WebKit::PageClientBase::enterAcceleratedCompositingMode): (WebKit::PageClientBase::exitAcceleratedCompositingMode): (WebKit::PageClientBase::updateTextInputState): (WebKit::PageClientBase::handleDownloadRequest): * UIProcess/efl/PageClientBase.h: (PageClientBase): * UIProcess/efl/PageClientDefaultImpl.cpp: (WebKit::PageClientDefaultImpl::PageClientDefaultImpl): (WebKit::PageClientDefaultImpl::updateViewportSize): (WebKit::PageClientDefaultImpl::convertToDeviceSpace): (WebKit::PageClientDefaultImpl::convertToUserSpace): (WebKit::PageClientDefaultImpl::didChangeContentsSize): * UIProcess/efl/PageClientDefaultImpl.h: (WebKit::PageClientDefaultImpl::create): (PageClientDefaultImpl): * UIProcess/efl/PageClientLegacyImpl.cpp: (WebKit::PageClientLegacyImpl::PageClientLegacyImpl): (WebKit::PageClientLegacyImpl::didCommitLoad): (WebKit::PageClientLegacyImpl::updateViewportSize): (WebKit::PageClientLegacyImpl::didChangeViewportProperties): (WebKit::PageClientLegacyImpl::didChangeContentsSize): (WebKit::PageClientLegacyImpl::pageDidRequestScroll): (WebKit::PageClientLegacyImpl::didRenderFrame): (WebKit::PageClientLegacyImpl::pageTransitionViewportReady): * UIProcess/efl/PageClientLegacyImpl.h: (WebKit::PageClientLegacyImpl::create): (PageClientLegacyImpl): * UIProcess/efl/PageLoadClientEfl.cpp: (WebKit::PageLoadClientEfl::didReceiveTitleForFrame): (WebKit::PageLoadClientEfl::didReceiveIntentForFrame): (WebKit::PageLoadClientEfl::registerIntentServiceForFrame): (WebKit::PageLoadClientEfl::didChangeProgress): (WebKit::PageLoadClientEfl::didFinishLoadForFrame): (WebKit::PageLoadClientEfl::didFailLoadWithErrorForFrame): (WebKit::PageLoadClientEfl::didStartProvisionalLoadForFrame): (WebKit::PageLoadClientEfl::didReceiveServerRedirectForProvisionalLoadForFrame): (WebKit::PageLoadClientEfl::didFailProvisionalLoadWithErrorForFrame): (WebKit::PageLoadClientEfl::didCommitLoadForFrame): (WebKit::PageLoadClientEfl::didChangeBackForwardList): (WebKit::PageLoadClientEfl::didSameDocumentNavigationForFrame): (WebKit::PageLoadClientEfl::didReceiveAuthenticationChallengeInFrame): (WebKit::PageLoadClientEfl::PageLoadClientEfl): * UIProcess/efl/PageLoadClientEfl.h: (WebKit::PageLoadClientEfl::create): (PageLoadClientEfl): (WebKit::PageLoadClientEfl::view): * UIProcess/efl/PagePolicyClientEfl.cpp: (WebKit::PagePolicyClientEfl::decidePolicyForNavigationAction): (WebKit::PagePolicyClientEfl::decidePolicyForNewWindowAction): (WebKit::PagePolicyClientEfl::PagePolicyClientEfl): * UIProcess/efl/PagePolicyClientEfl.h: (WebKit::PagePolicyClientEfl::create): (PagePolicyClientEfl): * UIProcess/efl/PageUIClientEfl.cpp: (WebKit::PageUIClientEfl::PageUIClientEfl): (WebKit::PageUIClientEfl::close): (WebKit::PageUIClientEfl::takeFocus): (WebKit::PageUIClientEfl::focus): (WebKit::PageUIClientEfl::unfocus): (WebKit::PageUIClientEfl::runJavaScriptAlert): (WebKit::PageUIClientEfl::runJavaScriptConfirm): (WebKit::PageUIClientEfl::runJavaScriptPrompt): (WebKit::PageUIClientEfl::toolbarsAreVisible): (WebKit::PageUIClientEfl::setToolbarsAreVisible): (WebKit::PageUIClientEfl::menuBarIsVisible): (WebKit::PageUIClientEfl::setMenuBarIsVisible): (WebKit::PageUIClientEfl::statusBarIsVisible): (WebKit::PageUIClientEfl::setStatusBarIsVisible): (WebKit::PageUIClientEfl::isResizable): (WebKit::PageUIClientEfl::setIsResizable): (WebKit::PageUIClientEfl::getWindowFrame): (WebKit::PageUIClientEfl::setWindowFrame): (WebKit::PageUIClientEfl::exceededDatabaseQuota): (WebKit::PageUIClientEfl::runOpenPanel): (WebKit::PageUIClientEfl::createNewPage): (WebKit::PageUIClientEfl::showColorPicker): (WebKit::PageUIClientEfl::hideColorPicker): * UIProcess/efl/PageUIClientEfl.h: (WebKit::PageUIClientEfl::create): (PageUIClientEfl): * UIProcess/efl/PageViewportControllerClientEfl.cpp: (WebKit::PageViewportControllerClientEfl::PageViewportControllerClientEfl): (WebKit::PageViewportControllerClientEfl::drawingArea): (WebKit::PageViewportControllerClientEfl::updateViewportSize): (WebKit::PageViewportControllerClientEfl::didChangeContentsSize): (WebKit::PageViewportControllerClientEfl::setViewportPosition): (WebKit::PageViewportControllerClientEfl::setPageScaleFactor): (WebKit::PageViewportControllerClientEfl::didResumeContent): (WebKit::PageViewportControllerClientEfl::didChangeVisibleContents): * UIProcess/efl/PageViewportControllerClientEfl.h: (WebKit::PageViewportControllerClientEfl::create): (PageViewportControllerClientEfl): * UIProcess/efl/VibrationClientEfl.cpp: (VibrationClientEfl::vibrateCallback): (VibrationClientEfl::cancelVibrationCallback): (VibrationClientEfl::create): (VibrationClientEfl::VibrationClientEfl): (VibrationClientEfl::~VibrationClientEfl): * UIProcess/efl/VibrationClientEfl.h: (VibrationClientEfl): * UIProcess/efl/WebContextMenuProxyEfl.cpp: (WebKit::WebContextMenuProxyEfl::WebContextMenuProxyEfl): (WebKit::WebContextMenuProxyEfl::showContextMenu): (WebKit::WebContextMenuProxyEfl::hideContextMenu): * UIProcess/efl/WebContextMenuProxyEfl.h: (WebKit::WebContextMenuProxyEfl::create): (WebContextMenuProxyEfl): * UIProcess/efl/WebFullScreenManagerProxyEfl.cpp: (WebKit::WebFullScreenManagerProxy::enterFullScreen): (WebKit::WebFullScreenManagerProxy::exitFullScreen): * UIProcess/efl/WebInspectorProxyEfl.cpp: (WebKit::WebInspectorProxy::platformCreateInspectorPage): * UIProcess/efl/WebPageProxyEfl.cpp: (WebKit::WebPageProxy::viewWidget): * UIProcess/efl/WebPopupMenuProxyEfl.cpp: (WebKit::WebPopupMenuProxyEfl::WebPopupMenuProxyEfl): (WebKit::WebPopupMenuProxyEfl::showPopupMenu): (WebKit::WebPopupMenuProxyEfl::hidePopupMenu): * UIProcess/efl/WebPopupMenuProxyEfl.h: (WebKit::WebPopupMenuProxyEfl::create): (WebPopupMenuProxyEfl): 2013-01-24 Andras Becsi Remove nonexistent header from WebKit2/Target.pri Unreviewed cleanup after r139919. * Target.pri: 2013-01-24 Michael Brüning [Qt][WK2] Pages / resources cannot be loaded from qrc files. https://bugs.webkit.org/show_bug.cgi?id=107031 Reviewed by Jocelyn Turcotte. Enables WebKit2 Qt applications to load files from the bundled qrc files. This is achieved by adding a url scheme handler for the "qrc" scheme using the application scheme handler and ignoring all handlers for the qrc application scheme that the application might set. * UIProcess/API/qt/qquickurlschemedelegate.cpp: (QQuickQrcSchemeDelegate::QQuickQrcSchemeDelegate): (QQuickQrcSchemeDelegate::readResourceAndSend): * UIProcess/API/qt/qquickurlschemedelegate_p.h: (QQuickQrcSchemeDelegate): * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::initialize): (QQuickWebViewExperimental::schemeDelegates_Append): (QQuickWebViewExperimental::invokeApplicationSchemeHandler): * UIProcess/API/qt/tests/qmltests/WebView/tst_applicationScheme.qml: * UIProcess/API/qt/tests/qmltests/common/qrctest.html: Added. * UIProcess/API/qt/tests/qmltests/resources.qrc: 2013-01-24 Krzysztof Czech [EFL][WK2] Expose accessibility hierarchy in WebKit2-EFL. https://bugs.webkit.org/show_bug.cgi?id=106216 Reviewed by Andreas Kling. Create WebPage's accessibility object on WebPage initialization. Wrap around WebCore's accessibility objects. Updating accessibility hierarchy. Expands accessibility implementation of WebKit-GTK to be used in EFL. * PlatformEfl.cmake: * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::dispatchDidClearWindowObjectInWorld): * WebProcess/WebPage/WebPage.h: (WebPage): * WebProcess/WebPage/atk/WebPageAccessibilityObjectAtk.cpp: (webPageAccessibilityObjectGetIndexInParent): (web_page_accessibility_object_init): * WebProcess/WebPage/efl/WebPageEfl.cpp: (WebKit::WebPage::platformInitialize): (WebKit): (WebKit::WebPage::updateAccessibilityTree): 2013-01-23 Seokju Kwon [EFL] Unreviewed build fix after r140605 https://bugs.webkit.org/show_bug.cgi?id=107787 Unreviewed build fix. Build break after r140605. * UIProcess/WebBatteryManagerProxy.cpp: * UIProcess/WebBatteryManagerProxy.h: (WebBatteryManagerProxy): * UIProcess/WebNetworkInfoManagerProxy.cpp: * UIProcess/WebNetworkInfoManagerProxy.h: (WebNetworkInfoManagerProxy): * UIProcess/WebVibrationProxy.cpp: * UIProcess/WebVibrationProxy.h: (WebVibrationProxy): * UIProcess/soup/WebSoupRequestManagerProxy.cpp: * UIProcess/soup/WebSoupRequestManagerProxy.h: (WebSoupRequestManagerProxy): * WebProcess/Battery/WebBatteryManager.cpp: * WebProcess/Battery/WebBatteryManager.h: (WebBatteryManager): * WebProcess/NetworkInfo/WebNetworkInfoManager.cpp: * WebProcess/NetworkInfo/WebNetworkInfoManager.h: (WebNetworkInfoManager): * WebProcess/soup/WebSoupRequestManager.cpp: * WebProcess/soup/WebSoupRequestManager.h: (WebSoupRequestManager): 2013-01-23 Sam Weinig Cleanup the names of the WebKit2 xpc services https://bugs.webkit.org/show_bug.cgi?id=107759 Reviewed by Anders Carlsson. Renames: com.apple.WebKit2.WebProcessService -> com.apple.WebKit.WebContent com.apple.WebKit2.WebProcessServiceForWebKitDevelopment -> com.apple.WebKit.WebContent.Development * Configurations/BaseXPCService.xcconfig: Copied from Source/WebKit2/Configurations/WebProcessService.xcconfig. * Configurations/WebContentService.xcconfig: Copied from Source/WebKit2/Configurations/WebProcessService.xcconfig. * Configurations/WebContentServiceForDevelopment.xcconfig: Copied from Source/WebKit2/Configurations/WebProcessServiceForWebKitDevelopment.xcconfig. * Configurations/WebProcessService.xcconfig: Removed. * Configurations/WebProcessServiceForWebKitDevelopment.xcconfig: Removed. Rename config files to match new service names and add base config. * UIProcess/Launcher/mac/ProcessLauncherMac.mm: (WebKit::connectToWebProcessServiceForWebKitDevelopment): (WebKit::createWebProcessServiceForWebKitDevelopment): (WebKit::createWebProcessService): * WebKit2.xcodeproj/project.pbxproj: * WebKit2Service: Removed. * WebProcessService/Info.plist: * WebProcessServiceForWebKitDevelopment/Info.plist: Update for new names. 2013-01-23 Seulgi Kim Coordinated Graphics : Reduce the number of calls to Functional and number of IPC messages by sending the created/deleted layers in a vector. https://bugs.webkit.org/show_bug.cgi?id=107625 Reviewed by Benjamin Poulain. Currently, the number of messages sent by CoordinatedLayerTreeHost is equal to the number of layers created/deleted even though they requested in the same cycle. It's not good since CoreIPC creates functional before sending messages, and CoordinatedLayerTreeHostProxy creates functional before create/delete layers. This patch makes CoordinatedLayerTreeHost send just one CreateCompositingLayers message and CoordinatedLayerTreeHostProxy create just one functional in a cycle. The same work has been done with DeleteCompositingLayers message. This patch will reduce the number of calls to Functional and number of IPC messages by sending the created/deleted layers in a vector. No new tests, no change in behavior. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp: (WebKit::CoordinatedLayerTreeHostProxy::createCompositingLayers): (WebKit::CoordinatedLayerTreeHostProxy::deleteCompositingLayers): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.h: (CoordinatedLayerTreeHostProxy): * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::createLayers): (WebKit): (WebKit::LayerTreeRenderer::deleteLayers): * UIProcess/CoordinatedGraphics/LayerTreeRenderer.h: (LayerTreeRenderer): * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::createCompositingLayers): (WebKit::CoordinatedLayerTreeHost::deleteCompositingLayers): 2013-01-23 Huang Dongsung Coordinated Graphics: Add LegacyReceiver to messages.in files. https://bugs.webkit.org/show_bug.cgi?id=107760 Reviewed by Anders Carlsson. After r140605, LegacyReceiver attribute is needed to use recevier specific memeber functions. * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in: * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.messages.in: 2013-01-23 Sheriff Bot Unreviewed, rolling out r140612. http://trac.webkit.org/changeset/140612 https://bugs.webkit.org/show_bug.cgi?id=107768 broke the build (Requested by smfr on #webkit). * WebKit2.xcodeproj/project.pbxproj: * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: Renamed from Source/WebKit2/WebProcess/Storage/WebKeyValueStorageManager.cpp. (WebKit): (WebKit::WebKeyValueStorageManager::supplementName): (WebKit::WebKeyValueStorageManager::WebKeyValueStorageManager): (WebKit::WebKeyValueStorageManager::initialize): (WebKit::keyValueStorageOriginIdentifiers): (WebKit::WebKeyValueStorageManager::dispatchDidGetKeyValueStorageOrigins): (WebKit::WebKeyValueStorageManager::getKeyValueStorageOrigins): (WebKit::WebKeyValueStorageManager::didFinishLoadingOrigins): (WebKit::WebKeyValueStorageManager::dispatchDidModifyOrigin): (WebKit::WebKeyValueStorageManager::deleteEntriesForOrigin): (WebKit::WebKeyValueStorageManager::deleteAllEntries): * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: Renamed from Source/WebKit2/WebProcess/Storage/WebKeyValueStorageManager.h. (WebKit): (WebKeyValueStorageManager): (WebKit::WebKeyValueStorageManager::localStorageDirectory): (WebKit::WebKeyValueStorageManager::indexedDBDatabaseDirectory): * WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in: Renamed from Source/WebKit2/WebProcess/Storage/WebKeyValueStorageManager.messages.in. 2013-01-23 Ian Vollick Introduce the "stacking container" concept. https://bugs.webkit.org/show_bug.cgi?id=107734 Reviewed by Simon Fraser. A stacking container is treated just like a stacking context. That is, it has z-order lists, it and its descendants are stacked as a unit, and when the RenderLayerCompositor does its overlap testing, the composited regions for all layer lists take effect only once the stacking container is done being processed. This patch also adds the function RenderLayer::isStackingContainer(). Currently, this is equivalent to RenderLayer::isStackingContext(), but in future, the definition of stacking container will be broadened to encompass more than just stacking contexts. Other than the addition of this extra function, the patch is mostly comprised of name changes. Any code that used to refer to the stacking context concept, but didn't necessarily require a stacking context in the strict, CSS-sense, was switched to refer to stacking container. No functionality was changed. No new tests, no change in functionality. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::updateOffsetFromViewportForSelf): 2013-01-23 Anders Carlsson Move Move WebKeyValueStorageManager to WebProcess/Storage. Rubber-stamped by Sam Weinig. * WebKit2.xcodeproj/project.pbxproj: * WebProcess/Storage/WebKeyValueStorageManager.cpp: Renamed from Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp. * WebProcess/Storage/WebKeyValueStorageManager.h: Renamed from Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.h. * WebProcess/Storage/WebKeyValueStorageManager.messages.in: Renamed from Source/WebKit2/WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in. 2013-01-23 Anders Carlsson Remove LegacyReceiver from a couple of .messages.in files https://bugs.webkit.org/show_bug.cgi?id=107749 Reviewed by Beth Dakin. * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit): * UIProcess/Notifications/WebNotificationManagerProxy.h: (WebNotificationManagerProxy): * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: * UIProcess/WebGeolocationManagerProxy.cpp: * UIProcess/WebGeolocationManagerProxy.h: (WebGeolocationManagerProxy): * UIProcess/WebGeolocationManagerProxy.messages.in: * UIProcess/WebIconDatabase.cpp: * UIProcess/WebIconDatabase.h: (WebIconDatabase): * UIProcess/WebIconDatabase.messages.in: * UIProcess/WebKeyValueStorageManagerProxy.cpp: * UIProcess/WebKeyValueStorageManagerProxy.h: (WebKeyValueStorageManagerProxy): * UIProcess/WebKeyValueStorageManagerProxy.messages.in: * UIProcess/WebMediaCacheManagerProxy.cpp: * UIProcess/WebMediaCacheManagerProxy.h: (WebMediaCacheManagerProxy): * UIProcess/WebMediaCacheManagerProxy.messages.in: * UIProcess/WebResourceCacheManagerProxy.cpp: * UIProcess/WebResourceCacheManagerProxy.h: (WebResourceCacheManagerProxy): * UIProcess/WebResourceCacheManagerProxy.messages.in: * WebProcess/Geolocation/WebGeolocationManager.cpp: * WebProcess/Geolocation/WebGeolocationManager.h: (WebGeolocationManager): * WebProcess/Geolocation/WebGeolocationManager.messages.in: * WebProcess/IconDatabase/WebIconDatabaseProxy.cpp: * WebProcess/IconDatabase/WebIconDatabaseProxy.h: (WebIconDatabaseProxy): * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in: * WebProcess/KeyValueStorage/WebKeyValueStorageManager.cpp: * WebProcess/KeyValueStorage/WebKeyValueStorageManager.h: (WebKeyValueStorageManager): * WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in: * WebProcess/MediaCache/WebMediaCacheManager.cpp: * WebProcess/MediaCache/WebMediaCacheManager.h: (WebMediaCacheManager): * WebProcess/MediaCache/WebMediaCacheManager.messages.in: * WebProcess/Notifications/WebNotificationManager.cpp: * WebProcess/Notifications/WebNotificationManager.h: (WebNotificationManager): * WebProcess/Notifications/WebNotificationManager.messages.in: * WebProcess/ResourceCache/WebResourceCacheManager.cpp: * WebProcess/ResourceCache/WebResourceCacheManager.h: (WebResourceCacheManager): * WebProcess/ResourceCache/WebResourceCacheManager.messages.in: * WebProcess/WebPage/WebPageGroupProxy.cpp: (WebKit): * WebProcess/WebPage/WebPageGroupProxy.h: (WebPageGroupProxy): * WebProcess/WebPage/WebPageGroupProxy.messages.in: 2013-01-23 Anders Carlsson Message receiver generation should work in terms of MessageReceiver objects https://bugs.webkit.org/show_bug.cgi?id=107742 Reviewed by Beth Dakin. The generated message receiver code should generate the MessageReceiver member functions didReceiveMessage and didReceiveSyncMessage instead of receiver specific member functions. * NetworkProcess/NetworkConnectionToWebProcess.messages.in: * NetworkProcess/NetworkProcess.messages.in: * NetworkProcess/NetworkResourceLoader.messages.in: * PluginProcess/PluginControllerProxy.messages.in: * PluginProcess/PluginProcess.messages.in: * PluginProcess/WebProcessConnection.messages.in: * Scripts/webkit2/messages.py: (generate_message_handler): * Scripts/webkit2/messages_unittest.py: * Scripts/webkit2/model.py: (MessageReceiver.__init__): (MessageReceiver.has_attribute): * Scripts/webkit2/parser.py: (parse): * Shared/Network/CustomProtocols/CustomProtocolManager.messages.in: * Shared/Plugins/NPObjectMessageReceiver.messages.in: * Shared/WebConnection.messages.in: * Shared/mac/SecItemShim.messages.in: * SharedWorkerProcess/SharedWorkerProcess.messages.in: * UIProcess/Downloads/DownloadProxy.messages.in: * UIProcess/DrawingAreaProxy.messages.in: * UIProcess/Network/CustomProtocols/CustomProtocolManagerProxy.messages.in: * UIProcess/Network/NetworkProcessProxy.messages.in: * UIProcess/Notifications/WebNotificationManagerProxy.messages.in: * UIProcess/Plugins/PluginProcessProxy.messages.in: * UIProcess/SharedWorkers/SharedWorkerProcessProxy.messages.in: * UIProcess/WebApplicationCacheManagerProxy.messages.in: * UIProcess/WebContext.messages.in: * UIProcess/WebCookieManagerProxy.messages.in: * UIProcess/WebDatabaseManagerProxy.messages.in: * UIProcess/WebFullScreenManagerProxy.messages.in: * UIProcess/WebGeolocationManagerProxy.messages.in: * UIProcess/WebIconDatabase.messages.in: * UIProcess/WebInspectorProxy.messages.in: * UIProcess/WebKeyValueStorageManagerProxy.messages.in: * UIProcess/WebMediaCacheManagerProxy.messages.in: * UIProcess/WebPageProxy.messages.in: * UIProcess/WebProcessProxy.messages.in: * UIProcess/WebResourceCacheManagerProxy.messages.in: * UIProcess/mac/RemoteLayerTreeHost.messages.in: * UIProcess/mac/SecItemShimProxy.messages.in: * WebProcess/ApplicationCache/WebApplicationCacheManager.messages.in: * WebProcess/Authentication/AuthenticationManager.h: * WebProcess/Authentication/AuthenticationManager.messages.in: * WebProcess/Cookies/WebCookieManager.messages.in: * WebProcess/FullScreen/WebFullScreenManager.messages.in: * WebProcess/Geolocation/WebGeolocationManager.messages.in: * WebProcess/IconDatabase/WebIconDatabaseProxy.messages.in: * WebProcess/KeyValueStorage/WebKeyValueStorageManager.messages.in: * WebProcess/MediaCache/WebMediaCacheManager.messages.in: * WebProcess/Network/NetworkProcessConnection.messages.in: * WebProcess/Network/WebResourceLoader.messages.in: * WebProcess/Notifications/WebNotificationManager.messages.in: * WebProcess/Plugins/PluginProcessConnection.messages.in: * WebProcess/Plugins/PluginProxy.messages.in: * WebProcess/ResourceCache/WebResourceCacheManager.messages.in: * WebProcess/WebCoreSupport/WebDatabaseManager.messages.in: * WebProcess/WebPage/DrawingArea.messages.in: * WebProcess/WebPage/EventDispatcher.messages.in: * WebProcess/WebPage/WebInspector.messages.in: * WebProcess/WebPage/WebPage.messages.in: * WebProcess/WebPage/WebPageGroupProxy.messages.in: * WebProcess/WebProcess.messages.in: 2013-01-23 Huang Dongsung Coordinated Graphics: remove CoordinatedLayerInfo::encode/decode. https://bugs.webkit.org/show_bug.cgi?id=107644 Reviewed by Anders Carlsson. We want to remove the dependency on CoreIPC from CoordinatedLayerInfo because we will extract Coordinated Graphics from WK2. * CMakeLists.txt: * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.cpp: (CoreIPC::::encode): (CoreIPC): (CoreIPC::::decode): * Shared/CoordinatedGraphics/CoordinatedGraphicsArgumentCoders.h: (WebKit): * Shared/CoordinatedGraphics/CoordinatedLayerInfo.cpp: Removed. * Shared/CoordinatedGraphics/CoordinatedLayerInfo.h: * Target.pri: 2013-01-23 Kenneth Rohde Christiansen [WK2] Replace some internal API usage in EwkView with C API https://bugs.webkit.org/show_bug.cgi?id=107652 Reviewed by Benjamin Poulain. * UIProcess/API/efl/ewk_view.cpp: (ewk_view_url_set): (ewk_view_reload): (ewk_view_reload_bypass_cache): (ewk_view_stop): (ewk_view_load_progress_get): (ewk_view_scale_set): (ewk_view_scale_get): (ewk_view_device_pixel_ratio_get): (ewk_view_back): (ewk_view_forward): (ewk_view_back_possible): (ewk_view_forward_possible): (ewk_view_html_string_load): (ewk_view_text_find): (ewk_view_text_find_highlight_clear): (ewk_view_text_matches_count): (ewk_view_inspector_show): (ewk_view_inspector_close): 2013-01-23 Alexey Proskuryakov Build fix. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessage): Copy/paste trouble fix. 2013-01-23 Alexey Proskuryakov REGRESSION(r139514): didFailToSendSyncMessage is not called by Connection https://bugs.webkit.org/show_bug.cgi?id=107715 Reviewed by Anders Carlsson. * Platform/CoreIPC/Connection.cpp: (CoreIPC::Connection::sendSyncMessage): (CoreIPC::Connection::sendSyncMessageFromSecondaryThread): Correcting a misapplied edit - didFailToSendSyncMessage should be kept in main thread message sending, not in secondary thread. 2013-01-23 Brady Eidson Recursion handling cancelled authentication challenges in NetworkProcess and https://bugs.webkit.org/show_bug.cgi?id=107702 Reviewed by Alexey Proskuryakov. This turned in to both a bug fix with authentication and a minimal refactoring of NetworkResourceLoader. - Rename ::stop to ::resourceHandleStopped - Move all cleanup code to ::resourceHandleStopped - Schedule a resourceHandleStopped call when an authentication cancellation occurs - Tell the WebResourceLoader to cancel when an authentication cancellation occurs * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::~NetworkResourceLoader): (WebKit::NetworkResourceLoader::start): (WebKit::NetworkResourceLoader::performStops): (WebKit::NetworkResourceLoader::resourceHandleStopped): (WebKit::NetworkResourceLoader::didFail): (WebKit::NetworkResourceLoader::receivedAuthenticationCancellation): * NetworkProcess/NetworkResourceLoader.h: * WebProcess/Network/WebResourceLoader.cpp: (WebKit::WebResourceLoader::cancelResourceLoader): * WebProcess/Network/WebResourceLoader.h: * WebProcess/Network/WebResourceLoader.messages.in: 2013-01-23 Christophe Dumez [EFL][WK2] Use C API inside ewk_cookie_manager https://bugs.webkit.org/show_bug.cgi?id=107661 Reviewed by Alexey Proskuryakov. Use C API inside ewk_cookie_manager instead of accessing C++ classes directly and violating layering. * PlatformEfl.cmake: * UIProcess/API/C/soup/WKCookieManagerSoup.cpp: Added. (toSoupCookiePersistentStorageType): (WKCookieManagerSetCookiePersistentStorage): Add C API for setting the persistent storage path and type when using libsoup. * UIProcess/API/C/soup/WKCookieManagerSoup.h: Added. * 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): (ewk_cookie_manager_persistent_storage_set): (ewk_cookie_manager_hostname_cookies_clear): * UIProcess/API/efl/ewk_cookie_manager_private.h: (EwkCookieManager::create): (EwkCookieManager): 2013-01-22 Anders Carlsson Use a platforom strategy for local storage https://bugs.webkit.org/show_bug.cgi?id=107600 Reviewed by Andreas Kling. Update for new storage strategy. * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::createStorageStrategy): (WebKit): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: (WebPlatformStrategies): 2013-01-21 Kentaro Hara Implement UIEvent constructor https://bugs.webkit.org/show_bug.cgi?id=107430 Reviewed by Adam Barth. Editor's draft: https://dvcs.w3.org/hg/d4e/raw-file/tip/source_respec.htm UIEvent constructor is implemented under a DOM4_EVENTS_CONSTRUCTOR flag, which is enabled on Safari and Chromium for now. * Configurations/FeatureDefines.xcconfig: 2013-01-22 Alexey Proskuryakov Move sandbox initialization to ChildProcess https://bugs.webkit.org/show_bug.cgi?id=107486 Reviewed by Sam Weinig. * NetworkProcess/NetworkProcess.h: * NetworkProcess/NetworkProcess.cpp: (WebKit::NetworkProcess::initializeSandbox): Removed. We no longer need this function to be implemented in each process type. * NetworkProcess/mac/NetworkProcessMac.mm: (WebKit::initializeSandbox): Removed a custom (and incomplete) implementation. (WebKit::NetworkProcess::processUpdateSandboxInitializationParameters): Clear sandbox profile path in parameters, telling ChildProcess to not enter a sandbox. * PluginProcess/PluginProcess.h: * PluginProcess/mac/PluginProcessMac.mm: Added FIXMEs, saying that we should switch to ChildProcess implementation. * Shared/ChildProcess.cpp: Dummy implementations for other platforms. * Shared/ChildProcess.h: Added processUpdateSandboxInitializationParameters, which child processes will override to change sandbox initialization parameters. * Shared/SandboxInitializationParameters.h: Added. * Shared/mac/SandboxInitialiationParametersMac.mm: Added. Abstracts out sandbox parameter vector for coding safety. Encapsulates other things that subclasses will want to do differently. * Shared/mac/ChildProcessMac.mm: (WebKit::ChildProcess::initializeSandbox): Added a shared implementation, based largely on WebProcess version. * SharedWorkerProcess/mac/SharedWorkerProcessMac.mm: Removed custom sandboxing code. * WebKit2.xcodeproj/project.pbxproj: Added SandboxInitializationParameters files. * WebProcess/WebProcess.cpp: * WebProcess/WebProcess.h: Updated dummy implementations to match ChildProcess. * WebProcess/mac/WebProcessMac.mm: (WebKit): Moved sandboxing code to ChildProcess. (WebKit::WebProcess::processUpdateSandboxInitializationParameters): Override profile path, because default one doesn't work for WebProcessService. 2013-01-22 Joseph Pecoraro [Mac] Enable Page Visibility (PAGE_VISIBILITY_API) https://bugs.webkit.org/show_bug.cgi?id=107230 Reviewed by David Kilzer. * Configurations/FeatureDefines.xcconfig: 2013-01-22 Joseph Pecoraro Remove empty file WebPageProxyMessageKinds.h https://bugs.webkit.org/show_bug.cgi?id=107335 Reviewed by Kentaro Hara. * GNUmakefile.list.am: * Shared/CoreIPCSupport/WebPageProxyMessageKinds.h: Removed. 2013-01-22 Tim Horton PDFPlugin: Build PDFPlugin everywhere, enable at runtime https://bugs.webkit.org/show_bug.cgi?id=107117 Reviewed by Alexey Proskuryakov. Since PDFLayerController SPI is all forward-declared, the plugin should build on all Mac platforms, and can be enabled at runtime. * Configurations/FeatureDefines.xcconfig: 2013-01-21 Dirk Schulze Add build flag for Canvas's Path object (disabled by default) https://bugs.webkit.org/show_bug.cgi?id=107473 Reviewed by Dean Jackson. Add CANVAS_PATH build flag to build systems. * Configurations/FeatureDefines.xcconfig: 2013-01-21 Jinwoo Song [EFL][WK2] Add APIs to set/get view source mode https://bugs.webkit.org/show_bug.cgi?id=106633 Reviewed by Gyuyoung Kim. Added APIs to set/get view source mode for enabling to load the source code of the web page. * UIProcess/API/efl/ewk_view.cpp: (ewk_view_source_mode_set): (ewk_view_source_mode_get): * UIProcess/API/efl/ewk_view.h: * UIProcess/API/efl/tests/test_ewk2_view.cpp: (TEST_F): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::setMainFrameInViewSourceMode): * UIProcess/WebPageProxy.h: (WebKit::WebPageProxy::mainFrameInViewSourceMode): (WebPageProxy): 2013-01-21 Sudarsana Nagineni [EFL][WK2] Implement WebInspector::localizedStringsURL() on EFL https://bugs.webkit.org/show_bug.cgi?id=107363 Reviewed by Benjamin Poulain. Implement WebInspector::localizedStringsURL() method to return the file URL of the localizedStrings.js. This prevents printing warnings about "Localized string not found" in the console and fixes Web inspector related failing tests on the bots. * WebProcess/WebPage/efl/WebInspectorEfl.cpp: (WebKit::WebInspector::localizedStringsURL): 2013-01-21 Kiran Muppala Enable process suppression by default on Mac https://bugs.webkit.org/show_bug.cgi?id=106804 Reviewed by Alexey Proskuryakov. * UIProcess/WebContext.cpp: (WebKit::WebContext::WebContext): Change initialized value of m_processSuppressionEnabled from false to true. * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitialize): Since process suppression is no longer disabled on construction, do not disable it for global child processes either. Instead enable occlusion notifications as they are needed to trigger process suppression. 2013-01-17 Andy Estes Add a USE() macro for content filtering code https://bugs.webkit.org/show_bug.cgi?id=107098 Reviewed by Mark Rowe. * WebProcess/WebCoreSupport/mac/WebSystemInterface.mm: (InitWebCoreSystemInterface): Use USE(CONTENT_FILTERING). 2013-01-21 Anders Carlsson Don't null out the IPC connection in ChildProcess:terminate https://bugs.webkit.org/show_bug.cgi?id=107469 Reviewed by Dan Bernstein. We already invalidate the connection, and Connection::sendMessage checks if a connection is valid and bails if it isn't, so the only thing that nulling out the connection here does is that it would force us to add random connection null checks everywhere. * Shared/ChildProcess.cpp: (WebKit::ChildProcess::terminate): 2013-01-21 Joone Hur [EFL] API unit tests are running extremely slow on the bots https://bugs.webkit.org/show_bug.cgi?id=104665 Reviewed by Gyuyoung Kim. Clear HTTP cache files before running the unit tests, which prevents performance degradation due to so many cache files. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: (EWK2UnitTest::EWK2UnitTestBase::SetUp): 2013-01-21 Gustavo Noronha Silva REGRESSION (r140285): GTK uses WKPageResourceLoadClient which was removed https://bugs.webkit.org/show_bug.cgi?id=107421 Unreviewed buildfix. * GNUmakefile.list.am: * UIProcess/API/gtk/WebKitResourceLoadClient.cpp: Removed. * UIProcess/API/gtk/WebKitResourceLoadClient.h: Removed. * UIProcess/API/gtk/WebKitWebView.cpp: No longer attach unexisting ResourceLoadClient. (webkitWebViewConstructed): 2013-01-21 Sheriff Bot Unreviewed, rolling out r139781. http://trac.webkit.org/changeset/139781 https://bugs.webkit.org/show_bug.cgi?id=107443 This patch seems to cause flakiness on Qt (Requested by chris- qBT_work on #webkit). * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::forceRepaintAsync): 2013-01-21 Thiago Marcos P. Santos REGRESSION (r140285): EFL uses WKPageResourceLoadClient which was removed https://bugs.webkit.org/show_bug.cgi?id=107417 Reviewed by Gyuyoung Kim. We had no choice but remove the ResourceLoadClientEfl after r140285 and thus our public API signals depending on it. The test_ewk2_auth_request unit test was skipped because it depends these signals and will be fixed in a different patch. * PlatformEfl.cmake: * UIProcess/API/efl/EWebKit2.h: * UIProcess/API/efl/EwkViewCallbacks.h: * UIProcess/API/efl/EwkViewImpl.cpp: (EwkViewImpl::EwkViewImpl): * UIProcess/API/efl/EwkViewImpl.h: (WebKit): (EwkViewImpl): * UIProcess/API/efl/ewk_resource.cpp: Removed. * UIProcess/API/efl/ewk_resource.h: Removed. * UIProcess/API/efl/ewk_resource_private.h: Removed. * UIProcess/API/efl/ewk_view.cpp: * UIProcess/API/efl/ewk_view.h: * UIProcess/efl/ResourceLoadClientEfl.cpp: Removed. * UIProcess/efl/ResourceLoadClientEfl.h: Removed. 2013-01-20 Viatcheslav Ostapenko Remove support getting per-resource callbacks in the UIProcess https://bugs.webkit.org/show_bug.cgi?id=107405 Reviewed by Sam Weinig. EFL, GTK and Qt WebKit2 build fixes after r140285. Remove from build WebResourceLoadClient.{cpp,h} deleted by r140285. * CMakeLists.txt: * GNUmakefile.list.am: * Target.pri: 2013-01-20 Sam Weinig Remove support getting per-resource callbacks in the UIProcess https://bugs.webkit.org/show_bug.cgi?id=107405 Reviewed by Anders Carlsson. Removes support for the WKPageResourceLoadClient. Access to per-resource callbacks are still available in the bundle, and via the WebInspector. * UIProcess/API/C/WKPage.cpp: * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: * UIProcess/WebPageProxy.h: * UIProcess/WebPageProxy.messages.in: Stop handling per-resource messages and forwarding them to the API. * UIProcess/WebResourceLoadClient.cpp: Removed. * UIProcess/WebResourceLoadClient.h: Removed. * WebKit2.xcodeproj/project.pbxproj: Remove the files. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::assignIdentifierToInitialRequest): (WebKit::WebFrameLoaderClient::dispatchWillSendRequest): (WebKit::WebFrameLoaderClient::dispatchDidReceiveResponse): (WebKit::WebFrameLoaderClient::dispatchDidReceiveContentLength): (WebKit::WebFrameLoaderClient::dispatchDidFinishLoading): (WebKit::WebFrameLoaderClient::dispatchDidFailLoading): Stop sending per-resource messages to the UIProcess. 2013-01-20 Gustavo Noronha Silva Unreviewed. Simple indentation fix. * GNUmakefile.am: 2013-01-20 Alexey Proskuryakov Remove obsolete plug-in sandboxing code. https://bugs.webkit.org/show_bug.cgi?id=107362 Reviewed by Darin Adler. * WebKit2.xcodeproj/project.pbxproj: * DerivedSources.make: * PluginProcess/mac/com.apple.WebKit.PluginProcess.sb.in: Removed. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::initializeSandbox): Fixed a memory leak in code that stays. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_GetValue): * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.h: * WebProcess/Plugins/Netscape/mac/NetscapeSandboxFunctions.mm: Removed API related parts. Remaining code will move to a better place in a follow-up patch, just keeping it here for easier reviewing. (enterSandbox): Removed no longer used arguments. 2013-01-17 Sam Weinig Don't initialize AppKit for processes that don't use it https://bugs.webkit.org/show_bug.cgi?id=107216 Reviewed by Alexey Proskuryakov. * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMainDelegate::doPreInitializationWork): * WebProcess/mac/WebProcessMainMac.mm: (WebKit::WebProcessMainDelegate::doPreInitializationWork): Move AppKit initialization to the two places it is used, the WebProcessMain and the PluginProcessMain. * Shared/ChildProcess.cpp: (WebKit::ChildProcess::initialize): Remove redundant call to InitializeWebKit2(). * Shared/mac/ChildProcessMain.h: (WebKit::ChildProcessMain): Remove initialization of AppKit now that the delegate does it if necessary, and move InitializeWebKit2() to after delegate.doPreInitializationWork(), so the delegate has a chance to set things up it, in this case, calling RunLoop::setUseApplicationRunLoopOnMainRunLoop if needed. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitializePluginProcess): * WebProcess/mac/WebProcessMac.mm: (WebKit::WebProcess::platformInitializeProcess): Remove now redundant call to RunLoop::setUseApplicationRunLoopOnMainRunLoop(). * WebProcess/mac/WebProcessServiceEntryPoints.mm: (WebKit::WebProcessServiceEventHandler): (webProcessServiceMain): (initializeWebProcessForWebProcessServiceForWebKitDevelopment): Call WebCore::RunLoop::setUseApplicationRunLoopOnMainRunLoop() and make call to InitializeWebKit2() more consistent. 2013-01-18 Tim Horton [wk2] Intrinsic content size should report a flexible width if the content is not wider than the minimum layout width https://bugs.webkit.org/show_bug.cgi?id=107334 Reviewed by Anders Carlsson. * UIProcess/API/mac/WKView.mm: (-[WKView _setIntrinsicContentSize:]): If the content is laid-out at or below the minimum layout width, it's flexible; otherwise, we need to inform autolayout that we require more space via our intrinsic content size. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Allow auto-sizing to expand its width beyond the minimum if needed. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setMinimumLayoutWidth): Allow auto-sizing to expand its width beyond the minimum if needed. 2013-01-18 Alexey Proskuryakov REGRESSION (r139985): Full Screen Youtube loses keyboard and mouse control https://bugs.webkit.org/show_bug.cgi?id=107191 Reviewed by Darin Adler. Moved initialization from platformInitializePluginProcess to platformInitializeProcess, because the former is called too late. In r139985, I used a correct location for WebProcess, but not for PluginProcess. * PluginProcess/mac/PluginProcessMac.mm: (WebKit::PluginProcess::platformInitializeProcess): (WebKit::PluginProcess::platformInitializePluginProcess): 2013-01-18 Brady Eidson Rework NetworkProcess resource load identifiers. and https://bugs.webkit.org/show_bug.cgi?id=107192 Reviewed by Alexey Proskuryakov. Having the NetworkProcess vend out identifiers to WebProcesses was a bad idea. This patch reverts that so that WebProcesses are in control of their own unique identifiers. The NetworkProcess doesn't need identifiers at all. It can represent outstanding loads with the loaders themselves. This patch adds a "SchedulableLoader" base class for normal and synchronous loaders. It reworks each use of identifiers into using SchedulableLoaders instead. This also gave an opportunity to move the serving of pending requests for a host into the HostRecord itself which cleans certain things up nicely. Change HostRecord to have queues of SchedulableLoaders instead of identifiers. Make HostRecord responsible for actually starting the loaders in its queues: * NetworkProcess/HostRecord.cpp: (WebKit::HostRecord::~HostRecord): (WebKit::HostRecord::scheduleResourceLoader): (WebKit::HostRecord::addLoaderInProgress): (WebKit::HostRecord::removeLoader): (WebKit::HostRecord::hasRequests): (WebKit::HostRecord::servePendingRequestsForQueue): (WebKit::HostRecord::servePendingRequests): (WebKit::HostRecord::limitsRequests): * NetworkProcess/HostRecord.h: (WebKit::HostRecord::create): HostRecord is now also RefCounted. new and delete are so 2004. * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad): Create the loader then schedule it with the scheduler, instead of having the scheduler create it. (WebKit::NetworkConnectionToWebProcess::performSynchronousLoad): (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): * NetworkProcess/NetworkConnectionToWebProcess.h: * NetworkProcess/NetworkConnectionToWebProcess.messages.in: Remove maps and sets of identifiers, replacing them with sets of SchedulableLoaders where needed. Rely on HostRecords to actually manage sets of SchedulableLoaders. Rely on HostRecord to do the actual serving of its pending requests: * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::NetworkResourceLoadScheduler): (WebKit::NetworkResourceLoadScheduler::scheduleLoader): (WebKit::NetworkResourceLoadScheduler::hostForURL): (WebKit::NetworkResourceLoadScheduler::removeLoader): (WebKit::NetworkResourceLoadScheduler::receivedRedirect): (WebKit::NetworkResourceLoadScheduler::servePendingRequests): (WebKit::NetworkResourceLoadScheduler::removeScheduledLoaders): (WebKit::NetworkResourceLoadScheduler::scheduleRemoveLoader): * NetworkProcess/NetworkResourceLoadScheduler.h: A new base class for all loaders that the scheduler and HostRecords might need to know about: * NetworkProcess/SchedulableLoader.cpp: (WebKit::SchedulableLoader::SchedulableLoader): (WebKit::SchedulableLoader::~SchedulableLoader): * NetworkProcess/SchedulableLoader.h: (WebKit::SchedulableLoader::loadParameters): (WebKit::SchedulableLoader::connectionToWebProcess): (WebKit::SchedulableLoader::isSynchronous): (WebKit::SchedulableLoader::setHostRecord): (WebKit::SchedulableLoader::hostRecord): Change to inherit from SchedulableLoader, removing some of the duplicated data and methods: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::NetworkResourceLoader): (WebKit::NetworkResourceLoader::connection): (WebKit::NetworkResourceLoader::destinationID): (WebKit::NetworkResourceLoader::start): (WebKit::NetworkResourceLoader::stop): (WebKit::NetworkResourceLoader::didReceiveResponse): (WebKit::NetworkResourceLoader::didFail): (WebKit::NetworkResourceLoader::willSendRequest): (WebKit::NetworkResourceLoader::shouldUseCredentialStorage): * NetworkProcess/NetworkResourceLoader.h: (WebKit::NetworkResourceLoader::create): Change to inherit from SchedulableLoader, removing some of the duplicated data and methods: * NetworkProcess/SyncNetworkResourceLoader.cpp: (WebKit::SyncNetworkResourceLoader::SyncNetworkResourceLoader): (WebKit::SyncNetworkResourceLoader::start): * NetworkProcess/SyncNetworkResourceLoader.h: (WebKit::SyncNetworkResourceLoader::create): (WebKit::SyncNetworkResourceLoader::isSynchronous): Fold the WebProcess resource load identifier in with the load parameters: * Shared/Network/NetworkResourceLoadParameters.cpp: (WebKit::NetworkResourceLoadParameters::NetworkResourceLoadParameters): (WebKit::NetworkResourceLoadParameters::encode): (WebKit::NetworkResourceLoadParameters::decode): * Shared/Network/NetworkResourceLoadParameters.h: (WebKit::NetworkResourceLoadParameters::identifier): The identifier is preset in the WebProcess and doesn't come from the NetworkProcess, so the message to schedule a load can now be asynchronous: * WebProcess/Network/WebResourceLoadScheduler.cpp: (WebKit::WebResourceLoadScheduler::scheduleLoad): Update to include a WebProcess generated identifier along with synchronous loads: * WebProcess/WebCoreSupport/WebPlatformStrategies.cpp: (WebKit::WebPlatformStrategies::loadResourceSynchronously): * WebProcess/WebCoreSupport/WebPlatformStrategies.h: * WebKit2.xcodeproj/project.pbxproj: 2013-01-18 Huang Dongsung Coordinated Graphics: CoordinatedTile::updateBackBuffer() returns a dirty rect. https://bugs.webkit.org/show_bug.cgi?id=107196 Reviewed by Kenneth Rohde Christiansen. Currently, CoordinatedTile::updateBackBuffer() always returns an empty vector. This patch makes CoordinatedTile::updateBackBuffer() return a correct dirty rect. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedTile.cpp: (WebKit::CoordinatedTile::updateBackBuffer): 2013-01-17 Tim Horton [WK2] Minimum layout width auto-sizing should use FrameView::enableAutoSizeMode so that it can shrink the viewport https://bugs.webkit.org/show_bug.cgi?id=107200 Reviewed by Simon Fraser. Make use of FrameView's auto-size mode to allow WKView's computed intrinsic content size to shrink below the current viewport size. * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::setMinimumLayoutWidth): Forward minimumLayoutWidth changes to WebPage. * UIProcess/mac/TiledCoreAnimationDrawingAreaProxy.mm: (WebKit::TiledCoreAnimationDrawingAreaProxy::sendUpdateGeometry): Remove minimumLayoutWidth argument on updateGeometry. * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: (WebKit::WebFrameLoaderClient::transitionToCommittedForNewPage): Enable auto-size mode on the new FrameView if needed. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::updateGeometry): Remove minimumLayoutWidth argument. * WebProcess/WebPage/DrawingArea.messages.in: Remove minimumLayoutWidth argument on updateGeometry. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): Initialize m_minimumLayoutWidth to 0. (WebKit::WebPage::setMinimumLayoutWidth): Keep track of minimumLayoutWidth on WebPage. Update auto-sizing state if needed. * WebProcess/WebPage/WebPage.h: (WebKit::WebPage::minimumLayoutWidth): * WebProcess/WebPage/WebPage.messages.in: Add SetMinimumLayoutWidth. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: (TiledCoreAnimationDrawingArea): Remove storage for m_minimumLayoutWidth. We can get it from WebPage instead. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): (WebKit::TiledCoreAnimationDrawingArea::mainFrameContentSizeChanged): Grab minimumLayoutWidth from WebPage. (WebKit::TiledCoreAnimationDrawingArea::updateGeometry): Don't setSize() if auto-sizing is enabled; FrameView will do the right thing. 2013-01-17 Jon Lee Do not track user interaction for plugins that are not snapshotted https://bugs.webkit.org/show_bug.cgi?id=107211 Reviewed by Dean Jackson. When the user interacts with a snapshotted plug-in, we extend that plug-in origin's expiration date. However, plug-ins may not be snapshotted for other reasons than the user's initial opt-in. In this case, that plug-in's origin might be not be in the cached table. This is an edge case that was not initially considered. * WebProcess/WebProcess.cpp: (WebKit::WebProcess::plugInDidReceiveUserInteraction): Convert the assertion to an if check, and return early if the entry is not found in the cache table. 2013-01-17 Alexey Proskuryakov REGRESSION (r139516): NetworkResourceLoadScheduler::receivedRedirect is not called. Rubber-stamped by Brady Eidson. * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::willSendRequest): Reverted a small part of r139516. 2013-01-17 Huang Dongsung Coordinated Graphics: Remove redundant behaviors in LayerTreeRenderer. https://bugs.webkit.org/show_bug.cgi?id=107084 Reviewed by Noam Rosenthal. There are two changes. 1. It is redundant to call GraphicsLayer::removeFromParent() or GraphicsLayer::removeAllChildren() before deleting GraphicsLayer, because the destructor of GraphicsLayerTextureMapper removes a parent and all children. 2. LayerTreeRenderer::setRootLayerID() does not need to remove all children of rootLayer because this method can be called only once. * UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp: (WebKit::LayerTreeRenderer::deleteLayer): (WebKit::LayerTreeRenderer::setRootLayerID): (WebKit::LayerTreeRenderer::purgeGLResources): 2013-01-17 Timothy Hatcher Make logging console messages to STDOUT work in WebKit2 via a new setting. https://bugs.webkit.org/show_bug.cgi?id=107157 Reviewed by Joseph Pecoraro. * Shared/WebPreferencesStore.h: * UIProcess/API/C/WKPreferences.cpp: (WKPreferencesSetLogsPageMessagesToSystemConsoleEnabled): Added. (WKPreferencesGetLogsPageMessagesToSystemConsoleEnabled): Added. * UIProcess/API/C/WKPreferencesPrivate.h: * UIProcess/WebInspectorProxy.cpp: (WebKit::createInspectorPageGroup): Enable logging in debug builds. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Set new setting in WebCore. 2013-01-17 Brady Eidson Each NetworkConnectionToWebProcess should keep its own map of NetworkResourceLoaders https://bugs.webkit.org/show_bug.cgi?id=107166 Reviewed by Alexey Proskuryakov. NetworkConnectionToWebProcess now keeps its own id->loader map so it can directly address them as needed: * NetworkProcess/NetworkConnectionToWebProcess.cpp: (WebKit::NetworkConnectionToWebProcess::~NetworkConnectionToWebProcess): (WebKit::NetworkConnectionToWebProcess::didReceiveMessage): (WebKit::NetworkConnectionToWebProcess::didClose): (WebKit::NetworkConnectionToWebProcess::scheduleResourceLoad): (WebKit::NetworkConnectionToWebProcess::removeLoadIdentifier): * NetworkProcess/NetworkConnectionToWebProcess.h: NetworkResourceLoadScheduler no longer keeps an identifier -> loader map: * NetworkProcess/NetworkResourceLoadScheduler.cpp: (WebKit::NetworkResourceLoadScheduler::scheduleResourceLoad): (WebKit::NetworkResourceLoadScheduler::removeLoadIdentifier): * NetworkProcess/NetworkResourceLoadScheduler.h: There is no longer such a thing as NetworkConnectionToWebProcessObserver: * NetworkProcess/NetworkResourceLoader.cpp: (WebKit::NetworkResourceLoader::NetworkResourceLoader): (WebKit::NetworkResourceLoader::~NetworkResourceLoader): (WebKit::NetworkResourceLoader::connectionToWebProcessDidClose): * NetworkProcess/NetworkResourceLoader.h: 2013-01-17 Tim Horton Remove an incorrect ASSERT() after r140002. Reviewed by Simon Fraser. setRootCompositingLayer(null) is valid now. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::setRootCompositingLayer): 2013-01-17 Poul Sysolyatin 32-bit build for Qt5 on Mac OS fails. https://bugs.webkit.org/show_bug.cgi?id=107094 We need to define NS_BUILD_32_LIKE_64 for 32-bit build for Mac OS. Fixed 32-bit build detection for support Qt5. Reviewed by Benjamin Poulain. * Target.pri: 2013-01-17 Martin Robinson [GTK] Build with LevelDB when IndexedDB is enabled https://bugs.webkit.org/show_bug.cgi?id=103220 Reviewed by Gustavo Noronha Silva. * GNUmakefile.am: When IndexedDatabase is enabled add the leveldb convenience library to the shared library link phase. 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