summaryrefslogtreecommitdiff
path: root/Source/WebKit2
diff options
context:
space:
mode:
Diffstat (limited to 'Source/WebKit2')
-rw-r--r--Source/WebKit2/CMakeLists.txt3
-rw-r--r--Source/WebKit2/ChangeLog708
-rw-r--r--Source/WebKit2/DerivedSources.make6
-rw-r--r--Source/WebKit2/GNUmakefile.list.am6
-rw-r--r--Source/WebKit2/Platform/Logging.cpp4
-rw-r--r--Source/WebKit2/Platform/Logging.h2
-rw-r--r--Source/WebKit2/Platform/WorkQueue.h23
-rw-r--r--Source/WebKit2/Platform/efl/LoggingEfl.cpp58
-rw-r--r--Source/WebKit2/Platform/efl/WorkQueueEfl.cpp131
-rw-r--r--Source/WebKit2/PlatformEfl.cmake3
-rw-r--r--Source/WebKit2/PluginProcess/PluginProcess.h1
-rw-r--r--Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm69
-rw-r--r--Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm7
-rw-r--r--Source/WebKit2/PluginProcess/mac/PluginProcessShim.h4
-rw-r--r--Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm58
-rw-r--r--Source/WebKit2/Shared/API/c/WKBase.h1
-rw-r--r--Source/WebKit2/Shared/APIClientTraits.cpp6
-rw-r--r--Source/WebKit2/Shared/APIClientTraits.h6
-rw-r--r--Source/WebKit2/Shared/APIObject.h1
-rw-r--r--Source/WebKit2/Shared/SandboxExtension.h4
-rw-r--r--Source/WebKit2/Shared/ShareableBitmap.h1
-rw-r--r--Source/WebKit2/Shared/mac/SandboxExtensionMac.mm15
-rw-r--r--Source/WebKit2/Target.pri11
-rw-r--r--Source/WebKit2/UIProcess/API/C/WKAPICast.h2
-rw-r--r--Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.cpp48
-rw-r--r--Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.h43
-rw-r--r--Source/WebKit2/UIProcess/API/C/WKPage.h8
-rw-r--r--Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp15
-rw-r--r--Source/WebKit2/UIProcess/API/efl/PageClientImpl.h2
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.cpp3
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_context.cpp3
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_download_job.cpp9
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_download_job.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_intent.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_intent_service.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_intent_service.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_url_request.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_url_request.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_url_response.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_url_response.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_view.cpp3
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_web_resource.cpp6
-rw-r--r--Source/WebKit2/UIProcess/API/efl/ewk_web_resource.h4
-rw-r--r--Source/WebKit2/UIProcess/API/efl/tests/resources/big_button_theme.edjbin124051 -> 133487 bytes
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitTextChecker.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp2
-rw-r--r--Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h5
-rw-r--r--Source/WebKit2/UIProcess/DefaultUndoController.cpp (renamed from Source/WebKit2/UIProcess/qt/QtWebUndoController.cpp)18
-rw-r--r--Source/WebKit2/UIProcess/DefaultUndoController.h (renamed from Source/WebKit2/UIProcess/qt/QtWebUndoController.h)21
-rw-r--r--Source/WebKit2/UIProcess/WebColorChooserProxy.cpp60
-rw-r--r--Source/WebKit2/UIProcess/WebColorChooserProxy.h17
-rw-r--r--Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.cpp60
-rw-r--r--Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.h66
-rw-r--r--Source/WebKit2/UIProcess/WebConnectionToWebProcess.cpp2
-rw-r--r--Source/WebKit2/UIProcess/WebContext.cpp6
-rw-r--r--Source/WebKit2/UIProcess/WebPageProxy.cpp37
-rw-r--r--Source/WebKit2/UIProcess/WebPageProxy.h9
-rw-r--r--Source/WebKit2/UIProcess/WebUIClient.cpp21
-rw-r--r--Source/WebKit2/UIProcess/WebUIClient.h6
-rw-r--r--Source/WebKit2/UIProcess/mac/WebContextMac.mm2
-rw-r--r--Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h4
-rw-r--r--Source/WebKit2/UIProcess/qt/QtPageClient.cpp4
-rw-r--r--Source/WebKit2/UIProcess/qt/QtPageClient.h8
-rw-r--r--Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp6
-rw-r--r--Source/WebKit2/WebKit2.xcodeproj/project.pbxproj18
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp26
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp9
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h1
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h6
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h6
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp35
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h6
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp2
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp11
-rw-r--r--Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h3
-rw-r--r--Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp8
-rw-r--r--Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp13
-rw-r--r--Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h2
-rw-r--r--Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp6
-rw-r--r--Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp35
-rw-r--r--Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h7
-rw-r--r--Source/WebKit2/WebProcess/WebPage/DrawingArea.h3
-rw-r--r--Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp12
-rw-r--r--Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h1
-rw-r--r--Source/WebKit2/WebProcess/WebPage/UpdateAtlas.cpp3
-rw-r--r--Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h13
-rw-r--r--Source/WebKit2/WebProcess/WebPage/WebPage.cpp24
-rw-r--r--Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h2
-rw-r--r--Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm15
-rw-r--r--Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm8
-rw-r--r--Source/WebKit2/config.h2
-rw-r--r--Source/WebKit2/win/WebKit2.def5
-rwxr-xr-xSource/WebKit2/win/WebKit2.vcproj20
-rw-r--r--Source/WebKit2/win/WebKit2CFLite.def16
-rw-r--r--Source/WebKit2/win/WebKit2Generated.make1
104 files changed, 1758 insertions, 275 deletions
diff --git a/Source/WebKit2/CMakeLists.txt b/Source/WebKit2/CMakeLists.txt
index 16e6eab5c..d0096ac25 100644
--- a/Source/WebKit2/CMakeLists.txt
+++ b/Source/WebKit2/CMakeLists.txt
@@ -235,6 +235,8 @@ SET(WebKit2_SOURCES
UIProcess/WebBackForwardList.cpp
UIProcess/WebBatteryManagerProxy.cpp
UIProcess/WebBatteryProvider.cpp
+ UIProcess/WebColorChooserProxy.cpp
+ UIProcess/WebColorPickerResultListenerProxy.cpp
UIProcess/WebConnectionToWebProcess.cpp
UIProcess/WebContext.cpp
UIProcess/WebContextConnectionClient.cpp
@@ -290,6 +292,7 @@ SET(WebKit2_SOURCES
UIProcess/API/C/WKBackForwardListItem.cpp
UIProcess/API/C/WKBatteryManager.cpp
UIProcess/API/C/WKBatteryStatus.cpp
+ UIProcess/API/C/WKColorPickerResultListener.cpp
UIProcess/API/C/WKContext.cpp
UIProcess/API/C/WKCookieManager.cpp
UIProcess/API/C/WKCredential.cpp
diff --git a/Source/WebKit2/ChangeLog b/Source/WebKit2/ChangeLog
index ceaaf2831..9e29ab1ca 100644
--- a/Source/WebKit2/ChangeLog
+++ b/Source/WebKit2/ChangeLog
@@ -1,3 +1,711 @@
+2012-09-14 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
+
+ [Qt] Move .mm file to OBJECTIVE_SOURCES
+
+ Reviewed by Simon Hausmann.
+
+ * Target.pri:
+
+2012-09-14 Sudarsana Nagineni <sudarsana.nagineni@linux.intel.com>
+
+ 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 <keishi@webkit.org>
+
+ 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 <g.czajkowski@samsung.com>
+
+ 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 <ky0.choi@samsung.com>
+
+ [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 <ky0.choi@samsung.com>
+
+ [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 <mrowe@apple.com>
+
+ <rdar://problem/12283706> 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 <bfulgham@webkit.org>
+
+ [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 <timothy_horton@apple.com>
+
+ Add optional debug logging when we fall into/out of threaded scrolling
+ https://bugs.webkit.org/show_bug.cgi?id=93898
+ <rdar://problem/12089098>
+
+ 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 <sudarsana.nagineni@linux.intel.com>
+
+ [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 <thiago.santos@intel.com>
+
+ [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 <kbalazs@webkit.org>
+
+ [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 <lauro.neto@openbossa.org>
+
+ [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 <simon.hausmann@nokia.com>
+
+ [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 <andras.becsi@nokia.com>
+
+ [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 <simon.hausmann@nokia.com>
+
+ [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 <oswald.buddenhagen@nokia.com>
+
+ [Qt] Fix build against namespaced Qt
+
+ Reviewed by Tor Arne Vestbø.
+
+ * UIProcess/qt/PageViewportControllerClientQt.h:
+
+2012-09-13 Michał Pakuła vel Rutka <m.pakula@samsung.com>
+
+ [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 <christophe.dumez@intel.com>
+
+ [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 <webkit.review.bot@gmail.com>
+
+ 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 <beidson@apple.com>
+
+ Assert in NetscapePlugin::destroy() with async plugin init
+ <rdar://problem/12277595> 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 <ap@apple.com>
+
+ <rdar://problem/12275537> 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 <christophe.dumez@intel.com>
+
+ [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 <christophe.dumez@intel.com>
+
+ [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 <webkit.review.bot@gmail.com>
+
+ 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 <bw80.lee@samsung.com>
+
+ [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 <christophe.dumez@intel.com>
+
+ [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 <mikhail.pozdnyakov@intel.com>
+
+ [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 <darin@apple.com>
+
+ Make NetscapePlugin::m_timers use HashMap<OwnPtr> 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<Timer> rather than Timer*.
+
+2012-09-11 Anders Carlsson <andersca@apple.com>
+
+ 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 <beidson@apple.com>
+
+ Get rid of the PluginProcessShim for 64-bit plug-ins
+ <rdar://problem/12068560> 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 <marcelo.lira@openbossa.org>
+
+ 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 <beidson@apple.com>
We should wait longer before killing the PluginProcess.
diff --git a/Source/WebKit2/DerivedSources.make b/Source/WebKit2/DerivedSources.make
index f1f5c2cec..496c73031 100644
--- a/Source/WebKit2/DerivedSources.make
+++ b/Source/WebKit2/DerivedSources.make
@@ -124,6 +124,10 @@ else
TEXT_PREPROCESSOR_FLAGS=-E -P -x c -std=c89
endif
+ifneq ($(SDKROOT),)
+ SDK_FLAGS=-isysroot $(SDKROOT)
+endif
+
SANDBOX_PROFILES = \
com.apple.WebProcess.sb \
com.apple.WebKit.PluginProcess.sb
@@ -132,7 +136,7 @@ all: $(SANDBOX_PROFILES)
%.sb : %.sb.in
@echo Pre-processing $* sandbox profile...
- $(CC) $(TEXT_PREPROCESSOR_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" $< > $@
+ $(CC) $(SDK_FLAGS) $(TEXT_PREPROCESSOR_FLAGS) $(FRAMEWORK_FLAGS) $(HEADER_FLAGS) -include "wtf/Platform.h" $< > $@
endif # MACOS
diff --git a/Source/WebKit2/GNUmakefile.list.am b/Source/WebKit2/GNUmakefile.list.am
index ed15d030b..f10249d35 100644
--- a/Source/WebKit2/GNUmakefile.list.am
+++ b/Source/WebKit2/GNUmakefile.list.am
@@ -49,6 +49,7 @@ webkit2_h_api += \
$(WebKit2)/UIProcess/API/C/WKBackForwardListItem.h \
$(WebKit2)/UIProcess/API/C/WKBatteryManager.h \
$(WebKit2)/UIProcess/API/C/WKBatteryStatus.h \
+ $(WebKit2)/UIProcess/API/C/WKColorPickerResultListener.h \
$(WebKit2)/UIProcess/API/C/WKContext.h \
$(WebKit2)/UIProcess/API/C/WKContextPrivate.h \
$(WebKit2)/UIProcess/API/C/WKCookieManager.h \
@@ -530,6 +531,8 @@ webkit2_sources += \
Source/WebKit2/UIProcess/API/C/WKBatteryManager.h \
Source/WebKit2/UIProcess/API/C/WKBatteryStatus.cpp \
Source/WebKit2/UIProcess/API/C/WKBatteryStatus.h \
+ Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.cpp \
+ Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.h \
Source/WebKit2/UIProcess/API/C/WKContext.cpp \
Source/WebKit2/UIProcess/API/C/WKContext.h \
Source/WebKit2/UIProcess/API/C/WKContextPrivate.h \
@@ -814,7 +817,10 @@ webkit2_sources += \
Source/WebKit2/UIProcess/WebBatteryManagerProxy.h \
Source/WebKit2/UIProcess/WebBatteryProvider.cpp \
Source/WebKit2/UIProcess/WebBatteryProvider.h \
+ Source/WebKit2/UIProcess/WebColorChooserProxy.cpp \
Source/WebKit2/UIProcess/WebColorChooserProxy.h \
+ Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.cpp \
+ Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.h \
Source/WebKit2/UIProcess/WebConnectionToWebProcess.cpp \
Source/WebKit2/UIProcess/WebConnectionToWebProcess.h \
Source/WebKit2/UIProcess/WebContext.cpp \
diff --git a/Source/WebKit2/Platform/Logging.cpp b/Source/WebKit2/Platform/Logging.cpp
index 33b463743..17694c993 100644
--- a/Source/WebKit2/Platform/Logging.cpp
+++ b/Source/WebKit2/Platform/Logging.cpp
@@ -38,14 +38,14 @@ WTFLogChannel LogView = { 0x00000008, "WebKit2LogLevel", WTFLogChannelOf
WTFLogChannel LogIconDatabase = { 0x00000010, "WebKit2LogLevel", WTFLogChannelOff };
WTFLogChannel LogKeyHandling = { 0x00000020, "WebKit2LogLevel", WTFLogChannelOff };
-#if !PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(QT)
+#if !PLATFORM(MAC) && !PLATFORM(GTK) && !PLATFORM(QT) && !PLATFORM(EFL)
void initializeLogChannel(WTFLogChannel* channel)
{
// FIXME: Each platform will need to define their own initializeLogChannel().
}
#endif
-#if PLATFORM(GTK) || PLATFORM(QT)
+#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
WTFLogChannel* getChannelFromName(const String& channelName)
{
if (!(channelName.length() >= 2))
diff --git a/Source/WebKit2/Platform/Logging.h b/Source/WebKit2/Platform/Logging.h
index c47bfff6e..173d604e9 100644
--- a/Source/WebKit2/Platform/Logging.h
+++ b/Source/WebKit2/Platform/Logging.h
@@ -46,7 +46,7 @@ extern WTFLogChannel LogView;
void initializeLogChannel(WTFLogChannel*);
void initializeLogChannelsIfNecessary(void);
-#if PLATFORM(GTK) || PLATFORM(QT)
+#if PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(EFL)
WTFLogChannel* getChannelFromName(const String& channelName);
#endif
diff --git a/Source/WebKit2/Platform/WorkQueue.h b/Source/WebKit2/Platform/WorkQueue.h
index d6e929577..6a5c756b3 100644
--- a/Source/WebKit2/Platform/WorkQueue.h
+++ b/Source/WebKit2/Platform/WorkQueue.h
@@ -187,6 +187,21 @@ private:
HashMap<int, Vector<EventSource*> > m_eventSources;
typedef HashMap<int, Vector<EventSource*> >::iterator EventSourceIterator;
#elif PLATFORM(EFL)
+ class TimerWorkItem {
+ public:
+ static PassOwnPtr<TimerWorkItem> create(Function<void()>, double expireTime);
+ void dispatch() { m_function(); }
+ double expireTime() const { return m_expireTime; }
+ bool expired(double currentTime) const { return currentTime >= m_expireTime; }
+
+ protected:
+ TimerWorkItem(Function<void()>, double expireTime);
+
+ private:
+ Function<void()> m_function;
+ double m_expireTime;
+ };
+
fd_set m_fileDescriptorSet;
int m_maxFileDescriptor;
int m_readFromPipeDescriptor;
@@ -199,13 +214,17 @@ private:
int m_socketDescriptor;
Function<void()> m_socketEventHandler;
- HashMap<int, OwnPtr<Ecore_Timer> > m_timers;
+ Vector<OwnPtr<TimerWorkItem> > m_timerWorkItems;
+ Mutex m_timerWorkItemsLock;
void sendMessageToThread(const char*);
static void* workQueueThread(WorkQueue*);
void performWork();
void performFileDescriptorWork();
- static bool timerFired(void*);
+ static double getCurrentTime();
+ struct timeval* getNextTimeOut();
+ void performTimerWork();
+ void insertTimerWorkItem(PassOwnPtr<TimerWorkItem>);
#endif
};
diff --git a/Source/WebKit2/Platform/efl/LoggingEfl.cpp b/Source/WebKit2/Platform/efl/LoggingEfl.cpp
new file mode 100644
index 000000000..5c8b70097
--- /dev/null
+++ b/Source/WebKit2/Platform/efl/LoggingEfl.cpp
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "Logging.h"
+
+#if !LOG_DISABLED
+
+namespace WebKit {
+
+void initializeLogChannel(WTFLogChannel* channel)
+{
+ DEFINE_STATIC_LOCAL(Vector<WTFLogChannel*>, activatedChannels, ());
+
+ // Fill activatedChannels vector only once based on names set in logValue.
+ if (activatedChannels.isEmpty()) {
+ const String logValue = getenv("WEBKIT_DEBUG");
+ if (logValue.isEmpty())
+ return;
+
+ Vector<String> activatedNames;
+ logValue.split(',', activatedNames);
+ for (size_t i = 0; i < activatedNames.size(); i++) {
+ WTFLogChannel* activeChannel = getChannelFromName(activatedNames[i]);
+ if (activeChannel)
+ activatedChannels.append(activeChannel);
+ }
+ }
+
+ if (activatedChannels.contains(channel))
+ channel->state = WTFLogChannelOn;
+}
+
+} // namespace WebKit
+
+#endif // !LOG_DISABLED
diff --git a/Source/WebKit2/Platform/efl/WorkQueueEfl.cpp b/Source/WebKit2/Platform/efl/WorkQueueEfl.cpp
index 41ffedf53..6c505b41c 100644
--- a/Source/WebKit2/Platform/efl/WorkQueueEfl.cpp
+++ b/Source/WebKit2/Platform/efl/WorkQueueEfl.cpp
@@ -20,34 +20,29 @@
#include "config.h"
#include "WorkQueue.h"
+#include <sys/timerfd.h>
#include <wtf/Assertions.h>
-
-class TimerWorkItem {
-public:
- TimerWorkItem(int timerID, const Function<void()>& function, WorkQueue* queue)
- : m_function(function)
- , m_queue(queue)
- , m_timerID(timerID)
- {
- }
- ~TimerWorkItem() { }
-
- Function<void()> function() const { return m_function; }
- WorkQueue* queue() const { return m_queue; }
-
- int timerID() const { return m_timerID; }
-
-private:
- Function<void()> m_function;
- WorkQueue* m_queue;
- int m_timerID;
-};
+#include <wtf/CurrentTime.h>
static const int invalidSocketDescriptor = -1;
static const int threadMessageSize = 1;
static const char finishThreadMessage[] = "F";
static const char wakupThreadMessage[] = "W";
+PassOwnPtr<WorkQueue::TimerWorkItem> WorkQueue::TimerWorkItem::create(Function<void()> function, double expireTime)
+{
+ if (expireTime < 0)
+ return nullptr;
+
+ return adoptPtr(new TimerWorkItem(function, expireTime));
+}
+
+WorkQueue::TimerWorkItem::TimerWorkItem(Function<void()> function, double expireTime)
+ : m_function(function)
+ , m_expireTime(expireTime)
+{
+}
+
void WorkQueue::platformInitialize(const char* name)
{
int fds[2];
@@ -91,7 +86,7 @@ void WorkQueue::performFileDescriptorWork()
{
fd_set readFileDescriptorSet = m_fileDescriptorSet;
- if (select(m_maxFileDescriptor + 1, &readFileDescriptorSet, 0, 0, 0) >= 0) {
+ if (select(m_maxFileDescriptor + 1, &readFileDescriptorSet, 0, 0, getNextTimeOut()) >= 0) {
if (FD_ISSET(m_readFromPipeDescriptor, &readFileDescriptorSet)) {
char readBuf[threadMessageSize];
if (read(m_readFromPipeDescriptor, readBuf, threadMessageSize) == -1)
@@ -105,6 +100,74 @@ void WorkQueue::performFileDescriptorWork()
}
}
+struct timeval* WorkQueue::getNextTimeOut()
+{
+ MutexLocker locker(m_timerWorkItemsLock);
+ if (m_timerWorkItems.isEmpty())
+ return 0;
+
+ static struct timeval timeValue;
+ timeValue.tv_sec = 0;
+ timeValue.tv_usec = 0;
+ double timeOut = m_timerWorkItems[0]->expireTime() - currentTime();
+ if (timeOut > 0) {
+ timeValue.tv_sec = static_cast<long>(timeOut);
+ timeValue.tv_usec = static_cast<long>((timeOut - timeValue.tv_sec) * 1000000);
+ }
+
+ return &timeValue;
+}
+
+void WorkQueue::insertTimerWorkItem(PassOwnPtr<TimerWorkItem> item)
+{
+ if (!item)
+ return;
+
+ size_t position = 0;
+
+ // m_timerWorkItems should be ordered by expire time.
+ for (; position < m_timerWorkItems.size(); ++position)
+ if (item->expireTime() < m_timerWorkItems[position]->expireTime())
+ break;
+
+ m_timerWorkItems.insert(position, item);
+}
+
+void WorkQueue::performTimerWork()
+{
+ // Protects m_timerWorkItems.
+ m_timerWorkItemsLock.lock();
+
+ if (m_timerWorkItems.isEmpty()) {
+ m_timerWorkItemsLock.unlock();
+ return;
+ }
+
+ double current = currentTime();
+ Vector<OwnPtr<TimerWorkItem> > timerWorkItems;
+
+ // Copies all the timer work items in m_timerWorkItems to local vector.
+ m_timerWorkItems.swap(timerWorkItems);
+
+ for (size_t i = 0; i < timerWorkItems.size(); ++i) {
+ if (!timerWorkItems[i]->expired(current)) {
+ // If a timer work item does not expired, keep it to the m_timerWorkItems.
+ // m_timerWorkItems should be ordered by expire time.
+ insertTimerWorkItem(timerWorkItems[i].release());
+ continue;
+ }
+
+ // If a timer work item expired, dispatch the function of the work item.
+ // Before dispatching, m_timerWorkItemsLock should unlock for preventing deadlock,
+ // because it can be accessed inside the function of the timer work item dispatched.
+ m_timerWorkItemsLock.unlock();
+ timerWorkItems[i]->dispatch();
+ m_timerWorkItemsLock.lock();
+ }
+
+ m_timerWorkItemsLock.unlock();
+}
+
void WorkQueue::sendMessageToThread(const char* message)
{
if (write(m_writeToPipeDescriptor, message, threadMessageSize) == -1)
@@ -115,6 +178,7 @@ void* WorkQueue::workQueueThread(WorkQueue* workQueue)
{
while (workQueue->m_threadLoop) {
workQueue->performWork();
+ workQueue->performTimerWork();
workQueue->performFileDescriptorWork();
}
@@ -153,21 +217,16 @@ void WorkQueue::dispatch(const Function<void()>& function)
sendMessageToThread(wakupThreadMessage);
}
-bool WorkQueue::timerFired(void* data)
+void WorkQueue::dispatchAfterDelay(const Function<void()>& function, double delay)
{
- TimerWorkItem* item = static_cast<TimerWorkItem*>(data);
- if (item && item->queue()->m_isValid) {
- item->queue()->dispatch(item->function());
- item->queue()->m_timers.take(item->timerID());
- delete item;
- }
+ if (delay < 0)
+ return;
- return ECORE_CALLBACK_CANCEL;
-}
+ MutexLocker locker(m_timerWorkItemsLock);
+ OwnPtr<TimerWorkItem> timerWorkItem = TimerWorkItem::create(function, currentTime() + delay);
+ if (!timerWorkItem)
+ return;
-void WorkQueue::dispatchAfterDelay(const Function<void()>& function, double delay)
-{
- static int timerId = 1;
- m_timers.set(timerId, adoptPtr(ecore_timer_add(delay, reinterpret_cast<Ecore_Task_Cb>(timerFired), new TimerWorkItem(timerId, function, this))));
- timerId++;
+ insertTimerWorkItem(timerWorkItem.release());
+ sendMessageToThread(wakupThreadMessage);
}
diff --git a/Source/WebKit2/PlatformEfl.cmake b/Source/WebKit2/PlatformEfl.cmake
index 9abc6ec34..9418d91b7 100644
--- a/Source/WebKit2/PlatformEfl.cmake
+++ b/Source/WebKit2/PlatformEfl.cmake
@@ -1,4 +1,5 @@
LIST(APPEND WebKit2_SOURCES
+ Platform/efl/LoggingEfl.cpp
Platform/efl/ModuleEfl.cpp
Platform/efl/WorkQueueEfl.cpp
Platform/unix/SharedMemoryUnix.cpp
@@ -24,6 +25,8 @@ LIST(APPEND WebKit2_SOURCES
Shared/soup/PlatformCertificateInfo.cpp
Shared/soup/WebCoreArgumentCodersSoup.cpp
+ UIProcess/DefaultUndoController.cpp
+
UIProcess/API/C/efl/WKView.cpp
UIProcess/API/cpp/efl/WKEinaSharedString.cpp
diff --git a/Source/WebKit2/PluginProcess/PluginProcess.h b/Source/WebKit2/PluginProcess/PluginProcess.h
index 5ae4d359e..be34e9fce 100644
--- a/Source/WebKit2/PluginProcess/PluginProcess.h
+++ b/Source/WebKit2/PluginProcess/PluginProcess.h
@@ -56,6 +56,7 @@ public:
#if PLATFORM(MAC)
void initializeShim();
+ void initializeCocoaOverrides();
void setModalWindowIsShowing(bool);
void setFullscreenWindowIsShowing(bool);
diff --git a/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm b/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm
index fab921e75..f4e834c57 100644
--- a/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm
+++ b/Source/WebKit2/PluginProcess/mac/PluginProcessMac.mm
@@ -36,6 +36,7 @@
#import <WebCore/LocalizedStrings.h>
#import <WebKitSystemInterface.h>
#import <dlfcn.h>
+#import <objc/runtime.h>
#import <wtf/HashSet.h>
namespace WebKit {
@@ -160,16 +161,6 @@ static UInt32 getCurrentEventButtonState()
return 0;
#endif
}
-
-static void cocoaWindowShown(NSWindow *window)
-{
- fullscreenWindowTracker().windowShown(window);
-}
-
-static void cocoaWindowHidden(NSWindow *window)
-{
- fullscreenWindowTracker().windowHidden(window);
-}
static void carbonWindowShown(WindowRef window)
{
@@ -190,14 +181,44 @@ static void setModal(bool modalWindowIsShowing)
PluginProcess::shared().setModalWindowIsShowing(modalWindowIsShowing);
}
+static unsigned modalCount = 0;
+
+static void beginModal()
+{
+ // Make sure to make ourselves the front process
+ ProcessSerialNumber psn;
+ GetCurrentProcess(&psn);
+ SetFrontProcess(&psn);
+
+ if (!modalCount++)
+ setModal(true);
+}
+
+static void endModal()
+{
+ if (!--modalCount)
+ setModal(false);
+}
+
+static IMP NSApplication_RunModalForWindow;
+
+static NSInteger replacedRunModalForWindow(id self, SEL _cmd, NSWindow* window)
+{
+ beginModal();
+ NSInteger result = ((NSInteger (*)(id, SEL, NSWindow *))NSApplication_RunModalForWindow)(self, _cmd, window);
+ endModal();
+
+ return result;
+}
+
void PluginProcess::initializeShim()
{
const PluginProcessShimCallbacks callbacks = {
shouldCallRealDebugger,
isWindowActive,
getCurrentEventButtonState,
- cocoaWindowShown,
- cocoaWindowHidden,
+ beginModal,
+ endModal,
carbonWindowShown,
carbonWindowHidden,
setModal,
@@ -207,6 +228,30 @@ void PluginProcess::initializeShim()
initFunc(callbacks);
}
+void PluginProcess::initializeCocoaOverrides()
+{
+ // Override -[NSApplication runModalForWindow:]
+ Method runModalForWindowMethod = class_getInstanceMethod(objc_getClass("NSApplication"), @selector(runModalForWindow:));
+ NSApplication_RunModalForWindow = method_setImplementation(runModalForWindowMethod, reinterpret_cast<IMP>(replacedRunModalForWindow));
+
+ NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter];
+
+ // Track when any Cocoa window is about to be be shown.
+ id orderOnScreenObserver = [defaultCenter addObserverForName:WKWindowWillOrderOnScreenNotification()
+ object:nil
+ queue:nil
+ usingBlock:^(NSNotification *notification) { fullscreenWindowTracker().windowShown([notification object]); }];
+ // Track when any Cocoa window is about to be hidden.
+ id orderOffScreenObserver = [defaultCenter addObserverForName:WKWindowWillOrderOffScreenNotification()
+ object:nil
+ queue:nil
+ usingBlock:^(NSNotification *notification) { fullscreenWindowTracker().windowHidden([notification object]); }];
+
+ // Leak the two observers so that they observe notifications for the lifetime of the process.
+ CFRetain(orderOnScreenObserver);
+ CFRetain(orderOffScreenObserver);
+}
+
void PluginProcess::setModalWindowIsShowing(bool modalWindowIsShowing)
{
m_connection->send(Messages::PluginProcessProxy::SetModalWindowIsShowing(modalWindowIsShowing), 0);
diff --git a/Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm b/Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm
index 732cff83a..45b56b925 100644
--- a/Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm
+++ b/Source/WebKit2/PluginProcess/mac/PluginProcessMainMac.mm
@@ -116,8 +116,13 @@ int PluginProcessMain(const CommandLine& commandLine)
WTF::initializeMainThread();
RunLoop::initializeMainRunLoop();
- // Initialize the shim.
+#if defined(__i386__)
+ // Initialize the shim for 32-bit only.
PluginProcess::shared().initializeShim();
+#endif
+
+ // Initialize Cocoa overrides.
+ PluginProcess::shared().initializeCocoaOverrides();
// Initialize the plug-in process connection.
PluginProcess::shared().initialize(CoreIPC::Connection::Identifier(serverPort), RunLoop::main());
diff --git a/Source/WebKit2/PluginProcess/mac/PluginProcessShim.h b/Source/WebKit2/PluginProcess/mac/PluginProcessShim.h
index b021a3af2..b5b597a34 100644
--- a/Source/WebKit2/PluginProcess/mac/PluginProcessShim.h
+++ b/Source/WebKit2/PluginProcess/mac/PluginProcessShim.h
@@ -36,8 +36,8 @@ struct PluginProcessShimCallbacks {
bool (*shouldCallRealDebugger)();
bool (*isWindowActive)(WindowRef, bool& result);
UInt32 (*getCurrentEventButtonState)();
- void (*cocoaWindowShown)(NSWindow *);
- void (*cocoaWindowHidden)(NSWindow *);
+ void (*beginModal)();
+ void (*endModal)();
void (*carbonWindowShown)(WindowRef);
void (*carbonWindowHidden)(WindowRef);
void (*setModal)(bool);
diff --git a/Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm b/Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm
index fceb99b37..98476535a 100644
--- a/Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm
+++ b/Source/WebKit2/PluginProcess/mac/PluginProcessShim.mm
@@ -42,35 +42,6 @@ extern "C" void WebKitPluginProcessShimInitialize(const PluginProcessShimCallbac
static PluginProcessShimCallbacks pluginProcessShimCallbacks;
-static IMP NSApplication_RunModalForWindow;
-static unsigned modalCount = 0;
-
-static void beginModal()
-{
- // Make sure to make ourselves the front process
- ProcessSerialNumber psn;
- GetCurrentProcess(&psn);
- SetFrontProcess(&psn);
-
- if (!modalCount++)
- pluginProcessShimCallbacks.setModal(true);
-}
-
-static void endModal()
-{
- if (!--modalCount)
- pluginProcessShimCallbacks.setModal(false);
-}
-
-static NSInteger shim_NSApplication_RunModalForWindow(id self, SEL _cmd, NSWindow* window)
-{
- beginModal();
- NSInteger result = ((NSInteger (*)(id, SEL, NSWindow *))NSApplication_RunModalForWindow)(self, _cmd, window);
- endModal();
-
- return result;
-}
-
#ifndef __LP64__
#if COMPILER(CLANG)
@@ -102,16 +73,16 @@ static Boolean shimIsWindowActive(WindowRef window)
static void shimModalDialog(ModalFilterUPP modalFilter, DialogItemIndex *itemHit)
{
- beginModal();
+ pluginProcessShimCallbacks.beginModal();
ModalDialog(modalFilter, itemHit);
- endModal();
+ pluginProcessShimCallbacks.endModal();
}
static DialogItemIndex shimAlert(SInt16 alertID, ModalFilterUPP modalFilter)
{
- beginModal();
+ pluginProcessShimCallbacks.beginModal();
DialogItemIndex index = Alert(alertID, modalFilter);
- endModal();
+ pluginProcessShimCallbacks.endModal();
return index;
}
@@ -146,27 +117,6 @@ __attribute__((visibility("default")))
void WebKitPluginProcessShimInitialize(const PluginProcessShimCallbacks& callbacks)
{
pluginProcessShimCallbacks = callbacks;
-
- // Override -[NSApplication runModalForWindow:]
- Method runModalForWindowMethod = class_getInstanceMethod(objc_getClass("NSApplication"), @selector(runModalForWindow:));
- NSApplication_RunModalForWindow = method_setImplementation(runModalForWindowMethod, reinterpret_cast<IMP>(shim_NSApplication_RunModalForWindow));
-
- NSNotificationCenter *defaultCenter = [NSNotificationCenter defaultCenter];
-
- // Track when any Cocoa window is about to be be shown.
- id orderOnScreenObserver = [defaultCenter addObserverForName:WKWindowWillOrderOnScreenNotification()
- object:nil
- queue:nil
- usingBlock:^(NSNotification *notification) { pluginProcessShimCallbacks.cocoaWindowShown([notification object]); }];
- // Track when any cocoa window is about to be hidden.
- id orderOffScreenObserver = [defaultCenter addObserverForName:WKWindowWillOrderOffScreenNotification()
- object:nil
- queue:nil
- usingBlock:^(NSNotification *notification) { pluginProcessShimCallbacks.cocoaWindowHidden([notification object]); }];
-
- // Leak the two observers so that they observe notifications for the lifetime of the process.
- CFRetain(orderOnScreenObserver);
- CFRetain(orderOffScreenObserver);
}
} // namespace WebKit
diff --git a/Source/WebKit2/Shared/API/c/WKBase.h b/Source/WebKit2/Shared/API/c/WKBase.h
index 2220e67aa..ab6ca84cd 100644
--- a/Source/WebKit2/Shared/API/c/WKBase.h
+++ b/Source/WebKit2/Shared/API/c/WKBase.h
@@ -89,6 +89,7 @@ typedef const struct OpaqueWKBackForwardListItem* WKBackForwardListItemRef;
typedef const struct OpaqueWKBatteryManager* WKBatteryManagerRef;
typedef const struct OpaqueWKBatteryStatus* WKBatteryStatusRef;
typedef const struct OpaqueWKResourceCacheManager* WKResourceCacheManagerRef;
+typedef const struct OpaqueWKColorPickerResultListener* WKColorPickerResultListenerRef;
typedef const struct OpaqueWKContext* WKContextRef;
typedef const struct OpaqueWKCookieManager* WKCookieManagerRef;
typedef const struct OpaqueWKCredential* WKCredentialRef;
diff --git a/Source/WebKit2/Shared/APIClientTraits.cpp b/Source/WebKit2/Shared/APIClientTraits.cpp
index ae10a5f0a..76f13ad1f 100644
--- a/Source/WebKit2/Shared/APIClientTraits.cpp
+++ b/Source/WebKit2/Shared/APIClientTraits.cpp
@@ -67,6 +67,7 @@ const size_t APIClientTraits<WKPageLoaderClient>::interfaceSizesByVersion[] = {
const size_t APIClientTraits<WKPageUIClient>::interfaceSizesByVersion[] = {
offsetof(WKPageUIClient, createNewPage),
+ offsetof(WKPageUIClient, showColorPicker),
sizeof(WKPageUIClient)
};
@@ -75,6 +76,11 @@ const size_t APIClientTraits<WKBundlePageFormClient>::interfaceSizesByVersion[]
sizeof(WKBundlePageFormClient)
};
+const size_t APIClientTraits<WKBundlePageUIClient>::interfaceSizesByVersion[] = {
+ offsetof(WKBundlePageUIClient, didReachApplicationCacheOriginQuota),
+ sizeof(WKBundlePageUIClient)
+};
+
const size_t APIClientTraits<WKContextInjectedBundleClient>::interfaceSizesByVersion[] = {
offsetof(WKContextInjectedBundleClient, getInjectedBundleInitializationUserData),
sizeof(WKContextInjectedBundleClient)
diff --git a/Source/WebKit2/Shared/APIClientTraits.h b/Source/WebKit2/Shared/APIClientTraits.h
index 7352b5667..3fd03cd31 100644
--- a/Source/WebKit2/Shared/APIClientTraits.h
+++ b/Source/WebKit2/Shared/APIClientTraits.h
@@ -54,6 +54,10 @@ template<> struct APIClientTraits<WKBundlePageFullScreenClient> {
static const size_t interfaceSizesByVersion[2];
};
+template<> struct APIClientTraits<WKBundlePageUIClient> {
+ static const size_t interfaceSizesByVersion[2];
+};
+
template<> struct APIClientTraits<WKPageContextMenuClient> {
static const size_t interfaceSizesByVersion[3];
};
@@ -63,7 +67,7 @@ template<> struct APIClientTraits<WKPageLoaderClient> {
};
template<> struct APIClientTraits<WKPageUIClient> {
- static const size_t interfaceSizesByVersion[2];
+ static const size_t interfaceSizesByVersion[3];
};
template<> struct APIClientTraits<WKBundlePageFormClient> {
diff --git a/Source/WebKit2/Shared/APIObject.h b/Source/WebKit2/Shared/APIObject.h
index 708effe5d..34181ec93 100644
--- a/Source/WebKit2/Shared/APIObject.h
+++ b/Source/WebKit2/Shared/APIObject.h
@@ -75,6 +75,7 @@ public:
TypeBatteryManager,
TypeBatteryStatus,
TypeCacheManager,
+ TypeColorPickerResultListener,
TypeContext,
TypeCookieManager,
TypeDatabaseManager,
diff --git a/Source/WebKit2/Shared/SandboxExtension.h b/Source/WebKit2/Shared/SandboxExtension.h
index 3691aca7f..e076bc111 100644
--- a/Source/WebKit2/Shared/SandboxExtension.h
+++ b/Source/WebKit2/Shared/SandboxExtension.h
@@ -92,6 +92,7 @@ public:
static PassRefPtr<SandboxExtension> create(const Handle&);
static void createHandle(const String& path, Type type, Handle&);
+ static void createHandleForReadWriteDirectory(const String& path, Handle&); // Will attempt to create the directory.
static String createHandleForTemporaryFile(const String& prefix, Type type, Handle&);
~SandboxExtension();
@@ -124,7 +125,8 @@ inline SandboxExtension::Handle& SandboxExtension::HandleArray::operator[](size_
inline void SandboxExtension::HandleArray::encode(CoreIPC::ArgumentEncoder*) const { }
inline bool SandboxExtension::HandleArray::decode(CoreIPC::ArgumentDecoder*, HandleArray&) { return true; }
inline PassRefPtr<SandboxExtension> SandboxExtension::create(const Handle&) { return 0; }
-inline void SandboxExtension::createHandle(const String& path, Type type, Handle&) { }
+inline void SandboxExtension::createHandle(const String&, Type, Handle&) { }
+inline void SandboxExtension::createHandleForReadWriteDirectory(const String&, Handle&) { }
inline String SandboxExtension::createHandleForTemporaryFile(const String& prefix, Type type, Handle&) {return String();}
inline SandboxExtension::~SandboxExtension() { }
inline bool SandboxExtension::invalidate() { return true; }
diff --git a/Source/WebKit2/Shared/ShareableBitmap.h b/Source/WebKit2/Shared/ShareableBitmap.h
index e5d1a6dc9..e1ebc2e4c 100644
--- a/Source/WebKit2/Shared/ShareableBitmap.h
+++ b/Source/WebKit2/Shared/ShareableBitmap.h
@@ -60,6 +60,7 @@ namespace WebKit {
class ShareableBitmap : public RefCounted<ShareableBitmap> {
public:
enum Flag {
+ NoFlags = 0,
SupportsAlpha = 1 << 0,
};
typedef unsigned Flags;
diff --git a/Source/WebKit2/Shared/mac/SandboxExtensionMac.mm b/Source/WebKit2/Shared/mac/SandboxExtensionMac.mm
index b3b9472e6..8687a414a 100644
--- a/Source/WebKit2/Shared/mac/SandboxExtensionMac.mm
+++ b/Source/WebKit2/Shared/mac/SandboxExtensionMac.mm
@@ -219,7 +219,20 @@ void SandboxExtension::createHandle(const String& path, Type type, Handle& handl
CString standardizedPath = resolveSymlinksInPath([[(NSString *)path stringByStandardizingPath] fileSystemRepresentation]);
handle.m_sandboxExtension = WKSandboxExtensionCreate(standardizedPath.data(), wkSandboxExtensionType(type));
}
-
+
+void SandboxExtension::createHandleForReadWriteDirectory(const String& path, SandboxExtension::Handle& handle)
+{
+ NSError *error = nil;
+ NSString *nsPath = path;
+
+ if (![[NSFileManager defaultManager] createDirectoryAtPath:nsPath withIntermediateDirectories:YES attributes:nil error:&error]) {
+ NSLog(@"could not create \"%@\", error %@", nsPath, error);
+ return;
+ }
+
+ SandboxExtension::createHandle(path, SandboxExtension::ReadWrite, handle);
+}
+
String SandboxExtension::createHandleForTemporaryFile(const String& prefix, Type type, Handle& handle)
{
ASSERT(!handle.m_sandboxExtension);
diff --git a/Source/WebKit2/Target.pri b/Source/WebKit2/Target.pri
index 629852edc..8ff365cc1 100644
--- a/Source/WebKit2/Target.pri
+++ b/Source/WebKit2/Target.pri
@@ -150,6 +150,7 @@ HEADERS += \
UIProcess/API/C/WKBackForwardListItem.h \
UIProcess/API/C/WKBatteryManager.h \
UIProcess/API/C/WKBatteryStatus.h \
+ UIProcess/API/C/WKColorPickerResultListener.h \
UIProcess/API/C/WKContext.h \
UIProcess/API/C/WKContextPrivate.h \
UIProcess/API/C/WKCredential.h \
@@ -200,6 +201,7 @@ HEADERS += \
UIProcess/CoordinatedGraphics/CoordinatedBackingStore.h \
UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.h \
UIProcess/CoordinatedGraphics/LayerTreeRenderer.h \
+ UIProcess/DefaultUndoController.h \
UIProcess/DrawingAreaProxy.h \
UIProcess/DrawingAreaProxyImpl.h \
UIProcess/FindIndicator.h \
@@ -227,6 +229,7 @@ HEADERS += \
UIProcess/WebBatteryManagerProxy.h \
UIProcess/WebBatteryProvider.h \
UIProcess/WebColorChooserProxy.h \
+ UIProcess/WebColorPickerResultListenerProxy.h \
UIProcess/WebConnectionToWebProcess.h \
UIProcess/WebContext.h \
UIProcess/WebContextConnectionClient.h \
@@ -500,6 +503,7 @@ SOURCES += \
UIProcess/API/C/WKBackForwardListItem.cpp \
UIProcess/API/C/WKBatteryManager.cpp \
UIProcess/API/C/WKBatteryStatus.cpp \
+ UIProcess/API/C/WKColorPickerResultListener.cpp \
UIProcess/API/C/WKContext.cpp \
UIProcess/API/C/WKCredential.cpp \
UIProcess/API/C/WKDatabaseManager.cpp \
@@ -541,6 +545,7 @@ SOURCES += \
UIProcess/CoordinatedGraphics/CoordinatedBackingStore.cpp \
UIProcess/CoordinatedGraphics/LayerTreeCoordinatorProxy.cpp \
UIProcess/CoordinatedGraphics/LayerTreeRenderer.cpp \
+ UIProcess/DefaultUndoController.cpp \
UIProcess/Downloads/DownloadProxy.cpp \
UIProcess/DrawingAreaProxy.cpp \
UIProcess/DrawingAreaProxyImpl.cpp \
@@ -567,6 +572,8 @@ SOURCES += \
UIProcess/WebBackForwardList.cpp \
UIProcess/WebBatteryManagerProxy.cpp \
UIProcess/WebBatteryProvider.cpp \
+ UIProcess/WebColorChooserProxy.cpp \
+ UIProcess/WebColorPickerResultListenerProxy.cpp \
UIProcess/WebConnectionToWebProcess.cpp \
UIProcess/WebContext.cpp \
UIProcess/WebContextConnectionClient.cpp \
@@ -611,7 +618,6 @@ SOURCES += \
UIProcess/WebVibrationProvider.cpp \
UIProcess/WebVibrationProxy.cpp \
UIProcess/qt/QtWebContext.cpp \
- UIProcess/qt/QtWebUndoController.cpp \
UIProcess/qt/TextCheckerQt.cpp \
UIProcess/qt/WebContextQt.cpp \
UIProcess/qt/WebFullScreenManagerProxyQt.cpp \
@@ -782,7 +788,6 @@ have?(QTQUICK) {
UIProcess/qt/QtWebPagePolicyClient.h \
UIProcess/qt/QtWebPageSGNode.h \
UIProcess/qt/QtWebPageUIClient.h \
- UIProcess/qt/QtWebUndoController.h \
UIProcess/qt/QtWebIconDatabaseClient.h \
UIProcess/qt/WebContextMenuProxyQt.h \
UIProcess/qt/WebGeolocationProviderQt.h \
@@ -837,7 +842,7 @@ mac: {
$$PWD/../../WebKitLibraries/
HEADERS += \
WebProcess/WebCoreSupport/qt/WebSystemInterface.h
- SOURCES += \
+ OBJECTIVE_SOURCES += \
WebProcess/WebCoreSupport/qt/WebSystemInterface.mm
}
INCLUDEPATH += \
diff --git a/Source/WebKit2/UIProcess/API/C/WKAPICast.h b/Source/WebKit2/UIProcess/API/C/WKAPICast.h
index fe55dd8ac..ba627708e 100644
--- a/Source/WebKit2/UIProcess/API/C/WKAPICast.h
+++ b/Source/WebKit2/UIProcess/API/C/WKAPICast.h
@@ -61,6 +61,7 @@ class WebBackForwardListItem;
class WebBatteryManagerProxy;
class WebBatteryStatus;
class WebResourceCacheManagerProxy;
+class WebColorPickerResultListenerProxy;
class WebContext;
class WebCookieManagerProxy;
class WebCredential;
@@ -104,6 +105,7 @@ WK_ADD_API_MAPPING(WKBackForwardListRef, WebBackForwardList)
WK_ADD_API_MAPPING(WKBatteryManagerRef, WebBatteryManagerProxy)
WK_ADD_API_MAPPING(WKBatteryStatusRef, WebBatteryStatus)
WK_ADD_API_MAPPING(WKResourceCacheManagerRef, WebResourceCacheManagerProxy)
+WK_ADD_API_MAPPING(WKColorPickerResultListenerRef, WebColorPickerResultListenerProxy)
WK_ADD_API_MAPPING(WKContextRef, WebContext)
WK_ADD_API_MAPPING(WKCookieManagerRef, WebCookieManagerProxy)
WK_ADD_API_MAPPING(WKCredentialRef, WebCredential)
diff --git a/Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.cpp b/Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.cpp
new file mode 100644
index 000000000..de5539de1
--- /dev/null
+++ b/Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.cpp
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WKColorPickerResultListener.h"
+
+#include "WKAPICast.h"
+#include "WebColorPickerResultListenerProxy.h"
+
+using namespace WebKit;
+
+WKTypeID WKColorPickerResultListenerGetTypeID()
+{
+#if ENABLE(INPUT_TYPE_COLOR)
+ return toAPI(WebColorPickerResultListenerProxy::APIType);
+#else
+ return 0;
+#endif
+}
+
+void WKColorPickerResultListenerSetColor(WKColorPickerResultListenerRef listenerRef, const WKStringRef color)
+{
+#if ENABLE(INPUT_TYPE_COLOR)
+ toImpl(listenerRef)->setColor(toWTFString(color));
+#endif
+}
diff --git a/Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.h b/Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.h
new file mode 100644
index 000000000..bfd4732c9
--- /dev/null
+++ b/Source/WebKit2/UIProcess/API/C/WKColorPickerResultListener.h
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WKColorPickerResultListener_h
+#define WKColorPickerResultListener_h
+
+#include <WebKit2/WKBase.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+WK_EXPORT WKTypeID WKColorPickerResultListenerGetTypeID();
+
+WK_EXPORT void WKColorPickerResultListenerSetColor(WKColorPickerResultListenerRef listenerRef, const WKStringRef color);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* WKColorPickerResultListener_h */
diff --git a/Source/WebKit2/UIProcess/API/C/WKPage.h b/Source/WebKit2/UIProcess/API/C/WKPage.h
index 5566826d3..73cf68139 100644
--- a/Source/WebKit2/UIProcess/API/C/WKPage.h
+++ b/Source/WebKit2/UIProcess/API/C/WKPage.h
@@ -225,6 +225,8 @@ typedef void (*WKPageSaveDataToFileInDownloadsFolderCallback)(WKPageRef page, WK
typedef bool (*WKPageShouldInterruptJavaScriptCallback)(WKPageRef page, const void *clientInfo);
typedef void (*WKPageDecidePolicyForNotificationPermissionRequestCallback)(WKPageRef page, WKSecurityOriginRef origin, WKNotificationPermissionRequestRef permissionRequest, const void *clientInfo);
typedef void (*WKPageUnavailablePluginButtonClickedCallback)(WKPageRef page, WKPluginUnavailabilityReason pluginUnavailabilityReason, WKStringRef mimeType, WKStringRef url, WKStringRef pluginsPageURL, const void* clientInfo);
+typedef void (*WKPageShowColorPickerCallback)(WKPageRef page, WKStringRef initialColor, WKColorPickerResultListenerRef listener, const void* clientInfo);
+typedef void (*WKPageHideColorPickerCallback)(WKPageRef page, const void* clientInfo);
// Deprecated
typedef WKPageRef (*WKPageCreateNewPageCallback_deprecatedForUseWithV0)(WKPageRef page, WKDictionaryRef features, WKEventModifiers modifiers, WKEventMouseButton mouseButton, const void *clientInfo);
@@ -281,10 +283,14 @@ struct WKPageUIClient {
WKPageMouseDidMoveOverElementCallback mouseDidMoveOverElement;
WKPageDecidePolicyForNotificationPermissionRequestCallback decidePolicyForNotificationPermissionRequest;
WKPageUnavailablePluginButtonClickedCallback unavailablePluginButtonClicked;
+
+ // Version 2
+ WKPageShowColorPickerCallback showColorPicker;
+ WKPageHideColorPickerCallback hideColorPicker;
};
typedef struct WKPageUIClient WKPageUIClient;
-enum { kWKPageUIClientCurrentVersion = 1 };
+enum { kWKPageUIClientCurrentVersion = 2 };
// Find client.
typedef void (*WKPageDidFindStringCallback)(WKPageRef page, WKStringRef string, unsigned matchCount, const void* clientInfo);
diff --git a/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp b/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp
index 24bda6305..9e75e0828 100644
--- a/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/PageClientImpl.cpp
@@ -139,25 +139,24 @@ void PageClientImpl::didChangeViewportProperties(const WebCore::ViewportAttribut
notImplemented();
}
-void PageClientImpl::registerEditCommand(PassRefPtr<WebEditCommandProxy>, WebPageProxy::UndoOrRedo)
+void PageClientImpl::registerEditCommand(PassRefPtr<WebEditCommandProxy> command, WebPageProxy::UndoOrRedo undoOrRedo)
{
- notImplemented();
+ m_undoController.registerEditCommand(command, undoOrRedo);
}
void PageClientImpl::clearAllEditCommands()
{
- notImplemented();
+ m_undoController.clearAllEditCommands();
}
-bool PageClientImpl::canUndoRedo(WebPageProxy::UndoOrRedo)
+bool PageClientImpl::canUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
{
- notImplemented();
- return false;
+ return m_undoController.canUndoRedo(undoOrRedo);
}
-void PageClientImpl::executeUndoRedo(WebPageProxy::UndoOrRedo)
+void PageClientImpl::executeUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
{
- notImplemented();
+ m_undoController.executeUndoRedo(undoOrRedo);
}
FloatRect PageClientImpl::convertToDeviceSpace(const FloatRect& viewRect)
diff --git a/Source/WebKit2/UIProcess/API/efl/PageClientImpl.h b/Source/WebKit2/UIProcess/API/efl/PageClientImpl.h
index 36ee76d7d..8f03b09f4 100644
--- a/Source/WebKit2/UIProcess/API/efl/PageClientImpl.h
+++ b/Source/WebKit2/UIProcess/API/efl/PageClientImpl.h
@@ -26,6 +26,7 @@
#ifndef PageClientImpl_h
#define PageClientImpl_h
+#include "DefaultUndoController.h"
#include "PageClient.h"
#include <Evas.h>
@@ -115,6 +116,7 @@ private:
private:
Evas_Object* m_viewWidget;
+ DefaultUndoController m_undoController;
};
} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.cpp
index f6bd0a760..be866fa0a 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list.cpp
@@ -95,8 +95,7 @@ static inline Eina_List* createEinaList(const Ewk_Back_Forward_List* list, WKArr
for (size_t i = 0; i < count; ++i) {
WKBackForwardListItemRef wkItem = static_cast<WKBackForwardListItemRef>(WKArrayGetItemAtIndex(wkList, i));
Ewk_Back_Forward_List_Item* item = addItemToWrapperCache(list, wkItem);
- ewk_back_forward_list_item_ref(item);
- result = eina_list_append(result, item);
+ result = eina_list_append(result, ewk_back_forward_list_item_ref(item));
}
return result;
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp
index 871187d2a..5679773a0 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.cpp
@@ -65,10 +65,12 @@ struct _Ewk_Back_Forward_List_Item {
} \
WKBackForwardListItemRef wkItem_ = (item)->wkItem.get()
-void ewk_back_forward_list_item_ref(Ewk_Back_Forward_List_Item* item)
+Ewk_Back_Forward_List_Item* ewk_back_forward_list_item_ref(Ewk_Back_Forward_List_Item* item)
{
- EINA_SAFETY_ON_NULL_RETURN(item);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(item, 0);
++item->__ref;
+
+ return item;
}
void ewk_back_forward_list_item_unref(Ewk_Back_Forward_List_Item* item)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.h b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.h
index 811f0e104..a1227dfc0 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_back_forward_list_item.h
@@ -44,8 +44,10 @@ typedef struct _Ewk_Back_Forward_List_Item Ewk_Back_Forward_List_Item;
* Increases the reference count of the given object.
*
* @param item the back-forward list item instance to increase the reference count
+ *
+ * @return a pointer to the object on success, @c NULL otherwise.
*/
-EAPI void ewk_back_forward_list_item_ref(Ewk_Back_Forward_List_Item *item);
+EAPI Ewk_Back_Forward_List_Item *ewk_back_forward_list_item_ref(Ewk_Back_Forward_List_Item *item);
/**
* Decreases the reference count of the given object, possibly freeing it.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
index 60c79e16e..e23f6b005 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_context.cpp
@@ -151,8 +151,7 @@ void ewk_context_download_job_add(Ewk_Context* ewkContext, Ewk_Download_Job* ewk
if (ewkContext->downloadJobs.contains(downloadId))
return;
- ewk_download_job_ref(ewkDownload);
- ewkContext->downloadJobs.add(downloadId, ewkDownload);
+ ewkContext->downloadJobs.add(downloadId, ewk_download_job_ref(ewkDownload));
}
/**
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_download_job.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_download_job.cpp
index a27abc40d..61297920b 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_download_job.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_download_job.cpp
@@ -76,11 +76,13 @@ struct _Ewk_Download_Job {
}
};
-void ewk_download_job_ref(Ewk_Download_Job* download)
+Ewk_Download_Job* ewk_download_job_ref(Ewk_Download_Job* download)
{
- EINA_SAFETY_ON_NULL_RETURN(download);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(download, 0);
++download->__ref;
+
+ return download;
}
void ewk_download_job_unref(Ewk_Download_Job* download)
@@ -221,8 +223,7 @@ void ewk_download_job_response_set(Ewk_Download_Job* download, Ewk_Url_Response*
EINA_SAFETY_ON_NULL_RETURN(download);
EINA_SAFETY_ON_NULL_RETURN(response);
- ewk_url_response_ref(response);
- download->response = response;
+ download->response = ewk_url_response_ref(response);
}
/**
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_download_job.h b/Source/WebKit2/UIProcess/API/efl/ewk_download_job.h
index 68f03fc7e..fdcc10e98 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_download_job.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_download_job.h
@@ -70,8 +70,10 @@ typedef enum _Ewk_Download_Job_State Ewk_Download_Job_State;
* Increases the reference count of the given object.
*
* @param download the download object to increase the reference count
+ *
+ * @return a pointer to the object on success, @c NULL otherwise.
*/
-EAPI void ewk_download_job_ref(Ewk_Download_Job *download);
+EAPI Ewk_Download_Job *ewk_download_job_ref(Ewk_Download_Job *download);
/**
* Decreases the reference count of the given object, possibly freeing it.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.cpp
index 70721735b..80a5fd9fb 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.cpp
@@ -65,10 +65,12 @@ struct _Ewk_Form_Submission_Request {
}
};
-void ewk_form_submission_request_ref(Ewk_Form_Submission_Request* request)
+Ewk_Form_Submission_Request* ewk_form_submission_request_ref(Ewk_Form_Submission_Request* request)
{
- EINA_SAFETY_ON_NULL_RETURN(request);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
++request->__ref;
+
+ return request;
}
void ewk_form_submission_request_unref(Ewk_Form_Submission_Request* request)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.h b/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.h
index fa67e9360..9521e741c 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_form_submission_request.h
@@ -47,8 +47,10 @@ typedef struct _Ewk_Form_Submission_Request Ewk_Form_Submission_Request;
* Increases the reference count of the given object.
*
* @param request the request object to increase the reference count
+ *
+ * @return a pointer to the object on success, @c NULL otherwise.
*/
-EAPI void ewk_form_submission_request_ref(Ewk_Form_Submission_Request *request);
+EAPI Ewk_Form_Submission_Request *ewk_form_submission_request_ref(Ewk_Form_Submission_Request *request);
/**
* Decreases the reference count of the given object, possibly freeing it.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp
index ed5950311..ee6b93b4b 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_intent.cpp
@@ -79,12 +79,14 @@ struct _Ewk_Intent {
} \
WKIntentDataRef wkIntent_ = (intent)->wkIntent.get()
-void ewk_intent_ref(Ewk_Intent* intent)
+Ewk_Intent* ewk_intent_ref(Ewk_Intent* intent)
{
#if ENABLE(WEB_INTENTS)
- EINA_SAFETY_ON_NULL_RETURN(intent);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(intent, 0);
++intent->__ref;
#endif
+
+ return intent;
}
void ewk_intent_unref(Ewk_Intent* intent)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_intent.h b/Source/WebKit2/UIProcess/API/efl/ewk_intent.h
index abcffa59f..5b869023f 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_intent.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_intent.h
@@ -44,8 +44,10 @@ typedef struct _Ewk_Intent Ewk_Intent;
* Increases the reference count of the given object.
*
* @param intent the intent object to increase the reference count
+ *
+ * @return a pointer to the object on success, @c NULL otherwise.
*/
-EAPI void ewk_intent_ref(Ewk_Intent *intent);
+EAPI Ewk_Intent *ewk_intent_ref(Ewk_Intent *intent);
/**
* Decreases the reference count of the given object, possibly freeing it.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.cpp
index 19215724b..279e90904 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.cpp
@@ -67,12 +67,14 @@ struct _Ewk_Intent_Service {
}
};
-void ewk_intent_service_ref(Ewk_Intent_Service* service)
+Ewk_Intent_Service* ewk_intent_service_ref(Ewk_Intent_Service* service)
{
#if ENABLE(WEB_INTENTS_TAG)
- EINA_SAFETY_ON_NULL_RETURN(service);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(service, 0);
++service->__ref;
#endif
+
+ return service;
}
void ewk_intent_service_unref(Ewk_Intent_Service* service)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.h b/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.h
index 958e05448..db946d247 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_intent_service.h
@@ -44,8 +44,10 @@ typedef struct _Ewk_Intent_Service Ewk_Intent_Service;
* Increases the reference count of the given object.
*
* @param service the intent service object to increase the reference count
+ *
+ * @return a pointer to the object on success, @c NULL otherwise.
*/
-EAPI void ewk_intent_service_ref(Ewk_Intent_Service *service);
+EAPI Ewk_Intent_Service *ewk_intent_service_ref(Ewk_Intent_Service *service);
/**
* Decreases the reference count of the given object, possibly freeing it.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.cpp
index 190810962..d46805faa 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.cpp
@@ -73,11 +73,13 @@ struct _Ewk_Navigation_Policy_Decision {
}
};
-void ewk_navigation_policy_decision_ref(Ewk_Navigation_Policy_Decision* decision)
+Ewk_Navigation_Policy_Decision* ewk_navigation_policy_decision_ref(Ewk_Navigation_Policy_Decision* decision)
{
- EINA_SAFETY_ON_NULL_RETURN(decision);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(decision, 0);
++decision->__ref;
+
+ return decision;
}
void ewk_navigation_policy_decision_unref(Ewk_Navigation_Policy_Decision* decision)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h
index dec9c09f9..9f3c045ae 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_navigation_policy_decision.h
@@ -70,8 +70,10 @@ typedef enum {
* Increases the reference count of the given object.
*
* @param decision the policy decision object to increase the reference count
+ *
+ * @return a pointer to the object on success, @c NULL otherwise.
*/
-EAPI void ewk_navigation_policy_decision_ref(Ewk_Navigation_Policy_Decision *decision);
+EAPI Ewk_Navigation_Policy_Decision *ewk_navigation_policy_decision_ref(Ewk_Navigation_Policy_Decision *decision);
/**
* Decreases the reference count of the given object, possibly freeing it.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_url_request.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_url_request.cpp
index 5816b2feb..9e7c80c40 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_url_request.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_url_request.cpp
@@ -60,10 +60,12 @@ struct _Ewk_Url_Request {
}
};
-void ewk_url_request_ref(Ewk_Url_Request* request)
+Ewk_Url_Request* ewk_url_request_ref(Ewk_Url_Request* request)
{
- EINA_SAFETY_ON_NULL_RETURN(request);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
++request->__ref;
+
+ return request;
}
void ewk_url_request_unref(Ewk_Url_Request* request)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_url_request.h b/Source/WebKit2/UIProcess/API/efl/ewk_url_request.h
index ec44f5c1e..f61b88af9 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_url_request.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_url_request.h
@@ -44,8 +44,10 @@ typedef struct _Ewk_Url_Request Ewk_Url_Request;
* Increases the reference count of the given object.
*
* @param request the URL request object to increase the reference count
+ *
+ * @return a pointer to the object on success, @c NULL otherwise.
*/
-EAPI void ewk_url_request_ref(Ewk_Url_Request *request);
+EAPI Ewk_Url_Request *ewk_url_request_ref(Ewk_Url_Request *request);
/**
* Decreases the reference count of the given object, possibly freeing it.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_url_response.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_url_response.cpp
index 8d0a8ee30..8c1b1b57f 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_url_response.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_url_response.cpp
@@ -58,10 +58,12 @@ struct _Ewk_Url_Response {
}
};
-void ewk_url_response_ref(Ewk_Url_Response* response)
+Ewk_Url_Response* ewk_url_response_ref(Ewk_Url_Response* response)
{
- EINA_SAFETY_ON_NULL_RETURN(response);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(response, 0);
++response->__ref;
+
+ return response;
}
void ewk_url_response_unref(Ewk_Url_Response* response)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_url_response.h b/Source/WebKit2/UIProcess/API/efl/ewk_url_response.h
index 35631ebef..25814d21d 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_url_response.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_url_response.h
@@ -44,8 +44,10 @@ typedef struct _Ewk_Url_Response Ewk_Url_Response;
* Increases the reference count of the given object.
*
* @param response the URL response object to increase the reference count
+ *
+ * @return a pointer to the object on success, @c NULL otherwise.
*/
-EAPI void ewk_url_response_ref(Ewk_Url_Response *response);
+EAPI Ewk_Url_Response *ewk_url_response_ref(Ewk_Url_Response *response);
/**
* Decreases the reference count of the given object, possibly freeing it.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.cpp
index 32c3281f9..c60c5d2b1 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.cpp
@@ -67,10 +67,12 @@ struct _Ewk_Url_Scheme_Request {
}
};
-void ewk_url_scheme_request_ref(Ewk_Url_Scheme_Request* request)
+Ewk_Url_Scheme_Request* ewk_url_scheme_request_ref(Ewk_Url_Scheme_Request* request)
{
- EINA_SAFETY_ON_NULL_RETURN(request);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(request, 0);
++request->__ref;
+
+ return request;
}
void ewk_url_scheme_request_unref(Ewk_Url_Scheme_Request* request)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.h b/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.h
index deaaf1892..9727590a0 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_url_scheme_request.h
@@ -44,8 +44,10 @@ typedef struct _Ewk_Url_Scheme_Request Ewk_Url_Scheme_Request;
* Increases the reference count of the given object.
*
* @param request the URL scheme request object to increase the reference count
+ *
+ * @return a pointer to the object on success, @c NULL otherwise.
*/
-EAPI void ewk_url_scheme_request_ref(Ewk_Url_Scheme_Request *request);
+EAPI Ewk_Url_Scheme_Request *ewk_url_scheme_request_ref(Ewk_Url_Scheme_Request *request);
/**
* Decreases the reference count of the given object, possibly freeing it.
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
index 3196d0b27..dc77fb2cc 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_view.cpp
@@ -889,8 +889,7 @@ void ewk_view_resource_load_initiated(Evas_Object* ewkView, uint64_t resourceIde
Ewk_Web_Resource_Request resourceRequest = {resource, request, 0};
// Keep the resource internally to reuse it later.
- ewk_web_resource_ref(resource);
- priv->loadingResourcesMap.add(resourceIdentifier, resource);
+ priv->loadingResourcesMap.add(resourceIdentifier, ewk_web_resource_ref(resource));
evas_object_smart_callback_call(ewkView, "resource,request,new", &resourceRequest);
}
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_web_resource.cpp b/Source/WebKit2/UIProcess/API/efl/ewk_web_resource.cpp
index 355592df4..89879eead 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_web_resource.cpp
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_web_resource.cpp
@@ -47,11 +47,13 @@ struct _Ewk_Web_Resource {
}
};
-void ewk_web_resource_ref(Ewk_Web_Resource* resource)
+Ewk_Web_Resource* ewk_web_resource_ref(Ewk_Web_Resource* resource)
{
- EINA_SAFETY_ON_NULL_RETURN(resource);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(resource, 0);
++resource->__ref;
+
+ return resource;
}
void ewk_web_resource_unref(Ewk_Web_Resource* resource)
diff --git a/Source/WebKit2/UIProcess/API/efl/ewk_web_resource.h b/Source/WebKit2/UIProcess/API/efl/ewk_web_resource.h
index 47fd7adf4..dc2cf087d 100644
--- a/Source/WebKit2/UIProcess/API/efl/ewk_web_resource.h
+++ b/Source/WebKit2/UIProcess/API/efl/ewk_web_resource.h
@@ -44,8 +44,10 @@ typedef struct _Ewk_Web_Resource Ewk_Web_Resource;
* Increases the reference count of the given object.
*
* @param resource the resource object to increase the reference count
+ *
+ * @return a pointer to the object on success, @c NULL otherwise.
*/
-EAPI void ewk_web_resource_ref(Ewk_Web_Resource *resource);
+EAPI Ewk_Web_Resource *ewk_web_resource_ref(Ewk_Web_Resource *resource);
/**
* Decreases the reference count of the given object, possibly freeing it.
diff --git a/Source/WebKit2/UIProcess/API/efl/tests/resources/big_button_theme.edj b/Source/WebKit2/UIProcess/API/efl/tests/resources/big_button_theme.edj
index 60bb40ff9..2f30076db 100644
--- a/Source/WebKit2/UIProcess/API/efl/tests/resources/big_button_theme.edj
+++ b/Source/WebKit2/UIProcess/API/efl/tests/resources/big_button_theme.edj
Binary files differ
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitTextChecker.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitTextChecker.cpp
index 39f402227..89e746d47 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitTextChecker.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitTextChecker.cpp
@@ -140,7 +140,7 @@ void WebKitTextChecker::setSpellCheckingEnabled(bool enabled)
const char* const* WebKitTextChecker::getSpellCheckingLanguages()
{
- Vector<String> spellCheckingLanguages = m_textChecker->getSpellCheckingLanguages();
+ Vector<String> spellCheckingLanguages = m_textChecker->loadedSpellCheckingLanguages();
if (spellCheckingLanguages.isEmpty())
return 0;
diff --git a/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp b/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp
index 1d985d342..59d0b0d14 100644
--- a/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp
+++ b/Source/WebKit2/UIProcess/API/gtk/WebKitUIClient.cpp
@@ -204,6 +204,8 @@ void attachUIClientToView(WebKitWebView* webView)
mouseDidMoveOverElement,
0, // decidePolicyForNotificationPermissionRequest
0, // unavailablePluginButtonClicked
+ 0, // showColorPicker
+ 0, // hideColorPicker
};
WKPageRef wkPage = toAPI(webkitWebViewBaseGetPage(WEBKIT_WEB_VIEW_BASE(webView)));
WKPageSetPageUIClient(wkPage, &wkUIClient);
diff --git a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
index 6cc5e8d39..a154da8f5 100644
--- a/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
+++ b/Source/WebKit2/UIProcess/API/qt/qquickwebview_p_p.h
@@ -21,11 +21,12 @@
#ifndef qquickwebview_p_p_h
#define qquickwebview_p_p_h
+#include "DefaultUndoController.h"
#include "PageViewportController.h"
#include "PageViewportControllerClient.h"
#include "QtPageClient.h"
#include "QtWebPageUIClient.h"
-#include "QtWebUndoController.h"
+
#include "qquickwebview_p.h"
#include "qquickwebpage_p.h"
#include <QtCore/QElapsedTimer>
@@ -160,7 +161,7 @@ protected:
RefPtr<WebKit::WebPageProxy> webPageProxy;
WebKit::QtPageClient pageClient;
- WebKit::QtWebUndoController undoController;
+ WebKit::DefaultUndoController undoController;
OwnPtr<QWebNavigationHistory> navigationHistory;
OwnPtr<QWebPreferences> preferences;
diff --git a/Source/WebKit2/UIProcess/qt/QtWebUndoController.cpp b/Source/WebKit2/UIProcess/DefaultUndoController.cpp
index e52eb2866..a2df76cd8 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebUndoController.cpp
+++ b/Source/WebKit2/UIProcess/DefaultUndoController.cpp
@@ -1,6 +1,7 @@
/*
- Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
Copyright (C) 2007 Staikos Computing Services Inc.
+ Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
+ Copyright (C) 2012 Samsung Electronics
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -19,15 +20,14 @@
*/
#include "config.h"
-#include "QtWebUndoController.h"
+#include "DefaultUndoController.h"
#include "WebEditCommandProxy.h"
-#include <QtGlobal>
#include <wtf/RefPtr.h>
namespace WebKit {
-void QtWebUndoController::registerEditCommand(PassRefPtr<WebEditCommandProxy> command, WebPageProxy::UndoOrRedo undoOrRedo)
+void DefaultUndoController::registerEditCommand(PassRefPtr<WebEditCommandProxy> command, WebPageProxy::UndoOrRedo undoOrRedo)
{
if (undoOrRedo == WebPageProxy::Undo)
m_undoStack.append(command);
@@ -35,21 +35,21 @@ void QtWebUndoController::registerEditCommand(PassRefPtr<WebEditCommandProxy> co
m_redoStack.append(command);
}
-void QtWebUndoController::clearAllEditCommands()
+void DefaultUndoController::clearAllEditCommands()
{
m_undoStack.clear();
m_redoStack.clear();
}
-bool QtWebUndoController::canUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
+bool DefaultUndoController::canUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
{
if (undoOrRedo == WebPageProxy::Undo)
return !m_undoStack.isEmpty();
- else
- return !m_redoStack.isEmpty();
+
+ return !m_redoStack.isEmpty();
}
-void QtWebUndoController::executeUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
+void DefaultUndoController::executeUndoRedo(WebPageProxy::UndoOrRedo undoOrRedo)
{
RefPtr<WebEditCommandProxy> command;
if (undoOrRedo == WebPageProxy::Undo) {
diff --git a/Source/WebKit2/UIProcess/qt/QtWebUndoController.h b/Source/WebKit2/UIProcess/DefaultUndoController.h
index 3274ce1c7..31617a0ec 100644
--- a/Source/WebKit2/UIProcess/qt/QtWebUndoController.h
+++ b/Source/WebKit2/UIProcess/DefaultUndoController.h
@@ -1,6 +1,7 @@
/*
- Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
Copyright (C) 2007 Staikos Computing Services Inc.
+ Copyright (C) 2011 Nokia Corporation and/or its subsidiary(-ies)
+ Copyright (C) 2012 Samsung Electronics
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
@@ -18,27 +19,27 @@
Boston, MA 02110-1301, USA.
*/
-#ifndef QtWebUndoController_h
-#define QtWebUndoController_h
+#ifndef DefaultUndoController_h
+#define DefaultUndoController_h
#include "WebEditCommandProxy.h"
#include "WebPageProxy.h"
namespace WebKit {
-class QtWebUndoController {
+class DefaultUndoController {
public:
- // Page Client.
- void registerEditCommand(PassRefPtr<WebKit::WebEditCommandProxy>, WebKit::WebPageProxy::UndoOrRedo);
+ void registerEditCommand(PassRefPtr<WebEditCommandProxy>, WebPageProxy::UndoOrRedo);
void clearAllEditCommands();
- bool canUndoRedo(WebKit::WebPageProxy::UndoOrRedo);
- void executeUndoRedo(WebKit::WebPageProxy::UndoOrRedo);
+ bool canUndoRedo(WebPageProxy::UndoOrRedo);
+ void executeUndoRedo(WebPageProxy::UndoOrRedo);
- typedef Vector<RefPtr<WebKit::WebEditCommandProxy> > CommandVector;
+private:
+ typedef Vector<RefPtr<WebEditCommandProxy> > CommandVector;
CommandVector m_undoStack;
CommandVector m_redoStack;
};
} // namespace WebKit
-#endif // QtWebUndoController_h
+#endif // DefaultUndoController_h
diff --git a/Source/WebKit2/UIProcess/WebColorChooserProxy.cpp b/Source/WebKit2/UIProcess/WebColorChooserProxy.cpp
new file mode 100644
index 000000000..7554047ac
--- /dev/null
+++ b/Source/WebKit2/UIProcess/WebColorChooserProxy.cpp
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebColorChooserProxy.h"
+
+#if ENABLE(INPUT_TYPE_COLOR)
+
+namespace WebKit {
+
+WebColorChooserProxy::WebColorChooserProxy(Client* client)
+ : m_client(client)
+{
+}
+
+WebColorChooserProxy::~WebColorChooserProxy()
+{
+}
+
+void WebColorChooserProxy::endChooser()
+{
+ if (!m_client)
+ return;
+
+ m_client->didEndColorChooser();
+}
+
+void WebColorChooserProxy::setSelectedColor(const WebCore::Color& color)
+{
+ if (!m_client)
+ return;
+
+ m_client->didChooseColor(color);
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(INPUT_TYPE_COLOR)
diff --git a/Source/WebKit2/UIProcess/WebColorChooserProxy.h b/Source/WebKit2/UIProcess/WebColorChooserProxy.h
index 7906c10fa..5da4cc781 100644
--- a/Source/WebKit2/UIProcess/WebColorChooserProxy.h
+++ b/Source/WebKit2/UIProcess/WebColorChooserProxy.h
@@ -49,18 +49,21 @@ public:
virtual void didChooseColor(const WebCore::Color&) = 0;
virtual void didEndColorChooser() = 0;
};
- virtual ~WebColorChooserProxy() { }
+
+ static PassRefPtr<WebColorChooserProxy> create(Client* client)
+ {
+ return adoptRef(new WebColorChooserProxy(client));
+ }
+
+ virtual ~WebColorChooserProxy();
void invalidate() { m_client = 0; }
- virtual void endChooser() = 0;
- virtual void setSelectedColor(const WebCore::Color&) = 0;
+ virtual void endChooser();
+ virtual void setSelectedColor(const WebCore::Color&);
protected:
- WebColorChooserProxy(Client* client)
- : m_client(client)
- {
- }
+ explicit WebColorChooserProxy(Client*);
Client* m_client;
};
diff --git a/Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.cpp b/Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.cpp
new file mode 100644
index 000000000..0ee79dd71
--- /dev/null
+++ b/Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.cpp
@@ -0,0 +1,60 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebColorPickerResultListenerProxy.h"
+
+#if ENABLE(INPUT_TYPE_COLOR)
+
+#include "WebPageProxy.h"
+
+namespace WebKit {
+
+WebColorPickerResultListenerProxy::WebColorPickerResultListenerProxy(WebPageProxy* page)
+ : m_page(page)
+{
+}
+
+WebColorPickerResultListenerProxy::~WebColorPickerResultListenerProxy()
+{
+}
+
+void WebColorPickerResultListenerProxy::invalidate()
+{
+ m_page = 0;
+}
+
+void WebColorPickerResultListenerProxy::setColor(const String& color)
+{
+ if (!m_page)
+ return;
+
+ m_page->setColorChooserColor(WebCore::Color(color));
+ m_page->endColorChooser();
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(INPUT_TYPE_COLOR)
diff --git a/Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.h b/Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.h
new file mode 100644
index 000000000..d28eb8aa9
--- /dev/null
+++ b/Source/WebKit2/UIProcess/WebColorPickerResultListenerProxy.h
@@ -0,0 +1,66 @@
+/*
+ * Copyright (C) 2012 Samsung Electronics. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebColorPickerResultListenerProxy_h
+#define WebColorPickerResultListenerProxy_h
+
+#if ENABLE(INPUT_TYPE_COLOR)
+
+#include "APIObject.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+#include <wtf/text/WTFString.h>
+
+namespace WebKit {
+
+class WebPageProxy;
+
+class WebColorPickerResultListenerProxy : public APIObject {
+public:
+ static const Type APIType = TypeColorPickerResultListener;
+
+ static PassRefPtr<WebColorPickerResultListenerProxy> create(WebPageProxy* page)
+ {
+ return adoptRef(new WebColorPickerResultListenerProxy(page));
+ }
+
+ virtual ~WebColorPickerResultListenerProxy();
+
+ void invalidate();
+ void setColor(const String&);
+
+private:
+ explicit WebColorPickerResultListenerProxy(WebPageProxy*);
+
+ virtual Type type() const { return APIType; }
+
+ RefPtr<WebPageProxy> m_page;
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(INPUT_TYPE_COLOR)
+
+#endif // WebColorPickerResultListenerProxy_h
diff --git a/Source/WebKit2/UIProcess/WebConnectionToWebProcess.cpp b/Source/WebKit2/UIProcess/WebConnectionToWebProcess.cpp
index e0dbc0644..dbf12ccf0 100644
--- a/Source/WebKit2/UIProcess/WebConnectionToWebProcess.cpp
+++ b/Source/WebKit2/UIProcess/WebConnectionToWebProcess.cpp
@@ -45,7 +45,7 @@ WebConnectionToWebProcess::WebConnectionToWebProcess(WebProcessProxy* process, C
{
#if OS(DARWIN)
m_connection->setShouldCloseConnectionOnMachExceptions();
-#elif PLATFORM(QT)
+#elif PLATFORM(QT) && !OS(WINDOWS)
m_connection->setShouldCloseConnectionOnProcessTermination(process->processIdentifier());
#endif
}
diff --git a/Source/WebKit2/UIProcess/WebContext.cpp b/Source/WebKit2/UIProcess/WebContext.cpp
index fdd363ac6..0dc530647 100644
--- a/Source/WebKit2/UIProcess/WebContext.cpp
+++ b/Source/WebKit2/UIProcess/WebContext.cpp
@@ -319,15 +319,15 @@ PassRefPtr<WebProcessProxy> WebContext::createNewWebProcess()
parameters.applicationCacheDirectory = applicationCacheDirectory();
if (!parameters.applicationCacheDirectory.isEmpty())
- SandboxExtension::createHandle(parameters.applicationCacheDirectory, SandboxExtension::ReadWrite, parameters.applicationCacheDirectoryExtensionHandle);
+ SandboxExtension::createHandleForReadWriteDirectory(parameters.applicationCacheDirectory, parameters.applicationCacheDirectoryExtensionHandle);
parameters.databaseDirectory = databaseDirectory();
if (!parameters.databaseDirectory.isEmpty())
- SandboxExtension::createHandle(parameters.databaseDirectory, SandboxExtension::ReadWrite, parameters.databaseDirectoryExtensionHandle);
+ SandboxExtension::createHandleForReadWriteDirectory(parameters.databaseDirectory, parameters.databaseDirectoryExtensionHandle);
parameters.localStorageDirectory = localStorageDirectory();
if (!parameters.localStorageDirectory.isEmpty())
- SandboxExtension::createHandle(parameters.localStorageDirectory, SandboxExtension::ReadWrite, parameters.localStorageDirectoryExtensionHandle);
+ SandboxExtension::createHandleForReadWriteDirectory(parameters.localStorageDirectory, parameters.localStorageDirectoryExtensionHandle);
parameters.shouldTrackVisitedLinks = m_historyClient.shouldTrackVisitedLinks();
parameters.cacheModel = m_cacheModel;
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.cpp b/Source/WebKit2/UIProcess/WebPageProxy.cpp
index 4ac6d2243..8fd72a0c6 100644
--- a/Source/WebKit2/UIProcess/WebPageProxy.cpp
+++ b/Source/WebKit2/UIProcess/WebPageProxy.cpp
@@ -52,6 +52,7 @@
#include "WebBackForwardList.h"
#include "WebBackForwardListItem.h"
#include "WebCertificateInfo.h"
+#include "WebColorPickerResultListenerProxy.h"
#include "WebContext.h"
#include "WebContextMenuProxy.h"
#include "WebContextUserMessageCoders.h"
@@ -413,6 +414,11 @@ void WebPageProxy::close()
m_colorChooser->invalidate();
m_colorChooser = nullptr;
}
+
+ if (m_colorPickerResultListener) {
+ m_colorPickerResultListener->invalidate();
+ m_colorPickerResultListener = nullptr;
+ }
#endif
#if ENABLE(GEOLOCATION)
@@ -2724,7 +2730,20 @@ void WebPageProxy::showColorChooser(const WebCore::Color& initialColor, const In
{
ASSERT(!m_colorChooser);
+ if (m_colorPickerResultListener) {
+ m_colorPickerResultListener->invalidate();
+ m_colorPickerResultListener = nullptr;
+ }
+
+ m_colorPickerResultListener = WebColorPickerResultListenerProxy::create(this);
+ m_colorChooser = WebColorChooserProxy::create(this);
+
+ if (m_uiClient.showColorPicker(this, initialColor.serialized(), m_colorPickerResultListener.get()))
+ return;
+
m_colorChooser = m_pageClient->createColorChooserProxy(this, initialColor, elementRect);
+ if (!m_colorChooser)
+ didEndColorChooser();
}
void WebPageProxy::setColorChooserColor(const WebCore::Color& color)
@@ -2754,12 +2773,17 @@ void WebPageProxy::didEndColorChooser()
if (!isValid())
return;
- ASSERT(m_colorChooser);
-
- m_colorChooser->invalidate();
- m_colorChooser = nullptr;
+ if (m_colorChooser) {
+ m_colorChooser->invalidate();
+ m_colorChooser = nullptr;
+ }
m_process->send(Messages::WebPage::DidEndColorChooser(), m_pageID);
+
+ m_colorPickerResultListener->invalidate();
+ m_colorPickerResultListener = nullptr;
+
+ m_uiClient.hideColorPicker(this);
}
#endif
@@ -3536,6 +3560,11 @@ void WebPageProxy::processDidCrash()
m_colorChooser->invalidate();
m_colorChooser = nullptr;
}
+
+ if (m_colorPickerResultListener) {
+ m_colorPickerResultListener->invalidate();
+ m_colorPickerResultListener = nullptr;
+ }
#endif
#if ENABLE(GEOLOCATION)
diff --git a/Source/WebKit2/UIProcess/WebPageProxy.h b/Source/WebKit2/UIProcess/WebPageProxy.h
index fd07c6f05..c4d274308 100644
--- a/Source/WebKit2/UIProcess/WebPageProxy.h
+++ b/Source/WebKit2/UIProcess/WebPageProxy.h
@@ -139,6 +139,7 @@ class PlatformCertificateInfo;
class StringPairVector;
class WebBackForwardList;
class WebBackForwardListItem;
+class WebColorPickerResultListenerProxy;
class WebContextMenuProxy;
class WebData;
class WebEditCommandProxy;
@@ -721,6 +722,11 @@ public:
void postMessageToInjectedBundle(const String& messageName, APIObject* messageBody);
+#if ENABLE(INPUT_TYPE_COLOR)
+ void setColorChooserColor(const WebCore::Color&);
+ void endColorChooser();
+#endif
+
private:
WebPageProxy(PageClient*, PassRefPtr<WebProcessProxy>, WebPageGroup*, uint64_t pageID);
@@ -853,8 +859,6 @@ private:
#if ENABLE(INPUT_TYPE_COLOR)
void showColorChooser(const WebCore::Color& initialColor, const WebCore::IntRect&);
- void setColorChooserColor(const WebCore::Color&);
- void endColorChooser();
void didChooseColor(const WebCore::Color&);
void didEndColorChooser();
#endif
@@ -1145,6 +1149,7 @@ private:
#endif
#if ENABLE(INPUT_TYPE_COLOR)
RefPtr<WebColorChooserProxy> m_colorChooser;
+ RefPtr<WebColorPickerResultListenerProxy> m_colorPickerResultListener;
#endif
uint64_t m_pageID;
diff --git a/Source/WebKit2/UIProcess/WebUIClient.cpp b/Source/WebKit2/UIProcess/WebUIClient.cpp
index ed1fb930b..f88c00a24 100644
--- a/Source/WebKit2/UIProcess/WebUIClient.cpp
+++ b/Source/WebKit2/UIProcess/WebUIClient.cpp
@@ -31,6 +31,7 @@
#include "NativeWebWheelEvent.h"
#include "NotificationPermissionRequest.h"
#include "WKAPICast.h"
+#include "WebColorPickerResultListenerProxy.h"
#include "WebNumber.h"
#include "WebOpenPanelResultListenerProxy.h"
#include "WebPageProxy.h"
@@ -417,4 +418,24 @@ bool WebUIClient::shouldInterruptJavaScript(WebPageProxy* page)
return m_client.shouldInterruptJavaScript(toAPI(page), m_client.clientInfo);
}
+#if ENABLE(INPUT_TYPE_COLOR)
+bool WebUIClient::showColorPicker(WebPageProxy* page, const String& initialColor, WebColorPickerResultListenerProxy* listener)
+{
+ if (!m_client.showColorPicker)
+ return false;
+
+ m_client.showColorPicker(toAPI(page), toAPI(initialColor.impl()), toAPI(listener), m_client.clientInfo);
+ return true;
+}
+
+bool WebUIClient::hideColorPicker(WebPageProxy* page)
+{
+ if (!m_client.hideColorPicker)
+ return false;
+
+ m_client.hideColorPicker(toAPI(page), m_client.clientInfo);
+ return true;
+}
+#endif
+
} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/WebUIClient.h b/Source/WebKit2/UIProcess/WebUIClient.h
index 28cfb686a..9b52bfd0e 100644
--- a/Source/WebKit2/UIProcess/WebUIClient.h
+++ b/Source/WebKit2/UIProcess/WebUIClient.h
@@ -48,6 +48,7 @@ class GeolocationPermissionRequestProxy;
class NativeWebKeyboardEvent;
class NativeWebWheelEvent;
class NotificationPermissionRequest;
+class WebColorPickerResultListenerProxy;
class WebData;
class WebFrameProxy;
class WebPageProxy;
@@ -115,6 +116,11 @@ public:
void saveDataToFileInDownloadsFolder(WebPageProxy*, const String& suggestedFilename, const String& mimeType, const String& originatingURLString, WebData*);
bool shouldInterruptJavaScript(WebPageProxy*);
+
+#if ENABLE(INPUT_TYPE_COLOR)
+ bool showColorPicker(WebPageProxy*, const String&, WebColorPickerResultListenerProxy*);
+ bool hideColorPicker(WebPageProxy*);
+#endif
};
} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/mac/WebContextMac.mm b/Source/WebKit2/UIProcess/mac/WebContextMac.mm
index 8b7be9530..b1d99c812 100644
--- a/Source/WebKit2/UIProcess/mac/WebContextMac.mm
+++ b/Source/WebKit2/UIProcess/mac/WebContextMac.mm
@@ -90,7 +90,7 @@ void WebContext::platformInitializeWebProcess(WebProcessCreationParameters& para
cachePath = reinterpret_cast<CFStringRef>(NSHomeDirectory());
parameters.nsURLCachePath = [(NSString *)cachePath.get() stringByStandardizingPath];
- SandboxExtension::createHandle(parameters.nsURLCachePath, SandboxExtension::ReadWrite, parameters.nsURLCachePathExtensionHandle);
+ SandboxExtension::createHandleForReadWriteDirectory(parameters.nsURLCachePath, parameters.nsURLCachePathExtensionHandle);
ASSERT(!parameters.nsURLCachePath.isEmpty());
NSURLCache *urlCache = [NSURLCache sharedURLCache];
diff --git a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h
index 4d6aebc88..8b2819ad8 100644
--- a/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h
+++ b/Source/WebKit2/UIProcess/qt/PageViewportControllerClientQt.h
@@ -31,11 +31,11 @@
#include <QVariantAnimation>
QT_BEGIN_NAMESPACE
-class QQuickWebPage;
-class QQuickWebView;
class QRectF;
QT_END_NAMESPACE
+class QQuickWebPage;
+class QQuickWebView;
class QWebKitTest;
namespace WebKit {
diff --git a/Source/WebKit2/UIProcess/qt/QtPageClient.cpp b/Source/WebKit2/UIProcess/qt/QtPageClient.cpp
index 832b32d68..d5a5f7ece 100644
--- a/Source/WebKit2/UIProcess/qt/QtPageClient.cpp
+++ b/Source/WebKit2/UIProcess/qt/QtPageClient.cpp
@@ -21,10 +21,10 @@
#include "config.h"
#include "QtPageClient.h"
+#include "DefaultUndoController.h"
#include "DrawingAreaProxy.h"
#include "LayerTreeContext.h"
#include "QtWebPageEventHandler.h"
-#include "QtWebUndoController.h"
#include "ShareableBitmap.h"
#if ENABLE(INPUT_TYPE_COLOR)
#include "WebColorChooserProxyQt.h"
@@ -56,7 +56,7 @@ QtPageClient::~QtPageClient()
{
}
-void QtPageClient::initialize(QQuickWebView* webView, QtWebPageEventHandler* eventHandler, QtWebUndoController* undoController)
+void QtPageClient::initialize(QQuickWebView* webView, QtWebPageEventHandler* eventHandler, DefaultUndoController* undoController)
{
m_webView = webView;
m_eventHandler = eventHandler;
diff --git a/Source/WebKit2/UIProcess/qt/QtPageClient.h b/Source/WebKit2/UIProcess/qt/QtPageClient.h
index a813894cc..2e367570a 100644
--- a/Source/WebKit2/UIProcess/qt/QtPageClient.h
+++ b/Source/WebKit2/UIProcess/qt/QtPageClient.h
@@ -31,7 +31,7 @@ namespace WebKit {
class DrawingAreaProxy;
class LayerTreeContext;
class QtWebPageEventHandler;
-class QtWebUndoController;
+class DefaultUndoController;
class ShareableBitmap;
class QtPageClient : public PageClient {
@@ -39,7 +39,7 @@ public:
QtPageClient();
~QtPageClient();
- void initialize(QQuickWebView*, QtWebPageEventHandler*, WebKit::QtWebUndoController*);
+ void initialize(QQuickWebView*, QtWebPageEventHandler*, WebKit::DefaultUndoController*);
// QQuickWebView.
virtual void setViewNeedsDisplay(const WebCore::IntRect&);
@@ -74,7 +74,7 @@ public:
virtual void setCursorHiddenUntilMouseMoves(bool);
virtual void toolTipChanged(const String&, const String&);
- // QtWebUndoController
+ // DefaultUndoController
virtual void registerEditCommand(PassRefPtr<WebEditCommandProxy>, WebPageProxy::UndoOrRedo);
virtual void clearAllEditCommands();
virtual bool canUndoRedo(WebPageProxy::UndoOrRedo);
@@ -109,7 +109,7 @@ public:
private:
QQuickWebView* m_webView;
QtWebPageEventHandler* m_eventHandler;
- QtWebUndoController* m_undoController;
+ DefaultUndoController* m_undoController;
};
} // namespace WebKit
diff --git a/Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp b/Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp
index 558d47d75..ef6d5477d 100644
--- a/Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp
+++ b/Source/WebKit2/UIProcess/qt/WebPageProxyQt.cpp
@@ -1,4 +1,5 @@
/*
+ * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2010 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -27,6 +28,8 @@
#include "WebPageProxy.h"
#include "PageClient.h"
+#include "UserAgentQt.h"
+#include "WebKitVersion.h"
#include "WebPageMessages.h"
#include "WebProcessProxy.h"
#include <WebCore/Editor.h>
@@ -44,8 +47,7 @@ namespace WebKit {
String WebPageProxy::standardUserAgent(const String& applicationNameForUserAgent)
{
- // FIXME: This should not be hard coded.
- return "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6) AppleWebKit/531.4 (KHTML, like Gecko) Version/4.0.3 Safari/531.4";
+ return UserAgentQt::standardUserAgent(applicationNameForUserAgent, WEBKIT_MAJOR_VERSION, WEBKIT_MINOR_VERSION);
}
void WebPageProxy::saveRecentSearches(const String&, const Vector<String>&)
diff --git a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj b/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
index 4ea5147a1..b0c0a4c73 100644
--- a/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
+++ b/Source/WebKit2/WebKit2.xcodeproj/project.pbxproj
@@ -917,6 +917,10 @@
E1EE53E711F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp in Sources */ = {isa = PBXBuildFile; fileRef = E1EE53E611F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp */; };
ED82A7F2128C6FAF004477B3 /* WKBundlePageOverlay.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A22F0FF1289FCD90085E74F /* WKBundlePageOverlay.h */; settings = {ATTRIBUTES = (Private, ); }; };
EDCA71B7128DDA8C00201B26 /* WKBundlePageOverlay.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 1A22F1001289FCD90085E74F /* WKBundlePageOverlay.cpp */; };
+ F036978515F4BE6B00C3A80E /* WKColorPickerResultListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F036978315F4BE6B00C3A80E /* WKColorPickerResultListener.cpp */; };
+ F036978615F4BE6B00C3A80E /* WKColorPickerResultListener.h in Headers */ = {isa = PBXBuildFile; fileRef = F036978415F4BE6B00C3A80E /* WKColorPickerResultListener.h */; };
+ F036978815F4BF0500C3A80E /* WebColorChooserProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F036978715F4BF0500C3A80E /* WebColorChooserProxy.cpp */; };
+ F036978B15F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F036978915F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp */; };
F6113E25126CE1820057D0A7 /* WebUserContentURLPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = F6113E24126CE1820057D0A7 /* WebUserContentURLPattern.h */; };
F6113E28126CE19B0057D0A7 /* WKUserContentURLPattern.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6113E26126CE19B0057D0A7 /* WKUserContentURLPattern.cpp */; };
F6113E29126CE19B0057D0A7 /* WKUserContentURLPattern.h in Headers */ = {isa = PBXBuildFile; fileRef = F6113E27126CE19B0057D0A7 /* WKUserContentURLPattern.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -2020,6 +2024,11 @@
E1CC1B8F12D7EADF00625838 /* PrintInfoMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = PrintInfoMac.mm; sourceTree = "<group>"; };
E1EE53DC11F8CF9F00CCBEE4 /* InjectedBundlePageEditorClient.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = InjectedBundlePageEditorClient.h; sourceTree = "<group>"; };
E1EE53E611F8CFFB00CCBEE4 /* InjectedBundlePageEditorClient.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = InjectedBundlePageEditorClient.cpp; sourceTree = "<group>"; };
+ F036978315F4BE6B00C3A80E /* WKColorPickerResultListener.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKColorPickerResultListener.cpp; sourceTree = "<group>"; };
+ F036978415F4BE6B00C3A80E /* WKColorPickerResultListener.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKColorPickerResultListener.h; sourceTree = "<group>"; };
+ F036978715F4BF0500C3A80E /* WebColorChooserProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorChooserProxy.cpp; sourceTree = "<group>"; };
+ F036978915F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebColorPickerResultListenerProxy.cpp; sourceTree = "<group>"; };
+ F036978A15F4BF1300C3A80E /* WebColorPickerResultListenerProxy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebColorPickerResultListenerProxy.h; sourceTree = "<group>"; };
F6113E24126CE1820057D0A7 /* WebUserContentURLPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebUserContentURLPattern.h; sourceTree = "<group>"; };
F6113E26126CE19B0057D0A7 /* WKUserContentURLPattern.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WKUserContentURLPattern.cpp; sourceTree = "<group>"; };
F6113E27126CE19B0057D0A7 /* WKUserContentURLPattern.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WKUserContentURLPattern.h; sourceTree = "<group>"; };
@@ -2947,7 +2956,10 @@
512E35F0130B638C00ABD19A /* WebApplicationCacheManagerProxy.messages.in */,
BC72BA1B11E64907001EB4EA /* WebBackForwardList.cpp */,
BC72BA1C11E64907001EB4EA /* WebBackForwardList.h */,
+ F036978715F4BF0500C3A80E /* WebColorChooserProxy.cpp */,
3F87B9BF158940D80090FF62 /* WebColorChooserProxy.h */,
+ F036978915F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp */,
+ F036978A15F4BF1300C3A80E /* WebColorPickerResultListenerProxy.h */,
BC4A62A514744EC6006C681A /* WebConnectionToWebProcess.cpp */,
BC4A62A614744EC6006C681A /* WebConnectionToWebProcess.h */,
BCB9E2421120DACA00A137E0 /* WebContext.cpp */,
@@ -3071,6 +3083,8 @@
BC646C1711DD399F006455B0 /* WKBackForwardList.h */,
BC646C1811DD399F006455B0 /* WKBackForwardListItem.cpp */,
BC646C1911DD399F006455B0 /* WKBackForwardListItem.h */,
+ F036978315F4BE6B00C3A80E /* WKColorPickerResultListener.cpp */,
+ F036978415F4BE6B00C3A80E /* WKColorPickerResultListener.h */,
BCB9E24A1120E15C00A137E0 /* WKContext.cpp */,
BCB9E2491120E15C00A137E0 /* WKContext.h */,
BCC938E01180DE440085E5FE /* WKContextPrivate.h */,
@@ -4154,6 +4168,7 @@
BC14DF9F120B635F00826C0C /* WKBundleScriptWorld.h in Headers */,
BC4075F6124FF0270068F20A /* WKCertificateInfo.h in Headers */,
BC407627124FF0400068F20A /* WKCertificateInfoMac.h in Headers */,
+ F036978615F4BE6B00C3A80E /* WKColorPickerResultListener.h in Headers */,
BCA284D71492F2C7001F9042 /* WKConnection.h in Headers */,
BC5C75C814954DA600BC4775 /* WKConnectionInternal.h in Headers */,
BC4A6297147313A0006C681A /* WKConnectionRef.h in Headers */,
@@ -4783,6 +4798,8 @@
518D2CAD12D5153B003BB93B /* WebBackForwardListItem.cpp in Sources */,
BC72B9FA11E6476B001EB4EA /* WebBackForwardListProxy.cpp in Sources */,
BC111A5A112F4FBB00337BAB /* WebChromeClient.cpp in Sources */,
+ F036978815F4BF0500C3A80E /* WebColorChooserProxy.cpp in Sources */,
+ F036978B15F4BF1300C3A80E /* WebColorPickerResultListenerProxy.cpp in Sources */,
BC4A628F147312BE006C681A /* WebConnection.cpp in Sources */,
BC4A6291147312BE006C681A /* WebConnectionClient.cpp in Sources */,
BCD3675C148C26C000447E87 /* WebConnectionToUIProcess.cpp in Sources */,
@@ -4964,6 +4981,7 @@
BC14DF9E120B635F00826C0C /* WKBundleScriptWorld.cpp in Sources */,
BC4075F5124FF0270068F20A /* WKCertificateInfo.cpp in Sources */,
BC407628124FF0400068F20A /* WKCertificateInfoMac.mm in Sources */,
+ F036978515F4BE6B00C3A80E /* WKColorPickerResultListener.cpp in Sources */,
BCA284D61492F2C7001F9042 /* WKConnection.mm in Sources */,
BC4A6296147313A0006C681A /* WKConnectionRef.cpp in Sources */,
BCB9E24C1120E15C00A137E0 /* WKContext.cpp in Sources */,
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
index 14fccdc64..276f7d3cb 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundle.cpp
@@ -25,11 +25,12 @@
#include "config.h"
#include "WKBundle.h"
-#include "WKBundlePrivate.h"
+#include "ImmutableArray.h"
#include "InjectedBundle.h"
#include "WKAPICast.h"
#include "WKBundleAPICast.h"
+#include "WKBundlePrivate.h"
using namespace WebKit;
@@ -248,7 +249,18 @@ uint64_t WKBundleGetAppCacheUsageForOrigin(WKBundleRef bundleRef, WKStringRef or
void WKBundleSetApplicationCacheOriginQuota(WKBundleRef bundleRef, WKStringRef origin, uint64_t bytes)
{
- return toImpl(bundleRef)->setApplicationCacheOriginQuota(toImpl(origin)->string(), bytes);
+ toImpl(bundleRef)->setApplicationCacheOriginQuota(toImpl(origin)->string(), bytes);
+}
+
+void WKBundleResetApplicationCacheOriginQuota(WKBundleRef bundleRef, WKStringRef origin)
+{
+ toImpl(bundleRef)->resetApplicationCacheOriginQuota(toImpl(origin)->string());
+}
+
+WKArrayRef WKBundleCopyOriginsWithApplicationCache(WKBundleRef bundleRef)
+{
+ RefPtr<ImmutableArray> origins = toImpl(bundleRef)->originsWithApplicationCache();
+ return toAPI(origins.release().leakRef());
}
void WKBundleSetMinimumTimerInterval(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, double seconds)
@@ -286,6 +298,12 @@ void WKBundleSetPageVisibilityState(WKBundleRef bundleRef, WKBundlePageRef pageR
toImpl(bundleRef)->setPageVisibilityState(toImpl(pageRef), state, isInitialState);
}
+size_t WKBundleGetWorkerThreadCount(WKBundleRef)
+{
+ // Actually do not need argument here, keeping it however for consistency.
+ return InjectedBundle::workerThreadCount();
+}
+
void WKBundleSetUserStyleSheetLocation(WKBundleRef bundleRef, WKBundlePageGroupRef pageGroupRef, WKStringRef location)
{
toImpl(bundleRef)->setUserStyleSheetLocation(toImpl(pageGroupRef), toImpl(location)->string());
@@ -306,3 +324,7 @@ uint64_t WKBundleGetWebNotificationID(WKBundleRef bundleRef, JSContextRef contex
return toImpl(bundleRef)->webNotificationID(context, notification);
}
+void WKBundleSetTabKeyCyclesThroughElements(WKBundleRef bundleRef, WKBundlePageRef pageRef, bool enabled)
+{
+ toImpl(bundleRef)->setTabKeyCyclesThroughElements(toImpl(pageRef), enabled);
+}
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
index 4f86778bd..d32b5618c 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFrame.cpp
@@ -262,3 +262,12 @@ WKDataRef WKBundleFrameCopyWebArchiveFilteringSubframes(WKBundleFrameRef frameRe
return 0;
}
+
+bool WKBundleFrameCallShouldCloseOnWebView(WKBundleFrameRef frameRef)
+{
+ Frame* coreFrame = toImpl(frameRef)->coreFrame();
+ if (!coreFrame)
+ return true;
+
+ return coreFrame->loader()->shouldClose();
+}
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h
index a786b2557..98722f856 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundleFramePrivate.h
@@ -52,6 +52,7 @@ WK_EXPORT void WKBundleFrameClearOpener(WKBundleFrameRef frame);
WK_EXPORT bool WKBundleFrameContainsAnyFormElements(WKBundleFrameRef frame);
WK_EXPORT void WKBundleFrameSetTextDirection(WKBundleFrameRef frame, WKStringRef);
+WK_EXPORT bool WKBundleFrameCallShouldCloseOnWebView(WKBundleFrameRef frame);
#ifdef __cplusplus
}
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
index 8bc7670cf..206e1e9c3 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePage.h
@@ -236,6 +236,7 @@ typedef bool (*WKBundlePageShouldRubberBandInDirectionCallback)(WKBundlePageRef
typedef WKBundlePageUIElementVisibility (*WKBundlePageStatusBarIsVisibleCallback)(WKBundlePageRef page, const void *clientInfo);
typedef WKBundlePageUIElementVisibility (*WKBundlePageMenuBarIsVisibleCallback)(WKBundlePageRef page, const void *clientInfo);
typedef WKBundlePageUIElementVisibility (*WKBundlePageToolbarsAreVisibleCallback)(WKBundlePageRef page, const void *clientInfo);
+typedef void (*WKBundlePageReachedAppCacheOriginQuotaCallback)(WKBundlePageRef page, WKSecurityOriginRef origin, int64_t totalBytesNeeded, const void *clientInfo);
struct WKBundlePageUIClient {
int version;
@@ -254,10 +255,13 @@ struct WKBundlePageUIClient {
WKBundlePageStatusBarIsVisibleCallback statusBarIsVisible;
WKBundlePageMenuBarIsVisibleCallback menuBarIsVisible;
WKBundlePageToolbarsAreVisibleCallback toolbarsAreVisible;
+
+ // Version 1.
+ WKBundlePageReachedAppCacheOriginQuotaCallback didReachApplicationCacheOriginQuota;
};
typedef struct WKBundlePageUIClient WKBundlePageUIClient;
-enum { kWKBundlePageUIClientCurrentVersion = 0 };
+enum { kWKBundlePageUIClientCurrentVersion = 1 };
// Editor client
typedef bool (*WKBundlePageShouldBeginEditingCallback)(WKBundlePageRef page, WKBundleRangeHandleRef range, const void* clientInfo);
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
index e979791c9..3a1512aaf 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
+++ b/Source/WebKit2/WebProcess/InjectedBundle/API/c/WKBundlePrivate.h
@@ -99,6 +99,8 @@ WK_EXPORT void WKBundleClearApplicationCacheForOrigin(WKBundleRef bundle, WKStri
WK_EXPORT void WKBundleSetAppCacheMaximumSize(WKBundleRef bundle, uint64_t size);
WK_EXPORT uint64_t WKBundleGetAppCacheUsageForOrigin(WKBundleRef bundle, WKStringRef origin);
WK_EXPORT void WKBundleSetApplicationCacheOriginQuota(WKBundleRef bundle, WKStringRef origin, uint64_t bytes);
+WK_EXPORT void WKBundleResetApplicationCacheOriginQuota(WKBundleRef bundle, WKStringRef origin);
+WK_EXPORT WKArrayRef WKBundleCopyOriginsWithApplicationCache(WKBundleRef bundle);
// Garbage collection API
WK_EXPORT void WKBundleGarbageCollectJavaScriptObjects(WKBundleRef bundle);
@@ -109,6 +111,10 @@ WK_EXPORT bool WKBundleIsProcessingUserGesture(WKBundleRef bundle);
WK_EXPORT void WKBundleSetPageVisibilityState(WKBundleRef bundle, WKBundlePageRef page, int state, bool isInitialState);
+WK_EXPORT size_t WKBundleGetWorkerThreadCount(WKBundleRef bundle);
+
+WK_EXPORT void WKBundleSetTabKeyCyclesThroughElements(WKBundleRef bundle, WKBundlePageRef page, bool enabled);
+
#ifdef __cplusplus
}
#endif
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
index cd0634906..a7de64e8a 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
+++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.cpp
@@ -67,6 +67,7 @@
#include <WebCore/SecurityPolicy.h>
#include <WebCore/Settings.h>
#include <WebCore/UserGestureIndicator.h>
+#include <WebCore/WorkerThread.h>
#include <wtf/OwnArrayPtr.h>
#include <wtf/PassOwnArrayPtr.h>
@@ -358,6 +359,26 @@ void InjectedBundle::setApplicationCacheOriginQuota(const String& originString,
cacheStorage().storeUpdatedQuotaForOrigin(origin.get(), bytes);
}
+void InjectedBundle::resetApplicationCacheOriginQuota(const String& originString)
+{
+ RefPtr<SecurityOrigin> origin = SecurityOrigin::createFromString(originString);
+ cacheStorage().storeUpdatedQuotaForOrigin(origin.get(), cacheStorage().defaultOriginQuota());
+}
+
+PassRefPtr<ImmutableArray> InjectedBundle::originsWithApplicationCache()
+{
+ HashSet<RefPtr<SecurityOrigin>, SecurityOriginHash> origins;
+ cacheStorage().getOriginsWithCache(origins);
+ Vector< RefPtr<APIObject> > originsVector;
+
+ HashSet<RefPtr<SecurityOrigin>, SecurityOriginHash>::iterator it = origins.begin();
+ HashSet<RefPtr<SecurityOrigin>, SecurityOriginHash>::iterator end = origins.end();
+ for ( ; it != end; ++it)
+ originsVector.append(WebString::create((*it)->databaseIdentifier()));
+
+ return ImmutableArray::adopt(originsVector);
+}
+
int InjectedBundle::numberOfPages(WebFrame* frame, double pageWidthInPixels, double pageHeightInPixels)
{
Frame* coreFrame = frame ? frame->coreFrame() : 0;
@@ -570,6 +591,15 @@ void InjectedBundle::setPageVisibilityState(WebPage* page, int state, bool isIni
#endif
}
+size_t InjectedBundle::workerThreadCount()
+{
+#if ENABLE(WORKERS)
+ return WebCore::WorkerThread::workerThreadCount();
+#else
+ return 0;
+#endif
+}
+
void InjectedBundle::setUserStyleSheetLocation(WebPageGroupProxy* pageGroup, const String& location)
{
const HashSet<Page*>& pages = PageGroup::pageGroup(pageGroup->identifier())->pages();
@@ -616,4 +646,9 @@ uint64_t InjectedBundle::webNotificationID(JSContextRef jsContext, JSValueRef js
#endif
}
+void InjectedBundle::setTabKeyCyclesThroughElements(WebPage* page, bool enabled)
+{
+ page->corePage()->setTabKeyCyclesThroughElements(enabled);
+}
+
} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
index 6e40013df..404a50593 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
+++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundle.h
@@ -150,6 +150,8 @@ public:
void setAppCacheMaximumSize(uint64_t);
uint64_t appCacheUsageForOrigin(const String& origin);
void setApplicationCacheOriginQuota(const String& origin, uint64_t);
+ void resetApplicationCacheOriginQuota(const String& origin);
+ PassRefPtr<ImmutableArray> originsWithApplicationCache();
// Garbage collection API
void garbageCollectJavaScriptObjects();
@@ -171,6 +173,10 @@ public:
void setPageVisibilityState(WebPage*, int state, bool isInitialState);
+ static size_t workerThreadCount();
+
+ void setTabKeyCyclesThroughElements(WebPage*, bool enabled);
+
private:
explicit InjectedBundle(const String&);
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp
index 29c70dfb4..428135481 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp
+++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundleNavigationAction.cpp
@@ -91,7 +91,7 @@ InjectedBundleNavigationAction::InjectedBundleNavigationAction(WebFrame* frame,
, m_mouseButton(WebMouseEvent::NoButton)
{
if (const MouseEvent* mouseEvent = mouseEventForNavigationAction(navigationAction)) {
- m_hitTestResult = InjectedBundleHitTestResult::create(frame->coreFrame()->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation()));
+ m_hitTestResult = InjectedBundleHitTestResult::create(frame->coreFrame()->eventHandler()->hitTestResultAtPoint(mouseEvent->absoluteLocation(), false));
m_mouseButton = mouseButtonForMouseEvent(mouseEvent);
}
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp
index b8c9c6206..2ef9ca76f 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp
+++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.cpp
@@ -28,8 +28,9 @@
#include "InjectedBundleHitTestResult.h"
#include "WKAPICast.h"
-#include "WebGraphicsContext.h"
#include "WKBundleAPICast.h"
+#include "WebGraphicsContext.h"
+#include "WebSecurityOrigin.h"
#include <wtf/text/WTFString.h>
using namespace WebCore;
@@ -146,4 +147,12 @@ WKBundlePageUIElementVisibility InjectedBundlePageUIClient::toolbarsAreVisible(W
return m_client.toolbarsAreVisible(toAPI(page), m_client.clientInfo);
}
+void InjectedBundlePageUIClient::didReachApplicationCacheOriginQuota(WebPage* page, WebSecurityOrigin* origin, int64_t totalBytesNeeded)
+{
+ if (!m_client.didReachApplicationCacheOriginQuota)
+ return;
+
+ m_client.didReachApplicationCacheOriginQuota(toAPI(page), toAPI(origin), totalBytesNeeded, m_client.clientInfo);
+}
+
} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h
index de2928aa5..b8a48271f 100644
--- a/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h
+++ b/Source/WebKit2/WebProcess/InjectedBundle/InjectedBundlePageUIClient.h
@@ -42,6 +42,7 @@ namespace WebKit {
class APIObject;
class WebFrame;
class WebPage;
+class WebSecurityOrigin;
class InjectedBundlePageUIClient : public APIClient<WKBundlePageUIClient, kWKBundlePageUIClientCurrentVersion> {
public:
@@ -64,6 +65,8 @@ public:
WKBundlePageUIElementVisibility statusBarIsVisible(WebPage*);
WKBundlePageUIElementVisibility menuBarIsVisible(WebPage*);
WKBundlePageUIElementVisibility toolbarsAreVisible(WebPage*);
+
+ void didReachApplicationCacheOriginQuota(WebPage*, WebSecurityOrigin*, int64_t totalBytesNeeded);
};
} // namespace WebKit
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
index 75838ec80..3a428e63a 100644
--- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
+++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapeBrowserFuncs.cpp
@@ -688,14 +688,20 @@ static void NPN_ReleaseObject(NPObject *npObject)
static bool NPN_Invoke(NPP npp, NPObject *npObject, NPIdentifier methodName, const NPVariant* arguments, uint32_t argumentCount, NPVariant* result)
{
+ RefPtr<NetscapePlugin> plugin = NetscapePlugin::fromNPP(npp);
+ PluginDestructionProtector protector(plugin.get());
+
if (npObject->_class->invoke)
return npObject->_class->invoke(npObject, methodName, arguments, argumentCount, result);
return false;
}
-static bool NPN_InvokeDefault(NPP, NPObject *npObject, const NPVariant* arguments, uint32_t argumentCount, NPVariant* result)
+static bool NPN_InvokeDefault(NPP npp, NPObject *npObject, const NPVariant* arguments, uint32_t argumentCount, NPVariant* result)
{
+ RefPtr<NetscapePlugin> plugin = NetscapePlugin::fromNPP(npp);
+ PluginDestructionProtector protector(plugin.get());
+
if (npObject->_class->invokeDefault)
return npObject->_class->invokeDefault(npObject, arguments, argumentCount, result);
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
index e37d75269..01238cbc1 100644
--- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
+++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.cpp
@@ -375,21 +375,15 @@ uint32_t NetscapePlugin::scheduleTimer(unsigned interval, bool repeat, void (*ti
// FIXME: Based on the plug-in visibility, figure out if we should throttle the timer, or if we should start it at all.
timer->start();
- m_timers.set(timerID, timer.leakPtr());
+ m_timers.set(timerID, timer.release());
return timerID;
}
void NetscapePlugin::unscheduleTimer(unsigned timerID)
{
- TimerMap::iterator it = m_timers.find(timerID);
- if (it == m_timers.end())
- return;
-
- OwnPtr<Timer> timer = adoptPtr(it->second);
- m_timers.remove(it);
-
- timer->stop();
+ if (OwnPtr<Timer> timer = m_timers.take(timerID))
+ timer->stop();
}
double NetscapePlugin::contentsScaleFactor()
@@ -687,7 +681,6 @@ void NetscapePlugin::destroy()
platformDestroy();
- deleteAllValues(m_timers);
m_timers.clear();
}
diff --git a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
index f0d948b0e..2c290c76b 100644
--- a/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
+++ b/Source/WebKit2/WebProcess/Plugins/Netscape/NetscapePlugin.h
@@ -308,7 +308,7 @@ private:
WebCore::RunLoop::Timer<Timer> m_timer;
};
- typedef HashMap<unsigned, Timer*> TimerMap;
+ typedef HashMap<unsigned, OwnPtr<Timer> > TimerMap;
TimerMap m_timers;
unsigned m_nextTimerID;
diff --git a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp b/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
index c7fc9a7b7..4fb65bec3 100644
--- a/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
+++ b/Source/WebKit2/WebProcess/WebCoreSupport/WebChromeClient.cpp
@@ -45,6 +45,7 @@
#include "WebPreferencesStore.h"
#include "WebProcess.h"
#include "WebSearchPopupMenu.h"
+#include "WebSecurityOrigin.h"
#include <WebCore/AXObjectCache.h>
#include <WebCore/ColorChooser.h>
#include <WebCore/DatabaseTracker.h>
@@ -549,9 +550,10 @@ void WebChromeClient::reachedMaxAppCacheSize(int64_t)
notImplemented();
}
-void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin*, int64_t)
+void WebChromeClient::reachedApplicationCacheOriginQuota(SecurityOrigin* origin, int64_t totalBytesNeeded)
{
- notImplemented();
+ RefPtr<WebSecurityOrigin> webSecurityOrigin = WebSecurityOrigin::createFromString(origin->toString());
+ m_page->injectedBundleUIClient().didReachApplicationCacheOriginQuota(m_page, webSecurityOrigin.get(), totalBytesNeeded);
}
#if ENABLE(DASHBOARD_SUPPORT)
diff --git a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
index 2411051f6..0d2bd4d3f 100644
--- a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.cpp
@@ -78,6 +78,7 @@ LayerTreeCoordinator::LayerTreeCoordinator(WebPage* webPage)
, m_shouldSyncFrame(false)
, m_shouldSyncRootLayer(true)
, m_layerFlushTimer(this, &LayerTreeCoordinator::layerFlushTimerFired)
+ , m_releaseInactiveAtlasesTimer(this, &LayerTreeCoordinator::releaseInactiveAtlasesTimerFired)
, m_layerFlushSchedulingEnabled(true)
, m_forceRepaintAsyncCallbackID(0)
{
@@ -634,8 +635,42 @@ PassOwnPtr<WebCore::GraphicsContext> LayerTreeCoordinator::beginContentUpdate(co
static const int ScratchBufferDimension = 1024; // Should be a power of two.
m_updateAtlases.append(adoptPtr(new UpdateAtlas(ScratchBufferDimension, flags)));
+ scheduleReleaseInactiveAtlases();
return m_updateAtlases.last()->beginPaintingOnAvailableBuffer(handle, size, offset);
}
+const double ReleaseInactiveAtlasesTimerInterval = 0.5;
+
+void LayerTreeCoordinator::scheduleReleaseInactiveAtlases()
+{
+ if (!m_releaseInactiveAtlasesTimer.isActive())
+ m_releaseInactiveAtlasesTimer.startRepeating(ReleaseInactiveAtlasesTimerInterval);
+}
+
+void LayerTreeCoordinator::releaseInactiveAtlasesTimerFired(Timer<LayerTreeCoordinator>*)
+{
+ // We always want to keep one atlas for non-composited content.
+ OwnPtr<UpdateAtlas> atlasToKeepAnyway;
+ bool foundActiveAtlasForNonCompositedContent = false;
+ for (int i = m_updateAtlases.size() - 1; i >= 0; --i) {
+ UpdateAtlas* atlas = m_updateAtlases[i].get();
+ if (!atlas->isInUse())
+ atlas->addTimeInactive(ReleaseInactiveAtlasesTimerInterval);
+ bool usableForNonCompositedContent = atlas->flags() == ShareableBitmap::NoFlags;
+ if (atlas->isInactive()) {
+ if (!foundActiveAtlasForNonCompositedContent && !atlasToKeepAnyway && usableForNonCompositedContent)
+ atlasToKeepAnyway = m_updateAtlases[i].release();
+ m_updateAtlases.remove(i);
+ } else if (usableForNonCompositedContent)
+ foundActiveAtlasForNonCompositedContent = true;
+ }
+
+ if (!foundActiveAtlasForNonCompositedContent && atlasToKeepAnyway)
+ m_updateAtlases.append(atlasToKeepAnyway.release());
+
+ if (m_updateAtlases.size() <= 1)
+ m_releaseInactiveAtlasesTimer.stop();
+}
+
} // namespace WebKit
#endif // USE(COORDINATED_GRAPHICS)
diff --git a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h
index c8ef54a68..73b84e524 100644
--- a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h
+++ b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/LayerTreeCoordinator.h
@@ -113,6 +113,11 @@ private:
void didPerformScheduledLayerFlush();
void syncDisplayState();
+ void layerFlushTimerFired(WebCore::Timer<LayerTreeCoordinator>*);
+
+ void scheduleReleaseInactiveAtlases();
+ void releaseInactiveAtlasesTimerFired(WebCore::Timer<LayerTreeCoordinator>*);
+
OwnPtr<WebCore::GraphicsLayer> m_rootLayer;
// The layer which contains all non-composited content.
@@ -137,8 +142,8 @@ private:
LayerTreeContext m_layerTreeContext;
bool m_shouldSyncFrame;
bool m_shouldSyncRootLayer;
- void layerFlushTimerFired(WebCore::Timer<LayerTreeCoordinator>*);
WebCore::Timer<LayerTreeCoordinator> m_layerFlushTimer;
+ WebCore::Timer<LayerTreeCoordinator> m_releaseInactiveAtlasesTimer;
bool m_layerFlushSchedulingEnabled;
uint64_t m_forceRepaintAsyncCallbackID;
};
diff --git a/Source/WebKit2/WebProcess/WebPage/DrawingArea.h b/Source/WebKit2/WebProcess/WebPage/DrawingArea.h
index 759e675ad..9c7212a9b 100644
--- a/Source/WebKit2/WebProcess/WebPage/DrawingArea.h
+++ b/Source/WebKit2/WebProcess/WebPage/DrawingArea.h
@@ -49,6 +49,7 @@ struct ColorSpaceData;
class LayerTreeHost;
class WebPage;
struct WebPageCreationParameters;
+struct WebPreferencesStore;
#if PLATFORM(WIN)
struct WindowGeometry;
@@ -83,7 +84,7 @@ public:
virtual void pageCustomRepresentationChanged() { }
virtual void setPaintingEnabled(bool) { }
- virtual void updatePreferences() { }
+ virtual void updatePreferences(const WebPreferencesStore&) { }
#if USE(ACCELERATED_COMPOSITING)
virtual void setRootCompositingLayer(WebCore::GraphicsLayer*) = 0;
diff --git a/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp b/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
index eefd1bb88..6548a25ed 100644
--- a/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.cpp
@@ -259,6 +259,18 @@ void DrawingAreaImpl::setPaintingEnabled(bool paintingEnabled)
m_isPaintingEnabled = paintingEnabled;
}
+void DrawingAreaImpl::updatePreferences(const WebPreferencesStore& store)
+{
+ // <rdar://problem/10697417>: It is necessary to force compositing when accelerate drawing
+ // is enabled on Mac so that scrollbars are always in their own layers.
+#if PLATFORM(MAC)
+ if (m_webPage->corePage()->settings()->acceleratedDrawingEnabled())
+ m_webPage->corePage()->settings()->setForceCompositingMode(LayerTreeHost::supportsAcceleratedCompositing());
+ else
+#endif
+ m_webPage->corePage()->settings()->setForceCompositingMode(store.getBoolValueForKey(WebPreferencesKey::forceCompositingModeKey()) && LayerTreeHost::supportsAcceleratedCompositing());
+}
+
void DrawingAreaImpl::layerHostDidFlushLayers()
{
ASSERT(m_layerTreeHost);
diff --git a/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h b/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
index 0174a5d6e..ffe3112c0 100644
--- a/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
+++ b/Source/WebKit2/WebProcess/WebPage/DrawingAreaImpl.h
@@ -66,6 +66,7 @@ private:
virtual bool pageOverlayShouldApplyFadeWhenPainting() const;
virtual void setPaintingEnabled(bool);
+ virtual void updatePreferences(const WebPreferencesStore&) OVERRIDE;
virtual void setRootCompositingLayer(WebCore::GraphicsLayer*);
virtual void scheduleCompositingLayerSync();
diff --git a/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.cpp b/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.cpp
index 10a35d885..27500635d 100644
--- a/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.cpp
@@ -32,6 +32,7 @@ namespace WebKit {
UpdateAtlas::UpdateAtlas(int dimension, ShareableBitmap::Flags flags)
: m_flags(flags)
+ , m_inactivityInSeconds(0)
{
IntSize size = nextPowerOfTwo(IntSize(dimension, dimension));
m_surface = ShareableSurface::create(size, flags, ShareableSurface::SupportsGraphicsSurface);
@@ -48,11 +49,11 @@ void UpdateAtlas::buildLayoutIfNeeded()
void UpdateAtlas::didSwapBuffers()
{
m_areaAllocator.clear();
- buildLayoutIfNeeded();
}
PassOwnPtr<GraphicsContext> UpdateAtlas::beginPaintingOnAvailableBuffer(ShareableSurface::Handle& handle, const WebCore::IntSize& size, IntPoint& offset)
{
+ m_inactivityInSeconds = 0;
buildLayoutIfNeeded();
IntRect rect = m_areaAllocator->allocate(size);
diff --git a/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h b/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h
index 774ccfdd3..00e850b83 100644
--- a/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h
+++ b/Source/WebKit2/WebProcess/WebPage/UpdateAtlas.h
@@ -44,6 +44,18 @@ public:
void didSwapBuffers();
ShareableBitmap::Flags flags() const { return m_flags; }
+ void addTimeInactive(double seconds)
+ {
+ ASSERT(!isInUse());
+ m_inactivityInSeconds += seconds;
+ }
+ bool isInactive() const
+ {
+ const double inactiveSecondsTolerance = 3;
+ return m_inactivityInSeconds > inactiveSecondsTolerance;
+ }
+ bool isInUse() const { return m_areaAllocator; }
+
private:
void buildLayoutIfNeeded();
@@ -51,6 +63,7 @@ private:
OwnPtr<GeneralAreaAllocator> m_areaAllocator;
ShareableBitmap::Flags m_flags;
RefPtr<ShareableSurface> m_surface;
+ double m_inactivityInSeconds;
};
}
diff --git a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
index eb8067079..915140f8d 100644
--- a/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
+++ b/Source/WebKit2/WebProcess/WebPage/WebPage.cpp
@@ -307,17 +307,16 @@ WebPage::WebPage(uint64_t pageID, const WebPageCreationParameters& parameters)
m_page->setCanStartMedia(false);
- updatePreferences(parameters.store);
-
m_pageGroup = WebProcess::shared().webPageGroup(parameters.pageGroupData);
m_page->setGroupName(m_pageGroup->identifier());
m_page->setDeviceScaleFactor(parameters.deviceScaleFactor);
- platformInitialize();
-
m_drawingArea = DrawingArea::create(this, parameters);
m_drawingArea->setPaintingEnabled(false);
+ updatePreferences(parameters.store);
+ platformInitialize();
+
m_mainFrame = WebFrame::createMainFrame(this);
setUseFixedLayout(parameters.useFixedLayout);
@@ -1315,7 +1314,7 @@ static bool isContextClick(const PlatformMouseEvent& event)
static bool handleContextMenuEvent(const PlatformMouseEvent& platformMouseEvent, WebPage* page)
{
IntPoint point = page->corePage()->mainFrame()->view()->windowToContents(platformMouseEvent.position());
- HitTestResult result = page->corePage()->mainFrame()->eventHandler()->hitTestResultAtPoint(point);
+ HitTestResult result = page->corePage()->mainFrame()->eventHandler()->hitTestResultAtPoint(point, false);
Frame* frame = page->corePage()->mainFrame();
if (result.innerNonSharedNode())
@@ -1566,7 +1565,7 @@ void WebPage::highlightPotentialActivation(const IntPoint& point, const IntSize&
return;
#else
- HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent);
+ HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), /*allowShadowContent*/ false, /*ignoreClipping*/ true);
adjustedNode = result.innerNode();
#endif
// Find the node to highlight. This is not the same as the node responding the tap gesture, because many
@@ -2081,15 +2080,6 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
#endif
settings->setInteractiveFormValidationEnabled(store.getBoolValueForKey(WebPreferencesKey::interactiveFormValidationEnabledKey()));
- // <rdar://problem/10697417>: It is necessary to force compositing when accelerate drawing
- // is enabled on Mac so that scrollbars are always in their own layers.
-#if PLATFORM(MAC)
- if (settings->acceleratedDrawingEnabled())
- settings->setForceCompositingMode(LayerTreeHost::supportsAcceleratedCompositing());
- else
-#endif
- settings->setForceCompositingMode(store.getBoolValueForKey(WebPreferencesKey::forceCompositingModeKey()) && LayerTreeHost::supportsAcceleratedCompositing());
-
#if ENABLE(SQL_DATABASE)
AbstractDatabase::setIsAvailable(store.getBoolValueForKey(WebPreferencesKey::databasesEnabledKey()));
#endif
@@ -2134,7 +2124,7 @@ void WebPage::updatePreferences(const WebPreferencesStore& store)
platformPreferencesDidChange(store);
if (m_drawingArea)
- m_drawingArea->updatePreferences();
+ m_drawingArea->updatePreferences(store);
}
#if ENABLE(INSPECTOR)
@@ -2736,7 +2726,7 @@ void WebPage::findZoomableAreaForPoint(const WebCore::IntPoint& point, const Web
{
UNUSED_PARAM(area);
Frame* mainframe = m_mainFrame->coreFrame();
- HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::IgnoreClipping);
+ HitTestResult result = mainframe->eventHandler()->hitTestResultAtPoint(mainframe->view()->windowToContents(point), /*allowShadowContent*/ false, /*ignoreClipping*/ true);
Node* node = result.innerNode();
diff --git a/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h b/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
index 4a4e06709..22599edad 100644
--- a/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
+++ b/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.h
@@ -64,7 +64,7 @@ private:
virtual void didInstallPageOverlay() OVERRIDE;
virtual void didUninstallPageOverlay() OVERRIDE;
virtual void setPageOverlayNeedsDisplay(const WebCore::IntRect&) OVERRIDE;
- virtual void updatePreferences() OVERRIDE;
+ virtual void updatePreferences(const WebPreferencesStore&) OVERRIDE;
virtual void dispatchAfterEnsuringUpdatedScrollPosition(const Function<void ()>&) OVERRIDE;
diff --git a/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm b/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
index 65660b319..6c723a956 100644
--- a/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
+++ b/Source/WebKit2/WebProcess/WebPage/mac/TiledCoreAnimationDrawingArea.mm
@@ -71,11 +71,10 @@ TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea(WebPage* webPage, c
, m_layerFlushScheduler(this)
, m_isPaintingSuspended(!parameters.isVisible)
{
- Page* page = webPage->corePage();
+ Page* page = m_webPage->corePage();
- // FIXME: It's weird that we're mucking around with the settings here.
- page->settings()->setForceCompositingMode(true);
page->settings()->setScrollingCoordinatorEnabled(true);
+ page->settings()->setForceCompositingMode(true);
WebProcess::shared().eventDispatcher().addScrollingTreeForPage(webPage);
@@ -92,8 +91,6 @@ TiledCoreAnimationDrawingArea::TiledCoreAnimationDrawingArea(WebPage* webPage, c
LayerTreeContext layerTreeContext;
layerTreeContext.contextID = m_layerHostingContext->contextID();
m_webPage->send(Messages::DrawingAreaProxy::EnterAcceleratedCompositingMode(0, layerTreeContext));
-
- updatePreferences();
}
TiledCoreAnimationDrawingArea::~TiledCoreAnimationDrawingArea()
@@ -206,8 +203,11 @@ void TiledCoreAnimationDrawingArea::setPageOverlayNeedsDisplay(const IntRect& re
scheduleCompositingLayerSync();
}
-void TiledCoreAnimationDrawingArea::updatePreferences()
+void TiledCoreAnimationDrawingArea::updatePreferences(const WebPreferencesStore&)
{
+ bool scrollingPerformanceLoggingEnabled = m_webPage->scrollingPerformanceLoggingEnabled();
+ ScrollingThread::dispatch(bind(&ScrollingTree::setScrollingPerformanceLoggingEnabled, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), scrollingPerformanceLoggingEnabled));
+
bool showDebugBorders = m_webPage->corePage()->settings()->showDebugBorders();
if (showDebugBorders == !!m_debugInfoLayer)
@@ -221,10 +221,7 @@ void TiledCoreAnimationDrawingArea::updatePreferences()
m_debugInfoLayer = nullptr;
}
- bool scrollingPerformanceLoggingEnabled = m_webPage->scrollingPerformanceLoggingEnabled();
-
ScrollingThread::dispatch(bind(&ScrollingTree::setDebugRootLayer, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), m_debugInfoLayer));
- ScrollingThread::dispatch(bind(&ScrollingTree::setScrollingPerformanceLoggingEnabled, m_webPage->corePage()->scrollingCoordinator()->scrollingTree(), scrollingPerformanceLoggingEnabled));
}
void TiledCoreAnimationDrawingArea::dispatchAfterEnsuringUpdatedScrollPosition(const Function<void ()>& functionRef)
diff --git a/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm b/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
index 359f35a5f..c2f016537 100644
--- a/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
+++ b/Source/WebKit2/WebProcess/WebPage/mac/WebPageMac.mm
@@ -375,7 +375,7 @@ void WebPage::characterIndexForPoint(IntPoint point, uint64_t& index)
if (!frame)
return;
- HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(point);
+ HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(point, false);
frame = result.innerNonSharedNode() ? result.innerNonSharedNode()->document()->frame() : m_page->focusController()->focusedOrMainFrame();
RefPtr<Range> range = frame->rangeForPoint(result.roundedPoint());
@@ -464,7 +464,7 @@ void WebPage::performDictionaryLookupAtLocation(const FloatPoint& floatPoint)
// Find the frame the point is over.
IntPoint point = roundedIntPoint(floatPoint);
- HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(point));
+ HitTestResult result = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(point), false);
frame = result.innerNonSharedNode() ? result.innerNonSharedNode()->document()->frame() : m_page->focusController()->focusedOrMainFrame();
IntPoint translatedPoint = frame->view()->windowToContents(point);
@@ -727,7 +727,7 @@ void WebPage::shouldDelayWindowOrderingEvent(const WebKit::WebMouseEvent& event,
return;
#if ENABLE(DRAG_SUPPORT)
- HitTestResult hitResult = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(event.position()), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent);
+ HitTestResult hitResult = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(event.position()), true);
if (hitResult.isSelected())
result = frame->eventHandler()->eventMayStartDrag(platform(event));
#endif
@@ -740,7 +740,7 @@ void WebPage::acceptsFirstMouse(int eventNumber, const WebKit::WebMouseEvent& ev
if (!frame)
return;
- HitTestResult hitResult = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(event.position()), HitTestRequest::ReadOnly | HitTestRequest::Active | HitTestRequest::AllowShadowContent);
+ HitTestResult hitResult = frame->eventHandler()->hitTestResultAtPoint(frame->view()->windowToContents(event.position()), true);
frame->eventHandler()->setActivationEventNumber(eventNumber);
#if ENABLE(DRAG_SUPPORT)
if (hitResult.isSelected())
diff --git a/Source/WebKit2/config.h b/Source/WebKit2/config.h
index 8072046d3..d6c4a5da6 100644
--- a/Source/WebKit2/config.h
+++ b/Source/WebKit2/config.h
@@ -82,7 +82,9 @@ static const type& name() \
#define _WINSOCKAPI_ /* Prevent inclusion of winsock.h in windows.h */
#endif
+#if !PLATFORM(QT)
#include <WebCore/config.h>
+#endif
#include <windows.h>
#if USE(CG)
diff --git a/Source/WebKit2/win/WebKit2.def b/Source/WebKit2/win/WebKit2.def
index 67b2213fc..aa3bac015 100644
--- a/Source/WebKit2/win/WebKit2.def
+++ b/Source/WebKit2/win/WebKit2.def
@@ -186,6 +186,7 @@ EXPORTS
?instrumentingAgentsForPage@InspectorInstrumentation@WebCore@@CAPAVInstrumentingAgents@2@PAVPage@2@@Z
?isActiveInsertionPoint@WebCore@@YA_NPBVNode@1@@Z
?isCSSExclusionsEnabled@RuntimeEnabledFeatures@WebCore@@0_NA
+ ?isLangAttributeAwareFormControlUIEnabled@RuntimeEnabledFeatures@WebCore@@0_NA
?isPreloaded@CachedResourceLoader@WebCore@@QBE_NABVString@WTF@@@Z
?jsArray@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@V?$PassRefPtr@VDOMStringList@WebCore@@@WTF@@@Z
?lastChangeWasUserEdit@HTMLTextFormControlElement@WebCore@@QBE_NXZ
@@ -195,6 +196,7 @@ EXPORTS
?lastChild@ComposedShadowTreeWalker@WebCore@@QAEXXZ
?next@ComposedShadowTreeWalker@WebCore@@QAEXXZ
?previous@ComposedShadowTreeWalker@WebCore@@QAEXXZ
+ ?number@String@WTF@@SA?AV12@_J@Z
?number@String@WTF@@SA?AV12@_K@Z
?number@String@WTF@@SA?AV12@H@Z
?number@String@WTF@@SA?AV12@I@Z
@@ -222,6 +224,7 @@ EXPORTS
?setFantasyFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
?setFixedFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
?setMockScrollbarsEnabled@Settings@WebCore@@SAX_N@Z
+ ?mockScrollbarsEnabled@Settings@WebCore@@SA_NXZ
?setPageScaleFactor@Page@WebCore@@QAEXMABVIntPoint@2@@Z
?setPagination@Page@WebCore@@QAEXABUPagination@2@@Z
?setPictographFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
@@ -261,7 +264,7 @@ EXPORTS
??1ContextDestructionObserver@WebCore@@MAE@XZ
?contextDestroyed@ContextDestructionObserver@WebCore@@UAEXXZ
??0ContextDestructionObserver@WebCore@@QAE@PAVScriptExecutionContext@1@@Z
- ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIIII@Z
+ ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIII_N00@Z
?selectionStartHasMarkerFor@Editor@WebCore@@QBE_NW4MarkerType@DocumentMarker@2@HH@Z
?webkitWillEnterFullScreenForElement@Document@WebCore@@QAEXPAVElement@2@@Z
?webkitDidEnterFullScreenForElement@Document@WebCore@@QAEXPAVElement@2@@Z
diff --git a/Source/WebKit2/win/WebKit2.vcproj b/Source/WebKit2/win/WebKit2.vcproj
index cd3ae55b0..ff3a3f9db 100755
--- a/Source/WebKit2/win/WebKit2.vcproj
+++ b/Source/WebKit2/win/WebKit2.vcproj
@@ -2899,10 +2899,22 @@
>
</File>
<File
+ RelativePath="..\UIProcess\WebColorChooserProxy.cpp"
+ >
+ </File>
+ <File
RelativePath="..\UIProcess\WebColorChooserProxy.h"
>
</File>
<File
+ RelativePath="..\UIProcess\WebColorPickerResultListenerProxy.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\UIProcess\WebColorPickerResultListenerProxy.h"
+ >
+ </File>
+ <File
RelativePath="..\UIProcess\WebConnectionToWebProcess.cpp"
>
</File>
@@ -3329,6 +3341,14 @@
>
</File>
<File
+ RelativePath="..\UIProcess\API\C\WKColorPickerResultListener.cpp"
+ >
+ </File>
+ <File
+ RelativePath="..\UIProcess\API\C\WKColorPickerResultListener.h"
+ >
+ </File>
+ <File
RelativePath="..\UIProcess\API\C\WKContext.cpp"
>
</File>
diff --git a/Source/WebKit2/win/WebKit2CFLite.def b/Source/WebKit2/win/WebKit2CFLite.def
index 71b6f71ff..3ec5b55f5 100644
--- a/Source/WebKit2/win/WebKit2CFLite.def
+++ b/Source/WebKit2/win/WebKit2CFLite.def
@@ -118,7 +118,6 @@ EXPORTS
?detachThread@WTF@@YAXI@Z
?didBeginFrameImpl@InspectorInstrumentation@WebCore@@CAXPAVInstrumentingAgents@2@@Z
?didCancelFrameImpl@InspectorInstrumentation@WebCore@@CAXPAVInstrumentingAgents@2@@Z
- ?iconURLs@Document@WebCore@@QAEABV?$Vector@UIconURL@WebCore@@$0A@@WTF@@XZ
?initializeMainThread@WTF@@YAXXZ
?initializeThreading@WTF@@YAXXZ
?instrumentationForPage@WebCore@@YAPAVInstrumentingAgents@1@PAVPage@1@@Z
@@ -148,9 +147,6 @@ EXPORTS
??1ClientRectList@WebCore@@QAE@XZ
??0String@WTF@@QAE@PBD@Z
??0String@WTF@@QAE@PB_W@Z
- ??1ContextDestructionObserver@WebCore@@MAE@XZ
- ?contextDestroyed@ContextDestructionObserver@WebCore@@UAEXXZ
- ??0ContextDestructionObserver@WebCore@@QAE@PAVScriptExecutionContext@1@@Z
?absoluteBoundingBoxRect@RenderObject@WebCore@@QBE?AVIntRect@2@_N@Z
?absoluteBoundingBoxRectIgnoringTransforms@RenderObject@WebCore@@QBE?AVIntRect@2@XZ
?description@DocumentMarker@WebCore@@QBEABVString@WTF@@XZ
@@ -183,6 +179,7 @@ EXPORTS
?instrumentingAgentsForPage@InspectorInstrumentation@WebCore@@CAPAVInstrumentingAgents@2@PAVPage@2@@Z
?isActiveInsertionPoint@WebCore@@YA_NPBVNode@1@@Z
?isCSSExclusionsEnabled@RuntimeEnabledFeatures@WebCore@@0_NA
+ ?isLangAttributeAwareFormControlUIEnabled@RuntimeEnabledFeatures@WebCore@@0_NA
?isPreloaded@CachedResourceLoader@WebCore@@QBE_NABVString@WTF@@@Z
?jsArray@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@PAVJSDOMGlobalObject@1@V?$PassRefPtr@VDOMStringList@WebCore@@@WTF@@@Z
?lastChangeWasUserEdit@HTMLTextFormControlElement@WebCore@@QBE_NXZ
@@ -192,6 +189,7 @@ EXPORTS
?lastChild@ComposedShadowTreeWalker@WebCore@@QAEXXZ
?next@ComposedShadowTreeWalker@WebCore@@QAEXXZ
?previous@ComposedShadowTreeWalker@WebCore@@QAEXXZ
+ ?number@String@WTF@@SA?AV12@_J@Z
?number@String@WTF@@SA?AV12@_K@Z
?number@String@WTF@@SA?AV12@H@Z
?number@String@WTF@@SA?AV12@I@Z
@@ -214,11 +212,12 @@ EXPORTS
?setCanStartMedia@Page@WebCore@@QAEX_N@Z
?setCursiveFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
?setDeviceScaleFactor@Page@WebCore@@QAEXM@Z
- ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
?setDocumentState@HistoryItem@WebCore@@QAEXABV?$Vector@VString@WTF@@$0A@@WTF@@@Z
+ ?setDOMException@WebCore@@YAXPAVExecState@JSC@@H@Z
?setFantasyFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
?setFixedFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
?setMockScrollbarsEnabled@Settings@WebCore@@SAX_N@Z
+ ?mockScrollbarsEnabled@Settings@WebCore@@SA_NXZ
?setPageScaleFactor@Page@WebCore@@QAEXMABVIntPoint@2@@Z
?setPagination@Page@WebCore@@QAEXABUPagination@2@@Z
?setPictographFontFamily@Settings@WebCore@@QAEXABVAtomicString@WTF@@W4UScriptCode@@@Z
@@ -255,7 +254,10 @@ EXPORTS
?userPreferredLanguages@WebCore@@YA?AV?$Vector@VString@WTF@@$0A@@WTF@@XZ
?utf8@String@WTF@@QBE?AVCString@2@_N@Z
?view@Document@WebCore@@QBEPAVFrameView@2@XZ
- ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIIII@Z
+ ??1ContextDestructionObserver@WebCore@@MAE@XZ
+ ?contextDestroyed@ContextDestructionObserver@WebCore@@UAEXXZ
+ ??0ContextDestructionObserver@WebCore@@QAE@PAVScriptExecutionContext@1@@Z
+ ?nodesFromRect@Document@WebCore@@QBE?AV?$PassRefPtr@VNodeList@WebCore@@@WTF@@HHIIII_N00@Z
?selectionStartHasMarkerFor@Editor@WebCore@@QBE_NW4MarkerType@DocumentMarker@2@HH@Z
?restrictScaleFactorToInitialScaleIfNotUserScalable@WebCore@@YAXAAUViewportAttributes@1@@Z
?restrictMinimumScaleFactorToViewportSize@WebCore@@YAXAAUViewportAttributes@1@VIntSize@1@@Z
@@ -268,10 +270,10 @@ EXPORTS
?setAllowsRoundingHacks@TextRun@WebCore@@SAX_N@Z
?profilerEnabled@InspectorController@WebCore@@QAE_NXZ
?setProfilerEnabled@InspectorController@WebCore@@QAEX_N@Z
- ??1ContextDestructionObserver@WebCore@@MAE@XZ
?jsStringWithCacheSlowCase@WebCore@@YA?AVJSValue@JSC@@PAVExecState@3@AAV?$HashMap@PAVStringImpl@WTF@@V?$Weak@VJSString@JSC@@@JSC@@U?$PtrHash@PAVStringImpl@WTF@@@2@U?$HashTraits@PAVStringImpl@WTF@@@2@U?$HashTraits@V?$Weak@VJSString@JSC@@@JSC@@@2@@WTF@@PAVStringImpl@6@@Z
?registerURLSchemeAsBypassingContentSecurityPolicy@SchemeRegistry@WebCore@@SAXABVString@WTF@@@Z
?removeURLSchemeRegisteredAsBypassingContentSecurityPolicy@SchemeRegistry@WebCore@@SAXABVString@WTF@@@Z
+ ?iconURLs@Document@WebCore@@QAEABV?$Vector@UIconURL@WebCore@@$0A@@WTF@@XZ
?numberOfPages@PrintContext@WebCore@@SAHPAVFrame@2@ABVFloatSize@2@@Z
?pageProperty@PrintContext@WebCore@@SA?AVString@WTF@@PAVFrame@2@PBDH@Z
?pageSizeAndMarginsInPixels@PrintContext@WebCore@@SA?AVString@WTF@@PAVFrame@2@HHHHHHH@Z
diff --git a/Source/WebKit2/win/WebKit2Generated.make b/Source/WebKit2/win/WebKit2Generated.make
index f93f8a900..6f271ccde 100644
--- a/Source/WebKit2/win/WebKit2Generated.make
+++ b/Source/WebKit2/win/WebKit2Generated.make
@@ -51,6 +51,7 @@ all:
xcopy /y /d "..\UIProcess\API\C\WKAuthenticationDecisionListener.h" "%ConfigurationBuildDir%\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\WKBackForwardList.h" "%ConfigurationBuildDir%\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\WKBackForwardListItem.h" "%ConfigurationBuildDir%\include\WebKit2"
+ xcopy /y /d "..\UIProcess\API\C\WKColorPickerResultListener.h" "%ConfigurationBuildDir%\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\WKContext.h" "%ConfigurationBuildDir%\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\WKContextPrivate.h" "%ConfigurationBuildDir%\include\WebKit2"
xcopy /y /d "..\UIProcess\API\C\WKCookieManager.h" "%ConfigurationBuildDir%\include\WebKit2"