2012-09-14 Tor Arne Vestbø [Qt] Move .mm file to OBJECTIVE_SOURCES Reviewed by Simon Hausmann. * Target.pri: 2012-09-14 Sudarsana Nagineni WebKitTestRunner needs layoutTestController.setTabKeyCyclesThroughElements https://bugs.webkit.org/show_bug.cgi?id=42687 Reviewed by Kenneth Rohde Christiansen. Implement testRunner.setTabKeyCyclesThroughElements for WebKitTestRunner. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetTabKeyCyclesThroughElements): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setTabKeyCyclesThroughElements): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-14 Keishi Hattori Add runtime flag that enables lang attribute for form controls in LayoutTests https://bugs.webkit.org/show_bug.cgi?id=96636 Reviewed by Kent Tamura. * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-09-14 Grzegorz Czajkowski Add method to get the list of all available dictionaries https://bugs.webkit.org/show_bug.cgi?id=96518 Reviewed by Carlos Garcia Campos. * UIProcess/API/gtk/WebKitTextChecker.cpp: (WebKitTextChecker::getSpellCheckingLanguages): Update the method name that is called inside getSpellCheckingLanguages. This replace doesn't affect any on API changes. 2012-09-13 KwangYong Choi [WK2] Add color picker API support for WebKit2 https://bugs.webkit.org/show_bug.cgi?id=95058 Reviewed by Gyuyoung Kim. Add support for color picker API to WebKit2. * CMakeLists.txt: * GNUmakefile.list.am: * Shared/API/c/WKBase.h: * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * Shared/APIObject.h: * Target.pri: * UIProcess/API/C/WKAPICast.h: (WebKit): * UIProcess/API/C/WKColorPickerResultListener.cpp: Added. (WKColorPickerResultListenerGetTypeID): (WKColorPickerResultListenerColorSet): * UIProcess/API/C/WKColorPickerResultListener.h: Added. * UIProcess/API/C/WKPage.h: * UIProcess/API/gtk/WebKitUIClient.cpp: (attachUIClientToView): * UIProcess/WebColorChooserProxy.cpp: Added. (WebKit): (WebKit::WebColorChooserProxy::WebColorChooserProxy): (WebKit::WebColorChooserProxy::~WebColorChooserProxy): (WebKit::WebColorChooserProxy::endChooser): (WebKit::WebColorChooserProxy::setSelectedColor): * UIProcess/WebColorChooserProxy.h: (WebColorChooserProxy): (WebKit::WebColorChooserProxy::create): * UIProcess/WebColorPickerResultListenerProxy.cpp: Added. (WebKit): (WebKit::WebColorPickerResultListenerProxy::WebColorPickerResultListenerProxy): (WebKit::WebColorPickerResultListenerProxy::~WebColorPickerResultListenerProxy): (WebKit::WebColorPickerResultListenerProxy::invalidate): (WebKit::WebColorPickerResultListenerProxy::setColor): * UIProcess/WebColorPickerResultListenerProxy.h: Added. (WebKit): (WebColorPickerResultListenerProxy): (WebKit::WebColorPickerResultListenerProxy::create): (WebKit::WebColorPickerResultListenerProxy::type): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::close): (WebKit::WebPageProxy::showColorChooser): (WebKit::WebPageProxy::didEndColorChooser): (WebKit::WebPageProxy::processDidCrash): * UIProcess/WebPageProxy.h: (WebKit): (WebPageProxy): * UIProcess/WebUIClient.cpp: (WebKit): (WebKit::WebUIClient::showColorPicker): (WebKit::WebUIClient::hideColorPicker): * UIProcess/WebUIClient.h: (WebKit): (WebUIClient): * WebKit2.xcodeproj/project.pbxproj: * win/WebKit2.vcproj: * win/WebKit2Generated.make: 2012-09-13 KwangYong Choi [EFL][WK2] Implement missing initializeLogChannel function https://bugs.webkit.org/show_bug.cgi?id=96478 Reviewed by Gyuyoung Kim. Implemented log channel initialization function for EFL platform in WebKit2. * Platform/Logging.cpp: (WebKit): * Platform/Logging.h: (WebKit): * Platform/efl/LoggingEfl.cpp: Added. (WebKit): (WebKit::initializeLogChannel): Channel is initialized if its name is found in WEBKIT_DEBUG. * PlatformEfl.cmake: 2012-09-13 Mark Rowe WebKit looks for some files on the system even when building against an SDK. Reviewed by David Kilzer. If an SDK is being used, pass it through to our custom invocations of the preprocessor. * DerivedSources.make: 2012-09-13 Brent Fulgham [WinCairo] Unreviewed build fix for export declarations. New entries were added to the standard Windows export definition file, but were not added to the WinCairo version, breaking the build. * win/WebKit2CFLite.def: Incoproate changes from WebKit2.def file. 2012-09-13 Tim Horton Add optional debug logging when we fall into/out of threaded scrolling https://bugs.webkit.org/show_bug.cgi?id=93898 Reviewed by Simon Fraser. Update the scrolling tree's scrollingPerformanceLoggingEnabled preference before the early-return if we don't have layer debugging borders on. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): 2012-09-13 Sudarsana Nagineni [WK2][WTR] WebKitTestRunner needs testRunner.callShouldCloseOnWebView https://bugs.webkit.org/show_bug.cgi?id=96366 Reviewed by Anders Carlsson. Implement testRunner.callShouldCloseOnWebView for WebKitTestRunner by calling shouldClose() on the FrameLoader. * WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp: (WKBundleFrameCallShouldCloseOnWebView): * WebProcess/InjectedBundle/API/c/WKBundleFrame.h: 2012-09-13 Thiago Marcos P. Santos [EFL] Assertion reached on RenderThemeEFL when setting a theme to an invalid path https://bugs.webkit.org/show_bug.cgi?id=96649 Reviewed by Kenneth Rohde Christiansen. Updated the alternative test theme file. It is basically the default theme with extra padding on the button widget as specified by the comments on the test case. * UIProcess/API/efl/tests/resources/big_button_theme.edj: 2012-09-13 Balazs Kelemen [WK2] LayerTreeCoordinator should release unused UpdatedAtlases https://bugs.webkit.org/show_bug.cgi?id=95072 Reviewed by Jocelyn Turcotte. Release graphic buffers that haven't been used for a while in order to save memory. This way we can give back memory to the system when no user interaction happens after a period of time, for example when we are in the background. * Shared/ShareableBitmap.h: * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::LayerTreeCoordinator): (WebKit::LayerTreeCoordinator::beginContentUpdate): (WebKit): (WebKit::LayerTreeCoordinator::scheduleReleaseInactiveAtlases): (WebKit::LayerTreeCoordinator::releaseInactiveAtlasesTimerFired): * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h: (LayerTreeCoordinator): * WebProcess/WebPage/UpdateAtlas.cpp: (WebKit::UpdateAtlas::UpdateAtlas): (WebKit::UpdateAtlas::didSwapBuffers): Don't call buildLayoutIfNeeded here. It's enought to call it in beginPaintingOnAvailableBuffer and this way we can track whether this atlas is used with m_areaAllocator. (WebKit::UpdateAtlas::beginPaintingOnAvailableBuffer): * WebProcess/WebPage/UpdateAtlas.h: (WebKit::UpdateAtlas::addTimeInactive): (WebKit::UpdateAtlas::isInactive): (WebKit::UpdateAtlas::isInUse): (UpdateAtlas): 2012-09-13 Lauro Neto [Qt][WK2] fast/forms/access-key-for-all-elements.html fails https://bugs.webkit.org/show_bug.cgi?id=73917 Reviewed by Simon Hausmann. Access-key tests were failing due to hardcoded Mac OS X in the Qt WK2 user agent string. This commit moves the WK1 implementation to a shared one to be used by both versions. Use the shared implementation instead of hardcoding the user agent. * UIProcess/qt/WebPageProxyQt.cpp: (WebKit::WebPageProxy::standardUserAgent): 2012-09-13 Simon Hausmann [Qt] Fix build of WTR and the QML2 plugin on Windows https://bugs.webkit.org/show_bug.cgi?id=96652 Reviewed by Tor Arne Vestbø. Some components that we build such as WTR or the QML2 plugin include WebKit2 header files as well as WebKit2's config.h. Only the include paths of WebKit2 are required for that at the moment (WEBKIT += webkit2). Only on Windows WebKit2's config.h also includes WebCore/config.h, which in turn requires to have WebCore/platform in your include search path. That in turn means that any component that wants to use WebKit2 headers also needs the WebCore headers, but only one Windows. It turns out that for the Qt build we don't need it, so skip it in our configuration and make the include path requirement the same across all the platforms we build. * config.h: 2012-09-13 Andras Becsi [Qt][WK2] REGRESSION(r128245): It made zillion API tests fail https://bugs.webkit.org/show_bug.cgi?id=96531 Reviewed by Jocelyn Turcotte. Preferences have to be updated after the drawing area was created for compositing mode to be set. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::WebPage): 2012-09-13 Simon Hausmann [Qt] Fix UIProcess build with Qt on Windows https://bugs.webkit.org/show_bug.cgi?id=96635 Reviewed by Csaba Osztrogonác. Enabling setShouldCloseConnectionOnProcessTermination on the connection is something that is only implemented in ConnectionUnix, not ConnectionWin.cpp, where appears to be built-in functionality. * UIProcess/WebConnectionToWebProcess.cpp: (WebKit::WebConnectionToWebProcess::WebConnectionToWebProcess): 2012-09-13 Oswald Buddenhagen [Qt] Fix build against namespaced Qt Reviewed by Tor Arne Vestbø. * UIProcess/qt/PageViewportControllerClientQt.h: 2012-09-13 Michał Pakuła vel Rutka [EFL][Qt][WK2] Implement shared undo controller for EFL and Qt port. https://bugs.webkit.org/show_bug.cgi?id=92504 Reviewed by Kenneth Rohde Christiansen. EFL port needs an undo controller similiar to one from Qt port. Instead of duplicating the code existing class was renamed and moved to UIProcess directory. * PlatformEfl.cmake: * Target.pri: * UIProcess/API/efl/PageClientImpl.cpp: (WebKit::PageClientImpl::registerEditCommand): (WebKit::PageClientImpl::clearAllEditCommands): (WebKit::PageClientImpl::canUndoRedo): (WebKit::PageClientImpl::executeUndoRedo): * UIProcess/API/efl/PageClientImpl.h: (PageClientImpl): * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/DefaultUndoController.cpp: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoController.cpp. (WebKit): (WebKit::DefaultUndoController::registerEditCommand): (WebKit::DefaultUndoController::clearAllEditCommands): (WebKit::DefaultUndoController::canUndoRedo): (WebKit::DefaultUndoController::executeUndoRedo): * UIProcess/DefaultUndoController.h: Renamed from Source/WebKit2/UIProcess/qt/QtWebUndoController.h. (WebKit): (DefaultUndoController): * UIProcess/qt/QtPageClient.cpp: (WebKit::QtPageClient::initialize): * UIProcess/qt/QtPageClient.h: (WebKit): (QtPageClient): 2012-09-13 Christophe Dumez [EFL][WK2] Make _ref() functions return the object https://bugs.webkit.org/show_bug.cgi?id=96604 Reviewed by Gyuyoung Kim. Make _ref() functions return the ref'd object to make them more convenient to use. Also fix their usage to make use of the newly returned value. This change is consistent with eina_stringshare_ref() in EFL and g_object_ref() in glib. * UIProcess/API/efl/ewk_back_forward_list.cpp: (createEinaList): * UIProcess/API/efl/ewk_back_forward_list_item.cpp: (ewk_back_forward_list_item_ref): * UIProcess/API/efl/ewk_back_forward_list_item.h: * UIProcess/API/efl/ewk_context.cpp: (ewk_context_download_job_add): * UIProcess/API/efl/ewk_download_job.cpp: (ewk_download_job_ref): (ewk_download_job_response_set): * UIProcess/API/efl/ewk_download_job.h: * UIProcess/API/efl/ewk_form_submission_request.cpp: (ewk_form_submission_request_ref): * UIProcess/API/efl/ewk_form_submission_request.h: * UIProcess/API/efl/ewk_intent.cpp: (ewk_intent_ref): * UIProcess/API/efl/ewk_intent.h: * UIProcess/API/efl/ewk_intent_service.cpp: (ewk_intent_service_ref): * UIProcess/API/efl/ewk_intent_service.h: * UIProcess/API/efl/ewk_navigation_policy_decision.cpp: (ewk_navigation_policy_decision_ref): * UIProcess/API/efl/ewk_navigation_policy_decision.h: * UIProcess/API/efl/ewk_url_request.cpp: (ewk_url_request_ref): * UIProcess/API/efl/ewk_url_request.h: * UIProcess/API/efl/ewk_url_response.cpp: (ewk_url_response_ref): * UIProcess/API/efl/ewk_url_response.h: * UIProcess/API/efl/ewk_url_scheme_request.cpp: (ewk_url_scheme_request_ref): * UIProcess/API/efl/ewk_url_scheme_request.h: * UIProcess/API/efl/ewk_view.cpp: (ewk_view_resource_load_initiated): * UIProcess/API/efl/ewk_web_resource.cpp: (ewk_web_resource_ref): * UIProcess/API/efl/ewk_web_resource.h: 2012-09-12 Sheriff Bot Unreviewed, rolling out r127876. http://trac.webkit.org/changeset/127876 https://bugs.webkit.org/show_bug.cgi?id=96600 mouse click doesn't work for spin button if spin button in iframe (Requested by yosin on #webkit). * WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp: (WebKit::InjectedBundleNavigationAction::InjectedBundleNavigationAction): * 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): * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-09-12 Brady Eidson Assert in NetscapePlugin::destroy() with async plugin init and https://bugs.webkit.org/show_bug.cgi?id=96576 Reviewed by Anders Carlsson. Most of the NPN_* API calls have a plug-in protector during the calls. NPN_Invoke and NPN_InvokeDefault do not. * WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp: (WebKit::NPN_Invoke): Protect the plug-in during this call. (WebKit::NPN_InvokeDefault): Ditto. 2012-09-11 Alexey Proskuryakov REGRESSION(r127384): Non-existent directories are no longer created for sandbox paths https://bugs.webkit.org/show_bug.cgi?id=96442 Reviewed by Darin Adler. * Shared/SandboxExtension.h: (WebKit::SandboxExtension::createHandleForReadWriteDirectory): * Shared/mac/SandboxExtensionMac.mm: (WebKit::SandboxExtension::createHandleForReadWriteDirectory): Added a function for read-write configuration directories. It matches appendReadwriteSandboxDirectory() function behavior from WebProcessMac.mm. * UIProcess/WebContext.cpp: (WebKit::WebContext::createNewWebProcess): * UIProcess/mac/WebContextMac.mm: (WebKit::WebContext::platformInitializeWebProcess): Use the new function for directories that need to be created if they don't exist. 2012-09-12 Christophe Dumez [WK2][WKTR] TestRunner needs to implement originsWithApplicationCache https://bugs.webkit.org/show_bug.cgi?id=96496 Reviewed by Kenneth Rohde Christiansen. Add Bundle C API to retrieve security origins with an application cache. This is needed by WebKitTestRunner to support originsWithApplicationCache. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleCopyOriginsWithApplicationCache): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::originsWithApplicationCache): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-12 Christophe Dumez [WK2][WKTR] TestRunner needs to implement dumpApplicationCacheDelegateCallbacks https://bugs.webkit.org/show_bug.cgi?id=96374 Reviewed by Kenneth Rohde Christiansen. Add Bundle C API to reset the application cache quota for a given origin. Add new reachedApplicationCacheOriginQuota callback to WKBundlePageUIClient which is called from WebChromeClient::reachedApplicationCacheOriginQuota(). Those are needed by WebKitTestRunner to dump information about the application cache callbacks if instructed to. * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetApplicationCacheOriginQuota): (WKBundleResetApplicationCacheOriginQuota): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::resetApplicationCacheOriginQuota): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::didReachApplicationCacheOriginQuota): (WebKit): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: (WebKit): (InjectedBundlePageUIClient): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): * win/WebKit2.def: * win/WebKit2CFLite.def: 2012-09-12 Sheriff Bot Unreviewed, rolling out r128280. http://trac.webkit.org/changeset/128280 https://bugs.webkit.org/show_bug.cgi?id=96498 it broke compilation on windows debug bot (Requested by loislo on #webkit). * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetApplicationCacheOriginQuota): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: (WebKit): (InjectedBundlePageUIClient): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): 2012-09-12 Byungwoo Lee [EFL][WK2] WorkQueue::dispatchAfterDelay() doesn't work properly. https://bugs.webkit.org/show_bug.cgi?id=91179 Reviewed by Gyuyoung Kim. When UI Process is crashed and WebProcess's ecore main loop is very busy or lockup also, watchdocCallback() function in the ChildProcess.cpp doesn't triggered. And this is because of that WorkQueue::dispatchAfterDelay() function uses ecore timer for getting timer event. For removing the dependency between the dispatchAfterDelay() and ecore main loop, new timer event mechanism is added to WorkQueue main loop. * Platform/WorkQueue.h: (TimerWorkItem): (WorkQueue::TimerWorkItem::dispatch): (WorkQueue::TimerWorkItem::expireTime): (WorkQueue::TimerWorkItem::expired): (WorkQueue): * Platform/efl/WorkQueueEfl.cpp: (WorkQueue::TimerWorkItem::create): (WorkQueue::TimerWorkItem::TimerWorkItem): (WorkQueue::performFileDescriptorWork): (WorkQueue::getCurrentTime): (WorkQueue::getNextTimeOut): (WorkQueue::performTimerWork): (WorkQueue::workQueueThread): (WorkQueue::dispatchAfterDelay): 2012-09-12 Christophe Dumez [WK2][WKTR] TestRunner needs to implement dumpApplicationCacheDelegateCallbacks https://bugs.webkit.org/show_bug.cgi?id=96374 Reviewed by Kenneth Rohde Christiansen. Add Bundle C API to reset the application cache quota for a given origin. Add new reachedApplicationCacheOriginQuota callback to WKBundlePageUIClient which is called from WebChromeClient::reachedApplicationCacheOriginQuota(). Those are needed by WebKitTestRunner to dump information about the application cache callbacks if instructed to. * Shared/APIClientTraits.cpp: (WebKit): * Shared/APIClientTraits.h: * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetApplicationCacheOriginQuota): (WKBundleResetApplicationCacheOriginQuota): * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::resetApplicationCacheOriginQuota): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp: (WebKit::InjectedBundlePageUIClient::didReachApplicationCacheOriginQuota): (WebKit): * WebProcess/InjectedBundle/InjectedBundlePageUIClient.h: (WebKit): (InjectedBundlePageUIClient): * WebProcess/WebCoreSupport/WebChromeClient.cpp: (WebKit::WebChromeClient::reachedApplicationCacheOriginQuota): 2012-09-12 Mikhail Pozdnyakov [WK2] [WTR] WebKitTestRunner needs TestRunner.workerThreadCount https://bugs.webkit.org/show_bug.cgi?id=96388 Reviewed by Kenneth Rohde Christiansen. Added WKBundleGetWorkerThreadCount() function to Injected Bundle private API. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleGetWorkerThreadCount): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::workerThreadCount): Returns count of worker threads. (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-12 Darin Adler Make NetscapePlugin::m_timers use HashMap instead of deleteAllValues https://bugs.webkit.org/show_bug.cgi?id=96469 Reviewed by Dan Bernstein. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::NetscapePlugin::scheduleTimer): Call release rather than leakPtr when entering a timer into the map. (WebKit::NetscapePlugin::unscheduleTimer): Take an existing timer from the map with the take function rather than the roundabout code needed before. (WebKit::NetscapePlugin::destroy): Remove now-unneeded call to deleteAllValues. * WebProcess/Plugins/Netscape/NetscapePlugin.h: Change the value type for TimerMap to OwnPtr rather than Timer*. 2012-09-11 Anders Carlsson Accelerated compositing should always be forced when using the tiled drawing area https://bugs.webkit.org/show_bug.cgi?id=96449 Reviewed by Andy Estes. There's code in WebPage::updatePreferences that will turn off accelerated compositing unless accelerated drawing is enabled. This should only be done in the non-tiled model, so move the code to DrawingAreaImpl::updatePreferences. * WebProcess/WebPage/DrawingArea.h: (WebKit::DrawingArea::updatePreferences): This now takes a WebPreferencesStore. * WebProcess/WebPage/DrawingAreaImpl.cpp: (WebKit::DrawingAreaImpl::updatePreferences): Move code here from WebPage::updatePreferences. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::updatePreferences): Pass the WebPreferencesStore to DrawingArea::updatePreferences. * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h: * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea): Remove call to updatePreferences, it's going to be called by the WebPage object later. (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): This now takes a WebPreferencesStore. 2012-09-11 Brady Eidson Get rid of the PluginProcessShim for 64-bit plug-ins and https://bugs.webkit.org/show_bug.cgi?id=96415 Reviewed by Anders Carlsson. * PluginProcess/PluginProcess.h: (PluginProcess): * PluginProcess/mac/PluginProcessMac.mm: (WebKit::getCurrentEventButtonState): (WebKit): (WebKit::beginModal): Moved from the shim, to be shared with shimmed processes. (WebKit::endModal): Ditto. (WebKit::replacedRunModalForWindow): Only used by Cocoa overrides. (WebKit::PluginProcess::initializeShim): (WebKit::PluginProcess::initializeCocoaOverrides): * PluginProcess/mac/PluginProcessMainMac.mm: (WebKit::PluginProcessMain): Only call initializeShim for 32-bit processes, always call initializeCocoaOverrides * PluginProcess/mac/PluginProcessShim.h: (PluginProcessShimCallbacks): * PluginProcess/mac/PluginProcessShim.mm: (WebKit): (WebKit::shimModalDialog): Call beginModal/endModal from the shim callbacks. (WebKit::shimAlert): Ditto. (WebKit::WebKitPluginProcessShimInitialize): Don't do the Cocoa overrides as they are now handled outside the shim. 2012-09-11 Marcelo Lira Restore original value of mock scrollbars enabled in InternalSettings https://bugs.webkit.org/show_bug.cgi?id=87680 Reviewed by Adam Barth. Added backup support for mock scrollbars state in InternalSettings::Backup, and removed support for these from Qt's DumpRenderTree. * win/WebKit2.def: 2012-09-11 Brady Eidson We should wait longer before killing the PluginProcess. and https://bugs.webkit.org/show_bug.cgi?id=96407 Reviewed by Anders Carlsson. Currently we kill the PluginProcess 15 seconds after the last plug-in is destroyed. This is short enough that most users will have the process killed many times during browsing sessions, which is painful because relaunching the process is I/O and kernel intensive. In an ideal world we could keep it around forever until the system tells us resources are running low. In reality we do want to kill it occasionally to get a clean slate from any plug-in leaks. A reasonable balance for now is to set a minimum lifetime of 30 minutes on the plug-in process and to extend the termination timer from 15 seconds to 10 minutes. * PluginProcess/PluginProcess.cpp: (WebKit::PluginProcess::PluginProcess): (WebKit::PluginProcess::initializePluginProcess): (WebKit::PluginProcess::setMinimumLifetime): (WebKit): (WebKit::PluginProcess::minimumLifetimeTimerFired): * PluginProcess/PluginProcess.h: (PluginProcess): * Shared/Plugins/PluginProcessCreationParameters.cpp: (WebKit::PluginProcessCreationParameters::encode): (WebKit::PluginProcessCreationParameters::decode): * Shared/Plugins/PluginProcessCreationParameters.h: (PluginProcessCreationParameters): * UIProcess/Plugins/PluginProcessProxy.cpp: (WebKit): (WebKit::PluginProcessProxy::didFinishLaunching): 2012-09-11 Jinwoo Song Deploy StringBuilder::appendNumber() and StringBuilder::appendLiteral() in more places https://bugs.webkit.org/show_bug.cgi?id=96344 Reviewed by Benjamin Poulain. Use StringBuilder::appendNumber() instead of String::number(). Also deploy StringBuilder::appendLiteral() instead of String::append() in the surrounding code. * Shared/WebMemorySampler.cpp: (WebKit::WebMemorySampler::appendCurrentMemoryUsageToFile): * UIProcess/InspectorServer/WebSocketServerConnection.cpp: (WebKit::WebSocketServerConnection::sendHTTPResponseHeader): * UIProcess/InspectorServer/qt/WebInspectorServerQt.cpp: (WebKit::WebInspectorServer::inspectorUrlForPageID): (WebKit::WebInspectorServer::buildPageList): 2012-09-11 Anders Carlsson Fix speling error in comment. * WebProcess/Plugins/Netscape/NetscapePlugin.cpp: (WebKit::isTransparentSilverlightBackgroundValue): 2012-09-11 Raphael Kubo da Costa [EFL] Rewrite the EFL-related Find modules https://bugs.webkit.org/show_bug.cgi?id=95237 Reviewed by Kenneth Rohde Christiansen. * CMakeLists.txt: Stop setting the LINK_FLAGS property. * PlatformEfl.cmake: Add libraries and include directories for each Enlightenment Foundation Library used by the port. 2012-09-11 Christophe Dumez [WK2][WKTR] TestRunner needs to implement setApplicationCacheOriginQuota https://bugs.webkit.org/show_bug.cgi?id=96379 Reviewed by Kenneth Rohde Christiansen. Add Bundle C API to set the application cache quota for a given security origin. This is needed by WebKitTestRunner to implement setApplicationCacheOriginQuota(). * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetApplicationCacheOriginQuota): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setApplicationCacheOriginQuota): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-11 Mikhail Pozdnyakov [WK2][WTR] WebKitTestRunner needs testRunner.setSpatialNavigationEnabled https://bugs.webkit.org/show_bug.cgi?id=96269 Reviewed by Kenneth Rohde Christiansen. Added a new setter for spacial navigation enabling to Injected Bundle private API. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetSpatialNavigationEnabled): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setSpatialNavigationEnabled): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-11 Marcelo Lira [Qt][WK2] Page loading status API lacks a status for intentionally stopped loading https://bugs.webkit.org/show_bug.cgi?id=83062 Reviewed by Tor Arne Vestbø. When the loading of a page is intentionally interrupted, the loading status is set to the new state LoadStoppedStatus. This reflects reality more accurately because the page was not fully loaded (a LoadSucceededStatus), and it wasn't an unexpected error (a LoadFailedStatus). * UIProcess/API/qt/qquickwebview.cpp: (QQuickWebViewPrivate::loadDidStop): * UIProcess/API/qt/qquickwebview_p.h: * UIProcess/API/qt/qquickwebview_p_p.h: (QQuickWebViewPrivate): * UIProcess/API/qt/tests/publicapi/tst_publicapi.cpp: * UIProcess/API/qt/tests/qmltests/WebView/tst_loadUrl.qml: * UIProcess/API/qt/tests/qmltests/common/TestWebView.qml: * UIProcess/qt/QtWebPageLoadClient.cpp: (WebKit::QtWebPageLoadClient::dispatchLoadStopped): (WebKit): (WebKit::QtWebPageLoadClient::dispatchLoadFailed): * UIProcess/qt/QtWebPageLoadClient.h: (QtWebPageLoadClient): 2012-09-11 Tor Arne Vestbø [Qt] Add a configure step to the Qt build system This allows building the Qt port using just 'qmake WebKit.pro'. Using the build-webkit script is still supported, and will add slightly more logic to the build, such as detecting the need for clean or incremental builds. Internally, the build system now uses a new variable, WEBKIT_CONFIG, for all things related to configuring the build, such as use/have/enable flags, and these are translated to defines in default_post. Project files should no longer check contains(DEFINES,...) to detect features, but use the new enable?(), use?(), and have?() functions. The no_webkit1 and no_webkit2 options have been translated into WEBKIT_CONFIG options as well, and can be checked using build?(). Reviewed by Simon Hausmann. * Target.pri: * UIProcess/API/qt/tests/tests.pri: * WebKit2.pri: * config.h: 2012-09-11 Christophe Dumez [WK2][WKTR] TestRunner needs to implement clearApplicationCacheForOrigin https://bugs.webkit.org/show_bug.cgi?id=96372 Reviewed by Kenneth Rohde Christiansen. Add Bundle C API to clear the application cache for a given origin. This is needed by WebKitTestRunner to implement clearApplicationCacheForOrigin(). * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleClearApplicationCacheForOrigin): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::clearApplicationCacheForOrigin): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-11 Mikhail Pozdnyakov [WK2][WTR] WebKitTestRunner needs layoutTestController.setMinimumTimerInterval https://bugs.webkit.org/show_bug.cgi?id=96256 Reviewed by Kenneth Rohde Christiansen. Added new setter for minimum DOM timer interval to InjectedBundle private API. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleSetMinimumTimerInterval): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::setMinimumTimerInterval): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-11 Kangil Han [WK2][EFL] Fix compile warnings when enable tiled backing store https://bugs.webkit.org/show_bug.cgi?id=95342 Reviewed by Gyuyoung Kim. Fixed compile time warning messages when enable tiled backing store. * UIProcess/API/efl/ewk_view.cpp: (ewk_view_accelerated_compositing_mode_enter): Fixed invalid use of 'EINA_SAFETY_ON_NULL_RETURN_VAL' since it used '!' ahead of evasGl value so it is always null. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedGraphicsLayer.cpp: (WebCore::CoordinatedGraphicsLayer::setChildren): Replaced 'int' i with 'unsigned' because its comparing value is 'size_t'. * WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp: (WebKit::LayerTreeCoordinator::renderNextFrame): Replaced 'int' i with 'unsigned' because its comparing value is 'size_t'. (WebKit::LayerTreeCoordinator::beginContentUpdate): Replaced 'int' i with 'unsigned' because its comparing value is 'size_t'. 2012-09-11 Byungwoo Lee [EFL][WK2] WKEinaSharedString needs a function to adopt eina stringshare. https://bugs.webkit.org/show_bug.cgi?id=96201 Reviewed by Kenneth Rohde Christiansen. WKEinaSharedString needs a to adopt eina stringshare directly. With this adopt function, an instance that is directly created with eina_stringshare_add() can be easily handled by WKEinaSharedString without calling eina_stringshare_del() for preventing memory leak. * UIProcess/API/cpp/efl/WKEinaSharedString.cpp: (WKEinaSharedString::adopt): * UIProcess/API/cpp/efl/WKEinaSharedString.h: * UIProcess/API/efl/tests/test_ewk2_eina_shared_string.cpp: (TEST_F): 2012-09-11 Andras Becsi [Qt][WK2] Fix the build with recent Qt5 https://bugs.webkit.org/show_bug.cgi?id=96283 Reviewed by Simon Hausmann. We should not use deprecated Qt API because doing that results in build failure since all the deprecated API was disabled in qtbase (https://codereview.qt-project.org/#change,24890). * UIProcess/API/qt/qwebnavigationhistory.cpp: (QWebNavigationListModel::roleNames): (QWebNavigationListModel::reset): * UIProcess/API/qt/qwebnavigationhistory_p.h: * UIProcess/API/qt/tests/qrawwebview/tst_qrawwebview.cpp: (WebView::load): * UIProcess/qt/WebPopupMenuProxyQt.cpp: (PopupMenuItemModel): (WebKit::PopupMenuItemModel::PopupMenuItemModel): (WebKit::PopupMenuItemModel::roleNames): (WebKit): 2012-09-11 Christophe Dumez WTR needs an implementation of applicationCacheDiskUsageForOrigin https://bugs.webkit.org/show_bug.cgi?id=87188 Reviewed by Kenneth Rohde Christiansen. Add Bundle private C API to retrieve the application cache usage for a specific security origin. This is needed by WebKitTestRunner. * WebProcess/InjectedBundle/API/c/WKBundle.cpp: (WKBundleGetAppCacheUsageForOrigin): * WebProcess/InjectedBundle/API/c/WKBundlePrivate.h: * WebProcess/InjectedBundle/InjectedBundle.cpp: (WebKit::InjectedBundle::appCacheUsageForOrigin): (WebKit): * WebProcess/InjectedBundle/InjectedBundle.h: (InjectedBundle): 2012-09-11 Zhigang Gong [EFL][WK2] Add necessary include directory in WebKit2 https://bugs.webkit.org/show_bug.cgi?id=95173 Unreviewed build fix. revision r126694: Move TextureMapperGL to use GraphicsContext3D. modify the TextureMapperGL.h to include GraphicsContext3D.h. And when enable TEXTURE_MAPPER, file WebKit2/Shared/ShareableSurface.cpp will include TextureMapperGL.h then depends on GraphicsContext3D.h thus it need to add ANGLE director. As currently, this problem only affect EFL platform, according to Gyuyoung Kim's suggestion, we add this include dir into EFL private file PlatformEfl.cmake. Otherwise, the build will fail. To trigger this problem by using the following command: ./Tools/Scripts/build-webkit --efl --3d-rendering --tiled-backing-store * CMakeLists.txt: 2012-09-10 Byungwoo Lee [EFL][WK2] Build warning : fix warning about extended initializer lists on EWK2UnitTestBase.cpp. https://bugs.webkit.org/show_bug.cgi?id=95990 Reviewed by Gyuyoung Kim. Fix build warning about extended initializer lists only available with -std=c++0x or -std=gnu++0x. * UIProcess/API/efl/tests/UnitTestUtils/EWK2UnitTestBase.cpp: (EWK2UnitTest::ewk2UnitTestBrowserViewSmartClass): (EWK2UnitTest): (EWK2UnitTest::EWK2UnitTestBase::EWK2UnitTestBase): 2012-09-10 Beth Dakin https://bugs.webkit.org/show_bug.cgi?id=96158 Need API to suppress scrollbar animations -and corresponding- Reviewed by Sam Weinig. Add suppressScrollbarAnimations as a WebCreationParameter. * Shared/WebPageCreationParameters.h: (WebPageCreationParameters): New API. Calls into the web process for the setter but not the getter. * UIProcess/API/C/WKPage.cpp: (WKPageSetSuppressScrollbarAnimations): (WKPageAreScrollbarAnimationsSuppressed): * UIProcess/API/C/WKPage.h: * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::WebPageProxy): (WebKit::WebPageProxy::setSuppressScrollbarAnimations): (WebKit): (WebKit::WebPageProxy::creationParameters): * UIProcess/WebPageProxy.h: (WebPageProxy): (WebKit::WebPageProxy::areScrollbarAnimationsSuppressed): * WebProcess/WebPage/WebPage.messages.in: Call into WebCore. * WebProcess/WebPage/WebPage.cpp: (WebKit::WebPage::setSuppressScrollbarAnimations): (WebKit): * WebProcess/WebPage/WebPage.h: (WebPage): This ScrollableArea area function is re-named by this patch in WebCore. * WebProcess/Plugins/PDF/BuiltInPDFView.h: * WebProcess/Plugins/PDF/BuiltInPDFView.mm: (WebKit::BuiltInPDFView::scrollbarsCanBeActive): 2012-09-10 James Robinson Unreviewed, rolling out r127837. http://trac.webkit.org/changeset/127837 https://bugs.webkit.org/show_bug.cgi?id=93898 Broke ScrollingCoordinator on chromium * WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm: (WebKit::TiledCoreAnimationDrawingArea::updatePreferences): 2012-09-10 Jer Noble Unreviewed; rolling out r128081. http://trac.webkit.org/changeset/128081 https://bugs.webkit.org/show_bug.cgi?id=96134 New test http/tests/media/video-donottrack.html fails to run on Apple test bots. * Shared/APIClientTraits.h: * WebProcess/InjectedBundle/API/c/WKBundlePage.h: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.cpp: * WebProcess/InjectedBundle/InjectedBundlePageLoaderClient.h: (InjectedBundlePageLoaderClient): * WebProcess/WebCoreSupport/WebFrameLoaderClient.cpp: * WebProcess/WebCoreSupport/WebFrameLoaderClient.h: (WebFrameLoaderClient): * WebProcess/qt/QtBuiltinBundlePage.cpp: (WebKit::QtBuiltinBundlePage::QtBuiltinBundlePage): 2012-09-07 Jon Lee Update notifications to latest spec https://bugs.webkit.org/show_bug.cgi?id=91726 Reviewed by Alexey Proskuryakov. Expose lang and dir. * UIProcess/API/C/WKNotification.cpp: (WKNotificationCopyLang): (WKNotificationCopyDir): * UIProcess/API/C/WKNotification.h: * UIProcess/Notifications/WebNotification.cpp: (WebKit::WebNotification::WebNotification): * UIProcess/Notifications/WebNotification.h: (WebKit::WebNotification::create): (WebKit::WebNotification::lang): (WebKit::WebNotification::dir): (WebNotification): * UIProcess/Notifications/WebNotificationManagerProxy.cpp: (WebKit::WebNotificationManagerProxy::show): * UIProcess/Notifications/WebNotificationManagerProxy.h: (WebNotificationManagerProxy): * UIProcess/WebPageProxy.cpp: (WebKit::WebPageProxy::showNotification): * UIProcess/WebPageProxy.h: (WebPageProxy): * UIProcess/WebPageProxy.messages.in: * WebProcess/Notifications/WebNotificationManager.cpp: (WebKit::WebNotificationManager::show): 2012-09-10 Alexey Proskuryakov Build fix. * UIProcess/WebContext.h: Added a default value for relatedPage argment - if you don't have one, null is fine. 2012-09-10 Alexey Proskuryakov [WK2] Add an API to open a page in same process https://bugs.webkit.org/show_bug.cgi?id=96306 Reviewed by Anders Carlsson. The name "related" inspired by . * UIProcess/API/mac/WKView.h: Added an API. It's unwieldy, but I blame WKBrowsingContextGroup, not the related view. * UIProcess/API/mac/WKViewPrivate.h: Matching SPI for clients that mostly use C APIs. * UIProcess/API/mac/WKView.mm: (-[WKView initWithFrame:processGroup:browsingContextGroup:]): Use new back-end signature. (-[WKView initWithFrame:processGroup:browsingContextGroup:relatedToView:]): Get page from WKView, and call back-end. (-[WKView initWithFrame:contextRef:pageGroupRef:]): Reimplement existing method by calling new, more powerful one. (-[WKView initWithFrame:contextRef:pageGroupRef:relatedToPage:]): Just one change, pass relatedPage to the context. * UIProcess/WebContext.cpp: (WebKit::WebContext::createWebPage): If related page is not null, use its process. * UIProcess/WebContext.h: (WebContext): Updated createWebPage signature. 2012-09-10 Brady Eidson Javascript in foreground tabs should not wait synchronously for plug-ins to load and https://bugs.webkit.org/show_bug.cgi?id=96167 Reviewed by Geoff Garen. Synchronously waiting for initialization to complete when javascript accesses the plug-in script object severely reduces the effectiveness of having an asynchronous NPP_New. Such as with background tabs that have never been viewed, we already have cases where JS calls into the plug-in element fail because we haven't bothered to initialize the plug-in. We get a huge win by expanding that to foreground tabs that simply haven't finished initializing their plug-ins. * WebProcess/Plugins/PluginView.cpp: (WebKit::PluginView::scriptObject): If initialization is not complete just return 0 - They can get at the script object later. Remove the notion of "wait for asynchronous initialization" altogether: * WebProcess/Plugins/Netscape/NetscapePlugin.h: (NetscapePlugin): * WebProcess/Plugins/PDF/BuiltInPDFView.h: (BuiltInPDFView): * WebProcess/Plugins/Plugin.h: (Plugin): * WebProcess/Plugins/PluginProxy.cpp: * WebProcess/Plugins/PluginProxy.h: (PluginProxy): 2012-09-07 Jer Noble