summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2010-10-22 13:02:20 +0100
committerBen Murdoch <benm@google.com>2010-10-26 15:21:41 +0100
commita94275402997c11dd2e778633dacf4b7e630a35d (patch)
treee66f56c67e3b01f22c9c23cd932271ee9ac558ed /WebKit
parent09e26c78506587b3f5d930d7bc72a23287ffbec0 (diff)
downloadexternal_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.zip
external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.gz
external_webkit-a94275402997c11dd2e778633dacf4b7e630a35d.tar.bz2
Merge WebKit at r70209: Initial merge by Git
Change-Id: Id23a68efa36e9d1126bcce0b137872db00892c8e
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/CMakeLists.txt1
-rw-r--r--WebKit/ChangeLog64
-rw-r--r--WebKit/WebKit.xcodeproj/project.pbxproj29
-rw-r--r--WebKit/cf/ChangeLog10
-rw-r--r--WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp17
-rw-r--r--WebKit/chromium/ChangeLog1743
-rw-r--r--WebKit/chromium/DEPS4
-rw-r--r--WebKit/chromium/WebKit.gyp167
-rw-r--r--WebKit/chromium/WebKit.gypi14
-rw-r--r--WebKit/chromium/features.gypi3
-rw-r--r--WebKit/chromium/public/WebAccessibilityCache.h2
-rw-r--r--WebKit/chromium/public/WebBlobData.h12
-rw-r--r--WebKit/chromium/public/WebBlobRegistry.h2
-rw-r--r--WebKit/chromium/public/WebCommonWorkerClient.h6
-rw-r--r--WebKit/chromium/public/WebDragData.h14
-rw-r--r--WebKit/chromium/public/WebElement.h1
-rw-r--r--WebKit/chromium/public/WebExceptionCode.h41
-rw-r--r--WebKit/chromium/public/WebFileSystem.h6
-rw-r--r--WebKit/chromium/public/WebFrame.h8
-rw-r--r--WebKit/chromium/public/WebFrameClient.h8
-rw-r--r--WebKit/chromium/public/WebHTTPBody.h5
-rw-r--r--WebKit/chromium/public/WebHistoryItem.h3
-rw-r--r--WebKit/chromium/public/WebIDBCallbacks.h2
-rw-r--r--WebKit/chromium/public/WebIDBCursor.h7
-rw-r--r--WebKit/chromium/public/WebIDBDatabase.h16
-rwxr-xr-xWebKit/chromium/public/WebIDBFactory.h5
-rw-r--r--WebKit/chromium/public/WebIDBIndex.h45
-rwxr-xr-xWebKit/chromium/public/WebIDBObjectStore.h49
-rw-r--r--WebKit/chromium/public/WebIDBTransaction.h4
-rw-r--r--WebKit/chromium/public/WebIDBTransactionCallbacks.h7
-rw-r--r--WebKit/chromium/public/WebNode.h1
-rw-r--r--WebKit/chromium/public/WebPlugin.h9
-rw-r--r--WebKit/chromium/public/WebPluginContainer.h3
-rw-r--r--WebKit/chromium/public/WebResourceRawHeaders.h74
-rw-r--r--WebKit/chromium/public/WebScriptController.h5
-rwxr-xr-x[-rw-r--r--]WebKit/chromium/public/WebThreadSafeData.h (renamed from WebKit/chromium/public/WebBlobStorageData.h)60
-rw-r--r--WebKit/chromium/public/WebURLLoaderClient.h3
-rw-r--r--WebKit/chromium/public/WebURLRequest.h5
-rw-r--r--WebKit/chromium/public/WebURLResponse.h5
-rw-r--r--WebKit/chromium/public/WebVideoFrame.h6
-rw-r--r--WebKit/chromium/public/WebView.h29
-rw-r--r--WebKit/chromium/public/WebViewClient.h15
-rw-r--r--WebKit/chromium/public/linux/WebThemeEngine.h89
-rw-r--r--WebKit/chromium/public/win/WebThemeEngine.h (renamed from WebKit/chromium/public/WebThemeEngine.h)8
-rw-r--r--WebKit/chromium/src/ApplicationCacheHost.cpp7
-rw-r--r--WebKit/chromium/src/AssertMatchingEnums.cpp5
-rw-r--r--WebKit/chromium/src/AsyncFileSystemChromium.cpp13
-rw-r--r--WebKit/chromium/src/AsyncFileSystemChromium.h14
-rw-r--r--WebKit/chromium/src/BackForwardListClientImpl.cpp8
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.cpp59
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.h2
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp70
-rw-r--r--WebKit/chromium/src/ContextMenuClientImpl.cpp3
-rw-r--r--WebKit/chromium/src/DebuggerAgentManager.cpp6
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.cpp17
-rw-r--r--WebKit/chromium/src/GraphicsContext3DChromium.cpp (renamed from WebKit/chromium/src/GraphicsContext3D.cpp)11
-rw-r--r--WebKit/chromium/src/IDBCallbacksProxy.cpp7
-rw-r--r--WebKit/chromium/src/IDBCallbacksProxy.h1
-rw-r--r--WebKit/chromium/src/IDBCursorBackendProxy.cpp12
-rw-r--r--WebKit/chromium/src/IDBCursorBackendProxy.h6
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.cpp32
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.h12
-rwxr-xr-xWebKit/chromium/src/IDBFactoryBackendProxy.cpp4
-rwxr-xr-xWebKit/chromium/src/IDBFactoryBackendProxy.h2
-rw-r--r--WebKit/chromium/src/IDBIndexBackendProxy.cpp29
-rw-r--r--WebKit/chromium/src/IDBIndexBackendProxy.h8
-rwxr-xr-xWebKit/chromium/src/IDBObjectStoreProxy.cpp46
-rwxr-xr-xWebKit/chromium/src/IDBObjectStoreProxy.h22
-rw-r--r--WebKit/chromium/src/IDBTransactionBackendProxy.cpp4
-rw-r--r--WebKit/chromium/src/IDBTransactionBackendProxy.h2
-rw-r--r--WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp11
-rw-r--r--WebKit/chromium/src/IDBTransactionCallbacksProxy.h4
-rw-r--r--WebKit/chromium/src/LocalFileSystemChromium.cpp4
-rw-r--r--WebKit/chromium/src/LocalizedStrings.cpp8
-rw-r--r--WebKit/chromium/src/VideoFrameChromiumImpl.cpp7
-rw-r--r--WebKit/chromium/src/VideoFrameChromiumImpl.h1
-rw-r--r--WebKit/chromium/src/WebAccessibilityCacheImpl.cpp18
-rw-r--r--WebKit/chromium/src/WebAccessibilityCacheImpl.h2
-rw-r--r--WebKit/chromium/src/WebBlobData.cpp37
-rw-r--r--WebKit/chromium/src/WebBlobStorageData.cpp113
-rw-r--r--WebKit/chromium/src/WebCache.cpp11
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentImpl.cpp7
-rw-r--r--WebKit/chromium/src/WebDragData.cpp74
-rw-r--r--WebKit/chromium/src/WebElement.cpp5
-rw-r--r--WebKit/chromium/src/WebEntities.cpp15
-rw-r--r--WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp20
-rw-r--r--WebKit/chromium/src/WebFileSystemCallbacksImpl.h7
-rw-r--r--WebKit/chromium/src/WebFontImpl.cpp4
-rw-r--r--WebKit/chromium/src/WebFrameImpl.cpp23
-rw-r--r--WebKit/chromium/src/WebFrameImpl.h5
-rw-r--r--WebKit/chromium/src/WebGeolocationServiceMock.cpp33
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp285
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h11
-rw-r--r--WebKit/chromium/src/WebHTTPBody.cpp11
-rw-r--r--WebKit/chromium/src/WebIDBCallbacksImpl.cpp7
-rw-r--r--WebKit/chromium/src/WebIDBCallbacksImpl.h1
-rw-r--r--WebKit/chromium/src/WebIDBCursorImpl.cpp12
-rw-r--r--WebKit/chromium/src/WebIDBCursorImpl.h7
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseImpl.cpp26
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseImpl.h11
-rwxr-xr-xWebKit/chromium/src/WebIDBFactoryImpl.cpp4
-rwxr-xr-xWebKit/chromium/src/WebIDBFactoryImpl.h2
-rw-r--r--WebKit/chromium/src/WebIDBIndexImpl.cpp16
-rw-r--r--WebKit/chromium/src/WebIDBIndexImpl.h8
-rw-r--r--WebKit/chromium/src/WebIDBKeyRange.cpp11
-rwxr-xr-xWebKit/chromium/src/WebIDBObjectStoreImpl.cpp31
-rwxr-xr-xWebKit/chromium/src/WebIDBObjectStoreImpl.h14
-rw-r--r--WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp9
-rw-r--r--WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h3
-rw-r--r--WebKit/chromium/src/WebMediaPlayerClientImpl.cpp18
-rw-r--r--WebKit/chromium/src/WebMediaPlayerClientImpl.h4
-rw-r--r--WebKit/chromium/src/WebNode.cpp6
-rw-r--r--WebKit/chromium/src/WebNotification.cpp3
-rw-r--r--WebKit/chromium/src/WebPageSerializer.cpp13
-rw-r--r--WebKit/chromium/src/WebPageSerializerImpl.cpp148
-rw-r--r--WebKit/chromium/src/WebPageSerializerImpl.h46
-rw-r--r--WebKit/chromium/src/WebPasswordFormUtils.cpp5
-rw-r--r--WebKit/chromium/src/WebPluginContainerImpl.cpp34
-rw-r--r--WebKit/chromium/src/WebPluginContainerImpl.h2
-rw-r--r--WebKit/chromium/src/WebResourceRawHeaders.cpp87
-rw-r--r--WebKit/chromium/src/WebRuntimeFeatures.cpp4
-rw-r--r--WebKit/chromium/src/WebScriptController.cpp12
-rw-r--r--WebKit/chromium/src/WebSearchableFormData.cpp15
-rwxr-xr-xWebKit/chromium/src/WebThreadSafeData.cpp75
-rw-r--r--WebKit/chromium/src/WebURLRequest.cpp10
-rw-r--r--WebKit/chromium/src/WebURLResponse.cpp10
-rw-r--r--WebKit/chromium/src/WebURLResponsePrivate.h1
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp163
-rw-r--r--WebKit/chromium/src/WebViewImpl.h33
-rw-r--r--WebKit/chromium/src/WebWorkerBase.cpp14
-rw-r--r--WebKit/chromium/src/WebWorkerBase.h2
-rw-r--r--WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp155
-rw-r--r--WebKit/chromium/src/WorkerAsyncFileSystemChromium.h95
-rw-r--r--WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp258
-rw-r--r--WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h50
-rw-r--r--WebKit/chromium/src/gtk/WebInputEventFactory.cpp2
-rw-r--r--WebKit/chromium/src/js/DevTools.js22
-rw-r--r--WebKit/chromium/tests/ArenaTestHelpers.h3
-rw-r--r--WebKit/chromium/tests/IDBKeyPathTest.cpp2
-rw-r--r--WebKit/chromium/tests/KURLTest.cpp9
-rw-r--r--WebKit/chromium/tests/PODIntervalTreeTest.cpp79
-rw-r--r--WebKit/chromium/tests/RunAllTests.cpp12
-rw-r--r--WebKit/chromium/tests/TransparencyWinTest.cpp68
-rw-r--r--WebKit/chromium/tests/WebUnitTests.cpp44
-rw-r--r--WebKit/chromium/tests/WebUnitTests.h44
-rw-r--r--WebKit/efl/CMakeListsEfl.txt10
-rw-r--r--WebKit/efl/ChangeLog233
-rw-r--r--WebKit/efl/DefaultTheme/default.edc3
-rw-r--r--WebKit/efl/DefaultTheme/widget/progressbar/bt_base.pngbin0 -> 952 bytes
-rw-r--r--WebKit/efl/DefaultTheme/widget/progressbar/progressbar.edc108
-rw-r--r--WebKit/efl/DefaultTheme/widget/progressbar/shelf_inset.pngbin0 -> 509 bytes
-rw-r--r--WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp19
-rw-r--r--WebKit/efl/WebCoreSupport/ChromeClientEfl.h2
-rw-r--r--WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp11
-rw-r--r--WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h7
-rw-r--r--WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp6
-rw-r--r--WebKit/efl/ewk/ewk_main.cpp1
-rw-r--r--WebKit/efl/ewk/ewk_private.h8
-rw-r--r--WebKit/efl/ewk/ewk_settings.cpp42
-rw-r--r--WebKit/efl/ewk/ewk_settings.h2
-rw-r--r--WebKit/efl/ewk/ewk_view.cpp230
-rw-r--r--WebKit/efl/ewk/ewk_view.h8
-rw-r--r--WebKit/efl/ewk/ewk_view_single.c2
-rw-r--r--WebKit/gtk/ChangeLog300
-rw-r--r--WebKit/gtk/NEWS14
-rw-r--r--WebKit/gtk/WebCoreSupport/DragClientGtk.cpp43
-rw-r--r--WebKit/gtk/WebCoreSupport/DragClientGtk.h2
-rw-r--r--WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp4
-rw-r--r--WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp9
-rw-r--r--WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp8
-rw-r--r--WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp17
-rw-r--r--WebKit/gtk/docs/webkitgtk-sections.txt24
-rw-r--r--WebKit/gtk/po/ChangeLog19
-rw-r--r--WebKit/gtk/po/GNUmakefile.am23
-rw-r--r--WebKit/gtk/po/sr.po227
-rw-r--r--WebKit/gtk/po/sr@latin.po230
-rw-r--r--WebKit/gtk/tests/testcopyandpaste.c2
-rw-r--r--WebKit/gtk/webkit/webkitdownload.cpp8
-rw-r--r--WebKit/gtk/webkit/webkitsecurityorigin.cpp14
-rw-r--r--WebKit/gtk/webkit/webkitsoupauthdialog.c13
-rw-r--r--WebKit/gtk/webkit/webkitsoupauthdialog.h2
-rw-r--r--WebKit/gtk/webkit/webkitwebdatabase.cpp16
-rw-r--r--WebKit/gtk/webkit/webkitwebinspector.cpp7
-rw-r--r--WebKit/gtk/webkit/webkitwebnavigationaction.cpp10
-rw-r--r--WebKit/gtk/webkit/webkitwebsettings.cpp44
-rw-r--r--WebKit/gtk/webkit/webkitwebview.cpp384
-rw-r--r--WebKit/gtk/webkit/webkitwebview.h116
-rw-r--r--WebKit/gtk/webkit/webkitwebwindowfeatures.cpp2
-rw-r--r--WebKit/mac/ChangeLog396
-rw-r--r--WebKit/mac/Configurations/FeatureDefines.xcconfig7
-rw-r--r--WebKit/mac/Configurations/Version.xcconfig2
-rw-r--r--WebKit/mac/Configurations/WebKit.xcconfig2
-rw-r--r--WebKit/mac/DOM/WebDOMOperations.mm17
-rw-r--r--WebKit/mac/Misc/MailQuirksUserScript.js57
-rw-r--r--WebKit/mac/Misc/WebIconFetcher.h36
-rw-r--r--WebKit/mac/Misc/WebIconFetcher.mm128
-rw-r--r--WebKit/mac/Misc/WebIconFetcherInternal.h42
-rw-r--r--WebKit/mac/Misc/WebKitNSStringExtras.mm2
-rw-r--r--WebKit/mac/Misc/WebNSUserDefaultsExtras.m131
-rw-r--r--WebKit/mac/Misc/WebNSUserDefaultsExtras.mm43
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm4
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.h4
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.mm60
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm14
-rw-r--r--WebKit/mac/Plugins/WebNetscapePluginView.mm4
-rw-r--r--WebKit/mac/Storage/WebDatabaseTrackerClient.mm42
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm11
-rw-r--r--WebKit/mac/WebCoreSupport/WebInspectorClient.mm12
-rw-r--r--WebKit/mac/WebCoreSupport/WebSystemInterface.mm1
-rw-r--r--WebKit/mac/WebCoreSupport/WebViewFactory.mm5
-rw-r--r--WebKit/mac/WebView/WebFrame.mm31
-rw-r--r--WebKit/mac/WebView/WebFramePrivate.h4
-rw-r--r--WebKit/mac/WebView/WebHTMLView.mm54
-rw-r--r--WebKit/mac/WebView/WebHTMLViewInternal.h1
-rw-r--r--WebKit/mac/WebView/WebHTMLViewPrivate.h3
-rw-r--r--WebKit/mac/WebView/WebPreferenceKeysPrivate.h1
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm11
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h3
-rw-r--r--WebKit/mac/WebView/WebSerializedJSValue.mm33
-rw-r--r--WebKit/mac/WebView/WebSerializedJSValuePrivate.h34
-rw-r--r--WebKit/mac/WebView/WebUIDelegatePrivate.h2
-rw-r--r--WebKit/mac/WebView/WebVideoFullscreenController.h3
-rw-r--r--WebKit/mac/WebView/WebVideoFullscreenController.mm26
-rw-r--r--WebKit/mac/WebView/WebView.mm28
-rw-r--r--WebKit/mac/WebView/WebViewData.h2
-rw-r--r--WebKit/mac/WebView/WebViewInternal.h2
-rw-r--r--WebKit/qt/Api/DerivedSources.pro4
-rw-r--r--WebKit/qt/Api/qgraphicswebview.cpp25
-rw-r--r--WebKit/qt/Api/qwebframe.cpp89
-rw-r--r--WebKit/qt/Api/qwebframe_p.h2
-rw-r--r--WebKit/qt/Api/qwebhistory.cpp4
-rw-r--r--WebKit/qt/Api/qwebpage.cpp317
-rw-r--r--WebKit/qt/Api/qwebpage.h19
-rw-r--r--WebKit/qt/Api/qwebpage_p.h40
-rw-r--r--WebKit/qt/Api/qwebsettings.cpp20
-rw-r--r--WebKit/qt/Api/qwebsettings.h3
-rw-r--r--WebKit/qt/ChangeLog582
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.cpp4
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.h2
-rw-r--r--WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp80
-rw-r--r--WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h57
-rw-r--r--WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp75
-rw-r--r--WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h57
-rw-r--r--WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp78
-rw-r--r--WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h57
-rw-r--r--WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp68
-rw-r--r--WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h58
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp17
-rw-r--r--WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h1
-rw-r--r--WebKit/qt/WebCoreSupport/EditorClientQt.cpp34
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp3
-rw-r--r--WebKit/qt/WebCoreSupport/InspectorClientQt.cpp18
-rw-r--r--WebKit/qt/WebCoreSupport/InspectorServerQt.cpp1
-rw-r--r--WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp6
-rw-r--r--WebKit/qt/WebCoreSupport/PageClientQt.cpp25
-rw-r--r--WebKit/qt/WebCoreSupport/PageClientQt.h9
-rw-r--r--WebKit/qt/WebCoreSupport/PopupMenuQt.cpp2
-rw-r--r--WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp6
-rw-r--r--WebKit/qt/symbian/eabi/QtWebKitu.def17
-rw-r--r--WebKit/qt/tests/qwebpage/tst_qwebpage.cpp83
-rw-r--r--WebKit/win/ChangeLog245
-rw-r--r--WebKit/win/FullscreenVideoController.cpp16
-rwxr-xr-xWebKit/win/Interfaces/IWebFramePrivate.idl4
-rw-r--r--WebKit/win/Interfaces/IWebSerializedJSValuePrivate.idl (renamed from WebKit/win/Interfaces/IWebIconFetcher.idl)29
-rw-r--r--WebKit/win/Interfaces/WebKit.idl3
-rw-r--r--WebKit/win/WebCoreSupport/WebContextMenuClient.cpp7
-rw-r--r--WebKit/win/WebCoreSupport/WebDragClient.cpp2
-rw-r--r--WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp4
-rw-r--r--WebKit/win/WebCoreSupport/WebInspectorClient.cpp21
-rw-r--r--WebKit/win/WebDatabaseManager.cpp38
-rw-r--r--WebKit/win/WebFrame.cpp23
-rw-r--r--WebKit/win/WebFrame.h4
-rw-r--r--WebKit/win/WebIconFetcher.cpp129
-rw-r--r--WebKit/win/WebIconFetcher.h52
-rw-r--r--WebKit/win/WebKit.vcproj/Interfaces.vcproj60
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.sln98
-rw-r--r--WebKit/win/WebKit.vcproj/WebKit.vcproj8
-rw-r--r--WebKit/win/WebKitGraphics.cpp2
-rw-r--r--WebKit/win/WebSerializedJSValue.cpp26
-rw-r--r--WebKit/win/WebSerializedJSValue.h4
-rw-r--r--WebKit/win/WebURLProtectionSpace.cpp2
-rw-r--r--[-rwxr-xr-x]WebKit/win/WebView.cpp12
-rw-r--r--[-rwxr-xr-x]WebKit/win/WebView.h0
-rw-r--r--WebKit/wince/ChangeLog11
-rw-r--r--WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp14
-rw-r--r--WebKit/wx/ChangeLog11
-rw-r--r--WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp1
287 files changed, 8699 insertions, 2913 deletions
diff --git a/WebKit/CMakeLists.txt b/WebKit/CMakeLists.txt
index 7de8686..6fb9582 100644
--- a/WebKit/CMakeLists.txt
+++ b/WebKit/CMakeLists.txt
@@ -29,6 +29,7 @@ SET(WebKit_INCLUDE_DIRECTORIES
"${WEBCORE_DIR}/rendering/style"
"${WEBCORE_DIR}/storage"
"${WEBCORE_DIR}/svg"
+ "${WEBCORE_DIR}/svg/properties"
"${JAVASCRIPTCORE_DIR}"
"${JAVASCRIPTCORE_DIR}/ForwardingHeaders"
"${JAVASCRIPTCORE_DIR}/API"
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index 0126336..4c9ebbe 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,67 @@
+2010-10-20 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Not reviewed.
+
+ Fix efl build, add missing svg/properties include directory.
+
+ * CMakeLists.txt:
+
+2010-10-18 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by David Kilzer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47864
+ Convert WebNSUserDefaultsExtras.m to .mm
+
+ * WebKit.xcodeproj/project.pbxproj: Renamed WebNSUserDefaultsExtras.m.
+
+2010-10-12 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (new parser): Leopard/Tiger Mail <head>/<body> quirk is gone
+ https://bugs.webkit.org/show_bug.cgi?id=45693
+
+ * WebKit.xcodeproj/project.pbxproj:
+ - Add the MailQuirksUserScript.js to the project.
+
+2010-10-11 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Remove WebIconFetcher from WebKit and IconFetcher from WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=47523
+
+ Remove all traces of the WebKit WebIconFetcher class. It's SPI that nobody uses.
+
+ * WebKit.xcodeproj/project.pbxproj:
+
+2010-10-07 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add Private API for creating a WebKit1 WebSerializedJSValue from the internal
+ representation of a WebKit2 WebSerializedScriptValue.
+ https://bugs.webkit.org/show_bug.cgi?id=47390
+
+ * WebKit.xcodeproj/project.pbxproj:
+ Add WebSerializedJSValuePrivate.h.
+
+2010-10-05 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Get the link from a plugin when creating a context menu
+ https://bugs.webkit.org/show_bug.cgi?id=47130
+
+ * chromium/public/WebPlugin.h:
+ (WebKit::WebPlugin::linkAtPosition):
+ * chromium/public/WebView.h:
+ * chromium/src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::mouseDidMoveOverElement):
+ * chromium/src/ContextMenuClientImpl.cpp:
+ (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+
2010-09-22 Lucas De Marchi <lucas.demarchi@profusion.mobi>
Unreviewed, EFL build fix.
diff --git a/WebKit/WebKit.xcodeproj/project.pbxproj b/WebKit/WebKit.xcodeproj/project.pbxproj
index a2a6091..3eaa49f 100644
--- a/WebKit/WebKit.xcodeproj/project.pbxproj
+++ b/WebKit/WebKit.xcodeproj/project.pbxproj
@@ -29,9 +29,6 @@
14D8252F0AF955090004F057 /* WebChromeClient.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D8252D0AF955090004F057 /* WebChromeClient.h */; };
14D825300AF955090004F057 /* WebChromeClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = 14D8252E0AF955090004F057 /* WebChromeClient.mm */; };
1A20D08B0ED384F20043FA9F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A20D08A0ED384F20043FA9F /* QuartzCore.framework */; };
- 1A2D754D0DE480B900F0A648 /* WebIconFetcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2D754B0DE480B900F0A648 /* WebIconFetcher.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 1A2D754E0DE480B900F0A648 /* WebIconFetcher.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A2D754C0DE480B900F0A648 /* WebIconFetcher.mm */; };
- 1A2D75500DE4810E00F0A648 /* WebIconFetcherInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2D754F0DE4810E00F0A648 /* WebIconFetcherInternal.h */; };
1A2DBE9F0F251E3A0036F8A6 /* ProxyInstance.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A2DBE9D0F251E3A0036F8A6 /* ProxyInstance.h */; };
1A2DBEA00F251E3A0036F8A6 /* ProxyInstance.mm in Sources */ = {isa = PBXBuildFile; fileRef = 1A2DBE9E0F251E3A0036F8A6 /* ProxyInstance.mm */; };
1A4DF5220EC8C74D006BD4B4 /* WebNetscapePluginView.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A4DF5200EC8C74D006BD4B4 /* WebNetscapePluginView.h */; };
@@ -133,7 +130,7 @@
65E0F88408500917007E5CB9 /* WebNSURLRequestExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 65E0F88208500917007E5CB9 /* WebNSURLRequestExtras.h */; };
65E0F88508500917007E5CB9 /* WebNSURLRequestExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = 65E0F88308500917007E5CB9 /* WebNSURLRequestExtras.m */; };
65E0F9E608500F23007E5CB9 /* WebNSUserDefaultsExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 65E0F9E408500F23007E5CB9 /* WebNSUserDefaultsExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
- 65E0F9E708500F23007E5CB9 /* WebNSUserDefaultsExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = 65E0F9E508500F23007E5CB9 /* WebNSUserDefaultsExtras.m */; };
+ 65E0F9E708500F23007E5CB9 /* WebNSUserDefaultsExtras.mm in Sources */ = {isa = PBXBuildFile; fileRef = 65E0F9E508500F23007E5CB9 /* WebNSUserDefaultsExtras.mm */; };
65EEDE57084FFC9E0002DB25 /* WebNSFileManagerExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = 65EEDE55084FFC9E0002DB25 /* WebNSFileManagerExtras.h */; settings = {ATTRIBUTES = (Private, ); }; };
65EEDE58084FFC9E0002DB25 /* WebNSFileManagerExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = 65EEDE56084FFC9E0002DB25 /* WebNSFileManagerExtras.m */; };
65FFB7FC0AD0B7D30048CD05 /* WebDocumentLoaderMac.h in Headers */ = {isa = PBXBuildFile; fileRef = 65FFB7FA0AD0B7D30048CD05 /* WebDocumentLoaderMac.h */; };
@@ -339,6 +336,7 @@
A70936B00B5608DC00CDB48E /* WebDragClient.mm in Sources */ = {isa = PBXBuildFile; fileRef = A70936AE0B5608DC00CDB48E /* WebDragClient.mm */; };
A7D3C5BC0B5773C5002CA450 /* WebPasteboardHelper.h in Headers */ = {isa = PBXBuildFile; fileRef = A7D3C5BA0B5773C5002CA450 /* WebPasteboardHelper.h */; };
A7D3C5BD0B5773C5002CA450 /* WebPasteboardHelper.mm in Sources */ = {isa = PBXBuildFile; fileRef = A7D3C5BB0B5773C5002CA450 /* WebPasteboardHelper.mm */; };
+ A864B3F6123ED9FA00C2A612 /* MailQuirksUserScript.js in Resources */ = {isa = PBXBuildFile; fileRef = A864B3E5123ED83D00C2A612 /* MailQuirksUserScript.js */; };
AB9FBBBB0F8582B0006ADC43 /* WebDOMOperationsInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = AB9FBBBA0F8582B0006ADC43 /* WebDOMOperationsInternal.h */; };
ABDDF20D08EB0DDC001E1241 /* WebDownloadInternal.h in Headers */ = {isa = PBXBuildFile; fileRef = ABDDF20C08EB0DDC001E1241 /* WebDownloadInternal.h */; };
B6CE5C24100BC5CE00219936 /* WebApplicationCache.mm in Sources */ = {isa = PBXBuildFile; fileRef = B68049720FFBCEC1009F7F62 /* WebApplicationCache.mm */; };
@@ -378,6 +376,7 @@
ED7F6D8B0980683500C235ED /* WebNSDataExtrasPrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = ED7F6D8A0980683500C235ED /* WebNSDataExtrasPrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
EDE983800BCDF5FE00FDAE28 /* WebNSArrayExtras.h in Headers */ = {isa = PBXBuildFile; fileRef = EDE9837E0BCDF5FE00FDAE28 /* WebNSArrayExtras.h */; };
EDE983810BCDF5FE00FDAE28 /* WebNSArrayExtras.m in Sources */ = {isa = PBXBuildFile; fileRef = EDE9837F0BCDF5FE00FDAE28 /* WebNSArrayExtras.m */; };
+ F67DD7E6125E4527007BDCB8 /* WebSerializedJSValuePrivate.h in Headers */ = {isa = PBXBuildFile; fileRef = F67DD7E5125E4527007BDCB8 /* WebSerializedJSValuePrivate.h */; settings = {ATTRIBUTES = (Private, ); }; };
F834AAD70E64B1C700E2737C /* WebTextIterator.h in Headers */ = {isa = PBXBuildFile; fileRef = F834AAD50E64B1C700E2737C /* WebTextIterator.h */; settings = {ATTRIBUTES = (Private, ); }; };
F834AAD80E64B1C700E2737C /* WebTextIterator.mm in Sources */ = {isa = PBXBuildFile; fileRef = F834AAD60E64B1C700E2737C /* WebTextIterator.mm */; };
/* End PBXBuildFile section */
@@ -405,9 +404,6 @@
14D8252D0AF955090004F057 /* WebChromeClient.h */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.c.h; path = WebChromeClient.h; sourceTree = "<group>"; };
14D8252E0AF955090004F057 /* WebChromeClient.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebChromeClient.mm; sourceTree = "<group>"; };
1A20D08A0ED384F20043FA9F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
- 1A2D754B0DE480B900F0A648 /* WebIconFetcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIconFetcher.h; sourceTree = "<group>"; };
- 1A2D754C0DE480B900F0A648 /* WebIconFetcher.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebIconFetcher.mm; sourceTree = "<group>"; };
- 1A2D754F0DE4810E00F0A648 /* WebIconFetcherInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebIconFetcherInternal.h; sourceTree = "<group>"; };
1A2DBE9D0F251E3A0036F8A6 /* ProxyInstance.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProxyInstance.h; sourceTree = "<group>"; };
1A2DBE9E0F251E3A0036F8A6 /* ProxyInstance.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = ProxyInstance.mm; sourceTree = "<group>"; };
1A4DF5200EC8C74D006BD4B4 /* WebNetscapePluginView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebNetscapePluginView.h; sourceTree = "<group>"; };
@@ -561,7 +557,7 @@
65E0F88208500917007E5CB9 /* WebNSURLRequestExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSURLRequestExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
65E0F88308500917007E5CB9 /* WebNSURLRequestExtras.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSURLRequestExtras.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
65E0F9E408500F23007E5CB9 /* WebNSUserDefaultsExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSUserDefaultsExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
- 65E0F9E508500F23007E5CB9 /* WebNSUserDefaultsExtras.m */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.objc; path = WebNSUserDefaultsExtras.m; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+ 65E0F9E508500F23007E5CB9 /* WebNSUserDefaultsExtras.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebNSUserDefaultsExtras.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
65E1150307EFFEBF009B8BF7 /* WebPluginContainerCheck.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebPluginContainerCheck.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
65E1150407EFFEBF009B8BF7 /* WebPluginContainerCheck.mm */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPluginContainerCheck.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
65EEDE55084FFC9E0002DB25 /* WebNSFileManagerExtras.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebNSFileManagerExtras.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -651,6 +647,7 @@
A70936AE0B5608DC00CDB48E /* WebDragClient.mm */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.objcpp; path = WebDragClient.mm; sourceTree = "<group>"; };
A7D3C5BA0B5773C5002CA450 /* WebPasteboardHelper.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebPasteboardHelper.h; sourceTree = "<group>"; };
A7D3C5BB0B5773C5002CA450 /* WebPasteboardHelper.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebPasteboardHelper.mm; sourceTree = "<group>"; };
+ A864B3E5123ED83D00C2A612 /* MailQuirksUserScript.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; path = MailQuirksUserScript.js; sourceTree = "<group>"; };
AB9FBBBA0F8582B0006ADC43 /* WebDOMOperationsInternal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebDOMOperationsInternal.h; sourceTree = "<group>"; };
ABDDF20C08EB0DDC001E1241 /* WebDownloadInternal.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebDownloadInternal.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
B68049710FFBCEC1009F7F62 /* WebApplicationCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebApplicationCache.h; sourceTree = "<group>"; };
@@ -745,6 +742,7 @@
F5F732D202FF4D4F01A80180 /* WebKit.exp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.exports; name = WebKit.exp; path = mac/WebKit.exp; sourceTree = "<group>"; tabWidth = 4; usesTabs = 0; };
F5F81C3902B67C26018635CA /* WebRenderNode.h */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = WebRenderNode.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
F5F81C3A02B67C26018635CA /* WebRenderNode.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = WebRenderNode.mm; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
+ F67DD7E5125E4527007BDCB8 /* WebSerializedJSValuePrivate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebSerializedJSValuePrivate.h; sourceTree = "<group>"; };
F738C9E903FAD3DF0321FBE0 /* JavaScriptCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = JavaScriptCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F738C9EA03FAD3DF0321FBE0 /* WebCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; path = WebCore.framework; sourceTree = BUILT_PRODUCTS_DIR; };
F79B974804019934036909D2 /* CarbonUtils.h */ = {isa = PBXFileReference; fileEncoding = 30; indentWidth = 4; lastKnownFileType = sourcecode.c.h; path = CarbonUtils.h; sourceTree = "<group>"; tabWidth = 8; usesTabs = 0; };
@@ -934,6 +932,7 @@
254DC334016E1D3F0ECA149E /* Misc */ = {
isa = PBXGroup;
children = (
+ A864B3E5123ED83D00C2A612 /* MailQuirksUserScript.js */,
1CCFFD120B1F81F2002EE926 /* OldWebAssertions.c */,
5DE92FEE0BD7017E0059A5FD /* WebAssertions.h */,
5241ADF30B1BC48A004012BD /* WebCache.h */,
@@ -950,9 +949,6 @@
51B2A0FF0ADB15D0002A9BEE /* WebIconDatabaseDelegate.h */,
9304B2FF0B02341500F7850D /* WebIconDatabaseInternal.h */,
F528E3EB031E91AD01CA2ACA /* WebIconDatabasePrivate.h */,
- 1A2D754B0DE480B900F0A648 /* WebIconFetcher.h */,
- 1A2D754C0DE480B900F0A648 /* WebIconFetcher.mm */,
- 1A2D754F0DE4810E00F0A648 /* WebIconFetcherInternal.h */,
2568C72C0174912D0ECA149E /* WebKit.h */,
F5927D4E02D26C5E01CA2DBB /* WebKitErrors.h */,
83730F9803FB1E660004736E /* WebKitErrors.m */,
@@ -1000,7 +996,7 @@
65E0F88208500917007E5CB9 /* WebNSURLRequestExtras.h */,
65E0F88308500917007E5CB9 /* WebNSURLRequestExtras.m */,
65E0F9E408500F23007E5CB9 /* WebNSUserDefaultsExtras.h */,
- 65E0F9E508500F23007E5CB9 /* WebNSUserDefaultsExtras.m */,
+ 65E0F9E508500F23007E5CB9 /* WebNSUserDefaultsExtras.mm */,
F508946902B71D59018A9CD4 /* WebNSViewExtras.h */,
F508946A02B71D59018A9CD4 /* WebNSViewExtras.m */,
9345DDAE0365FB27008635CE /* WebNSWindowExtras.h */,
@@ -1225,6 +1221,7 @@
C0B1F7E710AC8E3100C925D9 /* WebScriptWorldInternal.h */,
BC26C69D10B743F400B687ED /* WebSerializedJSValue.h */,
BC26C6A410B7447A00B687ED /* WebSerializedJSValue.mm */,
+ F67DD7E5125E4527007BDCB8 /* WebSerializedJSValuePrivate.h */,
936A2DE90FD2D08400D312DB /* WebTextCompletionController.h */,
936A2DE70FD2D08000D312DB /* WebTextCompletionController.mm */,
F834AAD50E64B1C700E2737C /* WebTextIterator.h */,
@@ -1508,8 +1505,6 @@
51B2A1000ADB15D0002A9BEE /* WebIconDatabaseDelegate.h in Headers */,
9304B3000B02341500F7850D /* WebIconDatabaseInternal.h in Headers */,
939810190824BF01008DF038 /* WebIconDatabasePrivate.h in Headers */,
- 1A2D754D0DE480B900F0A648 /* WebIconFetcher.h in Headers */,
- 1A2D75500DE4810E00F0A648 /* WebIconFetcherInternal.h in Headers */,
5D7BF8140C2A1D90008CE06D /* WebInspector.h in Headers */,
06693DDC0BFBA85200216072 /* WebInspectorClient.h in Headers */,
7A8FF0D11075024A00A80A08 /* WebInspectorPrivate.h in Headers */,
@@ -1600,6 +1595,7 @@
C0B1F7E810AC8E3100C925D9 /* WebScriptWorld.h in Headers */,
C0B1F7EA10AC8E3100C925D9 /* WebScriptWorldInternal.h in Headers */,
BC26C69E10B743F400B687ED /* WebSerializedJSValue.h in Headers */,
+ F67DD7E6125E4527007BDCB8 /* WebSerializedJSValuePrivate.h in Headers */,
939810270824BF01008DF038 /* WebStringTruncator.h in Headers */,
93EB178F09F88D510091F8FF /* WebSystemInterface.h in Headers */,
936A2DEA0FD2D08400D312DB /* WebTextCompletionController.h in Headers */,
@@ -1674,6 +1670,7 @@
isa = PBXProject;
buildConfigurationList = 149C283208902B0F008A9EFC /* Build configuration list for PBXProject "WebKit" */;
compatibilityVersion = "Xcode 2.4";
+ developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
English,
@@ -1699,6 +1696,7 @@
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
+ A864B3F6123ED9FA00C2A612 /* MailQuirksUserScript.js in Resources */,
939810BA0824BF01008DF038 /* IDNScriptWhiteList.txt in Resources */,
5DE83A7F0D0F7FAD00CAD12A /* Localizable.strings in Resources */,
939810B70824BF01008DF038 /* url_icon.tiff in Resources */,
@@ -1907,7 +1905,6 @@
939810F40824BF01008DF038 /* WebHTMLView.mm in Sources */,
939810C10824BF01008DF038 /* WebIconDatabase.mm in Sources */,
51494CD70C7EBDE0004178C5 /* WebIconDatabaseClient.mm in Sources */,
- 1A2D754E0DE480B900F0A648 /* WebIconFetcher.mm in Sources */,
939810E30824BF01008DF038 /* WebImageRendererFactory.m in Sources */,
5D7BF8150C2A1D90008CE06D /* WebInspector.mm in Sources */,
06693DDD0BFBA85200216072 /* WebInspectorClient.mm in Sources */,
@@ -1951,7 +1948,7 @@
939811190824BF01008DF038 /* WebNSPrintOperationExtras.m in Sources */,
939811120824BF01008DF038 /* WebNSURLExtras.mm in Sources */,
65E0F88508500917007E5CB9 /* WebNSURLRequestExtras.m in Sources */,
- 65E0F9E708500F23007E5CB9 /* WebNSUserDefaultsExtras.m in Sources */,
+ 65E0F9E708500F23007E5CB9 /* WebNSUserDefaultsExtras.mm in Sources */,
939810C90824BF01008DF038 /* WebNSViewExtras.m in Sources */,
939810CA0824BF01008DF038 /* WebNSWindowExtras.m in Sources */,
939810D00824BF01008DF038 /* WebPanelAuthenticationHandler.m in Sources */,
diff --git a/WebKit/cf/ChangeLog b/WebKit/cf/ChangeLog
index 957dce1..1efdd4d 100644
--- a/WebKit/cf/ChangeLog
+++ b/WebKit/cf/ChangeLog
@@ -1,3 +1,13 @@
+2010-10-18 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ Web Inspector: [crash] when Inspector Open in CSSStyleSelector::loadPendingImages().
+ https://bugs.webkit.org/show_bug.cgi?id=46224
+
+ * WebCoreSupport/WebInspectorClientCF.cpp:
+ (WebInspectorClient::sendMessageToFrontend):
+
2010-06-14 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Pavel Feldman.
diff --git a/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp b/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
index dc5a186..62fdd4d 100644
--- a/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
+++ b/WebKit/cf/WebCoreSupport/WebInspectorClientCF.cpp
@@ -102,20 +102,5 @@ void WebInspectorClient::releaseFrontendPage()
bool WebInspectorClient::sendMessageToFrontend(const String& message)
{
- if (!m_frontendPage)
- return false;
-
- Frame* frame = m_frontendPage->mainFrame();
- if (!frame)
- return false;
-
- ScriptController* scriptController = frame->script();
- if (!scriptController)
- return false;
-
- String dispatchToFrontend("WebInspector.dispatchMessageFromBackend(");
- dispatchToFrontend += message;
- dispatchToFrontend += ");";
- scriptController->executeScript(dispatchToFrontend);
- return true;
+ return doDispatchMessageOnFrontendPage(m_frontendPage, message);
}
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index a28517a..bd2faa8 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,1746 @@
+2010-10-20 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r70165.
+ http://trac.webkit.org/changeset/70165
+ https://bugs.webkit.org/show_bug.cgi?id=48007
+
+ It broke tests on Qt bot (Requested by Ossy on #webkit).
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::executeScript):
+ (WebKit::WebFrameImpl::executeScriptInIsolatedWorld):
+ (WebKit::WebFrameImpl::executeScriptAndReturnValue):
+
+2010-10-20 Peter Rybin <peter.rybin@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ HTML parser should provide script column position within HTML document to JavaScript engine
+ https://bugs.webkit.org/show_bug.cgi?id=45271
+
+ Replaces script line number with TextPosition structure.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::executeScript):
+ (WebKit::WebFrameImpl::executeScriptInIsolatedWorld):
+ (WebKit::WebFrameImpl::executeScriptAndReturnValue):
+
+2010-10-20 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Fix crash when mousing over scrollview
+ https://bugs.webkit.org/show_bug.cgi?id=47956
+
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::mouseDidMoveOverElement):
+ * src/ChromiumBridge.cpp:
+ (WebCore::ChromiumBridge::pluginScriptableObject):
+ * src/ContextMenuClientImpl.cpp:
+ (WebKit::ContextMenuClientImpl::getCustomMenuFromDefaultItems):
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::redirectDataToPlugin):
+ * src/WebPluginContainerImpl.h:
+ (WebKit::WebPluginContainerImpl::isPluginContainer):
+
+2010-10-20 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r70149.
+ http://trac.webkit.org/changeset/70149
+ https://bugs.webkit.org/show_bug.cgi?id=47989
+
+ "Build breaks in mac and win" (Requested by satish on
+ #webkit).
+
+ * public/WebSpeechInputController.h:
+ (WebKit::WebSpeechInputController::startRecognition):
+ * public/WebSpeechInputControllerMock.h:
+ * src/SpeechInputClientImpl.cpp:
+ (WebKit::SpeechInputClientImpl::startRecognition):
+ * src/SpeechInputClientImpl.h:
+ * src/WebSpeechInputControllerMockImpl.cpp:
+ (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult):
+ (WebKit::WebSpeechInputControllerMockImpl::startRecognition):
+ * src/WebSpeechInputControllerMockImpl.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+
+2010-10-19 Leandro Gracia Gil <leandrogracia@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ Patch the current speech input implementation to use and validate the
+ nearest language tag. The language is now passed to the startRecognition
+ methods so that language-specific recognition could be used. Also added
+ a second parameter to setMockSpeechInputResult for the language used in
+ speech recognition.
+ https://bugs.webkit.org/show_bug.cgi?id=47089
+
+ This is the 2nd of a 4-sided patch in Chromium and WebKit. For more
+ details see http://codereview.chromium.org/3615005/show and
+ http://codereview.chromium.org/3595018/show.
+
+ * public/WebSpeechInputController.h:
+ (WebKit::WebSpeechInputController::startRecognition):
+ * public/WebSpeechInputControllerMock.h:
+ * src/SpeechInputClientImpl.cpp:
+ (WebKit::SpeechInputClientImpl::create):
+ (WebKit::SpeechInputClientImpl::startRecognition):
+ * src/SpeechInputClientImpl.h:
+ * src/WebSpeechInputControllerMockImpl.cpp:
+ (WebKit::WebSpeechInputControllerMockImpl::setMockRecognitionResult):
+ (WebKit::WebSpeechInputControllerMockImpl::startRecognition):
+ * src/WebSpeechInputControllerMockImpl.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+
+2010-10-20 Dirk Schulze <krit@webkit.org>
+
+ Unreviewed Chromium win build fix.
+
+ * tests/TransparencyWinTest.cpp:
+ (WebCore::TEST):
+
+2010-10-20 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Merge ColorSpace and ImageColorSpace enums
+ https://bugs.webkit.org/show_bug.cgi?id=47922
+
+ Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
+ to follow webkit style rules.
+
+ * src/WebFontImpl.cpp:
+ (WebKit::WebFontImpl::drawText):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::paintWithContext):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::doPixelReadbackToCanvas):
+ * tests/TransparencyWinTest.cpp:
+ (WebCore::TEST):
+
+2010-10-19 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: expose request/response cookies in HAR
+ https://bugs.webkit.org/show_bug.cgi?id=47894
+
+ * src/WebResourceRawHeaders.cpp:
+ (WebKit::addHeader): paste coalescent headers using "\n: as a separator instead of ", "
+
+2010-10-19 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] Use webkit's TestNetscapePlugIn in DRT mac
+ https://bugs.webkit.org/show_bug.cgi?id=47850
+
+ * WebKit.gyp: Copy WebKitTestPlugIn into plugins and add
+ GCC_SYMBOLS_PRIVATE_EXTERN: NO to export the symbols.
+
+2010-10-19 Tony Chang <tony@chromium.org>
+
+ Unreviewed. Rolling chromium DEPS to 63057 to pick up mac plugin
+ loading in DRT.
+
+ * DEPS: bump chromium DEPS to 63057.
+
+2010-10-19 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] DumpRenderTree shouldn't put '.' in include path
+ https://bugs.webkit.org/show_bug.cgi?id=47877
+
+ * WebKit.gyp: Replace '.' with <(chromium_src_dir) and add public
+
+2010-10-18 Adrienne Walker <enne@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Turn off antialiasing when using Mesa during testing.
+ https://bugs.webkit.org/show_bug.cgi?id=47697
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::validateAttributes):
+
+2010-10-18 James Robinson <jamesr@chromium.org>
+
+ Update the chromium DEPS from 62399 to 62813 to pick up skia fixes
+
+ * DEPS:
+
+2010-10-17 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Introduce InspectorResourceAgent.h/cpp and ResourceManager.js to
+ fill network panel with data.
+ https://bugs.webkit.org/show_bug.cgi?id=47779
+
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::didReceiveResponse):
+
+2010-10-17 Pascal Massimino <pascal.massimino@gmail.com>
+
+ Reviewed by Adam Barth.
+
+ Add support for WebP image decoding in ImageDecoder
+ using library libwebp-decode library available from
+ http://www.webmproject.org/code/
+
+ https://bugs.webkit.org/show_bug.cgi?id=47512
+
+ Tests: fast/images/webp-image-decoding.html
+
+ * CMakeLists.txt:
+ add platform/image-decoders/webp files and directory
+ * GNUmakefile.am:
+ add platform/image-decoders/webp directory
+ * WebCore.gyp/WebCore.gyp:
+ add platform/image-decoders/webp directory
+ * WebCore.gypi:
+ add platform/image-decoders/webp directory
+ * features.gypi:
+ add WTF_USE_WEBP=1
+ * platform/image-decoders/ImageDecoder.cpp:
+ (WebCore::ImageDecoder::create):
+ instantiate webp decoder for file starting with 'RIFF????WEBP'
+ * platform/image-decoders/webp: Added.
+ * platform/image-decoders/webp/WEBPImageDecoder.cpp: Added.
+ (WebCore::WEBPImageDecoder::WEBPImageDecoder):
+ (WebCore::WEBPImageDecoder::~WEBPImageDecoder):
+ (WebCore::WEBPImageDecoder::isSizeAvailable):
+ (WebCore::WEBPImageDecoder::frameBufferAtIndex):
+ (WebCore::WEBPImageDecoder::decode):
+ sub-class handling decoding of webp images
+ * platform/image-decoders/webp/WEBPImageDecoder.h: Added.
+ (WebCore::WEBPImageDecoder::filenameExtension):
+ (WebCore::WEBPImageDecoder::supportsAlpha):
+ header for webp-decoder sub-class
+
+2010-10-15 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] compile TestNetscapePlugIn on Chromium mac
+ https://bugs.webkit.org/show_bug.cgi?id=47633
+
+ * WebKit.gyp: Add a mac specific target for compiling TestNetscapePlugIn
+ Fix an include dir so we can compile in a chromium checkout.
+
+2010-10-15 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r69809.
+ http://trac.webkit.org/changeset/69809
+ https://bugs.webkit.org/show_bug.cgi?id=47725
+
+ Broke chromium mac compile (Requested by japhet on #webkit).
+
+ * WebKit.gyp:
+
+2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Replace some String::format() usages by StringConcatenate in WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=47714
+
+ * src/BackForwardListClientImpl.cpp:
+ (WebKit::BackForwardListClientImpl::itemAtIndex):
+ * src/DebuggerAgentManager.cpp:
+ (WebKit::DebuggerAgentManager::debugDetach):
+ * src/LocalizedStrings.cpp:
+ (WebCore::imageTitle):
+ * src/WebPageSerializer.cpp:
+ (WebKit::WebPageSerializer::generateMetaCharsetDeclaration):
+ (WebKit::WebPageSerializer::generateBaseTagDeclaration):
+
+2010-10-14 Wei Jia <wjia@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Retrieve info of lock keys from stashed currentInputEvent which
+ is stored by chromium when it passes input event to WebCore.
+ Retrieving only when stashed event is a keyboard event, which
+ means synthetic KeyboardEvent inherits lock key state from real
+ keyboard event.
+ https://bugs.webkit.org/show_bug.cgi?id=46518
+
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::handleKeyboardEvent):
+
+2010-10-14 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] null check the widget before sending it data as calling didReceiveData might delete it
+ https://bugs.webkit.org/show_bug.cgi?id=47708
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::committedLoad):
+
+2010-10-14 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] compile TestNetscapePlugIn on Chromium mac
+ https://bugs.webkit.org/show_bug.cgi?id=47633
+
+ * WebKit.gyp: Add a mac specific target for compiling TestNetscapePlugIn
+
+2010-10-13 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Jian Li.
+
+ [Chromium] Enable FILE_SYSTEM by default for chromium
+ https://bugs.webkit.org/show_bug.cgi?id=47639
+
+ * features.gypi: Add FILE_SYSTEM=1. Also remove FILE_READER=1
+ as it seems to be not used anymore.
+
+2010-10-13 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Nate Chapin.
+
+ IndexedDB should fire some errors synchronously
+ https://bugs.webkit.org/show_bug.cgi?id=47530
+
+ * public/WebIDBCursor.h:
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::transaction):
+ * public/WebIDBFactory.h:
+ (WebKit::WebIDBFactory::open):
+ * public/WebIDBObjectStore.h:
+ * public/WebIDBTransactionCallbacks.h:
+ * src/IDBCursorBackendProxy.cpp:
+ (WebCore::IDBCursorBackendProxy::update):
+ (WebCore::IDBCursorBackendProxy::continueFunction):
+ (WebCore::IDBCursorBackendProxy::remove):
+ * src/IDBCursorBackendProxy.h:
+ * src/IDBDatabaseProxy.cpp:
+ (WebCore::IDBDatabaseProxy::createObjectStore):
+ (WebCore::IDBDatabaseProxy::removeObjectStore):
+ (WebCore::IDBDatabaseProxy::setVersion):
+ (WebCore::IDBDatabaseProxy::transaction):
+ * src/IDBDatabaseProxy.h:
+ * src/IDBIndexBackendProxy.cpp:
+ (WebCore::IDBIndexBackendProxy::openCursor):
+ (WebCore::IDBIndexBackendProxy::openKeyCursor):
+ (WebCore::IDBIndexBackendProxy::get):
+ (WebCore::IDBIndexBackendProxy::getKey):
+ * src/IDBIndexBackendProxy.h:
+ * src/IDBObjectStoreProxy.cpp:
+ (WebCore::IDBObjectStoreProxy::get):
+ (WebCore::IDBObjectStoreProxy::put):
+ (WebCore::IDBObjectStoreProxy::remove):
+ (WebCore::IDBObjectStoreProxy::createIndex):
+ (WebCore::IDBObjectStoreProxy::index):
+ (WebCore::IDBObjectStoreProxy::removeIndex):
+ (WebCore::IDBObjectStoreProxy::openCursor):
+ * src/IDBObjectStoreProxy.h:
+ * src/WebIDBCursorImpl.cpp:
+ (WebKit::WebIDBCursorImpl::update):
+ (WebKit::WebIDBCursorImpl::continueFunction):
+ (WebKit::WebIDBCursorImpl::remove):
+ * src/WebIDBCursorImpl.h:
+ * src/WebIDBDatabaseImpl.cpp:
+ (WebKit::WebIDBDatabaseImpl::createObjectStore):
+ (WebKit::WebIDBDatabaseImpl::removeObjectStore):
+ (WebKit::WebIDBDatabaseImpl::setVersion):
+ (WebKit::WebIDBDatabaseImpl::transaction):
+ * src/WebIDBDatabaseImpl.h:
+ * src/WebIDBIndexImpl.cpp:
+ (WebKit::WebIDBIndexImpl::openObjectCursor):
+ (WebKit::WebIDBIndexImpl::openKeyCursor):
+ (WebKit::WebIDBIndexImpl::getObject):
+ (WebKit::WebIDBIndexImpl::getKey):
+ * src/WebIDBIndexImpl.h:
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::get):
+ (WebKit::WebIDBObjectStoreImpl::put):
+ (WebKit::WebIDBObjectStoreImpl::remove):
+ (WebKit::WebIDBObjectStoreImpl::createIndex):
+ (WebKit::WebIDBObjectStoreImpl::index):
+ (WebKit::WebIDBObjectStoreImpl::removeIndex):
+ (WebKit::WebIDBObjectStoreImpl::openCursor):
+ * src/WebIDBObjectStoreImpl.h:
+
+2010-10-13 Brett Wilson <brettw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Save and restore the GraphicsContext around setting the clip rect for
+ drawing text.
+ https://bugs.webkit.org/show_bug.cgi?id=47634
+
+ * src/WebFontImpl.cpp:
+ (WebKit::WebFontImpl::drawText):
+
+2010-10-13 Kenneth Russell <kbr@google.com>
+
+ Reviewed by James Robinson.
+
+ Revert changes to WebViewImpl in r69633
+ https://bugs.webkit.org/show_bug.cgi?id=47610
+
+ Revert change to WebViewImpl.cpp in
+ http://trac.webkit.org/changeset/69633 which incorrectly used
+ PassRefPtr for a local variable instead of RefPtr. This was a fix
+ for changes in http://trac.webkit.org/changeset/69619 and
+ http://trac.webkit.org/changeset/69624 .
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+
+2010-10-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ Bug 43987 - Downloading using XHR is much slower than before
+
+ * src/WebPageSerializerImpl.cpp:
+ (WebKit::WebPageSerializerImpl::encodeAndFlushBuffer):
+
+2010-10-13 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Tony Chang.
+
+ [Chromium] Clean up WebPageSerializerImpl::serialize
+ https://bugs.webkit.org/show_bug.cgi?id=47577
+
+ This patch shouldn't have any behavior change. I'm just trying to
+ understand what this code does.
+
+ * src/WebPageSerializerImpl.cpp:
+ (WebKit::WebPageSerializerImpl::saveHTMLContentToBuffer):
+ (WebKit::WebPageSerializerImpl::encodeAndFlushBuffer):
+ (WebKit::WebPageSerializerImpl::serialize):
+ * src/WebPageSerializerImpl.h:
+
+2010-10-13 John Knottenbelt <jknotten@chromium.org>
+
+ Reviewed by Steve Block.
+
+ First step towards client-based Geolocation in Chromium. Build
+ fixes for CLIENT_BASED_GEOLOCATION preprocessor feature define.
+ https://bugs.webkit.org/show_bug.cgi?id=47586
+
+ * WebKit.gyp:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame):
+ (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame):
+ * src/ChromiumBridge.cpp:
+ * src/WebGeolocationServiceMock.cpp:
+ (WebKit::WebGeolocationServiceMock::createWebGeolocationServiceMock):
+ (WebKit::WebGeolocationServiceMock::setMockGeolocationPermission):
+ (WebKit::WebGeolocationServiceMock::setMockGeolocationPosition):
+ (WebKit::WebGeolocationServiceMock::setMockGeolocationError):
+
+2010-10-11 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ [Chromium] Cleanup WebIDBFactory::open once the Chromium plumbing has landed.
+ https://bugs.webkit.org/show_bug.cgi?id=47531
+
+ Remove the temporary open() method since the appropriate Chromium plumbing was
+ added in http://codereview.chromium.org/3729003/
+
+ * public/WebIDBFactory.h:
+ (WebKit::WebIDBFactory::open):
+
+2010-10-13 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Clean up SerializeDomParam
+ https://bugs.webkit.org/show_bug.cgi?id=47580
+
+ This patch just renames a bunch of the members of this struct to be
+ more sensible. No behavior change, well, except for one struct member
+ that wasn't initialized. I didn't trace through this code to see if
+ the uninitialized value was used anywhere, but initializing all the
+ values seems like a good idea.
+
+ * src/WebPageSerializerImpl.cpp:
+ (WebKit::WebPageSerializerImpl::SerializeDomParam::SerializeDomParam):
+ (WebKit::WebPageSerializerImpl::preActionBeforeSerializeOpenTag):
+ (WebKit::WebPageSerializerImpl::postActionAfterSerializeOpenTag):
+ (WebKit::WebPageSerializerImpl::postActionAfterSerializeEndTag):
+ (WebKit::WebPageSerializerImpl::encodeAndFlushBuffer):
+ (WebKit::WebPageSerializerImpl::openTagToString):
+ (WebKit::WebPageSerializerImpl::endTagToString):
+ (WebKit::WebPageSerializerImpl::buildContentForNode):
+ * src/WebPageSerializerImpl.h:
+
+2010-10-13 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: stack information is inconsistent between console.trace and runtime errors.
+ https://bugs.webkit.org/show_bug.cgi?id=47252
+
+ * DEPS: bump up V8 revision
+
+2010-10-12 Kenneth Russell <kbr@google.com>
+
+ Unreviewed. Fixes for all WebGL content causing assertion failures
+ in Chromium after http://trac.webkit.org/changeset/69619 and
+ http://trac.webkit.org/changeset/69624 .
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3D::create):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+
+2010-10-12 Alok priyadarshi <alokp@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ Remove support for ANGLE SH_VERSION <= 100
+ https://bugs.webkit.org/show_bug.cgi?id=47307
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::angleCreateCompilers):
+ (WebKit::WebGraphicsContext3DDefaultImpl::angleValidateShaderSource):
+
+2010-10-12 James Robinson <jamesr@chromium.org>
+
+ Unreviewed chromium compile fixes for http://trac.webkit.org/changeset/69619.
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3D::create):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+ * src/WebViewImpl.h:
+
+2010-10-12 Jian Li <jianli@chromium.org>
+
+ Unreviewed. Bump up revision in order to pick up fix.
+
+ * DEPS:
+
+2010-10-12 Jian Li <jianli@chromium.org>
+
+ Unreview. Build fix for chromium.
+
+ * public/WebBlobRegistry.h:
+
+2010-10-12 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Update WebBlobData to adapt to BlobData change in terms of
+ handling string data item.
+ https://bugs.webkit.org/show_bug.cgi?id=47423
+
+ Also remove unneeded methods in WebBlobData. WebBlobStorageData.* are
+ also removed since they're not longer needed.
+
+ * WebKit.gyp:
+ * public/WebBlobData.h:
+ * public/WebBlobRegistry.h:
+ * public/WebBlobStorageData.h: Removed.
+ * public/WebThreadSafeData.h: Added.
+ * src/WebBlobData.cpp:
+ * src/WebBlobStorageData.cpp: Removed.
+ * src/WebThreadSafeData.cpp: Added.
+
+2010-10-12 Kavita Kanetkar <kkanetkar@chromium.org>
+
+ Reviewed by Dumitru Daniliuc.
+
+ [FileSystem] Add ability to pass a bool to create or not create root path while opening filesystem.
+ https://bugs.webkit.org/show_bug.cgi?id=47519
+
+ * public/WebCommonWorkerClient.h:
+ (WebKit::WebCommonWorkerClient::openFileSystem):
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::openFileSystem):
+
+2010-10-12 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Nate Chapin (in person).
+
+ Fix chromium compile.
+
+ * src/WebPageSerializerImpl.cpp:
+ (WebKit::WebPageSerializerImpl::WebPageSerializerImpl):
+ (WebKit::WebPageSerializerImpl::serialize):
+
+2010-10-12 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Gavin Barraclough.
+
+ Unify JSC::StringBuilder & WebCore::StringBuilder
+ https://bugs.webkit.org/show_bug.cgi?id=47538
+
+ * src/LocalizedStrings.cpp:
+ (WebCore::imageTitle): Use WTF::StringBuilder.
+ * src/WebEntities.cpp:
+ (WebKit::WebEntities::convertEntitiesInString): Ditto.
+ * src/WebPageSerializerImpl.cpp: Remove useless includes.
+ (WebKit::WebPageSerializerImpl::encodeAndFlushBuffer):
+ * src/WebPageSerializerImpl.h: Use WTF::StringBuilder.
+
+2010-10-07 Stephen White <senorblanco@chromium.org>
+
+ Reviewed by James Robinson.
+
+ [chromium] Zero-out all textures created via WebGraphicsContext3DDefaultImpl::texImage2D().
+ https://bugs.webkit.org/show_bug.cgi?id=47178
+
+ Covered by fast/canvas/toDataURL-alpha.html, when run with --accelerated-2d-canvas.
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::bytesPerComponent):
+ (WebKit::componentsPerPixel):
+ (WebKit::imageSizeInBytes):
+ (WebKit::WebGraphicsContext3DDefaultImpl::texImage2D):
+
+2010-10-12 Dave Moore <davemoore@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ Use new WebThemeEngine api on chromium / linux to draw scrollbars.
+ https://bugs.webkit.org/show_bug.cgi?id=47473
+
+ * public/WebThemeEngine.h: Removed.
+ * chromium/src/ChromiumBridge.cpp:
+
+2010-10-11 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Prepare Clipboard/DragData for transition to new drag-and-drop interface.
+ https://bugs.webkit.org/show_bug.cgi?id=44992
+
+ Add a new entry point for drag in to allow a graceful transition
+ from the legacy drag and drop model, where all data is copied in at the
+ beginning of a drag, to a model where data is retrieved on demand via
+ IPCs. The rationale for this is when we begin supporting arbitrary MIME
+ types in dataTransfer, we don't want to be copying aribtrary amounts of
+ data over for each start drag IPC.
+
+ * public/WebView.h:
+ * src/WebDragData.cpp:
+ (WebKit::WebDragData::initialize): Use the legacy data object.
+ (WebKit::WebDragData::ensureMutable): Change the if to an ASSERT.
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::dragTargetDragEnterNew): New entry point.
+ * src/WebViewImpl.h:
+
+2010-10-11 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Nate Chapin.
+
+ [Chromium] Add plumbing for synchronous indexedDB exceptions
+ https://bugs.webkit.org/show_bug.cgi?id=47511
+
+ Add a WebExceptionCode file (already run by fishd) and add versions of
+ each applicable method that take such a parameter. A follow up patch
+ will be posted with the meat.
+
+ * WebKit.gyp:
+ * public/WebExceptionCode.h: Added.
+ * public/WebIDBCursor.h:
+ (WebKit::WebIDBCursor::update):
+ (WebKit::WebIDBCursor::continueFunction):
+ (WebKit::WebIDBCursor::remove):
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::objectStore):
+ (WebKit::WebIDBDatabase::createObjectStore):
+ (WebKit::WebIDBDatabase::removeObjectStore):
+ (WebKit::WebIDBDatabase::setVersion):
+ (WebKit::WebIDBDatabase::transaction):
+ * public/WebIDBIndex.h:
+ (WebKit::WebIDBIndex::openObjectCursor):
+ (WebKit::WebIDBIndex::openKeyCursor):
+ (WebKit::WebIDBIndex::getObject):
+ (WebKit::WebIDBIndex::getKey):
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::get):
+ (WebKit::WebIDBObjectStore::put):
+ (WebKit::WebIDBObjectStore::remove):
+ (WebKit::WebIDBObjectStore::createIndex):
+ (WebKit::WebIDBObjectStore::index):
+ (WebKit::WebIDBObjectStore::removeIndex):
+ (WebKit::WebIDBObjectStore::openCursor):
+
+2010-10-11 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ The names of IndexedDB-specific attributes of DOMWindow should be prefixed with 'webkit'.
+ https://bugs.webkit.org/show_bug.cgi?id=47508
+
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableIndexedDatabase):
+ (WebKit::WebRuntimeFeatures::isIndexedDatabaseEnabled):
+
+2010-10-11 Tony Chang <tony@chromium.org>
+
+ Unreviewed, roll chromium DEPS to pick up Dave's fix for
+ scrollbar painting. This will be needed by an upcoming patch.
+
+ * DEPS:
+
+2010-10-11 Kinuko Yasuda <kinuko@google.com>
+
+ Reviewed by David Levin.
+
+ Support DirectoryEntry.removeRecursively for FileSystem API
+ https://bugs.webkit.org/show_bug.cgi?id=47400
+
+ * src/AsyncFileSystemChromium.cpp:
+ (WebCore::AsyncFileSystemChromium::removeRecursively): Added.
+ * src/AsyncFileSystemChromium.h:
+ * src/WorkerAsyncFileSystemChromium.cpp:
+ (WebCore::WorkerAsyncFileSystemChromium::removeRecursively): Added.
+ * src/WorkerAsyncFileSystemChromium.h:
+ * src/WorkerFileSystemCallbacksBridge.cpp:
+ (WebKit::WorkerFileSystemCallbacksBridge::postRemoveRecursivelyToMainThread): Added.
+ (WebKit::WorkerFileSystemCallbacksBridge::removeRecursivelyOnMainThread): Added.
+ * src/WorkerFileSystemCallbacksBridge.h:
+
+2010-10-09 Varun Jain <varunjain@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Adding one method to the WebView interface: method to inform the
+ renderer to scroll the currently focused element into view, for
+ instance, when it is hidden due to window resizing.
+ Also adding methods to WebNode and WebElement to expose more
+ features of the underlying WebCore::Node.
+ https://bugs.webkit.org/show_bug.cgi?id=46296
+
+ * public/WebElement.h:
+ * public/WebNode.h:
+ * public/WebView.h:
+ * src/WebElement.h:
+ (WebKit::WebElement::isTextFormControlElement):
+ * src/WebNode.cpp:
+ (WebKit::WebNode::isContentEditable):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::scrollFocusedNodeIntoView):
+ * src/WebViewImpl.h:
+
+2010-10-08 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ [Chromium] IDBFactory::open only works in single process mode.
+ https://bugs.webkit.org/show_bug.cgi?id=47444
+
+ * public/WebIDBFactory.h:
+ (WebKit::WebIDBFactory::open):
+
+2010-10-08 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ IndexedDB does not have a quota mechanism.
+ https://bugs.webkit.org/show_bug.cgi?id=47389
+
+ * public/WebIDBFactory.h:
+ (WebKit::WebIDBFactory::open):
+ * src/IDBFactoryBackendProxy.cpp:
+ (WebCore::IDBFactoryBackendProxy::open):
+ * src/IDBFactoryBackendProxy.h:
+ * src/WebIDBFactoryImpl.cpp:
+ (WebKit::WebIDBFactoryImpl::open):
+ * src/WebIDBFactoryImpl.h:
+
+2010-10-07 Zhenyao Mo <zmo@google.com>
+
+ Unreviewed, roll chromium to r61902.
+
+ * DEPS:
+
+2010-10-07 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Tony Chang.
+
+ Copy mesa lib into DumpRenderTree bundle in Mac
+ https://bugs.webkit.org/show_bug.cgi?id=47385
+
+ * WebKit.gyp:
+
+2010-10-07 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Minor naming cleanup in WebDragData, part 2
+ https://bugs.webkit.org/show_bug.cgi?id=47227
+
+ Chromium no longer uses the deprecated methods, so delete them.
+
+ * DEPS:
+ * public/WebDragData.h:
+ * src/WebDragData.cpp:
+
+2010-10-07 Dave Moore <davemoore@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ Add WebThemeEngine api for chromium/linux
+ https://bugs.webkit.org/show_bug.cgi?id=47278
+ Create new linux specific version of WinThemeEngine.h and move
+ existing windows specific one to win directory. Keep old top
+ level file until chromium is updated to use the new ones.
+
+ * WebKit.gyp:
+ * public/WebThemeEngine.h:
+ * src/ChromiumBridge.cpp:
+
+2010-10-07 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Chromium multi-dll build broken due to WebResourceRawHeaders methods lacking WEBKIT_API decl spec
+ https://bugs.webkit.org/show_bug.cgi?id=47329
+
+ * public/WebResourceRawHeaders.h:
+ (WebKit::WebResourceRawHeaders::WebResourceRawHeaders):
+ (WebKit::WebResourceRawHeaders::~WebResourceRawHeaders):
+ (WebKit::WebResourceRawHeaders::operator =):
+ * src/WebResourceRawHeaders.cpp:
+ (WebKit::WebResourceRawHeaders::initialize):
+ (WebKit::WebResourceRawHeaders::reset):
+ (WebKit::WebResourceRawHeaders::assign):
+
+2010-10-06 Chris Guillory <chris.guillory@google.com>
+
+ Reviewed by Chris Fleizach.
+
+ Remove unused accessibility functions from webkit.
+ https://bugs.webkit.org/attachment.cgi?bugid=46707
+
+ * public/WebAccessibilityCache.h:
+ * public/WebViewClient.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::focusedNodeChanged):
+ * src/WebAccessibilityCacheImpl.cpp:
+ * src/WebAccessibilityCacheImpl.h:
+
+2010-10-06 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add FileSystemSync implementation for Worker
+ https://bugs.webkit.org/show_bug.cgi?id=47044
+
+ * src/LocalFileSystemChromium.cpp:
+ (WebCore::LocalFileSystem::requestFileSystem): Added a new parameter
+ for synchronous mode.
+ * src/WebFileSystemCallbacksImpl.cpp:
+ (WebKit::WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl): Added
+ a parameter for synchronous mode.
+ (WebKit::WebFileSystemCallbacksImpl::didOpenFileSystem): Changed to
+ creates WorkerAsyncFileSystemChromium with synchronous flag.
+ * src/WebFileSystemCallbacksImpl.h:
+ * src/WebWorkerBase.cpp:
+ (WebKit::WebWorkerBase::openFileSystem): Added a parameter for
+ synchronous mode.
+ * src/WebWorkerBase.h:
+ * src/WorkerAsyncFileSystemChromium.cpp:
+ (WebCore::WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium):
+ (WebCore::WorkerAsyncFileSystemChromium::waitForOperationToComplete):
+ Added.
+ (WebCore::WorkerAsyncFileSystemChromium::move):
+ (WebCore::WorkerAsyncFileSystemChromium::copy):
+ (WebCore::WorkerAsyncFileSystemChromium::remove):
+ (WebCore::WorkerAsyncFileSystemChromium::readMetadata):
+ (WebCore::WorkerAsyncFileSystemChromium::createFile):
+ (WebCore::WorkerAsyncFileSystemChromium::createDirectory):
+ (WebCore::WorkerAsyncFileSystemChromium::fileExists):
+ (WebCore::WorkerAsyncFileSystemChromium::directoryExists):
+ (WebCore::WorkerAsyncFileSystemChromium::readDirectory):
+ (WebCore::WorkerAsyncFileSystemChromium::createWorkerFileSystemCallbacksBridge):
+ Updated to store the created bridge in a member variable so that
+ we can call bridge->stop() later when the RunLoop is terminating.
+ * src/WorkerAsyncFileSystemChromium.h:
+ (WebCore::WorkerAsyncFileSystemChromium::create): Added a new
+ parameter for synchronous mode.
+
+2010-10-06 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ IDBDatabase and IDBObjectStore metadata is not recovered correctly when the setVersion transactions aborts.
+ https://bugs.webkit.org/show_bug.cgi?id=47245
+
+ * src/IDBTransactionBackendProxy.cpp:
+ (WebCore::IDBTransactionBackendProxy::scheduleTask):
+ * src/IDBTransactionBackendProxy.h:
+
+2010-10-06 Victor Wang <victorw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Add webkit unit tests to chromium multi-dll build.
+
+ In chromium multi-dll build mode, compile the webkit unit tests
+ code in webkit.dll and export an api that runs the tests.
+
+ https://bugs.webkit.org/show_bug.cgi?id=46907
+
+ * WebKit.gyp:
+ * WebKit.gypi:
+ * tests/RunAllTests.cpp:
+ (main):
+ * tests/WebUnitTests.cpp: Added.
+ (WebKit::RunAllUnitTests):
+ * tests/WebUnitTests.h: Added.
+
+2010-10-05 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Nate Chapin.
+
+ [Chromium] WebIDBKeyRange should handle null left/right pointers
+ https://bugs.webkit.org/show_bug.cgi?id=47247
+
+ * src/WebIDBKeyRange.cpp:
+ (WebKit::WebIDBKeyRange::assign):
+ (WebKit::WebIDBKeyRange::left):
+ (WebKit::WebIDBKeyRange::right):
+ (WebKit::WebIDBKeyRange::flags):
+
+2010-10-06 Tony Chang <tony@chromium.org>
+
+ Unreviewed, rolling out r69202.
+ http://trac.webkit.org/changeset/69202
+ https://bugs.webkit.org/show_bug.cgi?id=46937
+
+ Broke compile of test_shell
+
+ * DEPS:
+ * public/WebDragData.h:
+ * src/WebDragData.cpp:
+ (WebKit::WebDragData::hasFileNames):
+ (WebKit::WebDragData::fileNames):
+ (WebKit::WebDragData::setFileNames):
+ (WebKit::WebDragData::appendToFileNames):
+ (WebKit::WebDragData::fileContentFileName):
+ (WebKit::WebDragData::setFileContentFileName):
+
+2010-10-06 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Minor naming cleanup in WebDragData, part 2
+ https://bugs.webkit.org/show_bug.cgi?id=46937
+
+ Chromium no longer uses the deprecated methods, so delete them.
+
+ * DEPS:
+ * public/WebDragData.h:
+ * src/WebDragData.cpp:
+
+2010-09-29 Alpha Lam <hclam@chromium.org>
+
+ Reviewed by James Robinson.
+
+ Render textures in video frame directly.
+ https://bugs.webkit.org/show_bug.cgi?id=46765
+
+ Add getter for accessing textures stored in VideoFrameChromium and WebVideoFrame.
+ Also explicitly instruct VideoLayerChromium to release video frame when the owner
+ of video frame is going away.
+
+ * public/WebVideoFrame.h:
+ * src/AssertMatchingEnums.cpp:
+ * src/VideoFrameChromiumImpl.cpp:
+ (WebKit::VideoFrameChromiumImpl::texture):
+ * src/VideoFrameChromiumImpl.h:
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl):
+ (WebKit::WebMediaPlayerClientImpl::load):
+ * src/WebMediaPlayerClientImpl.h:
+
+2010-10-05 Nat Duca <nduca@chromium.org>
+
+ Reviewed by James Robinson.
+
+ [chromium] Handle composited root layer invalidations in screenspace,
+ fixing the disappearing scrollbar problem.
+ https://bugs.webkit.org/show_bug.cgi?id=46864
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::composite):
+ (WebKit::WebViewImpl::scrollRootLayerRect):
+ (WebKit::WebViewImpl::invalidateRootLayerRect):
+ (WebKit::WebViewImpl::doComposite):
+
+2010-10-05 Kenneth Russell <kbr@google.com>
+
+ Unreviewed, follow up to 47216. Add newline above "protected:".
+
+ * public/WebFrame.h:
+
+2010-10-05 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Implement layerTreeAsText in DumpRenderTree
+ https://bugs.webkit.org/show_bug.cgi?id=47216
+
+ Plumbed Frame::layerTreeAsText through Chromium's WebKit API to
+ make it callable from DumpRenderTree.
+
+ No new tests; verified with existing compositor layout tests.
+
+ * public/WebFrame.h:
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::layerTreeAsText):
+ * src/WebFrameImpl.h:
+
+2010-10-05 Andrew Wilson <atwilson@chromium.org>
+
+ Reviewed by Andreas Kling.
+
+ Notification onclick() events don't act like user gestures
+ https://bugs.webkit.org/show_bug.cgi?id=47137
+
+ * src/WebNotification.cpp:
+ (WebKit::WebNotification::dispatchClickEvent):
+ Use UserGestureIndicator to make sure click events are treated like user gestures.
+
+2010-10-05 Alok Priyadarshi <alokp@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ Supported ANGLE SH_VERSION > 100
+ https://bugs.webkit.org/show_bug.cgi?id=47024
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::angleCreateCompilers):
+ (WebKit::WebGraphicsContext3DDefaultImpl::angleValidateShaderSource):
+
+2010-10-04 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Nate Chapin.
+
+ Rename get* and open*Cursor per the spec on IDBIndex
+ https://bugs.webkit.org/show_bug.cgi?id=46906
+
+ The spec changed so that:
+ IDBIndex.get -> getKey
+ IDBIndex.getObject -> get
+ IDBIndex.openCursor -> openKeyCursor
+ IDBIndex.openObjectCursor -> openCursor
+
+ * public/WebIDBIndex.h:
+ (WebKit::WebIDBIndex::openCursor):
+ (WebKit::WebIDBIndex::openKeyCursor):
+ (WebKit::WebIDBIndex::get):
+ (WebKit::WebIDBIndex::getKey):
+ * src/IDBIndexBackendProxy.cpp:
+ (WebCore::IDBIndexBackendProxy::openCursor):
+ (WebCore::IDBIndexBackendProxy::openKeyCursor):
+ (WebCore::IDBIndexBackendProxy::get):
+ (WebCore::IDBIndexBackendProxy::getKey):
+ * src/IDBIndexBackendProxy.h:
+ * src/WebIDBIndexImpl.cpp:
+ (WebKit::WebIDBIndexImpl::openObjectCursor):
+ (WebKit::WebIDBIndexImpl::openKeyCursor):
+ (WebKit::WebIDBIndexImpl::getObject):
+ (WebKit::WebIDBIndexImpl::getKey):
+ * src/WebIDBIndexImpl.h:
+
+2010-10-04 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ IDBDatabase::createObjectStore/removeObjectStore and IDBObjectStore::createIndex/removeIndex should be synchronous.
+ https://bugs.webkit.org/show_bug.cgi?id=46883
+
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::createObjectStore):
+ (WebKit::WebIDBDatabase::removeObjectStore):
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::createIndex):
+ (WebKit::WebIDBObjectStore::removeIndex):
+ * src/IDBDatabaseProxy.cpp:
+ (WebCore::IDBDatabaseProxy::createObjectStore):
+ (WebCore::IDBDatabaseProxy::removeObjectStore):
+ * src/IDBDatabaseProxy.h:
+ * src/IDBObjectStoreProxy.cpp:
+ (WebCore::IDBObjectStoreProxy::createIndex):
+ (WebCore::IDBObjectStoreProxy::removeIndex):
+ * src/IDBObjectStoreProxy.h:
+ * src/WebIDBDatabaseImpl.cpp:
+ (WebKit::WebIDBDatabaseImpl::createObjectStore):
+ (WebKit::WebIDBDatabaseImpl::removeObjectStore):
+ * src/WebIDBDatabaseImpl.h:
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::createIndex):
+ (WebKit::WebIDBObjectStoreImpl::removeIndex):
+ * src/WebIDBObjectStoreImpl.h:
+
+2010-10-04 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: [Chromium][Extension API] provide tab id of inspected tab in extension API
+ https://bugs.webkit.org/show_bug.cgi?id=47080
+
+ * src/js/DevTools.js: Added a way for extension to get tabId of inspected window.
+ (WebInspector.platformExtensionAPI):
+ (WebInspector.buildPlatformExtensionAPI):
+ (WebInspector.setInspectedTabId):
+
+2010-10-04 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Properly clear WebKit cache when chromium cache is cleared
+ https://bugs.webkit.org/show_bug.cgi?id=47119
+
+ Contributed by Ricardo Vargas.
+
+ See: http://code.google.com/p/chromium/issues/detail?id=54336
+
+ * src/WebCache.cpp:
+ (WebKit::WebCache::clear):
+
+2010-10-04 Nico Weber <thakis@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ Fix broken C++ in PODInterval and PODIntervalTree
+ https://bugs.webkit.org/show_bug.cgi?id=47063
+
+ Change functions to be template specializations, like it's now required
+ by PODIntervalTree and friends.
+
+ * tests/PODIntervalTreeTest.cpp:
+
+2010-10-04 Matt Mueller <mattm@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ When building under chromium, build libwebkit as the same type (shared
+ or static) as chromium. Fixes problems with multiple calls to global
+ initializers/finalizers in shared chromium build.
+ https://bugs.webkit.org/show_bug.cgi?id=46762
+
+ * WebKit.gyp:
+
+2010-10-04 Alpha Lam <hclam@chromium.org>
+
+ Build fix. Not reviewed.
+
+ Remove a function declaration.
+
+ * src/ChromeClientImpl.h:
+
+2010-10-04 Alpha Lam <hclam@chromium.org>
+
+ Build fix. Not reviewed.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47135
+ Add a stub method to make the build happy.
+
+ * src/ApplicationCacheHost.cpp:
+ (WebCore::ApplicationCacheHost::stopLoadingInFrame):
+
+2010-10-04 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by James Robinson.
+
+ Move SharedGraphicsContext3D from ChromeClient to Page
+ https://bugs.webkit.org/show_bug.cgi?id=47113
+
+ * src/ChromeClientImpl.cpp:
+ * src/WebViewImpl.cpp:
+ * src/WebViewImpl.h:
+
+2010-10-04 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Nate Chapin.
+
+ Implement IndexedDB's oncomplete and ontimeout.
+ https://bugs.webkit.org/show_bug.cgi?id=47106
+
+ * public/WebIDBTransactionCallbacks.h:
+ (WebKit::WebIDBTransactionCallbacks::id):
+ (WebKit::WebIDBTransactionCallbacks::onAbort):
+ (WebKit::WebIDBTransactionCallbacks::onComplete):
+ (WebKit::WebIDBTransactionCallbacks::onTimeout):
+ * src/IDBTransactionCallbacksProxy.cpp:
+ (WebCore::IDBTransactionCallbacksProxy::onComplete):
+ (WebCore::IDBTransactionCallbacksProxy::onTimeout):
+ * src/IDBTransactionCallbacksProxy.h:
+ * src/WebIDBTransactionCallbacksImpl.cpp:
+ (WebCore::WebIDBTransactionCallbacksImpl::onComplete):
+ (WebCore::WebIDBTransactionCallbacksImpl::onTimeout):
+ * src/WebIDBTransactionCallbacksImpl.h:
+
+2010-10-04 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Rename RedirectScheduler to NavigationScheduler
+ https://bugs.webkit.org/show_bug.cgi?id=47037
+
+ Update for name change.
+
+ * src/ApplicationCacheHost.cpp:
+ (WebCore::ApplicationCacheHost::selectCacheWithManifest):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::loadJavaScriptURL):
+
+2010-10-01 Victoria Kirst <vrk@google.com>
+
+ Reviewed by James Robinson.
+
+ Fixing crash when audio media player is destructed
+ https://bugs.webkit.org/show_bug.cgi?id=47020
+
+ Creates the VideoLayerChromium layer only if the media player contains
+ a video.
+
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::readyStateChanged):
+ (WebKit::WebMediaPlayerClientImpl::create):
+
+2010-10-01 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Nate Chapin.
+
+ [Chromium] Remove WebURLLoaderClient::didFinishLoading(WebURLLoader*)
+ https://bugs.webkit.org/show_bug.cgi?id=47008
+
+ Now that WebURLLoaderClient::didFinishLoading(WebURLLoader*) has no
+ more callers, it can be removed (requires a Chromium roll to
+ http://crrev.com/61206, which actually removed the last usage).
+
+ * DEPS:
+ * public/WebURLLoaderClient.h:
+
+2010-10-01 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Minor naming cleanup in WebDragData
+ https://bugs.webkit.org/show_bug.cgi?id=46937
+
+ This is a two-part patch--one to add the new methods with normalized
+ names that follow general WebKit convention, and a followup patch to
+ remove the original methods once Chromium is updated.
+
+ * public/WebDragData.h:
+ * src/WebDragData.cpp:
+ (WebKit::WebDragData::hasFileNames): renamed to containsFilenames
+ (WebKit::WebDragData::fileNames): renamed to filenames
+ (WebKit::WebDragData::setFileNames): renamed to setFilenames
+ (WebKit::WebDragData::appendToFileNames): renamed to appendToFilenames
+ (WebKit::WebDragData::containsFilenames):
+ (WebKit::WebDragData::filenames):
+ (WebKit::WebDragData::setFilenames):
+ (WebKit::WebDragData::appendToFilenames):
+ (WebKit::WebDragData::fileContentFileName): renamed to fileContentFilename
+ (WebKit::WebDragData::setFileContentFileName): renamed to setFileContentFilename
+ (WebKit::WebDragData::fileContentFilename):
+ (WebKit::WebDragData::setFileContentFilename):
+
+2010-10-01 Jochen Eisinger <jochen@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] add an identifier method to WebFrame. The identifier can be used to identify
+ a given frame of a view over time. Using a pointer to the WebFrame object is fragile,
+ since a new frame might have been allocated at the same address as an old, deleted frame.
+ https://bugs.webkit.org/show_bug.cgi?id=46884
+
+ * public/WebFrame.h:
+ * src/WebFrameImpl.cpp:
+ (WebKit::generateFrameIdentifier):
+ (WebKit::WebFrameImpl::identifier):
+ (WebKit::WebFrameImpl::WebFrameImpl):
+ * src/WebFrameImpl.h:
+
+2010-09-29 John Abd-El-Malek <jam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Changes to consolidate plugin zoom
+ https://bugs.webkit.org/show_bug.cgi?id=46550
+
+ * public/WebPlugin.h:
+ (WebKit::WebPlugin::setZoomLevel):
+ * public/WebPluginContainer.h:
+ * public/WebView.h:
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::zoomLimitsChanged):
+ (WebKit::WebViewClient::zoomLevelChanged):
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::createPlugin):
+ * src/WebPluginContainerImpl.cpp:
+ (WebKit::WebPluginContainerImpl::loadFrameRequest):
+ (WebKit::WebPluginContainerImpl::zoomChanged):
+ (WebKit::WebPluginContainerImpl::zoomLimitsChanged):
+ * src/WebPluginContainerImpl.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ (WebKit::WebViewImpl::zoomLevel):
+ (WebKit::WebViewImpl::setZoomLevel):
+ (WebKit::WebViewImpl::zoomLimitsChanged):
+ (WebKit::WebViewImpl::fullFramePluginZoomLevelChanged):
+ (WebKit::WebView::zoomLevelToZoomFactor):
+ (WebKit::WebView::zoomFactorToZoomLevel):
+ * src/WebViewImpl.h:
+
+2010-09-30 MORITA Hajime <morrita@google.com>
+
+ Reviewed by James Robinson.
+
+ [Chromium] build fails unless ACCELERATED_2D_CANVAS defined
+ https://bugs.webkit.org/show_bug.cgi?id=46955
+
+ Added ifdef guard around SharedGraphicsContext3D.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::getSharedGraphicsContext3D):
+ * src/WebViewImpl.h:
+
+2010-09-30 Alexey Marinichev <amarinichev@chromium.org>
+
+ Reviewed by Chris Marrin.
+
+ Add GetGraphicsResetStatusARB entry point from ARB_robustness
+ extension to GraphicsContext3D
+ https://bugs.webkit.org/show_bug.cgi?id=46850
+
+ Added a stub for GraphicsContext3D::getGraphicsResetStatusARB.
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3D::getGraphicsResetStatusARB):
+
+2010-09-30 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Remove WebHTTPBody::appendFileRange(..., const WebFileInfo&).
+
+ * public/WebHTTPBody.h:
+ * src/WebHTTPBody.cpp:
+ (WebKit::WebHTTPBody::elementAt):
+
+2010-09-30 Nico Weber <thakis@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [chromium] Fix clang error in KURLTest.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=46861
+
+ * tests/KURLTest.cpp:
+ (WTF::operator<<):
+
+2010-09-30 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Refactor ChromiumDataObject to use getters/setters.
+ https://bugs.webkit.org/show_bug.cgi?id=46559
+
+ This is an intermediate step to converting ChromiumDataObject to use
+ callbacks to the browser to retrieve data.
+
+ * public/WebDragData.h:
+ * src/WebDragData.cpp:
+ (WebKit::WebDragData::initialize):
+ (WebKit::WebDragData::url):
+ (WebKit::WebDragData::setURL):
+ (WebKit::WebDragData::urlTitle):
+ (WebKit::WebDragData::setURLTitle):
+ (WebKit::WebDragData::downloadMetadata):
+ (WebKit::WebDragData::setDownloadMetadata):
+ (WebKit::WebDragData::fileExtension):
+ (WebKit::WebDragData::setFileExtension):
+ (WebKit::WebDragData::hasFileNames):
+ (WebKit::WebDragData::fileNames):
+ (WebKit::WebDragData::setFileNames):
+ (WebKit::WebDragData::appendToFileNames):
+ (WebKit::WebDragData::plainText):
+ (WebKit::WebDragData::setPlainText):
+ (WebKit::WebDragData::htmlText):
+ (WebKit::WebDragData::setHTMLText):
+ (WebKit::WebDragData::htmlBaseURL):
+ (WebKit::WebDragData::setHTMLBaseURL):
+ (WebKit::WebDragData::fileContentFileName):
+ (WebKit::WebDragData::setFileContentFileName):
+ (WebKit::WebDragData::fileContent):
+ (WebKit::WebDragData::setFileContent):
+
+2010-09-29 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ glsl-conformance.html on khronos will crash chromium --in-process-webgl
+ https://bugs.webkit.org/show_bug.cgi?id=46863
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp: Make ShaderSourceMap as <ShaderID, ShaderSourceEntry*>, so map resizing will be efficient and we don't need to worry about pointer copying.
+ (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl):
+ (WebKit::WebGraphicsContext3DDefaultImpl::compileShader):
+ (WebKit::WebGraphicsContext3DDefaultImpl::getShaderiv):
+ (WebKit::WebGraphicsContext3DDefaultImpl::getShaderInfoLog):
+ (WebKit::WebGraphicsContext3DDefaultImpl::getShaderSource):
+ (WebKit::WebGraphicsContext3DDefaultImpl::shaderSource):
+ (WebKit::WebGraphicsContext3DDefaultImpl::createShader):
+ (WebKit::WebGraphicsContext3DDefaultImpl::deleteShader):
+ * src/WebGraphicsContext3DDefaultImpl.h: Ditto.
+ (WebKit::WebGraphicsContext3DDefaultImpl::ShaderSourceEntry::ShaderSourceEntry):
+
+2010-09-30 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ [Chromium] WebIDBDatabase and WebIDBObjectStore are missing methods called from Chromium land.
+ https://bugs.webkit.org/show_bug.cgi?id=46922
+
+ The missing functions were removed in r68795.
+
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::createObjectStore):
+ (WebKit::WebIDBDatabase::removeObjectStore):
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::createIndex):
+ (WebKit::WebIDBObjectStore::removeIndex):
+
+2010-09-29 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ [chromium] Add accelerated compositing support to DumpRenderTree and test_shell
+ https://bugs.webkit.org/show_bug.cgi?id=46849
+
+ Added offscreen code path for WebGraphicsContext3DDefaultImpl which
+ works with the compositor integration in both DumpRenderTree and
+ test_shell, since both pass a non-null WebCanvas* to WebViewImpl::paint
+ and thereby trigger the compositor's readback code path. Added support
+ for --enable-accelerated-compositing to DumpRenderTree.
+
+ Tested in both test_shell and DumpRenderTree on Linux, the latter by
+ modifying a compositing layout test, dumping the pixels and verifying
+ that they matched the output when the compositor was active.
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl):
+ (WebKit::WebGraphicsContext3DDefaultImpl::initialize):
+ (WebKit::WebGraphicsContext3DDefaultImpl::resolveMultisampledFramebuffer):
+ (WebKit::WebGraphicsContext3DDefaultImpl::getPlatformTextureId):
+ (WebKit::WebGraphicsContext3DDefaultImpl::prepareTexture):
+ (WebKit::WebGraphicsContext3DDefaultImpl::readBackFramebuffer):
+ (WebKit::WebGraphicsContext3DDefaultImpl::copyTexImage2D):
+ (WebKit::WebGraphicsContext3DDefaultImpl::copyTexSubImage2D):
+ (WebKit::WebGraphicsContext3DDefaultImpl::readPixels):
+ * src/WebGraphicsContext3DDefaultImpl.h:
+
+2010-09-29 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Steve Block.
+
+ Finished IDBTransaction for IndexedDB
+ https://bugs.webkit.org/show_bug.cgi?id=46823
+
+ Plumbing.
+
+ * public/WebIDBCallbacks.h:
+ (WebKit::WebIDBCallbacks::onSuccess):
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::createObjectStore):
+ (WebKit::WebIDBDatabase::removeObjectStore):
+ (WebKit::WebIDBDatabase::close):
+ * public/WebIDBIndex.h:
+ (WebKit::WebIDBIndex::openObjectCursor):
+ (WebKit::WebIDBIndex::openCursor):
+ (WebKit::WebIDBIndex::getObject):
+ (WebKit::WebIDBIndex::get):
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::get):
+ (WebKit::WebIDBObjectStore::put):
+ (WebKit::WebIDBObjectStore::remove):
+ (WebKit::WebIDBObjectStore::createIndex):
+ (WebKit::WebIDBObjectStore::removeIndex):
+ (WebKit::WebIDBObjectStore::openCursor):
+ * public/WebIDBTransaction.h:
+ (WebKit::WebIDBTransaction::id):
+ (WebKit::WebIDBTransaction::getIDBTransactionBackendInterface):
+ * src/IDBCallbacksProxy.cpp:
+ (WebCore::IDBCallbacksProxy::onSuccess):
+ * src/IDBCallbacksProxy.h:
+ * src/IDBDatabaseProxy.cpp:
+ (WebCore::IDBDatabaseProxy::createObjectStore):
+ (WebCore::IDBDatabaseProxy::removeObjectStore):
+ (WebCore::IDBDatabaseProxy::close):
+ * src/IDBDatabaseProxy.h:
+ * src/IDBIndexBackendProxy.cpp:
+ (WebCore::IDBIndexBackendProxy::openObjectCursor):
+ (WebCore::IDBIndexBackendProxy::openCursor):
+ (WebCore::IDBIndexBackendProxy::getObject):
+ (WebCore::IDBIndexBackendProxy::get):
+ * src/IDBIndexBackendProxy.h:
+ * src/IDBObjectStoreProxy.cpp:
+ (WebCore::IDBObjectStoreProxy::put):
+ (WebCore::IDBObjectStoreProxy::remove):
+ (WebCore::IDBObjectStoreProxy::createIndex):
+ (WebCore::IDBObjectStoreProxy::removeIndex):
+ (WebCore::IDBObjectStoreProxy::openCursor):
+ * src/IDBObjectStoreProxy.h:
+ * src/IDBTransactionBackendProxy.cpp:
+ (WebCore::IDBTransactionBackendProxy::IDBTransactionBackendProxy):
+ * src/WebIDBCallbacksImpl.cpp:
+ (WebCore::WebIDBCallbacksImpl::onSuccess):
+ * src/WebIDBCallbacksImpl.h:
+ * src/WebIDBDatabaseImpl.cpp:
+ (WebKit::WebIDBDatabaseImpl::createObjectStore):
+ (WebKit::WebIDBDatabaseImpl::removeObjectStore):
+ (WebKit::WebIDBDatabaseImpl::close):
+ * src/WebIDBDatabaseImpl.h:
+ * src/WebIDBIndexImpl.cpp:
+ (WebKit::WebIDBIndexImpl::openCursor):
+ (WebKit::WebIDBIndexImpl::openObjectCursor):
+ (WebKit::WebIDBIndexImpl::getObject):
+ (WebKit::WebIDBIndexImpl::get):
+ * src/WebIDBIndexImpl.h:
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::put):
+ (WebKit::WebIDBObjectStoreImpl::remove):
+ (WebKit::WebIDBObjectStoreImpl::createIndex):
+ (WebKit::WebIDBObjectStoreImpl::removeIndex):
+ (WebKit::WebIDBObjectStoreImpl::openCursor):
+ * src/WebIDBObjectStoreImpl.h:
+
+2010-09-29 Andrey Kosyakov <caseq@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: display headers actually used by network stack in Resources tab
+ Added plumbing for raw headers flag and response field between chromium and WebCore.
+ https://bugs.webkit.org/show_bug.cgi?id=46092
+
+ * WebKit.gyp:
+ * public/WebResourceRawHeaders.h: Added.
+ * public/WebURLRequest.h:
+ * public/WebURLResponse.h:
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::WebDevToolsAgentImpl::willSendRequest):
+ * src/WebResourceRawHeaders.cpp: Added.
+ (WebKit::WebResourceRawHeaders::WebResourceRawHeaders):
+ (WebKit::WebResourceRawHeaders::~WebResourceRawHeaders):
+ (WebKit::WebResourceRawHeaders::operator WTF::PassRefPtr<WebCore::ResourceRawHeaders>):
+ (WebKit::addHeader):
+ (WebKit::WebResourceRawHeaders::addRequestHeader):
+ (WebKit::WebResourceRawHeaders::addResponseHeader):
+ * src/WebURLRequest.cpp:
+ (WebKit::WebURLRequest::setReportRawHeaders):
+ (WebKit::WebURLRequest::reportRawHeaders):
+ * src/WebURLResponse.cpp:
+ (WebKit::WebURLResponse::resourceRawHeaders):
+ (WebKit::WebURLResponse::setResourceRawHeaders):
+ * src/WebURLResponsePrivate.h:
+
+2010-09-30 Avi Drissman <avi@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ [Chromium] Tabbing into page doesn't always select the first element
+ https://bugs.webkit.org/show_bug.cgi?id=46856
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setInitialFocus):
+
+2010-09-30 Alexey Marinichev <amarinichev@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ Rename chromium's GraphicsContext3D.cpp to match others.
+ https://bugs.webkit.org/show_bug.cgi?id=46771
+
+ * WebKit.gyp:
+ * src/GraphicsContext3DChromium.cpp: Renamed from WebKit/chromium/src/GraphicsContext3D.cpp.
+
+2010-09-29 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Refactor HTMLInputElement: Make DeprecatedInputType private.
+ https://bugs.webkit.org/show_bug.cgi?id=46791
+
+ * src/WebPasswordFormUtils.cpp:
+ (WebKit::findPasswordFormFields):
+ Accept any text field types as a username field.
+ * src/WebSearchableFormData.cpp:
+ (WebCore::HasSuitableTextElement):
+ Accept any text field types as a search query field.
+
+2010-09-29 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Dumitru Daniliuc.
+
+ Add removeRecursively to WebKit WebFileSystem API
+ https://bugs.webkit.org/show_bug.cgi?id=46842
+
+ * public/WebFileSystem.h:
+ (WebKit::WebFileSystem::removeRecursively): Added.
+
+2010-09-29 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by David Levin.
+
+ Fix DirectoryReader's behavior to trigger only one EntriesCallback per readEntries
+ https://bugs.webkit.org/show_bug.cgi?id=46563
+
+ * src/WebFileSystemCallbacksImpl.cpp:
+ (WebKit::WebFileSystemCallbacksImpl::didReadDirectory):
+
+2010-09-29 Tony Chang <tony@chromium.org>
+
+ Reviewed by James Robinson.
+
+ [chromium] enable -Werror for DRT and webkit_unit_tests on Linux
+ https://bugs.webkit.org/show_bug.cgi?id=46829
+
+ * WebKit.gyp:
+ * tests/ArenaTestHelpers.h:
+ (WebCore::ArenaTestHelpers::TrackedAllocator::free):
+ * tests/IDBKeyPathTest.cpp:
+ (WebCore::checkKeyPath):
+
+2010-09-29 Tony Chang <tony@chromium.org>
+
+ Reviewed by James Robinson.
+
+ [chromium] enable -Werror on chromium linux webkit
+ https://bugs.webkit.org/show_bug.cgi?id=46821
+
+ * WebKit.gyp:
+ * src/gtk/WebInputEventFactory.cpp:
+
+2010-09-29 Mihai Parparita <mihaip@chromium.org>
+
+ Unreviewed removal of unused #define from WebHistory.h.
+ Chromium usage of WEBKIT_BUG_40451_IS_FIXED was removed with
+ http://crrev.com/50642.
+
+ * public/WebHistoryItem.h:
+
+2010-09-29 Kinuko Yasuda <kinuko@chromium.org>
+
+ Unreviewed, adding one more missing change from the last patch.
+ https://bugs.webkit.org/show_bug.cgi?id=46524
+
+ * WebKit.gyp:
+
+2010-09-29 Kinuko Yasuda <kinuko@chromium.org>
+
+ Unreviewed, adding the new files that were supposed to be added
+ but I missed to include in my previous patch.
+ https://bugs.webkit.org/show_bug.cgi?id=46524
+
+ * src/WorkerAsyncFileSystemChromium.cpp: Added.
+ * src/WorkerAsyncFileSystemChromium.h: Added.
+
+2010-09-29 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by David Levin.
+
+ Bridge all FileSystem operations on Workers to the MainThread
+ https://bugs.webkit.org/show_bug.cgi?id=46524
+
+ * src/LocalFileSystemChromium.cpp:
+ (WebCore::LocalFileSystem::requestFileSystem): Changed the worker case
+ code to create WebFileSystemCallbacksImpl with the current
+ ScriptExecutionContext (WorkerContext).
+ * src/WebFileSystemCallbacksImpl.cpp:
+ (WebKit::WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl): Added
+ a new constructor that takes ScriptExecutionContext (WorkerContext)
+ for workers.
+ (WebKit::WebFileSystemCallbacksImpl::didOpenFileSystem): Added the
+ code for workers that creates WorkerAsyncFileSystemChromium.
+ * src/WebFileSystemCallbacksImpl.h:
+ * src/WorkerAsyncFileSystemChromium.cpp: Added.
+ * src/WorkerAsyncFileSystemChromium.h: Added.
+ * src/WorkerFileSystemCallbacksBridge.cpp: Added methods for regular
+ file system operations to proxy them to the main thread.
+ (WebKit::WorkerFileSystemCallbacksBridge::createForOpenFileSystem):
+ (WebKit::WorkerFileSystemCallbacksBridge::createForMove):
+ (WebKit::WorkerFileSystemCallbacksBridge::createForCopy):
+ (WebKit::WorkerFileSystemCallbacksBridge::createForRemove):
+ (WebKit::WorkerFileSystemCallbacksBridge::createForReadMetadata):
+ (WebKit::WorkerFileSystemCallbacksBridge::createForCreateFile):
+ (WebKit::WorkerFileSystemCallbacksBridge::createForCreateDirectory):
+ (WebKit::WorkerFileSystemCallbacksBridge::createForFileExists):
+ (WebKit::WorkerFileSystemCallbacksBridge::createForDirectoryExists):
+ (WebKit::WorkerFileSystemCallbacksBridge::createForReadDirectory):
+ (WebKit::MainThreadFileSystemCallbacks::didSucceed):
+ (WebKit::MainThreadFileSystemCallbacks::didReadMetadata):
+ (WebKit::MainThreadFileSystemCallbacks::didReadDirectory):
+ (WebKit::WorkerFileSystemCallbacksBridge::openFileSystemOnMainThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::moveOnMainThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::copyOnMainThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::removeOnMainThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::readMetadataOnMainThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::createFileOnMainThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::createDirectoryOnMainThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::fileExistsOnMainThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::directoryExistsOnMainThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::readDirectoryOnMainThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::didSucceedOnMainThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::didReadMetadataOnMainThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::didReadDirectoryOnMainThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::didSucceedOnWorkerThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::didReadMetadataOnWorkerThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::didReadDirectoryOnWorkerThread):
+ (WebKit::WorkerFileSystemCallbacksBridge::derefIfWorkerIsStopped):
+ * src/WorkerFileSystemCallbacksBridge.h:
+
+2010-09-29 Matt Perry <mpcomplete@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Remove obsolete registerExtension variants from chromium port.
+ https://bugs.webkit.org/show_bug.cgi?id=46683
+
+ * public/WebScriptController.h:
+ * src/WebScriptController.cpp:
+
+2010-09-29 Chris Guillory <chris.guillory@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Add method which checks if a WebAccessibilityObject is in the cache.
+ https://bugs.webkit.org/show_bug.cgi?id=46605
+
+ * public/WebAccessibilityCache.h:
+ * src/WebAccessibilityCacheImpl.cpp:
+ (WebKit::WebAccessibilityCacheImpl::isCached):
+ * src/WebAccessibilityCacheImpl.h:
+
+2010-09-29 Anantanarayanan G Iyengar <ananta@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Honor z-index specified by a plugin
+ https://bugs.webkit.org/show_bug.cgi?id=46223
+
+ The Chromium plugin code which implements the iframe shim technique
+ for overlaying a windowed plugin with content on the page should
+ honor the z-index specified on the plugin widget. If the z-index
+ here is greater than the enclosing iframe shim then the plugin
+ should be displayed over the iframe. Updated the layout test to test
+ for this case. Skipped the plugins/iframe-shims.html layout test on
+ platforms which don't support it.
+
+ * src/WebPluginContainerImpl.cpp:
+
2010-09-28 Vangelis Kokkevis <vangelis@chromium.org>
Reviewed by Kenneth Russell.
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index 722dd94..86a9387 100644
--- a/WebKit/chromium/DEPS
+++ b/WebKit/chromium/DEPS
@@ -32,7 +32,7 @@
vars = {
'chromium_svn': 'http://src.chromium.org/svn/trunk/src',
- 'chromium_rev': '60394',
+ 'chromium_rev': '63057'
}
deps = {
@@ -99,6 +99,8 @@ deps = {
From('chromium_deps', 'src/third_party/libvpx/include'),
'third_party/libvpx/lib':
From('chromium_deps', 'src/third_party/libvpx/lib'),
+ 'third_party/libwebp':
+ Var('chromium_svn')+'/third_party/libwebp@'+Var('chromium_rev'),
'tools/grit':
Var('chromium_svn')+'/tools/grit@'+Var('chromium_rev'),
'tools/generate_stubs':
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 5b953e3..e1e1a5f 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -36,7 +36,6 @@
'features.gypi',
],
'variables': {
- 'webkit_target_type': 'static_library',
'conditions': [
# Location of the chromium src directory and target type is different
# if webkit is built inside chromium or as standalone project.
@@ -44,6 +43,7 @@
# Webkit is being built outside of the full chromium project.
# e.g. via build-webkit --chromium
'chromium_src_dir': '../../WebKit/chromium',
+ 'webkit_target_type': 'static_library',
# List of DevTools source files, ordered by dependencies. It is used both
# for copying them to resource dir, and for generating 'devtools.html' file.
@@ -54,6 +54,7 @@
},{
# WebKit is checked out in src/chromium/third_party/WebKit
'chromium_src_dir': '../../../..',
+ 'webkit_target_type': '<(library)',
'devtools_files': [
'<@(devtools_css_files)',
@@ -95,6 +96,7 @@
'public/linux/WebFontRendering.h',
'public/linux/WebFontRenderStyle.h',
'public/linux/WebRenderTheme.h',
+ 'public/linux/WebThemeEngine.h',
'public/x11/WebScreenInfoFactory.h',
'public/mac/WebInputEventFactory.h',
'public/mac/WebSandboxSupport.h',
@@ -110,7 +112,6 @@
'public/WebBindings.h',
'public/WebBlobData.h',
'public/WebBlobRegistry.h',
- 'public/WebBlobStorageData.h',
'public/WebCache.h',
'public/WebCanvas.h',
'public/WebClipboard.h',
@@ -148,6 +149,7 @@
'public/WebDragData.h',
'public/WebEditingAction.h',
'public/WebElement.h',
+ 'public/WebExceptionCode.h',
'public/WebFileChooserCompletion.h',
'public/WebFileChooserParams.h',
'public/WebFileError.h',
@@ -231,6 +233,7 @@
'public/WebRange.h',
'public/WebRect.h',
'public/WebRegularExpression.h',
+ 'public/WebResourceRawHeaders.h',
'public/WebRuntimeFeatures.h',
'public/WebScrollbar.h',
'public/WebScrollbarClient.h',
@@ -261,7 +264,7 @@
'public/WebTextDirection.h',
'public/WebTextInputType.h',
'public/WebTextRun.h',
- 'public/WebThemeEngine.h',
+ 'public/WebThreadSafeData.h',
'public/WebURL.h',
'public/WebURLError.h',
'public/WebURLLoader.h',
@@ -279,6 +282,7 @@
'public/win/WebInputEventFactory.h',
'public/win/WebSandboxSupport.h',
'public/win/WebScreenInfoFactory.h',
+ 'public/win/WebThemeEngine.h',
'src/ApplicationCacheHost.cpp',
'src/ApplicationCacheHostInternal.h',
'src/AssertMatchingEnums.cpp',
@@ -324,7 +328,7 @@
'src/FrameLoaderClientImpl.cpp',
'src/FrameLoaderClientImpl.h',
'src/FrameNetworkingContextImpl.h',
- 'src/GraphicsContext3D.cpp',
+ 'src/GraphicsContext3DChromium.cpp',
'src/GraphicsContext3DInternal.h',
'src/gtk/WebFontInfo.cpp',
'src/gtk/WebFontInfo.h',
@@ -386,7 +390,6 @@
'src/WebAttribute.cpp',
'src/WebBindings.cpp',
'src/WebBlobData.cpp',
- 'src/WebBlobStorageData.cpp',
'src/WebCache.cpp',
'src/WebColor.cpp',
'src/WebCommon.cpp',
@@ -495,6 +498,7 @@
'src/WebPopupMenuImpl.h',
'src/WebRange.cpp',
'src/WebRegularExpression.cpp',
+ 'src/WebResourceRawHeaders.cpp',
'src/WebRuntimeFeatures.cpp',
'src/WebScriptController.cpp',
'src/WebScrollbarImpl.cpp',
@@ -518,6 +522,7 @@
'src/WebStorageNamespaceImpl.h',
'src/WebString.cpp',
'src/WebTextRun.cpp',
+ 'src/WebThreadSafeData.cpp',
'src/WebURL.cpp',
'src/WebURLLoadTiming.cpp',
'src/WebURLRequest.cpp',
@@ -533,6 +538,8 @@
'src/WebWorkerClientImpl.h',
'src/WebWorkerImpl.cpp',
'src/WebWorkerImpl.h',
+ 'src/WorkerAsyncFileSystemChromium.cpp',
+ 'src/WorkerAsyncFileSystemChromium.h',
'src/WorkerFileSystemCallbacksBridge.cpp',
'src/WorkerFileSystemCallbacksBridge.h',
'src/WrappedResourceRequest.h',
@@ -551,7 +558,9 @@
],
'dependencies': [
'../../WebCore/WebCore.gyp/WebCore.gyp:webcore_bindings',
+ '<(chromium_src_dir)/base/base.gyp:test_support_base',
'<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
+ '<(chromium_src_dir)/testing/gtest.gyp:gtest',
'<(chromium_src_dir)/third_party/icu/icu.gyp:*',
'<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp:libjpeg',
'<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
@@ -572,6 +581,13 @@
'<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
'<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
],
+ 'sources': [
+ '<@(webkit_unittest_files)',
+ 'tests/PopupMenuTest.cpp',
+ 'tests/TransparencyWinTest.cpp',
+ 'tests/UniscribeHelperTest.cpp',
+ 'tests/WebUnitTests.cpp'
+ ]
}],
],
}, {
@@ -602,11 +618,6 @@
'sources/': [
['exclude', 'Skia\\.cpp$'],
],
- 'variables': {
- # FIXME: Turn on warnings on other platforms and for
- # other targets.
- 'chromium_code': 1,
- }
}, { # else: OS!="mac"
'sources/': [
['exclude', '/mac/'],
@@ -619,6 +630,10 @@
],
}, { # else: OS!="win"
'sources/': [['exclude', '/win/']],
+ 'variables': {
+ # FIXME: Turn on warnings on Windows.
+ 'chromium_code': 1,
+ }
}],
['"ENABLE_3D_CANVAS=1" in feature_defines', {
'conditions': [
@@ -631,6 +646,12 @@
}],
],
}],
+ ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
+ 'sources/': [
+ ['exclude', 'WebGeolocationService.*$'],
+ ['include', 'WebGeolocationServiceMock.*'],
+ ],
+ }]
],
},
@@ -717,40 +738,32 @@
{
'target_name': 'webkit_unit_tests',
+ 'type': 'executable',
+ 'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
+ 'dependencies': [
+ 'webkit',
+ '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
+ '<(chromium_src_dir)/testing/gtest.gyp:gtest',
+ '<(chromium_src_dir)/base/base.gyp:base',
+ '<(chromium_src_dir)/base/base.gyp:base_i18n',
+ '<(chromium_src_dir)/base/base.gyp:test_support_base',
+ '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
+ ],
+ 'sources': [
+ 'tests/RunAllTests.cpp',
+ ],
+ 'include_dirs': [
+ 'public',
+ 'src',
+ ],
'conditions': [
- # FIXME: make webkit unit tests working for multi dll build.
['inside_chromium_build==1 and OS=="win" and component=="shared_library"', {
- 'type': 'none',
- }, {
- 'type': 'executable',
- 'msvs_guid': '7CEFE800-8403-418A-AD6A-2D52C6FC3EAD',
- 'dependencies': [
- 'webkit',
- '../../WebCore/WebCore.gyp/WebCore.gyp:webcore',
- '<(chromium_src_dir)/testing/gtest.gyp:gtest',
- '<(chromium_src_dir)/base/base.gyp:base',
- '<(chromium_src_dir)/base/base.gyp:base_i18n',
- '<(chromium_src_dir)/base/base.gyp:test_support_base',
- '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
- ],
- 'include_dirs': [
- 'public',
- 'src',
+ 'defines': [
+ 'WEBKIT_DLL_UNITTEST',
],
+ }, {
'sources': [
- 'tests/ArenaTestHelpers.h',
- 'tests/DragImageTest.cpp',
- 'tests/IDBBindingUtilitiesTest.cpp',
- 'tests/IDBKeyPathTest.cpp',
- 'tests/KeyboardTest.cpp',
- 'tests/KURLTest.cpp',
- 'tests/PODArenaTest.cpp',
- 'tests/PODIntervalTreeTest.cpp',
- 'tests/PODRedBlackTreeTest.cpp',
- 'tests/RunAllTests.cpp',
- 'tests/TilingDataTest.cpp',
- 'tests/TreeTestHelpers.cpp',
- 'tests/TreeTestHelpers.h',
+ '<@(webkit_unittest_files)',
],
'conditions': [
['OS=="win"', {
@@ -775,6 +788,10 @@
'include_dirs': [
'public/gtk',
],
+ 'variables': {
+ # FIXME: Enable warnings on other platforms.
+ 'chromium_code': 1,
+ },
}],
],
}],
@@ -808,11 +825,11 @@
'<(chromium_src_dir)/third_party/icu/icu.gyp:icuuc',
'<(chromium_src_dir)/third_party/mesa/mesa.gyp:osmesa',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:blob',
- '<(chromium_src_dir)/webkit/support/webkit_support.gyp:copy_npapi_layout_test_plugin',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
],
'include_dirs': [
- '.',
+ '<(chromium_src_dir)',
+ 'public',
'../../JavaScriptCore',
'../../JavaScriptCore/wtf', # wtf/text/*.h refers headers in wtf/ without wtf/.
'<(DEPTH)',
@@ -882,8 +899,11 @@
], # actions
}],
['OS=="mac"', {
- 'dependencies': ['LayoutTestHelper'],
-
+ 'dependencies': [
+ 'copy_mesa',
+ 'LayoutTestHelper',
+ 'TestNetscapePlugIn',
+ ],
'mac_bundle_resources': [
'<(ahem_path)',
'../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf',
@@ -899,14 +919,18 @@
],
# Workaround for http://code.google.com/p/gyp/issues/detail?id=160
'copies': [{
- 'destination': '<(PRODUCT_DIR)/DumpRenderTree.app/Contents/PlugIns/',
- 'files': ['<(PRODUCT_DIR)/TestNetscapePlugIn.plugin/'],
+ 'destination': '<(PRODUCT_DIR)/plugins/',
+ 'files': ['<(PRODUCT_DIR)/WebKitTestNetscapePlugIn.plugin/'],
}],
},{ # OS!="mac"
'sources/': [
# .mm is already excluded by common.gypi
['exclude', 'Mac\\.cpp$'],
- ]
+ ],
+ 'dependencies': [
+ # FIXME: Switch to webkit.org's plugin.
+ '<(chromium_src_dir)/webkit/support/webkit_support.gyp:copy_npapi_layout_test_plugin',
+ ],
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
'dependencies': [
@@ -924,6 +948,10 @@
'<(INTERMEDIATE_DIR)/repack/DumpRenderTree.pak',
]
}],
+ 'variables': {
+ # FIXME: Enable warnings on other platforms.
+ 'chromium_code': 1,
+ },
},{ # OS!="linux" and OS!="freebsd" and OS!="openbsd" and OS!="solaris"
'sources/': [
['exclude', '(Gtk|Linux)\\.cpp$']
@@ -952,6 +980,51 @@
],
},
},
+ {
+ 'target_name': 'copy_mesa',
+ 'type': 'none',
+ 'dependencies': ['<(chromium_src_dir)/third_party/mesa/mesa.gyp:osmesa'],
+ 'copies': [{
+ 'destination': '<(PRODUCT_DIR)/DumpRenderTree.app/Contents/MacOS/',
+ 'files': ['<(PRODUCT_DIR)/osmesa.so'],
+ }],
+ },
+ {
+ 'target_name': 'TestNetscapePlugIn',
+ 'type': 'loadable_module',
+ 'sources': [ '<@(test_plugin_files)' ],
+ 'dependencies': [
+ '<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
+ ],
+ 'include_dirs': [
+ '<(chromium_src_dir)',
+ '../../WebKitTools/DumpRenderTree/TestNetscapePlugIn',
+ '../../WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders',
+ ],
+
+ # Mac specific stuff.
+ 'mac_bundle': 1,
+ # It would be nice to name this TestNetscapePlugIn, but
+ # that name is already used by the fork of this plugin in
+ # Chromium.
+ 'product_name': 'WebKitTestNetscapePlugIn',
+ 'product_extension': 'plugin',
+ 'link_settings': {
+ 'libraries': [
+ '$(SDKROOT)/System/Library/Frameworks/Carbon.framework',
+ '$(SDKROOT)/System/Library/Frameworks/Cocoa.framework',
+ '$(SDKROOT)/System/Library/Frameworks/QuartzCore.framework',
+ ]
+ },
+ 'xcode_settings': {
+ 'GCC_SYMBOLS_PRIVATE_EXTERN': 'NO',
+ # This is a temporary fork of
+ # DRT/TestNetscapePlugIn/mac/Info.plist. Once we get
+ # rid of our forked plugin in the chromium repo, we
+ # can share the same Info.plist.
+ 'INFOPLIST_FILE': '../../WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/Info.plist',
+ },
+ }
],
}],
], # conditions
diff --git a/WebKit/chromium/WebKit.gypi b/WebKit/chromium/WebKit.gypi
index 035015b..016cf1a 100644
--- a/WebKit/chromium/WebKit.gypi
+++ b/WebKit/chromium/WebKit.gypi
@@ -51,6 +51,20 @@
'src/js/Images/statusbarMenuButtonChromium.png',
'src/js/Images/statusbarMenuButtonSelectedChromium.png',
],
+ 'webkit_unittest_files': [
+ 'tests/ArenaTestHelpers.h',
+ 'tests/DragImageTest.cpp',
+ 'tests/IDBBindingUtilitiesTest.cpp',
+ 'tests/IDBKeyPathTest.cpp',
+ 'tests/KeyboardTest.cpp',
+ 'tests/KURLTest.cpp',
+ 'tests/PODArenaTest.cpp',
+ 'tests/PODIntervalTreeTest.cpp',
+ 'tests/PODRedBlackTreeTest.cpp',
+ 'tests/TilingDataTest.cpp',
+ 'tests/TreeTestHelpers.cpp',
+ 'tests/TreeTestHelpers.h',
+ ],
},
}
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index 900bb7a..1e78b04 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -52,7 +52,7 @@
'ENABLE_DIRECTORY_UPLOAD=1',
'ENABLE_DOM_STORAGE=1',
'ENABLE_EVENTSOURCE=1',
- 'ENABLE_FILE_READER=1',
+ 'ENABLE_FILE_SYSTEM=1',
'ENABLE_FILTERS=1',
'ENABLE_GEOLOCATION=1',
'ENABLE_ICONDATABASE=0',
@@ -87,6 +87,7 @@
'ENABLE_XPATH=1',
'ENABLE_XSLT=1',
'WTF_USE_ACCELERATED_COMPOSITING=1',
+ 'WTF_USE_WEBP=1',
],
'use_accelerated_compositing%': 1,
diff --git a/WebKit/chromium/public/WebAccessibilityCache.h b/WebKit/chromium/public/WebAccessibilityCache.h
index c9aec1f..bb2fc7b 100644
--- a/WebKit/chromium/public/WebAccessibilityCache.h
+++ b/WebKit/chromium/public/WebAccessibilityCache.h
@@ -51,8 +51,8 @@ public:
virtual bool isInitialized() const = 0;
virtual WebAccessibilityObject getObjectById(int) = 0;
- virtual bool isValidId(int) const = 0;
virtual int addOrGetId(const WebAccessibilityObject& object) = 0;
+ virtual bool isCached(const WebAccessibilityObject&) = 0;
virtual void remove(int) = 0;
virtual void clear() = 0;
diff --git a/WebKit/chromium/public/WebBlobData.h b/WebKit/chromium/public/WebBlobData.h
index 8c0e1aa..67b6cd6 100644
--- a/WebKit/chromium/public/WebBlobData.h
+++ b/WebKit/chromium/public/WebBlobData.h
@@ -31,7 +31,7 @@
#ifndef WebBlobData_h
#define WebBlobData_h
-#include "WebCString.h"
+#include "WebThreadSafeData.h"
#include "WebString.h"
#include "WebURL.h"
@@ -48,7 +48,7 @@ class WebBlobData {
public:
struct Item {
enum { TypeData, TypeFile, TypeBlob } type;
- WebCString data;
+ WebThreadSafeData data;
WebString filePath;
WebURL blobURL;
long long offset;
@@ -72,17 +72,9 @@ public:
// index is out of bounds.
WEBKIT_API bool itemAt(size_t index, Item& result) const;
- // Appends to the list of items.
- WEBKIT_API void appendData(const WebCString&);
- WEBKIT_API void appendFile(const WebString& filePath);
- WEBKIT_API void appendFile(const WebString& filePath, long long offset, long long length, double expectedModificationTime);
- WEBKIT_API void appendBlob(const WebURL& blobURL, long long offset, long long length);
-
WEBKIT_API WebString contentType() const;
- WEBKIT_API void setContentType(const WebString&);
WEBKIT_API WebString contentDisposition() const;
- WEBKIT_API void setContentDisposition(const WebString&);
#if WEBKIT_IMPLEMENTATION
WebBlobData(const WTF::PassOwnPtr<WebCore::BlobData>&);
diff --git a/WebKit/chromium/public/WebBlobRegistry.h b/WebKit/chromium/public/WebBlobRegistry.h
index cbd9a99..7c5be55 100644
--- a/WebKit/chromium/public/WebBlobRegistry.h
+++ b/WebKit/chromium/public/WebBlobRegistry.h
@@ -31,7 +31,7 @@
#ifndef WebBlobRegistry_h
#define WebBlobRegistry_h
-#include "WebBlobStorageData.h"
+#include "WebCommon.h"
namespace WebKit {
diff --git a/WebKit/chromium/public/WebCommonWorkerClient.h b/WebKit/chromium/public/WebCommonWorkerClient.h
index 39d8aa9..b99d39d 100644
--- a/WebKit/chromium/public/WebCommonWorkerClient.h
+++ b/WebKit/chromium/public/WebCommonWorkerClient.h
@@ -87,6 +87,12 @@ public:
virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) = 0;
// Called on the main webkit thread before opening a file system.
+ virtual void openFileSystem(WebFileSystem::Type, long long size, bool create, WebFileSystemCallbacks*)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ }
+
+ // This will be removed once changes in chromium use the new method above.
virtual void openFileSystem(WebFileSystem::Type, long long size, WebFileSystemCallbacks*)
{
WEBKIT_ASSERT_NOT_REACHED();
diff --git a/WebKit/chromium/public/WebDragData.h b/WebKit/chromium/public/WebDragData.h
index 2979519..1d704f0 100644
--- a/WebKit/chromium/public/WebDragData.h
+++ b/WebKit/chromium/public/WebDragData.h
@@ -66,7 +66,7 @@ public:
bool isNull() const { return !m_private; }
- WEBKIT_API WebURL url() const;
+ WEBKIT_API WebString url() const;
WEBKIT_API void setURL(const WebURL&);
WEBKIT_API WebString urlTitle() const;
@@ -78,10 +78,10 @@ public:
WEBKIT_API WebString fileExtension() const;
WEBKIT_API void setFileExtension(const WebString&);
- WEBKIT_API bool hasFileNames() const;
- WEBKIT_API void fileNames(WebVector<WebString>&) const;
- WEBKIT_API void setFileNames(const WebVector<WebString>&);
- WEBKIT_API void appendToFileNames(const WebString&);
+ WEBKIT_API bool containsFilenames() const;
+ WEBKIT_API void filenames(WebVector<WebString>&) const;
+ WEBKIT_API void setFilenames(const WebVector<WebString>&);
+ WEBKIT_API void appendToFilenames(const WebString&);
WEBKIT_API WebString plainText() const;
WEBKIT_API void setPlainText(const WebString&);
@@ -92,8 +92,8 @@ public:
WEBKIT_API WebURL htmlBaseURL() const;
WEBKIT_API void setHTMLBaseURL(const WebURL&);
- WEBKIT_API WebString fileContentFileName() const;
- WEBKIT_API void setFileContentFileName(const WebString&);
+ WEBKIT_API WebString fileContentFilename() const;
+ WEBKIT_API void setFileContentFilename(const WebString&);
WEBKIT_API WebData fileContent() const;
WEBKIT_API void setFileContent(const WebData&);
diff --git a/WebKit/chromium/public/WebElement.h b/WebKit/chromium/public/WebElement.h
index 5b6fd6a..8d51e98 100644
--- a/WebKit/chromium/public/WebElement.h
+++ b/WebKit/chromium/public/WebElement.h
@@ -50,6 +50,7 @@ class WebNamedNodeMap;
void assign(const WebElement& e) { WebNode::assign(e); }
WEBKIT_API bool isFormControlElement() const;
+ WEBKIT_API bool isTextFormControlElement() const;
WEBKIT_API WebString tagName() const;
WEBKIT_API bool hasTagName(const WebString&) const;
WEBKIT_API bool hasAttribute(const WebString&) const;
diff --git a/WebKit/chromium/public/WebExceptionCode.h b/WebKit/chromium/public/WebExceptionCode.h
new file mode 100644
index 0000000..61d53d9
--- /dev/null
+++ b/WebKit/chromium/public/WebExceptionCode.h
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 WebExceptionCode_h
+#define WebExceptionCode_h
+
+namespace WebKit {
+
+// This should match how ExceptionCode is defined in WebCore.
+typedef int WebExceptionCode;
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFileSystem.h b/WebKit/chromium/public/WebFileSystem.h
index b21235d..7198f31 100644
--- a/WebKit/chromium/public/WebFileSystem.h
+++ b/WebKit/chromium/public/WebFileSystem.h
@@ -58,10 +58,16 @@ public:
virtual void copy(const WebString& srcPath, const WebString& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
// Deletes a file or directory at a given |path|.
+ // It is an error to try to remove a directory that is not empty.
// WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
// WebFileSystemCallbacks::didFail() must be called otherwise.
virtual void remove(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+ // Deletes a file or directory recursively at a given |path|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void removeRecursively(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
// Retrieves the metadata information of the file or directory at the given |path|.
// WebFileSystemCallbacks::didReadMetadata() must be called with a valid metadata when the retrieval is completed successfully.
// WebFileSystemCallbacks::didFail() must be called otherwise.
diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h
index 5d41d10..8f2c861 100644
--- a/WebKit/chromium/public/WebFrame.h
+++ b/WebKit/chromium/public/WebFrame.h
@@ -109,6 +109,9 @@ public:
// frame name unique within the hierarchy.
virtual void setName(const WebString&) = 0;
+ // A globally unique identifier for this frame.
+ virtual long long identifier() const = 0;
+
// The url of the document loaded in this frame. This is equivalent to
// dataSource()->request().url().
virtual WebURL url() const = 0;
@@ -547,6 +550,11 @@ public:
virtual bool pauseSVGAnimation(const WebString& animationId,
double time,
const WebString& elementId) = 0;
+
+ // Dumps the layer tree, used by the accelerated compositor, in
+ // text form. This is used only by layout tests.
+ virtual WebString layerTreeAsText() const = 0;
+
protected:
~WebFrame() { }
};
diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h
index a72e2fd..458604e 100644
--- a/WebKit/chromium/public/WebFrameClient.h
+++ b/WebKit/chromium/public/WebFrameClient.h
@@ -349,7 +349,13 @@ public:
// WebFileSystemCallbacks::didOpenFileSystem() must be called with
// a name and root path for the requested FileSystem when the operation
// is completed successfully. WebFileSystemCallbacks::didFail() must be
- // called otherwise.
+ // called otherwise. The create bool is for indicating whether or not to
+ // create root path for file systems if it do not exist.
+ virtual void openFileSystem(
+ WebFrame*, WebFileSystem::Type, long long size,
+ bool create, WebFileSystemCallbacks*) { }
+
+ // This method will be deleted once chromium uses the new method above.
virtual void openFileSystem(
WebFrame*, WebFileSystem::Type, long long size,
WebFileSystemCallbacks*) { }
diff --git a/WebKit/chromium/public/WebHTTPBody.h b/WebKit/chromium/public/WebHTTPBody.h
index 6e45bf6..8c37622 100644
--- a/WebKit/chromium/public/WebHTTPBody.h
+++ b/WebKit/chromium/public/WebHTTPBody.h
@@ -32,7 +32,6 @@
#define WebHTTPBody_h
#include "WebData.h"
-#include "WebFileInfo.h"
#include "WebNonCopyable.h"
#include "WebString.h"
#include "WebURL.h"
@@ -54,8 +53,6 @@ public:
WebString filePath;
long long fileStart;
long long fileLength; // -1 means to the end of the file.
- // FIXME: remove this field once all users of Element have been switched to use 'modificationTime'.
- WebFileInfo fileInfo;
double modificationTime;
WebURL blobURL;
};
@@ -88,8 +85,6 @@ public:
WEBKIT_API void appendFile(const WebString&);
// Passing -1 to fileLength means to the end of the file.
WEBKIT_API void appendFileRange(const WebString&, long long fileStart, long long fileLength, double modificationTime);
- // FIXME: Remove this method once all callers have been switched to use the method above.
- WEBKIT_API void appendFileRange(const WebString&, long long fileStart, long long fileLength, const WebFileInfo&);
WEBKIT_API void appendBlob(const WebURL&);
// Identifies a particular form submission instance. A value of 0 is
diff --git a/WebKit/chromium/public/WebHistoryItem.h b/WebKit/chromium/public/WebHistoryItem.h
index 1b4863e..b5cd02b 100644
--- a/WebKit/chromium/public/WebHistoryItem.h
+++ b/WebKit/chromium/public/WebHistoryItem.h
@@ -34,9 +34,6 @@
#include "WebCommon.h"
#include "WebPrivatePtr.h"
-// FIXME: Remove this once Chromium starts using itemSequenceNumber.
-#define WEBKIT_BUG_40451_IS_FIXED
-
namespace WebCore { class HistoryItem; }
namespace WebKit {
diff --git a/WebKit/chromium/public/WebIDBCallbacks.h b/WebKit/chromium/public/WebIDBCallbacks.h
index 2e2c4d2..64ffc08 100644
--- a/WebKit/chromium/public/WebIDBCallbacks.h
+++ b/WebKit/chromium/public/WebIDBCallbacks.h
@@ -36,6 +36,7 @@ class WebIDBDatabaseError;
class WebIDBKey;
class WebIDBIndex;
class WebIDBObjectStore;
+class WebIDBTransaction;
class WebSerializedScriptValue;
class WebIDBCallbacks {
@@ -51,6 +52,7 @@ public:
virtual void onSuccess(const WebIDBKey&) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onSuccess(WebIDBIndex*) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onSuccess(WebIDBObjectStore*) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onSuccess(WebIDBTransaction*) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void onSuccess(const WebSerializedScriptValue&) { WEBKIT_ASSERT_NOT_REACHED(); }
};
diff --git a/WebKit/chromium/public/WebIDBCursor.h b/WebKit/chromium/public/WebIDBCursor.h
index 05bd51a..2e5e98b 100644
--- a/WebKit/chromium/public/WebIDBCursor.h
+++ b/WebKit/chromium/public/WebIDBCursor.h
@@ -27,6 +27,7 @@
#define WebIDBCursor_h
#include "WebCommon.h"
+#include "WebExceptionCode.h"
#include "WebIDBCallbacks.h"
#include "WebIDBKey.h"
#include "WebSerializedScriptValue.h"
@@ -52,9 +53,9 @@ public:
// One or the other will set, depending on what type of cursor this is.
virtual void value(WebSerializedScriptValue& serializedScriptValue, WebIDBKey& idbKey) const { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void remove(WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void remove(WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebIDBDatabase.h b/WebKit/chromium/public/WebIDBDatabase.h
index 4e5cdcb..c67a117 100644
--- a/WebKit/chromium/public/WebIDBDatabase.h
+++ b/WebKit/chromium/public/WebIDBDatabase.h
@@ -28,6 +28,7 @@
#include "WebCommon.h"
#include "WebDOMStringList.h"
+#include "WebExceptionCode.h"
namespace WebKit {
@@ -61,22 +62,21 @@ public:
WEBKIT_ASSERT_NOT_REACHED();
return WebDOMStringList();
}
- virtual void createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
- // Transfers ownership of the WebIDBObjectStore to the caller.
- virtual WebIDBObjectStore* objectStore(const WebString& name, unsigned short mode)
- {
+
+ virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&)
+ {
WEBKIT_ASSERT_NOT_REACHED();
return 0;
}
- virtual void removeObjectStore(const WebString& name, WebIDBCallbacks* callbacks) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void removeObjectStore(const WebString& name, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
// Transfers ownership of the WebIDBTransaction to the caller.
- virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout)
+ virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout, WebExceptionCode&)
{
WEBKIT_ASSERT_NOT_REACHED();
return 0;
}
-
+ virtual void close() { WEBKIT_ASSERT_NOT_REACHED(); }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebIDBFactory.h b/WebKit/chromium/public/WebIDBFactory.h
index cb5d369..c7fbe02 100755
--- a/WebKit/chromium/public/WebIDBFactory.h
+++ b/WebKit/chromium/public/WebIDBFactory.h
@@ -52,7 +52,10 @@ public:
virtual ~WebIDBFactory() { }
// The WebKit implementation of open ignores the WebFrame* parameter.
- virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, const WebString& dataDir) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, const WebString& dataDir, unsigned long long maximumSize)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ }
// The file name that would be used for persisting a given indexed database on the file system.
WEBKIT_API static WebString databaseFileName(const WebString& name, const WebSecurityOrigin&);
diff --git a/WebKit/chromium/public/WebIDBIndex.h b/WebKit/chromium/public/WebIDBIndex.h
index b4ba1f4..7c77878 100644
--- a/WebKit/chromium/public/WebIDBIndex.h
+++ b/WebKit/chromium/public/WebIDBIndex.h
@@ -26,6 +26,7 @@
#ifndef WebIDBIndex_h
#define WebIDBIndex_h
+#include "WebExceptionCode.h"
#include "WebIDBTransaction.h"
#include "WebString.h"
@@ -61,43 +62,49 @@ public:
return false;
}
- // FIXME: Remove the versions without transaction parameters.
- virtual void openObjectCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
+ virtual void openObjectCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode&)
{
- openObjectCursor(range, direction, callbacks);
+ WebExceptionCode ec = 0;
+ openObjectCursor(range, direction, callbacks, transaction, ec);
}
- virtual void openObjectCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks)
+ virtual void openObjectCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction)
{
- WebIDBTransaction transaction;
openObjectCursor(range, direction, callbacks, transaction);
}
- virtual void openCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
+ virtual void openKeyCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode&)
{
- openCursor(range, direction, callbacks);
+ WebExceptionCode ec = 0;
+ openKeyCursor(range, direction, callbacks, transaction, ec);
}
- virtual void openCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks)
+ virtual void openKeyCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction)
{
- WebIDBTransaction transaction;
- openCursor(range, direction, callbacks, transaction);
+ openKeyCursor(range, direction, callbacks, transaction);
}
- virtual void getObject(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
+ virtual void getObject(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode&)
{
- getObject(key, callbacks);
+ WebExceptionCode ec = 0;
+ getObject(key, callbacks, transaction, ec);
}
- virtual void getObject(const WebIDBKey& key, WebIDBCallbacks* callbacks)
+ virtual void getObject(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction)
{
- WebIDBTransaction transaction;
getObject(key, callbacks, transaction);
}
- virtual void get(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
+ virtual void getKey(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode&)
{
- get(key, callbacks);
+ WebExceptionCode ec = 0;
+ getKey(key, callbacks, transaction, ec);
}
- virtual void get(const WebIDBKey& key, WebIDBCallbacks* callbacks)
+ virtual void getKey(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction)
{
- WebIDBTransaction transaction;
- get(key, callbacks, transaction);
+ getKey(key, callbacks, transaction);
}
+
+ /*
+ virtual void openObjectCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void openKeyCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void getObject(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void getKey(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ */
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebIDBObjectStore.h b/WebKit/chromium/public/WebIDBObjectStore.h
index 19efd48..f5f1473 100755
--- a/WebKit/chromium/public/WebIDBObjectStore.h
+++ b/WebKit/chromium/public/WebIDBObjectStore.h
@@ -27,6 +27,7 @@
#define WebIDBObjectStore_h
#include "WebCommon.h"
+#include "WebExceptionCode.h"
#include "WebDOMStringList.h"
#include "WebIDBCallbacks.h"
#include "WebIDBTransaction.h"
@@ -58,52 +59,22 @@ public:
return WebDOMStringList();
}
- // FIXME: Remove the default parameters for transactionIds.
- virtual void get(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
+ virtual void get(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void put(const WebSerializedScriptValue&, const WebIDBKey&, bool addOnly, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void remove(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction&, WebExceptionCode&)
{
- get(key, callbacks);
- }
- virtual void get(const WebIDBKey& key, WebIDBCallbacks* callbacks)
- {
- WebIDBTransaction transaction;
- get(key, callbacks, transaction);
- }
- virtual void put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
- {
- put(value, key, addOnly, callbacks);
- }
- virtual void put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks* callbacks)
- {
- WebIDBTransaction transaction;
- put(value, key, addOnly, callbacks, transaction);
- }
- virtual void remove(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
- {
- remove(key, callbacks);
- }
- virtual void remove(const WebIDBKey& key, WebIDBCallbacks* callbacks)
- {
- WebIDBTransaction transaction;
- remove(key, callbacks, transaction);
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
}
- virtual void createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
// Transfers ownership of the WebIDBIndex to the caller.
- virtual WebIDBIndex* index(const WebString& name)
+ virtual WebIDBIndex* index(const WebString& name, WebExceptionCode&)
{
WEBKIT_ASSERT_NOT_REACHED();
return 0;
}
- virtual void removeIndex(const WebString& name, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void openCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
- {
- openCursor(range, direction, callbacks);
- }
- virtual void openCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks)
- {
- WebIDBTransaction transaction;
- openCursor(range, direction, callbacks, transaction);
- }
- // FIXME: finish.
+ virtual void removeIndex(const WebString& name, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void openCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebIDBTransaction.h b/WebKit/chromium/public/WebIDBTransaction.h
index 7b51b97..6a739c3 100644
--- a/WebKit/chromium/public/WebIDBTransaction.h
+++ b/WebKit/chromium/public/WebIDBTransaction.h
@@ -54,8 +54,7 @@ public:
virtual void didCompleteTaskEvents() { WEBKIT_ASSERT_NOT_REACHED(); }
virtual int id() const
{
- // FIXME: Uncomment this after the next Chromium WebKit roll.
- //WEBKIT_ASSERT_NOT_REACHED();
+ WEBKIT_ASSERT_NOT_REACHED();
return 0;
}
virtual void setCallbacks(WebIDBTransactionCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
@@ -63,7 +62,6 @@ public:
// FIXME: this is never called from WebCore. Find a cleaner solution.
virtual WebCore::IDBTransactionBackendInterface* getIDBTransactionBackendInterface() const
{
- WEBKIT_ASSERT_NOT_REACHED();
return 0;
}
diff --git a/WebKit/chromium/public/WebIDBTransactionCallbacks.h b/WebKit/chromium/public/WebIDBTransactionCallbacks.h
index 4b92217..c9b6b05 100644
--- a/WebKit/chromium/public/WebIDBTransactionCallbacks.h
+++ b/WebKit/chromium/public/WebIDBTransactionCallbacks.h
@@ -34,11 +34,8 @@ public:
virtual ~WebIDBTransactionCallbacks() { }
virtual void onAbort() { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual int id() const
- {
- WEBKIT_ASSERT_NOT_REACHED();
- return 0;
- }
+ virtual void onComplete() { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void onTimeout() { WEBKIT_ASSERT_NOT_REACHED(); }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebNode.h b/WebKit/chromium/public/WebNode.h
index f54ff04..7116dfa 100644
--- a/WebKit/chromium/public/WebNode.h
+++ b/WebKit/chromium/public/WebNode.h
@@ -96,6 +96,7 @@ public:
WEBKIT_API WebNodeList childNodes();
WEBKIT_API WebString createMarkup() const;
WEBKIT_API bool isTextNode() const;
+ WEBKIT_API bool isContentEditable() const;
WEBKIT_API bool isElementNode() const;
WEBKIT_API void addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture);
WEBKIT_API void removeEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture);
diff --git a/WebKit/chromium/public/WebPlugin.h b/WebKit/chromium/public/WebPlugin.h
index 816d38b..17e29e2 100644
--- a/WebKit/chromium/public/WebPlugin.h
+++ b/WebKit/chromium/public/WebPlugin.h
@@ -33,6 +33,7 @@
#include "WebCanvas.h"
#include "WebString.h"
+#include "WebURL.h"
struct NPObject;
@@ -42,10 +43,10 @@ class WebDataSource;
class WebFrame;
class WebInputEvent;
class WebPluginContainer;
-class WebURL;
class WebURLResponse;
struct WebCursorInfo;
struct WebPluginParams;
+struct WebPoint;
struct WebRect;
struct WebURLError;
template <typename T> class WebVector;
@@ -98,8 +99,12 @@ public:
virtual WebString selectionAsText() const { return WebString(); }
virtual WebString selectionAsMarkup() const { return WebString(); }
+ // If the given position is over a link, returns the absolute url.
+ // Otherwise an empty url is returned.
+ virtual WebURL linkAtPosition(const WebPoint& position) const { return WebURL(); }
+
// Used for zooming of full page plugins.
- virtual void setZoomFactor(float scale, bool textOnly) { }
+ virtual void setZoomLevel(double level, bool textOnly) { }
// Find interface.
// Start a new search. The plugin should search for a little bit at a time so that it
diff --git a/WebKit/chromium/public/WebPluginContainer.h b/WebKit/chromium/public/WebPluginContainer.h
index 66ef9ab..af20c66 100644
--- a/WebKit/chromium/public/WebPluginContainer.h
+++ b/WebKit/chromium/public/WebPluginContainer.h
@@ -78,6 +78,9 @@ public:
virtual void loadFrameRequest(
const WebURLRequest&, const WebString& target, bool notifyNeeded, void* notifyData) = 0;
+ // Notifies that the zoom level has changed.
+ virtual void zoomLevelChanged(double zoomLevel) = 0;
+
virtual WebPlugin* plugin() = 0;
virtual void setPlugin(WebPlugin*) = 0;
diff --git a/WebKit/chromium/public/WebResourceRawHeaders.h b/WebKit/chromium/public/WebResourceRawHeaders.h
new file mode 100644
index 0000000..b91e68b
--- /dev/null
+++ b/WebKit/chromium/public/WebResourceRawHeaders.h
@@ -0,0 +1,74 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 WebResourceRawHeaders_h
+#define WebResourceRawHeaders_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore {
+struct ResourceRawHeaders;
+}
+
+namespace WebKit {
+class WebHTTPHeaderVisitor;
+class WebResourceRawHeadersMapPrivate;
+class WebString;
+
+class WebResourceRawHeaders {
+public:
+ WebResourceRawHeaders() { initialize(); }
+ ~WebResourceRawHeaders() { reset(); }
+ WebResourceRawHeaders(const WebResourceRawHeaders& r) { assign(r); }
+ WebResourceRawHeaders& operator =(const WebResourceRawHeaders& r)
+ {
+ assign(r);
+ return *this;
+ }
+
+ WEBKIT_API void initialize();
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebResourceRawHeaders& r);
+ WEBKIT_API void addRequestHeader(const WebString& name, const WebString& value);
+ WEBKIT_API void addResponseHeader(const WebString& name, const WebString& value);
+
+#if WEBKIT_IMPLEMENTATION
+ WebResourceRawHeaders(WTF::PassRefPtr<WebCore::ResourceRawHeaders>);
+ operator WTF::PassRefPtr<WebCore::ResourceRawHeaders>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::ResourceRawHeaders> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebScriptController.h b/WebKit/chromium/public/WebScriptController.h
index 5c360b2..368f33d 100644
--- a/WebKit/chromium/public/WebScriptController.h
+++ b/WebKit/chromium/public/WebScriptController.h
@@ -51,12 +51,7 @@ public:
// matching group.
// Will only affect v8 contexts initialized after this call. Takes ownership
// of the v8::Extension object passed.
- // FIXME: remove the latter 2 versions in phase 3 of multipart checkin:
- // https://bugs.webkit.org/show_bug.cgi?id=45721
WEBKIT_API static void registerExtension(v8::Extension*);
- WEBKIT_API static void registerExtension(v8::Extension*,
- const WebString& schemeRestriction);
- WEBKIT_API static void registerExtension(v8::Extension*, int extensionGroup);
// Enables special settings which are only applicable if V8 is executed
// in the single thread which must be the main thread.
diff --git a/WebKit/chromium/public/WebBlobStorageData.h b/WebKit/chromium/public/WebThreadSafeData.h
index a9c0c8b..a000b39 100644..100755
--- a/WebKit/chromium/public/WebBlobStorageData.h
+++ b/WebKit/chromium/public/WebThreadSafeData.h
@@ -28,56 +28,50 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebBlobStorageData_h
-#define WebBlobStorageData_h
+#ifndef WebThreadSafeData_h
+#define WebThreadSafeData_h
-#include "WebBlobData.h"
-#include "WebData.h"
-#include "WebFileInfo.h"
-#include "WebString.h"
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
-#if WEBKIT_IMPLEMENTATION
-namespace WebCore { class BlobStorageData; }
-namespace WTF { template <typename T> class PassRefPtr; }
+#if !WEBKIT_IMPLEMENTATION
+#include <string>
#endif
-namespace WebKit {
+namespace WebCore { class RawData; }
-class WebBlobStorageDataPrivate;
+namespace WebKit {
-class WebBlobStorageData {
+// A container for raw bytes. It is inexpensive to copy a WebThreadSafeData object.
+// It is safe to pass a WebThreadSafeData across threads!!!
+class WebThreadSafeData {
public:
- ~WebBlobStorageData() { reset(); }
-
- WebBlobStorageData() : m_private(0) { }
+ WebThreadSafeData() { }
+ ~WebThreadSafeData() { reset(); }
+ WEBKIT_API void assign(const WebThreadSafeData&);
WEBKIT_API void reset();
- bool isNull() const { return !m_private; }
-
- // Returns the number of items.
- WEBKIT_API size_t itemCount() const;
+ WEBKIT_API size_t size() const;
+ WEBKIT_API const char* data() const;
- // Retrieves the values of the item at the given index. Returns false if
- // index is out of bounds.
- WEBKIT_API bool itemAt(size_t index, WebBlobData::Item& result) const;
-
- WEBKIT_API WebString contentType() const;
- WEBKIT_API WebString contentDisposition() const;
+ bool isEmpty() const { return !size(); }
#if WEBKIT_IMPLEMENTATION
- WebBlobStorageData(const WTF::PassRefPtr<WebCore::BlobStorageData>&);
- WebBlobStorageData& operator=(const WTF::PassRefPtr<WebCore::BlobStorageData>&);
- operator WTF::PassRefPtr<WebCore::BlobStorageData>() const;
+ WebThreadSafeData(const WTF::PassRefPtr<WebCore::RawData>&);
+ WebThreadSafeData& operator=(const WTF::PassRefPtr<WebCore::RawData>&);
+#else
+ operator std::string() const
+ {
+ size_t len = size();
+ return len ? std::string(data(), len) : std::string();
+ }
#endif
private:
-#if WEBKIT_IMPLEMENTATION
- void assign(const WTF::PassRefPtr<WebCore::BlobStorageData>&);
-#endif
- WebBlobStorageDataPrivate* m_private;
+ WebPrivatePtr<WebCore::RawData> m_private;
};
} // namespace WebKit
-#endif // WebBlobStorageData_h
+#endif
diff --git a/WebKit/chromium/public/WebURLLoaderClient.h b/WebKit/chromium/public/WebURLLoaderClient.h
index 7614ea3..87d100f 100644
--- a/WebKit/chromium/public/WebURLLoaderClient.h
+++ b/WebKit/chromium/public/WebURLLoaderClient.h
@@ -66,9 +66,6 @@ public:
// Called when the load completes successfully.
virtual void didFinishLoading(WebURLLoader*, double finishTime) { }
- // FIXME: remove this once clients are updated.
- virtual void didFinishLoading(WebURLLoader* loader) { didFinishLoading(loader, 0); }
-
// Called when the load completes with an error.
virtual void didFail(WebURLLoader*, const WebURLError&) { }
diff --git a/WebKit/chromium/public/WebURLRequest.h b/WebKit/chromium/public/WebURLRequest.h
index 36d6791..e64ce80 100644
--- a/WebKit/chromium/public/WebURLRequest.h
+++ b/WebKit/chromium/public/WebURLRequest.h
@@ -134,6 +134,11 @@ public:
WEBKIT_API bool reportLoadTiming() const;
WEBKIT_API void setReportLoadTiming(bool);
+ // Controls whether actual headers sent and received for request are
+ // collected and reported.
+ WEBKIT_API bool reportRawHeaders() const;
+ WEBKIT_API void setReportRawHeaders(bool);
+
WEBKIT_API TargetType targetType() const;
WEBKIT_API void setTargetType(TargetType);
diff --git a/WebKit/chromium/public/WebURLResponse.h b/WebKit/chromium/public/WebURLResponse.h
index ac75d4c..f78c2db 100644
--- a/WebKit/chromium/public/WebURLResponse.h
+++ b/WebKit/chromium/public/WebURLResponse.h
@@ -32,6 +32,7 @@
#define WebURLResponse_h
#include "WebCommon.h"
+#include "WebPrivateOwnPtr.h"
#if defined(WEBKIT_IMPLEMENTATION)
namespace WebCore { class ResourceResponse; }
@@ -41,6 +42,7 @@ namespace WebKit {
class WebCString;
class WebHTTPHeaderVisitor;
+class WebResourceRawHeaders;
class WebString;
class WebURL;
class WebURLLoadTiming;
@@ -82,6 +84,9 @@ public:
WEBKIT_API WebURLLoadTiming loadTiming();
WEBKIT_API void setLoadTiming(const WebURLLoadTiming&);
+ WEBKIT_API WebResourceRawHeaders resourceRawHeaders();
+ WEBKIT_API void setResourceRawHeaders(const WebResourceRawHeaders&);
+
WEBKIT_API double responseTime() const;
WEBKIT_API void setResponseTime(double);
diff --git a/WebKit/chromium/public/WebVideoFrame.h b/WebKit/chromium/public/WebVideoFrame.h
index 5e34f2a..58f1111 100644
--- a/WebKit/chromium/public/WebVideoFrame.h
+++ b/WebKit/chromium/public/WebVideoFrame.h
@@ -53,10 +53,7 @@ public:
enum SurfaceType {
SurfaceTypeSystemMemory,
- SurfaceTypeOMXBufferHead,
- SurfaceTypeEGLImage,
- SurfaceTypeMFBuffer,
- SurfaceTypeDirect3DSurface
+ SurfaceTypeTexture,
};
virtual SurfaceType surfaceType() const = 0;
@@ -66,6 +63,7 @@ public:
virtual unsigned planes() const = 0;
virtual int stride(unsigned plane) const = 0;
virtual const void* data(unsigned plane) const = 0;
+ virtual unsigned texture(unsigned plane) const = 0;
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index 7a8a4af..e504bd7 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -54,6 +54,10 @@ struct WebPoint;
class WebView : public WebWidget {
public:
+ WEBKIT_API static const double textSizeMultiplierRatio;
+ WEBKIT_API static const double minTextSizeMultiplier;
+ WEBKIT_API static const double maxTextSizeMultiplier;
+
// Controls the time that user scripts injected into the document run.
enum UserScriptInjectAt {
UserScriptInjectAtDocumentStart,
@@ -157,13 +161,18 @@ public:
// send it.
virtual void clearFocusedNode() = 0;
+ // Scrolls the node currently in focus into view.
+ virtual void scrollFocusedNodeIntoView() = 0;
+
// Zoom ----------------------------------------------------------------
// Returns the current zoom level. 0 is "original size", and each increment
- // above or below represents zooming 20% larger or smaller to limits of 300%
- // and 50% of original size, respectively.
- virtual int zoomLevel() = 0;
+ // above or below represents zooming 20% larger or smaller to default limits
+ // of 300% and 50% of original size, respectively. Only plugins use
+ // non whole-numbers, since they might choose to have specific zoom level so
+ // that fixed-width content is fit-to-page-width, for example.
+ virtual double zoomLevel() = 0;
// Changes the zoom level to the specified level, clamping at the limits
// noted above, and returns the current zoom level after applying the
@@ -173,7 +182,16 @@ public:
// page will be zoomed. You can only have either text zoom or full page zoom
// at one time. Changing the mode while the page is zoomed will have odd
// effects.
- virtual int setZoomLevel(bool textOnly, int zoomLevel) = 0;
+ virtual double setZoomLevel(bool textOnly, double zoomLevel) = 0;
+
+ // Updates the zoom limits for this view.
+ virtual void zoomLimitsChanged(double minimumZoomLevel,
+ double maximumZoomLevel) = 0;
+
+ // Helper functions to convert between zoom level and zoom factor. zoom
+ // factor is zoom percent / 100, so 300% = 3.0.
+ WEBKIT_API static double zoomLevelToZoomFactor(double zoomLevel);
+ WEBKIT_API static double zoomFactorToZoomLevel(double factor);
// Media ---------------------------------------------------------------
@@ -208,6 +226,9 @@ public:
const WebDragData&, int identity,
const WebPoint& clientPoint, const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed) = 0;
+ virtual WebDragOperation dragTargetDragEnterNew(
+ int identity, const WebPoint& clientPoint, const WebPoint& screenPoint,
+ WebDragOperationsMask operationsAllowed) = 0;
virtual WebDragOperation dragTargetDragOver(
const WebPoint& clientPoint, const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed) = 0;
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index 3b0e47a..858cb2a 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -272,10 +272,6 @@ public:
// Accessibility -------------------------------------------------------
- // Notifies embedder that the focus has changed to the given
- // accessibility object.
- virtual void focusAccessibilityObject(const WebAccessibilityObject&) { }
-
// Notifies embedder about an accessibility notification.
virtual void postAccessibilityNotification(const WebAccessibilityObject&, WebAccessibilityNotification) { }
@@ -348,6 +344,17 @@ public:
// Access the embedder API for device orientation services.
virtual WebDeviceOrientationClient* deviceOrientationClient() { return 0; }
+
+ // Zoom ----------------------------------------------------------------
+
+ // Informs the browser that the zoom levels for this frame have changed from
+ // the default values.
+ virtual void zoomLimitsChanged(double minimumLevel, double maximumLevel) { }
+
+ // Informs the browser that the zoom level has changed as a result of an
+ // action that wasn't initiated by the client.
+ virtual void zoomLevelChanged() { }
+
protected:
~WebViewClient() { }
};
diff --git a/WebKit/chromium/public/linux/WebThemeEngine.h b/WebKit/chromium/public/linux/WebThemeEngine.h
new file mode 100644
index 0000000..fd72cf7
--- /dev/null
+++ b/WebKit/chromium/public/linux/WebThemeEngine.h
@@ -0,0 +1,89 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 WebThemeEngine_h
+#define WebThemeEngine_h
+
+#include "../WebCanvas.h"
+#include "../WebColor.h"
+#include "../WebSize.h"
+
+namespace WebKit {
+
+struct WebRect;
+
+class WebThemeEngine {
+public:
+ // The UI part which is being accessed.
+ enum Part {
+ PartScrollbarDownArrow,
+ PartScrollbarLeftArrow,
+ PartScrollbarRightArrow,
+ PartScrollbarUpArrow,
+ PartScrollbarHorizontalThumb,
+ PartScrollbarVerticalThumb,
+ PartScrollbarHoriztonalTrack,
+ PartScrollbarVerticalTrack
+ };
+
+ // The current state of the associated Part.
+ enum State {
+ StateDisabled,
+ StateHover,
+ StateNormal,
+ StatePressed,
+ };
+
+ // Extra parameters for drawing the PartScrollbarHoriztonalTrack and
+ // PartScrollbarVerticalTrack.
+ struct ScrollbarTrackExtraParams {
+ // The bounds of the entire track, as opposed to the part being painted.
+ int trackX;
+ int trackY;
+ int trackWidth;
+ int trackHeight;
+ };
+
+ union ExtraParams {
+ ScrollbarTrackExtraParams scrollbarTrack;
+ };
+
+ // Gets the size of the given theme part. For variable sized items
+ // like vertical scrollbar thumbs, the width will be the required width of
+ // the track while the height will be the minimum height.
+ virtual WebSize getSize(Part) { return WebSize(); }
+ // Paint the given the given theme part.
+ virtual void paint(
+ WebCanvas*, Part, State, const WebRect&, const ExtraParams*) {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebThemeEngine.h b/WebKit/chromium/public/win/WebThemeEngine.h
index ab59fa2..1890db6 100644
--- a/WebKit/chromium/public/WebThemeEngine.h
+++ b/WebKit/chromium/public/win/WebThemeEngine.h
@@ -31,8 +31,9 @@
#ifndef WebThemeEngine_h
#define WebThemeEngine_h
-#include "WebCanvas.h"
-#include "WebColor.h"
+#include "../WebCanvas.h"
+#include "../WebColor.h"
+#include "../WebSize.h"
namespace WebKit {
@@ -41,7 +42,6 @@ struct WebSize;
class WebThemeEngine {
public:
-#ifdef WIN32
// The part and state parameters correspond to values defined by the
// Windows Theme API (see
// http://msdn.microsoft.com/en-us/library/bb773187(VS.85).aspx ).
@@ -83,8 +83,6 @@ public:
virtual void paintProgressBar(
WebCanvas*, const WebRect& barRect, const WebRect& valueRect,
bool determinate, double animatedSeconds) {}
-
-#endif
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/ApplicationCacheHost.cpp b/WebKit/chromium/src/ApplicationCacheHost.cpp
index 3bfcfe2..f1b1a91 100644
--- a/WebKit/chromium/src/ApplicationCacheHost.cpp
+++ b/WebKit/chromium/src/ApplicationCacheHost.cpp
@@ -108,7 +108,7 @@ void ApplicationCacheHost::selectCacheWithManifest(const KURL& manifestURL)
// see WebCore::ApplicationCacheGroup::selectCache()
const KURL& docURL = m_documentLoader->frame()->document()->url();
String referrer = m_documentLoader->frameLoader()->referrer();
- m_documentLoader->frame()->redirectScheduler()->scheduleLocationChange(docURL, referrer);
+ m_documentLoader->frame()->navigationScheduler()->scheduleLocationChange(docURL, referrer);
}
}
}
@@ -256,6 +256,11 @@ void ApplicationCacheHost::stopDeferringEvents()
m_defersEvents = false;
}
+void ApplicationCacheHost::stopLoadingInFrame(Frame* frame)
+{
+ // FIXME: Implement this method.
+}
+
void ApplicationCacheHost::dispatchDOMEvent(EventID id, int total, int done)
{
if (m_domApplicationCache) {
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index f3b8f5a..9647a44 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -321,10 +321,7 @@ COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatEmpty, VideoFrameChromium::Emp
COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatASCII, VideoFrameChromium::ASCII);
COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::SurfaceTypeSystemMemory, VideoFrameChromium::TypeSystemMemory);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::SurfaceTypeOMXBufferHead, VideoFrameChromium::TypeOMXBufferHead);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::SurfaceTypeEGLImage, VideoFrameChromium::TypeEGLImage);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::SurfaceTypeMFBuffer, VideoFrameChromium::TypeMFBuffer);
-COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::SurfaceTypeDirect3DSurface, VideoFrameChromium::TypeDirect3DSurface);
+COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::SurfaceTypeTexture, VideoFrameChromium::TypeTexture);
#endif
#if ENABLE(NOTIFICATIONS)
diff --git a/WebKit/chromium/src/AsyncFileSystemChromium.cpp b/WebKit/chromium/src/AsyncFileSystemChromium.cpp
index db65bbd..5975e72 100644
--- a/WebKit/chromium/src/AsyncFileSystemChromium.cpp
+++ b/WebKit/chromium/src/AsyncFileSystemChromium.cpp
@@ -61,14 +61,14 @@ AsyncFileSystemChromium::~AsyncFileSystemChromium()
{
}
-void AsyncFileSystemChromium::move(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+void AsyncFileSystemChromium::move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- m_webFileSystem->move(srcPath, destPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ m_webFileSystem->move(sourcePath, destinationPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
-void AsyncFileSystemChromium::copy(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+void AsyncFileSystemChromium::copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
- m_webFileSystem->copy(srcPath, destPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ m_webFileSystem->copy(sourcePath, destinationPath, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
void AsyncFileSystemChromium::remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
@@ -76,6 +76,11 @@ void AsyncFileSystemChromium::remove(const String& path, PassOwnPtr<AsyncFileSys
m_webFileSystem->remove(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
+void AsyncFileSystemChromium::removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->removeRecursively(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+}
+
void AsyncFileSystemChromium::readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
m_webFileSystem->readMetadata(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
diff --git a/WebKit/chromium/src/AsyncFileSystemChromium.h b/WebKit/chromium/src/AsyncFileSystemChromium.h
index d8698d5..6205609 100644
--- a/WebKit/chromium/src/AsyncFileSystemChromium.h
+++ b/WebKit/chromium/src/AsyncFileSystemChromium.h
@@ -34,7 +34,7 @@
#if ENABLE(FILE_SYSTEM)
#include "AsyncFileSystem.h"
-#include <wtf/PassRefPtr.h>
+#include <wtf/PassOwnPtr.h>
namespace WebKit {
class WebFileSystem;
@@ -46,12 +46,17 @@ class AsyncFileSystemCallbacks;
class AsyncFileSystemChromium : public AsyncFileSystem {
public:
- AsyncFileSystemChromium(const String& rootPath);
+ static PassOwnPtr<AsyncFileSystem> create(const String& rootPath)
+ {
+ return adoptPtr(new AsyncFileSystemChromium(rootPath));
+ }
+
virtual ~AsyncFileSystemChromium();
- virtual void move(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks>);
- virtual void copy(const String& srcPath, const String& destPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
virtual void readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
virtual void createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
virtual void createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
@@ -61,6 +66,7 @@ public:
virtual void createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
private:
+ explicit AsyncFileSystemChromium(const String& rootPath);
WebKit::WebFileSystem* m_webFileSystem;
};
diff --git a/WebKit/chromium/src/BackForwardListClientImpl.cpp b/WebKit/chromium/src/BackForwardListClientImpl.cpp
index f5b04ab..2976329 100644
--- a/WebKit/chromium/src/BackForwardListClientImpl.cpp
+++ b/WebKit/chromium/src/BackForwardListClientImpl.cpp
@@ -34,6 +34,7 @@
#include "HistoryItem.h"
#include "WebViewClient.h"
#include "WebViewImpl.h"
+#include <wtf/text/StringConcatenate.h>
using namespace WebCore;
@@ -102,11 +103,8 @@ HistoryItem* BackForwardListClientImpl::itemAtIndex(int index)
// differently. It should perhaps just ask the FrameLoaderClient to
// perform those navigations.
- String url_string = String::format(
- "%s://go/%d", backForwardNavigationScheme, index);
-
- m_pendingHistoryItem =
- HistoryItem::create(url_string, String(), 0.0);
+ String urlString = makeString(backForwardNavigationScheme, "://go/", String::number(index));
+ m_pendingHistoryItem = HistoryItem::create(urlString, String(), 0);
return m_pendingHistoryItem.get();
}
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index 5f702e0..4f1705f 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -55,10 +55,10 @@
#include "NotificationPresenterImpl.h"
#include "Page.h"
#include "PopupMenuChromium.h"
+#include "RenderWidget.h"
#include "ScriptController.h"
#include "SearchPopupMenuChromium.h"
#include "SecurityOrigin.h"
-#include "SharedGraphicsContext3D.h"
#if USE(V8)
#include "V8Proxy.h"
#endif
@@ -72,6 +72,8 @@
#include "WebInputEvent.h"
#include "WebKit.h"
#include "WebNode.h"
+#include "WebPlugin.h"
+#include "WebPluginContainerImpl.h"
#include "WebPopupMenuImpl.h"
#include "WebPopupMenuInfo.h"
#include "WebPopupType.h"
@@ -246,28 +248,6 @@ void ChromeClientImpl::focusedNodeChanged(Node* node)
focusURL = hitTest.absoluteLinkURL();
}
m_webView->client()->setKeyboardFocusURL(focusURL);
-
- if (!node)
- return;
-
- // If accessibility is enabled, we should notify assistive technology that
- // the active AccessibilityObject changed.
- Document* document = node->document();
- if (!document) {
- ASSERT_NOT_REACHED();
- return;
- }
-
- // TODO: Remove once the FocusedUIElementChanged notification is handled downstream.
- if (document && document->axObjectCache()->accessibilityEnabled()) {
- // Retrieve the focused AccessibilityObject.
- AccessibilityObject* focusedAccObj =
- document->axObjectCache()->getOrCreate(node->renderer());
-
- // Alert assistive technology that focus changed.
- if (focusedAccObj)
- m_webView->client()->focusAccessibilityObject(WebAccessibilityObject(focusedAccObj));
- }
}
Page* ChromeClientImpl::createWindow(
@@ -604,11 +584,25 @@ void ChromeClientImpl::mouseDidMoveOverElement(
{
if (!m_webView->client())
return;
+
+ WebURL url;
// Find out if the mouse is over a link, and if so, let our UI know...
if (result.isLiveLink() && !result.absoluteLinkURL().string().isEmpty())
- m_webView->client()->setMouseOverURL(result.absoluteLinkURL());
- else
- m_webView->client()->setMouseOverURL(WebURL());
+ url = result.absoluteLinkURL();
+ else if (result.innerNonSharedNode()
+ && (result.innerNonSharedNode()->hasTagName(HTMLNames::objectTag)
+ || result.innerNonSharedNode()->hasTagName(HTMLNames::embedTag))) {
+ RenderObject* object = result.innerNonSharedNode()->renderer();
+ if (object && object->isWidget()) {
+ Widget* widget = toRenderWidget(object)->widget();
+ if (widget && widget->isPluginContainer()) {
+ WebPluginContainerImpl* plugin = static_cast<WebPluginContainerImpl*>(widget);
+ url = plugin->plugin()->linkAtPosition(result.point());
+ }
+ }
+ }
+
+ m_webView->client()->setMouseOverURL(url);
}
void ChromeClientImpl::setToolTip(const String& tooltipText, TextDirection dir)
@@ -777,15 +771,23 @@ NotificationPresenter* ChromeClientImpl::notificationPresenter() const
void ChromeClientImpl::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ // FIXME: Implement Client-based Geolocation Permissions
+#else
GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService());
geolocationService->geolocationServiceBridge()->attachBridgeIfNeeded();
m_webView->client()->geolocationService()->requestPermissionForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url());
+#endif
}
void ChromeClientImpl::cancelGeolocationPermissionRequestForFrame(Frame* frame, Geolocation* geolocation)
{
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ // FIXME: Implement Client-based Geolocation Permissions
+#else
GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService());
m_webView->client()->geolocationService()->cancelPermissionRequestForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url());
+#endif
}
#if USE(ACCELERATED_COMPOSITING)
@@ -805,11 +807,6 @@ bool ChromeClientImpl::allowsAcceleratedCompositing() const
}
#endif
-WebCore::SharedGraphicsContext3D* ChromeClientImpl::getSharedGraphicsContext3D()
-{
- return m_webView->getSharedGraphicsContext3D();
-}
-
bool ChromeClientImpl::supportsFullscreenForNode(const WebCore::Node* node)
{
if (m_webView->client() && node->hasTagName(WebCore::HTMLNames::videoTag))
diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h
index 02f1de6..b1208f7 100644
--- a/WebKit/chromium/src/ChromeClientImpl.h
+++ b/WebKit/chromium/src/ChromeClientImpl.h
@@ -155,8 +155,6 @@ public:
virtual bool allowsAcceleratedCompositing() const;
#endif
- virtual WebCore::SharedGraphicsContext3D* getSharedGraphicsContext3D();
-
virtual bool supportsFullscreenForNode(const WebCore::Node*);
virtual void enterFullscreenForNode(WebCore::Node*);
virtual void exitFullscreenForNode(WebCore::Node*);
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index b906575..1af32cf 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -63,10 +63,11 @@
#if OS(WINDOWS)
#include "WebRect.h"
-#include "WebThemeEngine.h"
+#include "win/WebThemeEngine.h"
#endif
#if OS(LINUX) || OS(FREEBSD)
+#include "linux/WebThemeEngine.h"
#include "WebFontInfo.h"
#include "WebFontRenderStyle.h"
#endif
@@ -85,7 +86,11 @@
#include "PlatformContextSkia.h"
#include "PluginData.h"
#include "SharedBuffer.h"
+
+#if !ENABLE(CLIENT_BASED_GEOLOCATION)
#include "WebGeolocationServiceBridgeImpl.h"
+#endif
+
#include "Worker.h"
#include "WorkerContextProxy.h"
#include <wtf/Assertions.h>
@@ -464,12 +469,14 @@ bool ChromiumBridge::loadFont(NSFont* srcFont, ATSFontContainerRef* out)
}
#endif
+#if !ENABLE(CLIENT_BASED_GEOLOCATION)
// Geolocation ----------------------------------------------------------------
GeolocationServiceBridge* ChromiumBridge::createGeolocationServiceBridge(GeolocationServiceChromium* geolocationServiceChromium)
{
return createGeolocationServiceBridgeImpl(geolocationServiceChromium);
}
+#endif
// Databases ------------------------------------------------------------------
@@ -584,14 +591,9 @@ bool ChromiumBridge::plugins(bool refresh, Vector<PluginInfo>* results)
NPObject* ChromiumBridge::pluginScriptableObject(Widget* widget)
{
- if (!widget)
+ if (!widget || !widget->isPluginContainer())
return 0;
- ASSERT(!widget->isFrameView());
-
- // NOTE: We have to trust that the widget passed to us here is a
- // WebPluginContainerImpl. There isn't a way to dynamically verify it,
- // since the derived class (Widget) has no identifier.
return static_cast<WebPluginContainerImpl*>(widget)->scriptableObject();
}
@@ -739,6 +741,60 @@ void ChromiumBridge::paintProgressBar(
gc->platformContext()->canvas(), barRect, valueRect, determinate, animatedSeconds);
}
+#elif OS(LINUX)
+
+static WebThemeEngine::Part WebThemePart(ChromiumBridge::ThemePart part)
+{
+ switch (part) {
+ case ChromiumBridge::PartScrollbarDownArrow: return WebThemeEngine::PartScrollbarDownArrow;
+ case ChromiumBridge::PartScrollbarLeftArrow: return WebThemeEngine::PartScrollbarLeftArrow;
+ case ChromiumBridge::PartScrollbarRightArrow: return WebThemeEngine::PartScrollbarRightArrow;
+ case ChromiumBridge::PartScrollbarUpArrow: return WebThemeEngine::PartScrollbarUpArrow;
+ case ChromiumBridge::PartScrollbarHorizontalThumb: return WebThemeEngine::PartScrollbarHorizontalThumb;
+ case ChromiumBridge::PartScrollbarVerticalThumb: return WebThemeEngine::PartScrollbarVerticalThumb;
+ case ChromiumBridge::PartScrollbarHoriztonalTrack: return WebThemeEngine::PartScrollbarHoriztonalTrack;
+ case ChromiumBridge::PartScrollbarVerticalTrack: return WebThemeEngine::PartScrollbarVerticalTrack;
+ }
+ ASSERT_NOT_REACHED();
+ return WebThemeEngine::PartScrollbarDownArrow;
+}
+
+static WebThemeEngine::State WebThemeState(ChromiumBridge::ThemePaintState state)
+{
+ switch (state) {
+ case ChromiumBridge::StateDisabled: return WebThemeEngine::StateDisabled;
+ case ChromiumBridge::StateHover: return WebThemeEngine::StateHover;
+ case ChromiumBridge::StateNormal: return WebThemeEngine::StateNormal;
+ case ChromiumBridge::StatePressed: return WebThemeEngine::StatePressed;
+ }
+ ASSERT_NOT_REACHED();
+ return WebThemeEngine::StateDisabled;
+}
+
+static void GetWebThemeExtraParams(ChromiumBridge::ThemePart part, ChromiumBridge::ThemePaintState state, const ChromiumBridge::ThemePaintExtraParams* extraParams, WebThemeEngine::ExtraParams* webThemeExtraParams)
+{
+ if (part == ChromiumBridge::PartScrollbarHoriztonalTrack || part == ChromiumBridge::PartScrollbarVerticalTrack) {
+ webThemeExtraParams->scrollbarTrack.trackX = extraParams->scrollbarTrack.trackX;
+ webThemeExtraParams->scrollbarTrack.trackY = extraParams->scrollbarTrack.trackY;
+ webThemeExtraParams->scrollbarTrack.trackWidth = extraParams->scrollbarTrack.trackWidth;
+ webThemeExtraParams->scrollbarTrack.trackHeight = extraParams->scrollbarTrack.trackHeight;
+ }
+}
+
+IntSize ChromiumBridge::getThemePartSize(ThemePart part)
+{
+ return webKitClient()->themeEngine()->getSize(WebThemePart(part));
+}
+
+void ChromiumBridge::paintThemePart(
+ GraphicsContext* gc, ThemePart part, ThemePaintState state, const IntRect& rect, const ThemePaintExtraParams* extraParams)
+{
+ WebThemeEngine::ExtraParams webThemeExtraParams;
+ GetWebThemeExtraParams(part, state, extraParams, &webThemeExtraParams);
+ webKitClient()->themeEngine()->paint(
+ gc->platformContext()->canvas(), WebThemePart(part), WebThemeState(state), rect, &webThemeExtraParams);
+}
+
#endif
// Trace Event ----------------------------------------------------------------
diff --git a/WebKit/chromium/src/ContextMenuClientImpl.cpp b/WebKit/chromium/src/ContextMenuClientImpl.cpp
index ef611e1..d9ccb17 100644
--- a/WebKit/chromium/src/ContextMenuClientImpl.cpp
+++ b/WebKit/chromium/src/ContextMenuClientImpl.cpp
@@ -208,7 +208,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
RenderObject* object = r.innerNonSharedNode()->renderer();
if (object && object->isWidget()) {
Widget* widget = toRenderWidget(object)->widget();
- if (widget) {
+ if (widget && widget->isPluginContainer()) {
WebPluginContainerImpl* plugin = static_cast<WebPluginContainerImpl*>(widget);
WebString text = plugin->plugin()->selectionAsText();
if (!text.isEmpty()) {
@@ -216,6 +216,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
data.editFlags |= WebContextMenuData::CanCopy;
}
data.editFlags &= ~WebContextMenuData::CanTranslate;
+ data.linkURL = plugin->plugin()->linkAtPosition(data.mousePosition);
}
}
}
diff --git a/WebKit/chromium/src/DebuggerAgentManager.cpp b/WebKit/chromium/src/DebuggerAgentManager.cpp
index dfc186c..0860cb1 100644
--- a/WebKit/chromium/src/DebuggerAgentManager.cpp
+++ b/WebKit/chromium/src/DebuggerAgentManager.cpp
@@ -41,6 +41,7 @@
#include "WebViewImpl.h"
#include <wtf/HashSet.h>
#include <wtf/Noncopyable.h>
+#include <wtf/text/StringConcatenate.h>
namespace WebKit {
@@ -153,10 +154,9 @@ void DebuggerAgentManager::debugDetach(DebuggerAgentImpl* debuggerAgent)
}
} else {
// Remove all breakpoints set by the agent.
- WTF::String clearBreakpointGroupCmd = WTF::String::format(
+ String clearBreakpointGroupCmd = makeString(
"{\"seq\":1,\"type\":\"request\",\"command\":\"clearbreakpointgroup\","
- "\"arguments\":{\"groupId\":%d}}",
- hostId);
+ "\"arguments\":{\"groupId\":", String::number(hostId), "}}");
sendCommandToV8(clearBreakpointGroupCmd, new CallerIdWrapper());
if (isOnBreakpoint) {
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index ba9c8fd..b4c62f4 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -1072,7 +1072,11 @@ void FrameLoaderClientImpl::committedLoad(DocumentLoader* loader, const char* da
m_pluginWidget->didReceiveResponse(
m_webFrame->frame()->loader()->activeDocumentLoader()->response());
}
- m_pluginWidget->didReceiveData(data, length);
+
+ // It's possible that the above call removed the pointer to the plugin, so
+ // check before calling it.
+ if (m_pluginWidget.get())
+ m_pluginWidget->didReceiveData(data, length);
}
}
@@ -1411,14 +1415,6 @@ PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
if (!webPlugin->initialize(container.get()))
return 0;
- bool zoomTextOnly = m_webFrame->viewImpl()->zoomTextOnly();
- float zoomFactor = zoomTextOnly ? m_webFrame->frame()->textZoomFactor() : m_webFrame->frame()->pageZoomFactor();
- if (zoomFactor != 1) {
- // There's a saved zoom level, so tell the plugin about it since
- // WebViewImpl::setZoomLevel was called before the plugin was created.
- webPlugin->setZoomFactor(zoomFactor, zoomTextOnly);
- }
-
// The element might have been removed during plugin initialization!
if (!element->renderer())
return 0;
@@ -1430,7 +1426,8 @@ PassRefPtr<Widget> FrameLoaderClientImpl::createPlugin(
// (e.g., acrobat reader).
void FrameLoaderClientImpl::redirectDataToPlugin(Widget* pluginWidget)
{
- m_pluginWidget = static_cast<WebPluginContainerImpl*>(pluginWidget);
+ if (pluginWidget->isPluginContainer())
+ m_pluginWidget = static_cast<WebPluginContainerImpl*>(pluginWidget);
ASSERT(m_pluginWidget.get());
}
diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3DChromium.cpp
index c78d334..afc2707 100644
--- a/WebKit/chromium/src/GraphicsContext3D.cpp
+++ b/WebKit/chromium/src/GraphicsContext3DChromium.cpp
@@ -801,15 +801,15 @@ GraphicsContext3D::~GraphicsContext3D()
{
}
-PassOwnPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
+PassRefPtr<GraphicsContext3D> GraphicsContext3D::create(GraphicsContext3D::Attributes attrs, HostWindow* hostWindow, GraphicsContext3D::RenderStyle renderStyle)
{
OwnPtr<GraphicsContext3DInternal> internal = adoptPtr(new GraphicsContext3DInternal());
if (!internal->initialize(attrs, hostWindow, renderStyle == RenderDirectlyToHostWindow)) {
return 0;
}
- PassOwnPtr<GraphicsContext3D> result = new GraphicsContext3D(attrs, hostWindow, renderStyle == RenderDirectlyToHostWindow);
+ RefPtr<GraphicsContext3D> result = adoptRef(new GraphicsContext3D(attrs, hostWindow, renderStyle == RenderDirectlyToHostWindow));
result->m_internal = internal.release();
- return result;
+ return result.release();
}
PlatformGraphicsContext3D GraphicsContext3D::platformGraphicsContext3D() const
@@ -1047,6 +1047,11 @@ bool GraphicsContext3D::isErrorGeneratedOnOutOfBoundsAccesses() const
return m_internal->isErrorGeneratedOnOutOfBoundsAccesses();
}
+int GraphicsContext3D::getGraphicsResetStatusARB()
+{
+ return NO_ERROR;
+}
+
} // namespace WebCore
#endif // ENABLE(3D_CANVAS)
diff --git a/WebKit/chromium/src/IDBCallbacksProxy.cpp b/WebKit/chromium/src/IDBCallbacksProxy.cpp
index 3eab622..69051d0 100644
--- a/WebKit/chromium/src/IDBCallbacksProxy.cpp
+++ b/WebKit/chromium/src/IDBCallbacksProxy.cpp
@@ -38,6 +38,7 @@
#include "WebIDBIndexImpl.h"
#include "WebIDBKey.h"
#include "WebIDBObjectStoreImpl.h"
+#include "WebIDBTransactionImpl.h"
#include "WebSerializedScriptValue.h"
#if ENABLE(INDEXED_DATABASE)
@@ -100,6 +101,12 @@ void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBObjectStoreBackendInterface> bac
m_callbacks.clear();
}
+void IDBCallbacksProxy::onSuccess(PassRefPtr<IDBTransactionBackendInterface> backend)
+{
+ m_callbacks->onSuccess(new WebKit::WebIDBTransactionImpl(backend));
+ m_callbacks.clear();
+}
+
void IDBCallbacksProxy::onSuccess(PassRefPtr<SerializedScriptValue> serializedScriptValue)
{
m_callbacks->onSuccess(WebKit::WebSerializedScriptValue(serializedScriptValue));
diff --git a/WebKit/chromium/src/IDBCallbacksProxy.h b/WebKit/chromium/src/IDBCallbacksProxy.h
index 506dbb0..8c26161 100644
--- a/WebKit/chromium/src/IDBCallbacksProxy.h
+++ b/WebKit/chromium/src/IDBCallbacksProxy.h
@@ -54,6 +54,7 @@ public:
virtual void onSuccess(PassRefPtr<IDBIndexBackendInterface>);
virtual void onSuccess(PassRefPtr<IDBKey>);
virtual void onSuccess(PassRefPtr<IDBObjectStoreBackendInterface>);
+ virtual void onSuccess(PassRefPtr<IDBTransactionBackendInterface>);
virtual void onSuccess(PassRefPtr<SerializedScriptValue>);
private:
diff --git a/WebKit/chromium/src/IDBCursorBackendProxy.cpp b/WebKit/chromium/src/IDBCursorBackendProxy.cpp
index cf18917..94491f9 100644
--- a/WebKit/chromium/src/IDBCursorBackendProxy.cpp
+++ b/WebKit/chromium/src/IDBCursorBackendProxy.cpp
@@ -75,19 +75,19 @@ PassRefPtr<IDBAny> IDBCursorBackendProxy::value() const
return IDBAny::create<IDBKey>(webKey);
}
-void IDBCursorBackendProxy::update(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBCallbacks> callbacks)
+void IDBCursorBackendProxy::update(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec)
{
- m_idbCursor->update(value, new WebIDBCallbacksImpl(callbacks));
+ m_idbCursor->update(value, new WebIDBCallbacksImpl(callbacks), ec);
}
-void IDBCursorBackendProxy::continueFunction(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks)
+void IDBCursorBackendProxy::continueFunction(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec)
{
- m_idbCursor->continueFunction(key, new WebIDBCallbacksImpl(callbacks));
+ m_idbCursor->continueFunction(key, new WebIDBCallbacksImpl(callbacks), ec);
}
-void IDBCursorBackendProxy::remove(PassRefPtr<IDBCallbacks> callbacks)
+void IDBCursorBackendProxy::remove(PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec)
{
- m_idbCursor->remove(new WebIDBCallbacksImpl(callbacks));
+ m_idbCursor->remove(new WebIDBCallbacksImpl(callbacks), ec);
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/IDBCursorBackendProxy.h b/WebKit/chromium/src/IDBCursorBackendProxy.h
index d8b621a..0a7a288 100644
--- a/WebKit/chromium/src/IDBCursorBackendProxy.h
+++ b/WebKit/chromium/src/IDBCursorBackendProxy.h
@@ -45,9 +45,9 @@ public:
virtual unsigned short direction() const;
virtual PassRefPtr<IDBKey> key() const;
virtual PassRefPtr<IDBAny> value() const;
- virtual void update(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBCallbacks>);
- virtual void continueFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>);
- virtual void remove(PassRefPtr<IDBCallbacks>);
+ virtual void update(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBCallbacks>, ExceptionCode&);
+ virtual void continueFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, ExceptionCode&);
+ virtual void remove(PassRefPtr<IDBCallbacks>, ExceptionCode&);
private:
IDBCursorBackendProxy(PassOwnPtr<WebKit::WebIDBCursor>);
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.cpp b/WebKit/chromium/src/IDBDatabaseProxy.cpp
index ce5e0a6..4fecf1b 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.cpp
+++ b/WebKit/chromium/src/IDBDatabaseProxy.cpp
@@ -76,36 +76,42 @@ PassRefPtr<DOMStringList> IDBDatabaseProxy::objectStores() const
return m_webIDBDatabase->objectStores();
}
-void IDBDatabaseProxy::createObjectStore(const String& name, const String& keyPath, bool autoIncrement, PassRefPtr<IDBCallbacks> callbacks)
+PassRefPtr<IDBObjectStoreBackendInterface> IDBDatabaseProxy::createObjectStore(const String& name, const String& keyPath, bool autoIncrement, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
- m_webIDBDatabase->createObjectStore(name, keyPath, autoIncrement, new WebIDBCallbacksImpl(callbacks));
-}
-
-PassRefPtr<IDBObjectStoreBackendInterface> IDBDatabaseProxy::objectStore(const String& name, unsigned short mode)
-{
- WebKit::WebIDBObjectStore* objectStore = m_webIDBDatabase->objectStore(name, mode);
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ WebKit::WebIDBObjectStore* objectStore = m_webIDBDatabase->createObjectStore(name, keyPath, autoIncrement, *transactionProxy->getWebIDBTransaction(), ec);
if (!objectStore)
return 0;
return IDBObjectStoreProxy::create(objectStore);
}
-void IDBDatabaseProxy::removeObjectStore(const String& name, PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseProxy::removeObjectStore(const String& name, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
- m_webIDBDatabase->removeObjectStore(name, new WebIDBCallbacksImpl(callbacks));
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBDatabase->removeObjectStore(name, *transactionProxy->getWebIDBTransaction(), ec);
}
-void IDBDatabaseProxy::setVersion(const String& version, PassRefPtr<IDBCallbacks> callbacks)
+void IDBDatabaseProxy::setVersion(const String& version, PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec)
{
- m_webIDBDatabase->setVersion(version, new WebIDBCallbacksImpl(callbacks));
+ m_webIDBDatabase->setVersion(version, new WebIDBCallbacksImpl(callbacks), ec);
}
-PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseProxy::transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout)
+PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseProxy::transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout, ExceptionCode& ec)
{
WebKit::WebDOMStringList names(storeNames);
- WebKit::WebIDBTransaction* transaction = m_webIDBDatabase->transaction(names, mode, timeout);
+ WebKit::WebIDBTransaction* transaction = m_webIDBDatabase->transaction(names, mode, timeout, ec);
return IDBTransactionBackendProxy::create(transaction);
}
+void IDBDatabaseProxy::close()
+{
+ m_webIDBDatabase->close();
+}
+
} // namespace WebCore
#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.h b/WebKit/chromium/src/IDBDatabaseProxy.h
index fffd23e..5d20073 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.h
+++ b/WebKit/chromium/src/IDBDatabaseProxy.h
@@ -47,13 +47,11 @@ public:
virtual String version() const;
virtual PassRefPtr<DOMStringList> objectStores() const;
- // FIXME: Add setVersion.
-
- virtual void createObjectStore(const String& name, const String& keyPath, bool autoIncrement, PassRefPtr<IDBCallbacks>);
- virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name, unsigned short mode);
- virtual void removeObjectStore(const String& name, PassRefPtr<IDBCallbacks>);
- virtual void setVersion(const String& version, PassRefPtr<IDBCallbacks>);
- virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout);
+ virtual PassRefPtr<IDBObjectStoreBackendInterface> createObjectStore(const String& name, const String& keyPath, bool autoIncrement, IDBTransactionBackendInterface*, ExceptionCode&);
+ virtual void removeObjectStore(const String& name, IDBTransactionBackendInterface*, ExceptionCode&);
+ virtual void setVersion(const String& version, PassRefPtr<IDBCallbacks>, ExceptionCode&);
+ virtual PassRefPtr<IDBTransactionBackendInterface> transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout, ExceptionCode&);
+ virtual void close();
private:
IDBDatabaseProxy(PassOwnPtr<WebKit::WebIDBDatabase>);
diff --git a/WebKit/chromium/src/IDBFactoryBackendProxy.cpp b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp
index d43e787..2e65246 100755
--- a/WebKit/chromium/src/IDBFactoryBackendProxy.cpp
+++ b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp
@@ -59,10 +59,10 @@ IDBFactoryBackendProxy::~IDBFactoryBackendProxy()
{
}
-void IDBFactoryBackendProxy::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame, const String& dataDir)
+void IDBFactoryBackendProxy::open(const String& name, const String& description, PassRefPtr<IDBCallbacks> callbacks, PassRefPtr<SecurityOrigin> origin, Frame* frame, const String& dataDir, int64_t maximumSize)
{
WebKit::WebFrame* webFrame = WebKit::WebFrameImpl::fromFrame(frame);
- m_webIDBFactory->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame, dataDir);
+ m_webIDBFactory->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame, dataDir, maximumSize);
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/IDBFactoryBackendProxy.h b/WebKit/chromium/src/IDBFactoryBackendProxy.h
index 6371686..0a55b59 100755
--- a/WebKit/chromium/src/IDBFactoryBackendProxy.h
+++ b/WebKit/chromium/src/IDBFactoryBackendProxy.h
@@ -45,7 +45,7 @@ public:
virtual ~IDBFactoryBackendProxy();
PassRefPtr<DOMStringList> databases(void) const;
- virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir);
+ virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir, int64_t maximumSize);
private:
IDBFactoryBackendProxy();
diff --git a/WebKit/chromium/src/IDBIndexBackendProxy.cpp b/WebKit/chromium/src/IDBIndexBackendProxy.cpp
index f92f4f2..410750e 100644
--- a/WebKit/chromium/src/IDBIndexBackendProxy.cpp
+++ b/WebKit/chromium/src/IDBIndexBackendProxy.cpp
@@ -30,6 +30,7 @@
#include "IDBCallbacks.h"
#include "IDBKeyRange.h"
+#include "IDBTransactionBackendProxy.h"
#include "WebIDBCallbacksImpl.h"
#include "WebIDBDatabaseError.h"
#include "WebIDBIndex.h"
@@ -72,24 +73,36 @@ bool IDBIndexBackendProxy::unique()
return m_webIDBIndex->unique();
}
-void IDBIndexBackendProxy::openObjectCursor(PassRefPtr<IDBKeyRange> keyRange, unsigned short direction, PassRefPtr<IDBCallbacks> callbacks)
+void IDBIndexBackendProxy::openCursor(PassRefPtr<IDBKeyRange> keyRange, unsigned short direction, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
- m_webIDBIndex->openObjectCursor(keyRange, direction, new WebIDBCallbacksImpl(callbacks));
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBIndex->openObjectCursor(keyRange, direction, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
-void IDBIndexBackendProxy::openCursor(PassRefPtr<IDBKeyRange> keyRange, unsigned short direction, PassRefPtr<IDBCallbacks> callbacks)
+void IDBIndexBackendProxy::openKeyCursor(PassRefPtr<IDBKeyRange> keyRange, unsigned short direction, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
- m_webIDBIndex->openCursor(keyRange, direction, new WebIDBCallbacksImpl(callbacks));
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBIndex->openKeyCursor(keyRange, direction, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
-void IDBIndexBackendProxy::getObject(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks)
+void IDBIndexBackendProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
- m_webIDBIndex->getObject(key, new WebIDBCallbacksImpl(callbacks));
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBIndex->getObject(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
-void IDBIndexBackendProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks)
+void IDBIndexBackendProxy::getKey(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
- m_webIDBIndex->get(key, new WebIDBCallbacksImpl(callbacks));
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBIndex->getKey(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/IDBIndexBackendProxy.h b/WebKit/chromium/src/IDBIndexBackendProxy.h
index 6aafdfa..e9de05a 100644
--- a/WebKit/chromium/src/IDBIndexBackendProxy.h
+++ b/WebKit/chromium/src/IDBIndexBackendProxy.h
@@ -46,10 +46,10 @@ public:
virtual String keyPath();
virtual bool unique();
- virtual void openObjectCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>);
- virtual void openCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>);
- virtual void getObject(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>);
- virtual void get(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>);
+ virtual void openCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
+ virtual void openKeyCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
+ virtual void get(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
+ virtual void getKey(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
private:
IDBIndexBackendProxy(PassOwnPtr<WebKit::WebIDBIndex>);
diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.cpp b/WebKit/chromium/src/IDBObjectStoreProxy.cpp
index 82ca5f6..e537718 100755
--- a/WebKit/chromium/src/IDBObjectStoreProxy.cpp
+++ b/WebKit/chromium/src/IDBObjectStoreProxy.cpp
@@ -72,45 +72,63 @@ PassRefPtr<DOMStringList> IDBObjectStoreProxy::indexNames() const
return m_webIDBObjectStore->indexNames();
}
-void IDBObjectStoreProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction)
+void IDBObjectStoreProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
// The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
// all implementations of IDB interfaces are proxy objects.
IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
- m_webIDBObjectStore->get(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction());
+ m_webIDBObjectStore->get(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
-void IDBObjectStoreProxy::put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, bool addOnly, PassRefPtr<IDBCallbacks> callbacks)
+void IDBObjectStoreProxy::put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, bool addOnly, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
- m_webIDBObjectStore->put(value, key, addOnly, new WebIDBCallbacksImpl(callbacks));
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBObjectStore->put(value, key, addOnly, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
-void IDBObjectStoreProxy::remove(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks)
+void IDBObjectStoreProxy::remove(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
- m_webIDBObjectStore->remove(key, new WebIDBCallbacksImpl(callbacks));
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBObjectStore->remove(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
-void IDBObjectStoreProxy::createIndex(const String& name, const String& keyPath, bool unique, PassRefPtr<IDBCallbacks> callbacks)
+PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreProxy::createIndex(const String& name, const String& keyPath, bool unique, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
- m_webIDBObjectStore->createIndex(name, keyPath, unique, new WebIDBCallbacksImpl(callbacks));
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ WebKit::WebIDBIndex* index = m_webIDBObjectStore->createIndex(name, keyPath, unique, *transactionProxy->getWebIDBTransaction(), ec);
+ if (!index)
+ return 0;
+ return IDBIndexBackendProxy::create(index);
}
-PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreProxy::index(const String& name)
+PassRefPtr<IDBIndexBackendInterface> IDBObjectStoreProxy::index(const String& name, ExceptionCode& ec)
{
- WebKit::WebIDBIndex* index = m_webIDBObjectStore->index(name);
+ WebKit::WebIDBIndex* index = m_webIDBObjectStore->index(name, ec);
if (!index)
return 0;
return IDBIndexBackendProxy::create(index);
}
-void IDBObjectStoreProxy::removeIndex(const String& name, PassRefPtr<IDBCallbacks> callbacks)
+void IDBObjectStoreProxy::removeIndex(const String& name, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
- m_webIDBObjectStore->removeIndex(name, new WebIDBCallbacksImpl(callbacks));
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBObjectStore->removeIndex(name, *transactionProxy->getWebIDBTransaction(), ec);
}
-void IDBObjectStoreProxy::openCursor(PassRefPtr<IDBKeyRange> range, unsigned short direction, PassRefPtr<IDBCallbacks> callbacks)
+void IDBObjectStoreProxy::openCursor(PassRefPtr<IDBKeyRange> range, unsigned short direction, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction, ExceptionCode& ec)
{
- m_webIDBObjectStore->openCursor(range, direction, new WebIDBCallbacksImpl(callbacks));
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBObjectStore->openCursor(range, direction, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction(), ec);
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.h b/WebKit/chromium/src/IDBObjectStoreProxy.h
index 13dfe23..1e19279 100755
--- a/WebKit/chromium/src/IDBObjectStoreProxy.h
+++ b/WebKit/chromium/src/IDBObjectStoreProxy.h
@@ -40,21 +40,21 @@ namespace WebCore {
class IDBObjectStoreProxy : public IDBObjectStoreBackendInterface {
public:
static PassRefPtr<IDBObjectStoreBackendInterface> create(PassOwnPtr<WebKit::WebIDBObjectStore>);
- ~IDBObjectStoreProxy();
+ virtual ~IDBObjectStoreProxy();
- String name() const;
- String keyPath() const;
- PassRefPtr<DOMStringList> indexNames() const;
+ virtual String name() const;
+ virtual String keyPath() const;
+ virtual PassRefPtr<DOMStringList> indexNames() const;
- void get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*);
- void put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, bool addOnly, PassRefPtr<IDBCallbacks>);
- void remove(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks>);
+ virtual void get(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
+ virtual void put(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBKey>, bool addOnly, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
+ virtual void remove(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
- void createIndex(const String& name, const String& keyPath, bool unique, PassRefPtr<IDBCallbacks>);
- PassRefPtr<IDBIndexBackendInterface> index(const String& name);
- void removeIndex(const String& name, PassRefPtr<IDBCallbacks>);
+ PassRefPtr<IDBIndexBackendInterface> createIndex(const String& name, const String& keyPath, bool unique, IDBTransactionBackendInterface*, ExceptionCode&);
+ PassRefPtr<IDBIndexBackendInterface> index(const String& name, ExceptionCode&);
+ void removeIndex(const String& name, IDBTransactionBackendInterface*, ExceptionCode&);
- virtual void openCursor(PassRefPtr<IDBKeyRange> range, unsigned short direction, PassRefPtr<IDBCallbacks>);
+ virtual void openCursor(PassRefPtr<IDBKeyRange>, unsigned short direction, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*, ExceptionCode&);
private:
IDBObjectStoreProxy(PassOwnPtr<WebKit::WebIDBObjectStore>);
diff --git a/WebKit/chromium/src/IDBTransactionBackendProxy.cpp b/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
index 59e88d8..4b19ee4 100644
--- a/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
+++ b/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
@@ -45,6 +45,8 @@ PassRefPtr<IDBTransactionBackendInterface> IDBTransactionBackendProxy::create(Pa
IDBTransactionBackendProxy::IDBTransactionBackendProxy(PassOwnPtr<WebKit::WebIDBTransaction> transaction)
: m_webIDBTransaction(transaction)
{
+ if (!m_webIDBTransaction)
+ m_webIDBTransaction = adoptPtr(new WebKit::WebIDBTransaction());
}
IDBTransactionBackendProxy::~IDBTransactionBackendProxy()
@@ -69,7 +71,7 @@ void IDBTransactionBackendProxy::abort()
m_webIDBTransaction->abort();
}
-bool IDBTransactionBackendProxy::scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>)
+bool IDBTransactionBackendProxy::scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>, PassOwnPtr<ScriptExecutionContext::Task>)
{
// This should never be reached as it's the impl objects who get to
// execute tasks in the browser process.
diff --git a/WebKit/chromium/src/IDBTransactionBackendProxy.h b/WebKit/chromium/src/IDBTransactionBackendProxy.h
index 3daf73e..0c56f19 100644
--- a/WebKit/chromium/src/IDBTransactionBackendProxy.h
+++ b/WebKit/chromium/src/IDBTransactionBackendProxy.h
@@ -45,7 +45,7 @@ public:
virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name);
virtual unsigned short mode() const;
virtual void abort();
- virtual bool scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>);
+ virtual bool scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>, PassOwnPtr<ScriptExecutionContext::Task>);
virtual void didCompleteTaskEvents();
virtual int id() const;
virtual void setCallbacks(IDBTransactionCallbacks*);
diff --git a/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp b/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp
index be7d44f..3a19fe2 100644
--- a/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp
+++ b/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp
@@ -55,9 +55,16 @@ void IDBTransactionCallbacksProxy::onAbort()
m_callbacks.clear();
}
-int IDBTransactionCallbacksProxy::id() const
+void IDBTransactionCallbacksProxy::onComplete()
{
- return m_callbacks->id();
+ m_callbacks->onComplete();
+ m_callbacks.clear();
+}
+
+void IDBTransactionCallbacksProxy::onTimeout()
+{
+ m_callbacks->onTimeout();
+ m_callbacks.clear();
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/IDBTransactionCallbacksProxy.h b/WebKit/chromium/src/IDBTransactionCallbacksProxy.h
index 821eff4..891d5c9 100644
--- a/WebKit/chromium/src/IDBTransactionCallbacksProxy.h
+++ b/WebKit/chromium/src/IDBTransactionCallbacksProxy.h
@@ -46,8 +46,8 @@ public:
virtual ~IDBTransactionCallbacksProxy();
virtual void onAbort();
- virtual int id() const;
- // FIXME: implement onComplete().
+ virtual void onComplete();
+ virtual void onTimeout();
private:
IDBTransactionCallbacksProxy(PassOwnPtr<WebKit::WebIDBTransactionCallbacks>);
diff --git a/WebKit/chromium/src/LocalFileSystemChromium.cpp b/WebKit/chromium/src/LocalFileSystemChromium.cpp
index 7bf4335..25b1feb 100644
--- a/WebKit/chromium/src/LocalFileSystemChromium.cpp
+++ b/WebKit/chromium/src/LocalFileSystemChromium.cpp
@@ -57,7 +57,7 @@ LocalFileSystem& LocalFileSystem::localFileSystem()
return *localFileSystem;
}
-void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks, bool synchronous)
{
ASSERT(context);
if (context->isDocument()) {
@@ -68,7 +68,7 @@ void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFi
WorkerContext* workerContext = static_cast<WorkerContext*>(context);
WorkerLoaderProxy* workerLoaderProxy = &workerContext->thread()->workerLoaderProxy();
WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerLoaderProxy);
- webWorker->openFileSystem(static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(callbacks));
+ webWorker->openFileSystem(static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(callbacks, context, synchronous), synchronous);
}
}
diff --git a/WebKit/chromium/src/LocalizedStrings.cpp b/WebKit/chromium/src/LocalizedStrings.cpp
index 3354c30..fbc35ce 100644
--- a/WebKit/chromium/src/LocalizedStrings.cpp
+++ b/WebKit/chromium/src/LocalizedStrings.cpp
@@ -33,14 +33,15 @@
#include "IntSize.h"
#include "NotImplemented.h"
-#include "PlatformString.h"
-#include "StringBuilder.h"
#include "WebKit.h"
#include "WebKitClient.h"
#include "WebLocalizedString.h"
#include "WebString.h"
+#include <wtf/text/StringBuilder.h>
+#include <wtf/text/WTFString.h>
+
using WebKit::WebLocalizedString;
namespace WebCore {
@@ -213,14 +214,13 @@ String keygenMenuMediumGradeKeySize()
// Used in ImageDocument.cpp as the title for pages when that page is an image.
String imageTitle(const String& filename, const IntSize& size)
{
- // Note that we cannot use String::format because it works for ASCII only.
StringBuilder result;
result.append(filename);
result.append(" (");
result.append(String::number(size.width()));
result.append(static_cast<UChar>(0xD7)); // U+00D7 (multiplication sign)
result.append(String::number(size.height()));
- result.append(")");
+ result.append(')');
return result.toString();
}
diff --git a/WebKit/chromium/src/VideoFrameChromiumImpl.cpp b/WebKit/chromium/src/VideoFrameChromiumImpl.cpp
index a60fe28..99e3e1e 100644
--- a/WebKit/chromium/src/VideoFrameChromiumImpl.cpp
+++ b/WebKit/chromium/src/VideoFrameChromiumImpl.cpp
@@ -100,6 +100,13 @@ const void* VideoFrameChromiumImpl::data(unsigned plane) const
return 0;
}
+unsigned VideoFrameChromiumImpl::texture(unsigned plane) const
+{
+ if (m_webVideoFrame)
+ return m_webVideoFrame->texture(plane);
+ return 0;
+}
+
const IntSize VideoFrameChromiumImpl::requiredTextureSize(unsigned plane) const
{
switch (format()) {
diff --git a/WebKit/chromium/src/VideoFrameChromiumImpl.h b/WebKit/chromium/src/VideoFrameChromiumImpl.h
index 042cd7e..f86ee1c 100644
--- a/WebKit/chromium/src/VideoFrameChromiumImpl.h
+++ b/WebKit/chromium/src/VideoFrameChromiumImpl.h
@@ -56,6 +56,7 @@ public:
virtual unsigned planes() const;
virtual int stride(unsigned plane) const;
virtual const void* data(unsigned plane) const;
+ virtual unsigned texture(unsigned plane) const;
virtual const IntSize requiredTextureSize(unsigned plane) const;
private:
diff --git a/WebKit/chromium/src/WebAccessibilityCacheImpl.cpp b/WebKit/chromium/src/WebAccessibilityCacheImpl.cpp
index 8304878..f91bd1c 100644
--- a/WebKit/chromium/src/WebAccessibilityCacheImpl.cpp
+++ b/WebKit/chromium/src/WebAccessibilityCacheImpl.cpp
@@ -118,11 +118,6 @@ WebAccessibilityObject WebAccessibilityCacheImpl::getObjectById(int id)
return WebAccessibilityObject(it->second->accessibilityObject());
}
-bool WebAccessibilityCacheImpl::isValidId(int id) const
-{
- return id >= firstObjectId;
-}
-
void WebAccessibilityCacheImpl::remove(int id)
{
ObjectMap::iterator it = m_objectMap.find(id);
@@ -166,4 +161,17 @@ int WebAccessibilityCacheImpl::addOrGetId(const WebAccessibilityObject& object)
return m_nextNewId++;
}
+bool WebAccessibilityCacheImpl::isCached(const WebAccessibilityObject& object)
+{
+ if (!object.isValid())
+ return false;
+
+ RefPtr<AccessibilityObject> o = toAccessibilityObject(object);
+ IdMap::iterator it = m_idMap.find(o.get());
+ if (it == m_idMap.end())
+ return false;
+
+ return true;
+}
+
}
diff --git a/WebKit/chromium/src/WebAccessibilityCacheImpl.h b/WebKit/chromium/src/WebAccessibilityCacheImpl.h
index 5148b74..c72c0fc 100644
--- a/WebKit/chromium/src/WebAccessibilityCacheImpl.h
+++ b/WebKit/chromium/src/WebAccessibilityCacheImpl.h
@@ -45,8 +45,8 @@ public:
virtual bool isInitialized() const { return m_initialized; }
virtual WebAccessibilityObject getObjectById(int);
- virtual bool isValidId(int) const;
virtual int addOrGetId(const WebKit::WebAccessibilityObject&);
+ virtual bool isCached(const WebAccessibilityObject&);
virtual void remove(int);
virtual void clear();
diff --git a/WebKit/chromium/src/WebBlobData.cpp b/WebKit/chromium/src/WebBlobData.cpp
index 4cd1d67..42018dd 100644
--- a/WebKit/chromium/src/WebBlobData.cpp
+++ b/WebKit/chromium/src/WebBlobData.cpp
@@ -32,6 +32,7 @@
#include "WebBlobData.h"
#include "BlobData.h"
+#include <wtf/PassOwnPtr.h>
using namespace WebCore;
@@ -89,54 +90,18 @@ bool WebBlobData::itemAt(size_t index, Item& result) const
return false;
}
-void WebBlobData::appendData(const WebCString& data)
-{
- ASSERT(!isNull());
- m_private->appendData(data);
-}
-
-void WebBlobData::appendFile(const WebString& filePath)
-{
- ASSERT(!isNull());
- m_private->appendFile(filePath);
-}
-
-void WebBlobData::appendFile(const WebString& filePath, long long offset, long long length, double expectedModificationTime)
-{
- ASSERT(!isNull());
- m_private->appendFile(filePath, offset, length, expectedModificationTime);
-}
-
-void WebBlobData::appendBlob(const WebURL& blobURL, long long offset, long long length)
-{
- ASSERT(!isNull());
- m_private->appendBlob(blobURL, offset, length);
-}
-
WebString WebBlobData::contentType() const
{
ASSERT(!isNull());
return m_private->contentType();
}
-void WebBlobData::setContentType(const WebString& contentType)
-{
- ASSERT(!isNull());
- m_private->setContentType(contentType);
-}
-
WebString WebBlobData::contentDisposition() const
{
ASSERT(!isNull());
return m_private->contentDisposition();
}
-void WebBlobData::setContentDisposition(const WebString& contentDisposition)
-{
- ASSERT(!isNull());
- m_private->setContentDisposition(contentDisposition);
-}
-
WebBlobData::WebBlobData(const PassOwnPtr<BlobData>& data)
: m_private(0)
{
diff --git a/WebKit/chromium/src/WebBlobStorageData.cpp b/WebKit/chromium/src/WebBlobStorageData.cpp
deleted file mode 100644
index 38a25fe..0000000
--- a/WebKit/chromium/src/WebBlobStorageData.cpp
+++ /dev/null
@@ -1,113 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * 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.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
- * OWNER OR 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 "WebBlobStorageData.h"
-
-#include "BlobStorageData.h"
-
-using namespace WebCore;
-
-namespace WebKit {
-
-class WebBlobStorageDataPrivate : public BlobStorageData {
-};
-
-void WebBlobStorageData::reset()
-{
- assign(0);
-}
-
-size_t WebBlobStorageData::itemCount() const
-{
- ASSERT(!isNull());
- return m_private->items().size();
-}
-
-bool WebBlobStorageData::itemAt(size_t index, WebBlobData::Item& result) const
-{
- ASSERT(!isNull());
-
- if (index >= m_private->items().size())
- return false;
-
- const BlobDataItem& item = m_private->items()[index];
- result.offset = item.offset;
- result.length = item.length;
- result.expectedModificationTime = item.expectedModificationTime;
- if (item.type == BlobDataItem::Data) {
- result.type = WebBlobData::Item::TypeData;
- result.data.assign(item.data.data(), static_cast<size_t>(item.data.length()));
- return true;
- } else {
- ASSERT(item.type == BlobDataItem::File);
- result.type = WebBlobData::Item::TypeFile;
- result.filePath = item.path;
- return true;
- }
-}
-
-WebString WebBlobStorageData::contentType() const
-{
- ASSERT(!isNull());
- return m_private->contentType();
-}
-
-WebString WebBlobStorageData::contentDisposition() const
-{
- ASSERT(!isNull());
- return m_private->contentDisposition();
-}
-
-WebBlobStorageData::WebBlobStorageData(const PassRefPtr<BlobStorageData>& data)
- : m_private(0)
-{
- assign(data);
-}
-
-WebBlobStorageData& WebBlobStorageData::operator=(const PassRefPtr<BlobStorageData>& data)
-{
- assign(data);
- return *this;
-}
-
-WebBlobStorageData::operator PassRefPtr<BlobStorageData>() const
-{
- return m_private;
-}
-
-void WebBlobStorageData::assign(const PassRefPtr<BlobStorageData>& data)
-{
- if (m_private)
- m_private->deref();
- m_private = static_cast<WebBlobStorageDataPrivate*>(data.leakRef());
-}
-
-} // namespace WebKit
diff --git a/WebKit/chromium/src/WebCache.cpp b/WebKit/chromium/src/WebCache.cpp
index 9d03a4d..c124bdf 100644
--- a/WebKit/chromium/src/WebCache.cpp
+++ b/WebKit/chromium/src/WebCache.cpp
@@ -67,15 +67,8 @@ void WebCache::clear()
{
Cache* cache = WebCore::cache();
if (cache && !cache->disabled()) {
- // NOTE: I think using setDisabled() instead of setCapacities() will
- // remove from the cache items that won't actually be freed from memory
- // (due to other live references to them), so it just results in wasting
- // time later and not saving memory compared to the below technique.
- unsigned minDeadCapacity = cache->m_minDeadCapacity;
- unsigned maxDeadCapacity = cache->m_maxDeadCapacity;
- unsigned capacity = cache->m_capacity;
- cache->setCapacities(0, 0, 0); // Will prune the cache.
- cache->setCapacities(minDeadCapacity, maxDeadCapacity, capacity);
+ cache->setDisabled(true);
+ cache->setDisabled(false);
}
}
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index c7bb050..9b7b2bd 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -317,8 +317,11 @@ void WebDevToolsAgentImpl::identifierForInitialRequest(
void WebDevToolsAgentImpl::willSendRequest(unsigned long resourceId, WebURLRequest& request)
{
- if (InspectorController* ic = inspectorController())
+ if (InspectorController* ic = inspectorController()) {
ic->willSendRequest(resourceId, request.toMutableResourceRequest(), ResourceResponse());
+ if (ic->hasFrontend() && request.reportLoadTiming())
+ request.setReportRawHeaders(true);
+ }
}
void WebDevToolsAgentImpl::didReceiveData(unsigned long resourceId, int length)
@@ -330,7 +333,7 @@ void WebDevToolsAgentImpl::didReceiveData(unsigned long resourceId, int length)
void WebDevToolsAgentImpl::didReceiveResponse(unsigned long resourceId, const WebURLResponse& response)
{
if (InspectorController* ic = inspectorController())
- ic->didReceiveResponse(resourceId, response.toResourceResponse());
+ ic->didReceiveResponse(resourceId, 0, response.toResourceResponse());
}
void WebDevToolsAgentImpl::didFinishLoading(unsigned long resourceId)
diff --git a/WebKit/chromium/src/WebDragData.cpp b/WebKit/chromium/src/WebDragData.cpp
index 643c35d..9167c69 100644
--- a/WebKit/chromium/src/WebDragData.cpp
+++ b/WebKit/chromium/src/WebDragData.cpp
@@ -32,6 +32,8 @@
#include "WebDragData.h"
#include "ChromiumDataObject.h"
+#include "ChromiumDataObjectLegacy.h"
+#include "ClipboardMimeTypes.h"
#include "WebData.h"
#include "WebString.h"
#include "WebURL.h"
@@ -48,7 +50,7 @@ class WebDragDataPrivate : public ChromiumDataObject {
void WebDragData::initialize()
{
- assign(static_cast<WebDragDataPrivate*>(ChromiumDataObject::create().releaseRef()));
+ assign(static_cast<WebDragDataPrivate*>(ChromiumDataObject::create(ChromiumDataObjectLegacy::create(Clipboard::DragAndDrop)).releaseRef()));
}
void WebDragData::reset()
@@ -64,137 +66,144 @@ void WebDragData::assign(const WebDragData& other)
assign(p);
}
-WebURL WebDragData::url() const
+WebString WebDragData::url() const
{
ASSERT(!isNull());
- return m_private->getURL();
+ bool ignoredSuccess;
+ return m_private->getData(mimeTypeURL, ignoredSuccess);
}
void WebDragData::setURL(const WebURL& url)
{
ensureMutable();
- m_private->setURL(url);
+ m_private->setData(mimeTypeURL, KURL(url).string());
}
WebString WebDragData::urlTitle() const
{
ASSERT(!isNull());
- return m_private->urlTitle;
+ return m_private->urlTitle();
}
void WebDragData::setURLTitle(const WebString& urlTitle)
{
ensureMutable();
- m_private->urlTitle = urlTitle;
+ m_private->setUrlTitle(urlTitle);
}
WebString WebDragData::downloadMetadata() const
{
ASSERT(!isNull());
- return m_private->downloadMetadata;
+ bool ignoredSuccess;
+ return m_private->getData(mimeTypeDownloadURL, ignoredSuccess);
}
void WebDragData::setDownloadMetadata(const WebString& downloadMetadata)
{
ensureMutable();
- m_private->downloadMetadata = downloadMetadata;
+ m_private->setData(mimeTypeDownloadURL, downloadMetadata);
}
WebString WebDragData::fileExtension() const
{
ASSERT(!isNull());
- return m_private->fileExtension;
+ return m_private->fileExtension();
}
void WebDragData::setFileExtension(const WebString& fileExtension)
{
ensureMutable();
- m_private->fileExtension = fileExtension;
+ m_private->setFileExtension(fileExtension);
}
-bool WebDragData::hasFileNames() const
+bool WebDragData::containsFilenames() const
{
ASSERT(!isNull());
- return !m_private->filenames.isEmpty();
+ return m_private->containsFilenames();
}
-void WebDragData::fileNames(WebVector<WebString>& fileNames) const
+void WebDragData::filenames(WebVector<WebString>& filenames) const
{
ASSERT(!isNull());
- fileNames = m_private->filenames;
+ filenames = m_private->filenames();
}
-void WebDragData::setFileNames(const WebVector<WebString>& fileNames)
+void WebDragData::setFilenames(const WebVector<WebString>& filenames)
{
ensureMutable();
- m_private->filenames.clear();
- m_private->filenames.append(fileNames.data(), fileNames.size());
+ Vector<String> filenamesCopy;
+ filenamesCopy.append(filenames.data(), filenames.size());
+ m_private->setFilenames(filenamesCopy);
}
-void WebDragData::appendToFileNames(const WebString& fileName)
+void WebDragData::appendToFilenames(const WebString& filename)
{
ensureMutable();
- m_private->filenames.append(fileName);
+ Vector<String> filenames = m_private->filenames();
+ filenames.append(filename);
+ m_private->setFilenames(filenames);
}
WebString WebDragData::plainText() const
{
ASSERT(!isNull());
- return m_private->plainText;
+ bool ignoredSuccess;
+ return m_private->getData(mimeTypeTextPlain, ignoredSuccess);
}
void WebDragData::setPlainText(const WebString& plainText)
{
ensureMutable();
- m_private->plainText = plainText;
+ m_private->setData(mimeTypeTextPlain, plainText);
}
WebString WebDragData::htmlText() const
{
ASSERT(!isNull());
- return m_private->textHtml;
+ bool ignoredSuccess;
+ return m_private->getData(mimeTypeTextHTML, ignoredSuccess);
}
void WebDragData::setHTMLText(const WebString& htmlText)
{
ensureMutable();
- m_private->textHtml = htmlText;
+ m_private->setData(mimeTypeTextHTML, htmlText);
}
WebURL WebDragData::htmlBaseURL() const
{
ASSERT(!isNull());
- return m_private->htmlBaseUrl;
+ return m_private->htmlBaseUrl();
}
void WebDragData::setHTMLBaseURL(const WebURL& htmlBaseURL)
{
ensureMutable();
- m_private->htmlBaseUrl = htmlBaseURL;
+ m_private->setHtmlBaseUrl(htmlBaseURL);
}
-WebString WebDragData::fileContentFileName() const
+WebString WebDragData::fileContentFilename() const
{
ASSERT(!isNull());
- return m_private->fileContentFilename;
+ return m_private->fileContentFilename();
}
-void WebDragData::setFileContentFileName(const WebString& fileName)
+void WebDragData::setFileContentFilename(const WebString& filename)
{
ensureMutable();
- m_private->fileContentFilename = fileName;
+ m_private->setFileContentFilename(filename);
}
WebData WebDragData::fileContent() const
{
ASSERT(!isNull());
- return WebData(m_private->fileContent);
+ return WebData(m_private->fileContent());
}
void WebDragData::setFileContent(const WebData& fileContent)
{
ensureMutable();
- m_private->fileContent = fileContent;
+ m_private->setFileContent(fileContent);
}
WebDragData::WebDragData(const WTF::PassRefPtr<WebCore::ChromiumDataObject>& data)
@@ -224,8 +233,7 @@ void WebDragData::assign(WebDragDataPrivate* p)
void WebDragData::ensureMutable()
{
ASSERT(!isNull());
- if (!m_private->hasOneRef())
- assign(static_cast<WebDragDataPrivate*>(m_private->copy().releaseRef()));
+ ASSERT(m_private->hasOneRef());
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebElement.cpp b/WebKit/chromium/src/WebElement.cpp
index 91f310d..34daa34 100644
--- a/WebKit/chromium/src/WebElement.cpp
+++ b/WebKit/chromium/src/WebElement.cpp
@@ -47,6 +47,11 @@ bool WebElement::isFormControlElement() const
return constUnwrap<Element>()->isFormControlElement();
}
+bool WebElement::isTextFormControlElement() const
+{
+ return constUnwrap<Element>()->isTextFormControl();
+}
+
WebString WebElement::tagName() const
{
return constUnwrap<Element>()->tagName();
diff --git a/WebKit/chromium/src/WebEntities.cpp b/WebKit/chromium/src/WebEntities.cpp
index bfdd9f2..4e37dde 100644
--- a/WebKit/chromium/src/WebEntities.cpp
+++ b/WebKit/chromium/src/WebEntities.cpp
@@ -31,15 +31,12 @@
#include "config.h"
#include "WebEntities.h"
-#include <string.h>
-
-#include "PlatformString.h"
-#include "StringBuilder.h"
-#include <wtf/HashMap.h>
-
#include "WebString.h"
-using namespace WebCore;
+#include <string.h>
+#include <wtf/HashMap.h>
+#include <wtf/text/StringBuilder.h>
+#include <wtf/text/WTFString.h>
namespace WebKit {
@@ -76,9 +73,9 @@ String WebEntities::convertEntitiesInString(const String& value) const
// Append content before entity code.
if (curPos > startPos)
result.append(String(startPos, curPos - startPos));
- result.append("&");
+ result.append('&');
result.append(m_entitiesMap.get(*curPos));
- result.append(";");
+ result.append(';');
startPos = ++curPos;
} else
curPos++;
diff --git a/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp b/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
index a23add7..f44e8f1 100644
--- a/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
+++ b/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
@@ -34,19 +34,23 @@
#include "AsyncFileSystemCallbacks.h"
#include "AsyncFileSystemChromium.h"
-#include "ExceptionCode.h"
+#include "ScriptExecutionContext.h"
#include "WebFileSystemEntry.h"
#include "WebFileInfo.h"
#include "WebString.h"
+#include "WorkerAsyncFileSystemChromium.h"
#include <wtf/Vector.h>
using namespace WebCore;
namespace WebKit {
-WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<AsyncFileSystemCallbacks> callbacks, WebCore::ScriptExecutionContext* context, bool synchronous)
: m_callbacks(callbacks)
+ , m_context(context)
+ , m_synchronous(synchronous)
{
+ ASSERT(m_callbacks);
}
WebFileSystemCallbacksImpl::~WebFileSystemCallbacksImpl()
@@ -55,37 +59,35 @@ WebFileSystemCallbacksImpl::~WebFileSystemCallbacksImpl()
void WebFileSystemCallbacksImpl::didSucceed()
{
- ASSERT(m_callbacks);
m_callbacks->didSucceed();
delete this;
}
void WebFileSystemCallbacksImpl::didReadMetadata(const WebFileInfo& info)
{
- ASSERT(m_callbacks);
m_callbacks->didReadMetadata(info.modificationTime);
delete this;
}
void WebFileSystemCallbacksImpl::didReadDirectory(const WebVector<WebFileSystemEntry>& entries, bool hasMore)
{
- ASSERT(m_callbacks);
for (size_t i = 0; i < entries.size(); ++i)
m_callbacks->didReadDirectoryEntry(entries[i].name, entries[i].isDirectory);
m_callbacks->didReadDirectoryEntries(hasMore);
- if (!hasMore)
- delete this;
+ delete this;
}
void WebFileSystemCallbacksImpl::didOpenFileSystem(const WebString& name, const WebString& path)
{
- m_callbacks->didOpenFileSystem(name, new AsyncFileSystemChromium(path));
+ if (m_context && m_context->isWorkerContext())
+ m_callbacks->didOpenFileSystem(name, WorkerAsyncFileSystemChromium::create(m_context, path, m_synchronous));
+ else
+ m_callbacks->didOpenFileSystem(name, AsyncFileSystemChromium::create(path));
delete this;
}
void WebFileSystemCallbacksImpl::didFail(WebFileError error)
{
- ASSERT(m_callbacks);
m_callbacks->didFail(error);
delete this;
}
diff --git a/WebKit/chromium/src/WebFileSystemCallbacksImpl.h b/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
index 36ab9ff..75fa2bb 100644
--- a/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
+++ b/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
@@ -38,6 +38,7 @@
namespace WebCore {
class AsyncFileSystemCallbacks;
+class ScriptExecutionContext;
}
namespace WebKit {
@@ -48,7 +49,7 @@ class WebString;
class WebFileSystemCallbacksImpl : public WebFileSystemCallbacks {
public:
- WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>);
+ WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::AsyncFileSystemCallbacks>, WebCore::ScriptExecutionContext* = 0, bool synchronous = false);
virtual ~WebFileSystemCallbacksImpl();
virtual void didSucceed();
@@ -59,6 +60,10 @@ public:
private:
OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks;
+
+ // Used for worker's openFileSystem callbacks.
+ WebCore::ScriptExecutionContext* m_context;
+ bool m_synchronous;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebFontImpl.cpp b/WebKit/chromium/src/WebFontImpl.cpp
index 6fa5494..8c61997 100644
--- a/WebKit/chromium/src/WebFontImpl.cpp
+++ b/WebKit/chromium/src/WebFontImpl.cpp
@@ -103,9 +103,11 @@ void WebFontImpl::drawText(WebCanvas* canvas, const WebTextRun& run, const WebFl
notImplemented();
#endif
- gc.setFillColor(color, DeviceColorSpace);
+ gc.save();
+ gc.setFillColor(color, ColorSpaceDeviceRGB);
gc.clip(WebCore::FloatRect(clip));
m_font.drawText(&gc, run, leftBaseline, from, to);
+ gc.restore();
}
int WebFontImpl::calculateWidth(const WebTextRun& run) const
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index 1b64e5a..b4d23c0 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -261,6 +261,12 @@ static void frameContentAsPlainText(size_t maxChars, Frame* frame,
}
}
+static long long generateFrameIdentifier()
+{
+ static long long next = 0;
+ return ++next;
+}
+
WebPluginContainerImpl* WebFrameImpl::pluginContainerFromFrame(Frame* frame)
{
if (!frame)
@@ -488,6 +494,11 @@ void WebFrameImpl::setName(const WebString& name)
m_frame->tree()->setName(name);
}
+long long WebFrameImpl::identifier() const
+{
+ return m_identifier;
+}
+
WebURL WebFrameImpl::url() const
{
const WebDataSource* ds = dataSource();
@@ -1759,6 +1770,13 @@ bool WebFrameImpl::pauseSVGAnimation(const WebString& animationId, double time,
#endif
}
+WebString WebFrameImpl::layerTreeAsText() const
+{
+ if (!m_frame)
+ return WebString();
+ return WebString(m_frame->layerTreeAsText());
+}
+
// WebFrameImpl public ---------------------------------------------------------
PassRefPtr<WebFrameImpl> WebFrameImpl::create(WebFrameClient* client)
@@ -1779,6 +1797,7 @@ WebFrameImpl::WebFrameImpl(WebFrameClient* client)
, m_scopingComplete(false)
, m_nextInvalidateAfter(0)
, m_animationController(this)
+ , m_identifier(generateFrameIdentifier())
{
ChromiumBridge::incrementStatsCounter(webFrameActiveCount);
frameCount++;
@@ -1869,7 +1888,7 @@ void WebFrameImpl::paintWithContext(GraphicsContext& gc, const WebRect& rect)
frameView()->paint(&gc, dirtyRect);
m_frame->page()->inspectorController()->drawNodeHighlight(gc);
} else
- gc.fillRect(dirtyRect, Color::white, DeviceColorSpace);
+ gc.fillRect(dirtyRect, Color::white, ColorSpaceDeviceRGB);
gc.restore();
}
@@ -2242,7 +2261,7 @@ void WebFrameImpl::loadJavaScriptURL(const KURL& url)
if (!result.getString(scriptResult))
return;
- if (!m_frame->redirectScheduler()->locationChangePending())
+ if (!m_frame->navigationScheduler()->locationChangePending())
m_frame->loader()->writer()->replaceDocument(scriptResult);
}
diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h
index d93254b..35158a1 100644
--- a/WebKit/chromium/src/WebFrameImpl.h
+++ b/WebKit/chromium/src/WebFrameImpl.h
@@ -67,6 +67,7 @@ public:
// WebFrame methods:
virtual WebString name() const;
virtual void setName(const WebString&);
+ virtual long long identifier() const;
virtual WebURL url() const;
virtual WebURL favIconURL() const;
virtual WebURL openSearchDescriptionURL() const;
@@ -189,6 +190,7 @@ public:
virtual bool pauseSVGAnimation(const WebString& animationId,
double time,
const WebString& elementId);
+ virtual WebString layerTreeAsText() const;
static PassRefPtr<WebFrameImpl> create(WebFrameClient* client);
~WebFrameImpl();
@@ -386,6 +388,9 @@ private:
// Keeps a reference to the frame's WebAnimationController.
WebAnimationControllerImpl m_animationController;
+
+ // The identifier of this frame.
+ long long m_identifier;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebGeolocationServiceMock.cpp b/WebKit/chromium/src/WebGeolocationServiceMock.cpp
index e149cf1..07d3f44 100644
--- a/WebKit/chromium/src/WebGeolocationServiceMock.cpp
+++ b/WebKit/chromium/src/WebGeolocationServiceMock.cpp
@@ -42,6 +42,38 @@
#if ENABLE(GEOLOCATION)
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+// FIXME: Implement mock bindings for client-based geolocation. Ultimately
+// move to another class and remove WebGeolocationService*.
+
+namespace WebKit {
+
+class WebGeolocationServiceMockClientBasedImpl : public WebGeolocationServiceMock {
+};
+
+WebGeolocationServiceMock* WebGeolocationServiceMock::createWebGeolocationServiceMock()
+{
+ return new WebGeolocationServiceMockClientBasedImpl;
+}
+
+void WebGeolocationServiceMock::setMockGeolocationPermission(bool allowed)
+{
+ // FIXME: Implement mock binding
+}
+
+void WebGeolocationServiceMock::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
+{
+ // FIXME: Implement mock binding
+}
+
+void WebGeolocationServiceMock::setMockGeolocationError(int errorCode, const WebString& message)
+{
+ // FIXME: Implement mock binding
+}
+
+} // namespace WebKit
+
+#else
using WebCore::Coordinates;
using WebCore::Frame;
using WebCore::Geolocation;
@@ -241,4 +273,5 @@ void WebGeolocationServiceMockImpl::notifyPendingPermissions()
} // namespace WebKit
+#endif // ENABLE(CLIENT_BASED_GEOLOCATION)
#endif // ENABLE(GEOLOCATION)
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index 45bc2ee..1625eb8 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -37,6 +37,8 @@
#include "app/gfx/gl/gl_bindings.h"
#include "app/gfx/gl/gl_context.h"
#include "NotImplemented.h"
+#include "WebView.h"
+#include <wtf/OwnArrayPtr.h>
#include <wtf/PassOwnPtr.h>
#include <wtf/text/CString.h>
@@ -67,6 +69,7 @@ WebGraphicsContext3DDefaultImpl::VertexAttribPointerState::VertexAttribPointerSt
WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl()
: m_initialized(false)
+ , m_renderDirectlyToWebView(false)
, m_texture(0)
, m_fbo(0)
, m_depthStencilBuffer(0)
@@ -106,25 +109,59 @@ WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl()
m_glContext->Destroy();
+ for (ShaderSourceMap::iterator ii = m_shaderSourceMap.begin(); ii != m_shaderSourceMap.end(); ++ii) {
+ if (ii->second)
+ delete ii->second;
+ }
angleDestroyCompilers();
}
}
bool WebGraphicsContext3DDefaultImpl::initialize(WebGraphicsContext3D::Attributes attributes, WebView* webView, bool renderDirectlyToWebView)
{
- if (renderDirectlyToWebView) {
- // This mode isn't supported with the in-process implementation yet. (FIXME)
- return false;
- }
-
if (!gfx::GLContext::InitializeOneOff())
return false;
- m_glContext = WTF::adoptPtr(gfx::GLContext::CreateOffscreenGLContext(0));
+ m_renderDirectlyToWebView = renderDirectlyToWebView;
+ gfx::GLContext* shareContext = 0;
+
+ if (!renderDirectlyToWebView) {
+ // Pick up the compositor's context to share resources with.
+ WebGraphicsContext3D* viewContext = webView->graphicsContext3D();
+ if (viewContext) {
+ WebGraphicsContext3DDefaultImpl* contextImpl = static_cast<WebGraphicsContext3DDefaultImpl*>(viewContext);
+ shareContext = contextImpl->m_glContext.get();
+ } else {
+ // The compositor's context didn't get created
+ // successfully, so conceptually there is no way we can
+ // render successfully to the WebView.
+ m_renderDirectlyToWebView = false;
+ }
+ }
+
+ // This implementation always renders offscreen regardless of
+ // whether renderDirectlyToWebView is true. Both DumpRenderTree
+ // and test_shell paint first to an intermediate offscreen buffer
+ // and from there to the window, and WebViewImpl::paint already
+ // correctly handles the case where the compositor is active but
+ // the output needs to go to a WebCanvas.
+ m_glContext = WTF::adoptPtr(gfx::GLContext::CreateOffscreenGLContext(shareContext));
if (!m_glContext)
return false;
m_attributes = attributes;
+
+ // FIXME: for the moment we disable multisampling for the compositor.
+ // It actually works in this implementation, but there are a few
+ // considerations. First, we likely want to reduce the fuzziness in
+ // these tests as much as possible because we want to run pixel tests.
+ // Second, Mesa's multisampling doesn't seem to antialias straight
+ // edges in some CSS 3D samples. Third, we don't have multisampling
+ // support for the compositor in the normal case at the time of this
+ // writing.
+ if (renderDirectlyToWebView)
+ m_attributes.antialias = false;
+
validateAttributes();
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
@@ -159,12 +196,30 @@ void WebGraphicsContext3DDefaultImpl::validateAttributes()
#endif
if (!isValidVendor || !strstr(extensions, "GL_EXT_framebuffer_multisample"))
m_attributes.antialias = false;
+
+ // Don't antialias when using Mesa to ensure more reliable testing and
+ // because it doesn't appear to multisample straight lines correctly.
+ const char* renderer = reinterpret_cast<const char*>(glGetString(GL_RENDERER));
+ if (!strncmp(renderer, "Mesa", 4))
+ m_attributes.antialias = false;
}
// FIXME: instead of enforcing premultipliedAlpha = true, implement the
// correct behavior when premultipliedAlpha = false is requested.
m_attributes.premultipliedAlpha = true;
}
+void WebGraphicsContext3DDefaultImpl::resolveMultisampledFramebuffer(unsigned x, unsigned y, unsigned width, unsigned height)
+{
+ if (m_attributes.antialias) {
+ bool mustRestoreFBO = (m_boundFBO != m_multisampleFBO);
+ glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO);
+ glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo);
+ glBlitFramebufferEXT(x, y, x + width, y + height, x, y, x + width, y + height, GL_COLOR_BUFFER_BIT, GL_LINEAR);
+ if (mustRestoreFBO)
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
+ }
+}
+
bool WebGraphicsContext3DDefaultImpl::makeContextCurrent()
{
return m_glContext->MakeCurrent();
@@ -218,13 +273,15 @@ bool WebGraphicsContext3DDefaultImpl::isErrorGeneratedOnOutOfBoundsAccesses()
unsigned int WebGraphicsContext3DDefaultImpl::getPlatformTextureId()
{
- ASSERT_NOT_REACHED();
- return 0;
+ return m_texture;
}
void WebGraphicsContext3DDefaultImpl::prepareTexture()
{
- ASSERT_NOT_REACHED();
+ if (!m_renderDirectlyToWebView) {
+ // We need to prepare our rendering results for the compositor.
+ resolveMultisampledFramebuffer(0, 0, m_cachedWidth, m_cachedHeight);
+ }
}
static int createTextureObject(GLenum target)
@@ -434,19 +491,8 @@ bool WebGraphicsContext3DDefaultImpl::readBackFramebuffer(unsigned char* pixels,
// vertical flip is only a temporary solution anyway until Chrome
// is fully GPU composited, it wasn't worth the complexity.
- bool mustRestoreFBO = false;
- if (m_attributes.antialias) {
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO);
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo);
- glBlitFramebufferEXT(0, 0, m_cachedWidth, m_cachedHeight, 0, 0, m_cachedWidth, m_cachedHeight, GL_COLOR_BUFFER_BIT, GL_LINEAR);
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
- mustRestoreFBO = true;
- } else {
- if (m_boundFBO != m_fbo) {
- mustRestoreFBO = true;
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
- }
- }
+ resolveMultisampledFramebuffer(0, 0, m_cachedWidth, m_cachedHeight);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
GLint packAlignment = 4;
bool mustRestorePackAlignment = false;
@@ -463,8 +509,7 @@ bool WebGraphicsContext3DDefaultImpl::readBackFramebuffer(unsigned char* pixels,
if (mustRestorePackAlignment)
glPixelStorei(GL_PACK_ALIGNMENT, packAlignment);
- if (mustRestoreFBO)
- glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
+ glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
#ifdef FLIP_FRAMEBUFFER_VERTICALLY
if (pixels)
@@ -682,13 +727,14 @@ void WebGraphicsContext3DDefaultImpl::compileShader(WebGLId shader)
glCompileShader(shader);
return;
}
- ShaderSourceEntry& entry = result->second;
+ ShaderSourceEntry* entry = result->second;
+ ASSERT(entry);
- if (!angleValidateShaderSource(entry))
+ if (!angleValidateShaderSource(*entry))
return; // Shader didn't validate, don't move forward with compiling translated source
- int shaderLength = entry.translatedSource ? strlen(entry.translatedSource) : 0;
- glShaderSource(shader, 1, const_cast<const char**>(&entry.translatedSource), &shaderLength);
+ int shaderLength = entry->translatedSource ? strlen(entry->translatedSource) : 0;
+ glShaderSource(shader, 1, const_cast<const char**>(&entry->translatedSource), &shaderLength);
glCompileShader(shader);
#ifndef NDEBUG
@@ -704,16 +750,15 @@ void WebGraphicsContext3DDefaultImpl::copyTexImage2D(unsigned long target, long
{
makeContextCurrent();
- if (m_attributes.antialias && m_boundFBO == m_multisampleFBO) {
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO);
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo);
- glBlitFramebufferEXT(x, y, x + width, y + height, x, y, x + width, y + height, GL_COLOR_BUFFER_BIT, GL_LINEAR);
+ bool needsResolve = (m_attributes.antialias && m_boundFBO == m_multisampleFBO);
+ if (needsResolve) {
+ resolveMultisampledFramebuffer(x, y, width, height);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
}
glCopyTexImage2D(target, level, internalformat, x, y, width, height, border);
- if (m_attributes.antialias && m_boundFBO == m_multisampleFBO)
+ if (needsResolve)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
}
@@ -722,16 +767,15 @@ void WebGraphicsContext3DDefaultImpl::copyTexSubImage2D(unsigned long target, lo
{
makeContextCurrent();
- if (m_attributes.antialias && m_boundFBO == m_multisampleFBO) {
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO);
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo);
- glBlitFramebufferEXT(x, y, x + width, y + height, x, y, x + width, y + height, GL_COLOR_BUFFER_BIT, GL_LINEAR);
+ bool needsResolve = (m_attributes.antialias && m_boundFBO == m_multisampleFBO);
+ if (needsResolve) {
+ resolveMultisampledFramebuffer(x, y, width, height);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
}
glCopyTexSubImage2D(target, level, xoffset, yoffset, x, y, width, height);
- if (m_attributes.antialias && m_boundFBO == m_multisampleFBO)
+ if (needsResolve)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
}
@@ -962,24 +1006,25 @@ void WebGraphicsContext3DDefaultImpl::getShaderiv(WebGLId shader, unsigned long
ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
if (result != m_shaderSourceMap.end()) {
- ShaderSourceEntry& entry = result->second;
+ ShaderSourceEntry* entry = result->second;
+ ASSERT(entry);
switch (pname) {
case GL_COMPILE_STATUS:
- if (!entry.isValid) {
+ if (!entry->isValid) {
*value = 0;
return;
}
break;
case GL_INFO_LOG_LENGTH:
- if (!entry.isValid) {
- *value = entry.log ? strlen(entry.log) : 0;
+ if (!entry->isValid) {
+ *value = entry->log ? strlen(entry->log) : 0;
if (*value)
(*value)++;
return;
}
break;
case GL_SHADER_SOURCE_LENGTH:
- *value = entry.source ? strlen(entry.source) : 0;
+ *value = entry->source ? strlen(entry->source) : 0;
if (*value)
(*value)++;
return;
@@ -995,11 +1040,12 @@ WebString WebGraphicsContext3DDefaultImpl::getShaderInfoLog(WebGLId shader)
ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
if (result != m_shaderSourceMap.end()) {
- ShaderSourceEntry& entry = result->second;
- if (!entry.isValid) {
- if (!entry.log)
+ ShaderSourceEntry* entry = result->second;
+ ASSERT(entry);
+ if (!entry->isValid) {
+ if (!entry->log)
return WebString();
- WebString res = WebString::fromUTF8(entry.log, strlen(entry.log));
+ WebString res = WebString::fromUTF8(entry->log, strlen(entry->log));
return res;
}
}
@@ -1025,10 +1071,11 @@ WebString WebGraphicsContext3DDefaultImpl::getShaderSource(WebGLId shader)
ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
if (result != m_shaderSourceMap.end()) {
- ShaderSourceEntry& entry = result->second;
- if (!entry.source)
+ ShaderSourceEntry* entry = result->second;
+ ASSERT(entry);
+ if (!entry->source)
return WebString();
- WebString res = WebString::fromUTF8(entry.source, strlen(entry.source));
+ WebString res = WebString::fromUTF8(entry->source, strlen(entry->source));
return res;
}
@@ -1105,17 +1152,16 @@ void WebGraphicsContext3DDefaultImpl::readPixels(long x, long y, unsigned long w
// FIXME: remove the two glFlush calls when the driver bug is fixed, i.e.,
// all previous rendering calls should be done before reading pixels.
glFlush();
- if (m_attributes.antialias && m_boundFBO == m_multisampleFBO) {
- glBindFramebufferEXT(GL_READ_FRAMEBUFFER_EXT, m_multisampleFBO);
- glBindFramebufferEXT(GL_DRAW_FRAMEBUFFER_EXT, m_fbo);
- glBlitFramebufferEXT(x, y, x + width, y + height, x, y, x + width, y + height, GL_COLOR_BUFFER_BIT, GL_LINEAR);
+ bool needsResolve = (m_attributes.antialias && m_boundFBO == m_multisampleFBO);
+ if (needsResolve) {
+ resolveMultisampledFramebuffer(x, y, width, height);
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_fbo);
glFlush();
}
glReadPixels(x, y, width, height, format, type, pixels);
- if (m_attributes.antialias && m_boundFBO == m_multisampleFBO)
+ if (needsResolve)
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
}
@@ -1151,20 +1197,86 @@ DELEGATE_TO_GL_2(sampleCoverage, SampleCoverage, double, bool)
DELEGATE_TO_GL_4(scissor, Scissor, long, long, unsigned long, unsigned long)
+unsigned bytesPerComponent(unsigned type)
+{
+ switch (type) {
+ case GL_BYTE:
+ case GL_UNSIGNED_BYTE:
+ return 1;
+ case GL_SHORT:
+ case GL_UNSIGNED_SHORT:
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ return 2;
+ case GL_FLOAT:
+ return 4;
+ default:
+ return 4;
+ }
+}
+
+unsigned componentsPerPixel(unsigned format, unsigned type)
+{
+ switch (type) {
+ case GL_UNSIGNED_SHORT_5_6_5:
+ case GL_UNSIGNED_SHORT_4_4_4_4:
+ case GL_UNSIGNED_SHORT_5_5_5_1:
+ return 1;
+ default:
+ break;
+ }
+ switch (format) {
+ case GL_LUMINANCE:
+ return 1;
+ case GL_LUMINANCE_ALPHA:
+ return 2;
+ case GL_RGB:
+ return 3;
+ case GL_RGBA:
+ case GL_BGRA_EXT:
+ return 4;
+ default:
+ return 4;
+ }
+}
+
+// N.B.: This code does not protect against integer overflow (as the command
+// buffer implementation does), so it should not be considered robust enough
+// for use in the browser. Since this implementation is only used for layout
+// tests, this should be ok for now.
+size_t imageSizeInBytes(unsigned width, unsigned height, unsigned format, unsigned type)
+{
+ return width * height * bytesPerComponent(type) * componentsPerPixel(format, type);
+}
+
+void WebGraphicsContext3DDefaultImpl::texImage2D(unsigned target, unsigned level, unsigned internalFormat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, const void* pixels)
+{
+ OwnArrayPtr<uint8> zero;
+ if (!pixels) {
+ size_t size = imageSizeInBytes(width, height, format, type);
+ zero.set(new uint8[size]);
+ memset(zero.get(), 0, size);
+ pixels = zero.get();
+ }
+ glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels);
+}
+
void WebGraphicsContext3DDefaultImpl::shaderSource(WebGLId shader, const char* string)
{
makeContextCurrent();
GLint length = string ? strlen(string) : 0;
ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
if (result != m_shaderSourceMap.end()) {
- ShaderSourceEntry& entry = result->second;
- if (entry.source) {
- fastFree(entry.source);
- entry.source = 0;
+ ShaderSourceEntry* entry = result->second;
+ ASSERT(entry);
+ if (entry->source) {
+ fastFree(entry->source);
+ entry->source = 0;
}
- if (!tryFastMalloc((length + 1) * sizeof(char)).getValue(entry.source))
+ if (!tryFastMalloc((length + 1) * sizeof(char)).getValue(entry->source))
return; // FIXME: generate an error?
- memcpy(entry.source, string, (length + 1) * sizeof(char));
+ memcpy(entry->source, string, (length + 1) * sizeof(char));
} else
glShaderSource(shader, 1, &string, &length);
}
@@ -1181,8 +1293,6 @@ DELEGATE_TO_GL_3(stencilOp, StencilOp, unsigned long, unsigned long, unsigned lo
DELEGATE_TO_GL_4(stencilOpSeparate, StencilOpSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
-DELEGATE_TO_GL_9(texImage2D, TexImage2D, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, unsigned, const void*)
-
DELEGATE_TO_GL_3(texParameterf, TexParameterf, unsigned, unsigned, float);
DELEGATE_TO_GL_3(texParameteri, TexParameteri, unsigned, unsigned, int);
@@ -1311,10 +1421,12 @@ unsigned WebGraphicsContext3DDefaultImpl::createShader(unsigned long shaderType)
ASSERT(shaderType == GL_VERTEX_SHADER || shaderType == GL_FRAGMENT_SHADER);
unsigned shader = glCreateShader(shaderType);
if (shader) {
- ShaderSourceEntry entry;
- entry.type = shaderType;
- m_shaderSourceMap.set(shader, entry);
+ ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
+ if (result != m_shaderSourceMap.end())
+ delete result->second;
+ m_shaderSourceMap.set(shader, new ShaderSourceEntry(shaderType));
}
+
return shader;
}
@@ -1353,8 +1465,12 @@ void WebGraphicsContext3DDefaultImpl::deleteRenderbuffer(unsigned renderbuffer)
void WebGraphicsContext3DDefaultImpl::deleteShader(unsigned shader)
{
makeContextCurrent();
+
+ ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
+ if (result != m_shaderSourceMap.end())
+ delete result->second;
+ m_shaderSourceMap.remove(result);
glDeleteShader(shader);
- m_shaderSourceMap.remove(shader);
}
void WebGraphicsContext3DDefaultImpl::deleteTexture(unsigned texture)
@@ -1368,29 +1484,20 @@ bool WebGraphicsContext3DDefaultImpl::angleCreateCompilers()
if (!ShInitialize())
return false;
- TBuiltInResource resource;
- resource.MaxVertexAttribs = 0;
- getIntegerv(GL_MAX_VERTEX_ATTRIBS, &resource.MaxVertexAttribs);
- resource.MaxVertexUniformVectors = 0;
- getIntegerv(MAX_VERTEX_UNIFORM_VECTORS,
- &resource.MaxVertexUniformVectors);
- resource.MaxVaryingVectors = 0;
- getIntegerv(MAX_VARYING_VECTORS,
- &resource.MaxVaryingVectors);
- resource.MaxVertexTextureImageUnits = 0;
- getIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &resource.MaxVertexTextureImageUnits);
- resource.MaxCombinedTextureImageUnits = 0;
- getIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &resource.MaxCombinedTextureImageUnits);
- resource.MaxTextureImageUnits = 0;
- getIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &resource.MaxTextureImageUnits);
- resource.MaxFragmentUniformVectors = 0;
- getIntegerv(MAX_FRAGMENT_UNIFORM_VECTORS,
- &resource.MaxFragmentUniformVectors);
+ ShBuiltInResources resources;
+ ShInitBuiltInResources(&resources);
+ getIntegerv(GL_MAX_VERTEX_ATTRIBS, &resources.MaxVertexAttribs);
+ getIntegerv(MAX_VERTEX_UNIFORM_VECTORS, &resources.MaxVertexUniformVectors);
+ getIntegerv(MAX_VARYING_VECTORS, &resources.MaxVaryingVectors);
+ getIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &resources.MaxVertexTextureImageUnits);
+ getIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &resources.MaxCombinedTextureImageUnits);
+ getIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &resources.MaxTextureImageUnits);
+ getIntegerv(MAX_FRAGMENT_UNIFORM_VECTORS, &resources.MaxFragmentUniformVectors);
// Always set to 1 for OpenGL ES.
- resource.MaxDrawBuffers = 1;
+ resources.MaxDrawBuffers = 1;
- m_fragmentCompiler = ShConstructCompiler(EShLangFragment, EShSpecWebGL, &resource);
- m_vertexCompiler = ShConstructCompiler(EShLangVertex, EShSpecWebGL, &resource);
+ m_fragmentCompiler = ShConstructCompiler(SH_FRAGMENT_SHADER, SH_WEBGL_SPEC, &resources);
+ m_vertexCompiler = ShConstructCompiler(SH_VERTEX_SHADER, SH_WEBGL_SPEC, &resources);
return (m_fragmentCompiler && m_vertexCompiler);
}
@@ -1430,7 +1537,7 @@ bool WebGraphicsContext3DDefaultImpl::angleValidateShaderSource(ShaderSourceEntr
if (!compiler)
return false;
- if (!ShCompile(compiler, &entry.source, 1, EShOptObjectCode)) {
+ if (!ShCompile(compiler, &entry.source, 1, SH_OBJECT_CODE)) {
int logSize = 0;
ShGetInfo(compiler, SH_INFO_LOG_LENGTH, &logSize);
if (logSize > 1 && tryFastMalloc(logSize * sizeof(char)).getValue(entry.log))
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
index 319d9d8..124ceac 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
@@ -273,6 +273,8 @@ public:
private:
WebGraphicsContext3D::Attributes m_attributes;
bool m_initialized;
+ bool m_renderDirectlyToWebView;
+
unsigned int m_texture;
unsigned int m_fbo;
unsigned int m_depthStencilBuffer;
@@ -298,6 +300,9 @@ private:
// not be honored based on the capabilities of the OpenGL implementation.
void validateAttributes();
+ // Resolve the given rectangle of the multisampled framebuffer if necessary.
+ void resolveMultisampledFramebuffer(unsigned x, unsigned y, unsigned width, unsigned height);
+
// Note: we aren't currently using this information, but we will
// need to in order to verify that all enabled vertex arrays have
// a valid buffer bound -- to avoid crashes on certain cards.
@@ -327,8 +332,8 @@ private:
// ANGLE related.
struct ShaderSourceEntry {
- ShaderSourceEntry()
- : type(0)
+ ShaderSourceEntry(unsigned long shaderType)
+ : type(shaderType)
, source(0)
, log(0)
, translatedSource(0)
@@ -357,7 +362,7 @@ private:
void angleDestroyCompilers();
bool angleValidateShaderSource(ShaderSourceEntry& entry);
- typedef HashMap<WebGLId, ShaderSourceEntry> ShaderSourceMap;
+ typedef HashMap<WebGLId, ShaderSourceEntry*> ShaderSourceMap;
ShaderSourceMap m_shaderSourceMap;
ShHandle m_fragmentCompiler;
diff --git a/WebKit/chromium/src/WebHTTPBody.cpp b/WebKit/chromium/src/WebHTTPBody.cpp
index 93b94c2..f32b64f 100644
--- a/WebKit/chromium/src/WebHTTPBody.cpp
+++ b/WebKit/chromium/src/WebHTTPBody.cpp
@@ -32,7 +32,6 @@
#include "WebHTTPBody.h"
#include "FormData.h"
-#include "WebFileInfo.h"
using namespace WebCore;
@@ -78,8 +77,6 @@ bool WebHTTPBody::elementAt(size_t index, Element& result) const
result.filePath.reset();
result.fileStart = 0;
result.fileLength = 0;
- // FIXME: remove this line once all users of Element have been switched to use 'modificationTime'.
- result.fileInfo.modificationTime = 0.0;
result.modificationTime = 0.0;
result.blobURL = KURL();
@@ -94,8 +91,6 @@ bool WebHTTPBody::elementAt(size_t index, Element& result) const
#if ENABLE(BLOB)
result.fileStart = element.m_fileStart;
result.fileLength = element.m_fileLength;
- // FIXME: remove this line once all users of Element have been switched to use 'modificationTime'.
- result.fileInfo.modificationTime = element.m_expectedFileModificationTime;
result.modificationTime = element.m_expectedFileModificationTime;
#endif
break;
@@ -135,12 +130,6 @@ void WebHTTPBody::appendFileRange(const WebString& filePath, long long fileStart
#endif
}
-// FIXME: Remove this method once all callers have been switched to use the method above.
-void WebHTTPBody::appendFileRange(const WebString& filePath, long long fileStart, long long fileLength, const WebFileInfo& fileInfo)
-{
- return appendFileRange(filePath, fileStart, fileLength, fileInfo.modificationTime);
-}
-
void WebHTTPBody::appendBlob(const WebURL& blobURL)
{
#if ENABLE(BLOB)
diff --git a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
index fe67789..14ed02e 100644
--- a/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
+++ b/WebKit/chromium/src/WebIDBCallbacksImpl.cpp
@@ -33,12 +33,14 @@
#include "IDBIndexBackendProxy.h"
#include "IDBKey.h"
#include "IDBObjectStoreProxy.h"
+#include "IDBTransactionBackendProxy.h"
#include "WebIDBCallbacks.h"
#include "WebIDBDatabase.h"
#include "WebIDBDatabaseError.h"
#include "WebIDBIndex.h"
#include "WebIDBKey.h"
#include "WebIDBObjectStore.h"
+#include "WebIDBTransaction.h"
#include "WebSerializedScriptValue.h"
#if ENABLE(INDEXED_DATABASE)
@@ -89,6 +91,11 @@ void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBObjectStore* webKitInstance)
m_callbacks->onSuccess(IDBObjectStoreProxy::create(webKitInstance));
}
+void WebIDBCallbacksImpl::onSuccess(WebKit::WebIDBTransaction* webKitInstance)
+{
+ m_callbacks->onSuccess(IDBTransactionBackendProxy::create(webKitInstance));
+}
+
void WebIDBCallbacksImpl::onSuccess(const WebKit::WebSerializedScriptValue& serializedScriptValue)
{
m_callbacks->onSuccess(serializedScriptValue);
diff --git a/WebKit/chromium/src/WebIDBCallbacksImpl.h b/WebKit/chromium/src/WebIDBCallbacksImpl.h
index 1835c60..33a72f4 100644
--- a/WebKit/chromium/src/WebIDBCallbacksImpl.h
+++ b/WebKit/chromium/src/WebIDBCallbacksImpl.h
@@ -48,6 +48,7 @@ public:
virtual void onSuccess(const WebKit::WebIDBKey&);
virtual void onSuccess(WebKit::WebIDBIndex*);
virtual void onSuccess(WebKit::WebIDBObjectStore*);
+ virtual void onSuccess(WebKit::WebIDBTransaction*);
virtual void onSuccess(const WebKit::WebSerializedScriptValue&);
private:
diff --git a/WebKit/chromium/src/WebIDBCursorImpl.cpp b/WebKit/chromium/src/WebIDBCursorImpl.cpp
index 6a1053e..eca5d42 100644
--- a/WebKit/chromium/src/WebIDBCursorImpl.cpp
+++ b/WebKit/chromium/src/WebIDBCursorImpl.cpp
@@ -70,19 +70,19 @@ void WebIDBCursorImpl::value(WebSerializedScriptValue& serializedScriptValue, We
ASSERT_NOT_REACHED();
}
-void WebIDBCursorImpl::update(const WebSerializedScriptValue& value, WebIDBCallbacks* callbacks)
+void WebIDBCursorImpl::update(const WebSerializedScriptValue& value, WebIDBCallbacks* callbacks, WebExceptionCode& ec)
{
- m_idbCursorBackend->update(value, IDBCallbacksProxy::create(callbacks));
+ m_idbCursorBackend->update(value, IDBCallbacksProxy::create(callbacks), ec);
}
-void WebIDBCursorImpl::continueFunction(const WebIDBKey& key, WebIDBCallbacks* callbacks)
+void WebIDBCursorImpl::continueFunction(const WebIDBKey& key, WebIDBCallbacks* callbacks, WebExceptionCode& ec)
{
- m_idbCursorBackend->continueFunction(key, IDBCallbacksProxy::create(callbacks));
+ m_idbCursorBackend->continueFunction(key, IDBCallbacksProxy::create(callbacks), ec);
}
-void WebIDBCursorImpl::remove(WebIDBCallbacks* callbacks)
+void WebIDBCursorImpl::remove(WebIDBCallbacks* callbacks, WebExceptionCode& ec)
{
- m_idbCursorBackend->remove(IDBCallbacksProxy::create(callbacks));
+ m_idbCursorBackend->remove(IDBCallbacksProxy::create(callbacks), ec);
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/WebIDBCursorImpl.h b/WebKit/chromium/src/WebIDBCursorImpl.h
index 5fb9e1c..39fa44b 100644
--- a/WebKit/chromium/src/WebIDBCursorImpl.h
+++ b/WebKit/chromium/src/WebIDBCursorImpl.h
@@ -27,6 +27,7 @@
#define WebIDBCursorImpl_h
#include "WebCommon.h"
+#include "WebExceptionCode.h"
#include "WebIDBCursor.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
@@ -44,9 +45,9 @@ public:
virtual unsigned short direction() const;
virtual WebIDBKey key() const;
virtual void value(WebSerializedScriptValue&, WebIDBKey&) const;
- virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*);
- virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*);
- virtual void remove(WebIDBCallbacks*);
+ virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*, WebExceptionCode&);
+ virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&);
+ virtual void remove(WebIDBCallbacks*, WebExceptionCode&);
private:
WTF::RefPtr<WebCore::IDBCursorBackendInterface> m_idbCursorBackend;
diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
index 8870ff9..2d95e21 100644
--- a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
+++ b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
@@ -69,38 +69,38 @@ WebDOMStringList WebIDBDatabaseImpl::objectStores() const
return m_databaseBackend->objectStores();
}
-void WebIDBDatabaseImpl::createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, WebIDBCallbacks* callbacks)
+WebIDBObjectStore* WebIDBDatabaseImpl::createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_databaseBackend->createObjectStore(name, keyPath, autoIncrement, IDBCallbacksProxy::create(callbacks));
-}
-
-WebIDBObjectStore* WebIDBDatabaseImpl::objectStore(const WebString& name, unsigned short mode)
-{
- RefPtr<IDBObjectStoreBackendInterface> objectStore = m_databaseBackend->objectStore(name, mode);
+ RefPtr<IDBObjectStoreBackendInterface> objectStore = m_databaseBackend->createObjectStore(name, keyPath, autoIncrement, transaction.getIDBTransactionBackendInterface(), ec);
if (!objectStore)
return 0;
return new WebIDBObjectStoreImpl(objectStore);
}
-void WebIDBDatabaseImpl::removeObjectStore(const WebString& name, WebIDBCallbacks* callbacks)
+void WebIDBDatabaseImpl::removeObjectStore(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_databaseBackend->removeObjectStore(name, IDBCallbacksProxy::create(callbacks));
+ m_databaseBackend->removeObjectStore(name, transaction.getIDBTransactionBackendInterface(), ec);
}
-void WebIDBDatabaseImpl::setVersion(const WebString& version, WebIDBCallbacks* callbacks)
+void WebIDBDatabaseImpl::setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode& ec)
{
- m_databaseBackend->setVersion(version, IDBCallbacksProxy::create(callbacks));
+ m_databaseBackend->setVersion(version, IDBCallbacksProxy::create(callbacks), ec);
}
-WebIDBTransaction* WebIDBDatabaseImpl::transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout)
+WebIDBTransaction* WebIDBDatabaseImpl::transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout, WebExceptionCode& ec)
{
RefPtr<DOMStringList> nameList = PassRefPtr<DOMStringList>(names);
- RefPtr<IDBTransactionBackendInterface> transaction = m_databaseBackend->transaction(nameList.get(), mode, timeout);
+ RefPtr<IDBTransactionBackendInterface> transaction = m_databaseBackend->transaction(nameList.get(), mode, timeout, ec);
if (!transaction)
return 0;
return new WebIDBTransactionImpl(transaction);
}
+void WebIDBDatabaseImpl::close()
+{
+ m_databaseBackend->close();
+}
+
} // namespace WebCore
#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.h b/WebKit/chromium/src/WebIDBDatabaseImpl.h
index e0eaaa5..fda4265 100644
--- a/WebKit/chromium/src/WebIDBDatabaseImpl.h
+++ b/WebKit/chromium/src/WebIDBDatabaseImpl.h
@@ -27,6 +27,7 @@
#define WebIDBDatabaseImpl_h
#include "WebCommon.h"
+#include "WebExceptionCode.h"
#include "WebIDBDatabase.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>
@@ -49,11 +50,11 @@ public:
virtual WebString version() const;
virtual WebDOMStringList objectStores() const;
- virtual void createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, WebIDBCallbacks* callbacks);
- virtual WebIDBObjectStore* objectStore(const WebString& name, unsigned short mode);
- virtual void removeObjectStore(const WebString& name, WebIDBCallbacks* callbacks);
- virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks);
- virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout);
+ virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&);
+ virtual void removeObjectStore(const WebString& name, const WebIDBTransaction&, WebExceptionCode&);
+ virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode&);
+ virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout, WebExceptionCode&);
+ virtual void close();
private:
WTF::RefPtr<WebCore::IDBDatabaseBackendInterface> m_databaseBackend;
diff --git a/WebKit/chromium/src/WebIDBFactoryImpl.cpp b/WebKit/chromium/src/WebIDBFactoryImpl.cpp
index 7147cf0..5d0ab85 100755
--- a/WebKit/chromium/src/WebIDBFactoryImpl.cpp
+++ b/WebKit/chromium/src/WebIDBFactoryImpl.cpp
@@ -58,9 +58,9 @@ WebIDBFactoryImpl::~WebIDBFactoryImpl()
{
}
-void WebIDBFactoryImpl::open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*, const WebString& dataDir)
+void WebIDBFactoryImpl::open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame*, const WebString& dataDir, unsigned long long maximumSize)
{
- m_idbFactoryBackend->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0, dataDir);
+ m_idbFactoryBackend->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0, dataDir, maximumSize);
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebIDBFactoryImpl.h b/WebKit/chromium/src/WebIDBFactoryImpl.h
index a0a4d7d..4bc9426 100755
--- a/WebKit/chromium/src/WebIDBFactoryImpl.h
+++ b/WebKit/chromium/src/WebIDBFactoryImpl.h
@@ -42,7 +42,7 @@ public:
WebIDBFactoryImpl();
virtual ~WebIDBFactoryImpl();
- virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir);
+ virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir, unsigned long long maximumSize);
private:
WTF::RefPtr<WebCore::IDBFactoryBackendInterface> m_idbFactoryBackend;
diff --git a/WebKit/chromium/src/WebIDBIndexImpl.cpp b/WebKit/chromium/src/WebIDBIndexImpl.cpp
index c049aac..6e8e1f2 100644
--- a/WebKit/chromium/src/WebIDBIndexImpl.cpp
+++ b/WebKit/chromium/src/WebIDBIndexImpl.cpp
@@ -68,24 +68,24 @@ bool WebIDBIndexImpl::unique() const
return m_backend->unique();
}
-void WebIDBIndexImpl::openCursor(const WebIDBKeyRange& keyRange, unsigned short direction, WebIDBCallbacks* callbacks)
+void WebIDBIndexImpl::openObjectCursor(const WebIDBKeyRange& keyRange, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_backend->openCursor(keyRange, direction, IDBCallbacksProxy::create(callbacks));
+ m_backend->openCursor(keyRange, direction, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec);
}
-void WebIDBIndexImpl::openObjectCursor(const WebIDBKeyRange& keyRange, unsigned short direction, WebIDBCallbacks* callbacks)
+void WebIDBIndexImpl::openKeyCursor(const WebIDBKeyRange& keyRange, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_backend->openObjectCursor(keyRange, direction, IDBCallbacksProxy::create(callbacks));
+ m_backend->openKeyCursor(keyRange, direction, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec);
}
-void WebIDBIndexImpl::getObject(const WebIDBKey& keyRange, WebIDBCallbacks* callbacks)
+void WebIDBIndexImpl::getObject(const WebIDBKey& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_backend->getObject(keyRange, IDBCallbacksProxy::create(callbacks));
+ m_backend->get(keyRange, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec);
}
-void WebIDBIndexImpl::get(const WebIDBKey& keyRange, WebIDBCallbacks* callbacks)
+void WebIDBIndexImpl::getKey(const WebIDBKey& keyRange, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_backend->get(keyRange, IDBCallbacksProxy::create(callbacks));
+ m_backend->getKey(keyRange, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec);
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/WebIDBIndexImpl.h b/WebKit/chromium/src/WebIDBIndexImpl.h
index 2108001..f68da7f 100644
--- a/WebKit/chromium/src/WebIDBIndexImpl.h
+++ b/WebKit/chromium/src/WebIDBIndexImpl.h
@@ -46,10 +46,10 @@ public:
virtual WebString keyPath() const;
virtual bool unique() const;
- virtual void openObjectCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*);
- virtual void openCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*);
- virtual void getObject(const WebIDBKey&, WebIDBCallbacks*);
- virtual void get(const WebIDBKey&, WebIDBCallbacks*);
+ virtual void openObjectCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
+ virtual void openKeyCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
+ virtual void getObject(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
+ virtual void getKey(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
private:
WTF::RefPtr<WebCore::IDBIndexBackendInterface> m_backend;
diff --git a/WebKit/chromium/src/WebIDBKeyRange.cpp b/WebKit/chromium/src/WebIDBKeyRange.cpp
index 4ce9452..720af5f 100644
--- a/WebKit/chromium/src/WebIDBKeyRange.cpp
+++ b/WebKit/chromium/src/WebIDBKeyRange.cpp
@@ -41,7 +41,10 @@ void WebIDBKeyRange::assign(const WebIDBKeyRange& other)
void WebIDBKeyRange::assign(const WebIDBKey& left, const WebIDBKey& right, unsigned short flags)
{
- m_private = IDBKeyRange::create(left, right, flags);
+ if (left.type() == WebIDBKey::InvalidType && right.type() == WebIDBKey::InvalidType)
+ m_private = 0;
+ else
+ m_private = IDBKeyRange::create(left, right, flags);
}
void WebIDBKeyRange::reset()
@@ -51,16 +54,22 @@ void WebIDBKeyRange::reset()
WebIDBKey WebIDBKeyRange::left() const
{
+ if (!m_private.get())
+ return WebIDBKey::createInvalid();
return m_private->left();
}
WebIDBKey WebIDBKeyRange::right() const
{
+ if (!m_private.get())
+ return WebIDBKey::createInvalid();
return m_private->right();
}
unsigned short WebIDBKeyRange::flags() const
{
+ if (!m_private.get())
+ return 0;
return m_private->flags();
}
diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
index 36d8ace..96495fe 100755
--- a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
+++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
@@ -66,42 +66,45 @@ WebDOMStringList WebIDBObjectStoreImpl::indexNames() const
return m_objectStore->indexNames();
}
-void WebIDBObjectStoreImpl::get(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction)
+void WebIDBObjectStoreImpl::get(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_objectStore->get(key, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface());
+ m_objectStore->get(key, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec);
}
-void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks* callbacks)
+void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_objectStore->put(value, key, addOnly, IDBCallbacksProxy::create(callbacks));
+ m_objectStore->put(value, key, addOnly, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec);
}
-void WebIDBObjectStoreImpl::remove(const WebIDBKey& key, WebIDBCallbacks* callbacks)
+void WebIDBObjectStoreImpl::remove(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_objectStore->remove(key, IDBCallbacksProxy::create(callbacks));
+ m_objectStore->remove(key, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec);
}
-void WebIDBObjectStoreImpl::createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks* callbacks)
+WebIDBIndex* WebIDBObjectStoreImpl::createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_objectStore->createIndex(name, keyPath, unique, IDBCallbacksProxy::create(callbacks));
+ RefPtr<IDBIndexBackendInterface> index = m_objectStore->createIndex(name, keyPath, unique, transaction.getIDBTransactionBackendInterface(), ec);
+ if (!index)
+ return 0;
+ return new WebIDBIndexImpl(index);
}
-WebIDBIndex* WebIDBObjectStoreImpl::index(const WebString& name)
+WebIDBIndex* WebIDBObjectStoreImpl::index(const WebString& name, WebExceptionCode& ec)
{
- RefPtr<IDBIndexBackendInterface> index = m_objectStore->index(name);
+ RefPtr<IDBIndexBackendInterface> index = m_objectStore->index(name, ec);
if (!index)
return 0;
return new WebIDBIndexImpl(index);
}
-void WebIDBObjectStoreImpl::removeIndex(const WebString& name, WebIDBCallbacks* callbacks)
+void WebIDBObjectStoreImpl::removeIndex(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_objectStore->removeIndex(name, IDBCallbacksProxy::create(callbacks));
+ m_objectStore->removeIndex(name, transaction.getIDBTransactionBackendInterface(), ec);
}
-void WebIDBObjectStoreImpl::openCursor(const WebIDBKeyRange& keyRange, unsigned short direction, WebIDBCallbacks* callbacks)
+void WebIDBObjectStoreImpl::openCursor(const WebIDBKeyRange& keyRange, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec)
{
- m_objectStore->openCursor(IDBKeyRange::create(keyRange.left(), keyRange.right(), keyRange.flags()), direction, IDBCallbacksProxy::create(callbacks));
+ m_objectStore->openCursor(IDBKeyRange::create(keyRange.left(), keyRange.right(), keyRange.flags()), direction, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface(), ec);
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.h b/WebKit/chromium/src/WebIDBObjectStoreImpl.h
index a9f1200..9148118 100755
--- a/WebKit/chromium/src/WebIDBObjectStoreImpl.h
+++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.h
@@ -47,15 +47,15 @@ public:
WebString keyPath() const;
WebDOMStringList indexNames() const;
- void get(const WebIDBKey& key, WebIDBCallbacks*, const WebIDBTransaction&);
- void put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks*);
- void remove(const WebIDBKey& key, WebIDBCallbacks*);
+ void get(const WebIDBKey& key, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
+ void put(const WebSerializedScriptValue&, const WebIDBKey& key, bool addOnly, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
+ void remove(const WebIDBKey& key, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
- void createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks* callbacks);
- WebIDBIndex* index(const WebString& name);
- void removeIndex(const WebString& name, WebIDBCallbacks* callbacks);
+ WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction&, WebExceptionCode&);
+ WebIDBIndex* index(const WebString& name, WebExceptionCode&);
+ void removeIndex(const WebString& name, const WebIDBTransaction&, WebExceptionCode&);
- void openCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*);
+ void openCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&);
private:
WTF::RefPtr<WebCore::IDBObjectStoreBackendInterface> m_objectStore;
diff --git a/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp b/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp
index 264ddc5..96924cf 100644
--- a/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp
+++ b/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp
@@ -46,9 +46,14 @@ void WebIDBTransactionCallbacksImpl::onAbort()
m_callbacks->onAbort();
}
-int WebIDBTransactionCallbacksImpl::id() const
+void WebIDBTransactionCallbacksImpl::onComplete()
{
- return m_callbacks->id();
+ m_callbacks->onComplete();
+}
+
+void WebIDBTransactionCallbacksImpl::onTimeout()
+{
+ m_callbacks->onTimeout();
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h b/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h
index 398a679a..89b9cbe 100644
--- a/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h
+++ b/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h
@@ -42,7 +42,8 @@ public:
virtual ~WebIDBTransactionCallbacksImpl();
virtual void onAbort();
- virtual int id() const;
+ virtual void onComplete();
+ virtual void onTimeout();
private:
RefPtr<IDBTransactionCallbacks> m_callbacks;
diff --git a/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
index f0ece0d..e19308a 100644
--- a/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
+++ b/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
@@ -95,6 +95,14 @@ WebMediaPlayer* WebMediaPlayerClientImpl::mediaPlayer() const
// WebMediaPlayerClient --------------------------------------------------------
+WebMediaPlayerClientImpl::~WebMediaPlayerClientImpl()
+{
+ // VideoLayerChromium may outlive this object so make sure all frames are
+ // released.
+ if (m_videoLayer.get())
+ m_videoLayer->releaseCurrentFrame();
+}
+
void WebMediaPlayerClientImpl::networkStateChanged()
{
ASSERT(m_mediaPlayer);
@@ -105,6 +113,8 @@ void WebMediaPlayerClientImpl::readyStateChanged()
{
ASSERT(m_mediaPlayer);
m_mediaPlayer->readyStateChanged();
+ if (hasVideo() && supportsAcceleratedRendering() && !m_videoLayer.get())
+ m_videoLayer = VideoLayerChromium::create(0, this);
}
void WebMediaPlayerClientImpl::volumeChanged(float newVolume)
@@ -173,6 +183,11 @@ void WebMediaPlayerClientImpl::load(const String& url)
Frame* frame = static_cast<HTMLMediaElement*>(
m_mediaPlayer->mediaPlayerClient())->document()->frame();
+ // Video frame object is owned by WebMediaPlayer. Before destroying
+ // WebMediaPlayer all frames need to be released.
+ if (m_videoLayer.get())
+ m_videoLayer->releaseCurrentFrame();
+
m_webMediaPlayer.set(createWebMediaPlayer(this, frame));
if (m_webMediaPlayer.get())
m_webMediaPlayer->load(KURL(ParsedURLString, url));
@@ -455,9 +470,6 @@ MediaPlayerPrivateInterface* WebMediaPlayerClientImpl::create(MediaPlayer* playe
// if necessary.
client->m_supportsAcceleratedCompositing =
frame->contentRenderer()->compositor()->hasAcceleratedCompositing();
-
- if (client->m_supportsAcceleratedCompositing)
- client->m_videoLayer = VideoLayerChromium::create(0, client);
#endif
return client;
diff --git a/WebKit/chromium/src/WebMediaPlayerClientImpl.h b/WebKit/chromium/src/WebMediaPlayerClientImpl.h
index e014871..6535094 100644
--- a/WebKit/chromium/src/WebMediaPlayerClientImpl.h
+++ b/WebKit/chromium/src/WebMediaPlayerClientImpl.h
@@ -36,6 +36,7 @@
#include "MediaPlayerPrivate.h"
#include "VideoFrameChromium.h"
#include "VideoFrameProvider.h"
+#include "VideoLayerChromium.h"
#include "WebMediaPlayerClient.h"
#include <wtf/OwnPtr.h>
@@ -61,6 +62,7 @@ public:
WebMediaPlayer* mediaPlayer() const;
// WebMediaPlayerClient methods:
+ virtual ~WebMediaPlayerClientImpl();
virtual void networkStateChanged();
virtual void readyStateChanged();
virtual void volumeChanged(float);
@@ -129,7 +131,7 @@ private:
WebCore::MediaPlayer* m_mediaPlayer;
OwnPtr<WebMediaPlayer> m_webMediaPlayer;
#if USE(ACCELERATED_COMPOSITING)
- RefPtr<WebCore::PlatformLayer> m_videoLayer;
+ RefPtr<WebCore::VideoLayerChromium> m_videoLayer;
bool m_supportsAcceleratedCompositing;
#endif
static bool m_isEnabled;
diff --git a/WebKit/chromium/src/WebNode.cpp b/WebKit/chromium/src/WebNode.cpp
index caea589..e91d1ee 100644
--- a/WebKit/chromium/src/WebNode.cpp
+++ b/WebKit/chromium/src/WebNode.cpp
@@ -32,6 +32,7 @@
#include "WebNode.h"
#include "Document.h"
+#include "Element.h"
#include "Frame.h"
#include "FrameLoaderClientImpl.h"
#include "Node.h"
@@ -144,6 +145,11 @@ bool WebNode::isTextNode() const
return m_private->isTextNode();
}
+bool WebNode::isContentEditable() const
+{
+ return m_private->isContentEditable();
+}
+
bool WebNode::isElementNode() const
{
return m_private->isElementNode();
diff --git a/WebKit/chromium/src/WebNotification.cpp b/WebKit/chromium/src/WebNotification.cpp
index bfc1bec..c3b1f51 100644
--- a/WebKit/chromium/src/WebNotification.cpp
+++ b/WebKit/chromium/src/WebNotification.cpp
@@ -34,6 +34,7 @@
#if ENABLE(NOTIFICATIONS)
#include "Notification.h"
+#include "UserGestureIndicator.h"
#include "WebString.h"
#include "WebTextDirection.h"
@@ -140,6 +141,8 @@ void WebNotification::dispatchCloseEvent(bool /* byUser */)
void WebNotification::dispatchClickEvent()
{
+ // Make sure clicks on notifications are treated as user gestures.
+ UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
RefPtr<Event> event = Event::create(eventNames().clickEvent, false, true);
m_private->dispatchEvent(event.release());
}
diff --git a/WebKit/chromium/src/WebPageSerializer.cpp b/WebKit/chromium/src/WebPageSerializer.cpp
index 4f93702..1fda484 100644
--- a/WebKit/chromium/src/WebPageSerializer.cpp
+++ b/WebKit/chromium/src/WebPageSerializer.cpp
@@ -32,7 +32,6 @@
#include "WebPageSerializer.h"
#include "KURL.h"
-#include "PlatformString.h"
#include "WebFrame.h"
#include "WebPageSerializerClient.h"
@@ -41,6 +40,8 @@
#include "WebURL.h"
#include "WebVector.h"
+#include <wtf/text/StringConcatenate.h>
+
using namespace WebCore;
namespace WebKit {
@@ -59,8 +60,7 @@ bool WebPageSerializer::serialize(WebFrame* frame,
WebString WebPageSerializer::generateMetaCharsetDeclaration(const WebString& charset)
{
- return String::format("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=%s\">",
- charset.utf8().data());
+ return makeString("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=", static_cast<const String&>(charset), "\">");
}
WebString WebPageSerializer::generateMarkOfTheWebDeclaration(const WebURL& url)
@@ -72,10 +72,9 @@ WebString WebPageSerializer::generateMarkOfTheWebDeclaration(const WebURL& url)
WebString WebPageSerializer::generateBaseTagDeclaration(const WebString& baseTarget)
{
- String targetDeclaration;
- if (!baseTarget.isEmpty())
- targetDeclaration = String::format(" target=\"%s\"", baseTarget.utf8().data());
- return String::format("<base href=\".\"%s>", targetDeclaration.utf8().data());
+ if (baseTarget.isEmpty())
+ return makeString("<base href=\".\">");
+ return makeString("<base href=\".\" target=\"", static_cast<const String&>(baseTarget), "\">");
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebPageSerializerImpl.cpp b/WebKit/chromium/src/WebPageSerializerImpl.cpp
index 885ee25..0d85d78 100644
--- a/WebKit/chromium/src/WebPageSerializerImpl.cpp
+++ b/WebKit/chromium/src/WebPageSerializerImpl.cpp
@@ -88,8 +88,6 @@
#include "HTMLMetaElement.h"
#include "HTMLNames.h"
#include "KURL.h"
-#include "PlatformString.h"
-#include "StringBuilder.h"
#include "TextEncoding.h"
#include "markup.h"
@@ -107,22 +105,22 @@ namespace WebKit {
// contegious string is found in the page.
static const unsigned dataBufferCapacity = 65536;
-WebPageSerializerImpl::SerializeDomParam::SerializeDomParam(const KURL& currentFrameURL,
+WebPageSerializerImpl::SerializeDomParam::SerializeDomParam(const KURL& url,
const TextEncoding& textEncoding,
- Document* doc,
+ Document* document,
const String& directoryName)
- : currentFrameURL(currentFrameURL)
+ : url(url)
, textEncoding(textEncoding)
- , doc(doc)
+ , document(document)
, directoryName(directoryName)
- , hasDoctype(false)
- , hasCheckedMeta(false)
+ , isHTMLDocument(document->isHTMLDocument())
+ , haveSeenDocType(false)
+ , haveAddedCharsetDeclaration(false)
, skipMetaElement(0)
, isInScriptOrStyleTag(false)
- , hasDocDeclaration(false)
+ , haveAddedXMLProcessingDirective(false)
+ , haveAddedContentsBeforeEnd(false)
{
- // Cache the value since we check it lots of times.
- isHTMLDocument = doc->isHTMLDocument();
}
String WebPageSerializerImpl::preActionBeforeSerializeOpenTag(
@@ -150,41 +148,41 @@ String WebPageSerializerImpl::preActionBeforeSerializeOpenTag(
}
} else if (element->hasTagName(HTMLNames::htmlTag)) {
// Check something before processing the open tag of HEAD element.
- // First we add doc type declaration if original doc has it.
- if (!param->hasDoctype) {
- param->hasDoctype = true;
- result.append(createMarkup(param->doc->doctype()));
+ // First we add doc type declaration if original document has it.
+ if (!param->haveSeenDocType) {
+ param->haveSeenDocType = true;
+ result.append(createMarkup(param->document->doctype()));
}
// Add MOTW declaration before html tag.
// See http://msdn2.microsoft.com/en-us/library/ms537628(VS.85).aspx.
- result.append(WebPageSerializer::generateMarkOfTheWebDeclaration(param->currentFrameURL));
+ result.append(WebPageSerializer::generateMarkOfTheWebDeclaration(param->url));
} else if (element->hasTagName(HTMLNames::baseTag)) {
// Comment the BASE tag when serializing dom.
result.append("<!--");
}
} else {
// Write XML declaration.
- if (!param->hasDocDeclaration) {
- param->hasDocDeclaration = true;
+ if (!param->haveAddedXMLProcessingDirective) {
+ param->haveAddedXMLProcessingDirective = true;
// Get encoding info.
- String xmlEncoding = param->doc->xmlEncoding();
+ String xmlEncoding = param->document->xmlEncoding();
if (xmlEncoding.isEmpty())
- xmlEncoding = param->doc->frame()->loader()->writer()->encoding();
+ xmlEncoding = param->document->frame()->loader()->writer()->encoding();
if (xmlEncoding.isEmpty())
xmlEncoding = UTF8Encoding().name();
result.append("<?xml version=\"");
- result.append(param->doc->xmlVersion());
+ result.append(param->document->xmlVersion());
result.append("\" encoding=\"");
result.append(xmlEncoding);
- if (param->doc->xmlStandalone())
+ if (param->document->xmlStandalone())
result.append("\" standalone=\"yes");
result.append("\"?>\n");
}
- // Add doc type declaration if original doc has it.
- if (!param->hasDoctype) {
- param->hasDoctype = true;
- result.append(createMarkup(param->doc->doctype()));
+ // Add doc type declaration if original document has it.
+ if (!param->haveSeenDocType) {
+ param->haveSeenDocType = true;
+ result.append(createMarkup(param->document->doctype()));
}
}
return result.toString();
@@ -195,13 +193,13 @@ String WebPageSerializerImpl::postActionAfterSerializeOpenTag(
{
StringBuilder result;
- param->hasAddedContentsBeforeEnd = false;
+ param->haveAddedContentsBeforeEnd = false;
if (!param->isHTMLDocument)
return result.toString();
// Check after processing the open tag of HEAD element
- if (!param->hasCheckedMeta
+ if (!param->haveAddedCharsetDeclaration
&& element->hasTagName(HTMLNames::headTag)) {
- param->hasCheckedMeta = true;
+ param->haveAddedCharsetDeclaration = true;
// Check meta element. WebKit only pre-parse the first 512 bytes
// of the document. If the whole <HEAD> is larger and meta is the
// end of head part, then this kind of pages aren't decoded correctly
@@ -212,7 +210,7 @@ String WebPageSerializerImpl::postActionAfterSerializeOpenTag(
result.append(WebPageSerializer::generateMetaCharsetDeclaration(
String(param->textEncoding.name())));
- param->hasAddedContentsBeforeEnd = true;
+ param->haveAddedContentsBeforeEnd = true;
// Will search each META which has charset declaration, and skip them all
// in PreActionBeforeSerializeOpenTag.
} else if (element->hasTagName(HTMLNames::scriptTag)
@@ -259,7 +257,7 @@ String WebPageSerializerImpl::postActionAfterSerializeEndTag(
result.append("-->");
// Append a new base tag declaration.
result.append(WebPageSerializer::generateBaseTagDeclaration(
- param->doc->baseTarget()));
+ param->document->baseTarget()));
}
return result.toString();
@@ -271,27 +269,27 @@ void WebPageSerializerImpl::saveHTMLContentToBuffer(
m_dataBuffer.append(result);
encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsNotFinished,
param,
- 0);
+ DoNotForceFlush);
}
void WebPageSerializerImpl::encodeAndFlushBuffer(
WebPageSerializerClient::PageSerializationStatus status,
SerializeDomParam* param,
- bool force)
+ FlushOption flushOption)
{
// Data buffer is not full nor do we want to force flush.
- if (!force && m_dataBuffer.length() <= dataBufferCapacity)
+ if (flushOption != ForceFlush && m_dataBuffer.length() <= dataBufferCapacity)
return;
String content = m_dataBuffer.toString();
- m_dataBuffer.clear();
+ m_dataBuffer = StringBuilder();
// Convert the unicode content to target encoding
CString encodedContent = param->textEncoding.encode(
content.characters(), content.length(), EntitiesForUnencodables);
// Send result to the client.
- m_client->didSerializeDataForFrame(param->currentFrameURL,
+ m_client->didSerializeDataForFrame(param->url,
WebCString(encodedContent.data(), encodedContent.length()),
status);
}
@@ -329,7 +327,7 @@ void WebPageSerializerImpl::openTagToString(const Element* element,
result += attrValue;
else {
// Get the absolute link
- String completeURL = param->doc->completeURL(attrValue);
+ String completeURL = param->document->completeURL(attrValue);
// Check whether we have local files for those link.
if (m_localLinks.contains(completeURL)) {
if (!m_localDirectoryName.isEmpty())
@@ -352,7 +350,7 @@ void WebPageSerializerImpl::openTagToString(const Element* element,
// Do post action for open tag.
String addedContents = postActionAfterSerializeOpenTag(element, param);
// Complete the open tag for element when it has child/children.
- if (element->hasChildNodes() || param->hasAddedContentsBeforeEnd)
+ if (element->hasChildNodes() || param->haveAddedContentsBeforeEnd)
result += ">";
// Append the added contents generate in post action of open tag.
result += addedContents;
@@ -372,7 +370,7 @@ void WebPageSerializerImpl::endTagToString(const Element* element,
if (needSkip)
return;
// Write end tag when element has child/children.
- if (element->hasChildNodes() || param->hasAddedContentsBeforeEnd) {
+ if (element->hasChildNodes() || param->haveAddedContentsBeforeEnd) {
result += "</";
result += element->nodeName().lower();
result += ">";
@@ -422,7 +420,7 @@ void WebPageSerializerImpl::buildContentForNode(const Node* node,
break;
// Document type node can be in DOM?
case Node::DOCUMENT_TYPE_NODE:
- param->hasDoctype = true;
+ param->haveSeenDocType = true;
default:
// For other type node, call default action.
saveHTMLContentToBuffer(createMarkup(node), param);
@@ -456,7 +454,7 @@ WebPageSerializerImpl::WebPageSerializerImpl(WebFrame* frame,
m_localLinks.set(url.string(), localPaths[i]);
}
- ASSERT(!m_dataBuffer.length());
+ ASSERT(m_dataBuffer.isEmpty());
}
void WebPageSerializerImpl::collectTargetFrames()
@@ -491,55 +489,37 @@ void WebPageSerializerImpl::collectTargetFrames()
bool WebPageSerializerImpl::serialize()
{
- // Collect target frames.
if (!m_framesCollected)
collectTargetFrames();
+
bool didSerialization = false;
- // Get KURL for main frame.
- KURL mainPageURL = m_specifiedWebFrameImpl->frame()->loader()->url();
+ KURL mainURL = m_specifiedWebFrameImpl->frame()->document()->url();
- // Go through all frames for serializing DOM for whole page, include
- // sub-frames.
- for (int i = 0; i < static_cast<int>(m_frames.size()); ++i) {
- // Get current serializing frame.
- WebFrameImpl* currentFrame = m_frames[i];
- // Get current using document.
- Document* currentDoc = currentFrame->frame()->document();
- // Get current frame's URL.
- const KURL& currentFrameURL = currentFrame->frame()->loader()->url();
-
- // Check whether we have done this document.
- if (currentFrameURL.isValid() && m_localLinks.contains(currentFrameURL.string())) {
- // A new document, we will serialize it.
- didSerialization = true;
- // Get target encoding for current document.
- String encoding = currentFrame->frame()->loader()->writer()->encoding();
- // Create the text encoding object with target encoding.
- TextEncoding textEncoding(encoding);
- // Construct serialize parameter for late processing document.
- SerializeDomParam param(currentFrameURL,
- encoding.length() ? textEncoding : UTF8Encoding(),
- currentDoc,
- currentFrameURL == mainPageURL ? m_localDirectoryName : "");
-
- // Process current document.
- Element* rootElement = currentDoc->documentElement();
- if (rootElement)
- buildContentForNode(rootElement, &param);
-
- // Flush the remainder data and finish serializing current frame.
- encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsFinished,
- &param,
- 1);
- }
+ for (unsigned i = 0; i < m_frames.size(); ++i) {
+ WebFrameImpl* webFrame = m_frames[i];
+ Document* document = webFrame->frame()->document();
+ const KURL& url = document->url();
+
+ if (!url.isValid() || !m_localLinks.contains(url.string()))
+ continue;
+
+ didSerialization = true;
+
+ String encoding = webFrame->frame()->loader()->writer()->encoding();
+ const TextEncoding& textEncoding = encoding.isEmpty() ? UTF8Encoding() : TextEncoding(encoding);
+ String directoryName = url == mainURL ? m_localDirectoryName : "";
+
+ SerializeDomParam param(url, textEncoding, document, directoryName);
+
+ Element* documentElement = document->documentElement();
+ if (documentElement)
+ buildContentForNode(documentElement, &param);
+
+ encodeAndFlushBuffer(WebPageSerializerClient::CurrentFrameIsFinished, &param, ForceFlush);
}
- // We have done call frames, so we send message to embedder to tell it that
- // frames are finished serializing.
- ASSERT(!m_dataBuffer.length());
- m_client->didSerializeDataForFrame(KURL(),
- WebCString("", 0),
- WebPageSerializerClient::AllFramesAreFinished);
+ ASSERT(m_dataBuffer.isEmpty());
+ m_client->didSerializeDataForFrame(KURL(), WebCString("", 0), WebPageSerializerClient::AllFramesAreFinished);
return didSerialization;
}
diff --git a/WebKit/chromium/src/WebPageSerializerImpl.h b/WebKit/chromium/src/WebPageSerializerImpl.h
index a7f2fb4..5ee8805 100644
--- a/WebKit/chromium/src/WebPageSerializerImpl.h
+++ b/WebKit/chromium/src/WebPageSerializerImpl.h
@@ -31,12 +31,12 @@
#ifndef WebPageSerializerImpl_h
#define WebPageSerializerImpl_h
-#include "PlatformString.h"
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
#include <wtf/Vector.h>
+#include <wtf/text/StringBuilder.h>
#include <wtf/text/StringHash.h>
-#include "StringBuilder.h"
+#include <wtf/text/WTFString.h>
#include "WebEntities.h"
#include "WebPageSerializer.h"
@@ -98,7 +98,7 @@ private:
// original link.
LinkLocalPathMap m_localLinks;
// Data buffer for saving result of serialized DOM data.
- WebCore::StringBuilder m_dataBuffer;
+ StringBuilder m_dataBuffer;
// Passing true to recursive_serialization_ indicates we will serialize not
// only the specified frame but also all sub-frames in the specific frame.
// Otherwise we only serialize the specified frame excluded all sub-frames.
@@ -116,42 +116,26 @@ private:
WebEntities m_xmlEntities;
struct SerializeDomParam {
- // Frame URL of current processing document presented by GURL
- const WebCore::KURL& currentFrameURL;
- // Current using text encoding object.
+ const WebCore::KURL& url;
const WebCore::TextEncoding& textEncoding;
-
- // Document object of current frame.
- WebCore::Document* doc;
- // Local directory name of all local resource files.
+ WebCore::Document* document;
const WTF::String& directoryName;
-
- // Flag indicates current doc is html document or not. It's a cache value
- // of Document.isHTMLDocument().
- bool isHTMLDocument;
- // Flag which indicate whether we have met document type declaration.
- bool hasDoctype;
- // Flag which indicate whether will process meta issue.
- bool hasCheckedMeta;
+ bool isHTMLDocument; // document.isHTMLDocument()
+ bool haveSeenDocType;
+ bool haveAddedCharsetDeclaration;
// This meta element need to be skipped when serializing DOM.
const WebCore::Element* skipMetaElement;
// Flag indicates we are in script or style tag.
bool isInScriptOrStyleTag;
- // Flag indicates whether we have written xml document declaration.
- // It is only used in xml document
- bool hasDocDeclaration;
+ bool haveAddedXMLProcessingDirective;
// Flag indicates whether we have added additional contents before end tag.
// This flag will be re-assigned in each call of function
// PostActionAfterSerializeOpenTag and it could be changed in function
// PreActionBeforeSerializeEndTag if the function adds new contents into
// serialization stream.
- bool hasAddedContentsBeforeEnd;
+ bool haveAddedContentsBeforeEnd;
- // Constructor.
- SerializeDomParam(const WebCore::KURL& currentFrameURL,
- const WebCore::TextEncoding& textEncoding,
- WebCore::Document* doc,
- const WTF::String& directoryName);
+ SerializeDomParam(const WebCore::KURL&, const WebCore::TextEncoding&, WebCore::Document*, const WTF::String& directoryName);
};
// Collect all target frames which need to be serialized.
@@ -177,12 +161,18 @@ private:
// Save generated html content to data buffer.
void saveHTMLContentToBuffer(const WTF::String& content,
SerializeDomParam* param);
+
+ enum FlushOption {
+ ForceFlush,
+ DoNotForceFlush,
+ };
+
// Flushes the content buffer by encoding and sending the content to the
// WebPageSerializerClient. Content is not flushed if the buffer is not full
// unless force is 1.
void encodeAndFlushBuffer(WebPageSerializerClient::PageSerializationStatus status,
SerializeDomParam* param,
- bool force);
+ FlushOption);
// Serialize open tag of an specified element.
void openTagToString(const WebCore::Element* element,
SerializeDomParam* param);
diff --git a/WebKit/chromium/src/WebPasswordFormUtils.cpp b/WebKit/chromium/src/WebPasswordFormUtils.cpp
index 6968e1a..b4997e5 100644
--- a/WebKit/chromium/src/WebPasswordFormUtils.cpp
+++ b/WebKit/chromium/src/WebPasswordFormUtils.cpp
@@ -98,9 +98,8 @@ void findPasswordFormFields(HTMLFormElement* form, PasswordFormFields* fields)
if (!inputElement->isEnabledFormControl())
continue;
- // FIXME: This needs to use a function other than deprecatedInputType.
- // Does this really want to special-case TEXT, and not other text-field-like input elements?
- if ((inputElement->deprecatedInputType() == HTMLInputElement::TEXT)
+ // Various input types such as text, url, email can be a username field.
+ if ((inputElement->isTextField() && !inputElement->isPasswordField())
&& (inputElement->autoComplete())) {
fields->userName = inputElement;
break;
diff --git a/WebKit/chromium/src/WebPluginContainerImpl.cpp b/WebKit/chromium/src/WebPluginContainerImpl.cpp
index 7f74db2..58deecc 100644
--- a/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -48,6 +48,7 @@
#include "WebURLError.h"
#include "WebURLRequest.h"
#include "WebVector.h"
+#include "WebViewImpl.h"
#include "WrappedResourceResponse.h"
#include "EventNames.h"
@@ -348,6 +349,12 @@ void WebPluginContainerImpl::loadFrameRequest(
SendReferrer);
}
+void WebPluginContainerImpl::zoomLevelChanged(double zoomLevel)
+{
+ WebViewImpl* view = WebViewImpl::fromPage(m_element->document()->frame()->page());
+ view->fullFramePluginZoomLevelChanged(zoomLevel);
+}
+
void WebPluginContainerImpl::didReceiveResponse(const ResourceResponse& response)
{
// Make sure that the plugin receives window geometry before data, or else
@@ -461,6 +468,16 @@ void WebPluginContainerImpl::handleKeyboardEvent(KeyboardEvent* event)
}
}
+ const WebInputEvent* currentInputEvent = WebViewImpl::currentInputEvent();
+
+ // Copy stashed info over, and only copy here in order not to interfere
+ // the ctrl-c logic above.
+ if (currentInputEvent
+ && WebInputEvent::isKeyboardEventType(currentInputEvent->type)) {
+ webEvent.modifiers |= currentInputEvent->modifiers &
+ (WebInputEvent::CapsLockOn | WebInputEvent::NumLockOn);
+ }
+
WebCursorInfo cursorInfo;
if (m_webPlugin->handleInputEvent(webEvent, cursorInfo))
event->setDefaultHandled();
@@ -541,11 +558,20 @@ static bool checkStackOnTop(
return false;
}
- // For compatibility with IE: when the plugin is not positioned,
- // it stacks behind the iframe, even if it's later in the
- // document order.
- if (ro2->style()->position() == StaticPosition)
+ // If the plugin does not have an explicit z-index it stacks behind the iframe.
+ // This is for maintaining compatibility with IE.
+ if (ro2->style()->position() == StaticPosition) {
+ // The 0'th elements of these RenderObject arrays represent the plugin node and
+ // the iframe.
+ const RenderObject* pluginRenderObject = pluginZstack[0];
+ const RenderObject* iframeRenderObject = iframeZstack[0];
+
+ if (pluginRenderObject->style() && iframeRenderObject->style()) {
+ if (pluginRenderObject->style()->zIndex() > iframeRenderObject->style()->zIndex())
+ return false;
+ }
return true;
+ }
// Inspect the document order. Later order means higher
// stacking.
diff --git a/WebKit/chromium/src/WebPluginContainerImpl.h b/WebKit/chromium/src/WebPluginContainerImpl.h
index 2a46e00..27f5f2e 100644
--- a/WebKit/chromium/src/WebPluginContainerImpl.h
+++ b/WebKit/chromium/src/WebPluginContainerImpl.h
@@ -73,6 +73,7 @@ public:
virtual void setParentVisible(bool);
virtual void setParent(WebCore::ScrollView*);
virtual void widgetPositionsUpdated();
+ virtual bool isPluginContainer() const { return true; }
// WebPluginContainer methods
virtual WebElement element();
@@ -83,6 +84,7 @@ public:
virtual NPObject* scriptableObjectForElement();
virtual WebString executeScriptURL(const WebURL&, bool popupsAllowed);
virtual void loadFrameRequest(const WebURLRequest&, const WebString& target, bool notifyNeeded, void* notifyData);
+ virtual void zoomLevelChanged(double zoomLevel);
// This cannot be null.
WebPlugin* plugin() { return m_webPlugin; }
diff --git a/WebKit/chromium/src/WebResourceRawHeaders.cpp b/WebKit/chromium/src/WebResourceRawHeaders.cpp
new file mode 100644
index 0000000..259365e
--- /dev/null
+++ b/WebKit/chromium/src/WebResourceRawHeaders.cpp
@@ -0,0 +1,87 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 "WebResourceRawHeaders.h"
+
+#include "ResourceRawHeaders.h"
+#include "ResourceResponse.h"
+#include "WebHTTPHeaderVisitor.h"
+#include "WebString.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebResourceRawHeaders::initialize()
+{
+ m_private = adoptRef(new ResourceRawHeaders());
+}
+
+void WebResourceRawHeaders::reset()
+{
+ m_private.reset();
+}
+
+void WebResourceRawHeaders::assign(const WebResourceRawHeaders& r)
+{
+ m_private = r.m_private;
+}
+
+WebResourceRawHeaders::WebResourceRawHeaders(WTF::PassRefPtr<WebCore::ResourceRawHeaders> value)
+{
+ m_private = value;
+}
+
+WebResourceRawHeaders::operator WTF::PassRefPtr<WebCore::ResourceRawHeaders>() const
+{
+ return m_private.get();
+}
+
+static void addHeader(HTTPHeaderMap* map, const WebString& name, const WebString& value)
+{
+ pair<HTTPHeaderMap::iterator, bool> result = map->add(name, value);
+ if (!result.second)
+ result.first->second += String("\n") + value;
+}
+
+void WebResourceRawHeaders::addRequestHeader(const WebString& name, const WebString& value)
+{
+ ASSERT(!m_private.isNull());
+ addHeader(&m_private->requestHeaders, name, value);
+}
+
+void WebResourceRawHeaders::addResponseHeader(const WebString& name, const WebString& value)
+{
+ ASSERT(!m_private.isNull());
+ addHeader(&m_private->responseHeaders, name, value);
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebRuntimeFeatures.cpp b/WebKit/chromium/src/WebRuntimeFeatures.cpp
index 2279eeb..edb0413 100644
--- a/WebKit/chromium/src/WebRuntimeFeatures.cpp
+++ b/WebKit/chromium/src/WebRuntimeFeatures.cpp
@@ -171,14 +171,14 @@ bool WebRuntimeFeatures::isGeolocationEnabled()
void WebRuntimeFeatures::enableIndexedDatabase(bool enable)
{
#if ENABLE(INDEXED_DATABASE)
- RuntimeEnabledFeatures::setIndexedDBEnabled(enable);
+ RuntimeEnabledFeatures::setWebkitIndexedDBEnabled(enable);
#endif
}
bool WebRuntimeFeatures::isIndexedDatabaseEnabled()
{
#if ENABLE(INDEXED_DATABASE)
- return RuntimeEnabledFeatures::indexedDBEnabled();
+ return RuntimeEnabledFeatures::webkitIndexedDBEnabled();
#else
return false;
#endif
diff --git a/WebKit/chromium/src/WebScriptController.cpp b/WebKit/chromium/src/WebScriptController.cpp
index 8877ba0..0aa11a6 100644
--- a/WebKit/chromium/src/WebScriptController.cpp
+++ b/WebKit/chromium/src/WebScriptController.cpp
@@ -46,18 +46,6 @@ void WebScriptController::registerExtension(v8::Extension* extension)
V8Proxy::registerExtension(extension);
}
-void WebScriptController::registerExtension(v8::Extension* extension,
- const WebString& schemeRestriction)
-{
- V8Proxy::registerExtension(extension, schemeRestriction);
-}
-
-void WebScriptController::registerExtension(v8::Extension* extension,
- int extensionGroup)
-{
- V8Proxy::registerExtension(extension, extensionGroup);
-}
-
void WebScriptController::enableV8SingleThreadMode()
{
enableStringImplCache();
diff --git a/WebKit/chromium/src/WebSearchableFormData.cpp b/WebKit/chromium/src/WebSearchableFormData.cpp
index 5fc51ca..50192eb 100644
--- a/WebKit/chromium/src/WebSearchableFormData.cpp
+++ b/WebKit/chromium/src/WebSearchableFormData.cpp
@@ -166,26 +166,19 @@ bool HasSuitableTextElement(const HTMLFormElement* form, Vector<char>* encodedSt
bool isTextElement = false;
if (formElement->hasTagName(HTMLNames::inputTag)) {
- if (static_cast<const HTMLInputElement*>(formElement)->isFileUpload()) {
+ const HTMLInputElement* input = static_cast<const HTMLInputElement*>(formElement);
+ if (input->isFileUpload()) {
// Too big, don't try to index this.
return 0;
}
- if (static_cast<const HTMLInputElement*>(formElement)->isPasswordField()) {
+ if (input->isPasswordField()) {
// Don't store passwords! This is most likely an https anyway.
return 0;
}
- // FIXME: This needs to use a function on HTMLInputElement other than deprecatedInputType.
- // Also, it's not clear why TEXT should be handled differently than, say, SEARCH.
- switch (static_cast<const HTMLInputElement*>(formElement)->deprecatedInputType()) {
- case HTMLInputElement::TEXT:
- case HTMLInputElement::ISINDEX:
+ if (input->isTextField())
isTextElement = true;
- break;
- default:
- break;
- }
}
FormDataList dataList(encoding);
diff --git a/WebKit/chromium/src/WebThreadSafeData.cpp b/WebKit/chromium/src/WebThreadSafeData.cpp
new file mode 100755
index 0000000..facaba3
--- /dev/null
+++ b/WebKit/chromium/src/WebThreadSafeData.cpp
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 "WebThreadSafeData.h"
+
+#include "BlobData.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebThreadSafeData::reset()
+{
+ m_private.reset();
+}
+
+void WebThreadSafeData::assign(const WebThreadSafeData& other)
+{
+ m_private = other.m_private;
+}
+
+size_t WebThreadSafeData::size() const
+{
+ if (m_private.isNull())
+ return 0;
+ return m_private->length();
+}
+
+const char* WebThreadSafeData::data() const
+{
+ if (m_private.isNull())
+ return 0;
+ return m_private->data();
+}
+
+WebThreadSafeData::WebThreadSafeData(const PassRefPtr<RawData>& data)
+ : m_private(data.releaseRef())
+{
+}
+
+WebThreadSafeData& WebThreadSafeData::operator=(const PassRefPtr<RawData>& data)
+{
+ m_private = data;
+ return *this;
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebURLRequest.cpp b/WebKit/chromium/src/WebURLRequest.cpp
index 2950076..b243420 100644
--- a/WebKit/chromium/src/WebURLRequest.cpp
+++ b/WebKit/chromium/src/WebURLRequest.cpp
@@ -201,6 +201,16 @@ bool WebURLRequest::reportLoadTiming() const
return m_private->m_resourceRequest->reportLoadTiming();
}
+void WebURLRequest::setReportRawHeaders(bool reportRawHeaders)
+{
+ m_private->m_resourceRequest->setReportRawHeaders(reportRawHeaders);
+}
+
+bool WebURLRequest::reportRawHeaders() const
+{
+ return m_private->m_resourceRequest->reportRawHeaders();
+}
+
void WebURLRequest::setReportLoadTiming(bool reportLoadTiming)
{
m_private->m_resourceRequest->setReportLoadTiming(reportLoadTiming);
diff --git a/WebKit/chromium/src/WebURLResponse.cpp b/WebKit/chromium/src/WebURLResponse.cpp
index aae413c..5343921 100644
--- a/WebKit/chromium/src/WebURLResponse.cpp
+++ b/WebKit/chromium/src/WebURLResponse.cpp
@@ -129,6 +129,16 @@ void WebURLResponse::setLoadTiming(const WebURLLoadTiming& timing)
m_private->m_resourceResponse->setResourceLoadTiming(loadTiming.release());
}
+WebResourceRawHeaders WebURLResponse::resourceRawHeaders()
+{
+ return WebResourceRawHeaders(m_private->m_resourceResponse->resourceRawHeaders());
+}
+
+void WebURLResponse::setResourceRawHeaders(const WebResourceRawHeaders& value)
+{
+ m_private->m_resourceResponse->setResourceRawHeaders(value);
+}
+
double WebURLResponse::responseTime() const
{
return m_private->m_resourceResponse->responseTime();
diff --git a/WebKit/chromium/src/WebURLResponsePrivate.h b/WebKit/chromium/src/WebURLResponsePrivate.h
index dc5ce22..4181e4c 100644
--- a/WebKit/chromium/src/WebURLResponsePrivate.h
+++ b/WebKit/chromium/src/WebURLResponsePrivate.h
@@ -31,6 +31,7 @@
#ifndef WebURLResponsePrivate_h
#define WebURLResponsePrivate_h
+#include "WebResourceRawHeaders.h"
#include "WebString.h"
namespace WebCore { class ResourceResponse; }
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index c3df0c7..aeab400 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -88,7 +88,6 @@
#include "SecurityOrigin.h"
#include "SelectionController.h"
#include "Settings.h"
-#include "SharedGraphicsContext3D.h"
#include "Timer.h"
#include "TypingCommand.h"
#include "UserGestureIndicator.h"
@@ -143,9 +142,10 @@ namespace WebKit {
// zooms text in or out (ie., change by 20%). The min and max values limit
// text zoom to half and 3x the original text size. These three values match
// those in Apple's port in WebKit/WebKit/WebView/WebView.mm
-static const double textSizeMultiplierRatio = 1.2;
-static const double minTextSizeMultiplier = 0.5;
-static const double maxTextSizeMultiplier = 3.0;
+const double WebView::textSizeMultiplierRatio = 1.2;
+const double WebView::minTextSizeMultiplier = 0.5;
+const double WebView::maxTextSizeMultiplier = 3.0;
+
// The group name identifies a namespace of pages. Page group is used on OSX
// for some programs that use HTML views to display things that don't seem like
@@ -250,7 +250,8 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devTools
, m_newNavigationLoader(0)
#endif
, m_zoomLevel(0)
- , m_zoomTextOnly(false)
+ , m_minimumZoomLevel(zoomFactorToZoomLevel(minTextSizeMultiplier))
+ , m_maximumZoomLevel(zoomFactorToZoomLevel(maxTextSizeMultiplier))
, m_contextMenuAllowed(false)
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
@@ -985,7 +986,7 @@ void WebViewImpl::doPixelReadbackToCanvas(WebCanvas* canvas, const IntRect& rect
gc.scale(FloatSize(1.0f, -1.0f));
// Use invertRect in next line, so that transform above inverts it back to
// desired destination rect.
- gc.drawImageBuffer(imageBuffer.get(), DeviceColorSpace, invertRect.location());
+ gc.drawImageBuffer(imageBuffer.get(), ColorSpaceDeviceRGB, invertRect.location());
gc.restore();
}
}
@@ -1481,6 +1482,10 @@ void WebViewImpl::setInitialFocus(bool reverse)
keyboardEvent.windowsKeyCode = 0x09;
PlatformKeyboardEventBuilder platformEvent(keyboardEvent);
RefPtr<KeyboardEvent> webkitEvent = KeyboardEvent::create(platformEvent, 0);
+
+ Frame* frame = page()->focusController()->focusedOrMainFrame();
+ if (Document* document = frame->document())
+ document->setFocusedNode(0);
page()->focusController()->setInitialFocus(
reverse ? FocusDirectionBackward : FocusDirectionForward,
webkitEvent.get());
@@ -1520,36 +1525,69 @@ void WebViewImpl::clearFocusedNode()
}
}
-int WebViewImpl::zoomLevel()
+void WebViewImpl::scrollFocusedNodeIntoView()
+{
+ Node* focusedNode = focusedWebCoreNode();
+ if (focusedNode && focusedNode->isElementNode()) {
+ Element* elementNode = static_cast<Element*>(focusedNode);
+ elementNode->scrollIntoViewIfNeeded(true);
+ }
+}
+
+double WebViewImpl::zoomLevel()
{
return m_zoomLevel;
}
-int WebViewImpl::setZoomLevel(bool textOnly, int zoomLevel)
+double WebViewImpl::setZoomLevel(bool textOnly, double zoomLevel)
{
- float zoomFactor = static_cast<float>(
- std::max(std::min(std::pow(textSizeMultiplierRatio, zoomLevel),
- maxTextSizeMultiplier),
- minTextSizeMultiplier));
+ if (zoomLevel < m_minimumZoomLevel)
+ m_zoomLevel = m_minimumZoomLevel;
+ else if (zoomLevel > m_maximumZoomLevel)
+ m_zoomLevel = m_maximumZoomLevel;
+ else
+ m_zoomLevel = zoomLevel;
+
Frame* frame = mainFrameImpl()->frame();
+ WebPluginContainerImpl* pluginContainer = WebFrameImpl::pluginContainerFromFrame(frame);
+ if (pluginContainer)
+ pluginContainer->plugin()->setZoomLevel(m_zoomLevel, textOnly);
+ else {
+ double zoomFactor = zoomLevelToZoomFactor(m_zoomLevel);
+ if (textOnly)
+ frame->setPageAndTextZoomFactors(1, zoomFactor);
+ else
+ frame->setPageAndTextZoomFactors(zoomFactor, 1);
+ }
+ return m_zoomLevel;
+}
- float oldZoomFactor = m_zoomTextOnly ? frame->textZoomFactor() : frame->pageZoomFactor();
+void WebViewImpl::zoomLimitsChanged(double minimumZoomLevel,
+ double maximumZoomLevel)
+{
+ m_minimumZoomLevel = minimumZoomLevel;
+ m_maximumZoomLevel = maximumZoomLevel;
+ m_client->zoomLimitsChanged(m_minimumZoomLevel, m_maximumZoomLevel);
+}
- if (textOnly)
- frame->setPageAndTextZoomFactors(1, zoomFactor);
- else
- frame->setPageAndTextZoomFactors(zoomFactor, 1);
+void WebViewImpl::fullFramePluginZoomLevelChanged(double zoomLevel)
+{
+ if (zoomLevel == m_zoomLevel)
+ return;
- if (oldZoomFactor != zoomFactor || textOnly != m_zoomTextOnly) {
- WebPluginContainerImpl* pluginContainer = WebFrameImpl::pluginContainerFromFrame(frame);
- if (pluginContainer)
- pluginContainer->plugin()->setZoomFactor(zoomFactor, textOnly);
- }
+ m_zoomLevel = std::max(std::min(zoomLevel, m_maximumZoomLevel), m_minimumZoomLevel);
+ m_client->zoomLevelChanged();
+}
- m_zoomLevel = zoomLevel;
- m_zoomTextOnly = textOnly;
+double WebView::zoomLevelToZoomFactor(double zoomLevel)
+{
+ return std::pow(textSizeMultiplierRatio, zoomLevel);
+}
- return m_zoomLevel;
+double WebView::zoomFactorToZoomLevel(double factor)
+{
+ // Since factor = 1.2^level, level = log(factor) / log(1.2)
+ return log(factor) / log(textSizeMultiplierRatio);
}
void WebViewImpl::performMediaPlayerAction(const WebMediaPlayerAction& action,
@@ -1652,6 +1690,21 @@ WebDragOperation WebViewImpl::dragTargetDragEnter(
return dragTargetDragEnterOrOver(clientPoint, screenPoint, DragEnter);
}
+WebDragOperation WebViewImpl::dragTargetDragEnterNew(
+ int identity,
+ const WebPoint& clientPoint,
+ const WebPoint& screenPoint,
+ WebDragOperationsMask operationsAllowed)
+{
+ ASSERT(!m_currentDragData.get());
+
+ m_currentDragData = ChromiumDataObject::createReadable(Clipboard::DragAndDrop);
+ m_dragIdentity = identity;
+ m_operationsAllowed = operationsAllowed;
+
+ return dragTargetDragEnterOrOver(clientPoint, screenPoint, DragEnter);
+}
+
WebDragOperation WebViewImpl::dragTargetDragOver(
const WebPoint& clientPoint,
const WebPoint& screenPoint,
@@ -2228,10 +2281,11 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect&
return;
IntRect contentRect = view->visibleContentRect(false);
+ IntRect screenRect = view->contentsToWindow(contentRect);
// We support fast scrolling in one direction at a time.
if (scrollDelta.width() && scrollDelta.height()) {
- invalidateRootLayerRect(WebRect(contentRect));
+ invalidateRootLayerRect(WebRect(screenRect));
return;
}
@@ -2241,29 +2295,43 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect&
IntRect damagedContentsRect;
if (scrollDelta.width()) {
int dx = scrollDelta.width();
- damagedContentsRect.setY(contentRect.y());
- damagedContentsRect.setHeight(contentRect.height());
+ damagedContentsRect.setY(screenRect.y());
+ damagedContentsRect.setHeight(screenRect.height());
if (dx > 0) {
- damagedContentsRect.setX(contentRect.x());
+ damagedContentsRect.setX(screenRect.x());
damagedContentsRect.setWidth(dx);
} else {
- damagedContentsRect.setX(contentRect.right() + dx);
+ damagedContentsRect.setX(screenRect.right() + dx);
damagedContentsRect.setWidth(-dx);
}
} else {
int dy = scrollDelta.height();
- damagedContentsRect.setX(contentRect.x());
- damagedContentsRect.setWidth(contentRect.width());
+ damagedContentsRect.setX(screenRect.x());
+ damagedContentsRect.setWidth(screenRect.width());
if (dy > 0) {
- damagedContentsRect.setY(contentRect.y());
+ damagedContentsRect.setY(screenRect.y());
damagedContentsRect.setHeight(dy);
} else {
- damagedContentsRect.setY(contentRect.bottom() + dy);
+ damagedContentsRect.setY(screenRect.bottom() + dy);
damagedContentsRect.setHeight(-dy);
}
}
m_rootLayerScrollDamage.unite(damagedContentsRect);
+
+ // Scroll any existing damage that intersects with clip rect
+ if (clipRect.intersects(m_rootLayerDirtyRect)) {
+ // Find the inner damage
+ IntRect innerDamage(clipRect);
+ innerDamage.intersect(m_rootLayerDirtyRect);
+
+ // Move the damage
+ innerDamage.move(scrollDelta.width(), scrollDelta.height());
+
+ // Merge it back into the damaged rect
+ m_rootLayerDirtyRect.unite(innerDamage);
+ }
+
setRootLayerNeedsDisplay();
}
@@ -2278,15 +2346,10 @@ void WebViewImpl::invalidateRootLayerRect(const IntRect& rect)
if (!page())
return;
- FrameView* view = page()->mainFrame()->view();
-
- // rect is in viewport space. Convert to content space
- // so that invalidations and scroll invalidations play well with one-another.
- IntRect contentRect = view->windowToContents(rect);
// FIXME: add a smarter damage aggregation logic and/or unify with
// LayerChromium's damage logic
- m_rootLayerDirtyRect.unite(contentRect);
+ m_rootLayerDirtyRect.unite(rect);
setRootLayerNeedsDisplay();
}
@@ -2306,7 +2369,7 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
return;
}
- OwnPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release();
+ RefPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release();
if (!context) {
context = GraphicsContext3D::create(GraphicsContext3D::Attributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
if (context)
@@ -2396,10 +2459,7 @@ void WebViewImpl::doComposite()
damageRects.append(m_rootLayerScrollDamage);
damageRects.append(m_rootLayerDirtyRect);
for (size_t i = 0; i < damageRects.size(); ++i) {
- // The damage rect for the root layer is in content space [e.g. unscrolled].
- // Convert from content space to viewPort space.
- const IntRect damagedContentRect = damageRects[i];
- IntRect damagedRect = view->contentsToWindow(damagedContentRect);
+ IntRect damagedRect = damageRects[i];
// Intersect this rectangle with the viewPort.
damagedRect.intersect(viewPort);
@@ -2419,19 +2479,6 @@ void WebViewImpl::doComposite()
#endif
-SharedGraphicsContext3D* WebViewImpl::getSharedGraphicsContext3D()
-{
- if (!m_sharedContext3D) {
- GraphicsContext3D::Attributes attr;
- OwnPtr<GraphicsContext3D> context = GraphicsContext3D::create(attr, m_page->chrome());
- if (!context)
- return 0;
- m_sharedContext3D = SharedGraphicsContext3D::create(context.release());
- }
-
- return m_sharedContext3D.get();
-}
-
WebGraphicsContext3D* WebViewImpl::graphicsContext3D()
{
#if USE(ACCELERATED_COMPOSITING)
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index 9db914d..050b5e1 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -132,8 +132,11 @@ public:
virtual void setFocusedFrame(WebFrame* frame);
virtual void setInitialFocus(bool reverse);
virtual void clearFocusedNode();
- virtual int zoomLevel();
- virtual int setZoomLevel(bool textOnly, int zoomLevel);
+ virtual void scrollFocusedNodeIntoView();
+ virtual double zoomLevel();
+ virtual double setZoomLevel(bool textOnly, double zoomLevel);
+ virtual void zoomLimitsChanged(double minimumZoomLevel,
+ double maximumZoomLevel);
virtual void performMediaPlayerAction(
const WebMediaPlayerAction& action,
const WebPoint& location);
@@ -152,6 +155,11 @@ public:
const WebPoint& clientPoint,
const WebPoint& screenPoint,
WebDragOperationsMask operationsAllowed);
+ virtual WebDragOperation dragTargetDragEnterNew(
+ int identity,
+ const WebPoint& clientPoint,
+ const WebPoint& screenPoint,
+ WebDragOperationsMask operationsAllowed);
virtual WebDragOperation dragTargetDragOver(
const WebPoint& clientPoint,
const WebPoint& screenPoint,
@@ -338,17 +346,19 @@ public:
// WebGL. Returns 0 if compositing support is not compiled in.
virtual WebGraphicsContext3D* graphicsContext3D();
- virtual WebCore::SharedGraphicsContext3D* getSharedGraphicsContext3D();
-
WebCore::PopupContainer* selectPopup() const { return m_selectPopup.get(); }
- bool zoomTextOnly() const { return m_zoomTextOnly; }
-
// Returns true if the event leads to scrolling.
static bool mapKeyCodeForScroll(int keyCode,
WebCore::ScrollDirection* scrollDirection,
WebCore::ScrollGranularity* scrollGranularity);
+ // Called by a full frame plugin inside this view to inform it that its
+ // zoom level has been updated. The plugin should only call this function
+ // if the zoom change was triggered by the browser, it's only needed in case
+ // a plugin can update its own zoom, say because of its own UI.
+ void fullFramePluginZoomLevelChanged(double zoomLevel);
+
private:
friend class WebView; // So WebView::Create can call our constructor
friend class WTF::RefCounted<WebViewImpl>;
@@ -440,9 +450,11 @@ private:
// Keeps track of the current zoom level. 0 means no zoom, positive numbers
// mean zoom in, negative numbers mean zoom out.
- int m_zoomLevel;
+ double m_zoomLevel;
+
+ double m_minimumZoomLevel;
- bool m_zoomTextOnly;
+ double m_maximumZoomLevel;
bool m_contextMenuAllowed;
@@ -536,10 +548,7 @@ private:
// If we attempt to fetch the on-screen GraphicsContext3D before
// the compositor has been turned on, we need to instantiate it
// early. This member holds on to the GC3D in this case.
- OwnPtr<WebCore::GraphicsContext3D> m_temporaryOnscreenGraphicsContext3D;
-
- RefPtr<WebCore::SharedGraphicsContext3D> m_sharedContext3D;
-
+ RefPtr<WebCore::GraphicsContext3D> m_temporaryOnscreenGraphicsContext3D;
OwnPtr<DeviceOrientationClientProxy> m_deviceOrientationClientProxy;
};
diff --git a/WebKit/chromium/src/WebWorkerBase.cpp b/WebKit/chromium/src/WebWorkerBase.cpp
index 622f5c2..de4858c 100644
--- a/WebKit/chromium/src/WebWorkerBase.cpp
+++ b/WebKit/chromium/src/WebWorkerBase.cpp
@@ -237,13 +237,23 @@ bool WebWorkerBase::allowDatabase(WebFrame*, const WebString& name, const WebStr
}
#if ENABLE(FILE_SYSTEM)
-void WebWorkerBase::openFileSystem(WebFileSystem::Type type, long long size, WebFileSystemCallbacks* callbacks)
+void WebWorkerBase::openFileSystem(WebFileSystem::Type type, long long size, WebFileSystemCallbacks* callbacks, bool synchronous)
{
+ WorkerRunLoop& runLoop = m_workerThread->runLoop();
WorkerScriptController* controller = WorkerScriptController::controllerForContext();
WorkerContext* workerContext = controller->workerContext();
+ // Create a unique mode for this openFileSystem call.
+ String mode = openFileSystemMode;
+ mode.append(String::number(runLoop.createUniqueId()));
+
RefPtr<WorkerFileSystemCallbacksBridge> bridge = WorkerFileSystemCallbacksBridge::create(this, workerContext, callbacks);
- bridge->postOpenFileSystemToMainThread(commonClient(), type, size, openFileSystemMode);
+ bridge->postOpenFileSystemToMainThread(commonClient(), type, size, mode);
+
+ if (synchronous) {
+ if (runLoop.runInMode(workerContext, mode) == MessageQueueTerminated)
+ bridge->stop();
+ }
}
#endif
diff --git a/WebKit/chromium/src/WebWorkerBase.h b/WebKit/chromium/src/WebWorkerBase.h
index 1f4bc03..fe84bf7 100644
--- a/WebKit/chromium/src/WebWorkerBase.h
+++ b/WebKit/chromium/src/WebWorkerBase.h
@@ -93,7 +93,7 @@ public:
#if ENABLE(FILE_SYSTEM)
// Requests to open a file system for this worker. (Note that this is not the implementation for WebFrameClient::openFileSystem.)
- void openFileSystem(WebFileSystem::Type, long long size, WebFileSystemCallbacks*);
+ void openFileSystem(WebFileSystem::Type, long long size, WebFileSystemCallbacks*, bool synchronous);
#endif
// Executes the given task on the main thread.
diff --git a/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp b/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp
new file mode 100644
index 0000000..1e70619
--- /dev/null
+++ b/WebKit/chromium/src/WorkerAsyncFileSystemChromium.cpp
@@ -0,0 +1,155 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 "WorkerAsyncFileSystemChromium.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystemCallbacks.h"
+#include "FileSystem.h"
+#include "NotImplemented.h"
+#include "WebFileSystem.h"
+#include "WebFileSystemCallbacksImpl.h"
+#include "WebKit.h"
+#include "WebKitClient.h"
+#include "WebWorkerBase.h"
+#include "WorkerContext.h"
+#include "WorkerFileSystemCallbacksBridge.h"
+#include "WorkerScriptController.h"
+#include "WorkerThread.h"
+#include <wtf/text/CString.h>
+
+using namespace WebKit;
+
+namespace WebCore {
+
+static const char fileSystemOperationsMode[] = "fileSystemOperationsMode";
+
+WorkerAsyncFileSystemChromium::WorkerAsyncFileSystemChromium(ScriptExecutionContext* context, const String& rootPath, bool synchronous)
+ : AsyncFileSystem(rootPath)
+ , m_scriptExecutionContext(context)
+ , m_webFileSystem(WebKit::webKitClient()->fileSystem())
+ , m_workerContext(static_cast<WorkerContext*>(context))
+ , m_synchronous(synchronous)
+{
+ ASSERT(m_webFileSystem);
+ ASSERT(m_scriptExecutionContext->isWorkerContext());
+
+ WorkerLoaderProxy* workerLoaderProxy = &m_workerContext->thread()->workerLoaderProxy();
+ m_worker = static_cast<WebWorkerBase*>(workerLoaderProxy);
+}
+
+WorkerAsyncFileSystemChromium::~WorkerAsyncFileSystemChromium()
+{
+}
+
+bool WorkerAsyncFileSystemChromium::waitForOperationToComplete()
+{
+ if (!m_bridgeForCurrentOperation.get())
+ return false;
+
+ RefPtr<WorkerFileSystemCallbacksBridge> bridge = m_bridgeForCurrentOperation.release();
+ if (m_workerContext->thread()->runLoop().runInMode(m_workerContext, m_modeForCurrentOperation) == MessageQueueTerminated) {
+ bridge->stop();
+ return false;
+ }
+ return true;
+}
+
+void WorkerAsyncFileSystemChromium::move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postMoveToMainThread(m_webFileSystem, sourcePath, destinationPath, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postCopyToMainThread(m_webFileSystem, sourcePath, destinationPath, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postRemoveToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postRemoveRecursivelyToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postReadMetadataToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postCreateFileToMainThread(m_webFileSystem, path, exclusive, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postCreateDirectoryToMainThread(m_webFileSystem, path, exclusive, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postFileExistsToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postDirectoryExistsToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ createWorkerFileSystemCallbacksBridge(callbacks)->postReadDirectoryToMainThread(m_webFileSystem, path, m_modeForCurrentOperation);
+}
+
+void WorkerAsyncFileSystemChromium::createWriter(AsyncFileWriterClient*, const String&, PassOwnPtr<AsyncFileSystemCallbacks>)
+{
+ notImplemented();
+}
+
+PassRefPtr<WorkerFileSystemCallbacksBridge> WorkerAsyncFileSystemChromium::createWorkerFileSystemCallbacksBridge(PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ ASSERT(!m_synchronous || !m_bridgeForCurrentOperation.get());
+
+ m_modeForCurrentOperation = fileSystemOperationsMode;
+ m_modeForCurrentOperation.append(String::number(m_workerContext->thread()->runLoop().createUniqueId()));
+
+ m_bridgeForCurrentOperation = WorkerFileSystemCallbacksBridge::create(m_worker, m_scriptExecutionContext, new WebKit::WebFileSystemCallbacksImpl(callbacks));
+ return m_bridgeForCurrentOperation;
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h b/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h
new file mode 100644
index 0000000..0b4b708
--- /dev/null
+++ b/WebKit/chromium/src/WorkerAsyncFileSystemChromium.h
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 WorkerAsyncFileSystemChromium_h
+#define WorkerAsyncFileSystemChromium_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "AsyncFileSystem.h"
+#include "PlatformString.h"
+#include <wtf/PassOwnPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebKit {
+class WebFileSystem;
+class WebWorkerBase;
+class WorkerFileSystemCallbacksBridge;
+}
+
+namespace WebCore {
+
+class AsyncFileSystemCallbacks;
+class ScriptExecutionContext;
+class WorkerContext;
+
+class WorkerAsyncFileSystemChromium : public AsyncFileSystem {
+public:
+ static PassOwnPtr<AsyncFileSystem> create(ScriptExecutionContext* context, const String& rootPath, bool synchronous)
+ {
+ return adoptPtr(new WorkerAsyncFileSystemChromium(context, rootPath, synchronous));
+ }
+
+ virtual ~WorkerAsyncFileSystemChromium();
+
+ // Runs one pending operation (to wait for completion in the sync-mode).
+ virtual bool waitForOperationToComplete();
+
+ virtual void move(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void copy(const String& sourcePath, const String& destinationPath, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void remove(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void removeRecursively(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void readMetadata(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void createFile(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void createDirectory(const String& path, bool exclusive, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+
+private:
+ WorkerAsyncFileSystemChromium(ScriptExecutionContext*, const String& rootPath, bool synchronous);
+
+ PassRefPtr<WebKit::WorkerFileSystemCallbacksBridge> createWorkerFileSystemCallbacksBridge(PassOwnPtr<AsyncFileSystemCallbacks>);
+
+ ScriptExecutionContext* m_scriptExecutionContext;
+ WebKit::WebFileSystem* m_webFileSystem;
+ WebKit::WebWorkerBase* m_worker;
+ WorkerContext* m_workerContext;
+ RefPtr<WebKit::WorkerFileSystemCallbacksBridge> m_bridgeForCurrentOperation;
+ String m_modeForCurrentOperation;
+ bool m_synchronous;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
+
+#endif // WorkerAsyncFileSystemChromium_h
diff --git a/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp
index d112886..6c31221 100644
--- a/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp
+++ b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp
@@ -35,7 +35,9 @@
#include "CrossThreadTask.h"
#include "WebCommonWorkerClient.h"
+#include "WebFileInfo.h"
#include "WebFileSystemCallbacks.h"
+#include "WebFileSystemEntry.h"
#include "WebString.h"
#include "WebWorkerBase.h"
#include "WorkerContext.h"
@@ -44,6 +46,37 @@
#include <wtf/MainThread.h>
#include <wtf/Threading.h>
+namespace WebCore {
+
+template<> struct CrossThreadCopierBase<false, false, WebKit::WebFileInfo> {
+ typedef WebKit::WebFileInfo Type;
+ static Type copy(const WebKit::WebFileInfo& info)
+ {
+ // Perform per-field copy to make sure we don't do any (unexpected) non-thread safe copy here.
+ struct WebKit::WebFileInfo newInfo;
+ newInfo.modificationTime = info.modificationTime;
+ newInfo.length = info.length;
+ newInfo.type = info.type;
+ return newInfo;
+ }
+};
+
+template<> struct CrossThreadCopierBase<false, false, WebKit::WebVector<WebKit::WebFileSystemEntry> > {
+ typedef WebKit::WebVector<WebKit::WebFileSystemEntry> Type;
+ static Type copy(const WebKit::WebVector<WebKit::WebFileSystemEntry>& entries)
+ {
+ WebKit::WebVector<WebKit::WebFileSystemEntry> newEntries(entries.size());
+ for (size_t i = 0; i < entries.size(); ++i) {
+ String name = entries[i].name;
+ newEntries[i].isDirectory = entries[i].isDirectory;
+ newEntries[i].name = name.crossThreadString();
+ }
+ return newEntries;
+ }
+};
+
+}
+
using namespace WebCore;
namespace WebKit {
@@ -51,9 +84,11 @@ namespace WebKit {
// FileSystemCallbacks that are to be dispatched on the main thread.
class MainThreadFileSystemCallbacks : public WebFileSystemCallbacks {
public:
- static PassOwnPtr<MainThreadFileSystemCallbacks> create(PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, const String& mode)
+ // Callbacks are self-destructed and we always return leaked pointer here.
+ static MainThreadFileSystemCallbacks* createLeakedPtr(PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, const String& mode)
{
- return adoptPtr(new MainThreadFileSystemCallbacks(bridge, mode));
+ OwnPtr<MainThreadFileSystemCallbacks> callbacks = adoptPtr(new MainThreadFileSystemCallbacks(bridge, mode));
+ return callbacks.leakPtr();
}
virtual ~MainThreadFileSystemCallbacks()
@@ -74,17 +109,20 @@ public:
virtual void didSucceed()
{
- WEBKIT_ASSERT_NOT_REACHED();
+ m_bridge->didSucceedOnMainThread(m_mode);
+ delete this;
}
virtual void didReadMetadata(const WebFileInfo& info)
{
- WEBKIT_ASSERT_NOT_REACHED();
+ m_bridge->didReadMetadataOnMainThread(info, m_mode);
+ delete this;
}
virtual void didReadDirectory(const WebVector<WebFileSystemEntry>& entries, bool hasMore)
{
- WEBKIT_ASSERT_NOT_REACHED();
+ m_bridge->didReadDirectoryOnMainThread(entries, hasMore, m_mode);
+ delete this;
}
private:
@@ -114,33 +152,148 @@ void WorkerFileSystemCallbacksBridge::stop()
void WorkerFileSystemCallbacksBridge::postOpenFileSystemToMainThread(WebCommonWorkerClient* commonClient, WebFileSystem::Type type, long long size, const String& mode)
{
- m_selfRef = this;
- ASSERT(m_workerContext->isContextThread());
- ASSERT(m_worker);
- m_worker->dispatchTaskToMainThread(createCallbackTask(&openFileSystemOnMainThread, commonClient, type, size, this, mode));
+ dispatchTaskToMainThread(createCallbackTask(&openFileSystemOnMainThread, commonClient, type, size, this, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::postMoveToMainThread(WebFileSystem* fileSystem, const String& sourcePath, const String& destinationPath, const String& mode)
+{
+ dispatchTaskToMainThread(createCallbackTask(&moveOnMainThread, fileSystem, sourcePath, destinationPath, this, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::postCopyToMainThread(WebFileSystem* fileSystem, const String& sourcePath, const String& destinationPath, const String& mode)
+{
+ dispatchTaskToMainThread(createCallbackTask(&copyOnMainThread, fileSystem, sourcePath, destinationPath, this, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::postRemoveToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode)
+{
+ ASSERT(fileSystem);
+ dispatchTaskToMainThread(createCallbackTask(&removeOnMainThread, fileSystem, path, this, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::postRemoveRecursivelyToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode)
+{
+ ASSERT(fileSystem);
+ dispatchTaskToMainThread(createCallbackTask(&removeRecursivelyOnMainThread, fileSystem, path, this, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::postReadMetadataToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode)
+{
+ ASSERT(fileSystem);
+ dispatchTaskToMainThread(createCallbackTask(&readMetadataOnMainThread, fileSystem, path, this, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::postCreateFileToMainThread(WebFileSystem* fileSystem, const String& path, bool exclusive, const String& mode)
+{
+ dispatchTaskToMainThread(createCallbackTask(&createFileOnMainThread, fileSystem, path, exclusive, this, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::postCreateDirectoryToMainThread(WebFileSystem* fileSystem, const String& path, bool exclusive, const String& mode)
+{
+ ASSERT(fileSystem);
+ dispatchTaskToMainThread(createCallbackTask(&createDirectoryOnMainThread, fileSystem, path, exclusive, this, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::postFileExistsToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode)
+{
+ ASSERT(fileSystem);
+ dispatchTaskToMainThread(createCallbackTask(&fileExistsOnMainThread, fileSystem, path, this, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::postDirectoryExistsToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode)
+{
+ ASSERT(fileSystem);
+ dispatchTaskToMainThread(createCallbackTask(&directoryExistsOnMainThread, fileSystem, path, this, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::postReadDirectoryToMainThread(WebFileSystem* fileSystem, const String& path, const String& mode)
+{
+ ASSERT(fileSystem);
+ dispatchTaskToMainThread(createCallbackTask(&readDirectoryOnMainThread, fileSystem, path, this, mode));
}
void WorkerFileSystemCallbacksBridge::openFileSystemOnMainThread(ScriptExecutionContext*, WebCommonWorkerClient* commonClient, WebFileSystem::Type type, long long size, WorkerFileSystemCallbacksBridge* bridge, const String& mode)
{
- ASSERT(isMainThread());
if (!commonClient)
bridge->didFailOnMainThread(WebFileErrorAbort, mode);
else {
- // MainThreadFileSystemCallbacks is self-destructed, so we leak ptr here.
- commonClient->openFileSystem(type, size, MainThreadFileSystemCallbacks::create(bridge, mode).leakPtr());
+ commonClient->openFileSystem(type, size, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode));
}
}
+void WorkerFileSystemCallbacksBridge::moveOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& sourcePath, const String& destinationPath, WorkerFileSystemCallbacksBridge* bridge, const String& mode)
+{
+ fileSystem->move(sourcePath, destinationPath, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::copyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& sourcePath, const String& destinationPath, WorkerFileSystemCallbacksBridge* bridge, const String& mode)
+{
+ fileSystem->copy(sourcePath, destinationPath, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::removeOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode)
+{
+ fileSystem->remove(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::removeRecursivelyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode)
+{
+ fileSystem->removeRecursively(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::readMetadataOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode)
+{
+ fileSystem->readMetadata(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::createFileOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, bool exclusive, WorkerFileSystemCallbacksBridge* bridge, const String& mode)
+{
+ fileSystem->createFile(path, exclusive, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::createDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, bool exclusive, WorkerFileSystemCallbacksBridge* bridge, const String& mode)
+{
+ fileSystem->createDirectory(path, exclusive, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::fileExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode)
+{
+ fileSystem->fileExists(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::directoryExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode)
+{
+ fileSystem->directoryExists(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::readDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem* fileSystem, const String& path, WorkerFileSystemCallbacksBridge* bridge, const String& mode)
+{
+ fileSystem->readDirectory(path, MainThreadFileSystemCallbacks::createLeakedPtr(bridge, mode));
+}
+
void WorkerFileSystemCallbacksBridge::didFailOnMainThread(WebFileError error, const String& mode)
{
- ASSERT(isMainThread());
- mayPostTaskToWorker(createCallbackTask(&didFailOnWorkerThread, m_selfRef, error), mode);
+ mayPostTaskToWorker(createCallbackTask(&didFailOnWorkerThread, this, error), mode);
}
void WorkerFileSystemCallbacksBridge::didOpenFileSystemOnMainThread(const String& name, const String& rootPath, const String& mode)
{
- ASSERT(isMainThread());
- mayPostTaskToWorker(createCallbackTask(&didOpenFileSystemOnWorkerThread, m_selfRef, name, rootPath), mode);
+ mayPostTaskToWorker(createCallbackTask(&didOpenFileSystemOnWorkerThread, this, name, rootPath), mode);
+}
+
+void WorkerFileSystemCallbacksBridge::didSucceedOnMainThread(const String& mode)
+{
+ mayPostTaskToWorker(createCallbackTask(&didSucceedOnWorkerThread, this), mode);
+}
+
+void WorkerFileSystemCallbacksBridge::didReadMetadataOnMainThread(const WebFileInfo& info, const String& mode)
+{
+ mayPostTaskToWorker(createCallbackTask(&didReadMetadataOnWorkerThread, this, info), mode);
+}
+
+void WorkerFileSystemCallbacksBridge::didReadDirectoryOnMainThread(const WebVector<WebFileSystemEntry>& entries, bool hasMore, const String& mode)
+{
+ mayPostTaskToWorker(createCallbackTask(&didReadDirectoryOnWorkerThread, this, entries, hasMore), mode);
}
WorkerFileSystemCallbacksBridge::WorkerFileSystemCallbacksBridge(WebWorkerBase* worker, ScriptExecutionContext* scriptExecutionContext, WebFileSystemCallbacks* callbacks)
@@ -157,30 +310,79 @@ WorkerFileSystemCallbacksBridge::~WorkerFileSystemCallbacksBridge()
ASSERT(!m_callbacksOnWorkerThread);
}
-void WorkerFileSystemCallbacksBridge::didFailOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, WebFileError error)
+void WorkerFileSystemCallbacksBridge::didFailOnWorkerThread(ScriptExecutionContext*, WorkerFileSystemCallbacksBridge* bridge, WebFileError error)
{
- if (bridge->m_callbacksOnWorkerThread) {
- ASSERT(bridge->m_workerContext->isContextThread());
- bridge->m_callbacksOnWorkerThread->didFail(error);
- bridge->m_callbacksOnWorkerThread = 0;
- }
+ bridge->m_callbacksOnWorkerThread->didFail(error);
}
-void WorkerFileSystemCallbacksBridge::didOpenFileSystemOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, const String& name, const String& rootPath)
+void WorkerFileSystemCallbacksBridge::didOpenFileSystemOnWorkerThread(ScriptExecutionContext*, WorkerFileSystemCallbacksBridge* bridge, const String& name, const String& rootPath)
{
- if (bridge->m_callbacksOnWorkerThread) {
- ASSERT(bridge->m_workerContext->isContextThread());
- bridge->m_callbacksOnWorkerThread->didOpenFileSystem(name, rootPath);
- bridge->m_callbacksOnWorkerThread = 0;
+ bridge->m_callbacksOnWorkerThread->didOpenFileSystem(name, rootPath);
+}
+
+void WorkerFileSystemCallbacksBridge::didSucceedOnWorkerThread(ScriptExecutionContext*, WorkerFileSystemCallbacksBridge* bridge)
+{
+ bridge->m_callbacksOnWorkerThread->didSucceed();
+}
+
+void WorkerFileSystemCallbacksBridge::didReadMetadataOnWorkerThread(ScriptExecutionContext*, WorkerFileSystemCallbacksBridge* bridge, const WebFileInfo& info)
+{
+ bridge->m_callbacksOnWorkerThread->didReadMetadata(info);
+}
+
+void WorkerFileSystemCallbacksBridge::didReadDirectoryOnWorkerThread(ScriptExecutionContext*, WorkerFileSystemCallbacksBridge* bridge, const WebVector<WebFileSystemEntry>& entries, bool hasMore)
+{
+ bridge->m_callbacksOnWorkerThread->didReadDirectory(entries, hasMore);
+}
+
+bool WorkerFileSystemCallbacksBridge::derefIfWorkerIsStopped()
+{
+ WebWorkerBase* worker = 0;
+ {
+ MutexLocker locker(m_mutex);
+ worker = m_worker;
+ }
+
+ if (!worker) {
+ m_selfRef.clear();
+ return true;
}
+ return false;
+}
+
+void WorkerFileSystemCallbacksBridge::runTaskOnMainThread(WebCore::ScriptExecutionContext* scriptExecutionContext, WorkerFileSystemCallbacksBridge* bridge, PassOwnPtr<WebCore::ScriptExecutionContext::Task> taskToRun)
+{
+ ASSERT(isMainThread());
+ if (bridge->derefIfWorkerIsStopped())
+ return;
+ taskToRun->performTask(scriptExecutionContext);
+}
+
+void WorkerFileSystemCallbacksBridge::runTaskOnWorkerThread(WebCore::ScriptExecutionContext* scriptExecutionContext, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, PassOwnPtr<WebCore::ScriptExecutionContext::Task> taskToRun)
+{
+ if (!bridge->m_callbacksOnWorkerThread)
+ return;
+ ASSERT(bridge->m_workerContext->isContextThread());
+ taskToRun->performTask(scriptExecutionContext);
+ bridge->m_callbacksOnWorkerThread = 0;
+}
+
+void WorkerFileSystemCallbacksBridge::dispatchTaskToMainThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task> task)
+{
+ ASSERT(!m_selfRef);
+ ASSERT(m_worker);
+ ASSERT(m_workerContext->isContextThread());
+ m_selfRef = this;
+ m_worker->dispatchTaskToMainThread(createCallbackTask(&runTaskOnMainThread, this, task));
}
void WorkerFileSystemCallbacksBridge::mayPostTaskToWorker(PassOwnPtr<ScriptExecutionContext::Task> task, const String& mode)
{
+ ASSERT(isMainThread());
{ // Let go of the mutex before possibly deleting this due to m_selfRef.clear().
MutexLocker locker(m_mutex);
if (m_worker)
- m_worker->postTaskForModeToWorkerContext(task, mode);
+ m_worker->postTaskForModeToWorkerContext(createCallbackTask(&runTaskOnWorkerThread, m_selfRef, task), mode);
}
m_selfRef.clear();
}
diff --git a/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h
index 899127e..fa57f38 100644
--- a/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h
+++ b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h
@@ -68,10 +68,6 @@ struct WebFileSystemEntry;
// releases a self-reference to the bridge.
class WorkerFileSystemCallbacksBridge : public ThreadSafeShared<WorkerFileSystemCallbacksBridge>, public WebCore::WorkerContext::Observer {
public:
- static PassRefPtr<WorkerFileSystemCallbacksBridge> create(WebWorkerBase* worker, WebCore::ScriptExecutionContext* workerContext, WebFileSystemCallbacks* callbacks)
- {
- return WTF::adoptRef(new WorkerFileSystemCallbacksBridge(worker, workerContext, callbacks));
- }
~WorkerFileSystemCallbacksBridge();
// WorkerContext::Observer method.
@@ -82,26 +78,64 @@ public:
void stop();
- // Posts an initial request task to the main thread. It is supposed to be called immediately after the bridge is constructed. (It doesn't check if the context has been stopped or not.)
+ static PassRefPtr<WorkerFileSystemCallbacksBridge> create(WebWorkerBase* worker, WebCore::ScriptExecutionContext* workerContext, WebFileSystemCallbacks* callbacks)
+ {
+ return adoptRef(new WorkerFileSystemCallbacksBridge(worker, workerContext, callbacks));
+ }
+
+ // Methods that create an instance and post an initial request task to the main thread. They must be called on the worker thread.
void postOpenFileSystemToMainThread(WebCommonWorkerClient*, WebFileSystem::Type, long long size, const String& mode);
+ void postMoveToMainThread(WebFileSystem*, const String& srcPath, const String& destPath, const String& mode);
+ void postCopyToMainThread(WebFileSystem*, const String& srcPath, const String& destPath, const String& mode);
+ void postRemoveToMainThread(WebFileSystem*, const String& path, const String& mode);
+ void postRemoveRecursivelyToMainThread(WebFileSystem*, const String& path, const String& mode);
+ void postReadMetadataToMainThread(WebFileSystem*, const String& path, const String& mode);
+ void postCreateFileToMainThread(WebFileSystem*, const String& path, bool exclusive, const String& mode);
+ void postCreateDirectoryToMainThread(WebFileSystem*, const String& path, bool exclusive, const String& mode);
+ void postFileExistsToMainThread(WebFileSystem*, const String& path, const String& mode);
+ void postDirectoryExistsToMainThread(WebFileSystem*, const String& path, const String& mode);
+ void postReadDirectoryToMainThread(WebFileSystem*, const String& path, const String& mode);
// Callback methods that are called on the main thread.
void didFailOnMainThread(WebFileError, const String& mode);
void didOpenFileSystemOnMainThread(const String& name, const String& rootPath, const String& mode);
+ void didSucceedOnMainThread(const String& mode);
+ void didReadMetadataOnMainThread(const WebFileInfo&, const String& mode);
+ void didReadDirectoryOnMainThread(const WebVector<WebFileSystemEntry>&, bool hasMore, const String& mode);
private:
WorkerFileSystemCallbacksBridge(WebWorkerBase*, WebCore::ScriptExecutionContext*, WebFileSystemCallbacks*);
- // Method that is to be called on the main thread.
+ // Methods that are to be called on the main thread.
static void openFileSystemOnMainThread(WebCore::ScriptExecutionContext*, WebCommonWorkerClient*, WebFileSystem::Type, long long size, WorkerFileSystemCallbacksBridge*, const String& mode);
+ static void moveOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& srcPath, const String& destPath, WorkerFileSystemCallbacksBridge*, const String& mode);
+ static void copyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& srcPath, const String& destPath, WorkerFileSystemCallbacksBridge*, const String& mode);
+ static void removeOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode);
+ static void removeRecursivelyOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode);
+ static void readMetadataOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode);
+ static void createFileOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, bool exclusive, WorkerFileSystemCallbacksBridge*, const String& mode);
+ static void createDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, bool exclusive, WorkerFileSystemCallbacksBridge*, const String& mode);
+ static void fileExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode);
+ static void directoryExistsOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode);
+ static void readDirectoryOnMainThread(WebCore::ScriptExecutionContext*, WebFileSystem*, const String& path, WorkerFileSystemCallbacksBridge*, const String& mode);
friend class MainThreadFileSystemCallbacks;
// Methods that dispatch WebFileSystemCallbacks on the worker threads.
// They release a selfRef of the WorkerFileSystemCallbacksBridge.
- static void didFailOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge>, WebFileError);
- static void didOpenFileSystemOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge>, const String& name, const String& rootPath);
+ static void didFailOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, WebFileError);
+ static void didOpenFileSystemOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, const String& name, const String& rootPath);
+ static void didSucceedOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*);
+ static void didReadMetadataOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, const WebFileInfo&);
+ static void didReadDirectoryOnWorkerThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, const WebVector<WebFileSystemEntry>&, bool hasMore);
+
+ // For early-exist; this deref's selfRef and returns true if the worker is already null.
+ bool derefIfWorkerIsStopped();
+
+ static void runTaskOnMainThread(WebCore::ScriptExecutionContext*, WorkerFileSystemCallbacksBridge*, PassOwnPtr<WebCore::ScriptExecutionContext::Task>);
+ static void runTaskOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge>, PassOwnPtr<WebCore::ScriptExecutionContext::Task>);
+ void dispatchTaskToMainThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task>);
void mayPostTaskToWorker(PassOwnPtr<WebCore::ScriptExecutionContext::Task>, const String& mode);
// m_selfRef keeps a reference to itself until a task is created for the worker thread (at which point the task holds the reference).
diff --git a/WebKit/chromium/src/gtk/WebInputEventFactory.cpp b/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
index 0d55c43..71d1b39 100644
--- a/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
+++ b/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
@@ -52,7 +52,7 @@ bool countsAsDoubleClick(gint timeDiff, gint xDiff, gint yDiff)
gint doubleClickDistance = 5;
g_object_get(G_OBJECT(settings),
"gtk-double-click-time", &doubleClickTime,
- "gtk-double-click-distance", &doubleClickDistance, 0);
+ "gtk-double-click-distance", &doubleClickDistance, NULL);
return timeDiff <= doubleClickTime && abs(xDiff) <= doubleClickDistance && abs(yDiff) <= doubleClickDistance;
}
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index a66e174..4c23057 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -162,3 +162,25 @@ WebInspector.resetToolbarColors = function()
}
+////////////////////////////////////////////////////////
+// Platform-specific WebInspector extensions support. //
+////////////////////////////////////////////////////////
+
+WebInspector.platformExtensionAPI = function(tabId)
+{
+ function getTabId()
+ {
+ return tabId;
+ }
+ webInspector.inspectedWindow.__proto__.__defineGetter__("tabId", getTabId);
+}
+
+WebInspector.buildPlatformExtensionAPI = function()
+{
+ return "(" + WebInspector.platformExtensionAPI + ")(" + WebInspector._inspectedTabId + ");";
+}
+
+WebInspector.setInspectedTabId = function(tabId)
+{
+ WebInspector._inspectedTabId = tabId;
+}
diff --git a/WebKit/chromium/tests/ArenaTestHelpers.h b/WebKit/chromium/tests/ArenaTestHelpers.h
index 87f827d..70936e5 100644
--- a/WebKit/chromium/tests/ArenaTestHelpers.h
+++ b/WebKit/chromium/tests/ArenaTestHelpers.h
@@ -28,6 +28,7 @@
#include "PODArena.h"
#include <gtest/gtest.h>
+#include <wtf/NotFound.h>
#include <wtf/Vector.h>
namespace WebCore {
@@ -52,7 +53,7 @@ public:
virtual void free(void* ptr)
{
size_t slot = m_allocatedRegions.find(ptr);
- ASSERT_GE(slot, 0);
+ ASSERT_NE(slot, notFound);
m_allocatedRegions.remove(slot);
PODArena::FastMallocAllocator::free(ptr);
}
diff --git a/WebKit/chromium/tests/IDBKeyPathTest.cpp b/WebKit/chromium/tests/IDBKeyPathTest.cpp
index ac10f4f..6c378d6 100644
--- a/WebKit/chromium/tests/IDBKeyPathTest.cpp
+++ b/WebKit/chromium/tests/IDBKeyPathTest.cpp
@@ -58,7 +58,7 @@ void checkKeyPath(const String& keyPath, const Vector<IDBKeyPathElement>& expect
if (error != IDBKeyPathParseErrorNone)
return;
ASSERT_EQ(expected.size(), idbKeyPathElements.size());
- for (int i = 0; i < expected.size(); ++i) {
+ for (size_t i = 0; i < expected.size(); ++i) {
ASSERT_TRUE(expected[i].type == idbKeyPathElements[i].type) << i;
if (expected[i].type == IDBKeyPathElement::IsIndexed)
ASSERT_EQ(expected[i].index, idbKeyPathElements[i].index) << i;
diff --git a/WebKit/chromium/tests/KURLTest.cpp b/WebKit/chromium/tests/KURLTest.cpp
index c46da2a..152dd31 100644
--- a/WebKit/chromium/tests/KURLTest.cpp
+++ b/WebKit/chromium/tests/KURLTest.cpp
@@ -37,13 +37,16 @@
#include "KURL.h"
-namespace {
-
+namespace WTF {
// Output stream operator so gTest's macros work with WebCore strings.
-std::ostream& operator<<(std::ostream& out, const WTF::String& str)
+std::ostream& operator<<(std::ostream& out, const String& str)
{
return str.isEmpty() ? out : out << str.utf8().data();
}
+} // namespace WTF
+
+namespace {
+
struct ComponentCase {
const char* url;
diff --git a/WebKit/chromium/tests/PODIntervalTreeTest.cpp b/WebKit/chromium/tests/PODIntervalTreeTest.cpp
index 3a8a245..8241a89 100644
--- a/WebKit/chromium/tests/PODIntervalTreeTest.cpp
+++ b/WebKit/chromium/tests/PODIntervalTreeTest.cpp
@@ -41,15 +41,20 @@ using TreeTestHelpers::generateSeed;
using TreeTestHelpers::initRandom;
using TreeTestHelpers::nextRandom;
-inline String valueToString(const float& value)
-{
- return String::number(value);
-}
+#ifndef NDEBUG
+template<>
+struct ValueToString<float> {
+ static String string(const float& value) { return String::number(value); }
+};
-inline String valueToString(void* const& value)
-{
- return String::format("0x%p", value);
-}
+template<>
+struct ValueToString<void*> {
+ static String string(void* const& value)
+ {
+ return String::format("0x%p", value);
+ }
+};
+#endif
TEST(PODIntervalTreeTest, TestInsertion)
{
@@ -82,6 +87,16 @@ TEST(PODIntervalTreeTest, TestQueryAgainstZeroSizeInterval)
EXPECT_EQ(4, result[0].high());
}
+#ifndef NDEBUG
+template<>
+struct ValueToString<int*> {
+ static String string(int* const& value)
+ {
+ return String::format("0x%p", value);
+ }
+};
+#endif
+
TEST(PODIntervalTreeTest, TestDuplicateElementInsertion)
{
PODIntervalTree<float, int*> tree;
@@ -113,13 +128,18 @@ public:
int b;
};
-inline String valueToString(const UserData1& value)
-{
- return String("[UserData1 a=") + String::number(value.a) + " b=" + String::number(value.b) + "]";
-}
-
} // anonymous namespace
+#ifndef NDEBUG
+template<>
+struct ValueToString<UserData1> {
+ static String string(const UserData1& value)
+ {
+ return String("[UserData1 a=") + String::number(value.a) + " b=" + String::number(value.b) + "]";
+ }
+};
+#endif
+
TEST(PODIntervalTreeTest, TestInsertionOfComplexUserData)
{
PODIntervalTree<float, UserData1> tree;
@@ -165,13 +185,18 @@ private:
bool operator!=(const EndpointType1& other);
};
-inline String valueToString(const EndpointType1& value)
-{
- return String("[EndpointType1 value=") + String::number(value.value()) + "]";
-}
-
} // anonymous namespace
+#ifndef NDEBUG
+template<>
+struct ValueToString<EndpointType1> {
+ static String string(const EndpointType1& value)
+ {
+ return String("[EndpointType1 value=") + String::number(value.value()) + "]";
+ }
+};
+#endif
+
TEST(PODIntervalTreeTest, TestTreeDoesNotRequireMostOperators)
{
PODIntervalTree<EndpointType1> tree;
@@ -179,9 +204,17 @@ TEST(PODIntervalTreeTest, TestTreeDoesNotRequireMostOperators)
ASSERT_TRUE(tree.checkInvariants());
}
-// Uncomment to debug a failure of the insertion and deletion test.
+// Uncomment to debug a failure of the insertion and deletion test. Won't work
+// in release builds.
// #define DEBUG_INSERTION_AND_DELETION_TEST
+#ifndef NDEBUG
+template<>
+struct ValueToString<int> {
+ static String string(const int& value) { return String::number(value); }
+};
+#endif
+
namespace {
void InsertionAndDeletionTest(int32_t seed, int treeSize)
@@ -198,7 +231,7 @@ void InsertionAndDeletionTest(int32_t seed, int treeSize)
PODInterval<int> interval(left, left + length);
tree.add(interval);
#ifdef DEBUG_INSERTION_AND_DELETION_TEST
- LOG_ERROR("*** Adding element %s", valueToString(interval).ascii().data());
+ LOG_ERROR("*** Adding element %s", ValueToString<PODInterval<int> >::string(interval).ascii().data());
#endif
addedElements.append(interval);
}
@@ -207,7 +240,7 @@ void InsertionAndDeletionTest(int32_t seed, int treeSize)
for (int i = 0; i < treeSize / 2; i++) {
int index = nextRandom(addedElements.size());
#ifdef DEBUG_INSERTION_AND_DELETION_TEST
- LOG_ERROR("*** Removing element %s", valueToString(addedElements[index]).ascii().data());
+ LOG_ERROR("*** Removing element %s", ValueToString<PODInterval<int> >::string(addedElements[index]).ascii().data());
#endif
ASSERT_TRUE(tree.contains(addedElements[index])) << "Test failed for seed " << seed;
tree.remove(addedElements[index]);
@@ -227,7 +260,7 @@ void InsertionAndDeletionTest(int32_t seed, int treeSize)
if (add) {
int index = nextRandom(removedElements.size());
#ifdef DEBUG_INSERTION_AND_DELETION_TEST
- LOG_ERROR("*** Adding element %s", valueToString(removedElements[index]).ascii().data());
+ LOG_ERROR("*** Adding element %s", ValueToString<PODInterval<int> >::string(removedElements[index]).ascii().data());
#endif
tree.add(removedElements[index]);
addedElements.append(removedElements[index]);
@@ -235,7 +268,7 @@ void InsertionAndDeletionTest(int32_t seed, int treeSize)
} else {
int index = nextRandom(addedElements.size());
#ifdef DEBUG_INSERTION_AND_DELETION_TEST
- LOG_ERROR("*** Removing element %s", valueToString(addedElements[index]).ascii().data());
+ LOG_ERROR("*** Removing element %s", ValueToString<PODInterval<int> >::string(addedElements[index]).ascii().data());
#endif
ASSERT_TRUE(tree.contains(addedElements[index])) << "Test failed for seed " << seed;
ASSERT_TRUE(tree.remove(addedElements[index])) << "Test failed for seed " << seed;
diff --git a/WebKit/chromium/tests/RunAllTests.cpp b/WebKit/chromium/tests/RunAllTests.cpp
index cfcfbee..b213de7 100644
--- a/WebKit/chromium/tests/RunAllTests.cpp
+++ b/WebKit/chromium/tests/RunAllTests.cpp
@@ -35,13 +35,25 @@
#include "WebKitClient.h"
#include <webkit/support/webkit_support.h>
+#if defined(WIN32) && defined(WEBKIT_DLL_UNITTEST)
+#include "WebUnitTests.h"
+#endif
+
int main(int argc, char** argv)
{
TestSuite testSuite(argc, argv);
// TestSuite must be created before SetUpTestEnvironment so it performs
// initializations needed by WebKit support.
webkit_support::SetUpTestEnvironmentForUnitTests();
+
+#if defined(WIN32) && defined(WEBKIT_DLL_UNITTEST)
+ // For chromium multi-dll build, need to call webkit api to create a
+ // TestSuite instance in webkit.dll and run all tests from there.
+ int result = WebKit::RunAllUnitTests(argc, argv);
+#else
int result = testSuite.Run();
+#endif
+
webkit_support::TearDownTestEnvironment();
return result;
}
diff --git a/WebKit/chromium/tests/TransparencyWinTest.cpp b/WebKit/chromium/tests/TransparencyWinTest.cpp
index b83c2a9..ed7f12f 100644
--- a/WebKit/chromium/tests/TransparencyWinTest.cpp
+++ b/WebKit/chromium/tests/TransparencyWinTest.cpp
@@ -103,7 +103,7 @@ static std::ostream& operator<<(std::ostream& out, const Color& c)
TEST(TransparencyWin, NoLayer)
{
- OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(17, 16), DeviceRGB));
+ OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(17, 16), ColorSpaceDeviceRGB));
// KeepTransform
{
@@ -142,7 +142,7 @@ TEST(TransparencyWin, NoLayer)
TEST(TransparencyWin, WhiteLayer)
{
- OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB));
+ OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB));
// KeepTransform
{
@@ -194,7 +194,7 @@ TEST(TransparencyWin, WhiteLayer)
TEST(TransparencyWin, TextComposite)
{
- OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB));
+ OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB));
// KeepTransform is the only valid transform mode for TextComposite.
{
@@ -213,7 +213,7 @@ TEST(TransparencyWin, TextComposite)
TEST(TransparencyWin, OpaqueCompositeLayer)
{
- OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB));
+ OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB));
// KeepTransform
{
@@ -283,7 +283,7 @@ TEST(TransparencyWin, OpaqueCompositeLayer)
TEST(TransparencyWin, WhiteLayerPixelTest)
{
// Make a total transparent buffer, and draw the white layer inset by 1 px.
- OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB));
+ OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB));
{
TransparencyWin helper;
@@ -312,13 +312,13 @@ TEST(TransparencyWin, OpaqueCompositeLayerPixel)
Color green(0xFF00FF00);
// Make a red bottom layer, followed by a half green next layer @ 50%.
- OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB));
+ OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB));
FloatRect fullRect(0, 0, 16, 16);
- src->context()->fillRect(fullRect, red, DeviceColorSpace);
+ src->context()->fillRect(fullRect, red, ColorSpaceDeviceRGB);
src->context()->beginTransparencyLayer(0.5);
FloatRect rightHalf(8, 0, 8, 16);
- src->context()->fillRect(rightHalf, green, DeviceColorSpace);
+ src->context()->fillRect(rightHalf, green, ColorSpaceDeviceRGB);
// Make a transparency layer inset by one pixel, and fill it inset by
// another pixel with 50% black.
@@ -330,7 +330,7 @@ TEST(TransparencyWin, OpaqueCompositeLayerPixel)
IntRect(1, 1, 14, 14));
FloatRect inner(2, 2, 12, 12);
- helper.context()->fillRect(inner, Color(0x7f000000), DeviceColorSpace);
+ helper.context()->fillRect(inner, Color(0x7f000000), ColorSpaceDeviceRGB);
// These coordinates are relative to the layer, whish is inset by 1x1
// pixels from the top left. So we're actually clearing (2, 2) and
// (13,13), which are the extreme corners of the black area (and which
@@ -365,10 +365,10 @@ TEST(TransparencyWin, OpaqueCompositeLayerPixel)
TEST(TransparencyWin, TranslateOpaqueCompositeLayer)
{
// Fill with white.
- OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB));
+ OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB));
Color white(0xFFFFFFFF);
FloatRect fullRect(0, 0, 16, 16);
- src->context()->fillRect(fullRect, white, DeviceColorSpace);
+ src->context()->fillRect(fullRect, white, ColorSpaceDeviceRGB);
// Scroll down by 8 (coordinate system goes up).
src->context()->save();
@@ -388,7 +388,7 @@ TEST(TransparencyWin, TranslateOpaqueCompositeLayer)
// Draw a red pixel at (15, 15). This should be the at (15, 7) after
// the transform.
FloatRect bottomRight(15, 15, 1, 1);
- helper.context()->fillRect(bottomRight, green, DeviceColorSpace);
+ helper.context()->fillRect(bottomRight, green, ColorSpaceDeviceRGB);
helper.composite();
}
@@ -402,12 +402,12 @@ TEST(TransparencyWin, TranslateOpaqueCompositeLayer)
// tests that the propert transform is applied to the copied layer.
TEST(TransparencyWin, RotateOpaqueCompositeLayer)
{
- OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB));
+ OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB));
// The background is white.
Color white(0xFFFFFFFF);
FloatRect fullRect(0, 0, 16, 16);
- src->context()->fillRect(fullRect, white, DeviceColorSpace);
+ src->context()->fillRect(fullRect, white, ColorSpaceDeviceRGB);
// Rotate the image by 90 degrees. This matrix is the same as
// cw90.rotate(90); but avoids rounding errors. Rounding errors can cause
@@ -425,7 +425,7 @@ TEST(TransparencyWin, RotateOpaqueCompositeLayer)
src->context()->beginTransparencyLayer(0.5);
FloatRect blackRect(0, -9, 16, 2);
Color black(0xFF000000);
- src->context()->fillRect(blackRect, black, DeviceColorSpace);
+ src->context()->fillRect(blackRect, black, ColorSpaceDeviceRGB);
// Now draw 50% red square.
{
@@ -439,7 +439,7 @@ TEST(TransparencyWin, RotateOpaqueCompositeLayer)
IntRect(1, -15, 14, 14));
// Fill with red.
- helper.context()->fillRect(helper.drawRect(), Color(0x7f7f0000), DeviceColorSpace);
+ helper.context()->fillRect(helper.drawRect(), Color(0x7f7f0000), ColorSpaceDeviceRGB);
clearTopLayerAlphaChannel(helper.context());
helper.composite();
}
@@ -481,15 +481,15 @@ TEST(TransparencyWin, RotateOpaqueCompositeLayer)
TEST(TransparencyWin, TranslateScaleOpaqueCompositeLayer)
{
- OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB));
+ OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB));
// The background is white on top with red on bottom.
Color white(0xFFFFFFFF);
FloatRect topRect(0, 0, 16, 8);
- src->context()->fillRect(topRect, white, DeviceColorSpace);
+ src->context()->fillRect(topRect, white, ColorSpaceDeviceRGB);
Color red(0xFFFF0000);
FloatRect bottomRect(0, 8, 16, 8);
- src->context()->fillRect(bottomRect, red, DeviceColorSpace);
+ src->context()->fillRect(bottomRect, red, ColorSpaceDeviceRGB);
src->context()->save();
@@ -519,7 +519,7 @@ TEST(TransparencyWin, TranslateScaleOpaqueCompositeLayer)
IntRect(1, -15, 14, 14));
// Fill with red.
- helper.context()->fillRect(helper.drawRect(), Color(0x7f7f0000), DeviceColorSpace);
+ helper.context()->fillRect(helper.drawRect(), Color(0x7f7f0000), ColorSpaceDeviceRGB);
clearTopLayerAlphaChannel(helper.context());
helper.composite();
}
@@ -529,9 +529,9 @@ TEST(TransparencyWin, TranslateScaleOpaqueCompositeLayer)
TEST(TransparencyWin, Scale)
{
// Create an opaque white buffer.
- OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB));
+ OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB));
FloatRect fullBuffer(0, 0, 16, 16);
- src->context()->fillRect(fullBuffer, Color::white, DeviceColorSpace);
+ src->context()->fillRect(fullBuffer, Color::white, ColorSpaceDeviceRGB);
// Scale by 2x.
src->context()->save();
@@ -584,15 +584,15 @@ TEST(TransparencyWin, Scale)
TEST(TransparencyWin, ScaleTransparency)
{
// Create an opaque white buffer.
- OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB));
+ OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB));
FloatRect fullBuffer(0, 0, 16, 16);
- src->context()->fillRect(fullBuffer, Color::white, DeviceColorSpace);
+ src->context()->fillRect(fullBuffer, Color::white, ColorSpaceDeviceRGB);
// Make another layer (which duplicates how WebKit will make this). We fill
// the top half with red, and have the layer be 50% opaque.
src->context()->beginTransparencyLayer(0.5);
FloatRect topHalf(0, 0, 16, 8);
- src->context()->fillRect(topHalf, Color(0xFFFF0000), DeviceColorSpace);
+ src->context()->fillRect(topHalf, Color(0xFFFF0000), ColorSpaceDeviceRGB);
// Scale by 2x.
src->context()->save();
@@ -609,7 +609,7 @@ TEST(TransparencyWin, ScaleTransparency)
TransparencyWin::ScaleTransform,
IntRect(1, 1, 6, 6));
- helper.context()->fillRect(helper.drawRect(), Color(0x7f000000), DeviceColorSpace);
+ helper.context()->fillRect(helper.drawRect(), Color(0x7f000000), ColorSpaceDeviceRGB);
clearTopLayerAlphaChannel(helper.context());
helper.composite();
}
@@ -642,7 +642,7 @@ TEST(TransparencyWin, ScaleTransparency)
TEST(TransparencyWin, Text)
{
- OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), DeviceRGB));
+ OwnPtr<ImageBuffer> src(ImageBuffer::create(IntSize(16, 16), ColorSpaceDeviceRGB));
// Our text should end up 50% transparent blue-green.
Color fullResult(0x80008080);
@@ -658,21 +658,21 @@ TEST(TransparencyWin, Text)
// Write several different squares to simulate ClearType. These should
// all reduce to 2/3 coverage.
FloatRect pixel(0, 0, 1, 1);
- helper.context()->fillRect(pixel, 0xFFFF0000, DeviceColorSpace);
+ helper.context()->fillRect(pixel, 0xFFFF0000, ColorSpaceDeviceRGB);
pixel.move(1.0f, 0.0f);
- helper.context()->fillRect(pixel, 0xFF00FF00, DeviceColorSpace);
+ helper.context()->fillRect(pixel, 0xFF00FF00, ColorSpaceDeviceRGB);
pixel.move(1.0f, 0.0f);
- helper.context()->fillRect(pixel, 0xFF0000FF, DeviceColorSpace);
+ helper.context()->fillRect(pixel, 0xFF0000FF, ColorSpaceDeviceRGB);
pixel.move(1.0f, 0.0f);
- helper.context()->fillRect(pixel, 0xFF008080, DeviceColorSpace);
+ helper.context()->fillRect(pixel, 0xFF008080, ColorSpaceDeviceRGB);
pixel.move(1.0f, 0.0f);
- helper.context()->fillRect(pixel, 0xFF800080, DeviceColorSpace);
+ helper.context()->fillRect(pixel, 0xFF800080, ColorSpaceDeviceRGB);
pixel.move(1.0f, 0.0f);
- helper.context()->fillRect(pixel, 0xFF808000, DeviceColorSpace);
+ helper.context()->fillRect(pixel, 0xFF808000, ColorSpaceDeviceRGB);
// Try one with 100% coverage (opaque black).
pixel.move(1.0f, 0.0f);
- helper.context()->fillRect(pixel, 0xFF000000, DeviceColorSpace);
+ helper.context()->fillRect(pixel, 0xFF000000, ColorSpaceDeviceRGB);
// Now mess with the alpha channel.
clearTopLayerAlphaChannel(helper.context());
diff --git a/WebKit/chromium/tests/WebUnitTests.cpp b/WebKit/chromium/tests/WebUnitTests.cpp
new file mode 100644
index 0000000..5e207f3
--- /dev/null
+++ b/WebKit/chromium/tests/WebUnitTests.cpp
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 "WebUnitTests.h"
+
+#include <base/test/test_suite.h>
+
+namespace WebKit {
+
+int RunAllUnitTests(int argc, char** argv)
+{
+ TestSuite testSuite(argc, argv);
+ return testSuite.Run();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/tests/WebUnitTests.h b/WebKit/chromium/tests/WebUnitTests.h
new file mode 100644
index 0000000..3add1c2
--- /dev/null
+++ b/WebKit/chromium/tests/WebUnitTests.h
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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 WebUnitTests_h
+#define WebUnitTests_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+// In chromium multi-dll build, webkit unittest code are compiled in webkit.dll.
+// This is the API to run all unittests inside webkit.dll.
+WEBKIT_API int RunAllUnitTests(int argc, char** argv);
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/efl/CMakeListsEfl.txt b/WebKit/efl/CMakeListsEfl.txt
index c154b66..1964d15 100644
--- a/WebKit/efl/CMakeListsEfl.txt
+++ b/WebKit/efl/CMakeListsEfl.txt
@@ -92,10 +92,15 @@ SET(BUILD_DATA_DIR ${CMAKE_BINARY_DIR}/WebKit/efl/DefaultTheme)
SET(BUILD_DATA_DIR ${BUILD_DATA_DIR} PARENT_SCOPE)
FILE(MAKE_DIRECTORY ${BUILD_DATA_DIR})
+SET(WebKit_THEME_DEFINITION "")
+IF (ENABLE_PROGRESS_TAG)
+ LIST(APPEND WebKit_THEME_DEFINITION "-DENABLE_PROGRESS_TAG")
+ENDIF ()
+
SET(WebKit_THEME ${BUILD_DATA_DIR}/default.edj)
ADD_CUSTOM_COMMAND(
OUTPUT ${WebKit_THEME}
- COMMAND ${EDJE_CC_EXECUTABLE} -v -id ${WEBKIT_DIR}/efl/DefaultTheme ${WEBKIT_DIR}/efl/DefaultTheme/default.edc ${WebKit_THEME}
+ COMMAND ${EDJE_CC_EXECUTABLE} -v -id ${WEBKIT_DIR}/efl/DefaultTheme ${WebKit_THEME_DEFINITION} ${WEBKIT_DIR}/efl/DefaultTheme/default.edc ${WebKit_THEME}
DEPENDS
${WEBKIT_DIR}/efl/DefaultTheme/default.edc
${WEBKIT_DIR}/efl/DefaultTheme/widget/slider/slider_knob_v.png
@@ -159,6 +164,9 @@ ADD_CUSTOM_COMMAND(
${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file_hover.png
${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file_focus.png
${WEBKIT_DIR}/efl/DefaultTheme/widget/file/file.edc
+ ${WEBKIT_DIR}/efl/DefaultTheme/widget/progressbar/progressbar.edc
+ ${WEBKIT_DIR}/efl/DefaultTheme/widget/progressbar/shelf_inset.png
+ ${WEBKIT_DIR}/efl/DefaultTheme/widget/progressbar/bt_base.png
VERBATIM
)
diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
index 7c6afe9..1795645 100644
--- a/WebKit/efl/ChangeLog
+++ b/WebKit/efl/ChangeLog
@@ -1,3 +1,236 @@
+2010-10-19 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Reviewed by Eric Seidel.
+
+ [EFL] Add setting api for disabling auto resize window
+ https://bugs.webkit.org/show_bug.cgi?id=47787
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::setWindowRect): Return when
+ auto_resize_window was disabled.
+ * ewk/ewk_view.cpp:
+ (_ewk_view_priv_new):
+ (ewk_view_setting_enable_auto_resize_window_get): Added.
+ (ewk_view_setting_enable_auto_resize_window_set): Added.
+ * ewk/ewk_view.h:
+
+2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Replace some String::format() usages by StringConcatenate in WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=47714
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::agentOS):
+
+2010-10-14 Rafael Antognolli <antognolli@profusion.mobi>
+
+ Reviewed by Eric Seidel.
+
+ [EFL] Use data_set after data_get to keep refcount correct.
+ https://bugs.webkit.org/show_bug.cgi?id=47110
+
+ The call to evas_object_image_data_set was missed in this function,
+ which caused the refcount of the data being always increased on every
+ scroll.
+
+ * ewk/ewk_view_single.c:
+ (_ewk_view_single_smart_scrolls_process):
+
+2010-10-14 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Reviewed by Eric Seidel.
+
+ [EFL] Add setting api for enabling encoding detector
+ https://bugs.webkit.org/show_bug.cgi?id=45427
+
+ Add settings api for enabling encoding detector.
+
+ * ewk/ewk_view.cpp:
+ (_ewk_view_priv_new):
+ (ewk_view_setting_encoding_detector_set):
+ (ewk_view_setting_encoding_detector_get):
+ * ewk/ewk_view.h:
+
+2010-10-13 Leandro Pereira <leandro@profusion.mobi>
+
+ [EFL] Unreviewed. Build fix.
+
+ * WebCoreSupport/FrameLoaderClientEfl.h: Use String instead of
+ WebCore::String.
+
+2010-10-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=43987
+ Switch XMLHttpRequest, FileReader, and FileReaderSync to use a Stringbuilder
+ to construct their internal result string. Remove ScriptString (this is now
+ redundant).
+
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::dispatchDidLoadResourceByXMLHttpRequest):
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+
+2010-10-13 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Support viewport configuration and add new arguments for WebKit EFL
+ https://bugs.webkit.org/show_bug.cgi?id=47084
+
+ Opera spec regarding to viewport meta tag was adjusted to WebCore. So, EFL port
+ needs to be modified according to the changes.
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::dispatchViewportDataDidChange):
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::dispatchDidCommitLoad):
+ * ewk/ewk_private.h:
+ * ewk/ewk_view.cpp:
+ (_ewk_view_priv_new):
+ (_ewk_view_viewport_attributes_compute):
+ (ewk_view_viewport_attributes_set):
+ (ewk_view_viewport_attributes_get):
+ (ewk_view_device_pixel_ratio_get):
+ * ewk/ewk_view.h:
+
+2010-10-12 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Add a method to get target's dpi value
+ https://bugs.webkit.org/show_bug.cgi?id=47537
+
+ Add a method to get target dpi value using Ecore_X.
+ When we set layout size, we need to use the dpi value.
+
+ * ewk/ewk_private.h:
+ * ewk/ewk_view.cpp:
+ (ewk_view_page_rect_get):
+ (ewk_view_dpi_get):
+
+2010-10-07 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Implement pageRect() function
+ https://bugs.webkit.org/show_bug.cgi?id=47395
+
+ Implement pageRect() in ChromeClientEfl using frameRect().
+
+ * CMakeListsEfl.txt:
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::pageRect):
+ * ewk/ewk_private.h:
+ * ewk/ewk_view.cpp:
+ (ewk_view_page_rect_get): Added.
+
+2010-10-06 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Support Progress Tag
+ https://bugs.webkit.org/show_bug.cgi?id=45951
+
+ Implement progressbar.edc to support progress tag
+
+ * CMakeListsEfl.txt:
+ * DefaultTheme/default.edc:
+ * DefaultTheme/widget/progressbar: Added.
+ * DefaultTheme/widget/progressbar/bt_base.png: Added.
+ * DefaultTheme/widget/progressbar/progressbar.edc: Added.
+ * DefaultTheme/widget/progressbar/shelf_inset.png: Added.
+
+2010-10-05 Ryuan Choi <ryuan.choi@samsung.com>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Remove strdup in ewk_setting.cpp using eina_stringshare
+ https://bugs.webkit.org/show_bug.cgi?id=46613
+
+ Add variables shared by eina_stringshare and remove strdup.
+
+ * ewk/ewk_main.cpp:
+ (_ewk_init_body):
+ * ewk/ewk_settings.cpp:
+ (ewk_settings_web_database_path_set):
+ (ewk_settings_web_database_path_get):
+ (ewk_settings_icon_database_path_set):
+ (ewk_settings_icon_database_path_get):
+ * ewk/ewk_settings.h:
+
+2010-10-04 Gyuyoung Kim <gyuyoung.kim@samsung.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Viewport data change notification by Bug 46755
+ https://bugs.webkit.org/show_bug.cgi?id=46772
+
+ Bug 46755 changes virtual function regarding to viewport metatag. Thus, EFL port
+ should change the function as well in order to get viewport arguments.
+
+ And, setInitLayoutCompleted / getInitLayoutCompleted() are removed because these functions
+ aren't needed anymore.
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::dispatchViewportDataDidChange):
+ * WebCoreSupport/ChromeClientEfl.h:
+ * WebCoreSupport/FrameLoaderClientEfl.cpp:
+ (WebCore::FrameLoaderClientEfl::FrameLoaderClientEfl):
+ (WebCore::FrameLoaderClientEfl::dispatchDidCommitLoad):
+ (WebCore::FrameLoaderClientEfl::dispatchDidFirstLayout):
+ * WebCoreSupport/FrameLoaderClientEfl.h:
+
+2010-10-01 Rafael Antognolli <antognolli@profusion.mobi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Remove check for InitLayoutCompleted on fixed_layout_size_set.
+ https://bugs.webkit.org/show_bug.cgi?id=47006
+
+ This check isn't needed and isn't done on the other ports. The fixed
+ layout property can be set before we have the first layout.
+
+ * ewk/ewk_view.cpp:
+ (ewk_view_fixed_layout_size_set):
+
+2010-10-01 Rafael Antognolli <antognolli@profusion.mobi>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [EFL] Call contents_resize when the main frame gets resized.
+ https://bugs.webkit.org/show_bug.cgi?id=47004
+
+ The previous implementation was just calling contents_resize when the
+ viewport size had changed. That's not enough, and contents_resize
+ shouldn't be called if the contents size didn't change.
+
+ Now the contents_size_changed function is called directly from the
+ ChromeClientEfl.
+
+ * WebCoreSupport/ChromeClientEfl.cpp:
+ (WebCore::ChromeClientEfl::contentsSizeChanged):
+ * ewk/ewk_private.h:
+ * ewk/ewk_view.cpp:
+ (_ewk_view_smart_calculate):
+ (ewk_view_fixed_layout_size_set):
+ (ewk_view_contents_size_changed):
+
+2010-09-29 João Paulo Rechi Vita <jprvita@profusion.mobi>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] General small fixes.
+ https://bugs.webkit.org/show_bug.cgi?id=46813
+
+ This commit spots a comparison between signed and unsigned integer
+ expressions, a missing return and a never-called function.
+
+ * WebCoreSupport/FullscreenVideoControllerEfl.cpp:
+ (FullscreenVideoController::canPlay):
+
2010-09-28 Jenn Braithwaite <jennb@chromium.org>
Reviewed by Dmitry Titov.
diff --git a/WebKit/efl/DefaultTheme/default.edc b/WebKit/efl/DefaultTheme/default.edc
index 0496a24..7d750f4 100644
--- a/WebKit/efl/DefaultTheme/default.edc
+++ b/WebKit/efl/DefaultTheme/default.edc
@@ -68,6 +68,9 @@ collections {
#include "widget/check/check.edc"
#include "widget/entry/entry.edc"
#include "widget/combo/combo.edc"
+#ifdef ENABLE_PROGRESS_TAG
+#include "widget/progressbar/progressbar.edc"
+#endif
#include "widget/file/file.edc"
#include "widget/search/field/search_field.edc"
#include "widget/search/cancel/search_cancel.edc"
diff --git a/WebKit/efl/DefaultTheme/widget/progressbar/bt_base.png b/WebKit/efl/DefaultTheme/widget/progressbar/bt_base.png
new file mode 100644
index 0000000..2d1f179
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/progressbar/bt_base.png
Binary files differ
diff --git a/WebKit/efl/DefaultTheme/widget/progressbar/progressbar.edc b/WebKit/efl/DefaultTheme/widget/progressbar/progressbar.edc
new file mode 100644
index 0000000..2a34d54
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/progressbar/progressbar.edc
@@ -0,0 +1,108 @@
+/*
+ Copyright (C) 2010 Samsung Electronics
+
+ This file is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Library General Public
+ License as published by the Free Software Foundation; either
+ version 2 of the License, or (at your option) any later version.
+
+ This file is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Library General Public License for more details.
+
+ You should have received a copy of the GNU Library General Public License
+ along with this library; see the file COPYING.LIB. If not, write to
+ the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ Boston, MA 02110-1301, USA.
+*/
+group {
+ name: "webkit/widget/progressbar";
+ min: 0 11; /* if > 0, this is the minimum size that will be allocated.
+ * If wants to draw on top, just overflow usign edje's rel1/rel2
+ */
+ max: 999999 999999;
+
+ images {
+ image: "widget/progressbar/shelf_inset.png" COMP;
+ image: "widget/progressbar/bt_base.png" COMP;
+ }
+
+ script {
+ public message(Msg_Type:type, id, ...) {
+ if ((id == 0) && (type == MSG_FLOAT_SET)) {
+ new Float:x, Float:sx;
+ x = getfarg(2);
+ sx = getfarg(3);
+
+ if (sx >= 0.0) {
+ set_drag_size(PART:"img.progressbar_fill", sx, 1.0);
+ set_drag(PART:"img.progressbar_fill", x, 0.0);
+ }
+ }
+ }
+ }
+
+ parts {
+ part {
+ name: "rect.base";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ min: 29 11;
+ max: 999999 99999;
+ color: 255 255 255 0;
+ }
+ }
+ part {
+ name: "rect.clipper";
+ type: RECT;
+ description {
+ state: "default" 0.0;
+ color: 255 255 255 255;
+ }
+ description {
+ state: "hidden" 0.0;
+ color: 255 255 255 128;
+ }
+ }
+
+ part {
+ name: "img.progressbar";
+ type: IMAGE;
+ mouse_events: 0;
+ clip_to: "rect.clipper";
+ description {
+ state: "default" 0.0;
+ min: 29 5;
+ rel1.to: "rect.base";
+ rel2.to: "rect.base";
+ align: 0.5 0.5;
+ image {
+ normal: "widget/progressbar/shelf_inset.png";
+ border: 8 8 8 8;
+ }
+ }
+ }
+ part {
+ name: "img.progressbar_fill";
+ type: IMAGE;
+ mouse_events: 0;
+ clip_to: "rect.clipper";
+ dragable {
+ x: 1 1 0;
+ y: 0 0 0;
+ confine: "rect.base";
+ }
+ description {
+ state: "default" 0.0;
+ min: 0 5;
+ align: 0.5 0.5;
+ image {
+ normal: "widget/progressbar/bt_base.png";
+ border: 7 7 0 0;
+ }
+ }
+ }
+ }
+}
diff --git a/WebKit/efl/DefaultTheme/widget/progressbar/shelf_inset.png b/WebKit/efl/DefaultTheme/widget/progressbar/shelf_inset.png
new file mode 100644
index 0000000..bb1989d
--- /dev/null
+++ b/WebKit/efl/DefaultTheme/widget/progressbar/shelf_inset.png
Binary files differ
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
index 21747a1..257e824 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.cpp
@@ -111,6 +111,9 @@ void ChromeClientEfl::setWindowRect(const FloatRect& rect)
if (!m_view)
return;
+ if (!ewk_view_setting_enable_auto_resize_window_get(m_view))
+ return;
+
ee = ecore_evas_ecore_evas_get(evas_object_evas_get(m_view));
ecore_evas_move(ee, intrect.x(), intrect.y());
ecore_evas_resize(ee, intrect.width(), intrect.height());
@@ -118,8 +121,10 @@ void ChromeClientEfl::setWindowRect(const FloatRect& rect)
FloatRect ChromeClientEfl::pageRect()
{
- notImplemented();
- return FloatRect();
+ if (!m_view)
+ return FloatRect();
+
+ return ewk_view_page_rect_get(m_view);
}
float ChromeClientEfl::scaleFactor()
@@ -319,6 +324,8 @@ IntRect ChromeClientEfl::windowResizerRect() const
void ChromeClientEfl::contentsSizeChanged(Frame* frame, const IntSize& size) const
{
ewk_frame_contents_size_changed(kit(frame), size.width(), size.height());
+ if (ewk_view_frame_main_get(m_view) == kit(frame))
+ ewk_view_contents_size_changed(m_view, size.width(), size.height());
}
IntRect ChromeClientEfl::windowToScreen(const IntRect& rect) const
@@ -513,13 +520,9 @@ void ChromeClientEfl::chooseIconForFiles(const Vector<String>&, FileChooser*)
notImplemented();
}
-void ChromeClientEfl::didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const
+void ChromeClientEfl::dispatchViewportDataDidChange(const ViewportArguments& arguments) const
{
- FrameLoaderClientEfl* client = static_cast<FrameLoaderClientEfl*>(frame->loader()->client());
- if (client->getInitLayoutCompleted())
- return;
-
- ewk_view_viewport_set(m_view, arguments.width, arguments.height, arguments.initialScale, arguments.minimumScale, arguments.maximumScale, arguments.userScalable);
+ ewk_view_viewport_attributes_set(m_view, arguments);
}
bool ChromeClientEfl::selectItemWritingDirectionIsNatural()
diff --git a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
index d939ae6..4339b9a 100644
--- a/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/ChromeClientEfl.h
@@ -137,7 +137,7 @@ public:
virtual void cancelGeolocationPermissionRequestForFrame(Frame*);
virtual void iconForFiles(const Vector<String, 0u>&, PassRefPtr<FileChooser>);
- virtual void didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const;
+ virtual void dispatchViewportDataDidChange(const ViewportArguments&) const;
virtual bool selectItemWritingDirectionIsNatural();
virtual PassRefPtr<PopupMenu> createPopupMenu(PopupMenuClient*) const;
diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
index 2d452d8..1b82239 100644
--- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.cpp
@@ -54,6 +54,7 @@
#include "ViewportArguments.h"
#include "ewk_private.h"
#include <wtf/text/CString.h>
+#include <wtf/text/StringConcatenate.h>
#if PLATFORM(UNIX)
#include <sys/utsname.h>
@@ -72,7 +73,6 @@ FrameLoaderClientEfl::FrameLoaderClientEfl(Evas_Object *view)
, m_customUserAgent("")
, m_pluginView(0)
, m_hasSentResponseToPlugin(false)
- , m_initLayoutCompleted(false)
{
}
@@ -93,7 +93,7 @@ static String agentOS()
#elif PLATFORM(UNIX)
struct utsname name;
if (uname(&name) != -1)
- return String::format("%s %s", name.sysname, name.machine);
+ return makeString(name.sysname, ' ', name.machine);
return "Unknown";
#elif PLATFORM(WIN_OS)
@@ -615,8 +615,6 @@ void FrameLoaderClientEfl::dispatchDidChangeIcons()
void FrameLoaderClientEfl::dispatchDidCommitLoad()
{
- m_initLayoutCompleted = false;
-
ewk_frame_uri_changed(m_frame);
if (ewk_view_frame_main_get(m_view) != m_frame)
return;
@@ -624,7 +622,7 @@ void FrameLoaderClientEfl::dispatchDidCommitLoad()
ewk_view_uri_changed(m_view);
ViewportArguments arguments;
- ewk_view_viewport_set(m_view, arguments.width, arguments.height, arguments.initialScale, arguments.minimumScale, arguments.maximumScale, arguments.userScalable);
+ ewk_view_viewport_attributes_set(m_view, arguments);
}
void FrameLoaderClientEfl::dispatchDidFinishDocumentLoad()
@@ -634,7 +632,6 @@ void FrameLoaderClientEfl::dispatchDidFinishDocumentLoad()
void FrameLoaderClientEfl::dispatchDidFirstLayout()
{
- m_initLayoutCompleted = true;
ewk_frame_load_firstlayout_finished(m_frame);
}
@@ -763,7 +760,7 @@ bool FrameLoaderClientEfl::dispatchDidLoadResourceFromMemoryCache(DocumentLoader
return false;
}
-void FrameLoaderClientEfl::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const ScriptString&)
+void FrameLoaderClientEfl::dispatchDidLoadResourceByXMLHttpRequest(unsigned long, const String&)
{
notImplemented();
}
diff --git a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
index 2b4414a..1b880e6 100644
--- a/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
+++ b/WebKit/efl/WebCoreSupport/FrameLoaderClientEfl.h
@@ -55,9 +55,6 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
void setCustomUserAgent(const String &agent);
const String& customUserAgent() const;
- void setInitLayoutCompleted(bool completed) { m_initLayoutCompleted = completed; }
- bool getInitLayoutCompleted() { return m_initLayoutCompleted; }
-
virtual bool hasWebView() const;
virtual bool hasFrameView() const;
@@ -94,7 +91,7 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
virtual void dispatchDidFinishLoading(DocumentLoader*, unsigned long identifier);
virtual void dispatchDidFailLoading(DocumentLoader*, unsigned long identifier, const ResourceError&);
virtual bool dispatchDidLoadResourceFromMemoryCache(DocumentLoader*, const ResourceRequest&, const ResourceResponse&, int length);
- virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const WebCore::ScriptString& sourceString);
+ virtual void dispatchDidLoadResourceByXMLHttpRequest(unsigned long identifier, const String& sourceString);
virtual void dispatchDidHandleOnloadEvents();
virtual void dispatchDidReceiveServerRedirectForProvisionalLoad();
@@ -218,8 +215,6 @@ class FrameLoaderClientEfl : public FrameLoaderClient {
// Plugin view to redirect data to
PluginView* m_pluginView;
bool m_hasSentResponseToPlugin;
-
- bool m_initLayoutCompleted;
};
}
diff --git a/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp b/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp
index 6e5d599..70deaef 100644
--- a/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp
+++ b/WebKit/efl/WebCoreSupport/FullscreenVideoControllerEfl.cpp
@@ -91,6 +91,7 @@ void FullscreenVideoController::exitFullscreen()
bool FullscreenVideoController::canPlay() const
{
notImplemented();
+ return false;
}
void FullscreenVideoController::play()
@@ -178,11 +179,6 @@ void FullscreenVideoController::endSeek()
notImplemented();
}
-static String timeToString(float time)
-{
- notImplemented();
-}
-
bool FullscreenVideoController::updateHudProgressBar()
{
notImplemented();
diff --git a/WebKit/efl/ewk/ewk_main.cpp b/WebKit/efl/ewk/ewk_main.cpp
index 8c27478..26dec81 100644
--- a/WebKit/efl/ewk/ewk_main.cpp
+++ b/WebKit/efl/ewk/ewk_main.cpp
@@ -175,6 +175,7 @@ Eina_Bool _ewk_init_body(void)
WTF::String wkdir = WTF::String(home) + "/.webkit";
ewk_settings_web_database_path_set(wkdir.utf8().data());
+ ewk_settings_icon_database_path_set(wkdir.utf8().data());
WebCore::cacheStorage().setCacheDirectory(wkdir);
diff --git a/WebKit/efl/ewk/ewk_private.h b/WebKit/efl/ewk/ewk_private.h
index eaad13c..e2624a3 100644
--- a/WebKit/efl/ewk/ewk_private.h
+++ b/WebKit/efl/ewk/ewk_private.h
@@ -102,10 +102,12 @@ WTF::PassRefPtr<WebCore::Frame> ewk_view_frame_create(Evas_Object *o, Evas_Objec
WTF::PassRefPtr<WebCore::Widget> ewk_view_plugin_create(Evas_Object* o, Evas_Object* frame, const WebCore::IntSize& pluginSize, WebCore::HTMLPlugInElement* element, const WebCore::KURL& url, const WTF::Vector<WTF::String>& paramNames, const WTF::Vector<WTF::String>& paramValues, const WTF::String& mimeType, bool loadManually);
void ewk_view_popup_new(Evas_Object *o, WebCore::PopupMenuClient* client, int selected, const WebCore::IntRect& rect);
-void ewk_view_viewport_set(Evas_Object *o, float w, float h, float init_scale, float max_scale, float min_scale, float user_scalable);
+void ewk_view_viewport_attributes_set(Evas_Object *o, const WebCore::ViewportArguments& arguments);
void ewk_view_download_request(Evas_Object *o, Ewk_Download *download);
+int ewk_view_dpi_get();
+
Ewk_History *ewk_history_new(WebCore::BackForwardList *history);
void ewk_history_free(Ewk_History *history);
@@ -150,6 +152,10 @@ WTF::PassRefPtr<WebCore::Widget> ewk_frame_plugin_create(Evas_Object* o, const W
Eina_Bool ewk_view_navigation_policy_decision(Evas_Object* o, Ewk_Frame_Resource_Request* request);
+void ewk_view_contents_size_changed(Evas_Object *o, Evas_Coord w, Evas_Coord h);
+
+WebCore::FloatRect ewk_view_page_rect_get(Evas_Object *o);
+
#ifdef __cplusplus
}
diff --git a/WebKit/efl/ewk/ewk_settings.cpp b/WebKit/efl/ewk/ewk_settings.cpp
index 6d2be05..f2651a1 100644
--- a/WebKit/efl/ewk/ewk_settings.cpp
+++ b/WebKit/efl/ewk/ewk_settings.cpp
@@ -44,6 +44,8 @@
#include <libsoup/soup.h>
#endif
+static const char* _ewk_default_web_database_path = 0;
+static const char* _ewk_icon_database_path = 0;
static uint64_t _ewk_default_web_database_quota = 1 * 1024 * 1024;
/**
@@ -69,21 +71,27 @@ void ewk_settings_web_database_path_set(const char *path)
#if ENABLE(DATABASE)
WTF::String corePath = WTF::String::fromUTF8(path);
WebCore::DatabaseTracker::tracker().setDatabaseDirectoryPath(corePath);
+ if (!_ewk_default_web_database_path)
+ _ewk_default_web_database_path = eina_stringshare_add(corePath.utf8().data());
+ else
+ eina_stringshare_replace(&_ewk_default_web_database_path, corePath.utf8().data());
+
#endif
}
/**
* Return directory path where web database is stored.
*
- * @return newly allocated string with database path. Note that return must be
- * freed with free() as it's a strdup()ed copy of the string due reference
- * counting.
+ * @return database path or NULL if none or web database is not supported.
+ * This is guaranteed to be eina_stringshare, so whenever possible
+ * save yourself some cpu cycles and use
+ * eina_stringshare_ref() instead of eina_stringshare_add() or
+ * strdup().
*/
const char *ewk_settings_web_database_path_get()
{
#if ENABLE(DATABASE)
- WTF::String path = WebCore::DatabaseTracker::tracker().databaseDirectoryPath();
- return strdup(path.utf8().data());
+ return _ewk_default_web_database_path;
#else
return 0;
#endif
@@ -122,9 +130,17 @@ Eina_Bool ewk_settings_icon_database_path_set(const char *directory)
WebCore::iconDatabase()->setEnabled(true);
WebCore::iconDatabase()->open(WTF::String::fromUTF8(directory));
+ if (!_ewk_icon_database_path)
+ _ewk_icon_database_path = eina_stringshare_add(directory);
+ else
+ eina_stringshare_replace(&_ewk_icon_database_path, directory);
} else {
WebCore::iconDatabase()->setEnabled(false);
WebCore::iconDatabase()->close();
+ if (_ewk_icon_database_path) {
+ eina_stringshare_del(_ewk_icon_database_path);
+ _ewk_icon_database_path = 0;
+ }
}
return EINA_TRUE;
}
@@ -132,22 +148,20 @@ Eina_Bool ewk_settings_icon_database_path_set(const char *directory)
/**
* Return directory path where icon database is stored.
*
- * @return newly allocated string with database path or @c NULL if
- * none is set or database is closed. Note that return must be
- * freed with free() as it's a strdup()ed copy of the string
- * due reference counting.
+ * @return database path or @c NULL if none is set or database is closed.
+ * This is guaranteed to be eina_stringshare, so whenever possible
+ * save yourself some cpu cycles and use
+ * eina_stringshare_ref() instead of eina_stringshare_add() or
+ * strdup().
*/
-char* ewk_settings_icon_database_path_get(void)
+const char* ewk_settings_icon_database_path_get(void)
{
if (!WebCore::iconDatabase()->isEnabled())
return 0;
if (!WebCore::iconDatabase()->isOpen())
return 0;
- WTF::String path = WebCore::iconDatabase()->databasePath();
- if (path.isEmpty())
- return 0;
- return strdup(path.utf8().data());
+ return _ewk_icon_database_path;
}
/**
diff --git a/WebKit/efl/ewk/ewk_settings.h b/WebKit/efl/ewk/ewk_settings.h
index f2d77f7..3c1668f 100644
--- a/WebKit/efl/ewk/ewk_settings.h
+++ b/WebKit/efl/ewk/ewk_settings.h
@@ -42,7 +42,7 @@ EAPI void ewk_settings_web_database_path_set(const char *path);
EAPI const char *ewk_settings_web_database_path_get();
EAPI Eina_Bool ewk_settings_icon_database_path_set(const char *path);
-EAPI char *ewk_settings_icon_database_path_get(void);
+EAPI const char *ewk_settings_icon_database_path_get(void);
EAPI Eina_Bool ewk_settings_icon_database_clear(void);
EAPI cairo_surface_t *ewk_settings_icon_database_icon_surface_get(const char *url);
diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp
index 19efbfa..f1ca733 100644
--- a/WebKit/efl/ewk/ewk_view.cpp
+++ b/WebKit/efl/ewk/ewk_view.cpp
@@ -22,7 +22,7 @@
#include "config.h"
#include "ewk_view.h"
-#include "appcache/ApplicationCacheStorage.h"
+#include "Chrome.h"
#include "ChromeClientEfl.h"
#include "ContextMenuClientEfl.h"
#include "ContextMenuController.h"
@@ -42,6 +42,7 @@
#include "PlatformMouseEvent.h"
#include "PopupMenuClient.h"
#include "ProgressTracker.h"
+#include "appcache/ApplicationCacheStorage.h"
#include "ewk_private.h"
#include <Ecore.h>
@@ -51,9 +52,15 @@
#include <inttypes.h>
#include <sys/time.h>
+#ifdef HAVE_ECORE_X
+#include <Ecore_X.h>
+#endif
+
#define ZOOM_MIN (0.05)
#define ZOOM_MAX (4.0)
+#define DEVICE_PIXEL_RATIO (1.0)
+
static const char EWK_VIEW_TYPE_STR[] = "EWK_View";
static const size_t EWK_VIEW_REPAINTS_SIZE_INITIAL = 32;
@@ -68,6 +75,7 @@ struct _Ewk_View_Private_Data {
WebCore::Page* page;
WebCore::Settings* page_settings;
WebCore::Frame* main_frame;
+ WebCore::ViewportArguments viewport_arguments;
Ewk_History* history;
struct {
Ewk_Menu menu;
@@ -104,9 +112,11 @@ struct _Ewk_View_Private_Data {
const char* font_sans_serif;
Eina_Bool auto_load_images:1;
Eina_Bool auto_shrink_images:1;
+ Eina_Bool enable_auto_resize_window:1;
Eina_Bool enable_scripts:1;
Eina_Bool enable_plugins:1;
Eina_Bool enable_frame_flattening:1;
+ Eina_Bool encoding_detector:1;
Eina_Bool scripts_window_open:1;
Eina_Bool resizable_textareas:1;
Eina_Bool private_browsing:1;
@@ -116,18 +126,11 @@ struct _Ewk_View_Private_Data {
Eina_Bool offline_app_cache: 1;
Eina_Bool page_cache: 1;
struct {
- float w;
- float h;
- float init_scale;
- float min_scale;
- float max_scale;
- float user_scalable;
- } viewport;
- struct {
float min_scale;
float max_scale;
Eina_Bool user_scalable:1;
} zoom_range;
+ float device_pixel_ratio;
} settings;
struct {
struct {
@@ -569,6 +572,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
priv->page_settings->setLocalStorageEnabled(true);
priv->page_settings->setOfflineWebApplicationCacheEnabled(true);
priv->page_settings->setUsesPageCache(true);
+ priv->page_settings->setUsesEncodingDetector(true);
url = priv->page_settings->userStyleSheetLocation();
priv->settings.user_stylesheet = eina_stringshare_add(url.prettyURL().utf8().data());
@@ -603,6 +607,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
priv->settings.auto_load_images = priv->page_settings->loadsImagesAutomatically();
priv->settings.auto_shrink_images = priv->page_settings->shrinksStandaloneImagesToFit();
+ priv->settings.enable_auto_resize_window = EINA_TRUE;
priv->settings.enable_scripts = priv->page_settings->isJavaScriptEnabled();
priv->settings.enable_plugins = priv->page_settings->arePluginsEnabled();
priv->settings.enable_frame_flattening = priv->page_settings->frameFlatteningEnabled();
@@ -613,6 +618,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
priv->settings.local_storage = priv->page_settings->localStorageEnabled();
priv->settings.offline_app_cache = true; // XXX no function to read setting; this keeps the original setting
priv->settings.page_cache = priv->page_settings->usesPageCache();
+ priv->settings.encoding_detector = priv->page_settings->usesEncodingDetector();
// Since there's no scale separated from zooming in webkit-efl, this functionality of
// viewport meta tag is implemented using zoom. When scale zoom is supported by webkit-efl,
@@ -620,6 +626,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
priv->settings.zoom_range.min_scale = ZOOM_MIN;
priv->settings.zoom_range.max_scale = ZOOM_MAX;
priv->settings.zoom_range.user_scalable = EINA_TRUE;
+ priv->settings.device_pixel_ratio = DEVICE_PIXEL_RATIO;
priv->main_frame = _ewk_view_core_frame_new(sd, priv, 0).get();
if (!priv->main_frame) {
@@ -805,10 +812,6 @@ static void _ewk_view_smart_calculate(Evas_Object* o)
view->resize(w, h);
view->forceLayout();
view->adjustViewSize();
- IntSize size = view->contentsSize();
- if (!sd->api->contents_resize(sd, size.width(), size.height()))
- ERR("failed to resize contents to %dx%d",
- size.width(), size.height());
}
evas_object_resize(sd->main_frame, w, h);
sd->changed.frame_rect = EINA_TRUE;
@@ -967,6 +970,26 @@ static void _ewk_view_zoom_animation_start(Ewk_View_Smart_Data* sd)
(_ewk_view_zoom_animator_cb, sd);
}
+static WebCore::ViewportAttributes _ewk_view_viewport_attributes_compute(Evas_Object* o)
+{
+ EWK_VIEW_SD_GET(o, sd);
+ EWK_VIEW_PRIV_GET(sd, priv);
+
+ int desktop_width = 980;
+ int device_dpi = 160;
+
+ int available_width = (int) priv->page->chrome()->client()->pageRect().width();
+ int available_height = (int) priv->page->chrome()->client()->pageRect().height();
+
+ int device_width = (int) priv->page->chrome()->client()->windowRect().width();
+ int device_height = (int) priv->page->chrome()->client()->windowRect().height();
+
+ IntSize available_size = IntSize(available_width, available_height);
+ WebCore::ViewportAttributes attributes = WebCore::computeViewportAttributes(priv->viewport_arguments, desktop_width, device_width, device_height, device_dpi, available_size);
+
+ return attributes;
+}
+
/**
* Sets the smart class api without any backing store, enabling view
* to be inherited.
@@ -1052,10 +1075,6 @@ void ewk_view_fixed_layout_size_set(Evas_Object* o, Evas_Coord w, Evas_Coord h)
EWK_VIEW_SD_GET_OR_RETURN(o, sd);
EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv);
- WebCore::FrameLoaderClientEfl* client = static_cast<WebCore::FrameLoaderClientEfl*>(priv->main_frame->loader()->client());
- if (!client->getInitLayoutCompleted())
- return;
-
WebCore::FrameView* view = sd->_priv->main_frame->view();
if (w <= 0 && h <= 0) {
if (!priv->fixed_layout.use)
@@ -2282,6 +2301,39 @@ Eina_Bool ewk_view_setting_auto_shrink_images_set(Evas_Object* o, Eina_Bool auto
return EINA_TRUE;
}
+/**
+ * Gets if view can be resized automatically.
+ *
+ * @param o view to check status
+ *
+ * @return EINA_TRUE if view can be resized, EINA_FALSE
+ * otherwise (errors, cannot be resized).
+ */
+Eina_Bool ewk_view_setting_enable_auto_resize_window_get(const Evas_Object* o)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ return priv->settings.enable_auto_resize_window;
+}
+
+/**
+ * Sets if view can be resized automatically.
+ *
+ * @param o View.
+ * @param resizable @c EINA_TRUE if we want to resize automatically;
+ * @c EINA_FALSE otherwise. It defaults to @c EINA_TRUE
+ *
+ * @return EINA_TRUE if auto_resize_window status set, EINA_FALSE
+ * otherwise (errors).
+ */
+Eina_Bool ewk_view_setting_enable_auto_resize_window_set(Evas_Object* o, Eina_Bool resizable)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ priv->settings.enable_auto_resize_window = resizable;
+ return EINA_TRUE;
+}
+
Eina_Bool ewk_view_setting_enable_scripts_get(const Evas_Object* o)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
@@ -2512,6 +2564,37 @@ Eina_Bool ewk_view_setting_encoding_default_set(Evas_Object* o, const char* enco
return EINA_TRUE;
}
+/**
+ * Sets the encoding detector.
+ *
+ * @param o view object to set if encoding detector is enabled.
+ * @return @c EINA_TRUE on success and @c EINA_FALSE on failure
+ */
+Eina_Bool ewk_view_setting_encoding_detector_set(Evas_Object* o, Eina_Bool enable)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ enable = !!enable;
+ if (priv->settings.encoding_detector != enable) {
+ priv->page_settings->setUsesEncodingDetector(enable);
+ priv->settings.encoding_detector = enable;
+ }
+ return EINA_TRUE;
+}
+
+/**
+ * Gets if the encoding detector is enabled.
+ *
+ * @param o view object to get if encoding detector is enabled.
+ * @return @c EINA_TRUE if encoding detector is enabled, @c EINA_FALSE if not or on errors.
+ */
+Eina_Bool ewk_view_setting_encoding_detector_get(Evas_Object* o)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ return priv->settings.encoding_detector;
+}
+
const char* ewk_view_setting_cache_directory_get(const Evas_Object* o)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, 0);
@@ -2730,8 +2813,8 @@ Eina_Bool ewk_view_setting_spatial_navigation_set(Evas_Object* o, Eina_Bool enab
/**
* Gets if the local storage is enabled.
*
- * @param o view object to set if local storage is enabled.
- * @return @c EINA_TRUE if local storage is enabled, @c EINA_FALSE if not.
+ * @param o view object to get if local storage is enabled.
+ * @return @c EINA_TRUE if local storage is enabled, @c EINA_FALSE if not or on errors.
*/
Eina_Bool ewk_view_setting_local_storage_get(Evas_Object* o)
{
@@ -4053,33 +4136,21 @@ void ewk_view_download_request(Evas_Object* o, Ewk_Download* download)
* @internal
* Reports the viewport has changed.
*
- * @param o view.
- * @param w width.
- * @param h height.
- * @param init_scale initialScale value.
- * @param max_scale maximumScale value.
- * @param min_scale minimumScale value.
- * @param user_scalable userscalable flag.
+ * @param arguments viewport argument.
*
* Emits signal: "viewport,changed" with no parameters.
*/
-void ewk_view_viewport_set(Evas_Object *o, float w, float h, float init_scale, float max_scale, float min_scale, float user_scalable)
+void ewk_view_viewport_attributes_set(Evas_Object *o, const WebCore::ViewportArguments& arguments)
{
EWK_VIEW_SD_GET(o, sd);
EWK_VIEW_PRIV_GET(sd, priv);
-
- priv->settings.viewport.w = w;
- priv->settings.viewport.h = h;
- priv->settings.viewport.init_scale = init_scale;
- priv->settings.viewport.min_scale = min_scale;
- priv->settings.viewport.max_scale = max_scale;
- priv->settings.viewport.user_scalable = user_scalable;
-
+
+ priv->viewport_arguments = arguments;
evas_object_smart_callback_call(o, "viewport,changed", 0);
}
/**
- * Gets data of viewport meta tag.
+ * Gets attributes of viewport meta tag.
*
* @param o view.
* @param w width.
@@ -4087,25 +4158,27 @@ void ewk_view_viewport_set(Evas_Object *o, float w, float h, float init_scale, f
* @param init_scale initial Scale value.
* @param max_scale maximum Scale value.
* @param min_scale minimum Scale value.
+ * @param device_pixel_ratio value.
* @param user_scalable user Scalable value.
*/
-void ewk_view_viewport_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* user_scalable)
+void ewk_view_viewport_attributes_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* device_pixel_ratio, Eina_Bool* user_scalable)
{
- EWK_VIEW_SD_GET(o, sd);
- EWK_VIEW_PRIV_GET(sd, priv);
+ WebCore::ViewportAttributes attributes = _ewk_view_viewport_attributes_compute(o);
if (w)
- *w = priv->settings.viewport.w;
+ *w = attributes.layoutSize.width();
if (h)
- *h = priv->settings.viewport.h;
+ *h = attributes.layoutSize.height();
if (init_scale)
- *init_scale = priv->settings.viewport.init_scale;
+ *init_scale = attributes.initialScale;
if (max_scale)
- *max_scale = priv->settings.viewport.max_scale;
+ *max_scale = attributes.maximumScale;
if (min_scale)
- *min_scale = priv->settings.viewport.min_scale;
+ *min_scale = attributes.minimumScale;
+ if (device_pixel_ratio)
+ *device_pixel_ratio = attributes.devicePixelRatio;
if (user_scalable)
- *user_scalable = priv->settings.viewport.user_scalable;
+ *user_scalable = attributes.userScalable;
}
/**
@@ -4195,6 +4268,22 @@ Eina_Bool ewk_view_user_scalable_get(Evas_Object* o)
}
/**
+ * Gets device pixel ratio value.
+ *
+ * @param o view.
+ * @param user_scalable where to return the current user scalable value.
+ *
+ * @return @c EINA_TRUE if zoom is enabled, @c EINA_FALSE if not.
+ */
+float ewk_view_device_pixel_ratio_get(Evas_Object* o)
+{
+ EWK_VIEW_SD_GET(o, sd);
+ EWK_VIEW_PRIV_GET(sd, priv);
+
+ return priv->settings.device_pixel_ratio;
+}
+
+/**
* @internal
* Reports a requeset will be loaded. It's client responsibility to decide if
* request would be used. If @return is true, loader will try to load. Else,
@@ -4213,3 +4302,54 @@ Eina_Bool ewk_view_navigation_policy_decision(Evas_Object* o, Ewk_Frame_Resource
return sd->api->navigation_policy_decision(sd, request);
}
+
+/**
+ * @internal
+ * Reports that the contents have resized. The ewk_view calls contents_resize,
+ * which can be reimplemented as needed.
+ *
+ * @param o view.
+ * @param w new content width.
+ * @param h new content height.
+ */
+void ewk_view_contents_size_changed(Evas_Object *o, int w, int h)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd);
+ EINA_SAFETY_ON_NULL_RETURN(sd->api);
+ EINA_SAFETY_ON_NULL_RETURN(sd->api->contents_resize);
+
+ if (!sd->api->contents_resize(sd, w, h))
+ ERR("failed to resize contents to %dx%d", w, h);
+}
+
+/**
+ * @internal
+ * Gets page size from frameview.
+ *
+ * @param o view.
+ *
+ * @return page size.
+ */
+WebCore::FloatRect ewk_view_page_rect_get(Evas_Object *o)
+{
+ EWK_VIEW_SD_GET(o, sd);
+ EWK_VIEW_PRIV_GET(sd, priv);
+
+ WebCore::Frame* main_frame = priv->page->mainFrame();
+ return main_frame->view()->frameRect();
+}
+
+/**
+ * @internal
+ * Gets dpi value.
+ *
+ * @return device's dpi value.
+ */
+int ewk_view_dpi_get()
+{
+#ifdef HAVE_ECORE_X
+ return ecore_x_dpi_get();
+#else
+ return 160;
+#endif
+}
diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h
index 26bf97c..1c4de34 100644
--- a/WebKit/efl/ewk/ewk_view.h
+++ b/WebKit/efl/ewk/ewk_view.h
@@ -384,6 +384,8 @@ EAPI Eina_Bool ewk_view_setting_auto_load_images_set(Evas_Object *o, Eina_Boo
EAPI Eina_Bool ewk_view_setting_auto_shrink_images_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_auto_shrink_images_set(Evas_Object *o, Eina_Bool automatic);
+EAPI Eina_Bool ewk_view_setting_enable_auto_resize_window_get(const Evas_Object *o);
+EAPI Eina_Bool ewk_view_setting_enable_auto_resize_window_set(Evas_Object *o, Eina_Bool resizable);
EAPI Eina_Bool ewk_view_setting_enable_scripts_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_enable_scripts_set(Evas_Object *o, Eina_Bool enable);
@@ -455,6 +457,9 @@ EAPI Eina_Bool ewk_view_setting_local_storage_database_path_set(Evas_Object *
EAPI Eina_Bool ewk_view_setting_page_cache_get(Evas_Object* o);
EAPI Eina_Bool ewk_view_setting_page_cache_set(Evas_Object* o, Eina_Bool enable);
+EAPI Eina_Bool ewk_view_setting_encoding_detector_get(Evas_Object* o);
+EAPI Eina_Bool ewk_view_setting_encoding_detector_set(Evas_Object* o, Eina_Bool enable);
+
/* to be used by subclass implementations */
EAPI Ewk_View_Smart_Data *ewk_view_smart_data_get(const Evas_Object *o);
@@ -489,12 +494,13 @@ EAPI void ewk_view_paint_context_translate(Ewk_View_Paint_Context *ctxt, float x
EAPI Eina_Bool ewk_view_paint(Ewk_View_Private_Data *priv, cairo_t *cr, const Eina_Rectangle *area);
EAPI Eina_Bool ewk_view_paint_contents(Ewk_View_Private_Data *priv, cairo_t *cr, const Eina_Rectangle *area);
-EAPI void ewk_view_viewport_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* user_scalable);
+EAPI void ewk_view_viewport_attributes_get(Evas_Object *o, float* w, float* h, float* init_scale, float* max_scale, float* min_scale, float* device_pixel_ratio , Eina_Bool* user_scalable);
EAPI Eina_Bool ewk_view_zoom_range_set(Evas_Object* o, float min_scale, float max_scale);
EAPI float ewk_view_zoom_range_min_get(Evas_Object* o);
EAPI float ewk_view_zoom_range_max_get(Evas_Object* o);
EAPI void ewk_view_user_scalable_set(Evas_Object* o, Eina_Bool user_scalable);
EAPI Eina_Bool ewk_view_user_scalable_get(Evas_Object* o);
+EAPI float ewk_view_device_pixel_ratio_get(Evas_Object* o);
#ifdef __cplusplus
}
diff --git a/WebKit/efl/ewk/ewk_view_single.c b/WebKit/efl/ewk/ewk_view_single.c
index 803b219..85e5339 100644
--- a/WebKit/efl/ewk/ewk_view_single.c
+++ b/WebKit/efl/ewk/ewk_view_single.c
@@ -348,6 +348,8 @@ static Eina_Bool _ewk_view_single_smart_scrolls_process(Ewk_View_Smart_Data *sd)
for (; sr < sr_end; sr++)
_ewk_view_single_scroll_process_single(sd, pixels, ow, oh, sr);
+ evas_object_image_data_set(sd->backing_store, pixels);
+
return EINA_TRUE;
}
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index c602ac1..cde04c9 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,303 @@
+2010-10-20 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] use gtk_widget_hide instead of gtk_widget_hide_all in the fullscreen video conroller
+ https://bugs.webkit.org/show_bug.cgi?id=47972
+
+ * WebCoreSupport/FullscreenVideoController.cpp:
+ (FullscreenVideoController::hideHud):
+ (FullscreenVideoController::exitFullscreen):
+
+2010-10-19 Joone Hur <joone@kldp.org>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Needs fixing mistyped comments in the API documentation
+ https://bugs.webkit.org/show_bug.cgi?id=47656
+
+ Fixed mistyped comments in the API documenentation.
+
+ * webkit/webkitwebsettings.cpp: Fixed a mistyped comment in the the section block.
+ * webkit/webkitwebwindowfeatures.cpp: Fixed a mistyped comment in the section block.
+
+2010-10-18 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ * NEWS: update for 1.3.5 release.
+ * docs/webkitgtk-sections.txt: add new APIs.
+
+2010-10-18 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ Web Inspector: [crash] when Inspector Open in CSSStyleSelector::loadPendingImages().
+ https://bugs.webkit.org/show_bug.cgi?id=46224
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::InspectorClient::sendMessageToFrontend):
+
+2010-10-14 Antonio Gomes <agomes@rim.com>
+
+ Reviewed by Martin Robinson and Xan Lopez.
+
+ [Gtk]: DRT does not support frame flattening testing
+ https://bugs.webkit.org/show_bug.cgi?id=38650
+
+ Implement enable-frame-flattening API for Gtk+.
+
+ * webkit/webkitwebsettings.cpp:
+ (webkit_web_settings_class_init):
+ (webkit_web_settings_set_property):
+ (webkit_web_settings_get_property):
+ (webkit_web_settings_copy):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_update_settings):
+ (webkit_web_view_settings_notify):
+
+2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Replace some String::format() usages by StringConcatenate in WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=47714
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::dispatchDidFailLoad):
+ * webkit/webkitwebsettings.cpp:
+ (webkitOSVersion):
+ (webkitUserAgent):
+
+2010-10-14 Joone Hur <joone@kldp.org>
+
+ Reviewed by Andreas Kling.
+
+ [GTK] google.co.kr was missed when checking Google domains
+ https://bugs.webkit.org/show_bug.cgi?id=47652
+
+ WebKitGtk+ maintains a list of Google domains for working well with Google sites.
+ Add google.co.kr also to the list to be checked with other Google domains.
+
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::initializeDomainsList): Added google.co.kr.
+
+2010-10-13 Sergio Villar Senin <svillar@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ WebKitGtk+ to use the new API from the imported SoupURILoader code
+
+ [GTK] Add HTTP caching support
+ https://bugs.webkit.org/show_bug.cgi?id=44261
+
+ ResourceHandleInternal m_msg is now called m_soupMessage.
+
+ * webkit/webkitdownload.cpp:
+ (webkit_download_new_with_handle):
+ (webkit_download_start):
+
+2010-10-13 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Gustavo Noronha.
+
+ [GTK] Remove more warnings from the g-i scanner run
+ https://bugs.webkit.org/show_bug.cgi?id=47255
+
+ Fixes almost all warnings coming from the g-i scanner.
+
+ * webkit/webkitsecurityorigin.cpp: Rename parameter names in
+ gtk-doc blurb to the actual name of the parameter.
+ * webkit/webkitsoupauthdialog.c: ditto.
+ (webkit_soup_auth_dialog_class_init): Write missing doc for the
+ 'current-toplevel' signal.
+ * webkit/webkitsoupauthdialog.h: Rename signal parameter to its
+ actual name.
+ * webkit/webkitwebdatabase.cpp: Rename parameter names in
+ gtk-doc blurb to the actual name of the parameter.
+ * webkit/webkitwebinspector.cpp: ditto.
+ (webkit_web_inspector_class_init): ditto.
+ * webkit/webkitwebview.cpp: ditto.
+ (webkit_web_view_class_init): ditto.
+ * webkit/webkitwebview.h: Rename the parameter names to be in sync
+ with the ones we use in the function definition.
+
+2010-10-12 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r69589.
+ http://trac.webkit.org/changeset/69589
+ https://bugs.webkit.org/show_bug.cgi?id=47547
+
+ Wrong patch landed from a bug with two patches (Requested by
+ mrobinson on #webkit).
+
+ * webkit/webkitdownload.cpp:
+ (webkit_download_new_with_handle):
+ (webkit_download_start):
+
+2010-10-12 Sergio Villar Senin <svillar@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ [GTK] Add HTTP caching support
+ https://bugs.webkit.org/show_bug.cgi?id=44261
+
+ ResourceHandle's m_msg renamed to m_soupMsg and it's also now a PlatformRefPtr
+
+ * webkit/webkitdownload.cpp:
+ (webkit_download_new_with_handle):
+ (webkit_download_start):
+
+2010-10-09 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Removed unused callback in webkitwebview
+ https://bugs.webkit.org/show_bug.cgi?id=47092
+
+ In webkit_web_view_forward_context_menu_event() a callback is
+ connected for the destroy signal of the popup menu, however we
+ reuse the same menu always, holding a ref to it, so it's not
+ destroyed when withdrawn by the user.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_forward_context_menu_event):
+
+2010-10-08 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Remove duplicate code in WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=47367
+
+ Remove as much duplicate code as possible from DragClientGtk. Most of this code
+ is GTK2/GTK3 independent, so only the bits that aren't should be protected by
+ #ifdefs.
+
+ * WebCoreSupport/DragClientGtk.cpp:
+ (WebKit::dragIconWindowDrawEventCallback): Modified the name of this callback
+ so that it is shared between build types.
+ (WebKit::DragClient::DragClient): Updated the signal connectors to reflect the change above.
+ (WebKit::DragClient::~DragClient): The build types share the callback name, so remove
+ the #ifdef here.
+ (WebKit::DragClient::drawDragIconWindow): Changed the name of this method and make it
+ independent of the build type.
+ * WebCoreSupport/DragClientGtk.h: Update method declaration and remove #ifdefs.
+
+2010-10-07 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Use draw instead of expose_event in WebView when building with gtk3
+ https://bugs.webkit.org/show_bug.cgi?id=47338
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_expose_event):
+ (webkit_web_view_draw):
+ (webkit_web_view_class_init):
+
+2010-10-07 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Don't use GtkObject
+ https://bugs.webkit.org/show_bug.cgi?id=47090
+
+ GtkObject has been removed in gtk3.
+
+ * WebCoreSupport/EditorClientGtk.cpp:
+ (WebKit::EditorClient::generateEditorCommands):
+ * WebCoreSupport/FullscreenVideoController.cpp:
+ (FullscreenVideoController::createHud):
+
+2010-10-07 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Fix the build for GTK+ 3
+ https://bugs.webkit.org/show_bug.cgi?id=47249
+
+ Use GdkVisual instead of GdkColormap. GdkColormap has been removed
+ in gtk3
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_realize):
+
+2010-10-07 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Fix the build for GTK+ 3
+ https://bugs.webkit.org/show_bug.cgi?id=47249
+
+ Do not use GdkDrawable deprecated API. Some methods of GdkDrawable
+ are deprecated in gtk2 and have been removed in gtk3. Equivalent
+ API has been added to GdkWindow.
+
+ * tests/testcopyandpaste.c:
+ (runPasteTestCallback):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_button_press_event):
+
+2010-10-07 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Use draw signal instead of expose_event in DragClientGtk when building with gtk3
+ https://bugs.webkit.org/show_bug.cgi?id=47326
+
+ * WebCoreSupport/DragClientGtk.cpp:
+ (WebKit::dragIconWindowDrawCallback):
+ (WebKit::DragClient::DragClient):
+ (WebKit::DragClient::~DragClient):
+ (WebKit::DragClient::startDrag):
+ (WebKit::DragClient::dragIconWindowDraw):
+ * WebCoreSupport/DragClientGtk.h:
+
+2010-10-07 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] Fix the build for GTK+ 3
+ https://bugs.webkit.org/show_bug.cgi?id=47249
+
+ Don't use gtk_size_request_get_size(). It has been removed,
+ gtk_widget_get_preferred_size() should be used instead
+
+ * webkit/webkitwebview.cpp:
+ (PopupMenuPositionFunc):
+
+2010-10-06 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r69201.
+ http://trac.webkit.org/changeset/69201
+ https://bugs.webkit.org/show_bug.cgi?id=47279
+
+ This change broke the WebKitGTK+ build for GTK+ 2.0.
+ (Requested by mrobinson on #webkit).
+
+ * tests/testcopyandpaste.c:
+ (runPasteTestCallback):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_button_press_event):
+
+2010-10-06 Carlos Garcia Campos <cgarcia@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ Port to gtk+3 (2.91.0)
+ https://bugs.webkit.org/show_bug.cgi?id=47249
+
+ Do not use GdkDrawable deprecated API
+
+ Some methods of GdkDrawable are deprecated in gtk2 and have been
+ remmoved in gtk3. Equivalent API has been added to GdkWindow.
+
+ * tests/testcopyandpaste.c:
+ (runPasteTestCallback):
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_button_press_event):
+
2010-09-28 Jenn Braithwaite <jennb@chromium.org>
Reviewed by Dmitry Titov.
diff --git a/WebKit/gtk/NEWS b/WebKit/gtk/NEWS
index ebeb699..ed4cd81 100644
--- a/WebKit/gtk/NEWS
+++ b/WebKit/gtk/NEWS
@@ -1,4 +1,18 @@
================
+WebKitGTK+ 1.3.5
+================
+
+What's new in WebKitGTK+ 1.3.5?
+
+ - Add a HTTP cache implementation. This will be eventually
+ integrated in libsoup itself, but for now it can be accessed from
+ WebKit through the WebKitSoupCache APIs.
+ - Updated to work with GTK+ 3.x 2.91.1.
+ - Add frame-flattening support, used by some mobile browser sto
+ merge all frames in a page into a continuous view.
+ - Many other bugfixes.
+
+================
WebKitGTK+ 1.3.4
================
diff --git a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
index cc75d36..b850cec 100644
--- a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (C) Igalia S.L.
+ * Copyright (C) 2009, 2010 Igalia S.L.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -41,23 +41,38 @@ using namespace WebCore;
namespace WebKit {
-static gboolean dragIconWindowExposeEventCallback(GtkWidget* widget, GdkEventExpose* event, DragClient* client)
+#ifdef GTK_API_VERSION_2
+static gboolean dragIconWindowDrawEventCallback(GtkWidget* widget, GdkEventExpose* event, DragClient* client)
{
- client->dragIconWindowExposeEvent(widget, event);
+ PlatformRefPtr<cairo_t> context = adoptPlatformRef(gdk_cairo_create(event->window));
+ client->drawDragIconWindow(widget, context.get());
return TRUE;
}
+#else
+static gboolean dragIconWindowDrawEventCallback(GtkWidget* widget, cairo_t* context, DragClient* client)
+{
+ if (!gdk_cairo_get_clip_rectangle(context, 0))
+ return FALSE;
+ client->drawDragIconWindow(widget, context);
+ return TRUE;
+}
+#endif // GTK_API_VERSION_2
DragClient::DragClient(WebKitWebView* webView)
: m_webView(webView)
, m_startPos(0, 0)
, m_dragIconWindow(gtk_window_new(GTK_WINDOW_POPUP))
{
- g_signal_connect(m_dragIconWindow.get(), "expose-event", G_CALLBACK(dragIconWindowExposeEventCallback), this);
+#ifdef GTK_API_VERSION_2
+ g_signal_connect(m_dragIconWindow.get(), "expose-event", G_CALLBACK(dragIconWindowDrawEventCallback), this);
+#else
+ g_signal_connect(m_dragIconWindow.get(), "draw", G_CALLBACK(dragIconWindowDrawEventCallback), this);
+#endif
}
DragClient::~DragClient()
{
- g_signal_handlers_disconnect_by_func(m_dragIconWindow.get(), (gpointer) dragIconWindowExposeEventCallback, this);
+ g_signal_handlers_disconnect_by_func(m_dragIconWindow.get(), (gpointer) dragIconWindowDrawEventCallback, this);
}
void DragClient::willPerformDragDestinationAction(DragDestinationAction, DragData*)
@@ -106,9 +121,16 @@ void DragClient::startDrag(DragImageRef image, const IntPoint& dragImageOrigin,
if (!gtk_widget_get_realized(m_dragIconWindow.get())) {
GdkScreen* screen = gtk_widget_get_screen(m_dragIconWindow.get());
+#ifdef GTK_API_VERSION_2
GdkColormap* rgba = gdk_screen_get_rgba_colormap(screen);
if (rgba)
gtk_widget_set_colormap(m_dragIconWindow.get(), rgba);
+#else
+ GdkVisual* visual = gdk_screen_get_rgba_visual(screen);
+ if (!visual)
+ visual = gdk_screen_get_system_visual(screen);
+ gtk_widget_set_visual(m_dragIconWindow.get(), visual);
+#endif // GTK_API_VERSION_2
}
IntSize origin = eventPos - dragImageOrigin;
@@ -118,15 +140,14 @@ void DragClient::startDrag(DragImageRef image, const IntPoint& dragImageOrigin,
gtk_drag_set_icon_default(context);
}
-void DragClient::dragIconWindowExposeEvent(GtkWidget* widget, GdkEventExpose* event)
+void DragClient::drawDragIconWindow(GtkWidget* widget, cairo_t* context)
{
- PlatformRefPtr<cairo_t> context = adoptPlatformRef(gdk_cairo_create(event->window));
- cairo_rectangle(context.get(), 0, 0,
+ cairo_rectangle(context, 0, 0,
cairo_image_surface_get_width(m_dragImage.get()),
cairo_image_surface_get_height(m_dragImage.get()));
- cairo_set_operator(context.get(), CAIRO_OPERATOR_SOURCE);
- cairo_set_source_surface(context.get(), m_dragImage.get(), 0, 0);
- cairo_fill(context.get());
+ cairo_set_operator(context, CAIRO_OPERATOR_SOURCE);
+ cairo_set_source_surface(context, m_dragImage.get(), 0, 0);
+ cairo_fill(context);
}
DragImageRef DragClient::createDragImageForLink(KURL&, const String&, Frame*)
diff --git a/WebKit/gtk/WebCoreSupport/DragClientGtk.h b/WebKit/gtk/WebCoreSupport/DragClientGtk.h
index 2ab7e2d..0d07c88 100644
--- a/WebKit/gtk/WebCoreSupport/DragClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/DragClientGtk.h
@@ -54,7 +54,7 @@ namespace WebKit {
virtual void dragControllerDestroyed();
- void dragIconWindowExposeEvent(GtkWidget*, GdkEventExpose*);
+ void drawDragIconWindow(GtkWidget*, cairo_t*);
private:
WebKitWebView* m_webView;
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
index d4e70b6..749efe9 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.cpp
@@ -557,7 +557,11 @@ void EditorClient::generateEditorCommands(const KeyboardEvent* event)
m_pendingEditorCommands.clear();
// First try to interpret the command as a native GTK+ key binding.
+#ifdef GTK_API_VERSION_2
gtk_bindings_activate_event(GTK_OBJECT(m_nativeWidget.get()), event->keyEvent()->gdkEventKey());
+#else
+ gtk_bindings_activate_event(G_OBJECT(m_nativeWidget.get()), event->keyEvent()->gdkEventKey());
+#endif
if (m_pendingEditorCommands.size() > 0)
return;
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index 13401f5..fa17632 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -50,7 +50,6 @@
#include "MouseEvent.h"
#include "NotImplemented.h"
#include "Page.h"
-#include "PlatformString.h"
#include "PluginDatabase.h"
#include "RenderPart.h"
#include "ResourceHandle.h"
@@ -67,6 +66,7 @@
#include "webkitwebpolicydecision.h"
#include "webkitwebview.h"
#include <wtf/text/CString.h>
+#include <wtf/text/StringConcatenate.h>
#include <JavaScriptCore/APICast.h>
#include <gio/gio.h>
@@ -116,6 +116,7 @@ static void initializeDomainsList(HashSet<String>& googleDomains)
googleDomains.add("cl");
googleDomains.add("com.br");
googleDomains.add("co.uk");
+ googleDomains.add("co.kr");
googleDomains.add("co.jp");
googleDomains.add("de");
googleDomains.add("dj");
@@ -1119,13 +1120,13 @@ void FrameLoaderClient::dispatchDidFailLoad(const ResourceError& error)
g_free(errorURI);
if (!errorFile)
- content = String::format("<html><body>%s</body></html>", webError->message);
+ content = makeString("<html><body>", webError->message, "</body></html>");
else {
gboolean loaded = g_file_load_contents(errorFile, 0, &fileContent, 0, 0, 0);
if (!loaded)
- content = String::format("<html><body>%s</body></html>", webError->message);
+ content = makeString("<html><body>", webError->message, "</body></html>");
else
- content = String::format(fileContent, error.failingURL().utf8().data(), webError->message);
+ content = makeString(fileContent, error.failingURL(), webError->message);
}
webkit_web_frame_load_alternate_string(m_frame, content.utf8().data(), 0, error.failingURL().utf8().data());
diff --git a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
index 01bc03a..158a3b8 100644
--- a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
+++ b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
@@ -213,7 +213,7 @@ void FullscreenVideoController::hideHud()
GdkCursor* cursor = blankCursor();
gdk_window_set_cursor(window, cursor);
- gtk_widget_hide_all(m_hudWindow);
+ gtk_widget_hide(m_hudWindow);
if (m_progressBarUpdateId) {
g_source_remove(m_progressBarUpdateId);
@@ -350,7 +350,7 @@ void FullscreenVideoController::exitFullscreen()
if (m_mediaElement->platformMedia().type == WebCore::PlatformMedia::GStreamerGWorldType)
m_mediaElement->platformMedia().media.gstreamerGWorld->exitFullscreen();
- gtk_widget_hide_all(m_window);
+ gtk_widget_hide(m_window);
gtk_widget_destroy(m_hudWindow);
m_hudWindow = 0;
@@ -541,8 +541,8 @@ void FullscreenVideoController::createHud()
GtkWidget* label = gtk_label_new(_("Time:"));
gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0);
- GtkObject* adjustment = gtk_adjustment_new(0.0, 0.0, 100.0, 0.1, 1.0, 1.0);
- m_timeHScale = gtk_hscale_new(GTK_ADJUSTMENT(adjustment));
+ GtkAdjustment* adjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0.0, 0.0, 100.0, 0.1, 1.0, 1.0));
+ m_timeHScale = gtk_hscale_new(adjustment);
gtk_scale_set_draw_value(GTK_SCALE(m_timeHScale), FALSE);
gtk_range_set_show_fill_level(GTK_RANGE(m_timeHScale), TRUE);
gtk_range_set_update_policy(GTK_RANGE(m_timeHScale), GTK_UPDATE_CONTINUOUS);
diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
index c8b42d7..2c1ffab 100644
--- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
@@ -222,22 +222,7 @@ void InspectorClient::storeSetting(const String&, const String&)
bool InspectorClient::sendMessageToFrontend(const String& message)
{
- if (!m_frontendPage)
- return false;
-
- Frame* frame = m_frontendPage->mainFrame();
- if (!frame)
- return false;
-
- ScriptController* scriptController = frame->script();
- if (!scriptController)
- return false;
-
- String dispatchToFrontend("WebInspector.dispatchMessageFromBackend(");
- dispatchToFrontend += message;
- dispatchToFrontend += ");";
- scriptController->executeScript(dispatchToFrontend);
- return true;
+ return doDispatchMessageOnFrontendPage(m_frontendPage, message);
}
const char* InspectorClient::inspectorFilesPath()
diff --git a/WebKit/gtk/docs/webkitgtk-sections.txt b/WebKit/gtk/docs/webkitgtk-sections.txt
index 35f9b40..0b185a0 100644
--- a/WebKit/gtk/docs/webkitgtk-sections.txt
+++ b/WebKit/gtk/docs/webkitgtk-sections.txt
@@ -573,6 +573,30 @@ WebKitWebResourceClass
</SECTION>
<SECTION>
+<FILE>soup-cache</FILE>
+<TITLE>WebKitSoupCache</TITLE>
+webkit_soup_cache_new
+webkit_soup_cache_flush
+webkit_soup_cache_clear
+webkit_soup_cache_dump
+webkit_soup_cache_load
+webkit_soup_cache_set_max_size
+webkit_soup_cache_get_max_size
+<SUBSECTION Standard>
+WEBKIT_IS_SOUP_CACHE
+WEBKIT_IS_SOUP_CACHE_CLASS
+WEBKIT_TYPE_SOUP_CACHE
+WEBKIT_SOUP_CACHE
+WEBKIT_SOUP_CACHE_CLASS
+WEBKIT_SOUP_CACHE_GET_CLASS
+<SUBSECTION Private>
+webkit_soup_cache_get_type
+WebKitSoupCachePrivate
+WebKitSoupCache
+WebKitSoupCacheClass
+</SECTION>
+
+<SECTION>
<FILE>webkitprivate</FILE>
getViewFromFrame
kit
diff --git a/WebKit/gtk/po/ChangeLog b/WebKit/gtk/po/ChangeLog
index 19e86ae..29bef79 100644
--- a/WebKit/gtk/po/ChangeLog
+++ b/WebKit/gtk/po/ChangeLog
@@ -1,3 +1,22 @@
+2010-09-29 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Martin Robinson.
+
+ Avoid touching the po files automatically during the build
+ process. The maintainers still have the option of forcing an
+ update with make update-po.
+
+ * GNUmakefile.am:
+
+2010-09-29 Miloš Popović <gpopac@gmail.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Serbian translations update.
+
+ * sr.po:
+ * sr@latin.po:
+
2010-09-29 Reinout van Schouwen <reinouts@gnome.org>
Reviewed by Gustavo Noronha.
diff --git a/WebKit/gtk/po/GNUmakefile.am b/WebKit/gtk/po/GNUmakefile.am
index 2c5ff94..4314573 100644
--- a/WebKit/gtk/po/GNUmakefile.am
+++ b/WebKit/gtk/po/GNUmakefile.am
@@ -95,19 +95,22 @@ $(srcdir)/WebKit/gtk/po/$(DOMAIN).pot:
# This target rebuilds a PO file if $(DOMAIN).pot has changed.
# Note that a PO file is not touched if it doesn't need to be changed.
-$(POFILES): $(srcdir)/WebKit/gtk/po/$(DOMAIN).pot
- @lang=`echo $@ | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
- if test -f "$(srcdir)/WebKit/gtk/po/$${lang}.po"; then \
- test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir)/WebKit/gtk/po && "; \
- echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
- cd $(srcdir)/WebKit/gtk/po && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
- else \
- $(MAKE) $${lang}.po-create; \
- fi
+update-po-files: $(srcdir)/WebKit/gtk/po/$(DOMAIN).pot
+ @for pofile in $(POFILES); do \
+ lang=`echo $$pofile | sed -e 's,.*/,,' -e 's/\.po$$//'`; \
+ if test -f "$(srcdir)/WebKit/gtk/po/$${lang}.po"; then \
+ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir)/WebKit/gtk/po && "; \
+ echo "$${cdcmd}$(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot"; \
+ pushd $(srcdir)/WebKit/gtk/po && $(MSGMERGE_UPDATE) $${lang}.po $(DOMAIN).pot; \
+ popd; \
+ else \
+ $(MAKE) $${lang}.po-create; \
+ fi; \
+ done
update-po: GNUmakefile
$(MAKE) $(DOMAIN).pot-update
- $(MAKE) $(POFILES)
+ $(MAKE) update-po-files
$(MAKE) $(MOFILES)
.nop.po-create:
diff --git a/WebKit/gtk/po/sr.po b/WebKit/gtk/po/sr.po
index b4d3d55..b132c8d 100644
--- a/WebKit/gtk/po/sr.po
+++ b/WebKit/gtk/po/sr.po
@@ -3,21 +3,22 @@
#
# This file is distributed under the same license as the webkit package.
#
-# Милош Поповић <gpopac@gmail.com>
# Review by Бранко Кокановић <branko.kokanovic@gmail.com> (27.6.2009.)
+# Милош Поповић <gpopac@gmail.com>, 2010.
+#
msgid ""
msgstr ""
"Project-Id-Version: webkit 1.1.10\n"
"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
"POT-Creation-Date: 2010-02-25 15:53-0300\n"
-"PO-Revision-Date: 2009-06-19 02:35+100\n"
+"PO-Revision-Date: 2010-08-31 04:14+0200\n"
"Last-Translator: Милош Поповић <gpopac@gmail.com>\n"
"Language-Team: Serbian <gnom@prevod.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : n"
+"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535
msgid "Upload File"
@@ -54,9 +55,8 @@ msgstr "П_Ñ€ÐµÐ¿Ð¸Ñ Ñ Ð´ÐµÑна на лево"
# Ух, ух, ух... ~Милош :(
#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84
-#, fuzzy
msgid "PDF _Pop directional formatting"
-msgstr "ИÑкачуће _дирекционо форматирање"
+msgstr "ИÑкачуће ПДФ _дирекционо форматирање"
#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85
msgid "ZWS _Zero width space"
@@ -84,14 +84,12 @@ msgid "The network request for the URI that should be downloaded"
msgstr "Захтевана адреÑе датотеке коју желите да преузмете"
#: WebKit/gtk/webkit/webkitdownload.cpp:281
-#, fuzzy
msgid "Network Response"
-msgstr "Захтев на мрежи"
+msgstr "Мрежни одговор"
#: WebKit/gtk/webkit/webkitdownload.cpp:282
-#, fuzzy
msgid "The network response for the URI that should be downloaded"
-msgstr "Захтевана адреÑе датотеке коју желите да преузмете"
+msgstr "Одговор на захтевану адреÑу датотеке коју желите да преузмете"
#: WebKit/gtk/webkit/webkitdownload.cpp:296
msgid "Destination URI"
@@ -152,7 +150,7 @@ msgstr "Страница %s захтева кориÑничко име и лоз
#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278
msgid "Server message:"
-msgstr ""
+msgstr "Порука Ñа Ñервера:"
#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291
msgid "Username:"
@@ -163,9 +161,8 @@ msgid "Password:"
msgstr "Лозинка:"
#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302
-#, fuzzy
msgid "_Remember password"
-msgstr "Упамти лозинку"
+msgstr "_Упамти лозинку"
#: WebKit/gtk/webkit/webkitwebframe.cpp:298
msgid "Name"
@@ -197,34 +194,30 @@ msgstr "ÐдреÑа Ñадржаја који је приказан унутаÑ
#: WebKit/gtk/webkit/webkitwebframe.cpp:344
msgid "Horizontal Scrollbar Policy"
-msgstr ""
+msgstr "Хоризонтални клизач"
#: WebKit/gtk/webkit/webkitwebframe.cpp:345
-#, fuzzy
msgid ""
"Determines the current policy for the horizontal scrollbar of the frame."
-msgstr "Показује тренутни напредак преузимања"
+msgstr "Одређује Ñмер хоризонталног клизача унутар оквира."
#: WebKit/gtk/webkit/webkitwebframe.cpp:362
msgid "Vertical Scrollbar Policy"
-msgstr ""
+msgstr "Вертикални клизач"
#: WebKit/gtk/webkit/webkitwebframe.cpp:363
-#, fuzzy
msgid "Determines the current policy for the vertical scrollbar of the frame."
-msgstr "Показује тренутни напредак преузимања"
+msgstr "Одређује Ñмер вертикалног клизача унутар оквира."
#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147
msgid "The title of the history item"
msgstr "ÐаÑлов за Ñтавке у иÑторијату"
#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162
-#, fuzzy
msgid "Alternate Title"
msgstr "Променљив наÑлов"
#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163
-#, fuzzy
msgid "The alternate title of the history item"
msgstr "Променљив наÑлов Ñтавке у иÑторијату"
@@ -258,12 +251,10 @@ msgid "The Web View that renders the Web Inspector itself"
msgstr "Веб приказ кога иÑцртава „Веб инÑпектор“"
#: WebKit/gtk/webkit/webkitwebinspector.cpp:282
-#, fuzzy
msgid "Inspected URI"
msgstr "ИнÑпекција адреÑе"
#: WebKit/gtk/webkit/webkitwebinspector.cpp:283
-#, fuzzy
msgid "The URI that is currently being inspected"
msgstr "ÐдреÑа коју тренутно обрађује инÑпектор"
@@ -276,13 +267,12 @@ msgid "Profile the executed JavaScript."
msgstr "Прави профил покренуте Јава Ñкрипте."
#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
-#, fuzzy
msgid "Enable Timeline profiling"
-msgstr "Омогући учење Јава Ñкрипте"
+msgstr "Омогући временÑки профил"
#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
msgid "Profile the WebCore instrumentation."
-msgstr ""
+msgstr "Прави профил WebCore алаки."
#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158
msgid "Reason"
@@ -313,14 +303,12 @@ msgid "A bitmask representing the state of the modifier keys"
msgstr "Ознака која одређује да ли је укључен таÑтер за измену функције"
#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220
-#, fuzzy
msgid "Target frame"
-msgstr "Име оквира"
+msgstr "Циљни оквир"
#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221
-#, fuzzy
msgid "The target frame for the navigation"
-msgstr "Циљна адреÑа коју захтева навигација"
+msgstr "Циљни оквир за навигацију"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:237
msgid "Default Encoding"
@@ -501,155 +489,149 @@ msgstr "Укључује режим разгледања уз чување ваÑ
#: WebKit/gtk/webkit/webkitwebsettings.cpp:481
msgid "Enable Spell Checking"
-msgstr ""
+msgstr "Омогући проверу пиÑања"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:482
-#, fuzzy
msgid "Enables spell checking while typing"
-msgstr "Провери пиÑање _док куцам"
+msgstr "Укључује проверу пиÑања док куцате"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:505
msgid "Languages to use for spell checking"
-msgstr ""
+msgstr "Језик за проверу пиÑања"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:506
msgid "Comma separated list of languages to use for spell checking"
-msgstr ""
+msgstr "СпиÑак језика раздвојених тачком који Ñе кориÑте за проверу пиÑања"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:520
-#, fuzzy
msgid "Enable Caret Browsing"
-msgstr "Приватни режим"
+msgstr "Преглед Ñа показивачем"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:521
msgid "Whether to enable accesibility enhanced keyboard navigation"
-msgstr ""
+msgstr "Одређује да ли да Ñе кориÑти приÑтупачнија таÑтатура за навигацију"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:536
msgid "Enable HTML5 Database"
-msgstr ""
+msgstr "Укључи ХТМЛ5 базу података"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:537
msgid "Whether to enable HTML5 database support"
-msgstr ""
+msgstr "Одређује да ли је подржана ХТМЛ5 база података"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:552
msgid "Enable HTML5 Local Storage"
-msgstr ""
+msgstr "Укључи ХТМЛ5 Ñкладиште"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:553
msgid "Whether to enable HTML5 Local Storage support"
-msgstr ""
+msgstr "Одређује да ли је подржано локално ХТМЛ5 Ñкладиште"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:567
-#, fuzzy
msgid "Enable XSS Auditor"
-msgstr "Омогући Ñкрипте"
+msgstr "Омогући ИкÑСС ревизију"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:568
msgid "Whether to enable teh XSS auditor"
-msgstr ""
+msgstr "Одређује да ли је укључена ИкÑСС ревизија"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:586
msgid "User Agent"
-msgstr ""
+msgstr "ПредÑтављање прегледника"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:587
msgid "The User-Agent string used by WebKitGtk"
-msgstr ""
+msgstr "ÐиÑка за предÑтављање WebKitGtk прегледника (кориÑнички агент)"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:602
msgid "JavaScript can open windows automatically"
-msgstr ""
+msgstr "Дозволи Јава Ñкриптама да отворе прозор"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:603
msgid "Whether JavaScript can open windows automatically"
-msgstr ""
+msgstr "Одређује да ли Јава Ñкрипте могу да отворе нове прозоре"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:618
msgid "Enable offline web application cache"
-msgstr ""
+msgstr "Омогући оÑтаву за рад ван мређе"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:619
msgid "Whether to enable offline web application cache"
-msgstr ""
+msgstr "Одређује да ли Ñе кориÑти оÑтава за рад програма ван мреже"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:646
msgid "Editing behavior"
-msgstr ""
+msgstr "Понашање уређивача"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:647
msgid "The behavior mode to use in editing mode"
-msgstr ""
+msgstr "Понашање када Ñе кориÑти режим за уређивање"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:663
msgid "Enable universal access from file URIs"
-msgstr ""
+msgstr "Универзални приÑтуп из адреÑа датотеке"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:664
msgid "Whether to allow universal access from file URIs"
-msgstr ""
+msgstr "Одређује да ли је укључен универзални приÑтуп из адреÑа датотеке"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:679
-#, fuzzy
msgid "Enable DOM paste"
-msgstr "Омогући Ñкрипте"
+msgstr "Укључи ДОМ убацивање"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:680
msgid "Whether to enable DOM paste"
-msgstr ""
+msgstr "Одређује да ли је омогућено ДОМ убацивање"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:698
msgid "Tab key cycles through elements"
-msgstr ""
+msgstr "Tab таÑтер лиÑта делове Ñтранице"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:699
msgid "Whether the tab key cycles through elements on the page."
-msgstr ""
+msgstr "Одређује да ли да Tab таÑтер лиÑта елементе Ñтранице."
#: WebKit/gtk/webkit/webkitwebsettings.cpp:719
msgid "Enable Default Context Menu"
-msgstr ""
+msgstr "Подразумевани приручни мени"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:720
msgid ""
"Enables the handling of right-clicks for the creation of the default context "
"menu"
-msgstr ""
+msgstr "Приказује подразумевани приручни мени при клику деÑног таÑтера миша"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:740
msgid "Enable Site Specific Quirks"
-msgstr ""
+msgstr "Прихвати раÑпоред Ñа Ñтранице"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:741
msgid "Enables the site-specific compatibility workarounds"
-msgstr ""
+msgstr "Омогућава разне доÑетке Ñајтова за приказ Ñтранице"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:763
msgid "Enable page cache"
-msgstr ""
+msgstr "Укључи оÑтаву за Ñтранице"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:764
-#, fuzzy
msgid "Whether the page cache should be used"
-msgstr "Одређује да ли да Ñе приказују позадинÑке Ñлике."
+msgstr "Одређује да ли да Ñе чувају Ñтранице у оÑтаву"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:784
msgid "Auto Resize Window"
-msgstr ""
+msgstr "Сам промени величину прозора"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:785
msgid "Automatically resize the toplevel window when a page requests it"
-msgstr ""
+msgstr "Сам повећава величину оÑновног прозора када Ñтранице то захтевају"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:817
-#, fuzzy
msgid "Enable Java Applet"
-msgstr "Омогући учење Јава Ñкрипте"
+msgstr "Омогући Јава програмчиће"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:818
msgid "Whether Java Applet support through <applet> should be enabled"
-msgstr ""
+msgstr "Да ли да укључим подршку за Јава програмчиће кроз <applet>"
#: WebKit/gtk/webkit/webkitwebview.cpp:2319
msgid "Returns the @web_view's document title"
@@ -741,11 +723,11 @@ msgstr "Произвољно кодирање веб Ñтранице"
#: WebKit/gtk/webkit/webkitwebview.cpp:2520
msgid "Icon URI"
-msgstr ""
+msgstr "ÐдреÑа иконице"
#: WebKit/gtk/webkit/webkitwebview.cpp:2521
msgid "The URI for the favicon for the #WebKitWebView."
-msgstr ""
+msgstr "ÐдреÑа иконице за #WebKitWebView."
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60
@@ -758,7 +740,7 @@ msgstr "Поништи"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70
msgid "This is a searchable index. Enter search keywords: "
-msgstr ""
+msgstr "Можете претражити индекÑ. УнеÑите речи за претрагу:"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75
msgid "Choose File"
@@ -861,7 +843,6 @@ msgid "_Outline"
msgstr "_Оквир"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271
-#, fuzzy
msgid "Inspect _Element"
msgstr "ИнÑпекција _елемента"
@@ -919,189 +900,187 @@ msgstr "Ðепознато"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364
msgid "Loading..."
-msgstr ""
+msgstr "Учитавам..."
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369
msgid "Live Broadcast"
-msgstr ""
+msgstr "ÐŸÑ€ÐµÐ½Ð¾Ñ ÑƒÐ¶Ð¸Ð²Ð¾"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375
msgid "audio element controller"
-msgstr ""
+msgstr "контрола звучног елемента"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
msgid "video element controller"
-msgstr ""
+msgstr "контрола видео елемента"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379
msgid "mute"
-msgstr ""
+msgstr "утишај"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
msgid "unmute"
-msgstr ""
+msgstr "појачај"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
msgid "play"
-msgstr ""
+msgstr "пуÑти"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385
msgid "pause"
-msgstr ""
+msgstr "паузирај"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387
msgid "movie time"
-msgstr ""
+msgstr "трајање филма"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389
msgid "timeline slider thumb"
-msgstr ""
+msgstr "линија Ñа временом"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391
msgid "back 30 seconds"
-msgstr ""
+msgstr "назад за 30 s"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393
msgid "return to realtime"
-msgstr ""
+msgstr "врати у реално време"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395
msgid "elapsed time"
-msgstr ""
+msgstr "прегледано"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397
msgid "remaining time"
-msgstr ""
+msgstr "преоÑтало"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399
-#, fuzzy
msgid "status"
-msgstr "Стање"
+msgstr "Ñтање"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401
msgid "fullscreen"
-msgstr ""
+msgstr "цео екран"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403
msgid "fast forward"
-msgstr ""
+msgstr "премотај унапред"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405
msgid "fast reverse"
-msgstr ""
+msgstr "премотај уназад"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407
msgid "show closed captions"
-msgstr ""
+msgstr "прикажи затворене наslove"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
msgid "hide closed captions"
-msgstr ""
+msgstr "Ñакриј затворене наslove"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418
msgid "audio element playback controls and status display"
-msgstr ""
+msgstr "Ñтање и контрола пуштања звучних елемената"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420
msgid "video element playback controls and status display"
-msgstr ""
+msgstr "Ñтање и контрола пуштања видео елемената"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422
msgid "mute audio tracks"
-msgstr ""
+msgstr "утишај звук"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424
msgid "unmute audio tracks"
-msgstr ""
+msgstr "појачај звук"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
msgid "begin playback"
-msgstr ""
+msgstr "пуÑти"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428
msgid "pause playback"
-msgstr ""
+msgstr "паузирај"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430
msgid "movie time scrubber"
-msgstr ""
+msgstr "иÑпиÑано време филма"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432
msgid "movie time scrubber thumb"
-msgstr ""
+msgstr "клик за иÑпиÑано време филма"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434
msgid "seek movie back 30 seconds"
-msgstr ""
+msgstr "премотај филм уназад за 30 s"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436
msgid "return streaming movie to real time"
-msgstr ""
+msgstr "наÑтави приказ филма у реалном времену"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438
msgid "current movie time in seconds"
-msgstr ""
+msgstr "протекло трајање филма у Ñекундама"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440
msgid "number of seconds of movie remaining"
-msgstr ""
+msgstr "преоÑтало трајање филма у Ñекундама"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442
msgid "current movie status"
-msgstr ""
+msgstr "Ñтање филма"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444
msgid "seek quickly back"
-msgstr ""
+msgstr "брзо премотај уназад"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446
msgid "seek quickly forward"
-msgstr ""
+msgstr "брзо премотај унапред"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448
msgid "Play movie in fullscreen mode"
-msgstr ""
+msgstr "Пушта филм преко целог екрана"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450
msgid "start displaying closed captions"
-msgstr ""
+msgstr "приказуј затворене опције"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452
msgid "stop displaying closed captions"
-msgstr ""
+msgstr "не приказуј затворене опције"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
-#, fuzzy
msgid "indefinite time"
-msgstr "дефиниција"
+msgstr "беÑконачно трајање"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491
msgid "value missing"
-msgstr ""
+msgstr "недоÑтаје вредноÑÑ‚"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497
msgid "type mismatch"
-msgstr ""
+msgstr "не поклапа Ñе врÑта"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
msgid "pattern mismatch"
-msgstr ""
+msgstr "не поклапа Ñе шаблон"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507
msgid "too long"
-msgstr ""
+msgstr "предугачко"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
msgid "range underflow"
-msgstr ""
+msgstr "опÑег подкорачен"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517
msgid "range overflow"
-msgstr ""
+msgstr "опÑег прекорачен"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522
msgid "step mismatch"
-msgstr ""
+msgstr "не поклапа Ñе корак"
#~ msgid "_Searchable Index"
#~ msgstr "_Претражив индекÑ"
diff --git a/WebKit/gtk/po/sr@latin.po b/WebKit/gtk/po/sr@latin.po
index d6a795a..7fb251d 100644
--- a/WebKit/gtk/po/sr@latin.po
+++ b/WebKit/gtk/po/sr@latin.po
@@ -3,21 +3,22 @@
#
# This file is distributed under the same license as the webkit package.
#
-# Miloš Popović <gpopac@gmail.com>
# Review by Branko Kokanović <branko.kokanovic@gmail.com> (27.6.2009.)
+# Miloš Popović <gpopac@gmail.com>, 2010.
+#
msgid ""
msgstr ""
"Project-Id-Version: webkit 1.1.10\n"
"Report-Msgid-Bugs-To: http://bugs.webkit.org/\n"
"POT-Creation-Date: 2010-02-25 15:53-0300\n"
-"PO-Revision-Date: 2009-06-19 02:35+100\n"
+"PO-Revision-Date: 2010-08-31 04:14+0200\n"
"Last-Translator: Miloš Popović <gpopac@gmail.com>\n"
"Language-Team: Serbian <gnom@prevod.org>\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
-"Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%"
-"10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n"
+"Plural-Forms: nplurals=4; plural=n==1? 3 : n%10==1 && n%100!=11 ? 0 : n"
+"%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
#: WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp:535
msgid "Upload File"
@@ -54,9 +55,8 @@ msgstr "P_repis s desna na levo"
# Uh, uh, uh... ~Miloš :(
#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:84
-#, fuzzy
msgid "PDF _Pop directional formatting"
-msgstr "IskaÄuće _direkciono formatiranje"
+msgstr "IskaÄuće PDF _direkciono formatiranje"
#: WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp:85
msgid "ZWS _Zero width space"
@@ -84,14 +84,12 @@ msgid "The network request for the URI that should be downloaded"
msgstr "Zahtevana adrese datoteke koju želite da preuzmete"
#: WebKit/gtk/webkit/webkitdownload.cpp:281
-#, fuzzy
msgid "Network Response"
-msgstr "Zahtev na mreži"
+msgstr "Mrežni odgovor"
#: WebKit/gtk/webkit/webkitdownload.cpp:282
-#, fuzzy
msgid "The network response for the URI that should be downloaded"
-msgstr "Zahtevana adrese datoteke koju želite da preuzmete"
+msgstr "Odgovor na zahtevanu adresu datoteke koju želite da preuzmete"
#: WebKit/gtk/webkit/webkitdownload.cpp:296
msgid "Destination URI"
@@ -152,7 +150,7 @@ msgstr "Stranica %s zahteva korisniÄko ime i lozinku"
#: WebKit/gtk/webkit/webkitsoupauthdialog.c:278
msgid "Server message:"
-msgstr ""
+msgstr "Poruka sa servera:"
#: WebKit/gtk/webkit/webkitsoupauthdialog.c:291
msgid "Username:"
@@ -163,9 +161,8 @@ msgid "Password:"
msgstr "Lozinka:"
#: WebKit/gtk/webkit/webkitsoupauthdialog.c:302
-#, fuzzy
msgid "_Remember password"
-msgstr "Upamti lozinku"
+msgstr "_Upamti lozinku"
#: WebKit/gtk/webkit/webkitwebframe.cpp:298
msgid "Name"
@@ -197,34 +194,30 @@ msgstr "Adresa sadržaja koji je prikazan unutar okvira"
#: WebKit/gtk/webkit/webkitwebframe.cpp:344
msgid "Horizontal Scrollbar Policy"
-msgstr ""
+msgstr "Horizontalni klizaÄ"
#: WebKit/gtk/webkit/webkitwebframe.cpp:345
-#, fuzzy
msgid ""
"Determines the current policy for the horizontal scrollbar of the frame."
-msgstr "Pokazuje trenutni napredak preuzimanja"
+msgstr "OdreÄ‘uje smer horizontalnog klizaÄa unutar okvira."
#: WebKit/gtk/webkit/webkitwebframe.cpp:362
msgid "Vertical Scrollbar Policy"
-msgstr ""
+msgstr "Vertikalni klizaÄ"
#: WebKit/gtk/webkit/webkitwebframe.cpp:363
-#, fuzzy
msgid "Determines the current policy for the vertical scrollbar of the frame."
-msgstr "Pokazuje trenutni napredak preuzimanja"
+msgstr "OdreÄ‘uje smer vertikalnog klizaÄa unutar okvira."
#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:147
msgid "The title of the history item"
msgstr "Naslov za stavke u istorijatu"
#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:162
-#, fuzzy
msgid "Alternate Title"
msgstr "Promenljiv naslov"
#: WebKit/gtk/webkit/webkitwebhistoryitem.cpp:163
-#, fuzzy
msgid "The alternate title of the history item"
msgstr "Promenljiv naslov stavke u istorijatu"
@@ -258,12 +251,10 @@ msgid "The Web View that renders the Web Inspector itself"
msgstr "Veb prikaz koga iscrtava „Veb inspektor“"
#: WebKit/gtk/webkit/webkitwebinspector.cpp:282
-#, fuzzy
msgid "Inspected URI"
msgstr "Inspekcija adrese"
#: WebKit/gtk/webkit/webkitwebinspector.cpp:283
-#, fuzzy
msgid "The URI that is currently being inspected"
msgstr "Adresa koju trenutno obrađuje inspektor"
@@ -276,13 +267,12 @@ msgid "Profile the executed JavaScript."
msgstr "Pravi profil pokrenute Java skripte."
#: WebKit/gtk/webkit/webkitwebinspector.cpp:315
-#, fuzzy
msgid "Enable Timeline profiling"
-msgstr "Omogući uÄenje Java skripte"
+msgstr "Omogući vremenski profil"
#: WebKit/gtk/webkit/webkitwebinspector.cpp:316
msgid "Profile the WebCore instrumentation."
-msgstr ""
+msgstr "Pravi profil WebCore alaki."
#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:158
msgid "Reason"
@@ -313,14 +303,12 @@ msgid "A bitmask representing the state of the modifier keys"
msgstr "Oznaka koja odreÄ‘uje da li je ukljuÄen taster za izmenu funkcije"
#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:220
-#, fuzzy
msgid "Target frame"
-msgstr "Ime okvira"
+msgstr "Ciljni okvir"
#: WebKit/gtk/webkit/webkitwebnavigationaction.cpp:221
-#, fuzzy
msgid "The target frame for the navigation"
-msgstr "Ciljna adresa koju zahteva navigacija"
+msgstr "Ciljni okvir za navigaciju"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:237
msgid "Default Encoding"
@@ -473,8 +461,7 @@ msgstr "Adresa datoteke sa stilom"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:410
msgid "The URI of a stylesheet that is applied to every page."
msgstr ""
-"Putanja do datoteke sa sopstvenim stilom koji se primenjuje na svaku "
-"stranicu."
+"Putanja do datoteke sa sopstvenim stilom koji se primenjuje na svaku stranicu."
#: WebKit/gtk/webkit/webkitwebsettings.cpp:425
msgid "Zoom Stepping Value"
@@ -502,155 +489,149 @@ msgstr "UkljuÄuje režim razgledanja uz Äuvanje vaÅ¡e privatnosti"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:481
msgid "Enable Spell Checking"
-msgstr ""
+msgstr "Omogući proveru pisanja"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:482
-#, fuzzy
msgid "Enables spell checking while typing"
-msgstr "Proveri pisanje _dok kucam"
+msgstr "UkljuÄuje proveru pisanja dok kucate"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:505
msgid "Languages to use for spell checking"
-msgstr ""
+msgstr "Jezik za proveru pisanja"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:506
msgid "Comma separated list of languages to use for spell checking"
-msgstr ""
+msgstr "Spisak jezika razdvojenih taÄkom koji se koriste za proveru pisanja"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:520
-#, fuzzy
msgid "Enable Caret Browsing"
-msgstr "Privatni režim"
+msgstr "Pregled sa pokazivaÄem"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:521
msgid "Whether to enable accesibility enhanced keyboard navigation"
-msgstr ""
+msgstr "OdreÄ‘uje da li da se koristi pristupaÄnija tastatura za navigaciju"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:536
msgid "Enable HTML5 Database"
-msgstr ""
+msgstr "UkljuÄi HTML5 bazu podataka"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:537
msgid "Whether to enable HTML5 database support"
-msgstr ""
+msgstr "Određuje da li je podržana HTML5 baza podataka"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:552
msgid "Enable HTML5 Local Storage"
-msgstr ""
+msgstr "UkljuÄi HTML5 skladiÅ¡te"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:553
msgid "Whether to enable HTML5 Local Storage support"
-msgstr ""
+msgstr "Određuje da li je podržano lokalno HTML5 skladište"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:567
-#, fuzzy
msgid "Enable XSS Auditor"
-msgstr "Omogući skripte"
+msgstr "Omogući IksSS reviziju"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:568
msgid "Whether to enable teh XSS auditor"
-msgstr ""
+msgstr "OdreÄ‘uje da li je ukljuÄena IksSS revizija"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:586
msgid "User Agent"
-msgstr ""
+msgstr "Predstavljanje preglednika"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:587
msgid "The User-Agent string used by WebKitGtk"
-msgstr ""
+msgstr "Niska za predstavljanje WebKitGtk preglednika (korisniÄki agent)"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:602
msgid "JavaScript can open windows automatically"
-msgstr ""
+msgstr "Dozvoli Java skriptama da otvore prozor"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:603
msgid "Whether JavaScript can open windows automatically"
-msgstr ""
+msgstr "Određuje da li Java skripte mogu da otvore nove prozore"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:618
msgid "Enable offline web application cache"
-msgstr ""
+msgstr "Omogući ostavu za rad van mređe"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:619
msgid "Whether to enable offline web application cache"
-msgstr ""
+msgstr "Određuje da li se koristi ostava za rad programa van mreže"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:646
msgid "Editing behavior"
-msgstr ""
+msgstr "PonaÅ¡anje ureÄ‘ivaÄa"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:647
msgid "The behavior mode to use in editing mode"
-msgstr ""
+msgstr "Ponašanje kada se koristi režim za uređivanje"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:663
msgid "Enable universal access from file URIs"
-msgstr ""
+msgstr "Univerzalni pristup iz adresa datoteke"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:664
msgid "Whether to allow universal access from file URIs"
-msgstr ""
+msgstr "OdreÄ‘uje da li je ukljuÄen univerzalni pristup iz adresa datoteke"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:679
-#, fuzzy
msgid "Enable DOM paste"
-msgstr "Omogući skripte"
+msgstr "UkljuÄi DOM ubacivanje"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:680
msgid "Whether to enable DOM paste"
-msgstr ""
+msgstr "Određuje da li je omogućeno DOM ubacivanje"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:698
msgid "Tab key cycles through elements"
-msgstr ""
+msgstr "Tab taster lista delove stranice"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:699
msgid "Whether the tab key cycles through elements on the page."
-msgstr ""
+msgstr "Određuje da li da Tab taster lista elemente stranice."
#: WebKit/gtk/webkit/webkitwebsettings.cpp:719
msgid "Enable Default Context Menu"
-msgstr ""
+msgstr "Podrazumevani priruÄni meni"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:720
msgid ""
"Enables the handling of right-clicks for the creation of the default context "
"menu"
-msgstr ""
+msgstr "Prikazuje podrazumevani priruÄni meni pri kliku desnog tastera miÅ¡a"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:740
msgid "Enable Site Specific Quirks"
-msgstr ""
+msgstr "Prihvati raspored sa stranice"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:741
msgid "Enables the site-specific compatibility workarounds"
-msgstr ""
+msgstr "Omogućava razne dosetke sajtova za prikaz stranice"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:763
msgid "Enable page cache"
-msgstr ""
+msgstr "UkljuÄi ostavu za stranice"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:764
-#, fuzzy
msgid "Whether the page cache should be used"
-msgstr "Određuje da li da se prikazuju pozadinske slike."
+msgstr "OdreÄ‘uje da li da se Äuvaju stranice u ostavu"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:784
msgid "Auto Resize Window"
-msgstr ""
+msgstr "Sam promeni veliÄinu prozora"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:785
msgid "Automatically resize the toplevel window when a page requests it"
-msgstr ""
+msgstr "Sam povećava veliÄinu osnovnog prozora kada stranice to zahtevaju"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:817
-#, fuzzy
msgid "Enable Java Applet"
-msgstr "Omogući uÄenje Java skripte"
+msgstr "Omogući Java programÄiće"
#: WebKit/gtk/webkit/webkitwebsettings.cpp:818
msgid "Whether Java Applet support through <applet> should be enabled"
-msgstr ""
+msgstr "Da li da ukljuÄim podrÅ¡ku za Java programÄiće kroz <applet>"
#: WebKit/gtk/webkit/webkitwebview.cpp:2319
msgid "Returns the @web_view's document title"
@@ -742,11 +723,11 @@ msgstr "Proizvoljno kodiranje veb stranice"
#: WebKit/gtk/webkit/webkitwebview.cpp:2520
msgid "Icon URI"
-msgstr ""
+msgstr "Adresa ikonice"
#: WebKit/gtk/webkit/webkitwebview.cpp:2521
msgid "The URI for the favicon for the #WebKitWebView."
-msgstr ""
+msgstr "Adresa ikonice za #WebKitWebView."
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:55
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:60
@@ -759,7 +740,7 @@ msgstr "Poništi"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:70
msgid "This is a searchable index. Enter search keywords: "
-msgstr ""
+msgstr "Možete pretražiti indeks. Unesite reÄi za pretragu:"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:75
msgid "Choose File"
@@ -862,7 +843,6 @@ msgid "_Outline"
msgstr "_Okvir"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:271
-#, fuzzy
msgid "Inspect _Element"
msgstr "Inspekcija _elementa"
@@ -920,189 +900,187 @@ msgstr "Nepoznato"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:364
msgid "Loading..."
-msgstr ""
+msgstr "UÄitavam..."
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:369
msgid "Live Broadcast"
-msgstr ""
+msgstr "Prenos uživo"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:375
msgid "audio element controller"
-msgstr ""
+msgstr "kontrola zvuÄnog elementa"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:377
msgid "video element controller"
-msgstr ""
+msgstr "kontrola video elementa"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:379
msgid "mute"
-msgstr ""
+msgstr "utišaj"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:381
msgid "unmute"
-msgstr ""
+msgstr "pojaÄaj"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:383
msgid "play"
-msgstr ""
+msgstr "pusti"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:385
msgid "pause"
-msgstr ""
+msgstr "pauziraj"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:387
msgid "movie time"
-msgstr ""
+msgstr "trajanje filma"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:389
msgid "timeline slider thumb"
-msgstr ""
+msgstr "linija sa vremenom"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:391
msgid "back 30 seconds"
-msgstr ""
+msgstr "nazad za 30 s"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:393
msgid "return to realtime"
-msgstr ""
+msgstr "vrati u realno vreme"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:395
msgid "elapsed time"
-msgstr ""
+msgstr "pregledano"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:397
msgid "remaining time"
-msgstr ""
+msgstr "preostalo"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:399
-#, fuzzy
msgid "status"
-msgstr "Stanje"
+msgstr "stanje"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:401
msgid "fullscreen"
-msgstr ""
+msgstr "ceo ekran"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:403
msgid "fast forward"
-msgstr ""
+msgstr "premotaj unapred"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:405
msgid "fast reverse"
-msgstr ""
+msgstr "premotaj unazad"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:407
msgid "show closed captions"
-msgstr ""
+msgstr "prikaži zatvorene naslove"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:409
msgid "hide closed captions"
-msgstr ""
+msgstr "sakrij zatvorene naslove"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:418
msgid "audio element playback controls and status display"
-msgstr ""
+msgstr "stanje i kontrola puÅ¡tanja zvuÄnih elemenata"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:420
msgid "video element playback controls and status display"
-msgstr ""
+msgstr "stanje i kontrola puštanja video elemenata"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:422
msgid "mute audio tracks"
-msgstr ""
+msgstr "utišaj zvuk"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:424
msgid "unmute audio tracks"
-msgstr ""
+msgstr "pojaÄaj zvuk"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:426
msgid "begin playback"
-msgstr ""
+msgstr "pusti"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:428
msgid "pause playback"
-msgstr ""
+msgstr "pauziraj"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:430
msgid "movie time scrubber"
-msgstr ""
+msgstr "ispisano vreme filma"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:432
msgid "movie time scrubber thumb"
-msgstr ""
+msgstr "klik za ispisano vreme filma"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:434
msgid "seek movie back 30 seconds"
-msgstr ""
+msgstr "premotaj film unazad za 30 s"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:436
msgid "return streaming movie to real time"
-msgstr ""
+msgstr "nastavi prikaz filma u realnom vremenu"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:438
msgid "current movie time in seconds"
-msgstr ""
+msgstr "proteklo trajanje filma u sekundama"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:440
msgid "number of seconds of movie remaining"
-msgstr ""
+msgstr "preostalo trajanje filma u sekundama"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:442
msgid "current movie status"
-msgstr ""
+msgstr "stanje filma"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:444
msgid "seek quickly back"
-msgstr ""
+msgstr "brzo premotaj unazad"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:446
msgid "seek quickly forward"
-msgstr ""
+msgstr "brzo premotaj unapred"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:448
msgid "Play movie in fullscreen mode"
-msgstr ""
+msgstr "Pušta film preko celog ekrana"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:450
msgid "start displaying closed captions"
-msgstr ""
+msgstr "prikazuj zatvorene opcije"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:452
msgid "stop displaying closed captions"
-msgstr ""
+msgstr "ne prikazuj zatvorene opcije"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:461
-#, fuzzy
msgid "indefinite time"
-msgstr "definicija"
+msgstr "beskonaÄno trajanje"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:491
msgid "value missing"
-msgstr ""
+msgstr "nedostaje vrednost"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:497
msgid "type mismatch"
-msgstr ""
+msgstr "ne poklapa se vrsta"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:502
msgid "pattern mismatch"
-msgstr ""
+msgstr "ne poklapa se Å¡ablon"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:507
msgid "too long"
-msgstr ""
+msgstr "predugaÄko"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:512
msgid "range underflow"
-msgstr ""
+msgstr "opseg podkoraÄen"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:517
msgid "range overflow"
-msgstr ""
+msgstr "opseg prekoraÄen"
#: WebCore/platform/gtk/LocalizedStringsGtk.cpp:522
msgid "step mismatch"
-msgstr ""
+msgstr "ne poklapa se korak"
#~ msgid "_Searchable Index"
#~ msgstr "_Pretraživ indeks"
diff --git a/WebKit/gtk/tests/testcopyandpaste.c b/WebKit/gtk/tests/testcopyandpaste.c
index 5e3f5e7..f7889bd 100644
--- a/WebKit/gtk/tests/testcopyandpaste.c
+++ b/WebKit/gtk/tests/testcopyandpaste.c
@@ -133,7 +133,7 @@ static JSValueRef runPasteTestCallback(JSContextRef context, JSObjectRef functio
event->key.window = gtk_widget_get_window(GTK_WIDGET(currentFixture->webView));
g_object_ref(event->key.window);
#ifndef GTK_API_VERSION_2
- GdkDeviceManager* manager = gdk_display_get_device_manager(gdk_drawable_get_display(event->key.window));
+ GdkDeviceManager* manager = gdk_display_get_device_manager(gdk_window_get_display(event->key.window));
gdk_event_set_device(event, gdk_device_manager_get_client_pointer(manager));
#endif
diff --git a/WebKit/gtk/webkit/webkitdownload.cpp b/WebKit/gtk/webkit/webkitdownload.cpp
index 1472cb5..18b64ab 100644
--- a/WebKit/gtk/webkit/webkitdownload.cpp
+++ b/WebKit/gtk/webkit/webkitdownload.cpp
@@ -419,8 +419,8 @@ WebKitDownload* webkit_download_new_with_handle(WebKitNetworkRequest* request, W
g_return_val_if_fail(request, NULL);
ResourceHandleInternal* d = handle->getInternal();
- if (d->m_msg)
- soup_session_pause_message(webkit_get_default_session(), d->m_msg);
+ if (d->m_soupMessage)
+ soup_session_pause_message(webkit_get_default_session(), d->m_soupMessage.get());
WebKitDownload* download = WEBKIT_DOWNLOAD(g_object_new(WEBKIT_TYPE_DOWNLOAD, "network-request", request, NULL));
WebKitDownloadPrivate* priv = download->priv;
@@ -492,8 +492,8 @@ void webkit_download_start(WebKitDownload* download)
priv->resourceHandle->setClient(priv->downloadClient);
ResourceHandleInternal* d = priv->resourceHandle->getInternal();
- if (d->m_msg)
- soup_session_unpause_message(webkit_get_default_session(), d->m_msg);
+ if (d->m_soupMessage)
+ soup_session_unpause_message(webkit_get_default_session(), d->m_soupMessage.get());
}
priv->timer = g_timer_new();
diff --git a/WebKit/gtk/webkit/webkitsecurityorigin.cpp b/WebKit/gtk/webkit/webkitsecurityorigin.cpp
index 67ad0cf..92d19e7 100644
--- a/WebKit/gtk/webkit/webkitsecurityorigin.cpp
+++ b/WebKit/gtk/webkit/webkitsecurityorigin.cpp
@@ -220,7 +220,7 @@ static void webkit_security_origin_init(WebKitSecurityOrigin* securityOrigin)
/**
* webkit_security_origin_get_protocol:
- * @security_origin: a #WebKitSecurityOrigin
+ * @securityOrigin: a #WebKitSecurityOrigin
*
* Returns the protocol for the security origin.
*
@@ -243,7 +243,7 @@ G_CONST_RETURN gchar* webkit_security_origin_get_protocol(WebKitSecurityOrigin*
/**
* webkit_security_origin_get_host:
- * @security_origin: a #WebKitSecurityOrigin
+ * @securityOrigin: a #WebKitSecurityOrigin
*
* Returns the hostname for the security origin.
*
@@ -266,7 +266,7 @@ G_CONST_RETURN gchar* webkit_security_origin_get_host(WebKitSecurityOrigin* secu
/**
* webkit_security_origin_get_port:
- * @security_origin: a #WebKitSecurityOrigin
+ * @securityOrigin: a #WebKitSecurityOrigin
*
* Returns the port for the security origin.
*
@@ -284,7 +284,7 @@ guint webkit_security_origin_get_port(WebKitSecurityOrigin* securityOrigin)
/**
* webkit_security_origin_get_web_database_usage:
- * @security_origin: a #WebKitSecurityOrigin
+ * @securityOrigin: a #WebKitSecurityOrigin
*
* Returns the cumulative size of all Web Database database's in the origin
* in bytes.
@@ -307,7 +307,7 @@ guint64 webkit_security_origin_get_web_database_usage(WebKitSecurityOrigin* secu
/**
* webkit_security_origin_get_web_database_quota:
- * @security_origin: a #WebKitSecurityOrigin
+ * @securityOrigin: a #WebKitSecurityOrigin
*
* Returns the quota for Web Database storage of the security origin
* in bytes.
@@ -330,7 +330,7 @@ guint64 webkit_security_origin_get_web_database_quota(WebKitSecurityOrigin* secu
/**
* webkit_security_origin_set_web_database_quota:
- * @security_origin: a #WebKitSecurityOrigin
+ * @securityOrigin: a #WebKitSecurityOrigin
* @quota: a new Web Database quota in bytes
*
* Adjust the quota for Web Database storage of the security origin
@@ -349,7 +349,7 @@ void webkit_security_origin_set_web_database_quota(WebKitSecurityOrigin* securit
/**
* webkit_security_origin_get_all_web_databases:
- * @security_origin: a #WebKitSecurityOrigin
+ * @securityOrigin: a #WebKitSecurityOrigin
*
* Returns a list of all Web Databases in the security origin.
*
diff --git a/WebKit/gtk/webkit/webkitsoupauthdialog.c b/WebKit/gtk/webkit/webkitsoupauthdialog.c
index 0cf1c23..2eefcc5 100644
--- a/WebKit/gtk/webkit/webkitsoupauthdialog.c
+++ b/WebKit/gtk/webkit/webkitsoupauthdialog.c
@@ -59,6 +59,19 @@ static void webkit_soup_auth_dialog_class_init(WebKitSoupAuthDialogClass* klass)
{
GObjectClass* object_class = G_OBJECT_CLASS(klass);
+ /**
+ * WebKitSoupAuthDialog::current-toplevel:
+ * @authDialog: the object on which the signal is emitted
+ * @message: the #SoupMessage being used in the authentication process
+ *
+ * This signal is emitted by the @authDialog when it needs to know
+ * the current toplevel widget in order to correctly set the
+ * transiency for the authentication dialog.
+ *
+ * Return value: (transfer none): the current toplevel #GtkWidget or %NULL if there's none
+ *
+ * Since: 1.1.1
+ */
signals[CURRENT_TOPLEVEL] =
g_signal_new("current-toplevel",
G_OBJECT_CLASS_TYPE(object_class),
diff --git a/WebKit/gtk/webkit/webkitsoupauthdialog.h b/WebKit/gtk/webkit/webkitsoupauthdialog.h
index 01ccfc8..db0ccb8 100644
--- a/WebKit/gtk/webkit/webkitsoupauthdialog.h
+++ b/WebKit/gtk/webkit/webkitsoupauthdialog.h
@@ -41,7 +41,7 @@ typedef struct {
typedef struct {
GObjectClass parent_class;
- GtkWidget* (*current_toplevel) (WebKitSoupAuthDialog* feature, SoupMessage* message);
+ GtkWidget* (*current_toplevel) (WebKitSoupAuthDialog* authDialog, SoupMessage* message);
} WebKitSoupAuthDialogClass;
WEBKIT_API GType
diff --git a/WebKit/gtk/webkit/webkitwebdatabase.cpp b/WebKit/gtk/webkit/webkitwebdatabase.cpp
index cd85e73..680d9c9 100644
--- a/WebKit/gtk/webkit/webkitwebdatabase.cpp
+++ b/WebKit/gtk/webkit/webkitwebdatabase.cpp
@@ -280,7 +280,7 @@ static void webkit_web_database_set_name(WebKitWebDatabase* webDatabase, const g
/**
* webkit_web_database_get_security_origin:
- * @web_database: a #WebKitWebDatabase
+ * @webDatabase: a #WebKitWebDatabase
*
* Returns the security origin of the #WebKitWebDatabase.
*
@@ -298,7 +298,7 @@ WebKitSecurityOrigin* webkit_web_database_get_security_origin(WebKitWebDatabase*
/**
* webkit_web_database_get_name:
- * @web_database: a #WebKitWebDatabase
+ * @webDatabase: a #WebKitWebDatabase
*
* Returns the canonical name of the #WebKitWebDatabase.
*
@@ -316,7 +316,7 @@ G_CONST_RETURN gchar* webkit_web_database_get_name(WebKitWebDatabase* webDatabas
/**
* webkit_web_database_get_display_name:
- * @web_database: a #WebKitWebDatabase
+ * @webDatabase: a #WebKitWebDatabase
*
* Returns the name of the #WebKitWebDatabase as seen by the user.
*
@@ -346,7 +346,7 @@ G_CONST_RETURN gchar* webkit_web_database_get_display_name(WebKitWebDatabase* we
/**
* webkit_web_database_get_expected_size:
- * @web_database: a #WebKitWebDatabase
+ * @webDatabase: a #WebKitWebDatabase
*
* Returns the expected size of the #WebKitWebDatabase in bytes as defined by the
* web author. The Web Database standard allows web authors to specify an expected
@@ -371,7 +371,7 @@ guint64 webkit_web_database_get_expected_size(WebKitWebDatabase* webDatabase)
/**
* webkit_web_database_get_size:
- * @web_database: a #WebKitWebDatabase
+ * @webDatabase: a #WebKitWebDatabase
*
* Returns the actual size of the #WebKitWebDatabase space on disk in bytes.
*
@@ -394,7 +394,7 @@ guint64 webkit_web_database_get_size(WebKitWebDatabase* webDatabase)
/**
* webkit_web_database_get_filename:
- * @web_database: a #WebKitWebDatabase
+ * @webDatabase: a #WebKitWebDatabase
*
* Returns the absolute filename to the #WebKitWebDatabase file on disk.
*
@@ -425,7 +425,7 @@ G_CONST_RETURN gchar* webkit_web_database_get_filename(WebKitWebDatabase* webDat
/**
* webkit_web_database_remove:
- * @web_database: a #WebKitWebDatabase
+ * @webDatabase: a #WebKitWebDatabase
*
* Removes the #WebKitWebDatabase from its security origin and destroys all data
* stored in the database.
@@ -520,7 +520,7 @@ guint64 webkit_get_default_web_database_quota()
/**
* webkit_set_default_web_database_quota:
- * @default_quota: the new default database quota
+ * @defaultQuota: the new default database quota
*
* Sets the current path to the directory WebKit will write Web
* Database databases.
diff --git a/WebKit/gtk/webkit/webkitwebinspector.cpp b/WebKit/gtk/webkit/webkitwebinspector.cpp
index ee3c8cd..f207906 100644
--- a/WebKit/gtk/webkit/webkitwebinspector.cpp
+++ b/WebKit/gtk/webkit/webkitwebinspector.cpp
@@ -127,7 +127,6 @@ static void webkit_web_inspector_class_init(WebKitWebInspectorClass* klass)
* WebKitWebInspector::inspect-web-view:
* @web_inspector: the object on which the signal is emitted
* @web_view: the #WebKitWebView which will be inspected
- * @return: a newly allocated #WebKitWebView or %NULL
*
* Emitted when the user activates the 'inspect' context menu item
* to inspect a web view. The application which is interested in
@@ -138,6 +137,8 @@ static void webkit_web_inspector_class_init(WebKitWebInspectorClass* klass)
* #WebKitWebView instance you create; the widget to which you add
* it will do that.
*
+ * Return value: (transfer none): a newly allocated #WebKitWebView or %NULL
+ *
* Since: 1.0.3
*/
webkit_web_inspector_signals[INSPECT_WEB_VIEW] = g_signal_new("inspect-web-view",
@@ -476,7 +477,7 @@ webkit_web_inspector_set_inspector_client(WebKitWebInspector* web_inspector, Web
/**
* webkit_web_inspector_show:
- * @web_inspector: the #WebKitWebInspector that will be shown
+ * @webInspector: the #WebKitWebInspector that will be shown
*
* Causes the Web Inspector to be shown.
*
@@ -537,7 +538,7 @@ void webkit_web_inspector_inspect_coordinates(WebKitWebInspector* webInspector,
/**
* webkit_web_inspector_close:
- * @web_inspector: the #WebKitWebInspector that will be closed
+ * @webInspector: the #WebKitWebInspector that will be closed
*
* Causes the Web Inspector to be closed.
*
diff --git a/WebKit/gtk/webkit/webkitwebnavigationaction.cpp b/WebKit/gtk/webkit/webkitwebnavigationaction.cpp
index f421f40..ce5dd92 100644
--- a/WebKit/gtk/webkit/webkitwebnavigationaction.cpp
+++ b/WebKit/gtk/webkit/webkitwebnavigationaction.cpp
@@ -177,8 +177,8 @@ static void webkit_web_navigation_action_class_init(WebKitWebNavigationActionCla
/**
* WebKitWebNavigationAction:button:
*
- * The DOM identifier for the mouse button used to click. DOM button values
- * are 0, 1 and 2 for left, middle and right buttons. If the action was not
+ * The GTK+ identifier for the mouse button used to click. Notice that GTK+ button values
+ * are 1, 2 and 3 for left, middle and right buttons, so they are DOM button values +1. If the action was not
* initiated by a mouse click the value will be -1.
*
* Since: 1.0.3
@@ -310,9 +310,9 @@ void webkit_web_navigation_action_set_original_uri(WebKitWebNavigationAction* na
* webkit_web_navigation_action_get_button:
* @navigationAction: a #WebKitWebNavigationAction
*
- * Returns the DOM identifier for the mouse button used to click.
- * DOM button values are 0, 1 and 2 for left, middle and right buttons.
- * If the action was not initiated by a mouse click, returns -1.
+ * The GTK+ identifier for the mouse button used to click. Notice that GTK+ button values
+ * are 1, 2 and 3 for left, middle and right buttons, so they are DOM button values +1. If the action was not
+ * initiated by a mouse click the value will be -1.
*
* Return value: the mouse button used to click
*
diff --git a/WebKit/gtk/webkit/webkitwebsettings.cpp b/WebKit/gtk/webkit/webkitwebsettings.cpp
index 8a207d9..cd59bdb 100644
--- a/WebKit/gtk/webkit/webkitwebsettings.cpp
+++ b/WebKit/gtk/webkit/webkitwebsettings.cpp
@@ -33,8 +33,8 @@
#include "FileSystem.h"
#include "PluginDatabase.h"
#include "Language.h"
-#include "PlatformString.h"
#include <wtf/text/CString.h>
+#include <wtf/text/StringConcatenate.h>
#include <glib/gi18n-lib.h>
#if OS(UNIX)
@@ -45,9 +45,9 @@
* SECTION:webkitwebsettings
* @short_description: Control the behaviour of a #WebKitWebView
*
- * #WebKitWebSettings can be applied to a #WebKitWebView to control
- * the to be used text encoding, color, font sizes, printing mode,
- * script support, loading of images and various other things.
+ * #WebKitWebSettings can be applied to a #WebKitWebView to control text encoding,
+ * color, font sizes, printing mode, script support, loading of images and various other things.
+ * After creation, a #WebKitWebSettings object contains default settings.
*
* <informalexample><programlisting>
* /<!-- -->* Create a new websettings and disable java script *<!-- -->/
@@ -94,6 +94,7 @@ struct _WebKitWebSettingsPrivate {
gboolean enable_html5_local_storage;
gboolean enable_xss_auditor;
gboolean enable_spatial_navigation;
+ gboolean enable_frame_flattening;
gchar* user_agent;
gboolean javascript_can_open_windows_automatically;
gboolean javascript_can_access_clipboard;
@@ -145,6 +146,7 @@ enum {
PROP_ENABLE_HTML5_LOCAL_STORAGE,
PROP_ENABLE_XSS_AUDITOR,
PROP_ENABLE_SPATIAL_NAVIGATION,
+ PROP_ENABLE_FRAME_FLATTENING,
PROP_USER_AGENT,
PROP_JAVASCRIPT_CAN_OPEN_WINDOWS_AUTOMATICALLY,
PROP_JAVASCRIPT_CAN_ACCESS_CLIPBOARD,
@@ -201,7 +203,7 @@ static String webkitOSVersion()
struct utsname name;
if (uname(&name) != -1)
- uaOSVersion = String::format("%s %s", name.sysname, name.machine);
+ uaOSVersion = makeString(name.sysname, ' ', name.machine);
else
uaOSVersion = String("Unknown");
#elif OS(WINDOWS)
@@ -218,9 +220,9 @@ String webkitUserAgent()
// We mention Safari since many broken sites check for it (OmniWeb does this too)
// We re-use the WebKit version, though it doesn't seem to matter much in practice
- DEFINE_STATIC_LOCAL(const String, uaVersion, (String::format("%d.%d+", WEBKIT_USER_AGENT_MAJOR_VERSION, WEBKIT_USER_AGENT_MINOR_VERSION)));
- DEFINE_STATIC_LOCAL(const String, staticUA, (String::format("Mozilla/5.0 (%s; U; %s; %s) AppleWebKit/%s (KHTML, like Gecko) Version/5.0 Safari/%s",
- webkitPlatform().utf8().data(), webkitOSVersion().utf8().data(), defaultLanguage().utf8().data(), uaVersion.utf8().data(), uaVersion.utf8().data())));
+ DEFINE_STATIC_LOCAL(const String, uaVersion, (makeString(String::number(WEBKIT_USER_AGENT_MAJOR_VERSION), '.', String::number(WEBKIT_USER_AGENT_MINOR_VERSION), '+')));
+ DEFINE_STATIC_LOCAL(const String, staticUA, (makeString("Mozilla/5.0 (", webkitPlatform(), "; U; ", webkitOSVersion(), "; ", defaultLanguage(), ") AppleWebKit/", uaVersion) +
+ makeString(" (KHTML, like Gecko) Version/5.0 Safari/", uaVersion)));
return staticUA;
}
@@ -600,6 +602,25 @@ static void webkit_web_settings_class_init(WebKitWebSettingsClass* klass)
FALSE,
flags));
/**
+ * WebKitWebSettings:enable-frame-flattening
+ *
+ * Whether to enable the Frame Flattening. With this setting each subframe is expanded
+ * to its contents, which will flatten all the frames to become one scrollable page.
+ * On touch devices, it is desired to not have any scrollable sub parts of the page as
+ * it results in a confusing user experience, with scrolling sometimes scrolling sub parts
+ * and at other times scrolling the page itself. For this reason iframes and framesets are
+ * barely usable on touch devices.
+ *
+ * Since: 1.3.5
+ */
+ g_object_class_install_property(gobject_class,
+ PROP_ENABLE_FRAME_FLATTENING,
+ g_param_spec_boolean("enable-frame-flattening",
+ _("Enable Frame Flattening"),
+ _("Whether to enable Frame Flattening"),
+ FALSE,
+ flags));
+ /**
* WebKitWebSettings:user-agent:
*
* The User-Agent string used by WebKitGtk.
@@ -1054,6 +1075,9 @@ static void webkit_web_settings_set_property(GObject* object, guint prop_id, con
case PROP_ENABLE_SPATIAL_NAVIGATION:
priv->enable_spatial_navigation = g_value_get_boolean(value);
break;
+ case PROP_ENABLE_FRAME_FLATTENING:
+ priv->enable_frame_flattening = g_value_get_boolean(value);
+ break;
case PROP_USER_AGENT:
g_free(priv->user_agent);
if (!g_value_get_string(value) || !strlen(g_value_get_string(value)))
@@ -1202,6 +1226,9 @@ static void webkit_web_settings_get_property(GObject* object, guint prop_id, GVa
case PROP_ENABLE_SPATIAL_NAVIGATION:
g_value_set_boolean(value, priv->enable_spatial_navigation);
break;
+ case PROP_ENABLE_FRAME_FLATTENING:
+ g_value_set_boolean(value, priv->enable_frame_flattening);
+ break;
case PROP_USER_AGENT:
g_value_set_string(value, priv->user_agent);
break;
@@ -1306,6 +1333,7 @@ WebKitWebSettings* webkit_web_settings_copy(WebKitWebSettings* web_settings)
"enable-html5-local-storage", priv->enable_html5_local_storage,
"enable-xss-auditor", priv->enable_xss_auditor,
"enable-spatial-navigation", priv->enable_spatial_navigation,
+ "enable-frame-flattening", priv->enable_frame_flattening,
"user-agent", webkit_web_settings_get_user_agent(web_settings),
"javascript-can-open-windows-automatically", priv->javascript_can_open_windows_automatically,
"javascript-can-access-clipboard", priv->javascript_can_access_clipboard,
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 762888a..f5d0ef6 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -208,11 +208,6 @@ static void webkit_web_view_set_window_features(WebKitWebView* webView, WebKitWe
static GtkIMContext* webkit_web_view_get_im_context(WebKitWebView*);
-static void destroy_menu_cb(GtkObject* object, gpointer data)
-{
- WEBKIT_WEB_VIEW(data)->priv->currentMenu = 0;
-}
-
static void PopupMenuPositionFunc(GtkMenu* menu, gint *x, gint *y, gboolean *pushIn, gpointer userData)
{
WebKitWebView* view = WEBKIT_WEB_VIEW(userData);
@@ -223,7 +218,7 @@ static void PopupMenuPositionFunc(GtkMenu* menu, gint *x, gint *y, gboolean *pus
#ifdef GTK_API_VERSION_2
gtk_widget_size_request(GTK_WIDGET(menu), &menuSize);
#else
- gtk_size_request_get_size(GTK_SIZE_REQUEST(menu), &menuSize, NULL);
+ gtk_widget_get_preferred_size(GTK_WIDGET(menu), &menuSize, NULL);
#endif
*x = priv->lastPopupXPosition;
@@ -308,10 +303,6 @@ static gboolean webkit_web_view_forward_context_menu_event(WebKitWebView* webVie
priv->lastPopupXPosition = event.globalX();
priv->lastPopupYPosition = event.globalY();
- g_signal_connect(menu, "destroy",
- G_CALLBACK(destroy_menu_cb),
- NULL);
-
gtk_menu_popup(menu, NULL, NULL,
&PopupMenuPositionFunc,
webView, event.button() + 1, gtk_get_current_event_time());
@@ -492,26 +483,56 @@ static void webkit_web_view_set_property(GObject* object, guint prop_id, const G
}
}
-static bool shouldCoalesce(GdkRectangle rect, GdkRectangle* rects, int count)
+static bool shouldCoalesce(const IntRect& rect, const Vector<IntRect>& rects)
{
- const int cRectThreshold = 10;
+ const unsigned int cRectThreshold = 10;
const float cWastedSpaceThreshold = 0.75f;
- bool useUnionedRect = (count <= 1) || (count > cRectThreshold);
- if (!useUnionedRect) {
- // Attempt to guess whether or not we should use the unioned rect or the individual rects.
- // We do this by computing the percentage of "wasted space" in the union. If that wasted space
- // is too large, then we will do individual rect painting instead.
- float unionPixels = (rect.width * rect.height);
- float singlePixels = 0;
- for (int i = 0; i < count; ++i)
- singlePixels += rects[i].width * rects[i].height;
- float wastedSpace = 1 - (singlePixels / unionPixels);
- if (wastedSpace <= cWastedSpaceThreshold)
- useUnionedRect = true;
- }
+ bool useUnionedRect = (rects.size() <= 1) || (rects.size() > cRectThreshold);
+ if (useUnionedRect)
+ return true;
+ // Attempt to guess whether or not we should use the unioned rect or the individual rects.
+ // We do this by computing the percentage of "wasted space" in the union. If that wasted space
+ // is too large, then we will do individual rect painting instead.
+ float unionPixels = (rect.width() * rect.height());
+ float singlePixels = 0;
+ for (size_t i = 0; i < rects.size(); ++i)
+ singlePixels += rects[i].width() * rects[i].height();
+ float wastedSpace = 1 - (singlePixels / unionPixels);
+ if (wastedSpace <= cWastedSpaceThreshold)
+ useUnionedRect = true;
return useUnionedRect;
}
+static void paintWebView(Frame* frame, gboolean transparent, GraphicsContext& context, const IntRect& clipRect, const Vector<IntRect>& rects)
+{
+ bool coalesce = true;
+
+ if (rects.size() > 0)
+ coalesce = shouldCoalesce(clipRect, rects);
+
+ if (coalesce) {
+ context.clip(clipRect);
+ if (transparent)
+ context.clearRect(clipRect);
+ frame->view()->paint(&context, clipRect);
+ } else {
+ for (size_t i = 0; i < rects.size(); i++) {
+ IntRect rect = rects[i];
+ context.save();
+ context.clip(rect);
+ if (transparent)
+ context.clearRect(rect);
+ frame->view()->paint(&context, rect);
+ context.restore();
+ }
+ }
+
+ context.save();
+ context.clip(clipRect);
+ frame->page()->inspectorController()->drawNodeHighlight(context);
+ context.restore();
+}
+#ifdef GTK_API_VERSION_2
static gboolean webkit_web_view_expose_event(GtkWidget* widget, GdkEventExpose* event)
{
WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
@@ -527,44 +548,48 @@ static gboolean webkit_web_view_expose_event(GtkWidget* widget, GdkEventExpose*
ctx.setGdkExposeEvent(event);
int rectCount;
-#ifdef GTK_API_VERSION_2
GOwnPtr<GdkRectangle> rects;
gdk_region_get_rectangles(event->region, &rects.outPtr(), &rectCount);
-#else
- rectCount = cairo_region_num_rectangles(event->region);
- GOwnPtr<GdkRectangle> rects(g_new(GdkRectangle, rectCount));
+ Vector<IntRect> paintRects;
for (int i = 0; i < rectCount; i++)
- cairo_region_get_rectangle(event->region, i, rects.get()+i);
-#endif
- // Avoid recursing into the render tree excessively
- bool coalesce = shouldCoalesce(event->area, rects.get(), rectCount);
-
- if (coalesce) {
- IntRect rect = event->area;
- ctx.clip(rect);
- if (priv->transparent)
- ctx.clearRect(rect);
- frame->view()->paint(&ctx, rect);
- } else {
- for (int i = 0; i < rectCount; i++) {
- IntRect rect = rects.get()[i];
- ctx.save();
- ctx.clip(rect);
- if (priv->transparent)
- ctx.clearRect(rect);
- frame->view()->paint(&ctx, rect);
- ctx.restore();
- }
+ paintRects.append(IntRect(rects.get()[i]));
+
+ paintWebView(frame, priv->transparent, ctx, static_cast<IntRect>(event->area), paintRects);
+ }
+
+ return FALSE;
+}
+#else
+static gboolean webkit_web_view_draw(GtkWidget* widget, cairo_t* cr)
+{
+ WebKitWebView* webView = WEBKIT_WEB_VIEW(widget);
+ WebKitWebViewPrivate* priv = webView->priv;
+ GdkRectangle clipRect;
+
+ if (!gdk_cairo_get_clip_rectangle(cr, &clipRect))
+ return FALSE;
+
+ Frame* frame = core(webView)->mainFrame();
+ if (frame->contentRenderer() && frame->view()) {
+ GraphicsContext ctx(cr);
+ IntRect rect = clipRect;
+ cairo_rectangle_list_t* rectList = cairo_copy_clip_rectangle_list(cr);
+
+ frame->view()->updateLayoutAndStyleIfNeededRecursive();
+
+ Vector<IntRect> rects;
+ if (!rectList->status && rectList->num_rectangles > 0) {
+ for (int i = 0; i < rectList->num_rectangles; i++)
+ rects.append(enclosingIntRect(FloatRect(rectList->rectangles[i])));
}
+ paintWebView(frame, priv->transparent, ctx, rect, rects);
- ctx.save();
- ctx.clip(static_cast<IntRect>(event->area));
- frame->page()->inspectorController()->drawNodeHighlight(ctx);
- ctx.restore();
+ cairo_rectangle_list_destroy(rectList);
}
return FALSE;
}
+#endif // GTK_API_VERSION_2
static gboolean webkit_web_view_key_press_event(GtkWidget* widget, GdkEventKey* event)
{
@@ -641,7 +666,7 @@ static gboolean webkit_web_view_button_press_event(GtkWidget* widget, GdkEventBu
gint doubleClickDistance = 250;
gint doubleClickTime = 5;
- GtkSettings* settings = gtk_settings_get_for_screen(gdk_drawable_get_screen(gtk_widget_get_window(widget)));
+ GtkSettings* settings = gtk_settings_get_for_screen(gtk_widget_get_screen(widget));
g_object_get(settings,
"gtk-double-click-distance", &doubleClickDistance,
"gtk-double-click-time", &doubleClickTime, NULL);
@@ -848,7 +873,9 @@ static void webkit_web_view_realize(GtkWidget* widget)
attributes.height = allocation.height;
attributes.wclass = GDK_INPUT_OUTPUT;
attributes.visual = gtk_widget_get_visual(widget);
+#ifdef GTK_API_VERSION_2
attributes.colormap = gtk_widget_get_colormap(widget);
+#endif
attributes.event_mask = GDK_VISIBILITY_NOTIFY_MASK
| GDK_EXPOSURE_MASK
| GDK_BUTTON_PRESS_MASK
@@ -861,7 +888,10 @@ static void webkit_web_view_realize(GtkWidget* widget)
| GDK_BUTTON2_MOTION_MASK
| GDK_BUTTON3_MOTION_MASK;
- gint attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL | GDK_WA_COLORMAP;
+ gint attributes_mask = GDK_WA_X | GDK_WA_Y | GDK_WA_VISUAL;
+#ifdef GTK_API_VERSION_2
+ attributes_mask |= GDK_WA_COLORMAP;
+#endif
GdkWindow* window = gdk_window_new(gtk_widget_get_parent_window(widget), &attributes, attributes_mask);
gtk_widget_set_window(widget, window);
gdk_window_set_user_data(window, widget);
@@ -1489,7 +1519,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::create-web-view:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the #WebKitWebFrame
*
* Emitted when the creation of a new window is requested.
@@ -1519,7 +1549,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::web-view-ready:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
*
* Emitted after #WebKitWebView::create-web-view when the new #WebKitWebView
* should be displayed to the user. When this signal is emitted
@@ -1548,7 +1578,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::close-web-view:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
*
* Emitted when closing a #WebKitWebView is requested. This occurs when a
* call is made from JavaScript's window.close function. The default
@@ -1571,7 +1601,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::navigation-requested:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the #WebKitWebFrame that required the navigation
* @request: a #WebKitNetworkRequest
*
@@ -1595,7 +1625,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::new-window-policy-decision-requested:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the #WebKitWebFrame that required the navigation
* @request: a #WebKitNetworkRequest
* @navigation_action: a #WebKitWebNavigationAction
@@ -1642,7 +1672,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::navigation-policy-decision-requested:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the #WebKitWebFrame that required the navigation
* @request: a #WebKitNetworkRequest
* @navigation_action: a #WebKitWebNavigationAction
@@ -1679,7 +1709,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::mime-type-policy-decision-requested:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the #WebKitWebFrame that required the policy decision
* @request: a WebKitNetworkRequest
* @mimetype: the MIME type attempted to load
@@ -1721,7 +1751,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::window-object-cleared:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the #WebKitWebFrame to which @window_object belongs
* @context: the #JSGlobalContextRef holding the global object and other
* execution state; equivalent to the return value of
@@ -1747,7 +1777,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::download-requested:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @download: a #WebKitDownload object that lets you control the
* download process
*
@@ -1789,7 +1819,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::load-started:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the frame going to do the load
*
* When a #WebKitWebFrame begins to load this signal is emitted.
@@ -1808,7 +1838,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::load-committed:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the main frame that received the first data
*
* When a #WebKitWebFrame loaded the first data this signal is emitted.
@@ -1828,7 +1858,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::load-progress-changed:
- * @web_view: the #WebKitWebView
+ * @webView: the #WebKitWebView
* @progress: the global progress
*
* Deprecated: Use the "progress" property instead.
@@ -1845,7 +1875,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::load-error
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @web_frame: the #WebKitWebFrame
* @uri: the URI that triggered the error
* @web_error: the #GError that was triggered
@@ -1873,7 +1903,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::load-finished:
- * @web_view: the #WebKitWebView
+ * @webView: the #WebKitWebView
* @frame: the #WebKitWebFrame
*
* Deprecated: Use the "load-status" property instead.
@@ -1890,7 +1920,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::onload-event:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the frame
*
* When a #WebKitWebFrame receives an onload event this signal is emitted.
@@ -1907,7 +1937,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::title-changed:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the main frame
* @title: the new title
*
@@ -1928,7 +1958,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::hovering-over-link:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @title: the link's title
* @uri: the URI the link points to
*
@@ -1947,7 +1977,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::populate-popup:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @menu: the context menu
*
* When a context menu is about to be displayed this signal is emitted.
@@ -1966,7 +1996,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::print-requested
- * @web_view: the object in which the signal is emitted
+ * @webView: the object in which the signal is emitted
* @web_frame: the frame that is requesting to be printed
*
* Emitted when printing is requested by the frame, usually
@@ -2006,7 +2036,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::icon-loaded:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @icon_uri: the URI for the icon
*
* This signal is emitted when the main frame has got a favicon.
@@ -2034,7 +2064,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::console-message:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @message: the message text
* @line: the line where the error occured
* @source_id: the source id
@@ -2056,7 +2086,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::script-alert:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the relevant frame
* @message: the message text
*
@@ -2077,7 +2107,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::script-confirm:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the relevant frame
* @message: the message text
* @confirmed: whether the dialog has been confirmed
@@ -2099,7 +2129,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::script-prompt:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the relevant frame
* @message: the message text
* @default: the default value
@@ -2122,7 +2152,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::select-all:
- * @web_view: the object which received the signal
+ * @webView: the object which received the signal
*
* The #WebKitWebView::select-all signal is a keybinding signal which gets emitted to
* select the complete contents of the text view.
@@ -2139,7 +2169,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::cut-clipboard:
- * @web_view: the object which received the signal
+ * @webView: the object which received the signal
*
* The #WebKitWebView::cut-clipboard signal is a keybinding signal which gets emitted to
* cut the selection to the clipboard.
@@ -2156,7 +2186,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::copy-clipboard:
- * @web_view: the object which received the signal
+ * @webView: the object which received the signal
*
* The #WebKitWebView::copy-clipboard signal is a keybinding signal which gets emitted to
* copy the selection to the clipboard.
@@ -2173,7 +2203,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::paste-clipboard:
- * @web_view: the object which received the signal
+ * @webView: the object which received the signal
*
* The #WebKitWebView::paste-clipboard signal is a keybinding signal which gets emitted to
* paste the contents of the clipboard into the Web view.
@@ -2190,7 +2220,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::undo
- * @web_view: the object which received the signal
+ * @webView: the object which received the signal
*
* The #WebKitWebView::undo signal is a keybinding signal which gets emitted to
* undo the last editing command.
@@ -2209,7 +2239,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::redo
- * @web_view: the object which received the signal
+ * @webView: the object which received the signal
*
* The #WebKitWebView::redo signal is a keybinding signal which gets emitted to
* redo the last editing command.
@@ -2228,7 +2258,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::move-cursor:
- * @web_view: the object which received the signal
+ * @webView: the object which received the signal
* @step: the type of movement, one of #GtkMovementStep
* @count: an integer indicating the subtype of movement. Currently
* the permitted values are '1' = forward, '-1' = backwards.
@@ -2252,7 +2282,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::create-plugin-widget:
- * @web_view: the object which received the signal
+ * @webView: the object which received the signal
* @mime_type: the mimetype of the requested object
* @uri: the URI to load
* @param: a #GHashTable with additional attributes (strings)
@@ -2280,7 +2310,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::database-quota-exceeded
- * @web_view: the object which received the signal
+ * @webView: the object which received the signal
* @frame: the relevant frame
* @database: the #WebKitWebDatabase which exceeded the quota of its #WebKitSecurityOrigin
*
@@ -2302,7 +2332,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::resource-request-starting:
- * @web_view: the object which received the signal
+ * @webView: the object which received the signal
* @web_frame: the #WebKitWebFrame whose load dispatched this request
* @web_resource: an empty #WebKitWebResource object
* @request: the #WebKitNetworkRequest that will be dispatched
@@ -2343,7 +2373,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::geolocation-policy-decision-requested:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the frame that requests permission
* @policy_decision: a WebKitGeolocationPolicyDecision
*
@@ -2368,7 +2398,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/**
* WebKitWebView::geolocation-policy-decision-cancelled:
- * @web_view: the object on which the signal is emitted
+ * @webView: the object on which the signal is emitted
* @frame: the frame that cancels geolocation request.
*
* When a @frame wants to cancel geolocation permission it had requested
@@ -2393,7 +2423,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/*
* WebKitWebView::document-load-finished
- * @web_view: the object which received the signal
+ * @webView: the object which received the signal
* @web_frame: the #WebKitWebFrame whose load dispatched this request
*
* Emitted when the DOM document object load is finished for the
@@ -2410,7 +2440,7 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
/*
* WebKitWebView::frame-created
- * @web_view: the object which received the signal
+ * @webView: the object which received the signal
* @web_frame: the #WebKitWebFrame which was just created.
*
* Emitted when a WebKitWebView has created a new frame. This signal will
@@ -2458,7 +2488,11 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
GtkWidgetClass* widgetClass = GTK_WIDGET_CLASS(webViewClass);
widgetClass->realize = webkit_web_view_realize;
+#ifdef GTK_API_VERSION_2
widgetClass->expose_event = webkit_web_view_expose_event;
+#else
+ widgetClass->draw = webkit_web_view_draw;
+#endif
widgetClass->key_press_event = webkit_web_view_key_press_event;
widgetClass->key_release_event = webkit_web_view_key_release_event;
widgetClass->button_press_event = webkit_web_view_button_press_event;
@@ -2849,7 +2883,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
gboolean autoLoadImages, autoShrinkImages, printBackgrounds,
enableScripts, enablePlugins, enableDeveloperExtras, resizableTextAreas,
enablePrivateBrowsing, enableCaretBrowsing, enableHTML5Database, enableHTML5LocalStorage,
- enableXSSAuditor, enableSpatialNavigation, javascriptCanOpenWindows,
+ enableXSSAuditor, enableSpatialNavigation, enableFrameFlattening, javascriptCanOpenWindows,
javaScriptCanAccessClipboard, enableOfflineWebAppCache,
enableUniversalAccessFromFileURI, enableFileAccessFromFileURI,
enableDOMPaste, tabKeyCyclesThroughElements,
@@ -2879,6 +2913,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
"enable-html5-local-storage", &enableHTML5LocalStorage,
"enable-xss-auditor", &enableXSSAuditor,
"enable-spatial-navigation", &enableSpatialNavigation,
+ "enable-frame-flattening", &enableFrameFlattening,
"javascript-can-open-windows-automatically", &javascriptCanOpenWindows,
"javascript-can-access-clipboard", &javaScriptCanAccessClipboard,
"enable-offline-web-application-cache", &enableOfflineWebAppCache,
@@ -2916,6 +2951,7 @@ static void webkit_web_view_update_settings(WebKitWebView* webView)
settings->setLocalStorageEnabled(enableHTML5LocalStorage);
settings->setXSSAuditorEnabled(enableXSSAuditor);
settings->setSpatialNavigationEnabled(enableSpatialNavigation);
+ settings->setFrameFlatteningEnabled(enableFrameFlattening);
settings->setJavaScriptCanOpenWindowsAutomatically(javascriptCanOpenWindows);
settings->setJavaScriptCanAccessClipboard(javaScriptCanAccessClipboard);
settings->setOfflineWebApplicationCacheEnabled(enableOfflineWebAppCache);
@@ -3014,6 +3050,8 @@ static void webkit_web_view_settings_notify(WebKitWebSettings* webSettings, GPar
settings->setXSSAuditorEnabled(g_value_get_boolean(&value));
else if (name == g_intern_string("enable-spatial-navigation"))
settings->setSpatialNavigationEnabled(g_value_get_boolean(&value));
+ else if (name == g_intern_string("enable-frame-flattening"))
+ settings->setFrameFlatteningEnabled(g_value_get_boolean(&value));
else if (name == g_intern_string("javascript-can-open-windows-automatically"))
settings->setJavaScriptCanOpenWindowsAutomatically(g_value_get_boolean(&value));
else if (name == g_intern_string("javascript-can-access-clipboard"))
@@ -3148,7 +3186,7 @@ bool webkit_web_view_use_primary_for_paste(WebKitWebView* webView)
/**
* webkit_web_view_set_settings:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @settings: (transfer none): the #WebKitWebSettings to be set
*
* Replaces the #WebKitWebSettings instance that is currently attached
@@ -3173,7 +3211,7 @@ void webkit_web_view_set_settings(WebKitWebView* webView, WebKitWebSettings* web
/**
* webkit_web_view_get_settings:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Obtains the #WebKitWebSettings associated with the
* #WebKitWebView. The #WebKitWebView always has an associated
@@ -3192,7 +3230,7 @@ WebKitWebSettings* webkit_web_view_get_settings(WebKitWebView* webView)
/**
* webkit_web_view_get_inspector:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Obtains the #WebKitWebInspector associated with the
* #WebKitWebView. Every #WebKitWebView object has a
@@ -3222,7 +3260,7 @@ static void webkit_web_view_set_window_features(WebKitWebView* webView, WebKitWe
/**
* webkit_web_view_get_window_features:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Returns the instance of #WebKitWebWindowFeatures held by the given
* #WebKitWebView.
@@ -3239,7 +3277,7 @@ WebKitWebWindowFeatures* webkit_web_view_get_window_features(WebKitWebView* webV
/**
* webkit_web_view_get_title:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Returns the @web_view's document title
*
@@ -3257,7 +3295,7 @@ G_CONST_RETURN gchar* webkit_web_view_get_title(WebKitWebView* webView)
/**
* webkit_web_view_get_uri:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Returns the current URI of the contents displayed by the @web_view
*
@@ -3275,7 +3313,7 @@ G_CONST_RETURN gchar* webkit_web_view_get_uri(WebKitWebView* webView)
/**
* webkit_web_view_set_maintains_back_forward_list:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @flag: to tell the view to maintain a back or forward list
*
* Set the view to maintain a back or forward list of history items.
@@ -3289,7 +3327,7 @@ void webkit_web_view_set_maintains_back_forward_list(WebKitWebView* webView, gbo
/**
* webkit_web_view_get_back_forward_list:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Obtains the #WebKitWebBackForwardList associated with the given #WebKitWebView. The
* #WebKitWebBackForwardList is owned by the #WebKitWebView.
@@ -3306,7 +3344,7 @@ WebKitWebBackForwardList* webkit_web_view_get_back_forward_list(WebKitWebView* w
/**
* webkit_web_view_go_to_back_forward_item:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @item: a #WebKitWebHistoryItem*
*
* Go to the specified #WebKitWebHistoryItem
@@ -3328,7 +3366,7 @@ gboolean webkit_web_view_go_to_back_forward_item(WebKitWebView* webView, WebKitW
/**
* webkit_web_view_go_back:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Loads the previous history item.
*/
@@ -3341,7 +3379,7 @@ void webkit_web_view_go_back(WebKitWebView* webView)
/**
* webkit_web_view_go_back_or_forward:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @steps: the number of steps
*
* Loads the history item that is the number of @steps away from the current
@@ -3357,7 +3395,7 @@ void webkit_web_view_go_back_or_forward(WebKitWebView* webView, gint steps)
/**
* webkit_web_view_go_forward:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Loads the next history item.
*/
@@ -3370,7 +3408,7 @@ void webkit_web_view_go_forward(WebKitWebView* webView)
/**
* webkit_web_view_can_go_back:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Determines whether #web_view has a previous history item.
*
@@ -3388,7 +3426,7 @@ gboolean webkit_web_view_can_go_back(WebKitWebView* webView)
/**
* webkit_web_view_can_go_back_or_forward:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @steps: the number of steps
*
* Determines whether #web_view has a history item of @steps. Negative values
@@ -3406,7 +3444,7 @@ gboolean webkit_web_view_can_go_back_or_forward(WebKitWebView* webView, gint ste
/**
* webkit_web_view_can_go_forward:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Determines whether #web_view has a next history item.
*
@@ -3429,7 +3467,7 @@ gboolean webkit_web_view_can_go_forward(WebKitWebView* webView)
/**
* webkit_web_view_open:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @uri: an URI
*
* Requests loading of the specified URI string.
@@ -3461,7 +3499,7 @@ void webkit_web_view_reload(WebKitWebView* webView)
/**
* webkit_web_view_reload_bypass_cache:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Reloads the @web_view without using any cached data.
*
@@ -3476,7 +3514,7 @@ void webkit_web_view_reload_bypass_cache(WebKitWebView* webView)
/**
* webkit_web_view_load_uri:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @uri: an URI string
*
* Requests loading of the specified URI string.
@@ -3493,20 +3531,20 @@ void webkit_web_view_load_uri(WebKitWebView* webView, const gchar* uri)
}
/**
-+ * webkit_web_view_load_string:
-+ * @web_view: a #WebKitWebView
-+ * @content: an URI string
-+ * @mime_type: the MIME type, or %NULL
-+ * @encoding: the encoding, or %NULL
-+ * @base_uri: the base URI for relative locations
-+ *
-+ * Requests loading of the given @content with the specified @mime_type,
-+ * @encoding and @base_uri.
-+ *
-+ * If @mime_type is %NULL, "text/html" is assumed.
-+ *
-+ * If @encoding is %NULL, "UTF-8" is assumed.
-+ */
+ * webkit_web_view_load_string:
+ * @webView: a #WebKitWebView
+ * @content: an URI string
+ * @mime_type: the MIME type, or %NULL
+ * @encoding: the encoding, or %NULL
+ * @base_uri: the base URI for relative locations
+ *
+ * Requests loading of the given @content with the specified @mime_type,
+ * @encoding and @base_uri.
+ *
+ * If @mime_type is %NULL, "text/html" is assumed.
+ *
+ * If @encoding is %NULL, "UTF-8" is assumed.
+ */
void webkit_web_view_load_string(WebKitWebView* webView, const gchar* content, const gchar* mimeType, const gchar* encoding, const gchar* baseUri)
{
g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
@@ -3517,7 +3555,7 @@ void webkit_web_view_load_string(WebKitWebView* webView, const gchar* content, c
}
/**
* webkit_web_view_load_html_string:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @content: an URI string
* @base_uri: the base URI for relative locations
*
@@ -3535,7 +3573,7 @@ void webkit_web_view_load_html_string(WebKitWebView* webView, const gchar* conte
/**
* webkit_web_view_load_request:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @request: a #WebKitNetworkRequest
*
* Requests loading of the specified asynchronous client request.
@@ -3573,7 +3611,7 @@ void webkit_web_view_stop_loading(WebKitWebView* webView)
/**
* webkit_web_view_search_text:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @text: a string to look for
* @forward: whether to find forward or not
* @case_sensitive: whether to respect the case of text
@@ -3596,7 +3634,7 @@ gboolean webkit_web_view_search_text(WebKitWebView* webView, const gchar* string
/**
* webkit_web_view_mark_text_matches:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @string: a string to look for
* @case_sensitive: whether to respect the case of text
* @limit: the maximum number of strings to look for or 0 for all
@@ -3617,7 +3655,7 @@ guint webkit_web_view_mark_text_matches(WebKitWebView* webView, const gchar* str
/**
* webkit_web_view_set_highlight_text_matches:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @highlight: whether to highlight text matches
*
* Highlights text matches previously marked by webkit_web_view_mark_text_matches.
@@ -3635,7 +3673,7 @@ void webkit_web_view_set_highlight_text_matches(WebKitWebView* webView, gboolean
/**
* webkit_web_view_unmark_text_matches:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Removes highlighting previously set by webkit_web_view_mark_text_matches.
*/
@@ -3663,7 +3701,7 @@ WebKitWebFrame* webkit_web_view_get_main_frame(WebKitWebView* webView)
/**
* webkit_web_view_get_focused_frame:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Returns the frame that has focus or an active text selection.
*
@@ -3687,7 +3725,7 @@ void webkit_web_view_execute_script(WebKitWebView* webView, const gchar* script)
/**
* webkit_web_view_cut_clipboard:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Determines whether or not it is currently possible to cut to the clipboard.
*
@@ -3703,7 +3741,7 @@ gboolean webkit_web_view_can_cut_clipboard(WebKitWebView* webView)
/**
* webkit_web_view_copy_clipboard:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Determines whether or not it is currently possible to copy to the clipboard.
*
@@ -3719,7 +3757,7 @@ gboolean webkit_web_view_can_copy_clipboard(WebKitWebView* webView)
/**
* webkit_web_view_paste_clipboard:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Determines whether or not it is currently possible to paste from the clipboard.
*
@@ -3735,7 +3773,7 @@ gboolean webkit_web_view_can_paste_clipboard(WebKitWebView* webView)
/**
* webkit_web_view_cut_clipboard:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Cuts the current selection inside the @web_view to the clipboard.
*/
@@ -3749,7 +3787,7 @@ void webkit_web_view_cut_clipboard(WebKitWebView* webView)
/**
* webkit_web_view_copy_clipboard:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Copies the current selection inside the @web_view to the clipboard.
*/
@@ -3763,7 +3801,7 @@ void webkit_web_view_copy_clipboard(WebKitWebView* webView)
/**
* webkit_web_view_paste_clipboard:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Pastes the current contents of the clipboard to the @web_view.
*/
@@ -3777,7 +3815,7 @@ void webkit_web_view_paste_clipboard(WebKitWebView* webView)
/**
* webkit_web_view_delete_selection:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Deletes the current selection inside the @web_view.
*/
@@ -3791,7 +3829,7 @@ void webkit_web_view_delete_selection(WebKitWebView* webView)
/**
* webkit_web_view_has_selection:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Determines whether text was selected.
*
@@ -3806,7 +3844,7 @@ gboolean webkit_web_view_has_selection(WebKitWebView* webView)
/**
* webkit_web_view_get_selected_text:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Retrieves the selected text if any.
*
@@ -3822,7 +3860,7 @@ gchar* webkit_web_view_get_selected_text(WebKitWebView* webView)
/**
* webkit_web_view_select_all:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Attempts to select everything inside the @web_view.
*/
@@ -3835,7 +3873,7 @@ void webkit_web_view_select_all(WebKitWebView* webView)
/**
* webkit_web_view_get_editable:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Returns whether the user is allowed to edit the document.
*
@@ -3856,7 +3894,7 @@ gboolean webkit_web_view_get_editable(WebKitWebView* webView)
/**
* webkit_web_view_set_editable:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @flag: a #gboolean indicating the editable state
*
* Sets whether @web_view allows the user to edit its HTML document.
@@ -3899,7 +3937,7 @@ void webkit_web_view_set_editable(WebKitWebView* webView, gboolean flag)
/**
* webkit_web_view_get_copy_target_list:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* This function returns the list of targets this #WebKitWebView can
* provide for clipboard copying and as DND source. The targets in the list are
@@ -3916,7 +3954,7 @@ GtkTargetList* webkit_web_view_get_copy_target_list(WebKitWebView* webView)
/**
* webkit_web_view_get_paste_target_list:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* This function returns the list of targets this #WebKitWebView can
* provide for clipboard pasting and as DND destination. The targets in the list are
@@ -3933,7 +3971,7 @@ GtkTargetList* webkit_web_view_get_paste_target_list(WebKitWebView* webView)
/**
* webkit_web_view_can_show_mime_type:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @mime_type: a MIME type
*
* This functions returns whether or not a MIME type can be displayed using this view.
@@ -3956,7 +3994,7 @@ gboolean webkit_web_view_can_show_mime_type(WebKitWebView* webView, const gchar*
/**
* webkit_web_view_get_transparent:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Returns whether the #WebKitWebView has a transparent background.
*
@@ -3973,7 +4011,7 @@ gboolean webkit_web_view_get_transparent(WebKitWebView* webView)
/**
* webkit_web_view_set_transparent:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Sets whether the #WebKitWebView has a transparent background.
*
@@ -3997,7 +4035,7 @@ void webkit_web_view_set_transparent(WebKitWebView* webView, gboolean flag)
/**
* webkit_web_view_get_zoom_level:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Returns the zoom level of @web_view, i.e. the factor by which elements in
* the page are scaled with respect to their original size.
@@ -4036,7 +4074,7 @@ static void webkit_web_view_apply_zoom_level(WebKitWebView* webView, gfloat zoom
/**
* webkit_web_view_set_zoom_level:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @zoom_level: the new zoom level
*
* Sets the zoom level of @web_view, i.e. the factor by which elements in
@@ -4057,7 +4095,7 @@ void webkit_web_view_set_zoom_level(WebKitWebView* webView, gfloat zoomLevel)
/**
* webkit_web_view_zoom_in:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Increases the zoom level of @web_view. The current zoom
* level is incremented by the value of the "zoom-step"
@@ -4078,7 +4116,7 @@ void webkit_web_view_zoom_in(WebKitWebView* webView)
/**
* webkit_web_view_zoom_out:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Decreases the zoom level of @web_view. The current zoom
* level is decremented by the value of the "zoom-step"
@@ -4099,7 +4137,7 @@ void webkit_web_view_zoom_out(WebKitWebView* webView)
/**
* webkit_web_view_get_full_content_zoom:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Returns whether the zoom level affects only text or all elements.
*
@@ -4118,7 +4156,7 @@ gboolean webkit_web_view_get_full_content_zoom(WebKitWebView* webView)
/**
* webkit_web_view_set_full_content_zoom:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @full_content_zoom: %FALSE if only text should be scaled (the default),
* %TRUE if the full content of the view should be scaled.
*
@@ -4151,7 +4189,7 @@ void webkit_web_view_set_full_content_zoom(WebKitWebView* webView, gboolean zoom
/**
* webkit_web_view_get_load_status:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Determines the current status of the load.
*
@@ -4167,7 +4205,7 @@ WebKitLoadStatus webkit_web_view_get_load_status(WebKitWebView* webView)
/**
* webkit_web_view_get_progress:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Determines the current progress of the load.
*
@@ -4182,7 +4220,7 @@ gdouble webkit_web_view_get_progress(WebKitWebView* webView)
/**
* webkit_web_view_get_encoding:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Returns the default encoding of the #WebKitWebView.
*
@@ -4202,7 +4240,7 @@ const gchar* webkit_web_view_get_encoding(WebKitWebView* webView)
/**
* webkit_web_view_set_custom_encoding:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @encoding: the new encoding, or %NULL to restore the default encoding
*
* Sets the current #WebKitWebView encoding, without modifying the default one,
@@ -4219,7 +4257,7 @@ void webkit_web_view_set_custom_encoding(WebKitWebView* webView, const char* enc
/**
* webkit_web_view_get_custom_encoding:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Returns the current encoding of the #WebKitWebView, not the default-encoding
* of WebKitWebSettings.
@@ -4240,7 +4278,7 @@ const char* webkit_web_view_get_custom_encoding(WebKitWebView* webView)
/**
* webkit_web_view_set_view_mode:
- * @web_view: the #WebKitWebView that will have its view mode set
+ * @webView: the #WebKitWebView that will have its view mode set
* @mode: the %WebKitWebViewViewMode to be set
*
* Sets the view-mode property of the #WebKitWebView. Check the
@@ -4275,7 +4313,7 @@ void webkit_web_view_set_view_mode(WebKitWebView* webView, WebKitWebViewViewMode
/**
* webkit_web_view_get_view_mode:
- * @web_view: the #WebKitWebView to obtain the view mode from
+ * @webView: the #WebKitWebView to obtain the view mode from
*
* Gets the value of the view-mode property of the
* #WebKitWebView. Check the property's documentation for more
@@ -4310,7 +4348,7 @@ WebKitWebViewViewMode webkit_web_view_get_view_mode(WebKitWebView* webView)
/**
* webkit_web_view_move_cursor:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @step: a #GtkMovementStep
* @count: integer describing the direction of the movement. 1 for forward, -1 for backwards.
*
@@ -4345,7 +4383,7 @@ void webkit_web_view_set_group_name(WebKitWebView* webView, const gchar* groupNa
/**
* webkit_web_view_can_undo:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Determines whether or not it is currently possible to undo the last
* editing command in the view.
@@ -4364,7 +4402,7 @@ gboolean webkit_web_view_can_undo(WebKitWebView* webView)
/**
* webkit_web_view_undo:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Undoes the last editing command in the view, if possible.
*
@@ -4380,7 +4418,7 @@ void webkit_web_view_undo(WebKitWebView* webView)
/**
* webkit_web_view_can_redo:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Determines whether or not it is currently possible to redo the last
* editing command in the view.
@@ -4399,7 +4437,7 @@ gboolean webkit_web_view_can_redo(WebKitWebView* webView)
/**
* webkit_web_view_redo:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Redoes the last editing command in the view, if possible.
*
@@ -4416,7 +4454,7 @@ void webkit_web_view_redo(WebKitWebView* webView)
/**
* webkit_web_view_set_view_source_mode:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
* @view_source_mode: the mode to turn on or off view source mode
*
* Set whether the view should be in view source mode. Setting this mode to
@@ -4435,7 +4473,7 @@ void webkit_web_view_set_view_source_mode (WebKitWebView* webView, gboolean mode
/**
* webkit_web_view_get_view_source_mode:
- * @web_view: a #WebKitWebView
+ * @webView: a #WebKitWebView
*
* Return value: %TRUE if @web_view is in view source mode, %FALSE otherwise.
*
@@ -4564,7 +4602,7 @@ WebKitHitTestResult* webkit_web_view_get_hit_test_result(WebKitWebView* webView,
/**
* webkit_web_view_get_icon_uri:
- * @web_view: the #WebKitWebView object
+ * @webView: the #WebKitWebView object
*
* Obtains the URI for the favicon for the given #WebKitWebView, or
* %NULL if there is none.
@@ -4622,7 +4660,7 @@ webkit_web_view_get_dom_document(WebKitWebView* webView)
* so if you insert your own #SoupCookieJar before any network
* traffic occurs, WebKit will use it instead of the default.
*
- * Return value: the default #SoupSession
+ * Return value: (transfer none): the default #SoupSession
*
* Since: 1.1.1
*/
diff --git a/WebKit/gtk/webkit/webkitwebview.h b/WebKit/gtk/webkit/webkitwebview.h
index a320131..9dfb654 100644
--- a/WebKit/gtk/webkit/webkitwebview.h
+++ b/WebKit/gtk/webkit/webkitwebview.h
@@ -152,187 +152,187 @@ WEBKIT_API GtkWidget *
webkit_web_view_new (void);
WEBKIT_API G_CONST_RETURN gchar *
-webkit_web_view_get_title (WebKitWebView *web_view);
+webkit_web_view_get_title (WebKitWebView *webView);
WEBKIT_API G_CONST_RETURN gchar *
-webkit_web_view_get_uri (WebKitWebView *web_view);
+webkit_web_view_get_uri (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_set_maintains_back_forward_list (WebKitWebView *web_view,
+webkit_web_view_set_maintains_back_forward_list (WebKitWebView *webView,
gboolean flag);
WEBKIT_API WebKitWebBackForwardList *
-webkit_web_view_get_back_forward_list (WebKitWebView *web_view);
+webkit_web_view_get_back_forward_list (WebKitWebView *webView);
WEBKIT_API gboolean
-webkit_web_view_go_to_back_forward_item (WebKitWebView *web_view,
+webkit_web_view_go_to_back_forward_item (WebKitWebView *webView,
WebKitWebHistoryItem *item);
WEBKIT_API gboolean
-webkit_web_view_can_go_back (WebKitWebView *web_view);
+webkit_web_view_can_go_back (WebKitWebView *webView);
WEBKIT_API gboolean
-webkit_web_view_can_go_back_or_forward (WebKitWebView *web_view,
+webkit_web_view_can_go_back_or_forward (WebKitWebView *webView,
gint steps);
WEBKIT_API gboolean
-webkit_web_view_can_go_forward (WebKitWebView *web_view);
+webkit_web_view_can_go_forward (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_go_back (WebKitWebView *web_view);
+webkit_web_view_go_back (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_go_back_or_forward (WebKitWebView *web_view,
+webkit_web_view_go_back_or_forward (WebKitWebView *webView,
gint steps);
WEBKIT_API void
-webkit_web_view_go_forward (WebKitWebView *web_view);
+webkit_web_view_go_forward (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_stop_loading (WebKitWebView *web_view);
+webkit_web_view_stop_loading (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_open (WebKitWebView *web_view,
+webkit_web_view_open (WebKitWebView *webView,
const gchar *uri);
WEBKIT_API void
-webkit_web_view_reload (WebKitWebView *web_view);
+webkit_web_view_reload (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_reload_bypass_cache (WebKitWebView *web_view);
+webkit_web_view_reload_bypass_cache (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_load_uri (WebKitWebView *web_view,
+webkit_web_view_load_uri (WebKitWebView *webView,
const gchar *uri);
WEBKIT_API void
-webkit_web_view_load_string (WebKitWebView *web_view,
+webkit_web_view_load_string (WebKitWebView *webView,
const gchar *content,
const gchar *mime_type,
const gchar *encoding,
const gchar *base_uri);
WEBKIT_API void
-webkit_web_view_load_html_string (WebKitWebView *web_view,
+webkit_web_view_load_html_string (WebKitWebView *webView,
const gchar *content,
const gchar *base_uri);
WEBKIT_API void
-webkit_web_view_load_request (WebKitWebView *web_view,
+webkit_web_view_load_request (WebKitWebView *webView,
WebKitNetworkRequest *request);
WEBKIT_API gboolean
-webkit_web_view_search_text (WebKitWebView *web_view,
+webkit_web_view_search_text (WebKitWebView *webView,
const gchar *text,
gboolean case_sensitive,
gboolean forward,
gboolean wrap);
WEBKIT_API guint
-webkit_web_view_mark_text_matches (WebKitWebView *web_view,
+webkit_web_view_mark_text_matches (WebKitWebView *webView,
const gchar *string,
gboolean case_sensitive,
guint limit);
WEBKIT_API void
-webkit_web_view_set_highlight_text_matches (WebKitWebView *web_view,
+webkit_web_view_set_highlight_text_matches (WebKitWebView *webView,
gboolean highlight);
WEBKIT_API void
-webkit_web_view_unmark_text_matches (WebKitWebView *web_view);
+webkit_web_view_unmark_text_matches (WebKitWebView *webView);
WEBKIT_API WebKitWebFrame *
-webkit_web_view_get_main_frame (WebKitWebView *web_view);
+webkit_web_view_get_main_frame (WebKitWebView *webView);
WEBKIT_API WebKitWebFrame *
-webkit_web_view_get_focused_frame (WebKitWebView *web_view);
+webkit_web_view_get_focused_frame (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_execute_script (WebKitWebView *web_view,
+webkit_web_view_execute_script (WebKitWebView *webView,
const gchar *script);
WEBKIT_API gboolean
-webkit_web_view_can_cut_clipboard (WebKitWebView *web_view);
+webkit_web_view_can_cut_clipboard (WebKitWebView *webView);
WEBKIT_API gboolean
-webkit_web_view_can_copy_clipboard (WebKitWebView *web_view);
+webkit_web_view_can_copy_clipboard (WebKitWebView *webView);
WEBKIT_API gboolean
-webkit_web_view_can_paste_clipboard (WebKitWebView *web_view);
+webkit_web_view_can_paste_clipboard (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_cut_clipboard (WebKitWebView *web_view);
+webkit_web_view_cut_clipboard (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_copy_clipboard (WebKitWebView *web_view);
+webkit_web_view_copy_clipboard (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_paste_clipboard (WebKitWebView *web_view);
+webkit_web_view_paste_clipboard (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_delete_selection (WebKitWebView *web_view);
+webkit_web_view_delete_selection (WebKitWebView *webView);
WEBKIT_API gboolean
-webkit_web_view_has_selection (WebKitWebView *web_view);
+webkit_web_view_has_selection (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_select_all (WebKitWebView *web_view);
+webkit_web_view_select_all (WebKitWebView *webView);
WEBKIT_API gboolean
-webkit_web_view_get_editable (WebKitWebView *web_view);
+webkit_web_view_get_editable (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_set_editable (WebKitWebView *web_view,
+webkit_web_view_set_editable (WebKitWebView *webView,
gboolean flag);
WEBKIT_API GtkTargetList *
-webkit_web_view_get_copy_target_list (WebKitWebView *web_view);
+webkit_web_view_get_copy_target_list (WebKitWebView *webView);
WEBKIT_API GtkTargetList *
-webkit_web_view_get_paste_target_list (WebKitWebView *web_view);
+webkit_web_view_get_paste_target_list (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_set_settings (WebKitWebView *web_view,
+webkit_web_view_set_settings (WebKitWebView *webView,
WebKitWebSettings *settings);
WEBKIT_API WebKitWebSettings *
-webkit_web_view_get_settings (WebKitWebView *web_view);
+webkit_web_view_get_settings (WebKitWebView *webView);
WEBKIT_API WebKitWebInspector *
-webkit_web_view_get_inspector (WebKitWebView *web_view);
+webkit_web_view_get_inspector (WebKitWebView *webView);
WEBKIT_API WebKitWebWindowFeatures*
-webkit_web_view_get_window_features (WebKitWebView *web_view);
+webkit_web_view_get_window_features (WebKitWebView *webView);
WEBKIT_API gboolean
-webkit_web_view_can_show_mime_type (WebKitWebView *web_view,
+webkit_web_view_can_show_mime_type (WebKitWebView *webView,
const gchar *mime_type);
WEBKIT_API gboolean
-webkit_web_view_get_transparent (WebKitWebView *web_view);
+webkit_web_view_get_transparent (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_set_transparent (WebKitWebView *web_view,
+webkit_web_view_set_transparent (WebKitWebView *webView,
gboolean flag);
WEBKIT_API gfloat
-webkit_web_view_get_zoom_level (WebKitWebView *web_view);
+webkit_web_view_get_zoom_level (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_set_zoom_level (WebKitWebView *web_view,
+webkit_web_view_set_zoom_level (WebKitWebView *webView,
gfloat zoom_level);
WEBKIT_API void
-webkit_web_view_zoom_in (WebKitWebView *web_view);
+webkit_web_view_zoom_in (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_zoom_out (WebKitWebView *web_view);
+webkit_web_view_zoom_out (WebKitWebView *webView);
WEBKIT_API gboolean
-webkit_web_view_get_full_content_zoom (WebKitWebView *web_view);
+webkit_web_view_get_full_content_zoom (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_set_full_content_zoom (WebKitWebView *web_view,
+webkit_web_view_set_full_content_zoom (WebKitWebView *webView,
gboolean full_content_zoom);
WEBKIT_API SoupSession*
@@ -349,11 +349,11 @@ WEBKIT_API const char*
webkit_web_view_get_custom_encoding (WebKitWebView * webView);
WEBKIT_API void
-webkit_web_view_set_view_mode (WebKitWebView *web_view,
+webkit_web_view_set_view_mode (WebKitWebView *webView,
WebKitWebViewViewMode mode);
WEBKIT_API WebKitWebViewViewMode
-webkit_web_view_get_view_mode (WebKitWebView *web_view);
+webkit_web_view_get_view_mode (WebKitWebView *webView);
WEBKIT_API void
webkit_web_view_move_cursor (WebKitWebView * webView,
@@ -361,10 +361,10 @@ webkit_web_view_move_cursor (WebKitWebView * webView,
gint count);
WEBKIT_API WebKitLoadStatus
-webkit_web_view_get_load_status (WebKitWebView *web_view);
+webkit_web_view_get_load_status (WebKitWebView *webView);
WEBKIT_API gdouble
-webkit_web_view_get_progress (WebKitWebView *web_view);
+webkit_web_view_get_progress (WebKitWebView *webView);
WEBKIT_API void
webkit_web_view_undo (WebKitWebView *webView);
@@ -379,11 +379,11 @@ WEBKIT_API gboolean
webkit_web_view_can_redo (WebKitWebView *webView);
WEBKIT_API void
-webkit_web_view_set_view_source_mode (WebKitWebView *web_view,
+webkit_web_view_set_view_source_mode (WebKitWebView *webView,
gboolean view_source_mode);
WEBKIT_API gboolean
-webkit_web_view_get_view_source_mode (WebKitWebView *web_view);
+webkit_web_view_get_view_source_mode (WebKitWebView *webView);
WEBKIT_API WebKitHitTestResult*
webkit_web_view_get_hit_test_result (WebKitWebView *webView,
diff --git a/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp b/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp
index a6fe1df..e5d65bd 100644
--- a/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp
+++ b/WebKit/gtk/webkit/webkitwebwindowfeatures.cpp
@@ -38,7 +38,7 @@
* In the normal case one will use #webkit_web_view_get_window_features
* to get the #WebKitWebWindowFeatures and then monitor the property
* changes. Be aware that the #WebKitWebWindowFeatures might change
- * change before #WebKitWebView::web-view-ready signal is emitted.
+ * before #WebKitWebView::web-view-ready signal is emitted.
* To be safe listen to the notify::window-features signal of the #WebKitWebView
* and reconnect the signals whenever the #WebKitWebWindowFeatures of
* a #WebKitWebView changes.
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index d707720..8f1ea42 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,399 @@
+2010-10-20 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Composited elements drawn twice when WebView is layer-backed
+ https://bugs.webkit.org/show_bug.cgi?id=48024
+ <rdar://problem/7916580>
+
+ When drawing content in a layer-backed WebView, WebFrame's test
+ for drawing to a bitmap succeeded, causing us to paint flattened
+ compositing layers into the view. They would also be rendered
+ by the normal compositing path, resulting in double rendering.
+
+ Fix this by detecting when the WebHTMLView is being drawn into
+ a layer, and avoiding flattening in that case.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _showFlattenedCompositingLayers:]):
+ (-[WebFrame _drawRect:contentsOnly:]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawLayer:inContext:]):
+ (-[WebHTMLView _web_isDrawingIntoLayer]):
+ * WebView/WebHTMLViewInternal.h:
+
+2010-10-20 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by David Levin.
+
+ Repost the DatabaseTracker notifications to the main thread, if needed.
+ https://bugs.webkit.org/show_bug.cgi?id=40655
+
+ * Storage/WebDatabaseTrackerClient.mm:
+ (DidModifyOriginData::dispatchToMainThread):
+ (DidModifyOriginData::DidModifyOriginData):
+ (DidModifyOriginData::dispatchDidModifyOriginOnMainThread):
+ (WebDatabaseTrackerClient::dispatchDidModifyOrigin):
+ (WebDatabaseTrackerClient::dispatchDidModifyDatabase):
+
+2010-10-20 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION(r67568-r67643): Some HTML/CSS renders upside down and backwards on Leopard
+ https://bugs.webkit.org/show_bug.cgi?id=47369
+
+ r46947 added code that limits the size of the layer-backed view on Leopard when
+ the page height exceeds 4096px (later adjusted to 2048px in r48401).
+
+ Later, r67576 altered the geometry flipping behavior to push the geometry flipping
+ down into WebKit. However, the code that adjusts the hosting layer's sublayer transform
+ to account for layer-backed view size-limiting was not fixed at the same time.
+ This change corrects that.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _updateLayerHostingViewPosition]):
+
+2010-10-19 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ <rdar://problem/8508422> Compositing layers aren't always displayed correctly in layer-backed WebViews
+
+ AppKit has some special code to prevent it meddling with view's layers
+ under layer-backed WebViews. When a layer-backed WebView became composited,
+ this caused our layer to remain zero-sized. Fix this by manually
+ setting the geometry for our layer, if the WebHTMLView has a layer.
+
+ This does not seem to be a problem if the WebView becomes layer-backed, or
+ stops being layer-backed after the WebView starts using compositing.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView attachRootLayer:]):
+
+2010-10-20 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Merge ColorSpace and ImageColorSpace enums
+ https://bugs.webkit.org/show_bug.cgi?id=47922
+
+ Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
+ to follow webkit style rules.
+
+ * Misc/WebKitNSStringExtras.mm:
+ (-[NSString _web_drawAtPoint:font:textColor:allowingFontSmoothing:]):
+
+2010-10-19 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by Anders Carlsson.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47933
+ <rdar://problem/8494337> navigator.language doesn't work in WebKit2
+
+ * Misc/WebNSUserDefaultsExtras.mm: Moved code for computing default language to WebCore.
+ We need to keep _webkit_preferredLanguageCode for Safari.
+
+ * WebCoreSupport/WebSystemInterface.mm: (InitWebCoreSystemInterface):
+ Initialize wkCopyCFLocalizationPreferredName.
+
+ * WebCoreSupport/WebViewFactory.mm: Removed defaultLanguage. WebCore was the only caller.
+
+2010-10-18 Alexey Proskuryakov <ap@apple.com>
+
+ Reviewed by David Kilzer.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47864
+ Convert WebNSUserDefaultsExtras.m to .mm
+
+ Also, fixed some issues in the process:
+ - removed locking, which was only necessary when this code was in Foundation;
+ - fixed notification center observer to actually work (previously, it picked up changes
+ when application preferences changed, not when system language did);
+ - removed unused NSString category;
+ - updated style.
+
+ * Misc/WebNSUserDefaultsExtras.m: Removed.
+ * Misc/WebNSUserDefaultsExtras.mm: Copied from WebKit/mac/Misc/WebNSUserDefaultsExtras.m.
+ (createHTTPStyleLanguageCode):
+ (+[NSUserDefaults _webkit_defaultsDidChange]):
+ (addLanguageChangeObserver):
+ (+[NSUserDefaults _webkit_preferredLanguageCode]):
+
+2010-10-18 Stuart Morgan <stuartmorgan@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ Switch to using the new Carbon NPAPI event declarations, and remove
+ the old ones.
+
+ https://bugs.webkit.org/show_bug.cgi?id=40784
+
+ * Plugins/WebNetscapePluginEventHandlerCarbon.mm:
+ (WebNetscapePluginEventHandlerCarbon::mouseEntered):
+ (WebNetscapePluginEventHandlerCarbon::mouseExited):
+ (WebNetscapePluginEventHandlerCarbon::mouseMoved):
+ (WebNetscapePluginEventHandlerCarbon::focusChanged):
+
+2010-10-18 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: disable private browsing for inspector
+ https://bugs.webkit.org/show_bug.cgi?id=47827
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController init]):
+
+2010-10-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: inspector settings/properties/states management
+ should be extracted into separate class.
+
+ We have a lot of flags/values in InspectorController.
+ Some flags are persisting into profile.
+ Others are part of inspector state for frontend.
+ All these flags should keep their values after navigation.
+ It'd be better to extract these flags/values into separate
+ class which will care about theirs lifetime.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47275
+
+ * WebCoreSupport/WebInspectorClient.mm:
+ (-[WebInspectorWindowController showWindow:]):
+ (-[WebInspectorWindowController attach]):
+ (-[WebInspectorWindowController detach]):
+
+2010-10-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=43987
+ Switch XMLHttpRequest, FileReader, and FileReaderSync to use a Stringbuilder
+ to construct their internal result string. Remove ScriptString (this is now
+ redundant).
+
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+
+2010-10-12 Andy Estes <aestes@apple.com>
+
+ Rubber-stamped by Darin Adler.
+
+ Check in some cleanup from the previous commit.
+
+ * WebView/WebView.mm:
+ (leakMailQuirksUserScriptPath): Renamed to indicate that this function
+ leaks an NSString.
+ (-[WebView _injectMailQuirksScript]): Moved a static initialization from
+ a separate class method into the only method that used it and removed
+ the now-unnecessary class method.
+
+2010-10-12 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ REGRESSION (new parser): Leopard/Tiger Mail <head>/<body> quirk is gone
+ https://bugs.webkit.org/show_bug.cgi?id=45693
+
+ Re-implement this former WebCore parser quirk as a
+ Mac-only userscript-based quirk. As far as I can tell
+ from Darin's description this should satisfy Mail's needs.
+
+ * Misc/MailQuirksUserScript.js: Added.
+ * WebView/WebView.mm:
+ (+[WebView _mailQuirksUserScript]):
+ (-[WebView _injectMailQuirksScript]):
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+
+2010-10-12 Simon Fraser <simon.fraser@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add 'didDraw' callback for framerate tracking
+ https://bugs.webkit.org/show_bug.cgi?id=47478
+
+ Add a callback at the end of -[WebHTMLView drawRect:] so
+ a delegate can get notified when a draw happens.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView drawRect:]):
+ * WebView/WebUIDelegatePrivate.h:
+
+2010-10-11 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Remove WebIconFetcher from WebKit and IconFetcher from WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=47523
+
+ Remove all traces of the WebKit WebIconFetcher class. It's SPI that nobody uses.
+
+ * Misc/WebIconFetcher.h: Removed.
+ * Misc/WebIconFetcher.mm: Removed.
+ * Misc/WebIconFetcherInternal.h: Removed.
+ * WebView/WebFrame.mm:
+ * WebView/WebFramePrivate.h:
+
+2010-10-11 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add Private API for creating a WebKit2 WebSerializedScriptValue from the internal
+ representation of a WebKit1 WebSerializedJSValue.
+ https://bugs.webkit.org/show_bug.cgi?id=47439
+
+ * WebView/WebSerializedJSValue.mm:
+ (-[WebSerializedJSValue internalRepresentation]):
+ * WebView/WebSerializedJSValuePrivate.h:
+
+2010-10-07 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add Private API for creating a WebKit1 WebSerializedJSValue from the internal
+ representation of a WebKit2 WebSerializedScriptValue.
+ https://bugs.webkit.org/show_bug.cgi?id=47390
+
+ * WebView/WebSerializedJSValue.mm:
+ (-[WebSerializedJSValue initWithInternalRepresentation:]):
+ Set the WebSerializedJSValuePrivate's WebCore::SerializedScriptValue to be the passed in
+ internal representation.
+ * WebView/WebSerializedJSValuePrivate.h: Added.
+
+2010-10-07 Antonio Gomes <agomes@rim.com>
+
+ Reviewed by Simon Fraser.
+
+ [Mac] [DRT] implement setSpatialNavigationEnabled
+ https://bugs.webkit.org/show_bug.cgi?id=47291
+
+ Added the needed bits to make it possible to enabled spatial navigation
+ for the Mac port. For now it is being only used by DRT.
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ (-[WebPreferences isSpatialNavigationEnabled]):
+ (-[WebPreferences setSpatialNavigationEnabled:]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-10-07 Jer Noble <jer.noble@apple.com>
+
+ Fix the Leopard 64-bit build.
+
+ * Configurations/WebKit.xcconfig: Add CoreServices.framework/Frameworks to the
+ framework search path.
+ * WebView/WebVideoFullscreenController.mm: Explicitly import <OSStatus/Power.h>.
+
+2010-10-06 Jer Noble <jer.noble@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Screensaver starts while watching fullscreen playback.
+ https://bugs.webkit.org/show_bug.cgi?id=47299
+ <rdar://problem/8478956>
+
+ To disable the Screen Saver, we need to periodically call UpdateSystemActivity().
+
+ * WebView/WebVideoFullscreenController.h: Added _tickleTimer.
+ * WebView/WebVideoFullscreenController.mm:
+ (-[WebVideoFullscreenController dealloc]): Invalidate _tickleTimer.
+ (-[WebVideoFullscreenController _enableTickleTimer]): Create _tickleTimer.
+ (-[WebVideoFullscreenController _disableTickleTimer]): Invalidate _tickleTimer.
+ (-[WebVideoFullscreenController _tickleTimerFired]): Call UpdateSystemActivity().
+ (-[WebVideoFullscreenController updatePowerAssertions]): Call _enableTickleTimer
+ or _disableTickleTimer.
+
+2010-10-05 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ check for ENABLE(GLIB_SUPPORT) in WebView
+ https://bugs.webkit.org/show_bug.cgi?id=46788
+
+ Use ENABLE(GLIB_SUPPORT) in WebView to guard the glib runloop observer.
+
+ * WebView/WebView.mm:
+ (-[WebView _commonInitializationWithFrameName:groupName:usesDocumentViews:]):
+ (-[WebView _close]):
+ * WebView/WebViewData.h:
+ * WebView/WebViewInternal.h:
+
+2010-10-01 Anders Carlsson <andersca@apple.com>
+
+ Fix Snow Leopard build.
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getProxy):
+
+2010-10-01 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ Add proxy server query function proxyServersForURL and change the Mac plug-in code to use it
+ https://bugs.webkit.org/show_bug.cgi?id=47022
+ <rdar://problem/8504712>
+
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm:
+ (WebKit::NetscapePluginInstanceProxy::getProxy):
+ * Plugins/WebBaseNetscapePluginView.h:
+ * Plugins/WebBaseNetscapePluginView.mm:
+ * Plugins/WebNetscapePluginView.mm:
+ (-[WebNetscapePluginView getVariable:forURL:value:length:]):
+
+2010-09-30 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove remaining calls to deprecatedParseURL
+ https://bugs.webkit.org/show_bug.cgi?id=26599
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMDocument URLWithAttributeString:]):
+ * WebCoreSupport/WebFrameLoaderClient.mm:
+ (WebFrameLoaderClient::createPlugin):
+ Call stripLeadingAndTrailingHTMLSpaces instead of deprecatedParseURL.
+
+2010-09-30 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ -[DOMDocument _documentRange] throws an exception if there is no document element
+ https://bugs.webkit.org/show_bug.cgi?id=46934
+ <rdar://problem/8169260>
+
+ If there is no document element, just return an empty range. Otherwise we'll try to call
+ Range::selectNode with a null Node which will throw a NOT_FOUND exception.
+
+ * DOM/WebDOMOperations.mm:
+ (-[DOMDocument _documentRange]):
+
+2010-09-30 Chris Marrin <cmarrin@apple.com>
+
+ Reviewed by Simon Fraser.
+
+ Make 2D accelerated canvas rendering build on Mac
+ https://bugs.webkit.org/show_bug.cgi?id=46007
+
+ Added ACCELERATED_2D_CANVAS to FeatureDefines
+
+ * Configurations/FeatureDefines.xcconfig:
+
+2010-09-30 Dan Bernstein <mitz@apple.com>
+
+ Reviewed by John Sullivan.
+
+ Add printing SPI allowing full control over shrink-to-fit
+ https://bugs.webkit.org/show_bug.cgi?id=46877
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView _beginPrintModeWithMinimumPageWidth:height:maximumPageWidth:]): Added.
+ * WebView/WebHTMLViewPrivate.h:
+
2010-09-28 Johnny Ding <jnd@chromium.org>
Reviewed by Adam Barth.
diff --git a/WebKit/mac/Configurations/FeatureDefines.xcconfig b/WebKit/mac/Configurations/FeatureDefines.xcconfig
index 81d912f..8732c18 100644
--- a/WebKit/mac/Configurations/FeatureDefines.xcconfig
+++ b/WebKit/mac/Configurations/FeatureDefines.xcconfig
@@ -33,6 +33,11 @@
ENABLE_LINK_PREFETCH = ;
+ENABLE_ACCELERATED_2D_CANVAS = $(ENABLE_ACCELERATED_2D_CANVAS_$(REAL_PLATFORM_NAME));
+ENABLE_ACCELERATED_2D_CANVAS_macosx = $(ENABLE_ACCELERATED_2D_CANVAS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
+ENABLE_ACCELERATED_2D_CANVAS_macosx_1060 = ;
+ENABLE_ACCELERATED_2D_CANVAS_macosx_1070 = ;
+
ENABLE_3D_CANVAS = $(ENABLE_3D_CANVAS_$(REAL_PLATFORM_NAME));
ENABLE_3D_CANVAS_macosx = $(ENABLE_3D_CANVAS_macosx_$(TARGET_MAC_OS_X_VERSION_MAJOR));
ENABLE_3D_CANVAS_macosx_1060 = ENABLE_3D_CANVAS;
@@ -120,4 +125,4 @@ ENABLE_XHTMLMP = ;
ENABLE_XPATH = ENABLE_XPATH;
ENABLE_XSLT = ENABLE_XSLT;
-FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
+FEATURE_DEFINES = $(ENABLE_LINK_PREFETCH) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_3D_CANVAS) $(ENABLE_3D_RENDERING) $(ENABLE_BLOB) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_CLIENT_BASED_GEOLOCATION) $(ENABLE_DATABASE) $(ENABLE_DATAGRID) $(ENABLE_DATALIST) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DIRECTORY_UPLOAD) $(ENABLE_DOM_STORAGE) $(ENABLE_EVENTSOURCE) $(ENABLE_FILTERS) $(ENABLE_FILE_SYSTEM) $(ENABLE_FULLSCREEN_API) $(ENABLE_GEOLOCATION) $(ENABLE_ICONDATABASE) $(ENABLE_IMAGE_RESIZER) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INPUT_SPEECH) $(ENABLE_JAVASCRIPT_DEBUGGER) $(ENABLE_MATHML) $(ENABLE_METER_TAG) $(ENABLE_NOTIFICATIONS) $(ENABLE_OFFLINE_WEB_APPLICATIONS) $(ENABLE_PROGRESS_TAG) $(ENABLE_RUBY) $(ENABLE_SANDBOX) $(ENABLE_SHARED_WORKERS) $(ENABLE_SVG) $(ENABLE_SVG_ANIMATION) $(ENABLE_SVG_AS_IMAGE) $(ENABLE_SVG_DOM_OBJC_BINDINGS) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_FOREIGN_OBJECT) $(ENABLE_SVG_USE) $(ENABLE_VIDEO) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_WML) $(ENABLE_WORKERS) $(ENABLE_XHTMLMP) $(ENABLE_XPATH) $(ENABLE_XSLT);
diff --git a/WebKit/mac/Configurations/Version.xcconfig b/WebKit/mac/Configurations/Version.xcconfig
index 13dd8c0..8739787 100644
--- a/WebKit/mac/Configurations/Version.xcconfig
+++ b/WebKit/mac/Configurations/Version.xcconfig
@@ -22,7 +22,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
MAJOR_VERSION = 534;
-MINOR_VERSION = 10;
+MINOR_VERSION = 11;
TINY_VERSION = 0;
FULL_VERSION = $(MAJOR_VERSION).$(MINOR_VERSION);
diff --git a/WebKit/mac/Configurations/WebKit.xcconfig b/WebKit/mac/Configurations/WebKit.xcconfig
index def76fd..6b8ae6f 100644
--- a/WebKit/mac/Configurations/WebKit.xcconfig
+++ b/WebKit/mac/Configurations/WebKit.xcconfig
@@ -44,7 +44,7 @@ FRAMEWORK_SEARCH_PATHS_iphoneos_Debug = $(BUILT_PRODUCTS_DIR) $(PRODUCTION_FRAME
FRAMEWORK_SEARCH_PATHS_iphoneos_Release = $(FRAMEWORK_SEARCH_PATHS_iphoneos_Debug);
FRAMEWORK_SEARCH_PATHS_iphoneos_Production = $(PRODUCTION_FRAMEWORKS_DIR);
FRAMEWORK_SEARCH_PATHS_iphonesimulator = $(FRAMEWORK_SEARCH_PATHS_iphoneos_$(CONFIGURATION));
-FRAMEWORK_SEARCH_PATHS_macosx = $(UMBRELLA_FRAMEWORKS_DIR) $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(FRAMEWORK_SEARCH_PATHS);
+FRAMEWORK_SEARCH_PATHS_macosx = $(UMBRELLA_FRAMEWORKS_DIR) $(SYSTEM_LIBRARY_DIR)/Frameworks/ApplicationServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Carbon.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/Quartz.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/Frameworks/CoreServices.framework/Frameworks $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks $(FRAMEWORK_SEARCH_PATHS);
GCC_PREFIX_HEADER = mac/WebKitPrefix.h;
GCC_PREPROCESSOR_DEFINITIONS = $(DEBUG_DEFINES) $(FEATURE_DEFINES) FRAMEWORK_NAME=WebKit WEBKIT_VERSION_MIN_REQUIRED=WEBKIT_VERSION_LATEST $(GCC_PREPROCESSOR_DEFINITIONS);
diff --git a/WebKit/mac/DOM/WebDOMOperations.mm b/WebKit/mac/DOM/WebDOMOperations.mm
index 3d69836..5e09308 100644
--- a/WebKit/mac/DOM/WebDOMOperations.mm
+++ b/WebKit/mac/DOM/WebDOMOperations.mm
@@ -38,8 +38,8 @@
#import "WebFramePrivate.h"
#import "WebKitNSStringExtras.h"
#import <JavaScriptCore/APICast.h>
-#import <WebCore/CSSHelper.h>
#import <WebCore/Document.h>
+#import <WebCore/HTMLParserIdioms.h>
#import <WebCore/JSElement.h>
#import <WebCore/LegacyWebArchive.h>
#import <WebCore/markup.h>
@@ -129,24 +129,21 @@ using namespace JSC;
- (NSURL *)URLWithAttributeString:(NSString *)string
{
- return core(self)->completeURL(deprecatedParseURL(string));
+ return core(self)->completeURL(stripLeadingAndTrailingHTMLSpaces(string));
}
@end
@implementation DOMDocument (WebDOMDocumentOperationsInternal)
-/* This doesn't appear to be used by anyone. We should consider removing this. */
-- (DOMRange *)_createRangeWithNode:(DOMNode *)node
+- (DOMRange *)_documentRange
{
DOMRange *range = [self createRange];
- [range selectNode:node];
- return range;
-}
-- (DOMRange *)_documentRange
-{
- return [self _createRangeWithNode:[self documentElement]];
+ if (DOMNode* documentElement = [self documentElement])
+ [range selectNode:documentElement];
+
+ return range;
}
@end
diff --git a/WebKit/mac/Misc/MailQuirksUserScript.js b/WebKit/mac/Misc/MailQuirksUserScript.js
new file mode 100644
index 0000000..e36c21b
--- /dev/null
+++ b/WebKit/mac/Misc/MailQuirksUserScript.js
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * 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.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND 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 THE COPYRIGHT
+ * OWNER OR 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.
+ */
+
+(function() {
+ function childrenBefore(parent, stopAt)
+ {
+ var children = [];
+ for (var child = parent.firstChild; child != stopAt; child = child.nextSibling)
+ children.push(child);
+ return children;
+ }
+
+ // If html or body is missing, Mail.app's assumption that
+ // document.firstChild.firstChild == document.body is wrong anyway,
+ // so return null to not move anything.
+ if (!document.documentElement || !document.body)
+ return;
+
+ var children = childrenBefore(document, document.documentElement);
+ children = children.concat(childrenBefore(document.documentElement, document.body));
+
+ for (var i = children.length - 1; i >= 0; i--) {
+ var child = children[i];
+ // It's not possible to move doctype nodes into the body, so just remove them.
+ if (child.nodeType == child.DOCUMENT_TYPE_NODE)
+ child.parentNode.removeChild(child);
+ else
+ document.body.insertBefore(child, document.body.firstChild);
+ }
+})();
diff --git a/WebKit/mac/Misc/WebIconFetcher.h b/WebKit/mac/Misc/WebIconFetcher.h
deleted file mode 100644
index d27ad94..0000000
--- a/WebKit/mac/Misc/WebIconFetcher.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. 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. ``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
- * 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.
- */
-
-#import <Cocoa/Cocoa.h>
-
-@class WebIconFetcherPrivate;
-
-@interface WebIconFetcher : NSObject {
- WebIconFetcherPrivate *_private;
-}
-
-- (void)cancel;
-
-@end
diff --git a/WebKit/mac/Misc/WebIconFetcher.mm b/WebKit/mac/Misc/WebIconFetcher.mm
deleted file mode 100644
index a31ab7d..0000000
--- a/WebKit/mac/Misc/WebIconFetcher.mm
+++ /dev/null
@@ -1,128 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. 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. ``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
- * 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.
- */
-
-#import "WebIconFetcher.h"
-
-#import "WebFrameInternal.h"
-#import "WebIconFetcherInternal.h"
-
-#import <WebCore/Frame.h>
-#import <WebCore/IconFetcher.h>
-#import <WebCore/SharedBuffer.h>
-#import <wtf/PassRefPtr.h>
-
-using namespace WebCore;
-
-class WebIconFetcherClient : public IconFetcherClient {
-public:
- WebIconFetcherClient(id target, SEL selector)
- : m_target(target)
- , m_selector(selector)
- {
- }
-
- virtual void finishedFetchingIcon(PassRefPtr<SharedBuffer> iconData)
- {
- RetainPtr<NSData> data;
- if (iconData)
- data = iconData->createNSData();
-
- [m_target performSelector:m_selector withObject:m_fetcher.get() withObject:data.get()];
-
- delete this;
- }
-
- void setFetcher(WebIconFetcher *fetcher) { m_fetcher = fetcher; }
-
-private:
- RetainPtr<WebIconFetcher> m_fetcher;
- id m_target;
- SEL m_selector;
-};
-
-@implementation WebIconFetcher
-
-- (id)init
-{
- return nil;
-}
-
-- (void)dealloc
-{
- if (_private)
- reinterpret_cast<IconFetcher*>(_private)->deref();
-
- [super dealloc];
-}
-
-- (void)finalize
-{
- if (_private)
- reinterpret_cast<IconFetcher*>(_private)->deref();
-
- [super finalize];
-}
-
-- (void)cancel
-{
- reinterpret_cast<IconFetcher*>(_private)->cancel();
-}
-
-@end
-
-@implementation WebIconFetcher (WebInternal)
-
-- (id)_initWithIconFetcher:(PassRefPtr<IconFetcher>)iconFetcher client:(WebIconFetcherClient *)client
-{
- ASSERT(iconFetcher);
-
- self = [super init];
- if (!self)
- return nil;
-
- client->setFetcher(self);
- _private = reinterpret_cast<WebIconFetcherPrivate*>(iconFetcher.releaseRef());
-
- return self;
-}
-
-+ (WebIconFetcher *)_fetchApplicationIconForFrame:(WebFrame *)webFrame
- target:(id)target
- selector:(SEL)selector
-{
- Frame* frame = core(webFrame);
-
- WebIconFetcherClient* client = new WebIconFetcherClient(target, selector);
-
- RefPtr<IconFetcher> fetcher = IconFetcher::create(frame, client);
-
- if (!fetcher)
- return nil;
-
- return [[[WebIconFetcher alloc] _initWithIconFetcher:fetcher.release() client:client] autorelease];
-}
-
-@end
-
diff --git a/WebKit/mac/Misc/WebIconFetcherInternal.h b/WebKit/mac/Misc/WebIconFetcherInternal.h
deleted file mode 100644
index 5951ef9..0000000
--- a/WebKit/mac/Misc/WebIconFetcherInternal.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. 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. ``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
- * 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.
- */
-
-#import <WebKit/WebIconFetcher.h>
-#import <wtf/Forward.h>
-
-namespace WebCore {
- class IconFetcher;
-}
-
-@class WebFrame;
-
-@interface WebIconFetcher (WebInternal)
-
-+ (WebIconFetcher *)_fetchApplicationIconForFrame:(WebFrame *)webFrame
- target:(id)target
- selector:(SEL)selector;
-
-@end
-
diff --git a/WebKit/mac/Misc/WebKitNSStringExtras.mm b/WebKit/mac/Misc/WebKitNSStringExtras.mm
index 8fc12bd..4785de5 100644
--- a/WebKit/mac/Misc/WebKitNSStringExtras.mm
+++ b/WebKit/mac/Misc/WebKitNSStringExtras.mm
@@ -97,7 +97,7 @@ static BOOL canUseFastRenderer(const UniChar *buffer, unsigned length)
CGFloat blue;
CGFloat alpha;
[[textColor colorUsingColorSpaceName:NSDeviceRGBColorSpace] getRed:&red green:&green blue:&blue alpha:&alpha];
- graphicsContext.setFillColor(makeRGBA(red * 255, green * 255, blue * 255, alpha * 255), DeviceColorSpace);
+ graphicsContext.setFillColor(makeRGBA(red * 255, green * 255, blue * 255, alpha * 255), ColorSpaceDeviceRGB);
webCoreFont.drawText(&graphicsContext, run, FloatPoint(point.x, (flipped ? point.y : (-1 * point.y))));
diff --git a/WebKit/mac/Misc/WebNSUserDefaultsExtras.m b/WebKit/mac/Misc/WebNSUserDefaultsExtras.m
deleted file mode 100644
index 383d202..0000000
--- a/WebKit/mac/Misc/WebNSUserDefaultsExtras.m
+++ /dev/null
@@ -1,131 +0,0 @@
-/*
- * Copyright (C) 2005 Apple Computer, Inc. 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.
- * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
- * its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE 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 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.
- */
-
-#import "WebNSUserDefaultsExtras.h"
-
-#import "WebNSObjectExtras.h"
-#import <WebKitSystemInterface.h>
-#import <wtf/Assertions.h>
-
-@implementation NSString (WebNSUserDefaultsPrivate)
-
-- (NSString *)_webkit_HTTPStyleLanguageCode
-{
- // Look up the language code using CFBundle.
- NSString *languageCode = self;
- NSString *preferredLanguageCode = WebCFAutorelease(WKCopyCFLocalizationPreferredName((CFStringRef)self));
-
- if (preferredLanguageCode)
- languageCode = preferredLanguageCode;
-
- // Make the string lowercase.
- NSString *lowercaseLanguageCode = [languageCode lowercaseString];
-
- // Turn a '_' into a '-' if it appears after a 2-letter language code.
- if ([lowercaseLanguageCode length] < 3 || [lowercaseLanguageCode characterAtIndex:2] != '_') {
- return lowercaseLanguageCode;
- }
- NSMutableString *result = [lowercaseLanguageCode mutableCopy];
- [result replaceCharactersInRange:NSMakeRange(2, 1) withString:@"-"];
- return [result autorelease];
-}
-
-@end
-
-@implementation NSUserDefaults (WebNSUserDefaultsExtras)
-
-static NSString *preferredLanguageCode = nil;
-static NSLock *preferredLanguageLock = nil;
-static pthread_once_t preferredLanguageLockOnce = PTHREAD_ONCE_INIT;
-static pthread_once_t addDefaultsChangeObserverOnce = PTHREAD_ONCE_INIT;
-
-static void makeLock(void)
-{
- preferredLanguageLock = [[NSLock alloc] init];
-}
-
-+ (void)_webkit_ensureAndLockPreferredLanguageLock
-{
- pthread_once(&preferredLanguageLockOnce, makeLock);
- [preferredLanguageLock lock];
-}
-
-+ (void)_webkit_defaultsDidChange
-{
- [self _webkit_ensureAndLockPreferredLanguageLock];
-
- [preferredLanguageCode release];
- preferredLanguageCode = nil;
-
- [preferredLanguageLock unlock];
-}
-
-static void addDefaultsChangeObserver(void)
-{
- [[NSNotificationCenter defaultCenter] addObserver:[NSUserDefaults class]
- selector:@selector(_webkit_defaultsDidChange)
- name:NSUserDefaultsDidChangeNotification
- object:[NSUserDefaults standardUserDefaults]];
-}
-
-+ (void)_webkit_addDefaultsChangeObserver
-{
- pthread_once(&addDefaultsChangeObserverOnce, addDefaultsChangeObserver);
-}
-
-+ (NSString *)_webkit_preferredLanguageCode
-{
- // Get this outside the lock since it might block on the defaults lock, while we are inside registerDefaults:.
- NSUserDefaults *standardDefaults = [self standardUserDefaults];
-
- BOOL addObserver = NO;
-
- [self _webkit_ensureAndLockPreferredLanguageLock];
-
- if (!preferredLanguageCode) {
- NSArray *languages = [standardDefaults stringArrayForKey:@"AppleLanguages"];
- if ([languages count] == 0) {
- preferredLanguageCode = [@"en" retain];
- } else {
- preferredLanguageCode = [[[languages objectAtIndex:0] _webkit_HTTPStyleLanguageCode] copy];
- }
- addObserver = YES;
- }
-
- NSString *code = [[preferredLanguageCode retain] autorelease];
-
- [preferredLanguageLock unlock];
-
- if (addObserver) {
- [self _webkit_addDefaultsChangeObserver];
- }
-
- return code;
-}
-
-@end
diff --git a/WebKit/mac/Misc/WebNSUserDefaultsExtras.mm b/WebKit/mac/Misc/WebNSUserDefaultsExtras.mm
new file mode 100644
index 0000000..a255935
--- /dev/null
+++ b/WebKit/mac/Misc/WebNSUserDefaultsExtras.mm
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2005, 2010 Apple, Inc. 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE 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 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.
+ */
+
+#import "WebNSUserDefaultsExtras.h"
+
+#import <WebCore/Language.h>
+#import <wtf/text/WTFString.h>
+
+using namespace WebCore;
+
+@implementation NSUserDefaults (WebNSUserDefaultsExtras)
+
++ (NSString *)_webkit_preferredLanguageCode
+{
+ return defaultLanguage();
+}
+
+@end
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
index e03bc27..0b9036a 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
@@ -50,6 +50,7 @@
#import <WebCore/FrameLoader.h>
#import <WebCore/FrameTree.h>
#import <WebCore/KURL.h>
+#import <WebCore/ProxyServer.h>
#import <WebCore/SecurityOrigin.h>
#import <WebCore/ScriptController.h>
#import <WebCore/ScriptValue.h>
@@ -1557,7 +1558,8 @@ bool NetscapePluginInstanceProxy::getProxy(data_t urlData, mach_msg_type_number_
if (!url)
return false;
- WTF::CString proxyStringUTF8 = proxiesForURL(url);
+ Vector<ProxyServer> proxyServers = proxyServersForURL(url, 0);
+ WTF::CString proxyStringUTF8 = toString(proxyServers).utf8();
proxyLength = proxyStringUTF8.length();
mig_allocate(reinterpret_cast<vm_address_t*>(&proxyData), proxyLength);
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
index 9a29cc2..1a4b6bb 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.h
@@ -145,10 +145,6 @@ class WebHaltablePlugin;
namespace WebKit {
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
-WTF::CString proxiesForURL(NSURL *);
-#endif
-
bool getAuthenticationInfo(const char* protocolStr, const char* hostStr, int32_t port, const char* schemeStr, const char* realmStr,
WTF::CString& username, WTF::CString& password);
}
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index 4966716..708b017 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -960,66 +960,6 @@ String WebHaltablePlugin::pluginName() const
namespace WebKit {
-#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
-CString proxiesForURL(NSURL *url)
-{
- RetainPtr<CFDictionaryRef> systemProxies(AdoptCF, CFNetworkCopySystemProxySettings());
- if (!systemProxies)
- return "DIRECT";
-
- RetainPtr<CFArrayRef> proxiesForURL(AdoptCF, CFNetworkCopyProxiesForURL((CFURLRef)url, systemProxies.get()));
- CFIndex proxyCount = proxiesForURL ? CFArrayGetCount(proxiesForURL.get()) : 0;
- if (!proxyCount)
- return "DIRECT";
-
- // proxiesForURL is a CFArray of CFDictionaries. Each dictionary represents a proxy.
- // The format of the result should be:
- // "PROXY host[:port]" (for HTTP proxy) or
- // "SOCKS host[:port]" (for SOCKS proxy) or
- // A combination of the above, separated by semicolon, in the order that they should be tried.
- String proxies;
- for (CFIndex i = 0; i < proxyCount; ++i) {
- CFDictionaryRef proxy = static_cast<CFDictionaryRef>(CFArrayGetValueAtIndex(proxiesForURL.get(), i));
- if (!proxy)
- continue;
-
- CFStringRef type = static_cast<CFStringRef>(CFDictionaryGetValue(proxy, kCFProxyTypeKey));
- bool isHTTP = type == kCFProxyTypeHTTP || type == kCFProxyTypeHTTPS;
- bool isSOCKS = type == kCFProxyTypeSOCKS;
-
- // We can only report HTTP and SOCKS proxies.
- if (!isHTTP && !isSOCKS)
- continue;
-
- CFStringRef host = static_cast<CFStringRef>(CFDictionaryGetValue(proxy, kCFProxyHostNameKey));
- CFNumberRef port = static_cast<CFNumberRef>(CFDictionaryGetValue(proxy, kCFProxyPortNumberKey));
-
- // If we are inserting multiple entries, add a separator
- if (!proxies.isEmpty())
- proxies += ";";
-
- if (isHTTP)
- proxies += "PROXY ";
- else if (isSOCKS)
- proxies += "SOCKS ";
-
- proxies += host;
-
- if (port) {
- SInt32 intPort;
- CFNumberGetValue(port, kCFNumberSInt32Type, &intPort);
-
- proxies += ":" + String::number(intPort);
- }
- }
-
- if (proxies.isEmpty())
- return "DIRECT";
-
- return proxies.utf8();
-}
-#endif
-
bool getAuthenticationInfo(const char* protocolStr, const char* hostStr, int32_t port, const char* schemeStr, const char* realmStr,
CString& username, CString& password)
{
diff --git a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
index a5e8f73..3d2b68e 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginEventHandlerCarbon.mm
@@ -174,7 +174,7 @@ void WebNetscapePluginEventHandlerCarbon::mouseEntered(NSEvent* theEvent)
EventRecord event;
getCarbonEvent(&event, theEvent);
- event.what = adjustCursorEvent;
+ event.what = NPEventType_AdjustCursorEvent;
BOOL acceptedEvent;
acceptedEvent = sendEvent(&event);
@@ -187,7 +187,7 @@ void WebNetscapePluginEventHandlerCarbon::mouseExited(NSEvent* theEvent)
EventRecord event;
getCarbonEvent(&event, theEvent);
- event.what = adjustCursorEvent;
+ event.what = NPEventType_AdjustCursorEvent;
BOOL acceptedEvent;
acceptedEvent = sendEvent(&event);
@@ -204,7 +204,7 @@ void WebNetscapePluginEventHandlerCarbon::mouseMoved(NSEvent* theEvent)
EventRecord event;
getCarbonEvent(&event, theEvent);
- event.what = adjustCursorEvent;
+ event.what = NPEventType_AdjustCursorEvent;
BOOL acceptedEvent;
acceptedEvent = sendEvent(&event);
@@ -271,14 +271,14 @@ void WebNetscapePluginEventHandlerCarbon::focusChanged(bool hasFocus)
getCarbonEvent(&event);
bool acceptedEvent;
if (hasFocus) {
- event.what = getFocusEvent;
+ event.what = NPEventType_GetFocusEvent;
acceptedEvent = sendEvent(&event);
- LOG(PluginEvents, "NPP_HandleEvent(getFocusEvent): %d", acceptedEvent);
+ LOG(PluginEvents, "NPP_HandleEvent(NPEventType_GetFocusEvent): %d", acceptedEvent);
installKeyEventHandler();
} else {
- event.what = loseFocusEvent;
+ event.what = NPEventType_LoseFocusEvent;
acceptedEvent = sendEvent(&event);
- LOG(PluginEvents, "NPP_HandleEvent(loseFocusEvent): %d", acceptedEvent);
+ LOG(PluginEvents, "NPP_HandleEvent(NPEventType_LoseFocusEvent): %d", acceptedEvent);
removeKeyEventHandler();
}
}
diff --git a/WebKit/mac/Plugins/WebNetscapePluginView.mm b/WebKit/mac/Plugins/WebNetscapePluginView.mm
index ff0ca77..48574bf 100644
--- a/WebKit/mac/Plugins/WebNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebNetscapePluginView.mm
@@ -66,6 +66,7 @@
#import <WebCore/HTMLPlugInElement.h>
#import <WebCore/Page.h>
#import <WebCore/PluginMainThreadScheduler.h>
+#import <WebCore/ProxyServer.h>
#import <WebCore/ScriptController.h>
#import <WebCore/SecurityOrigin.h>
#import <WebCore/SoftLinking.h>
@@ -2239,7 +2240,8 @@ static inline void getNPRect(const NSRect& nr, NPRect& npr)
if (!URL)
break;
- CString proxiesUTF8 = proxiesForURL(URL);
+ Vector<ProxyServer> proxyServers = proxyServersForURL(URL, 0);
+ CString proxiesUTF8 = toString(proxyServers).utf8();
*value = static_cast<char*>(NPN_MemAlloc(proxiesUTF8.length()));
memcpy(*value, proxiesUTF8.data(), proxiesUTF8.length());
diff --git a/WebKit/mac/Storage/WebDatabaseTrackerClient.mm b/WebKit/mac/Storage/WebDatabaseTrackerClient.mm
index 89626fb..2913739 100644
--- a/WebKit/mac/Storage/WebDatabaseTrackerClient.mm
+++ b/WebKit/mac/Storage/WebDatabaseTrackerClient.mm
@@ -32,6 +32,7 @@
#import "WebDatabaseManagerPrivate.h"
#import "WebSecurityOriginInternal.h"
+#import <wtf/MainThread.h>
#import <wtf/RetainPtr.h>
#import <WebCore/SecurityOrigin.h>
@@ -50,10 +51,42 @@ WebDatabaseTrackerClient::WebDatabaseTrackerClient()
WebDatabaseTrackerClient::~WebDatabaseTrackerClient()
{
}
-
+
+class DidModifyOriginData : public Noncopyable {
+public:
+ static void dispatchToMainThread(WebDatabaseTrackerClient* client, SecurityOrigin* origin)
+ {
+ DidModifyOriginData* context = new DidModifyOriginData(client, origin->threadsafeCopy());
+ callOnMainThread(&DidModifyOriginData::dispatchDidModifyOriginOnMainThread, context);
+ }
+
+private:
+ DidModifyOriginData(WebDatabaseTrackerClient* client, PassRefPtr<SecurityOrigin> origin)
+ : client(client)
+ , origin(origin)
+ {
+ }
+
+ static void dispatchDidModifyOriginOnMainThread(void* context)
+ {
+ ASSERT(isMainThread());
+ DidModifyOriginData* info = static_cast<DidModifyOriginData*>(context);
+ info->client->dispatchDidModifyOrigin(info->origin.get());
+ delete info;
+ }
+
+ WebDatabaseTrackerClient* client;
+ RefPtr<SecurityOrigin> origin;
+};
+
void WebDatabaseTrackerClient::dispatchDidModifyOrigin(SecurityOrigin* origin)
{
- RetainPtr<WebSecurityOrigin> webSecurityOrigin(AdoptNS, [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:origin]);
+ if (!isMainThread()) {
+ DidModifyOriginData::dispatchToMainThread(this, origin);
+ return;
+ }
+
+ RetainPtr<WebSecurityOrigin> webSecurityOrigin(AdoptNS, [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:origin]);
[[NSNotificationCenter defaultCenter] postNotificationName:WebDatabaseDidModifyOriginNotification
object:webSecurityOrigin.get()];
@@ -61,6 +94,11 @@ void WebDatabaseTrackerClient::dispatchDidModifyOrigin(SecurityOrigin* origin)
void WebDatabaseTrackerClient::dispatchDidModifyDatabase(SecurityOrigin* origin, const String& databaseIdentifier)
{
+ if (!isMainThread()) {
+ DidModifyOriginData::dispatchToMainThread(this, origin);
+ return;
+ }
+
RetainPtr<WebSecurityOrigin> webSecurityOrigin(AdoptNS, [[WebSecurityOrigin alloc] _initWithWebCoreSecurityOrigin:origin]);
RetainPtr<NSDictionary> userInfo(AdoptNS, [[NSDictionary alloc]
initWithObjectsAndKeys:(NSString *)databaseIdentifier, WebDatabaseIdentifierKey, nil]);
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index cef552b..c3fd457 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -94,10 +94,8 @@
#import <WebCore/HTMLFrameElement.h>
#import <WebCore/HTMLFrameOwnerElement.h>
#import <WebCore/HTMLHeadElement.h>
-#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
-#import <WebCore/HTMLMediaElement.h>
-#endif
#import <WebCore/HTMLNames.h>
+#import <WebCore/HTMLParserIdioms.h>
#import <WebCore/HTMLPlugInElement.h>
#import <WebCore/HistoryItem.h>
#import <WebCore/HitTestResult.h>
@@ -113,7 +111,6 @@
#import <WebCore/ResourceLoader.h>
#import <WebCore/ResourceRequest.h>
#import <WebCore/ScriptController.h>
-#import <WebCore/ScriptString.h>
#import <WebCore/SharedBuffer.h>
#import <WebCore/WebCoreObjCExtras.h>
#import <WebCore/Widget.h>
@@ -124,6 +121,10 @@
#import <wtf/PassRefPtr.h>
#import <wtf/Threading.h>
+#if ENABLE(PLUGIN_PROXY_FOR_VIDEO)
+#import <WebCore/HTMLMediaElement.h>
+#endif
+
#if ENABLE(JAVA_BRIDGE)
#import "WebJavaPlugIn.h"
#endif
@@ -1668,7 +1669,7 @@ PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLP
if (errorCode && m_webFrame) {
WebResourceDelegateImplementationCache* implementations = WebViewGetResourceLoadDelegateImplementations(webView);
if (implementations->plugInFailedWithErrorFunc) {
- KURL pluginPageURL = document->completeURL(deprecatedParseURL(parameterValue(paramNames, paramValues, "pluginspage")));
+ KURL pluginPageURL = document->completeURL(stripLeadingAndTrailingHTMLSpaces(parameterValue(paramNames, paramValues, "pluginspage")));
if (!pluginPageURL.protocolInHTTPFamily())
pluginPageURL = KURL();
NSString *pluginName = pluginPackage ? (NSString *)[pluginPackage pluginInfo].name : nil;
diff --git a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
index d4d0213..b08c161 100644
--- a/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebInspectorClient.mm
@@ -217,11 +217,9 @@ void WebInspectorFrontendClient::updateWindowTitle() const
return nil;
// Keep preferences separate from the rest of the client, making sure we are using expected preference values.
- // One reason this is good is that it keeps the inspector out of history via "private browsing".
WebPreferences *preferences = [[WebPreferences alloc] init];
[preferences setAutosaves:NO];
- [preferences setPrivateBrowsingEnabled:YES];
[preferences setLoadsImagesAutomatically:YES];
[preferences setAuthorAndUserStylesEnabled:YES];
[preferences setJavaScriptEnabled:YES];
@@ -358,8 +356,8 @@ void WebInspectorFrontendClient::updateWindowTitle() const
_visible = YES;
// If no preference is set - default to an attached window. This is important for inspector LayoutTests.
- String shouldAttach = [_inspectedWebView page]->inspectorController()->setting(InspectorController::inspectorStartsAttachedSettingName());
- _shouldAttach = shouldAttach != "false";
+ // FIXME: This flag can be fetched directly from the flags storage.
+ _shouldAttach = [_inspectedWebView page]->inspectorController()->inspectorStartsAttached();
if (_shouldAttach && !_frontendClient->canAttachWindow())
_shouldAttach = NO;
@@ -394,7 +392,8 @@ void WebInspectorFrontendClient::updateWindowTitle() const
if (_attachedToInspectedWebView)
return;
- [_inspectedWebView page]->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "true");
+ // FIXME: This flag can be saved directly to the flags storage.
+ [_inspectedWebView page]->inspectorController()->setInspectorStartsAttached(true);
[self close];
[self showWindow:nil];
@@ -405,7 +404,8 @@ void WebInspectorFrontendClient::updateWindowTitle() const
if (!_attachedToInspectedWebView)
return;
- [_inspectedWebView page]->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "false");
+ // FIXME: This flag can be saved to the flags storage directly.
+ [_inspectedWebView page]->inspectorController()->setInspectorStartsAttached(false);
[self close];
[self showWindow:nil];
diff --git a/WebKit/mac/WebCoreSupport/WebSystemInterface.mm b/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
index 47b16b2..03cb33f 100644
--- a/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
+++ b/WebKit/mac/WebCoreSupport/WebSystemInterface.mm
@@ -44,6 +44,7 @@ void InitWebCoreSystemInterface(void)
INIT(AdvanceDefaultButtonPulseAnimation);
INIT(CGContextGetShouldSmoothFonts);
+ INIT(CopyCFLocalizationPreferredName);
INIT(CopyCONNECTProxyResponse);
INIT(CopyNSURLResponseStatusLine);
INIT(CreateCustomCFReadStream);
diff --git a/WebKit/mac/WebCoreSupport/WebViewFactory.mm b/WebKit/mac/WebCoreSupport/WebViewFactory.mm
index 6c7347f..055e3b4 100644
--- a/WebKit/mac/WebCoreSupport/WebViewFactory.mm
+++ b/WebKit/mac/WebCoreSupport/WebViewFactory.mm
@@ -63,11 +63,6 @@
ASSERT([[self sharedFactory] isKindOfClass:self]);
}
-- (NSString *)defaultLanguageCode
-{
- return [NSUserDefaults _webkit_preferredLanguageCode];
-}
-
- (BOOL)objectIsTextMarker:(id)object
{
return object != nil && CFGetTypeID(object) == WKGetAXTextMarkerTypeID();
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm
index 02696f4..4f8c1ba 100644
--- a/WebKit/mac/WebView/WebFrame.mm
+++ b/WebKit/mac/WebView/WebFrame.mm
@@ -44,7 +44,6 @@
#import "WebFrameViewInternal.h"
#import "WebHTMLView.h"
#import "WebHTMLViewInternal.h"
-#import "WebIconFetcherInternal.h"
#import "WebKitStatisticsPrivate.h"
#import "WebKitVersionChecks.h"
#import "WebNSObjectExtras.h"
@@ -530,6 +529,26 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return [[[NSString alloc] initWithCharactersNoCopy:buf length:length freeWhenDone:YES] autorelease];
}
+- (BOOL)_shouldFlattenCompositingLayers:(CGContextRef)context
+{
+ // -currentContextDrawingToScreen returns YES for bitmap contexts.
+ BOOL isPrinting = ![NSGraphicsContext currentContextDrawingToScreen];
+ if (isPrinting)
+ return YES;
+
+ if (!WKCGContextIsBitmapContext(context))
+ return NO;
+
+ // If we're drawing into a bitmap, we might be snapshotting, or drawing into a layer-backed view.
+ if ([getWebView(self) _usesDocumentViews]) {
+ id documentView = [_private->webFrameView documentView];
+ if ([documentView isKindOfClass:[WebHTMLView class]] && [(WebHTMLView *)documentView _web_isDrawingIntoLayer])
+ return NO;
+ }
+
+ return [getWebView(self) _includesFlattenedCompositingLayersWhenDrawingToBitmap];
+}
+
- (void)_drawRect:(NSRect)rect contentsOnly:(BOOL)contentsOnly
{
ASSERT([[NSGraphicsContext currentContext] isFlipped]);
@@ -546,7 +565,7 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
if (parentView)
shouldFlatten = parentView->paintBehavior() & PaintBehaviorFlattenCompositingLayers;
} else
- shouldFlatten = WKCGContextIsBitmapContext(ctx) && [getWebView(self) _includesFlattenedCompositingLayersWhenDrawingToBitmap];
+ shouldFlatten = [self _shouldFlattenCompositingLayers:ctx];
PaintBehavior oldBehavior = PaintBehaviorNormal;
if (shouldFlatten) {
@@ -1008,14 +1027,6 @@ static inline WebDataSource *dataSource(DocumentLoader* loader)
return _private->coreFrame->domWindow()->pendingUnloadEventListeners();
}
-- (WebIconFetcher *)fetchApplicationIcon:(id)target
- selector:(SEL)selector
-{
- return [WebIconFetcher _fetchApplicationIconForFrame:self
- target:target
- selector:selector];
-}
-
- (void)_setIsDisconnected:(bool)isDisconnected
{
_private->coreFrame->setIsDisconnected(isDisconnected);
diff --git a/WebKit/mac/WebView/WebFramePrivate.h b/WebKit/mac/WebView/WebFramePrivate.h
index 9cb6232..b0cb0f3 100644
--- a/WebKit/mac/WebView/WebFramePrivate.h
+++ b/WebKit/mac/WebView/WebFramePrivate.h
@@ -38,7 +38,6 @@
@class DOMDocumentFragment;
@class DOMNode;
@class DOMRange;
-@class WebIconFetcher;
@class WebScriptObject;
@class WebScriptWorld;
@@ -87,9 +86,6 @@ typedef enum {
- (unsigned)_pendingFrameUnloadEventCount;
-- (WebIconFetcher *)fetchApplicationIcon:(id)target
- selector:(SEL)selector;
-
- (void)_setIsDisconnected:(bool)isDisconnected;
- (void)_setExcludeFromTextSearch:(bool)exclude;
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index 02d32d9..ec2473f 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -456,6 +456,7 @@ struct WebHTMLViewInterpretKeyEventsParameters {
#if USE(ACCELERATED_COMPOSITING)
NSView *layerHostingView;
+ BOOL drawingIntoLayer;
#endif
NSEvent *mouseDownEvent; // Kept after handling the event.
@@ -2232,6 +2233,22 @@ static void _updateMouseoverTimerCallback(CFRunLoopTimerRef timer, void *info)
return _private->printing;
}
+- (BOOL)_beginPrintModeWithMinimumPageWidth:(CGFloat)minimumPageWidth height:(CGFloat)minimumPageHeight maximumPageWidth:(CGFloat)maximumPageWidth
+{
+ Frame* frame = core([self _frame]);
+ if (!frame)
+ return NO;
+
+ if (frame->document() && frame->document()->isFrameSet()) {
+ minimumPageWidth = 0;
+ minimumPageHeight = 0;
+ maximumPageWidth = 0;
+ }
+
+ [self _setPrinting:YES minimumPageWidth:minimumPageWidth height:minimumPageHeight maximumPageWidth:maximumPageWidth adjustViewSize:YES paginateScreenContent:[self _isInScreenPaginationMode]];
+ return YES;
+}
+
- (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth height:(float)pageHeight shrinkToFit:(BOOL)shrinkToFit
{
Frame* frame = core([self _frame]);
@@ -3401,6 +3418,9 @@ WEBCORE_COMMAND(yankAndSelect)
[webView _setNeedsOneShotDrawingSynchronization:NO];
}
#endif
+
+ if (webView)
+ CallUIDelegate(webView, @selector(webView:didDrawFrame:), [self _frame]);
}
// Turn off the additional clip while computing our visibleRect.
@@ -5552,6 +5572,14 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
[viewLayer setTransform:CATransform3DMakeScale(scaleFactor, scaleFactor, 1)];
#endif
+ if ([self layer]) {
+ // If we are in a layer-backed view, we need to manually initialize the geometry for our layer.
+ [viewLayer setBounds:NSRectToCGRect([_private->layerHostingView bounds])];
+ [viewLayer setAnchorPoint:CGPointMake(0, [self isFlipped] ? 1 : 0)];
+ CGPoint layerPosition = NSPointToCGPoint([self convertPointToBase:[_private->layerHostingView frame].origin]);
+ [viewLayer setPosition:layerPosition];
+ }
+
[_private->layerHostingView setLayer:viewLayer];
[_private->layerHostingView setWantsLayer:YES];
@@ -5591,8 +5619,6 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
NSRect layerViewFrame = [self bounds];
if (layerViewFrame.size.height > maxHeight) {
- CGFloat documentHeight = layerViewFrame.size.height;
-
// Clamp the size of the view to <= maxHeight to avoid the bug.
layerViewFrame.size.height = maxHeight;
NSRect visibleRect = [[self enclosingScrollView] documentVisibleRect];
@@ -5602,14 +5628,34 @@ static CGPoint coreGraphicsScreenPointForAppKitScreenPoint(NSPoint point)
layerViewFrame.origin.y = topOffset;
// Compensate for the moved view by adjusting the sublayer transform on the view's layer (using flipped coords).
- CGFloat bottomOffset = documentHeight - layerViewFrame.size.height - topOffset;
- [[_private->layerHostingView layer] setSublayerTransform:CATransform3DMakeTranslation(0, -bottomOffset, 0)];
+ CATransform3D flipTransform = CATransform3DMakeTranslation(0, topOffset, 0);
+ flipTransform = CATransform3DScale(flipTransform, 1, -1, 1);
+ [[_private->layerHostingView layer] setSublayerTransform:flipTransform];
}
[_private->layerHostingView _updateLayerGeometryFromView]; // Workaround for <rdar://problem/7071636>
[_private->layerHostingView setFrame:layerViewFrame];
}
#endif // defined(BUILDING_ON_LEOPARD)
+
+- (void)drawLayer:(CALayer *)layer inContext:(CGContextRef)ctx
+{
+ if (_private) {
+ ASSERT(!_private->drawingIntoLayer);
+ _private->drawingIntoLayer = YES;
+ }
+
+ [super drawLayer:layer inContext:ctx];
+
+ if (_private)
+ _private->drawingIntoLayer = NO;
+}
+
+- (BOOL)_web_isDrawingIntoLayer
+{
+ return _private->drawingIntoLayer;
+}
+
#endif // USE(ACCELERATED_COMPOSITING)
@end
diff --git a/WebKit/mac/WebView/WebHTMLViewInternal.h b/WebKit/mac/WebView/WebHTMLViewInternal.h
index 2d9e2a9..07a782a 100644
--- a/WebKit/mac/WebView/WebHTMLViewInternal.h
+++ b/WebKit/mac/WebView/WebHTMLViewInternal.h
@@ -66,6 +66,7 @@ namespace WebCore {
#if USE(ACCELERATED_COMPOSITING)
- (void)attachRootLayer:(CALayer*)layer;
- (void)detachRootLayer;
+- (BOOL)_web_isDrawingIntoLayer;
#endif
#if USE(ACCELERATED_COMPOSITING) && defined(BUILDING_ON_LEOPARD)
diff --git a/WebKit/mac/WebView/WebHTMLViewPrivate.h b/WebKit/mac/WebView/WebHTMLViewPrivate.h
index e1d15dc..1218efc 100644
--- a/WebKit/mac/WebView/WebHTMLViewPrivate.h
+++ b/WebKit/mac/WebView/WebHTMLViewPrivate.h
@@ -136,6 +136,9 @@ extern const float _WebHTMLViewPrintingMaximumShrinkFactor;
- (WebCGFloat)_adjustedBottomOfPageWithTop:(WebCGFloat)top bottom:(WebCGFloat)bottom limit:(WebCGFloat)bottomLimit;
- (BOOL)_isInPrintMode;
- (BOOL)_beginPrintModeWithPageWidth:(float)pageWidth height:(float)pageHeight shrinkToFit:(BOOL)shrinkToFit;
+// Lays out to pages of the given minimum width and height or more (increasing both dimensions proportionally)
+// as needed for the content to fit, but no more than the given maximum width.
+- (BOOL)_beginPrintModeWithMinimumPageWidth:(WebCGFloat)minimumPageWidth height:(WebCGFloat)minimumPageHeight maximumPageWidth:(WebCGFloat)maximumPageWidth;
- (void)_endPrintMode;
- (BOOL)_isInScreenPaginationMode;
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index 8119649..cd9ed8f 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -96,6 +96,7 @@
#define WebKitUsesProxiedOpenPanelPreferenceKey @"WebKitUsesProxiedOpenPanel"
#define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime"
#define WebKitFrameFlatteningEnabledPreferenceKey @"WebKitFrameFlatteningEnabled"
+#define WebKitSpatialNavigationEnabledPreferenceKey @"WebKitSpatialNavigationEnabled"
#define WebKitPaginateDuringLayoutEnabledPreferenceKey @"WebKitPaginateDuringLayoutEnabled"
#define WebKitDNSPrefetchingEnabledPreferenceKey @"WebKitDNSPrefetchingEnabled"
#define WebKitFullScreenEnabledPreferenceKey @"WebKitFullScreenEnabled"
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index 2ddd8b3..ccfb632 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -365,6 +365,7 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:NO], WebKitUsesProxiedOpenPanelPreferenceKey,
[NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey,
[NSNumber numberWithBool:NO], WebKitFrameFlatteningEnabledPreferenceKey,
+ [NSNumber numberWithBool:NO], WebKitSpatialNavigationEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitDNSPrefetchingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitFullScreenEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitMemoryInfoEnabledPreferenceKey,
@@ -1313,6 +1314,16 @@ static NSString *classIBCreatorID = nil;
[self _setBoolValue:flag forKey:WebKitFrameFlatteningEnabledPreferenceKey];
}
+- (BOOL)isSpatialNavigationEnabled
+{
+ return [self _boolValueForKey:WebKitSpatialNavigationEnabledPreferenceKey];
+}
+
+- (void)setSpatialNavigationEnabled:(BOOL)flag
+{
+ [self _setBoolValue:flag forKey:WebKitSpatialNavigationEnabledPreferenceKey];
+}
+
- (BOOL)paginateDuringLayoutEnabled
{
return [self _boolValueForKey:WebKitPaginateDuringLayoutEnabledPreferenceKey];
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index bb525cd..47e6d71 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -130,6 +130,9 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)isFrameFlatteningEnabled;
- (void)setFrameFlatteningEnabled:(BOOL)flag;
+- (BOOL)isSpatialNavigationEnabled;
+- (void)setSpatialNavigationEnabled:(BOOL)flag;
+
// zero means do AutoScale
- (float)PDFScaleFactor;
- (void)setPDFScaleFactor:(float)scale;
diff --git a/WebKit/mac/WebView/WebSerializedJSValue.mm b/WebKit/mac/WebView/WebSerializedJSValue.mm
index 05a316b..d993790 100644
--- a/WebKit/mac/WebView/WebSerializedJSValue.mm
+++ b/WebKit/mac/WebView/WebSerializedJSValue.mm
@@ -22,7 +22,7 @@
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#import "WebSerializedJSValue.h"
+#import "WebSerializedJSValuePrivate.h"
#import <WebCore/SerializedScriptValue.h>
#import <wtf/RefPtr.h>
@@ -65,6 +65,30 @@ using namespace WebCore;
return self;
}
+- (id)initWithInternalRepresentation:(void *)internalRepresenatation
+{
+ ASSERT_ARG(internalRepresenatation, internalRepresenatation);
+
+ if (!internalRepresenatation) {
+ [self release];
+ return nil;
+ }
+
+ self = [super init];
+ if (!self)
+ return nil;
+
+ _private = [[WebSerializedJSValuePrivate alloc] init];
+
+ _private->value = ((SerializedScriptValue*)internalRepresenatation);
+ if (!_private->value) {
+ [self release];
+ return nil;
+ }
+
+ return self;
+}
+
- (JSValueRef)deserialize:(JSContextRef)destinationContext
{
if (!_private || !_private->value)
@@ -79,5 +103,12 @@ using namespace WebCore;
[super dealloc];
}
+- (void*)internalRepresentation
+{
+ if (!_private)
+ return 0;
+ return _private->value.get();
+}
+
@end
diff --git a/WebKit/mac/WebView/WebSerializedJSValuePrivate.h b/WebKit/mac/WebView/WebSerializedJSValuePrivate.h
new file mode 100644
index 0000000..217fe44
--- /dev/null
+++ b/WebKit/mac/WebView/WebSerializedJSValuePrivate.h
@@ -0,0 +1,34 @@
+/*
+ * Copyright (C) 2005 Apple Computer, Inc. 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.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE 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 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.
+ */
+
+#import <WebKit/WebSerializedJSValue.h>
+
+@interface WebSerializedJSValue(WebPrivate)
+- (id)initWithInternalRepresentation:(void*)internalRepresenatation;
+- (void*)internalRepresentation;
+@end
diff --git a/WebKit/mac/WebView/WebUIDelegatePrivate.h b/WebKit/mac/WebView/WebUIDelegatePrivate.h
index 4565a4e..0b62bcb 100644
--- a/WebKit/mac/WebView/WebUIDelegatePrivate.h
+++ b/WebKit/mac/WebView/WebUIDelegatePrivate.h
@@ -183,4 +183,6 @@ enum {
- (void)webView:(WebView *)sender exitFullScreenForElement:(DOMElement *)element;
#endif
+- (void)webView:(WebView *)sender didDrawFrame:(WebFrame *)frame;
+
@end
diff --git a/WebKit/mac/WebView/WebVideoFullscreenController.h b/WebKit/mac/WebView/WebVideoFullscreenController.h
index 3e7b6cf..69ba9f4 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenController.h
+++ b/WebKit/mac/WebView/WebVideoFullscreenController.h
@@ -49,7 +49,8 @@ namespace WebCore {
BOOL _isWindowLoaded;
BOOL _forceDisableAnimation;
uint32_t _idleDisplaySleepAssertion;
- uint32_t _idleSystemSleepAssertion;
+ uint32_t _idleSystemSleepAssertion;
+ NSTimer *_tickleTimer;
SystemUIMode _savedUIMode;
SystemUIOptions _savedUIOptions;
}
diff --git a/WebKit/mac/WebView/WebVideoFullscreenController.mm b/WebKit/mac/WebView/WebVideoFullscreenController.mm
index 69ded78..1efb93f 100644
--- a/WebKit/mac/WebView/WebVideoFullscreenController.mm
+++ b/WebKit/mac/WebView/WebVideoFullscreenController.mm
@@ -31,6 +31,7 @@
#import "WebVideoFullscreenHUDWindowController.h"
#import "WebWindowAnimation.h"
#import <IOKit/pwr_mgt/IOPMLib.h>
+#import <OSServices/Power.h>
#import <QTKit/QTKit.h>
#import <WebCore/HTMLMediaElement.h>
#import <WebCore/SoftLinking.h>
@@ -43,6 +44,7 @@ SOFT_LINK_CLASS(QTKit, QTMovieLayer)
SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
#define QTMovieRateDidChangeNotification getQTMovieRateDidChangeNotification()
+static const NSTimeInterval tickleTimerInterval = 1.0;
@interface WebVideoFullscreenWindow : NSWindow
#if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER)
@@ -82,6 +84,9 @@ SOFT_LINK_POINTER(QTKit, QTMovieRateDidChangeNotification, NSString *)
{
ASSERT(!_backgroundFullscreenWindow);
ASSERT(!_fadeAnimation);
+ [_tickleTimer invalidate];
+ [_tickleTimer release];
+ _tickleTimer = nil;
[[NSNotificationCenter defaultCenter] removeObserver:self];
[super dealloc];
}
@@ -378,6 +383,25 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
_idleSystemSleepAssertion = kIOPMNullAssertionID;
}
}
+
+- (void)_enableTickleTimer
+{
+ [_tickleTimer invalidate];
+ [_tickleTimer release];
+ _tickleTimer = [[NSTimer scheduledTimerWithTimeInterval:tickleTimerInterval target:self selector:@selector(_tickleTimerFired) userInfo:nil repeats:YES] retain];
+}
+
+- (void)_disableTickleTimer
+{
+ [_tickleTimer invalidate];
+ [_tickleTimer release];
+ _tickleTimer = nil;
+}
+
+- (void)_tickleTimerFired
+{
+ UpdateSystemActivity(OverallAct);
+}
#endif
- (void)updatePowerAssertions
@@ -390,9 +414,11 @@ static NSWindow *createBackgroundFullscreenWindow(NSRect frame, int level)
if (rate && !_isEndingFullscreen) {
[self _disableIdleSystemSleep];
[self _disableIdleDisplaySleep];
+ [self _disableTickleTimer];
} else {
[self _enableIdleSystemSleep];
[self _enableIdleDisplaySleep];
+ [self _enableTickleTimer];
}
#endif
}
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index 1fca8d1..9b267ef 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -190,7 +190,7 @@
#import <WebCore/GeolocationError.h>
#endif
-#if ENABLE(VIDEO) && USE(GSTREAMER)
+#if ENABLE(GLIB_SUPPORT)
#import <glib.h>
#endif
@@ -385,7 +385,7 @@ static const char webViewIsOpen[] = "At least one WebView is still open.";
#if USE(ACCELERATED_COMPOSITING)
- (void)_clearLayerSyncLoopObserver;
#endif
-#if ENABLE(VIDEO) && USE(GSTREAMER)
+#if ENABLE(GLIB_SUPPORT)
- (void)_clearGlibLoopObserver;
#endif
@end
@@ -637,6 +637,19 @@ static bool shouldEnableLoadDeferring()
return _private->usesDocumentViews;
}
+static NSString *leakMailQuirksUserScriptPath()
+{
+ NSString *scriptPath = [[NSBundle bundleForClass:[WebView class]] pathForResource:@"MailQuirksUserScript" ofType:@"js"];
+ return [[NSString alloc] initWithContentsOfFile:scriptPath];
+}
+
+- (void)_injectMailQuirksScript
+{
+ static NSString *mailQuirksScriptPath = leakMailQuirksUserScriptPath();
+ core(self)->group().addUserScriptToWorld(core([WebScriptWorld world]),
+ mailQuirksScriptPath, KURL(), 0, 0, InjectAtDocumentEnd, InjectInAllFrames);
+}
+
- (void)_commonInitializationWithFrameName:(NSString *)frameName groupName:(NSString *)groupName usesDocumentViews:(BOOL)usesDocumentViews
{
WebCoreThreadViolationCheckRoundTwo();
@@ -750,10 +763,12 @@ static bool shouldEnableLoadDeferring()
if (!WebKitLinkedOnOrAfter(WEBKIT_FIRST_VERSION_WITHOUT_CONTENT_SNIFFING_FOR_FILE_URLS))
ResourceHandle::forceContentSniffing();
-#if ENABLE(VIDEO) && USE(GSTREAMER)
+#if ENABLE(GLIB_SUPPORT)
[self _scheduleGlibContextIterations];
#endif
+ if (runningTigerMail() || runningLeopardMail())
+ [self _injectMailQuirksScript];
}
- (id)_initWithFrame:(NSRect)f frameName:(NSString *)frameName groupName:(NSString *)groupName usesDocumentViews:(BOOL)usesDocumentViews
@@ -1151,7 +1166,7 @@ static bool fastDocumentTeardownEnabled()
[self _clearLayerSyncLoopObserver];
#endif
-#if ENABLE(VIDEO) && USE(GSTREAMER)
+#if ENABLE(GLIB_SUPPORT)
[self _clearGlibLoopObserver];
#endif
@@ -1472,6 +1487,7 @@ static bool fastDocumentTeardownEnabled()
settings->setAccelerated2dCanvasEnabled([preferences accelerated2dCanvasEnabled]);
settings->setLoadDeferringEnabled(shouldEnableLoadDeferring());
settings->setFrameFlatteningEnabled([preferences isFrameFlatteningEnabled]);
+ settings->setSpatialNavigationEnabled([preferences isSpatialNavigationEnabled]);
settings->setPaginateDuringLayoutEnabled([preferences paginateDuringLayoutEnabled]);
#if ENABLE(FULLSCREEN_API)
settings->setFullScreenEnabled([preferences fullScreenEnabled]);
@@ -5632,7 +5648,7 @@ static WebFrameView *containingFrameView(NSView *view)
}
#endif
-#if ENABLE(VIDEO) && USE(GSTREAMER)
+#if ENABLE(GLIB_SUPPORT)
- (void)_clearGlibLoopObserver
{
if (!_private->glibRunLoopObserver)
@@ -5955,7 +5971,7 @@ static void layerSyncRunLoopObserverCallBack(CFRunLoopObserverRef, CFRunLoopActi
#endif
-#if ENABLE(VIDEO) && USE(GSTREAMER)
+#if ENABLE(GLIB_SUPPORT)
static void glibContextIterationCallback(CFRunLoopObserverRef, CFRunLoopActivity, void*)
{
diff --git a/WebKit/mac/WebView/WebViewData.h b/WebKit/mac/WebView/WebViewData.h
index 9aa91dc..639c3e0 100644
--- a/WebKit/mac/WebView/WebViewData.h
+++ b/WebKit/mac/WebView/WebViewData.h
@@ -172,7 +172,7 @@ extern int pluginDatabaseClientCount;
WebVideoFullscreenController *fullscreenController;
#endif
-#if ENABLE(VIDEO) && USE(GSTREAMER)
+#if ENABLE(GLIB_SUPPORT)
CFRunLoopObserverRef glibRunLoopObserver;
#endif
id<WebGeolocationProvider> _geolocationProvider;
diff --git a/WebKit/mac/WebView/WebViewInternal.h b/WebKit/mac/WebView/WebViewInternal.h
index 71a2660..0a6f462 100644
--- a/WebKit/mac/WebView/WebViewInternal.h
+++ b/WebKit/mac/WebView/WebViewInternal.h
@@ -88,7 +88,7 @@ namespace WebCore {
- (void)_scheduleCompositingLayerSync;
#endif
-#if ENABLE(VIDEO) && USE(GSTREAMER)
+#if ENABLE(GLIB_SUPPORT)
- (void)_scheduleGlibContextIterations;
#endif
diff --git a/WebKit/qt/Api/DerivedSources.pro b/WebKit/qt/Api/DerivedSources.pro
index d8bd1db..8084242 100644
--- a/WebKit/qt/Api/DerivedSources.pro
+++ b/WebKit/qt/Api/DerivedSources.pro
@@ -10,7 +10,9 @@ DESTDIR = ../../../include/QtWebKit
QUOTE = ""
DOUBLE_ESCAPED_QUOTE = ""
ESCAPE = ""
-win32-msvc* | wince* | contains(QMAKE_HOST.os, "Windows"):isEmpty(QMAKE_SH) {
+win32-msvc* | wince* {
+ ESCAPE = "^"
+} else:contains(QMAKE_HOST.os, "Windows"):isEmpty(QMAKE_SH) {
# MinGW's make will run makefile commands using sh, even if make
# was run from the Windows shell, if it finds sh in the path.
ESCAPE = "^"
diff --git a/WebKit/qt/Api/qgraphicswebview.cpp b/WebKit/qt/Api/qgraphicswebview.cpp
index 36d4326..df28626 100644
--- a/WebKit/qt/Api/qgraphicswebview.cpp
+++ b/WebKit/qt/Api/qgraphicswebview.cpp
@@ -76,8 +76,12 @@ public:
QWebPage* page;
bool resizesToContents;
- // Just a convenience to avoid using page->client->overlay always
- QSharedPointer<QGraphicsItemOverlay> overlay;
+ QGraphicsItemOverlay* overlay() const
+ {
+ if (!page || !page->d->client)
+ return 0;
+ return static_cast<PageClientQGraphicsWidget*>(page->d->client)->overlay;
+ }
};
QGraphicsWebViewPrivate::~QGraphicsWebViewPrivate()
@@ -293,8 +297,8 @@ void QGraphicsWebView::paint(QPainter* painter, const QStyleOptionGraphicsItem*
return;
}
#endif
-#if USE(ACCELERATED_COMPOSITING)
- page()->mainFrame()->render(painter, d->overlay ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect());
+#if USE(ACCELERATED_COMPOSITING) && !USE(TEXTURE_MAPPER)
+ page()->mainFrame()->render(painter, d->overlay() ? QWebFrame::ContentsLayer : QWebFrame::AllLayers, option->exposedRect.toAlignedRect());
#else
page()->mainFrame()->render(painter, QWebFrame::AllLayers, option->exposedRect.toRect());
#endif
@@ -445,10 +449,9 @@ void QGraphicsWebView::setPage(QWebPage* page)
return;
d->page->d->client = new PageClientQGraphicsWidget(this, page); // set the page client
- d->overlay = static_cast<PageClientQGraphicsWidget*>(d->page->d->client)->overlay;
- if (d->overlay)
- d->overlay->prepareGraphicsItemGeometryChange();
+ if (d->overlay())
+ d->overlay()->prepareGraphicsItemGeometryChange();
QSize size = geometry().size().toSize();
page->setViewportSize(size);
@@ -560,8 +563,8 @@ qreal QGraphicsWebView::zoomFactor() const
*/
void QGraphicsWebView::updateGeometry()
{
- if (d->overlay)
- d->overlay->prepareGraphicsItemGeometryChange();
+ if (d->overlay())
+ d->overlay()->prepareGraphicsItemGeometryChange();
QGraphicsWidget::updateGeometry();
@@ -578,8 +581,8 @@ void QGraphicsWebView::setGeometry(const QRectF& rect)
{
QGraphicsWidget::setGeometry(rect);
- if (d->overlay)
- d->overlay->prepareGraphicsItemGeometryChange();
+ if (d->overlay())
+ d->overlay()->prepareGraphicsItemGeometryChange();
if (!d->page)
return;
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index 1791096..39e74d9 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -96,6 +96,9 @@
#include "runtime_object.h"
#include "runtime_root.h"
#endif
+#if USE(TEXTURE_MAPPER)
+#include "texmap/TextureMapperPlatformLayer.h"
+#endif
#include "wtf/HashMap.h"
#include <QMultiMap>
#include <qdebug.h>
@@ -230,14 +233,6 @@ void QWebFramePrivate::init(QWebFrame *qframe, QWebFrameData *frameData)
frame->init();
}
-WebCore::ViewportArguments QWebFramePrivate::viewportArguments()
-{
- if (!frame || !frame->document())
- return WebCore::ViewportArguments();
-
- return frame->document()->viewportArguments();
-}
-
void QWebFramePrivate::setPage(QWebPage* newPage)
{
if (page == newPage)
@@ -299,6 +294,16 @@ void QWebFramePrivate::renderFromTiledBackingStore(GraphicsContext* context, con
painter->restore();
}
+#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
+ // TextureMapper might use raw OpenGL or some other backend that requires native painting. On raster this doesn't have any effect.
+ if (rootGraphicsLayer) {
+ painter->beginNativePainting();
+ rootGraphicsLayer->paint(context, view->size(), view->frameRect(), IntRect(clip.boundingRect()), TransformationMatrix(), painter->opacity());
+ painter->endNativePainting();
+ }
+
+ renderRelativeCoords(context, (QWebFrame::RenderLayer)(QWebFrame::ScrollBarLayer | QWebFrame::PanIconLayer), clip);
+#endif
}
#endif
@@ -316,19 +321,18 @@ void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame:
WebCore::FrameView* view = frame->view();
view->updateLayoutAndStyleIfNeededRecursive();
- for (int i = 0; i < vector.size(); ++i) {
- const QRect& clipRect = vector.at(i);
-
- QRect intersectedRect = clipRect.intersected(view->frameRect());
-
+ if (layer & QWebFrame::ContentsLayer) {
painter->save();
- painter->setClipRect(clipRect, Qt::IntersectClip);
+ for (int i = 0; i < vector.size(); ++i) {
+ const QRect& clipRect = vector.at(i);
- int x = view->x();
- int y = view->y();
+ QRect intersectedRect = clipRect.intersected(view->frameRect());
- if (layer & QWebFrame::ContentsLayer) {
context->save();
+ painter->setClipRect(clipRect, Qt::IntersectClip);
+
+ int x = view->x();
+ int y = view->y();
int scrollX = view->scrollX();
int scrollY = view->scrollY();
@@ -344,27 +348,52 @@ void QWebFramePrivate::renderRelativeCoords(GraphicsContext* context, QWebFrame:
context->restore();
}
+ painter->restore();
- if (layer & QWebFrame::ScrollBarLayer
- && !view->scrollbarsSuppressed()
- && (view->horizontalScrollbar() || view->verticalScrollbar())) {
- context->save();
+#if USE(ACCELERATED_COMPOSITING) && USE(TEXTURE_MAPPER)
+ if (rootGraphicsLayer) {
+ painter->save();
+ painter->beginNativePainting();
+ rootGraphicsLayer->paint(context, view->size(), view->frameRect(), IntRect(clip.boundingRect()),
+ TransformationMatrix(), context->platformContext()->opacity());
+ painter->endNativePainting();
+ painter->restore();
+ }
+#endif
+ }
+ if (layer & (QWebFrame::PanIconLayer | QWebFrame::ScrollBarLayer)) {
+ for (int i = 0; i < vector.size(); ++i) {
+ const QRect& clipRect = vector.at(i);
- QRect rect = intersectedRect;
- context->translate(x, y);
- rect.translate(-x, -y);
+ QRect intersectedRect = clipRect.intersected(view->frameRect());
- view->paintScrollbars(context, rect);
+ painter->save();
+ painter->setClipRect(clipRect, Qt::IntersectClip);
- context->restore();
- }
+ int x = view->x();
+ int y = view->y();
+
+ if (layer & QWebFrame::ScrollBarLayer
+ && !view->scrollbarsSuppressed()
+ && (view->horizontalScrollbar() || view->verticalScrollbar())) {
+ context->save();
+
+ QRect rect = intersectedRect;
+ context->translate(x, y);
+ rect.translate(-x, -y);
+
+ view->paintScrollbars(context, rect);
+
+ context->restore();
+ }
#if ENABLE(PAN_SCROLLING)
- if (layer & QWebFrame::PanIconLayer)
- view->paintPanScrollIcon(context);
+ if (layer & QWebFrame::PanIconLayer)
+ view->paintPanScrollIcon(context);
#endif
- painter->restore();
+ painter->restore();
+ }
}
}
diff --git a/WebKit/qt/Api/qwebframe_p.h b/WebKit/qt/Api/qwebframe_p.h
index 5ba3f52..79187ab 100644
--- a/WebKit/qt/Api/qwebframe_p.h
+++ b/WebKit/qt/Api/qwebframe_p.h
@@ -90,8 +90,6 @@ public:
void renderFromTiledBackingStore(WebCore::GraphicsContext*, const QRegion& clip);
#endif
- WebCore::ViewportArguments viewportArguments();
-
QWebFrame *q;
Qt::ScrollBarPolicy horizontalScrollBarPolicy;
Qt::ScrollBarPolicy verticalScrollBarPolicy;
diff --git a/WebKit/qt/Api/qwebhistory.cpp b/WebKit/qt/Api/qwebhistory.cpp
index 1d9935d..25d77a4 100644
--- a/WebKit/qt/Api/qwebhistory.cpp
+++ b/WebKit/qt/Api/qwebhistory.cpp
@@ -103,7 +103,7 @@ QWebHistoryItem::~QWebHistoryItem()
QUrl QWebHistoryItem::originalUrl() const
{
if (d->item)
- return QUrl(d->item->originalURL().string());
+ return d->item->originalURL();
return QUrl();
}
@@ -116,7 +116,7 @@ QUrl QWebHistoryItem::originalUrl() const
QUrl QWebHistoryItem::url() const
{
if (d->item)
- return QUrl(d->item->url().string());
+ return d->item->url();
return QUrl();
}
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 932103d..454376c 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -45,6 +45,8 @@
#include "ChromeClientQt.h"
#include "ContextMenu.h"
#include "ContextMenuClientQt.h"
+#include "DeviceMotionClientQt.h"
+#include "DeviceOrientationClientQt.h"
#include "DocumentLoader.h"
#include "DragClientQt.h"
#include "DragController.h"
@@ -91,6 +93,9 @@
#include "PlatformTouchEvent.h"
#include "WorkerThread.h"
#include "wtf/Threading.h"
+#include "MIMETypeRegistry.h"
+#include "PluginDatabase.h"
+#include "PluginPackage.h"
#include <QApplication>
#include <QBasicTimer>
@@ -298,6 +303,10 @@ QWebPagePrivate::QWebPagePrivate(QWebPage *qq)
pageClients.editorClient = new EditorClientQt(q);
pageClients.dragClient = new DragClientQt(q);
pageClients.inspectorClient = new InspectorClientQt(q);
+#if ENABLE(DEVICE_ORIENTATION)
+ pageClients.deviceOrientationClient = new DeviceOrientationClientQt(q);
+ pageClients.deviceMotionClient = new DeviceMotionClientQt(q);
+#endif
page = new Page(pageClients);
settings = new QWebSettings(page->settings());
@@ -328,6 +337,11 @@ QWebPagePrivate::~QWebPagePrivate()
#endif
}
+WebCore::ViewportArguments QWebPagePrivate::viewportArguments()
+{
+ return page ? page->viewportArguments() : WebCore::ViewportArguments();
+}
+
WebCore::Page* QWebPagePrivate::core(const QWebPage* page)
{
return page->d->page;
@@ -602,17 +616,8 @@ void QWebPagePrivate::timerEvent(QTimerEvent *ev)
q->timerEvent(ev);
}
-void QWebPagePrivate::mouseMoveEvent(QGraphicsSceneMouseEvent* ev)
-{
- WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
- if (!frame->view())
- return;
-
- bool accepted = frame->eventHandler()->mouseMoved(PlatformMouseEvent(ev, 0));
- ev->setAccepted(accepted);
-}
-
-void QWebPagePrivate::mouseMoveEvent(QMouseEvent *ev)
+template<class T>
+void QWebPagePrivate::mouseMoveEvent(T* ev)
{
WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
if (!frame->view())
@@ -622,41 +627,8 @@ void QWebPagePrivate::mouseMoveEvent(QMouseEvent *ev)
ev->setAccepted(accepted);
}
-void QWebPagePrivate::mousePressEvent(QGraphicsSceneMouseEvent* ev)
-{
- WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
- if (!frame->view())
- return;
-
- RefPtr<WebCore::Node> oldNode;
- Frame* focusedFrame = page->focusController()->focusedFrame();
- if (Document* focusedDocument = focusedFrame ? focusedFrame->document() : 0)
- oldNode = focusedDocument->focusedNode();
-
- if (tripleClickTimer.isActive()
- && (ev->pos().toPoint() - tripleClick).manhattanLength()
- < QApplication::startDragDistance()) {
- mouseTripleClickEvent(ev);
- return;
- }
-
- bool accepted = false;
- PlatformMouseEvent mev(ev, 1);
- // ignore the event if we can't map Qt's mouse buttons to WebCore::MouseButton
- if (mev.button() != NoButton)
- accepted = frame->eventHandler()->handleMousePressEvent(mev);
- ev->setAccepted(accepted);
-
- RefPtr<WebCore::Node> newNode;
- focusedFrame = page->focusController()->focusedFrame();
- if (Document* focusedDocument = focusedFrame ? focusedFrame->document() : 0)
- newNode = focusedDocument->focusedNode();
-
- if (newNode && oldNode != newNode)
- clickCausedFocus = true;
-}
-
-void QWebPagePrivate::mousePressEvent(QMouseEvent *ev)
+template<class T>
+void QWebPagePrivate::mousePressEvent(T* ev)
{
WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
if (!frame->view())
@@ -690,24 +662,8 @@ void QWebPagePrivate::mousePressEvent(QMouseEvent *ev)
clickCausedFocus = true;
}
-void QWebPagePrivate::mouseDoubleClickEvent(QGraphicsSceneMouseEvent *ev)
-{
- WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
- if (!frame->view())
- return;
-
- bool accepted = false;
- PlatformMouseEvent mev(ev, 2);
- // ignore the event if we can't map Qt's mouse buttons to WebCore::MouseButton
- if (mev.button() != NoButton)
- accepted = frame->eventHandler()->handleMousePressEvent(mev);
- ev->setAccepted(accepted);
-
- tripleClickTimer.start(QApplication::doubleClickInterval(), q);
- tripleClick = ev->pos().toPoint();
-}
-
-void QWebPagePrivate::mouseDoubleClickEvent(QMouseEvent *ev)
+template<class T>
+void QWebPagePrivate::mouseDoubleClickEvent(T *ev)
{
WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
if (!frame->view())
@@ -721,24 +677,11 @@ void QWebPagePrivate::mouseDoubleClickEvent(QMouseEvent *ev)
ev->setAccepted(accepted);
tripleClickTimer.start(QApplication::doubleClickInterval(), q);
- tripleClick = ev->pos();
-}
-
-void QWebPagePrivate::mouseTripleClickEvent(QGraphicsSceneMouseEvent *ev)
-{
- WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
- if (!frame->view())
- return;
-
- bool accepted = false;
- PlatformMouseEvent mev(ev, 3);
- // ignore the event if we can't map Qt's mouse buttons to WebCore::MouseButton
- if (mev.button() != NoButton)
- accepted = frame->eventHandler()->handleMousePressEvent(mev);
- ev->setAccepted(accepted);
+ tripleClick = QPointF(ev->pos()).toPoint();
}
-void QWebPagePrivate::mouseTripleClickEvent(QMouseEvent *ev)
+template<class T>
+void QWebPagePrivate::mouseTripleClickEvent(T *ev)
{
WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
if (!frame->view())
@@ -775,7 +718,8 @@ void QWebPagePrivate::handleClipboard(QEvent* ev, Qt::MouseButton button)
#endif
}
-void QWebPagePrivate::mouseReleaseEvent(QGraphicsSceneMouseEvent* ev)
+template<class T>
+void QWebPagePrivate::mouseReleaseEvent(T *ev)
{
WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
if (!frame->view())
@@ -812,23 +756,6 @@ void QWebPagePrivate::handleSoftwareInputPanel(Qt::MouseButton button)
clickCausedFocus = false;
}
-void QWebPagePrivate::mouseReleaseEvent(QMouseEvent *ev)
-{
- WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
- if (!frame->view())
- return;
-
- bool accepted = false;
- PlatformMouseEvent mev(ev, 0);
- // ignore the event if we can't map Qt's mouse buttons to WebCore::MouseButton
- if (mev.button() != NoButton)
- accepted = frame->eventHandler()->handleMouseReleaseEvent(mev);
- ev->setAccepted(accepted);
-
- handleClipboard(ev, ev->button());
- handleSoftwareInputPanel(ev->button());
-}
-
#ifndef QT_NO_CONTEXTMENU
void QWebPagePrivate::contextMenuEvent(const QPoint& globalPos)
{
@@ -859,18 +786,8 @@ QMenu *QWebPage::createStandardContextMenu()
}
#ifndef QT_NO_WHEELEVENT
-void QWebPagePrivate::wheelEvent(QGraphicsSceneWheelEvent* ev)
-{
- WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
- if (!frame->view())
- return;
-
- WebCore::PlatformWheelEvent pev(ev);
- bool accepted = frame->eventHandler()->handleWheelEvent(pev);
- ev->setAccepted(accepted);
-}
-
-void QWebPagePrivate::wheelEvent(QWheelEvent *ev)
+template<class T>
+void QWebPagePrivate::wheelEvent(T *ev)
{
WebCore::Frame* frame = QWebFramePrivate::core(mainFrame);
if (!frame->view())
@@ -1007,10 +924,11 @@ void QWebPagePrivate::focusOutEvent(QFocusEvent*)
focusController->setActive(false);
}
-void QWebPagePrivate::dragEnterEvent(QGraphicsSceneDragDropEvent* ev)
+template<class T>
+void QWebPagePrivate::dragEnterEvent(T* ev)
{
#ifndef QT_NO_DRAGANDDROP
- DragData dragData(ev->mimeData(), ev->pos().toPoint(),
+ DragData dragData(ev->mimeData(), QPointF(ev->pos()).toPoint(),
QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData));
ev->setDropAction(action);
@@ -1019,29 +937,8 @@ void QWebPagePrivate::dragEnterEvent(QGraphicsSceneDragDropEvent* ev)
#endif
}
-void QWebPagePrivate::dragEnterEvent(QDragEnterEvent* ev)
-{
-#ifndef QT_NO_DRAGANDDROP
- DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(),
- dropActionToDragOp(ev->possibleActions()));
- Qt::DropAction action = dragOpToDropAction(page->dragController()->dragEntered(&dragData));
- ev->setDropAction(action);
- // We must accept this event in order to receive the drag move events that are sent
- // while the drag and drop action is in progress.
- ev->acceptProposedAction();
-#endif
-}
-
-void QWebPagePrivate::dragLeaveEvent(QGraphicsSceneDragDropEvent* ev)
-{
-#ifndef QT_NO_DRAGANDDROP
- DragData dragData(0, IntPoint(), QCursor::pos(), DragOperationNone);
- page->dragController()->dragExited(&dragData);
- ev->accept();
-#endif
-}
-
-void QWebPagePrivate::dragLeaveEvent(QDragLeaveEvent* ev)
+template<class T>
+void QWebPagePrivate::dragLeaveEvent(T *ev)
{
#ifndef QT_NO_DRAGANDDROP
DragData dragData(0, IntPoint(), QCursor::pos(), DragOperationNone);
@@ -1050,10 +947,11 @@ void QWebPagePrivate::dragLeaveEvent(QDragLeaveEvent* ev)
#endif
}
-void QWebPagePrivate::dragMoveEvent(QGraphicsSceneDragDropEvent* ev)
+template<class T>
+void QWebPagePrivate::dragMoveEvent(T *ev)
{
#ifndef QT_NO_DRAGANDDROP
- DragData dragData(ev->mimeData(), ev->pos().toPoint(),
+ DragData dragData(ev->mimeData(), QPointF(ev->pos()).toPoint(),
QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
Qt::DropAction action = dragOpToDropAction(page->dragController()->dragUpdated(&dragData));
ev->setDropAction(action);
@@ -1062,42 +960,17 @@ void QWebPagePrivate::dragMoveEvent(QGraphicsSceneDragDropEvent* ev)
#endif
}
-void QWebPagePrivate::dragMoveEvent(QDragMoveEvent* ev)
+template<class T>
+void QWebPagePrivate::dropEvent(T *ev)
{
#ifndef QT_NO_DRAGANDDROP
- DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(),
- dropActionToDragOp(ev->possibleActions()));
- Qt::DropAction action = dragOpToDropAction(page->dragController()->dragUpdated(&dragData));
- m_lastDropAction = action;
- ev->setDropAction(action);
- // We must accept this event in order to receive the drag move events that are sent
- // while the drag and drop action is in progress.
- ev->acceptProposedAction();
-#endif
-}
-
-void QWebPagePrivate::dropEvent(QGraphicsSceneDragDropEvent* ev)
-{
-#ifndef QT_NO_DRAGANDDROP
- DragData dragData(ev->mimeData(), ev->pos().toPoint(),
+ DragData dragData(ev->mimeData(), QPointF(ev->pos()).toPoint(),
QCursor::pos(), dropActionToDragOp(ev->possibleActions()));
if (page->dragController()->performDrag(&dragData))
ev->acceptProposedAction();
#endif
}
-void QWebPagePrivate::dropEvent(QDropEvent* ev)
-{
-#ifndef QT_NO_DRAGANDDROP
- // Overwrite the defaults set by QDragManager::defaultAction()
- ev->setDropAction(m_lastDropAction);
- DragData dragData(ev->mimeData(), ev->pos(), QCursor::pos(),
- dropActionToDragOp(Qt::DropAction(ev->dropAction())));
- if (page->dragController()->performDrag(&dragData))
- ev->acceptProposedAction();
-#endif
-}
-
void QWebPagePrivate::leaveEvent(QEvent*)
{
// Fake a mouse move event just outside of the widget, since all
@@ -1702,15 +1575,15 @@ quint16 QWebPagePrivate::inspectorServerPort()
/*!
- \class QWebPage::ViewportConfiguration
+ \class QWebPage::ViewportAttributes
\since 4.7
- \brief The QWebPage::ViewportConfiguration class describes hints that can be applied to a viewport.
+ \brief The QWebPage::ViewportAttributes class describes hints that can be applied to a viewport.
- QWebPage::ViewportConfiguration provides a description of a viewport, such as viewport geometry,
+ QWebPage::ViewportAttributes provides a description of a viewport, such as viewport geometry,
initial scale factor with limits, plus information about whether a user should be able
to scale the contents in the viewport or not, ie. by zooming.
- ViewportConfiguration can be set by a web author using the viewport meta tag extension, documented
+ ViewportAttributes can be set by a web author using the viewport meta tag extension, documented
at \l{http://developer.apple.com/safari/library/documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html}{Safari Reference Library: Using the Viewport Meta Tag}.
All values might not be set, as such when dealing with the hints, the developer needs to
@@ -1720,9 +1593,9 @@ quint16 QWebPagePrivate::inspectorServerPort()
*/
/*!
- Constructs an empty QWebPage::ViewportConfiguration.
+ Constructs an empty QWebPage::ViewportAttributes.
*/
-QWebPage::ViewportConfiguration::ViewportConfiguration()
+QWebPage::ViewportAttributes::ViewportAttributes()
: d(0)
, m_initialScaleFactor(-1.0)
, m_minimumScaleFactor(-1.0)
@@ -1735,9 +1608,9 @@ QWebPage::ViewportConfiguration::ViewportConfiguration()
}
/*!
- Constructs a QWebPage::ViewportConfiguration which is a copy from \a other .
+ Constructs a QWebPage::ViewportAttributes which is a copy from \a other .
*/
-QWebPage::ViewportConfiguration::ViewportConfiguration(const QWebPage::ViewportConfiguration& other)
+QWebPage::ViewportAttributes::ViewportAttributes(const QWebPage::ViewportAttributes& other)
: d(other.d)
, m_initialScaleFactor(other.m_initialScaleFactor)
, m_minimumScaleFactor(other.m_minimumScaleFactor)
@@ -1751,18 +1624,18 @@ QWebPage::ViewportConfiguration::ViewportConfiguration(const QWebPage::ViewportC
}
/*!
- Destroys the QWebPage::ViewportConfiguration.
+ Destroys the QWebPage::ViewportAttributes.
*/
-QWebPage::ViewportConfiguration::~ViewportConfiguration()
+QWebPage::ViewportAttributes::~ViewportAttributes()
{
}
/*!
- Assigns the given QWebPage::ViewportConfiguration to this viewport hints and returns a
+ Assigns the given QWebPage::ViewportAttributes to this viewport hints and returns a
reference to this.
*/
-QWebPage::ViewportConfiguration& QWebPage::ViewportConfiguration::operator=(const QWebPage::ViewportConfiguration& other)
+QWebPage::ViewportAttributes& QWebPage::ViewportAttributes::operator=(const QWebPage::ViewportAttributes& other)
{
if (this != &other) {
d = other.d;
@@ -1777,30 +1650,30 @@ QWebPage::ViewportConfiguration& QWebPage::ViewportConfiguration::operator=(cons
return *this;
}
-/*! \fn inline bool QWebPage::ViewportConfiguration::isValid() const
- Returns whether this is a valid ViewportConfiguration or not.
+/*! \fn inline bool QWebPage::ViewportAttributes::isValid() const
+ Returns whether this is a valid ViewportAttributes or not.
- An invalid ViewportConfiguration will have an empty QSize, negative values for scale factors and
+ An invalid ViewportAttributes will have an empty QSize, negative values for scale factors and
true for the boolean isUserScalable.
*/
-/*! \fn inline QSize QWebPage::ViewportConfiguration::size() const
+/*! \fn inline QSize QWebPage::ViewportAttributes::size() const
Returns the size of the viewport.
*/
-/*! \fn inline qreal QWebPage::ViewportConfiguration::initialScaleFactor() const
+/*! \fn inline qreal QWebPage::ViewportAttributes::initialScaleFactor() const
Returns the initial scale of the viewport as a multiplier.
*/
-/*! \fn inline qreal QWebPage::ViewportConfiguration::minimumScaleFactor() const
+/*! \fn inline qreal QWebPage::ViewportAttributes::minimumScaleFactor() const
Returns the minimum scale value of the viewport as a multiplier.
*/
-/*! \fn inline qreal QWebPage::ViewportConfiguration::maximumScaleFactor() const
+/*! \fn inline qreal QWebPage::ViewportAttributes::maximumScaleFactor() const
Returns the maximum scale value of the viewport as a multiplier.
*/
-/*! \fn inline bool QWebPage::ViewportConfiguration::isUserScalable() const
+/*! \fn inline bool QWebPage::ViewportAttributes::isUserScalable() const
Determines whether or not the scale can be modified by the user.
*/
@@ -2149,6 +2022,63 @@ QObject *QWebPage::createPlugin(const QString &classid, const QUrl &url, const Q
return 0;
}
+static void extractContentTypeFromHash(const HashSet<String>& types, QStringList* list)
+{
+ if (!list)
+ return;
+
+ HashSet<String>::const_iterator endIt = types.end();
+ for (HashSet<String>::const_iterator it = types.begin(); it != endIt; ++it)
+ *list << *it;
+}
+
+static void extractContentTypeFromPluginVector(const Vector<PluginPackage*>& plugins, QStringList* list)
+{
+ if (!list)
+ return;
+
+ for (unsigned int i = 0; i < plugins.size(); ++i) {
+ MIMEToDescriptionsMap::const_iterator map_it = plugins[i]->mimeToDescriptions().begin();
+ MIMEToDescriptionsMap::const_iterator map_end = plugins[i]->mimeToDescriptions().end();
+ for (; map_it != map_end; ++map_it)
+ *list << map_it->first;
+ }
+}
+
+/*!
+ * Returns the list of all content types supported by QWebPage.
+ */
+QStringList QWebPage::supportedContentTypes() const
+{
+ QStringList mimeTypes;
+
+ extractContentTypeFromHash(MIMETypeRegistry::getSupportedImageMIMETypes(), &mimeTypes);
+ extractContentTypeFromHash(MIMETypeRegistry::getSupportedNonImageMIMETypes(), &mimeTypes);
+ if (d->page->settings() && d->page->settings()->arePluginsEnabled())
+ extractContentTypeFromPluginVector(PluginDatabase::installedPlugins()->plugins(), &mimeTypes);
+
+ return mimeTypes;
+}
+
+/*!
+ * Returns true if QWebPage can handle the given \a mimeType; otherwise, returns false.
+ */
+bool QWebPage::supportsContentType(const QString& mimeType) const
+{
+ const String type = mimeType.toLower();
+ if (MIMETypeRegistry::isSupportedImageMIMEType(type))
+ return true;
+
+ if (MIMETypeRegistry::isSupportedNonImageMIMEType(type))
+ return true;
+
+ if (d->page->settings() && d->page->settings()->arePluginsEnabled()
+ && PluginDatabase::installedPlugins()->isMIMETypeRegistered(type))
+ return true;
+
+ return false;
+}
+
static WebCore::FrameLoadRequest frameLoadRequest(const QUrl &url, WebCore::Frame *frame)
{
WebCore::ResourceRequest rr(url, frame->loader()->outgoingReferrer());
@@ -2244,6 +2174,7 @@ void QWebPage::triggerAction(WebAction action, bool)
break;
case Stop:
mainFrame()->d->frame->loader()->stopForUserCancel();
+ d->updateNavigationActions();
break;
case Reload:
mainFrame()->d->frame->loader()->reload(/*endtoendreload*/false);
@@ -2272,12 +2203,12 @@ void QWebPage::triggerAction(WebAction action, bool)
}
case StopScheduledPageRefresh: {
QWebFrame* topFrame = mainFrame();
- topFrame->d->frame->redirectScheduler()->cancel();
+ topFrame->d->frame->navigationScheduler()->cancel();
QList<QWebFrame*> childFrames;
collectChildFrames(topFrame, childFrames);
QListIterator<QWebFrame*> it(childFrames);
while (it.hasNext())
- it.next()->d->frame->redirectScheduler()->cancel();
+ it.next()->d->frame->navigationScheduler()->cancel();
break;
}
default:
@@ -2363,12 +2294,12 @@ static QSize queryDeviceSizeForScreenContainingWidget(const QWidget* widget)
both needs to be set.
*/
-QWebPage::ViewportConfiguration QWebPage::viewportConfigurationForSize(const QSize& availableSize) const
+QWebPage::ViewportAttributes QWebPage::viewportAttributesForSize(const QSize& availableSize) const
{
static int desktopWidth = 980;
static int deviceDPI = 160;
- ViewportConfiguration result;
+ ViewportAttributes result;
int deviceWidth = getintenv("QTWEBKIT_DEVICE_WIDTH");
int deviceHeight = getintenv("QTWEBKIT_DEVICE_HEIGHT");
@@ -2380,15 +2311,15 @@ QWebPage::ViewportConfiguration QWebPage::viewportConfigurationForSize(const QSi
deviceHeight = size.height();
}
- WebCore::ViewportConfiguration conf = WebCore::findConfigurationForViewportData(mainFrame()->d->viewportArguments(),
- desktopWidth, deviceWidth, deviceHeight, deviceDPI, availableSize);
+ WebCore::ViewportAttributes conf = WebCore::computeViewportAttributes(d->viewportArguments(), desktopWidth, deviceWidth, deviceHeight, deviceDPI, availableSize);
result.m_isValid = true;
- result.m_size = conf.layoutViewport;
+ result.m_size = conf.layoutSize;
result.m_initialScaleFactor = conf.initialScale;
result.m_minimumScaleFactor = conf.minimumScale;
result.m_maximumScaleFactor = conf.maximumScale;
result.m_devicePixelRatio = conf.devicePixelRatio;
+ result.m_isUserScalable = conf.userScalable;
return result;
}
@@ -3777,7 +3708,7 @@ quint64 QWebPage::bytesReceived() const
Page authors can provide the supplied values by using the viewport meta tag. More information
about this can be found at \l{http://developer.apple.com/safari/library/documentation/appleapplications/reference/safariwebcontent/usingtheviewport/usingtheviewport.html}{Safari Reference Library: Using the Viewport Meta Tag}.
- \sa QWebPage::ViewportConfiguration, setPreferredContentsSize(), QGraphicsWebView::setScale()
+ \sa QWebPage::ViewportAttributes, setPreferredContentsSize(), QGraphicsWebView::setScale()
*/
/*!
diff --git a/WebKit/qt/Api/qwebpage.h b/WebKit/qt/Api/qwebpage.h
index e71e3da..15d2432 100644
--- a/WebKit/qt/Api/qwebpage.h
+++ b/WebKit/qt/Api/qwebpage.h
@@ -48,7 +48,7 @@ class QWebHitTestResult;
class QWebNetworkInterface;
class QWebPagePrivate;
class QWebPluginFactory;
-class QtViewportConfigurationPrivate;
+class QtViewportAttributesPrivate;
namespace WebCore {
class ChromeClientQt;
@@ -208,14 +208,14 @@ public:
GeolocationPermissionDomain
};
- class ViewportConfiguration {
+ class QWEBKIT_EXPORT ViewportAttributes {
public:
- ViewportConfiguration();
- ViewportConfiguration(const QWebPage::ViewportConfiguration& other);
+ ViewportAttributes();
+ ViewportAttributes(const QWebPage::ViewportAttributes& other);
- ~ViewportConfiguration();
+ ~ViewportAttributes();
- QWebPage::ViewportConfiguration& operator=(const QWebPage::ViewportConfiguration& other);
+ QWebPage::ViewportAttributes& operator=(const QWebPage::ViewportAttributes& other);
inline qreal initialScaleFactor() const { return m_initialScaleFactor; }
inline qreal minimumScaleFactor() const { return m_minimumScaleFactor; }
@@ -226,7 +226,7 @@ public:
inline QSize size() const { return m_size; }
private:
- QSharedDataPointer<QtViewportConfigurationPrivate> d;
+ QSharedDataPointer<QtViewportAttributesPrivate> d;
qreal m_initialScaleFactor;
qreal m_minimumScaleFactor;
qreal m_maximumScaleFactor;
@@ -276,7 +276,7 @@ public:
QSize viewportSize() const;
void setViewportSize(const QSize &size) const;
- ViewportConfiguration viewportConfigurationForSize(const QSize& availableSize) const;
+ ViewportAttributes viewportAttributesForSize(const QSize& availableSize) const;
QSize preferredContentsSize() const;
void setPreferredContentsSize(const QSize &size) const;
@@ -309,6 +309,9 @@ public:
void setUserPermission(QWebFrame* frame, PermissionDomain domain, PermissionPolicy policy);
+ QStringList supportedContentTypes() const;
+ bool supportsContentType(const QString& mimeType) const;
+
enum Extension {
ChooseMultipleFilesExtension,
ErrorPageExtension
diff --git a/WebKit/qt/Api/qwebpage_p.h b/WebKit/qt/Api/qwebpage_p.h
index 12716f9..1f70293 100644
--- a/WebKit/qt/Api/qwebpage_p.h
+++ b/WebKit/qt/Api/qwebpage_p.h
@@ -36,6 +36,8 @@
#include <wtf/RefPtr.h>
+#include "ViewportArguments.h"
+
namespace WebCore {
class ChromeClientQt;
class ContextMenuClientQt;
@@ -58,13 +60,13 @@ QT_END_NAMESPACE
class QWebInspector;
class QWebPageClient;
-class QtViewportConfigurationPrivate : public QSharedData {
+class QtViewportAttributesPrivate : public QSharedData {
public:
- QtViewportConfigurationPrivate(QWebPage::ViewportConfiguration* qq)
+ QtViewportAttributesPrivate(QWebPage::ViewportAttributes* qq)
: q(qq)
{ }
- QWebPage::ViewportConfiguration* q;
+ QWebPage::ViewportAttributes* q;
};
class QWebPagePrivate {
@@ -88,36 +90,26 @@ public:
void timerEvent(QTimerEvent*);
- void mouseMoveEvent(QMouseEvent*);
- void mouseMoveEvent(QGraphicsSceneMouseEvent*);
- void mousePressEvent(QMouseEvent*);
- void mousePressEvent(QGraphicsSceneMouseEvent*);
- void mouseDoubleClickEvent(QMouseEvent*);
- void mouseDoubleClickEvent(QGraphicsSceneMouseEvent*);
- void mouseTripleClickEvent(QMouseEvent*);
- void mouseTripleClickEvent(QGraphicsSceneMouseEvent*);
- void mouseReleaseEvent(QMouseEvent*);
- void mouseReleaseEvent(QGraphicsSceneMouseEvent*);
+ template<class T> void mouseMoveEvent(T*);
+ template<class T> void mousePressEvent(T*);
+ template<class T> void mouseDoubleClickEvent(T*);
+ template<class T> void mouseTripleClickEvent(T*);
+ template<class T> void mouseReleaseEvent(T*);
#ifndef QT_NO_CONTEXTMENU
void contextMenuEvent(const QPoint& globalPos);
#endif
#ifndef QT_NO_WHEELEVENT
- void wheelEvent(QWheelEvent*);
- void wheelEvent(QGraphicsSceneWheelEvent*);
+ template<class T> void wheelEvent(T*);
#endif
void keyPressEvent(QKeyEvent*);
void keyReleaseEvent(QKeyEvent*);
void focusInEvent(QFocusEvent*);
void focusOutEvent(QFocusEvent*);
- void dragEnterEvent(QDragEnterEvent*);
- void dragEnterEvent(QGraphicsSceneDragDropEvent*);
- void dragLeaveEvent(QDragLeaveEvent*);
- void dragLeaveEvent(QGraphicsSceneDragDropEvent*);
- void dragMoveEvent(QDragMoveEvent*);
- void dragMoveEvent(QGraphicsSceneDragDropEvent*);
- void dropEvent(QDropEvent*);
- void dropEvent(QGraphicsSceneDragDropEvent*);
+ template<class T> void dragEnterEvent(T*);
+ template<class T> void dragLeaveEvent(T*);
+ template<class T> void dragMoveEvent(T*);
+ template<class T> void dropEvent(T*);
void inputMethodEvent(QInputMethodEvent*);
@@ -139,6 +131,8 @@ public:
WebCore::InspectorController* inspectorController();
quint16 inspectorServerPort();
+ WebCore::ViewportArguments viewportArguments();
+
#ifndef QT_NO_SHORTCUT
static QWebPage::WebAction editorActionForKeyEvent(QKeyEvent* event);
#endif
diff --git a/WebKit/qt/Api/qwebsettings.cpp b/WebKit/qt/Api/qwebsettings.cpp
index 6b36522..3cd36f2 100644
--- a/WebKit/qt/Api/qwebsettings.cpp
+++ b/WebKit/qt/Api/qwebsettings.cpp
@@ -184,6 +184,10 @@ void QWebSettingsPrivate::apply()
global->attributes.value(QWebSettings::JavascriptCanOpenWindows));
settings->setJavaScriptCanOpenWindowsAutomatically(value);
+ value = attributes.value(QWebSettings::JavascriptCanCloseWindows,
+ global->attributes.value(QWebSettings::JavascriptCanCloseWindows));
+ settings->setAllowScriptsToCloseWindows(value);
+
value = attributes.value(QWebSettings::JavaEnabled,
global->attributes.value(QWebSettings::JavaEnabled));
settings->setJavaEnabled(value);
@@ -389,6 +393,8 @@ QWebSettings* QWebSettings::globalSettings()
recording visited pages in the history and storing web page icons. This is disabled by default.
\value JavascriptCanOpenWindows Specifies whether JavaScript programs
can open new windows. This is disabled by default.
+ \value JavascriptCanCloseWindows Specifies whether JavaScript programs
+ can close windows. This is disabled by default.
\value JavascriptCanAccessClipboard Specifies whether JavaScript programs
can read or write to the clipboard. This is disabled by default.
\value DeveloperExtrasEnabled Enables extra tools for Web developers.
@@ -1076,12 +1082,12 @@ QString QWebSettings::localStoragePath() const
*/
void QWebSettings::enablePersistentStorage(const QString& path)
{
+#ifndef QT_NO_DESKTOPSERVICES
QString storagePath;
if (path.isEmpty()) {
-#ifndef QT_NO_DESKTOPSERVICES
+
storagePath = QDesktopServices::storageLocation(QDesktopServices::DataLocation);
-#endif
if (storagePath.isEmpty())
storagePath = WebCore::pathByAppendingComponent(QDir::homePath(), QCoreApplication::applicationName());
} else
@@ -1098,12 +1104,18 @@ void QWebSettings::enablePersistentStorage(const QString& path)
QWebSettings::globalSettings()->setAttribute(QWebSettings::OfflineWebApplicationCacheEnabled, true);
#if ENABLE(NETSCAPE_PLUGIN_METADATA_CACHE)
- QFileInfo info(storagePath);
+ // All applications can share the common QtWebkit cache file(s).
+ // Path is not configurable and uses QDesktopServices::CacheLocation by default.
+ QString cachePath = QDesktopServices::storageLocation(QDesktopServices::CacheLocation);
+ WebCore::makeAllDirectories(cachePath);
+
+ QFileInfo info(cachePath);
if (info.isDir() && info.isWritable()) {
WebCore::PluginDatabase::setPersistentMetadataCacheEnabled(true);
- WebCore::PluginDatabase::setPersistentMetadataCachePath(storagePath);
+ WebCore::PluginDatabase::setPersistentMetadataCachePath(cachePath);
}
#endif
+#endif
}
/*!
diff --git a/WebKit/qt/Api/qwebsettings.h b/WebKit/qt/Api/qwebsettings.h
index d5e0ef6..7dad72f 100644
--- a/WebKit/qt/Api/qwebsettings.h
+++ b/WebKit/qt/Api/qwebsettings.h
@@ -76,7 +76,8 @@ public:
FrameFlatteningEnabled,
SiteSpecificQuirksEnabled,
WebGLEnabled,
- HyperlinkAuditingEnabled
+ HyperlinkAuditingEnabled,
+ JavascriptCanCloseWindows
};
enum WebGraphic {
MissingImageGraphic,
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 7a2c064..c1bf664 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,584 @@
+2010-10-20 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Wrong null check in PopupMenuQt
+ https://bugs.webkit.org/show_bug.cgi?id=47945
+
+ Wrong null check in PopupMenuQt.
+
+ * WebCoreSupport/PopupMenuQt.cpp:
+ (WebCore::PopupMenuQt::hide):
+
+2010-10-18 Viatcheslav Ostapenko <ostapenko.viatcheslav@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Export QWebPage::ViewportAttributes class.
+ https://bugs.webkit.org/show_bug.cgi?id=47845
+
+ * Api/qwebpage.h:
+ * symbian/eabi/QtWebKitu.def:
+
+2010-10-18 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Simon Fraser.
+
+ Web Inspector: [crash] when Inspector Open in CSSStyleSelector::loadPendingImages().
+ https://bugs.webkit.org/show_bug.cgi?id=46224
+
+ * WebCoreSupport/InspectorClientQt.cpp:
+ (WebCore::InspectorClientQt::sendMessageToFrontend):
+
+2010-10-18 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] AC rendering bugs
+
+ This fixes a regression that was introduced by making scrolling in accelerated compositing automatic,
+ which made our explicit function to scroll the compositing layers superfluous, making the scrolling behavior
+ when graphics layers are present incorrect. The fix simply removes those redundant functions.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47571
+
+ * WebCoreSupport/PageClientQt.cpp:
+ (WebCore::PageClientQGraphicsWidget::scroll):
+ (WebCore::PageClientQGraphicsWidget::update):
+ (WebCore::PageClientQGraphicsWidget::setRootGraphicsLayer):
+ * WebCoreSupport/PageClientQt.h:
+
+2010-10-18 Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
+
+ Reviewed by nobody, build fix.
+
+ [Qt] Fix the build with MSVC.
+
+ Splitting the condition in two to prevent qmake parentheses issues.
+
+ * Api/DerivedSources.pro:
+
+2010-10-18 Yi Shen <yi.4.shen@nokia.com>
+
+ Reviewed by Antonio Gomes.
+
+ [QT] Unable to load pages on QtTestBrowser after canceling a page load.
+ https://bugs.webkit.org/show_bug.cgi?id=43827
+
+ * Api/qwebpage.cpp:
+ (QWebPage::triggerAction):
+
+2010-10-15 Qi Zhang <qi.2.zhang@nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] window.close() doesn't work in qt
+ https://bugs.webkit.org/show_bug.cgi?id=46186
+
+ Introduce new attribute in QWebSettings to trigger "setAllowScriptsToCloseWindow"
+
+ * Api/qwebsettings.cpp:
+ (QWebSettingsPrivate::apply):
+ * Api/qwebsettings.h:
+
+2010-10-15 Andreas Kling <kling@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Unbreak scrolling the ContentsLayer with QWebView
+
+ r69777 broke scrolling the contents layer in QWebView by not restoring
+ the painter clip after painting each part of the dirty region.
+
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::renderRelativeCoords):
+
+2010-09-27 Dawit Alemayehu <adawit@kde.org>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Added functions for obtaining and checking the supported content types.
+ http://webkit.org/b/37880
+
+ * Api/qwebpage.cpp:
+ (extractContentTypeFromHash):
+ (extractContentTypeFromPluginVector):
+ (QWebPage::supportedContentTypes):
+ (QWebPage::supportsContentType):
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::supportedContentType):
+
+2010-10-14 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r69795.
+ http://trac.webkit.org/changeset/69795
+ https://bugs.webkit.org/show_bug.cgi?id=47687
+
+ 'See discussion at webkit.org/b/47609' (Requested by mwenge on
+ #webkit).
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::canHandleRequest):
+ (WebCore::FrameLoaderClientQt::dispatchUnableToImplementPolicy):
+
+2010-10-14 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Fix http/tests/misc/redirect-to-external-url.html
+
+ Support the test in FrameLoaderClientQt and unskip.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47609
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::canHandleRequest):
+ (WebCore::FrameLoaderClientQt::dispatchUnableToImplementPolicy):
+
+2010-10-14 No'am Rosenthal <noam.rosenthal@nokia.com>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Texmap] [Qt] Texture mapper initial implementation
+ https://bugs.webkit.org/show_bug.cgi?id=47070
+
+ Allow rendering of accelerated-compositing with TextureMapper, inside a QWebFrame. The frame will render the regular content,
+ either normally or through tiled backingstore, then let the TextureMapper layer render itself to the active context, and
+ then render the scrollbar and pan icon. This is different from the current implementation, which uses additional QGraphicsItems for AC
+ and the scrollbar overlay.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebView::paint):
+ * Api/qwebframe.cpp:
+ (QWebFramePrivate::renderFromTiledBackingStore):
+ (QWebFramePrivate::renderRelativeCoords):
+
+2010-10-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=43987
+ Switch XMLHttpRequest, FileReader, and FileReaderSync to use a Stringbuilder
+ to construct their internal result string. Remove ScriptString (this is now
+ redundant).
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+
+2010-10-13 Dinu Jacob <dinu.jacob@nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Update .def file for Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=47540
+
+ Updated symbols for Symbian - added viewportAttributesForSize and
+ made viewportConfigurationForSize absent based on the API change in
+ 47325
+
+ * symbian/eabi/QtWebKitu.def:
+
+2010-10-12 David Leong <david.leong@nokia.com>
+
+ Reviewed by Laszlo Gombos.
+
+ [Qt] Enable Netscape plugin metadata caching on Linux
+ https://bugs.webkit.org/show_bug.cgi?id=46287
+
+ QWebSettings::enablePersistentStorage will now store the netscape
+ plugin cache to QDesktopServices::CacheLocation.
+
+ * Api/qwebsettings.cpp:
+ (QWebSettings::enablePersistentStorage):
+
+2010-10-12 Yael Aharon <yael.aharon@nokia.com>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Editing commands should not be executed on non-editable content.
+ https://bugs.webkit.org/show_bug.cgi?id=47426
+
+ Remove calls to editor()->command() when we are not in editable content.
+ There is no value in doing that, and in some cases, it prevents scrolling.
+
+ * WebCoreSupport/EditorClientQt.cpp:
+ (WebCore::EditorClientQt::handleKeyboardEvent):
+
+2010-10-08 Hui Huang <hui.2.huang@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ ifdef out code that rewrites Flash Plug-in wmode for Symbian build
+ https://bugs.webkit.org/show_bug.cgi?id=43484
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createPlugin):
+
+2010-10-07 Andreas Kling <kling@webkit.org>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] API: ViewportConfiguration => ViewportArguments
+ https://bugs.webkit.org/show_bug.cgi?id=47325
+
+ * Api/qwebpage.cpp:
+ (QWebPage::ViewportAttributes::ViewportAttributes):
+ (QWebPage::ViewportAttributes::~ViewportAttributes):
+ (QWebPage::ViewportAttributes::operator=):
+ (QWebPage::viewportAttributesForSize):
+ * Api/qwebpage.h:
+ * Api/qwebpage_p.h:
+ (QtViewportAttributesPrivate::QtViewportAttributesPrivate):
+
+2010-10-07 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Fixing viewport meta tag user-scalable handling
+ https://bugs.webkit.org/show_bug.cgi?id=47330
+
+ user-scalable attribute was not considered in viewport meta tag handling.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::viewportConfigurationForSize):
+
+2010-10-05 Diego Gonzalez <diegohcg@webkit.org>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Hook up accelerometer data via Qt DeviceMotion
+ https://bugs.webkit.org/show_bug.cgi?id=47105
+
+ Get accelerometer necessary data via Qt mobility library using a
+ provider class. Enable, also the RotationRate using the current device
+ orientation provider.
+
+ * WebCoreSupport/DeviceMotionClientQt.cpp:
+ (WebCore::DeviceMotionClientQt::DeviceMotionClientQt):
+ (WebCore::DeviceMotionClientQt::~DeviceMotionClientQt):
+ (WebCore::DeviceMotionClientQt::startUpdating):
+ (WebCore::DeviceMotionClientQt::stopUpdating):
+ (WebCore::DeviceMotionClientQt::currentDeviceMotion):
+ (WebCore::DeviceMotionClientQt::changeDeviceMotion):
+ * WebCoreSupport/DeviceMotionClientQt.h:
+ * WebCoreSupport/DeviceMotionProviderQt.cpp: Added.
+ (WebCore::DeviceMotionProviderQt::DeviceMotionProviderQt):
+ (WebCore::DeviceMotionProviderQt::~DeviceMotionProviderQt):
+ (WebCore::DeviceMotionProviderQt::start):
+ (WebCore::DeviceMotionProviderQt::stop):
+ (WebCore::DeviceMotionProviderQt::filter):
+ * WebCoreSupport/DeviceMotionProviderQt.h: Added.
+ (WebCore::DeviceMotionProviderQt::currentDeviceMotion):
+
+2010-10-07 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Some viewport meta tag api refactoring
+ https://bugs.webkit.org/show_bug.cgi?id=47334
+
+ WebCore::findConfigurationForViewportData renamed to computeViewportAttributes.
+ WebCore::ViewportAttributes::layoutViewport renamed to layoutSize.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::viewportConfigurationForSize):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::viewportAsText):
+
+2010-10-07 Keith Kyzivat <keith.kyzivat@nokia.com>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Update .def file for Symbian
+ https://bugs.webkit.org/show_bug.cgi?id=47336
+ Fix and re-freeze symbols for symbian - viewportConfigurationForSize
+ API changed, allowGeolocationRequest removed from API, several
+ DumpRenderTree support calls added.
+
+ * symbian/eabi/QtWebKitu.def:
+
+2010-10-06 Ragner Magalhaes <ragner.magalhaes@openbossa.org>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Duplicated code in QWebPagePrivate
+ https://bugs.webkit.org/show_bug.cgi?id=47195
+
+ Remove duplicated code from QWebPagePrivate class for QGraphicsView and QWidget's mouse events.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::mouseMoveEvent):
+ (QWebPagePrivate::mousePressEvent):
+ (QWebPagePrivate::mouseDoubleClickEvent):
+ (QWebPagePrivate::mouseTripleClickEvent):
+ (QWebPagePrivate::mouseReleaseEvent):
+ (QWebPagePrivate::wheelEvent):
+ (QWebPagePrivate::dragEnterEvent):
+ (QWebPagePrivate::dragLeaveEvent):
+ (QWebPagePrivate::dragMoveEvent):
+ (QWebPagePrivate::dropEvent):
+ * Api/qwebpage_p.h:
+
+2010-10-06 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Renaming WebCore::ViewportConfiguration to WebCore::ViewportAttributes
+ https://bugs.webkit.org/show_bug.cgi?id=47268
+
+ Renaming WebCore::ViewportConfiguration to WebCore::ViewportAttributes
+
+ * Api/qwebpage.cpp:
+ (QWebPage::viewportConfigurationForSize):
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::viewportAsText):
+
+2010-10-05 Andrew Wilson <atwilson@chromium.org>
+
+ Reviewed by Andreas Kling.
+
+ Notification onclick() events don't act like user gestures
+ https://bugs.webkit.org/show_bug.cgi?id=47137
+
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+ (WebCore::NotificationPresenterClientQt::notificationClicked):
+ Use UserGestureIndicator to make sure click events are treated like user gestures.
+
+2010-10-05 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Fix url conversion in QWebHistory
+
+ Converting from KURL to WFT::String to QUrl does not
+ permit proper percent encoding later.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47048
+
+ * Api/qwebhistory.cpp:
+ (QWebHistoryItem::originalUrl):
+ (QWebHistoryItem::url):
+
+2010-10-05 Jakob Petsovits <jpetsovits@rim.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Make build work with QT_NO_CURSOR
+ https://bugs.webkit.org/show_bug.cgi?id=46097
+
+ Add a missing semicolon.
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::setCursor):
+
+2010-10-05 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Unreviewed build fix.
+
+ [Symbian] Fix build issue due to gaps in ordinals in the def file
+
+ Restore previously removed symbols and mark them absent instead. We must
+ not remove symbols from this file, because it breaks binary compatibility
+ (when re-assigning the ordinals of the following symbols) or it causes build
+ breakage when instead having a gap in the ordinal sequence. Instead removing
+ a symbol is done by marking it as absent.
+
+ * symbian/eabi/QtWebKitu.def:
+
+2010-10-04 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Darin Adler.
+
+ Rename RedirectScheduler to NavigationScheduler
+ https://bugs.webkit.org/show_bug.cgi?id=47037
+
+ Update for name change.
+
+ * Api/qwebpage.cpp:
+ (QWebPage::triggerAction):
+
+2010-10-04 Diego Gonzalez <diegohcg@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Hook up DeviceOrientation data for Qt support
+ https://bugs.webkit.org/show_bug.cgi?id=47052
+
+ Get DeviceOrientation necessary data via Qt mobility library
+ using a provider class.
+
+ * WebCoreSupport/DeviceOrientationClientQt.cpp:
+ (WebCore::DeviceOrientationClientQt::DeviceOrientationClientQt):
+ (WebCore::DeviceOrientationClientQt::~DeviceOrientationClientQt):
+ (WebCore::DeviceOrientationClientQt::startUpdating):
+ (WebCore::DeviceOrientationClientQt::stopUpdating):
+ (WebCore::DeviceOrientationClientQt::lastOrientation):
+ (WebCore::DeviceOrientationClientQt::changeDeviceOrientation):
+ * WebCoreSupport/DeviceOrientationClientQt.h:
+ * WebCoreSupport/DeviceOrientationProviderQt.cpp: Added.
+ (WebCore::DeviceOrientationProviderQt::DeviceOrientationProviderQt):
+ (WebCore::DeviceOrientationProviderQt::~DeviceOrientationProviderQt):
+ (WebCore::DeviceOrientationProviderQt::start):
+ (WebCore::DeviceOrientationProviderQt::stop):
+ (WebCore::DeviceOrientationProviderQt::filter):
+ * WebCoreSupport/DeviceOrientationProviderQt.h: Added.
+ (WebCore::DeviceOrientationProviderQt::isActive):
+ (WebCore::DeviceOrientationProviderQt::orientation):
+ (WebCore::DeviceOrientationProviderQt::hasAlpha):
+
+2010-09-28 Luiz Agostini <luiz.agostini@openbossa.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ Viewport data change notifications
+ https://bugs.webkit.org/show_bug.cgi?id=46755
+
+ Regarding viewport meta tags, what matters for browser developers is to know when the viewport data has
+ changed and its current value. Viewport data belongs to the document, but it is useful to keep the current
+ viewport data in Page as a reference, to be able to send notifications only when the current viewport
+ has changed.
+
+ * Api/qwebframe.cpp:
+ * Api/qwebframe_p.h:
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::viewportArguments):
+ (QWebPage::viewportConfigurationForSize):
+ * Api/qwebpage_p.h:
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::viewportDataChanged):
+ * WebCoreSupport/ChromeClientQt.h:
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::viewportAsText):
+
+2010-10-04 Simon Hausmann <simon.hausmann@nokia.com>
+
+ Rubber-stamped by Tor Arne Vestbø.
+
+ [Qt] Fix platform plugin support after r68128
+
+ Replaced the qobject_cast from the QObject derived extension to a
+ static_cast. qobject_cast works by comparing pointers to meta-object
+ instances, of which there are two each: one compiled into WebKit and
+ one compiled into the plugin.
+
+ The platform plugin ensures the validity of the interface contract
+ through its version and the initial safe qobject_cast from QObject
+ to QWebKitPlatformPlugin. After that it is safe to use static_cast,
+ and with the recent changes even required.
+
+ * WebCoreSupport/QtPlatformPlugin.cpp:
+ (WebCore::QtPlatformPlugin::createSelectInputMethod):
+ (WebCore::QtPlatformPlugin::createNotificationPresenter):
+ (WebCore::QtPlatformPlugin::createHapticFeedbackPlayer):
+
+2010-10-02 Diego Gonzalez <diegohcg@webkit.org>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Qt] Provide Qt support for DeviceMotion/Orientation clients
+ https://bugs.webkit.org/show_bug.cgi?id=47051
+
+ Dummy implementation of DeviceMotion/Orientation client classes
+ to make possible to hook up motion/orientation data
+ in further implementations.
+
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::QWebPagePrivate):
+ * WebCoreSupport/DeviceMotionClientQt.cpp: Added.
+ (WebCore::DeviceMotionClientQt::DeviceMotionClientQt):
+ (WebCore::DeviceMotionClientQt::setController):
+ (WebCore::DeviceMotionClientQt::startUpdating):
+ (WebCore::DeviceMotionClientQt::stopUpdating):
+ (WebCore::DeviceMotionClientQt::currentDeviceMotion):
+ (WebCore::DeviceMotionClientQt::deviceMotionControllerDestroyed):
+ * WebCoreSupport/DeviceMotionClientQt.h: Added.
+ (WebCore::DeviceMotionClientQt::~DeviceMotionClientQt):
+ * WebCoreSupport/DeviceOrientationClientQt.cpp: Added.
+ (WebCore::DeviceOrientationClientQt::DeviceOrientationClientQt):
+ (WebCore::DeviceOrientationClientQt::setController):
+ (WebCore::DeviceOrientationClientQt::startUpdating):
+ (WebCore::DeviceOrientationClientQt::stopUpdating):
+ (WebCore::DeviceOrientationClientQt::lastOrientation):
+ (WebCore::DeviceOrientationClientQt::deviceOrientationControllerDestroyed):
+ * WebCoreSupport/DeviceOrientationClientQt.h: Added.
+ (WebCore::DeviceOrientationClientQt::~DeviceOrientationClientQt):
+
+2010-09-30 Robert Hogan <robert@webkit.org>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Support for PlainTextController
+
+ Unskip editing/text-iterator/basic-iteration.html
+
+ https://bugs.webkit.org/show_bug.cgi?id=38805
+
+ * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+ (DumpRenderTreeSupportQt::plainText):
+ * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
+2010-09-30 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Tor Arne Vestbø.
+
+ [Qt] V8 port: Unbreak build
+
+ Add missing <wtf/text/CString.h> include.
+
+ * WebCoreSupport/InspectorServerQt.cpp:
+
+2010-09-30 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Crash if an scene with accelerated compositing layout during the paint event
+ https://bugs.webkit.org/show_bug.cgi?id=46812
+
+ Delay the deletion of the overlay after the current event is processed.
+
+ Removing the overlay can sometimes be done inside the rendering code of
+ the overlay itself. When the rendering code is using the reference after
+ the deletion of the overlay, WebKit crashes.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::overlay):
+ * WebCoreSupport/PageClientQt.cpp:
+ (WebCore::PageClientQGraphicsWidget::~PageClientQGraphicsWidget):
+ (WebCore::PageClientQGraphicsWidget::createOrDeleteOverlay):
+ * WebCoreSupport/PageClientQt.h:
+ (WebCore::PageClientQGraphicsWidget::PageClientQGraphicsWidget):
+
+2010-09-30 Benjamin Poulain <benjamin.poulain@nokia.com>
+
+ Reviewed by Andreas Kling.
+
+ [Qt] Fix tst_QWebPage::geolocationRequestJS()
+ https://bugs.webkit.org/show_bug.cgi?id=46814
+
+ Disable the test. This test cannot pass with a
+ standard build of WebKit, it is disabled until the API is finilized.
+
+ * tests/qwebpage/tst_qwebpage.cpp:
+ (tst_QWebPage::geolocationRequestJS):
+
+2010-09-29 Andreas Kling <andreas.kling@nokia.com>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Don't keep local reference to QGraphicsItemOverlay in QGWVPrivate
+ https://bugs.webkit.org/show_bug.cgi?id=46812
+
+ Get the QGraphicsItemOverlay* via the QWebPageClient (d->page->d->client)
+ instead of keeping a local pointer to it.
+
+ This is cleanup for a follow-up patch.
+
+ * Api/qgraphicswebview.cpp:
+ (QGraphicsWebViewPrivate::overlay):
+ (QGraphicsWebView::paint):
+ (QGraphicsWebView::setPage):
+ (QGraphicsWebView::updateGeometry):
+ (QGraphicsWebView::setGeometry):
+
2010-09-28 Jenn Braithwaite <jennb@chromium.org>
Reviewed by Dmitry Titov.
@@ -216,7 +797,6 @@
(QWebSettings::QWebSettings):
* Api/qwebsettings.h:
-
2010-09-23 Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
Reviewed by Simon Hausmann.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 9fbc5e5..3bcc8f8 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -566,7 +566,7 @@ void ChromeClientQt::setCursor(const Cursor& cursor)
return;
pageClient->setCursor(*cursor.platformCursor());
#else
- UNUSED_PARAM(cursor)
+ UNUSED_PARAM(cursor);
#endif
}
@@ -642,7 +642,7 @@ QWebSelectMethod* ChromeClientQt::createSelectPopup() const
#endif
}
-void ChromeClientQt::didReceiveViewportArguments(Frame* frame, const ViewportArguments& arguments) const
+void ChromeClientQt::dispatchViewportDataDidChange(const ViewportArguments&) const
{
emit m_webPage->viewportChangeRequested();
}
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.h b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
index 56801aa..0a449f6 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.h
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.h
@@ -177,7 +177,7 @@ namespace WebCore {
QWebSelectMethod* createSelectPopup() const;
- virtual void didReceiveViewportArguments(Frame*, const ViewportArguments&) const;
+ virtual void dispatchViewportDataDidChange(const ViewportArguments&) const;
QWebPage* m_webPage;
WebCore::KURL lastHoverURL;
diff --git a/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp b/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp
new file mode 100644
index 0000000..4761514
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.cpp
@@ -0,0 +1,80 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#include "config.h"
+#include "DeviceMotionClientQt.h"
+
+#include "DeviceMotionController.h"
+#include "DeviceMotionProviderQt.h"
+
+#include "qwebpage.h"
+
+namespace WebCore {
+
+DeviceMotionClientQt::DeviceMotionClientQt(QWebPage* page)
+ : m_page(page)
+ , m_controller(0)
+ , m_provider(new DeviceMotionProviderQt())
+{
+
+ connect(m_provider, SIGNAL(deviceMotionChanged()), SLOT(changeDeviceMotion()));
+}
+
+DeviceMotionClientQt::~DeviceMotionClientQt()
+{
+ disconnect();
+ delete m_provider;
+}
+
+void DeviceMotionClientQt::setController(DeviceMotionController* controller)
+{
+ m_controller = controller;
+}
+
+void DeviceMotionClientQt::startUpdating()
+{
+ m_provider->start();
+}
+
+void DeviceMotionClientQt::stopUpdating()
+{
+ m_provider->stop();
+}
+
+DeviceMotionData* DeviceMotionClientQt::currentDeviceMotion() const
+{
+ return m_provider->currentDeviceMotion();
+}
+
+void DeviceMotionClientQt::deviceMotionControllerDestroyed()
+{
+ delete this;
+}
+
+void DeviceMotionClientQt::changeDeviceMotion()
+{
+ if (!m_controller)
+ return;
+
+ m_controller->didChangeDeviceMotion(currentDeviceMotion());
+}
+
+} // namespace WebCore
+
+#include "moc_DeviceMotionClientQt.cpp"
diff --git a/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h b/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h
new file mode 100644
index 0000000..ea843e2
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceMotionClientQt.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#ifndef DeviceMotionClientQt_h
+#define DeviceMotionClientQt_h
+
+#include "DeviceMotionClient.h"
+#include "DeviceMotionData.h"
+
+#include <QObject>
+
+class QWebPage;
+
+namespace WebCore {
+
+class DeviceMotionProviderQt;
+
+class DeviceMotionClientQt : public QObject, public DeviceMotionClient {
+ Q_OBJECT
+public:
+ DeviceMotionClientQt(QWebPage*);
+ virtual ~DeviceMotionClientQt();
+
+ virtual void setController(DeviceMotionController*);
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual DeviceMotionData* currentDeviceMotion() const;
+ virtual void deviceMotionControllerDestroyed();
+
+public Q_SLOTS:
+ void changeDeviceMotion();
+
+private:
+ QWebPage* m_page;
+ DeviceMotionController* m_controller;
+ DeviceMotionProviderQt* m_provider;
+};
+
+} // namespece WebCore
+
+#endif // DeviceMotionClientQt_h
diff --git a/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp b/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp
new file mode 100644
index 0000000..ccf7697
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.cpp
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#include "config.h"
+#include "DeviceMotionProviderQt.h"
+
+#include "DeviceOrientationProviderQt.h"
+
+namespace WebCore {
+
+DeviceMotionProviderQt::DeviceMotionProviderQt()
+{
+ m_acceleration.addFilter(this);
+ m_motion = DeviceMotionData::create();
+ m_deviceOrientation = new DeviceOrientationProviderQt();
+}
+
+DeviceMotionProviderQt::~DeviceMotionProviderQt()
+{
+ delete m_deviceOrientation;
+}
+
+void DeviceMotionProviderQt::start()
+{
+ m_acceleration.start();
+ m_deviceOrientation->start();
+}
+
+void DeviceMotionProviderQt::stop()
+{
+ m_acceleration.stop();
+ m_deviceOrientation->stop();
+}
+
+bool DeviceMotionProviderQt::filter(QAccelerometerReading* reading)
+{
+ RefPtr<DeviceMotionData::Acceleration> accel = DeviceMotionData::Acceleration::create(
+ /* x available */ true, reading->x(),
+ /* y available */ true, reading->y(),
+ /* z available */ true, reading->z());
+
+ RefPtr<DeviceMotionData::RotationRate> rotation = DeviceMotionData::RotationRate::create(
+ m_deviceOrientation->hasAlpha(), m_deviceOrientation->orientation()->alpha(),
+ /* beta available */ true, m_deviceOrientation->orientation()->beta(),
+ /* gamma available */ true, m_deviceOrientation->orientation()->gamma());
+
+ m_motion = DeviceMotionData::create(accel,
+ accel, /* FIXME: Needs to provide acceleration include gravity. */
+ rotation,
+ false, 0 /* The interval is treated internally by Qt mobility */);
+
+ emit deviceMotionChanged();
+
+ return false;
+}
+
+} // namespace WebCore
+
+#include "moc_DeviceMotionProviderQt.cpp"
diff --git a/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h b/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h
new file mode 100644
index 0000000..f3200d5
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceMotionProviderQt.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#ifndef DeviceMotionProviderQt_h
+#define DeviceMotionProviderQt_h
+
+#include "DeviceMotionData.h"
+#include "RefPtr.h"
+
+#include <QAccelerometerFilter>
+#include <QObject>
+
+QTM_USE_NAMESPACE
+
+namespace WebCore {
+
+class DeviceOrientationProviderQt;
+
+class DeviceMotionProviderQt : public QObject, public QAccelerometerFilter {
+ Q_OBJECT
+public:
+ DeviceMotionProviderQt();
+ ~DeviceMotionProviderQt();
+
+ bool filter(QAccelerometerReading*);
+ void start();
+ void stop();
+ DeviceMotionData* currentDeviceMotion() const { return m_motion.get(); }
+
+Q_SIGNALS:
+ void deviceMotionChanged();
+
+private:
+ RefPtr<DeviceMotionData> m_motion;
+ QAccelerometer m_acceleration;
+ DeviceOrientationProviderQt* m_deviceOrientation;
+};
+
+} // namespace WebCore
+
+#endif // DeviceMotionProviderQt_h
diff --git a/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp b/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp
new file mode 100644
index 0000000..1d0c6d1
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.cpp
@@ -0,0 +1,78 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#include "config.h"
+#include "DeviceOrientationClientQt.h"
+
+#include "DeviceOrientationController.h"
+#include "DeviceOrientationProviderQt.h"
+#include "qwebpage.h"
+
+namespace WebCore {
+
+DeviceOrientationClientQt::DeviceOrientationClientQt(QWebPage* page)
+ : m_page(page)
+ , m_controller(0)
+ , m_provider(new DeviceOrientationProviderQt())
+{
+ connect(m_provider, SIGNAL(deviceOrientationChanged(DeviceOrientation*)), SLOT(changeDeviceOrientation(DeviceOrientation*)));
+}
+
+DeviceOrientationClientQt::~DeviceOrientationClientQt()
+{
+ disconnect();
+ delete m_provider;
+}
+
+void DeviceOrientationClientQt::setController(DeviceOrientationController* controller)
+{
+ m_controller = controller;
+}
+
+void DeviceOrientationClientQt::startUpdating()
+{
+ m_provider->start();
+}
+
+void DeviceOrientationClientQt::stopUpdating()
+{
+ m_provider->stop();
+}
+
+DeviceOrientation* DeviceOrientationClientQt::lastOrientation() const
+{
+ return m_provider->orientation();
+}
+
+void DeviceOrientationClientQt::deviceOrientationControllerDestroyed()
+{
+ delete this;
+}
+
+void DeviceOrientationClientQt::changeDeviceOrientation(DeviceOrientation* orientation)
+{
+ if (!m_controller)
+ return;
+
+ m_controller->didChangeDeviceOrientation(orientation);
+}
+
+} // namespace WebCore
+
+#include "moc_DeviceOrientationClientQt.cpp"
diff --git a/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h b/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h
new file mode 100644
index 0000000..61968c4
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceOrientationClientQt.h
@@ -0,0 +1,57 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#ifndef DeviceOrientationClientQt_h
+#define DeviceOrientationClientQt_h
+
+#include "DeviceOrientation.h"
+#include "DeviceOrientationClient.h"
+
+#include <QObject>
+
+class QWebPage;
+
+namespace WebCore {
+
+class DeviceOrientationProviderQt;
+
+class DeviceOrientationClientQt : public QObject, public DeviceOrientationClient {
+ Q_OBJECT
+public:
+ DeviceOrientationClientQt(QWebPage*);
+ virtual ~DeviceOrientationClientQt();
+
+ virtual void setController(DeviceOrientationController*);
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual DeviceOrientation* lastOrientation() const;
+ virtual void deviceOrientationControllerDestroyed();
+
+public Q_SLOTS:
+ void changeDeviceOrientation(DeviceOrientation*);
+
+private:
+ QWebPage* m_page;
+ DeviceOrientationController* m_controller;
+ DeviceOrientationProviderQt* m_provider;
+};
+
+} // namespace WebCore
+
+#endif // DeviceOrientationClientQt_h
diff --git a/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp b/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
new file mode 100644
index 0000000..051eba0
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.cpp
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#include "config.h"
+#include "DeviceOrientationProviderQt.h"
+
+namespace WebCore {
+
+DeviceOrientationProviderQt::DeviceOrientationProviderQt()
+{
+ m_rotation.addFilter(this);
+ m_orientation = DeviceOrientation::create();
+}
+
+DeviceOrientationProviderQt::~DeviceOrientationProviderQt()
+{
+}
+
+void DeviceOrientationProviderQt::start()
+{
+ m_rotation.start();
+}
+
+void DeviceOrientationProviderQt::stop()
+{
+ m_rotation.stop();
+}
+
+bool DeviceOrientationProviderQt::filter(QRotationReading* reading)
+{
+ // Provide device orientation data according W3C spec:
+ // http://dev.w3.org/geo/api/spec-source-orientation.html
+ // Qt mobility provide these data via QRotationSensor using the
+ // QRotationReading class:
+ // - the rotation around z axis (alpha) is given as z in QRotationReading;
+ // - the rotation around x axis (beta) is given as x in QRotationReading;
+ // - the rotation around y axis (gamma) is given as y in QRotationReading;
+ // See: http://doc.qt.nokia.com/qtmobility-1.0/qrotationreading.html
+ // The Z (alpha) rotation angle is checked via hasAlpha() private method,
+ // depending if the device is able do detect the alpha rotation. X (beta) and
+ // Y (gamma) axis are availble in this context.
+ m_orientation = DeviceOrientation::create(hasAlpha(), reading->z(),
+ /* x available */ true, reading->x(),
+ /* y available */ true, reading->y());
+ emit deviceOrientationChanged(m_orientation.get());
+
+ return false;
+}
+
+}
+
+#include "moc_DeviceOrientationProviderQt.cpp"
diff --git a/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h b/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
new file mode 100644
index 0000000..86c224e
--- /dev/null
+++ b/WebKit/qt/WebCoreSupport/DeviceOrientationProviderQt.h
@@ -0,0 +1,58 @@
+/*
+ * Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies)
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ *
+ */
+#ifndef DeviceOrientationProviderQt_h
+#define DeviceOrientationProviderQt_h
+
+#include "DeviceOrientation.h"
+#include "RefPtr.h"
+
+#include <QObject>
+#include <QRotationFilter>
+
+QTM_USE_NAMESPACE
+
+namespace WebCore {
+
+class DeviceOrientationClientQt;
+
+class DeviceOrientationProviderQt : public QObject, public QRotationFilter {
+ Q_OBJECT
+public:
+ DeviceOrientationProviderQt();
+ ~DeviceOrientationProviderQt();
+
+ bool filter(QRotationReading*);
+ void start();
+ void stop();
+ bool isActive() const { return m_rotation.isActive(); }
+ DeviceOrientation* orientation() const { return m_orientation.get(); }
+ bool hasAlpha() const { return m_rotation.property("hasZ").toBool(); }
+
+Q_SIGNALS:
+ void deviceOrientationChanged(DeviceOrientation*);
+
+private:
+ RefPtr<DeviceOrientation> m_orientation;
+ QRotationSensor m_rotation;
+};
+
+}
+
+#endif // DeviceOrientationProviderQt_h
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
index 836df49..28f6810 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
@@ -631,8 +631,8 @@ void DumpRenderTreeSupportQt::dumpNotification(bool b)
QString DumpRenderTreeSupportQt::viewportAsText(QWebPage* page, const QSize& availableSize)
{
- WebCore::ViewportArguments args = page->mainFrame()->d->viewportArguments();
- WebCore::ViewportConfiguration conf = WebCore::findConfigurationForViewportData(args,
+ WebCore::ViewportArguments args = page->d->viewportArguments();
+ WebCore::ViewportAttributes conf = WebCore::computeViewportAttributes(args,
/* desktop-width */ 980,
/* device-width */ 320,
/* device-height */ 480,
@@ -641,8 +641,8 @@ QString DumpRenderTreeSupportQt::viewportAsText(QWebPage* page, const QSize& ava
QString res;
res = res.sprintf("viewport size %dx%d scale %f with limits [%f, %f]\n",
- conf.layoutViewport.width(),
- conf.layoutViewport.height(),
+ conf.layoutSize.width(),
+ conf.layoutSize.height(),
conf.initialScale,
conf.minimumScale,
conf.maximumScale);
@@ -764,6 +764,15 @@ void DumpRenderTreeSupportQt::simulateDesktopNotificationClick(const QString& ti
#endif
}
+QString DumpRenderTreeSupportQt::plainText(const QVariant& range)
+{
+ QMap<QString, QVariant> map = range.toMap();
+ QVariant startContainer = map.value("startContainer");
+ map = startContainer.toMap();
+
+ return map.value("innerText").toString();
+}
+
// Provide a backward compatibility with previously exported private symbols as of QtWebKit 4.6 release
void QWEBKIT_EXPORT qt_resumeActiveDOMObjects(QWebFrame* frame)
diff --git a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
index 5a59475..0e76f04 100644
--- a/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
+++ b/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
@@ -98,6 +98,7 @@ public:
static QString markerTextForListItem(const QWebElement& listItem);
static QVariantMap computedStyleIncludingVisitedInfo(const QWebElement& element);
+ static QString plainText(const QVariant& rng);
static void dumpFrameLoader(bool b);
static void dumpResourceLoadCallbacks(bool b);
diff --git a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
index 9db4333..2dd3b37 100644
--- a/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/EditorClientQt.cpp
@@ -457,39 +457,7 @@ void EditorClientQt::handleKeyboardEvent(KeyboardEvent* event)
m_page->triggerAction(QWebPage::Copy);
else
#endif // QT_NO_SHORTCUT
- switch (kevent->windowsVirtualKeyCode()) {
- case VK_UP:
- frame->editor()->command("MoveUp").execute();
- break;
- case VK_DOWN:
- frame->editor()->command("MoveDown").execute();
- break;
- case VK_PRIOR: // PageUp
- frame->editor()->command("MovePageUp").execute();
- break;
- case VK_NEXT: // PageDown
- frame->editor()->command("MovePageDown").execute();
- break;
- case VK_HOME:
- if (kevent->ctrlKey())
- frame->editor()->command("MoveToBeginningOfDocument").execute();
- break;
- case VK_END:
- if (kevent->ctrlKey())
- frame->editor()->command("MoveToEndOfDocument").execute();
- break;
- default:
- if (kevent->ctrlKey()) {
- switch (kevent->windowsVirtualKeyCode()) {
- case VK_A:
- frame->editor()->command("SelectAll").execute();
- break;
- default:
- return;
- }
- } else
- return;
- }
+ return;
}
event->setDefaultHandled();
}
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 41bcb3c..4ebc7e1 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -64,7 +64,6 @@
#include "ResourceHandleInternal.h"
#include "ResourceHandle.h"
#include "ScriptController.h"
-#include "ScriptString.h"
#include "Settings.h"
#include "QWebPageClient.h"
#include "ViewportArguments.h"
@@ -1505,6 +1504,7 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
else { // NPAPI Plugins
Vector<String> params = paramNames;
Vector<String> values = paramValues;
+#if !OS(SYMBIAN)
if (mimeType == "application/x-shockwave-flash") {
QWebPageClient* client = m_webFrame->page()->d->client;
const bool isQWebView = client && qobject_cast<QWidget*>(client->pluginParent());
@@ -1530,6 +1530,7 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
}
#endif
}
+#endif
RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url,
params, values, mimeType, loadManually);
diff --git a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
index b6673e6..e596870 100644
--- a/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/InspectorClientQt.cpp
@@ -39,7 +39,6 @@
#include "NotImplemented.h"
#include "Page.h"
#include "PlatformString.h"
-#include "ScriptController.h"
#include "ScriptDebugServer.h"
#include "qwebinspector.h"
#include "qwebinspector_p.h"
@@ -266,22 +265,7 @@ bool InspectorClientQt::sendMessageToFrontend(const String& message)
return false;
Page* frontendPage = QWebPagePrivate::core(m_frontendWebPage);
- if (!frontendPage)
- return false;
-
- Frame* frame = frontendPage->mainFrame();
- if (!frame)
- return false;
-
- ScriptController* scriptController = frame->script();
- if (!scriptController)
- return false;
-
- String dispatchToFrontend("WebInspector.dispatchMessageFromBackend(");
- dispatchToFrontend += message;
- dispatchToFrontend += ");";
- scriptController->executeScript(dispatchToFrontend);
- return true;
+ return doDispatchMessageOnFrontendPage(frontendPage, message);
}
static String variantToSetting(const QVariant& qvariant)
diff --git a/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp b/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
index fad7247..a6dda58 100644
--- a/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
+++ b/WebKit/qt/WebCoreSupport/InspectorServerQt.cpp
@@ -37,6 +37,7 @@
#include <QUrl>
#include <QWidget>
#include <qendian.h>
+#include <wtf/text/CString.h>
namespace WebCore {
diff --git a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
index 7b33d9e..0324c0d 100644
--- a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
@@ -40,6 +40,7 @@
#include "QtPlatformPlugin.h"
#include "ScriptExecutionContext.h"
#include "SecurityOrigin.h"
+#include "UserGestureIndicator.h"
#include "qwebframe_p.h"
#include "qwebkitglobal.h"
@@ -262,8 +263,11 @@ void NotificationPresenterClientQt::cancel(NotificationWrapper* wrapper)
void NotificationPresenterClientQt::notificationClicked(NotificationWrapper* wrapper)
{
Notification* notification = notificationForWrapper(wrapper);
- if (notification)
+ if (notification) {
+ // Make sure clicks on notifications are treated as user gestures.
+ UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
sendEvent(notification, eventNames().clickEvent);
+ }
}
void NotificationPresenterClientQt::notificationClicked(const QString& title)
diff --git a/WebKit/qt/WebCoreSupport/PageClientQt.cpp b/WebKit/qt/WebCoreSupport/PageClientQt.cpp
index ea209d9..9aa01a2 100644
--- a/WebKit/qt/WebCoreSupport/PageClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/PageClientQt.cpp
@@ -105,6 +105,7 @@ QRectF PageClientQWidget::windowRect() const
PageClientQGraphicsWidget::~PageClientQGraphicsWidget()
{
+ delete overlay;
#if USE(ACCELERATED_COMPOSITING)
if (!rootGraphicsLayer)
return;
@@ -117,10 +118,6 @@ PageClientQGraphicsWidget::~PageClientQGraphicsWidget()
void PageClientQGraphicsWidget::scroll(int dx, int dy, const QRect& rectToScroll)
{
view->scroll(qreal(dx), qreal(dy), rectToScroll);
-
-#if USE(ACCELERATED_COMPOSITING)
- updateCompositingScrollPosition();
-#endif
}
void PageClientQGraphicsWidget::update(const QRect& dirtyRect)
@@ -132,8 +129,6 @@ void PageClientQGraphicsWidget::update(const QRect& dirtyRect)
overlay->update(QRectF(dirtyRect));
#if USE(ACCELERATED_COMPOSITING)
syncLayers();
- // This might be a slow-scroll. We ensure that the compositing layers are in the right position.
- updateCompositingScrollPosition();
#endif
}
@@ -150,11 +145,15 @@ void PageClientQGraphicsWidget::createOrDeleteOverlay()
}
if (useOverlay == !!overlay)
return;
+
if (useOverlay) {
- overlay = QSharedPointer<QGraphicsItemOverlay>(new QGraphicsItemOverlay(view, page));
+ overlay = new QGraphicsItemOverlay(view, page);
overlay->setZValue(OverlayZValue);
- } else
- overlay.clear();
+ } else {
+ // Changing the overlay might be done inside paint events.
+ overlay->deleteLater();
+ overlay = 0;
+ }
}
#if USE(ACCELERATED_COMPOSITING)
@@ -180,7 +179,6 @@ void PageClientQGraphicsWidget::setRootGraphicsLayer(QGraphicsItem* layer)
layer->setFlag(QGraphicsItem::ItemClipsChildrenToShape, true);
layer->setParentItem(view);
layer->setZValue(RootGraphicsLayerZValue);
- updateCompositingScrollPosition();
}
createOrDeleteOverlay();
}
@@ -192,13 +190,6 @@ void PageClientQGraphicsWidget::markForSync(bool scheduleSync)
syncMetaMethod.invoke(view, Qt::QueuedConnection);
}
-void PageClientQGraphicsWidget::updateCompositingScrollPosition()
-{
- if (rootGraphicsLayer && page && page->mainFrame()) {
- const QPoint scrollPosition = page->mainFrame()->scrollPosition();
- rootGraphicsLayer.data()->setPos(-scrollPosition);
- }
-}
#endif
#if ENABLE(TILED_BACKING_STORE)
diff --git a/WebKit/qt/WebCoreSupport/PageClientQt.h b/WebKit/qt/WebCoreSupport/PageClientQt.h
index eea7f40..7014fd2 100644
--- a/WebKit/qt/WebCoreSupport/PageClientQt.h
+++ b/WebKit/qt/WebCoreSupport/PageClientQt.h
@@ -32,7 +32,6 @@
#include "qwebpage.h"
#include "qwebpage_p.h"
#include <QtCore/qmetaobject.h>
-#include <QtCore/qsharedpointer.h>
#include <QtGui/qgraphicsscene.h>
#include <QtGui/qgraphicsview.h>
#include <QtGui/qgraphicswidget.h>
@@ -83,10 +82,10 @@ public:
// the overlay is here for one reason only: to have the scroll-bars and other
// extra UI elements appear on top of any QGraphicsItems created by CSS compositing layers
-class QGraphicsItemOverlay : public QGraphicsItem {
+class QGraphicsItemOverlay : public QGraphicsObject {
public:
QGraphicsItemOverlay(QGraphicsWidget* view, QWebPage* p)
- :QGraphicsItem(view)
+ :QGraphicsObject(view)
, q(view)
, page(p)
{
@@ -124,6 +123,7 @@ public:
#if USE(ACCELERATED_COMPOSITING)
, shouldSync(false)
#endif
+ , overlay(0)
{
Q_ASSERT(view);
#if USE(ACCELERATED_COMPOSITING)
@@ -170,7 +170,6 @@ public:
#if USE(ACCELERATED_COMPOSITING)
virtual void setRootGraphicsLayer(QGraphicsItem* layer);
virtual void markForSync(bool scheduleSync);
- void updateCompositingScrollPosition();
void syncLayers();
// QGraphicsWebView can render composited layers
@@ -194,7 +193,7 @@ public:
bool shouldSync;
#endif
// the overlay gets instantiated when the root layer is attached, and get deleted when it's detached
- QSharedPointer<QGraphicsItemOverlay> overlay;
+ QGraphicsItemOverlay* overlay;
// we need to put the root graphics layer behind the overlay (which contains the scrollbar)
enum { RootGraphicsLayerZValue, OverlayZValue };
diff --git a/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp b/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
index 56a0fac..9b34955 100644
--- a/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
+++ b/WebKit/qt/WebCoreSupport/PopupMenuQt.cpp
@@ -127,7 +127,7 @@ void PopupMenuQt::didHide()
void PopupMenuQt::hide()
{
- if (!m_popup)
+ if (m_popup)
m_popup->hide();
}
diff --git a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
index 1f91d8c..9786967 100644
--- a/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
+++ b/WebKit/qt/WebCoreSupport/QtPlatformPlugin.cpp
@@ -91,20 +91,20 @@ QWebKitPlatformPlugin* QtPlatformPlugin::plugin()
QWebSelectMethod* QtPlatformPlugin::createSelectInputMethod()
{
QWebKitPlatformPlugin* p = plugin();
- return p ? qobject_cast<QWebSelectMethod*>(p->createExtension(QWebKitPlatformPlugin::MultipleSelections)) : 0;
+ return p ? static_cast<QWebSelectMethod*>(p->createExtension(QWebKitPlatformPlugin::MultipleSelections)) : 0;
}
QWebNotificationPresenter* QtPlatformPlugin::createNotificationPresenter()
{
QWebKitPlatformPlugin* p = plugin();
- return p ? qobject_cast<QWebNotificationPresenter*>(p->createExtension(QWebKitPlatformPlugin::Notifications)) : 0;
+ return p ? static_cast<QWebNotificationPresenter*>(p->createExtension(QWebKitPlatformPlugin::Notifications)) : 0;
}
QWebHapticFeedbackPlayer* QtPlatformPlugin::createHapticFeedbackPlayer()
{
QWebKitPlatformPlugin* p = plugin();
- return p ? qobject_cast<QWebHapticFeedbackPlayer*>(p->createExtension(QWebKitPlatformPlugin::Haptics)) : 0;
+ return p ? static_cast<QWebHapticFeedbackPlayer*>(p->createExtension(QWebKitPlatformPlugin::Haptics)) : 0;
}
}
diff --git a/WebKit/qt/symbian/eabi/QtWebKitu.def b/WebKit/qt/symbian/eabi/QtWebKitu.def
index 2b917e1..2aa30cc 100644
--- a/WebKit/qt/symbian/eabi/QtWebKitu.def
+++ b/WebKit/qt/symbian/eabi/QtWebKitu.def
@@ -796,9 +796,10 @@ EXPORTS
_ZN23DumpRenderTreeSupportQtC2Ev @ 795 NONAME
_ZN23DumpRenderTreeSupportQtD1Ev @ 796 NONAME
_ZN23DumpRenderTreeSupportQtD2Ev @ 797 NONAME
- _ZN8QWebPage23allowGeolocationRequestEP9QWebFrame @ 798 NONAME
+ _ZN8QWebPage23allowGeolocationRequestEP9QWebFrame @ 798 NONAME ABSENT
_ZN8QWebPage23viewportChangeRequestedERKNS_13ViewportHintsE @ 799 NONAME ABSENT
_ZNK15QWebScriptWorld5worldEv @ 800 NONAME
+ _ZN16QGraphicsWebView13setDeviceSizeERK5QSize @ 801 NONAME ABSENT
_ZN23DumpRenderTreeSupportQt12pagePropertyEP9QWebFrameRK7QStringi @ 802 NONAME
_ZN23DumpRenderTreeSupportQt16isPageBoxVisibleEP9QWebFramei @ 803 NONAME
_ZN23DumpRenderTreeSupportQt16resumeAnimationsEP9QWebFrame @ 804 NONAME
@@ -810,8 +811,20 @@ EXPORTS
_ZN8QWebPage23checkPermissionFromUserEP9QWebFrameNS_16PermissionDomainERNS_16PermissionPolicyE @ 810 NONAME
_ZN8QWebPage25requestPermissionFromUserEP9QWebFrameNS_16PermissionDomainE @ 811 NONAME
_ZN8QWebPage27cancelRequestsForPermissionEP9QWebFrameNS_16PermissionDomainE @ 812 NONAME
+ _ZNK16QGraphicsWebView10deviceSizeEv @ 813 NONAME ABSENT
_ZN23DumpRenderTreeSupportQt14viewportAsTextEP8QWebPageRK5QSize @ 814 NONAME
_ZN23DumpRenderTreeSupportQt32simulateDesktopNotificationClickERK7QString @ 815 NONAME
_ZN8QWebPage23viewportChangeRequestedEv @ 816 NONAME
- _ZNK8QWebPage28viewportConfigurationForSizeE5QSize @ 817 NONAME
+ _ZNK8QWebPage28viewportConfigurationForSizeERK5QSize @ 817 NONAME ABSENT
+ _ZN23DumpRenderTreeSupportQt20dumpHistoryCallbacksEb @ 818 NONAME
+ _ZN23DumpRenderTreeSupportQt25dumpVisitedLinksCallbacksEb @ 819 NONAME
+ _ZN23DumpRenderTreeSupportQt9plainTextERK8QVariant @ 820 NONAME
+ _ZNK8QWebPage25viewportAttributesForSizeERK5QSize @ 821 NONAME
+ _ZN8QWebPage18ViewportAttributesC1ERKS0_ @ 822 NONAME
+ _ZN8QWebPage18ViewportAttributesC1Ev @ 823 NONAME
+ _ZN8QWebPage18ViewportAttributesC2ERKS0_ @ 824 NONAME
+ _ZN8QWebPage18ViewportAttributesC2Ev @ 825 NONAME
+ _ZN8QWebPage18ViewportAttributesD1Ev @ 826 NONAME
+ _ZN8QWebPage18ViewportAttributesD2Ev @ 827 NONAME
+ _ZN8QWebPage18ViewportAttributesaSERKS0_ @ 828 NONAME
diff --git a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
index 36fa050..0462953 100644
--- a/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
+++ b/WebKit/qt/tests/qwebpage/tst_qwebpage.cpp
@@ -41,6 +41,7 @@
#include <qwebpage.h>
#include <qwebsecurityorigin.h>
#include <qwebview.h>
+#include <qimagewriter.h>
class EventSpy : public QObject, public QList<QEvent::Type>
{
@@ -126,6 +127,7 @@ private slots:
void showModalDialog();
void testStopScheduledPageRefresh();
void findText();
+ void supportedContentType();
private:
QWebView* m_view;
@@ -247,6 +249,12 @@ void tst_QWebPage::infiniteLoopJS()
void tst_QWebPage::geolocationRequestJS()
{
+ /*
+ This test is disabled because it can only succeed if ENABLE(GEOLOCATION) is true.
+ The code needs to be updated when the API of requestPermissionFromUser is updated.
+ */
+ QSKIP("Test disabled as long as geolocation is disabled from the build.", SkipSingle);
+
JSTestPage* newPage = new JSTestPage(m_view);
connect(newPage, SIGNAL(requestPermissionFromUser(QWebFrame*, QWebPage::PermissionDomain)),
newPage, SLOT(requestPermission(QWebFrame*, QWebPage::PermissionDomain)));
@@ -2197,5 +2205,80 @@ void tst_QWebPage::findText()
}
}
+struct ImageExtensionMap {
+ const char* extension;
+ const char* mimeType;
+};
+
+static const ImageExtensionMap extensionMap[] = {
+ { "bmp", "image/bmp" },
+ { "css", "text/css" },
+ { "gif", "image/gif" },
+ { "html", "text/html" },
+ { "htm", "text/html" },
+ { "ico", "image/x-icon" },
+ { "jpeg", "image/jpeg" },
+ { "jpg", "image/jpeg" },
+ { "js", "application/x-javascript" },
+ { "mng", "video/x-mng" },
+ { "pbm", "image/x-portable-bitmap" },
+ { "pgm", "image/x-portable-graymap" },
+ { "pdf", "application/pdf" },
+ { "png", "image/png" },
+ { "ppm", "image/x-portable-pixmap" },
+ { "rss", "application/rss+xml" },
+ { "svg", "image/svg+xml" },
+ { "text", "text/plain" },
+ { "tif", "image/tiff" },
+ { "tiff", "image/tiff" },
+ { "txt", "text/plain" },
+ { "xbm", "image/x-xbitmap" },
+ { "xml", "text/xml" },
+ { "xpm", "image/x-xpm" },
+ { "xsl", "text/xsl" },
+ { "xhtml", "application/xhtml+xml" },
+ { "wml", "text/vnd.wap.wml" },
+ { "wmlc", "application/vnd.wap.wmlc" },
+ { 0, 0 }
+};
+
+static QString getMimeTypeForExtension(const QString &ext)
+{
+ const ImageExtensionMap *e = extensionMap;
+ while (e->extension) {
+ if (ext.compare(QLatin1String(e->extension), Qt::CaseInsensitive) == 0)
+ return QLatin1String(e->mimeType);
+ ++e;
+ }
+
+ return QString();
+}
+
+void tst_QWebPage::supportedContentType()
+{
+ QStringList contentTypes;
+
+ // Add supported non image types...
+ contentTypes << "text/html" << "text/xml" << "text/xsl" << "text/plain" << "text/"
+ << "application/xml" << "application/xhtml+xml" << "application/vnd.wap.xhtml+xml"
+ << "application/rss+xml" << "application/atom+xml" << "application/json";
+
+ // Add supported image types...
+ Q_FOREACH(const QByteArray& imageType, QImageWriter::supportedImageFormats()) {
+ const QString mimeType = getMimeTypeForExtension(imageType);
+ if (!mimeType.isEmpty())
+ contentTypes << mimeType;
+ }
+
+ // Get the mime types supported by webkit...
+ const QStringList supportedContentTypes = m_page->supportedContentTypes();
+
+ Q_FOREACH(const QString& mimeType, contentTypes)
+ QVERIFY2(supportedContentTypes.contains(mimeType), QString("'%1' is not a supported content type!").arg(mimeType).toLatin1());
+
+ Q_FOREACH(const QString& mimeType, contentTypes)
+ QVERIFY2(m_page->supportsContentType(mimeType), QString("Cannot handle content types '%1'!").arg(mimeType).toLatin1());
+}
+
QTEST_MAIN(tst_QWebPage)
#include "tst_qwebpage.moc"
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index 4933b24..0f4c32c 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,248 @@
+2010-10-20 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by David Levin.
+
+ Repost the DatabaseTracker notifications to the main thread, if needed.
+ https://bugs.webkit.org/show_bug.cgi?id=40655
+
+ * WebDatabaseManager.cpp:
+ (DidModifyOriginData::dispatchToMainThread):
+ (DidModifyOriginData::DidModifyOriginData):
+ (DidModifyOriginData::dispatchDidModifyOriginOnMainThread):
+ (WebDatabaseManager::dispatchDidModifyOrigin):
+ (WebDatabaseManager::dispatchDidModifyDatabase):
+
+2010-10-20 Dirk Schulze <krit@webkit.org>
+
+ Reviewed by Nikolas Zimmermann.
+
+ Merge ColorSpace and ImageColorSpace enums
+ https://bugs.webkit.org/show_bug.cgi?id=47922
+
+ Renamed ColorSpace enum entries DeviceColorSpace and sRGBColorSpace to ColorSpaceDeviceRGB and ColorSpaceSRGB
+ to follow webkit style rules.
+
+ * FullscreenVideoController.cpp:
+ (HUDButton::draw):
+ (HUDSlider::draw):
+ (FullscreenVideoController::draw):
+ * WebCoreSupport/WebDragClient.cpp:
+ (WebDragClient::createDragImageForLink):
+ * WebKitGraphics.cpp:
+ (WebDrawText):
+
+2010-10-18 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Timothy Hatcher.
+
+ Web Inspector: disable private browsing for inspector
+ https://bugs.webkit.org/show_bug.cgi?id=47827
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorClient::openInspectorFrontend):
+
+2010-10-17 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ FrameLoader doesn't need an explicit userGesture parameter
+ https://bugs.webkit.org/show_bug.cgi?id=47777
+
+ Update for the new API.
+
+ * WebCoreSupport/WebContextMenuClient.cpp:
+ (WebContextMenuClient::searchWithGoogle):
+
+2010-10-15 Brian Weinstein <bweinstein@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ REGRESSION(r69850) Loading apple.com/startpage in WebKit on Windows gets a bad request.
+ https://bugs.webkit.org/show_bug.cgi?id=47753
+ <rdar://problem/8558242>
+
+ VerQueryValue returns a null terminated string, but we need to strip off the null terminating character
+ when we turn it into a WebCore string, or else concatenation using this string will break.
+
+ * WebView.cpp:
+
+2010-10-15 Jessie Berlin <jberlin@apple.com>
+
+ Windows build fix. Unreviewed.
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ Add a missing include.
+
+2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Replace some String::format() usages by StringConcatenate in WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=47714
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorFrontendClient::updateWindowTitle):
+ * WebView.cpp:
+ (WebView::standardUserAgentWithApplicationName):
+ (osVersion):
+
+2010-10-14 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: inspector settings/properties/states management
+ should be extracted into separate class.
+
+ We have a lot of flags/values in InspectorController.
+ Some flags are persisting into profile.
+ Others are part of inspector state for frontend.
+ All these flags should keep their values after navigation.
+ It'd be better to extract these flags/values into separate
+ class which will care about theirs lifetime.
+
+ https://bugs.webkit.org/show_bug.cgi?id=47275
+
+ * WebCoreSupport/WebInspectorClient.cpp:
+ (WebInspectorFrontendClient::attachWindow):
+ (WebInspectorFrontendClient::detachWindow):
+ (WebInspectorFrontendClient::showWindowWithoutNotifications):
+
+2010-10-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=43987
+ Switch XMLHttpRequest, FileReader, and FileReaderSync to use a Stringbuilder
+ to construct their internal result string. Remove ScriptString (this is now
+ redundant).
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+
+2010-10-12 Adam Roben <aroben@apple.com>
+
+ Build TestWebKitAPI on Windows
+
+ Fixes <http://webkit.org/b/47552> <rdar://problem/8541708> Make
+ TestWebKitAPI work on Windows
+
+ Reviewed by Sam Weinig.
+
+ * WebKit.vcproj/WebKit.sln: Added TestWebKitAPI and
+ TestWebKitAPIGenerated and made them build just after
+ WebKitTestRunner.
+
+2010-10-11 Shinichiro Hamaji <hamaji@chromium.org>
+
+ Attempt to fix windows build failure.
+
+ Remove WebIconFetcher from WebKit and IconFetcher from WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=47523
+
+ * Interfaces/IWebFramePrivate.idl: s/unused1/unused2/
+ * Interfaces/WebKit.idl: Touched.
+ * WebFrame.cpp: s/unused1/unused2/
+ (WebFrame::unused2):
+ * WebFrame.h: s/unused1/unused2/
+
+2010-10-11 Anders Carlsson <andersca@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Remove WebIconFetcher from WebKit and IconFetcher from WebCore
+ https://bugs.webkit.org/show_bug.cgi?id=47523
+
+ Remove all traces of the WebKit WebIconFetcher class. It's SPI that nobody uses.
+
+ * Interfaces/IWebFramePrivate.idl:
+ * Interfaces/IWebIconFetcher.idl: Removed.
+ * Interfaces/WebKit.idl:
+ * WebFrame.cpp:
+ (WebFrame::unused1):
+ * WebFrame.h:
+ * WebIconFetcher.cpp: Removed.
+ * WebIconFetcher.h: Removed.
+ * WebKit.vcproj/Interfaces.vcproj:
+ * WebKit.vcproj/WebKit.vcproj:
+
+2010-10-11 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Darin Adler.
+
+ Add Private API for creating a WebKit2 WebSerializedScriptValue from the internal
+ representation of a WebKit1 WebSerializedJSValue.
+ https://bugs.webkit.org/show_bug.cgi?id=47439
+
+ * Interfaces/IWebSerializedJSValuePrivate.idl:
+ Because it is taking a void** parameter, getInternalRepresentation must be declared [local].
+
+ * WebSerializedJSValue.cpp:
+ (WebSerializedJSValue::getInternalRepresentation):
+ * WebSerializedJSValue.h:
+
+2010-10-07 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Add Private API for creating a WebKit1 WebSerializedJSValue from the internal
+ representation of a WebKit2 WebSerializedScriptValue.
+ https://bugs.webkit.org/show_bug.cgi?id=47390
+
+ * Interfaces/WebKit.idl:
+ Generate IWebSerializedJSValuePrivate.
+
+ * Interfaces/IWebSerializedJSValuePrivate.idl: Added.
+ Because it is taking a void* parameter, setInternalRepresentation must be declared [local].
+
+ * WebKit.vcproj/Interfaces.vcproj:
+ Add IWebSerializedJSValue.idl and IWebSerializedJSValuePrivate.idl.
+
+ * WebSerializedJSValue.cpp:
+ (WebSerializedJSValue::QueryInterface):
+ Since there are now two interfaces that inherit from IUnknown, do not try to cast to
+ IUnknown* anymore. Cast to IWebSerializedJSValue* instead.
+ (WebSerializedJSValue::setInternalRepresentation):
+ Only set the internal representation if it hasn't already been set.
+ * WebSerializedJSValue.h:
+
+2010-10-04 Jon Honeycutt <jhoneycutt@apple.com>
+
+ Prevent an assertion failure when trying to create a protection space
+ for file/data URLs.
+
+ Reviewed by Sam Weinig.
+
+ * WebURLProtectionSpace.cpp:
+ (WebURLProtectionSpace::initWithHost):
+ Remove the ASSERT_NOT_REACHED().
+
+2010-10-05 Brent Fulgham <bfulgham@webkit.org>
+
+ Unreviewed build correction.
+
+ * WebKit.vcproj/WebKit.sln: Turn the QTMovieWin project
+ off for WinCairo release builds. Somehow this was
+ incorrectly turned on.
+
+2010-10-01 Mark Rowe <mrowe@apple.com>
+
+ Build fix.
+
+ Clear the executable bit from a number of source files.
+
+ * WebView.cpp:
+ * WebView.h:
+
+2010-09-30 Darin Adler <darin@apple.com>
+
+ Reviewed by Sam Weinig.
+
+ Remove remaining calls to deprecatedParseURL
+ https://bugs.webkit.org/show_bug.cgi?id=26599
+
+ * WebCoreSupport/WebFrameLoaderClient.cpp:
+ (WebFrameLoaderClient::dispatchDidFailToStartPlugin):
+ Call stripLeadingAndTrailingHTMLSpaces instead of deprecatedParseURL.
+
2010-09-28 Jenn Braithwaite <jennb@chromium.org>
Reviewed by Dmitry Titov.
diff --git a/WebKit/win/FullscreenVideoController.cpp b/WebKit/win/FullscreenVideoController.cpp
index 696aaa5..5f9b959 100644
--- a/WebKit/win/FullscreenVideoController.cpp
+++ b/WebKit/win/FullscreenVideoController.cpp
@@ -116,7 +116,7 @@ HUDButton::HUDButton(HUDButtonType type, const IntPoint& position)
void HUDButton::draw(GraphicsContext& context)
{
Image* image = (m_showAltButton && m_buttonImageAlt) ? m_buttonImageAlt.get() : m_buttonImage.get();
- context.drawImage(image, DeviceColorSpace, m_rect.location());
+ context.drawImage(image, ColorSpaceDeviceRGB, m_rect.location());
}
HUDSlider::HUDSlider(HUDSliderButtonShape shape, int buttonSize, const IntRect& rect)
@@ -132,11 +132,11 @@ void HUDSlider::draw(GraphicsContext& context)
{
// Draw gutter
IntSize radius(m_rect.height() / 2, m_rect.height() / 2);
- context.fillRoundedRect(m_rect, radius, radius, radius, radius, Color(sliderGutterColor), DeviceColorSpace);
+ context.fillRoundedRect(m_rect, radius, radius, radius, radius, Color(sliderGutterColor), ColorSpaceDeviceRGB);
// Draw button
- context.setStrokeColor(Color(sliderButtonColor), DeviceColorSpace);
- context.setFillColor(Color(sliderButtonColor), DeviceColorSpace);
+ context.setStrokeColor(Color(sliderButtonColor), ColorSpaceDeviceRGB);
+ context.setFillColor(Color(sliderButtonColor), ColorSpaceDeviceRGB);
if (m_buttonShape == RoundButton) {
context.drawEllipse(IntRect(m_rect.location().x() + m_buttonPosition, m_rect.location().y() - (m_buttonSize - m_rect.height()) / 2, m_buttonSize, m_buttonSize));
@@ -489,9 +489,9 @@ void FullscreenVideoController::draw()
IntSize innerRadius(borderRadius - borderThickness, borderRadius - borderThickness);
IntRect innerRect(borderThickness, borderThickness, windowWidth - borderThickness * 2, windowHeight - borderThickness * 2);
- context.fillRoundedRect(outerRect, outerRadius, outerRadius, outerRadius, outerRadius, Color(borderColor), DeviceColorSpace);
+ context.fillRoundedRect(outerRect, outerRadius, outerRadius, outerRadius, outerRadius, Color(borderColor), ColorSpaceDeviceRGB);
context.setCompositeOperation(CompositeCopy);
- context.fillRoundedRect(innerRect, innerRadius, innerRadius, innerRadius, innerRadius, Color(backgroundColor), DeviceColorSpace);
+ context.fillRoundedRect(innerRect, innerRadius, innerRadius, innerRadius, innerRadius, Color(backgroundColor), ColorSpaceDeviceRGB);
// Draw the widgets
m_playPauseButton.draw(context);
@@ -526,13 +526,13 @@ void FullscreenVideoController::draw()
// Left string
s = timeToString(currentTime());
TextRun leftText(s);
- context.setFillColor(Color(textColor), DeviceColorSpace);
+ context.setFillColor(Color(textColor), ColorSpaceDeviceRGB);
context.drawText(font, leftText, IntPoint(windowWidth / 2 - timeSliderWidth / 2 - margin - font.width(leftText), windowHeight - margin - sliderHeight / 2 + font.height() / 4));
// Right string
s = timeToString(currentTime() - duration());
TextRun rightText(s);
- context.setFillColor(Color(textColor), DeviceColorSpace);
+ context.setFillColor(Color(textColor), ColorSpaceDeviceRGB);
context.drawText(font, rightText, IntPoint(windowWidth / 2 + timeSliderWidth / 2 + margin, windowHeight - margin - sliderHeight / 2 + font.height() / 4));
// Copy to the window
diff --git a/WebKit/win/Interfaces/IWebFramePrivate.idl b/WebKit/win/Interfaces/IWebFramePrivate.idl
index 499aa03..190681c 100755
--- a/WebKit/win/Interfaces/IWebFramePrivate.idl
+++ b/WebKit/win/Interfaces/IWebFramePrivate.idl
@@ -30,8 +30,6 @@ import "IWebFrame.idl";
#endif
interface IWebFrame;
-interface IWebIconFetcher;
-interface IWebIconFetcherDelegate;
interface IWebScriptWorld;
typedef enum {
@@ -81,7 +79,7 @@ interface IWebFramePrivate : IUnknown
HRESULT pendingFrameUnloadEventCount([out, retval] UINT* result);
- HRESULT fetchApplicationIcon([in] IWebIconFetcherDelegate* delegate, [out, retval] IWebIconFetcher** result);
+ HRESULT unused2();
HRESULT paintDocumentRectToContext([in] RECT rect, [in] OLE_HANDLE deviceContext);
diff --git a/WebKit/win/Interfaces/IWebIconFetcher.idl b/WebKit/win/Interfaces/IWebSerializedJSValuePrivate.idl
index 1486687..847dd76 100644
--- a/WebKit/win/Interfaces/IWebIconFetcher.idl
+++ b/WebKit/win/Interfaces/IWebSerializedJSValuePrivate.idl
@@ -1,18 +1,18 @@
/*
- * Copyright (C) 2007, 2008 Apple Inc. All rights reserved.
+ * Copyright (C) 2007, 2008, 2009 Apple Inc. 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.
+ * 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.
+ * documentation and/or other materials provided with the distribution.
* 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
* its contributors may be used to endorse or promote products derived
- * from this software without specific prior written permission.
+ * from this software without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
@@ -31,26 +31,15 @@ import "oaidl.idl";
import "ocidl.idl";
#endif
-interface IWebIconFetcher;
-
-[
- object,
- oleautomation,
- uuid(9d27e503-1e0e-458e-bc66-ffa9fa64600e),
- pointer_default(unique)
-]
-interface IWebIconFetcherDelegate : IUnknown
-{
- HRESULT finishedLoadingIcon([in] IWebIconFetcher* fetcher, [in] IStream* data);
-}
-
[
object,
oleautomation,
- uuid(54f50460-8ffa-442c-b5Ab-5422e1fcc973),
+ hidden,
+ uuid(F695AF5F-35FE-44fb-9EC6-23ABCAC8C515),
pointer_default(unique)
]
-interface IWebIconFetcher : IUnknown
+interface IWebSerializedJSValuePrivate : IUnknown
{
- HRESULT cancel();
+ [local] HRESULT setInternalRepresentation([in] void* internalRepresentation);
+ [local] HRESULT getInternalRepresentation([out, retval] void** internalRepresentation);
}
diff --git a/WebKit/win/Interfaces/WebKit.idl b/WebKit/win/Interfaces/WebKit.idl
index 8938501..470b052 100644
--- a/WebKit/win/Interfaces/WebKit.idl
+++ b/WebKit/win/Interfaces/WebKit.idl
@@ -100,7 +100,6 @@ import "ocidl.idl";
#include "IWebHistoryItemPrivate.idl"
#include "IWebHistoryPrivate.idl"
#include "IWebIconDatabase.idl"
-#include "IWebIconFetcher.idl"
#include "IWebInspector.idl"
#include "IWebInspectorPrivate.idl"
#include "IWebJavaScriptCollector.idl"
@@ -123,6 +122,7 @@ import "ocidl.idl";
#include "IWebScrollBarPrivate.idl"
#include "IWebSecurityOrigin.idl"
#include "IWebSerializedJSValue.idl"
+#include "IWebSerializedJSValuePrivate.idl"
#include "IWebTextRenderer.idl"
#include "IWebUIDelegate.idl"
#include "IWebUIDelegate2.idl"
@@ -300,3 +300,4 @@ library WebKit
[default] interface IWebUserContentURLPattern;
}
}
+
diff --git a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
index ca0374a..ab1f79e 100644
--- a/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebContextMenuClient.cpp
@@ -26,6 +26,7 @@
#include "config.h"
#include "WebContextMenuClient.h"
+#include "UserGestureIndicator.h"
#include "WebElementPropertyBag.h"
#include "WebLocalizableStrings.h"
#include "WebView.h"
@@ -140,8 +141,10 @@ void WebContextMenuClient::searchWithGoogle(const Frame* frame)
url.append(encoded);
url.append("&ie=UTF-8&oe=UTF-8");
- if (Page* page = frame->page())
- page->mainFrame()->loader()->urlSelected(KURL(ParsedURLString, url), String(), 0, false, false, true, SendReferrer);
+ if (Page* page = frame->page()) {
+ UserGestureIndicator indicator(DefinitelyProcessingUserGesture);
+ page->mainFrame()->loader()->urlSelected(KURL(ParsedURLString, url), String(), 0, false, false, SendReferrer);
+ }
}
void WebContextMenuClient::lookUpInDictionary(Frame*)
diff --git a/WebKit/win/WebCoreSupport/WebDragClient.cpp b/WebKit/win/WebCoreSupport/WebDragClient.cpp
index 773e392..f4d9842 100644
--- a/WebKit/win/WebCoreSupport/WebDragClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebDragClient.cpp
@@ -295,7 +295,7 @@ DragImageRef WebDragClient::createDragImageForLink(KURL& url, const String& inLa
static const Color backgroundColor(140, 140, 140);
static const IntSize radii(DRAG_LABEL_RADIUS, DRAG_LABEL_RADIUS);
IntRect rect(0, 0, imageSize.width(), imageSize.height());
- context.fillRoundedRect(rect, radii, radii, radii, radii, backgroundColor, DeviceColorSpace);
+ context.fillRoundedRect(rect, radii, radii, radii, radii, backgroundColor, ColorSpaceDeviceRGB);
// Draw the text
static const Color topColor(0, 0, 0, 255); //original alpha = 0.75
diff --git a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
index 4b05338..ffc41b2 100644
--- a/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebFrameLoaderClient.cpp
@@ -59,6 +59,7 @@
#include <WebCore/HTMLFrameElement.h>
#include <WebCore/HTMLFrameOwnerElement.h>
#include <WebCore/HTMLNames.h>
+#include <WebCore/HTMLParserIdioms.h>
#include <WebCore/HTMLPlugInElement.h>
#include <WebCore/HistoryItem.h>
#include <WebCore/Page.h>
@@ -66,7 +67,6 @@
#include <WebCore/PluginView.h>
#include <WebCore/RenderPart.h>
#include <WebCore/ResourceHandle.h>
-#include <WebCore/ScriptString.h>
#pragma warning(pop)
using namespace WebCore;
@@ -768,7 +768,7 @@ void WebFrameLoaderClient::dispatchDidFailToStartPlugin(const PluginView* plugin
ASSERT(frame == pluginView->parentFrame());
if (!pluginView->pluginsPage().isNull()) {
- KURL pluginPageURL = frame->document()->completeURL(deprecatedParseURL(pluginView->pluginsPage()));
+ KURL pluginPageURL = frame->document()->completeURL(stripLeadingAndTrailingHTMLSpaces(pluginView->pluginsPage()));
if (pluginPageURL.protocolInHTTPFamily()) {
static CFStringRef key = MarshallingHelpers::LPCOLESTRToCFStringRef(WebKitErrorPlugInPageURLStringKey);
RetainPtr<CFStringRef> str(AdoptCF, pluginPageURL.string().createCFString());
diff --git a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
index 1b79dde..76ebc8f 100644
--- a/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
+++ b/WebKit/win/WebCoreSupport/WebInspectorClient.cpp
@@ -49,6 +49,7 @@
#include <tchar.h>
#include <wtf/RetainPtr.h>
+#include <wtf/text/StringConcatenate.h>
using namespace WebCore;
@@ -111,7 +112,6 @@ void WebInspectorClient::openInspectorFrontend(InspectorController* inspectorCon
return;
// Keep preferences separate from the rest of the client, making sure we are using expected preference values.
- // One reason this is good is that it keeps the inspector out of history via "private browsing".
// FIXME: It's crazy that we have to do this song and dance to end up with
// a private WebPreferences object, even within WebKit. We should make this
// process simpler, and consider whether we can make it simpler for WebKit
@@ -125,8 +125,6 @@ void WebInspectorClient::openInspectorFrontend(InspectorController* inspectorCon
return;
if (FAILED(preferences->setAutosaves(FALSE)))
return;
- if (FAILED(preferences->setPrivateBrowsingEnabled(TRUE)))
- return;
if (FAILED(preferences->setLoadsImagesAutomatically(TRUE)))
return;
if (FAILED(preferences->setAuthorAndUserStylesEnabled(TRUE)))
@@ -273,7 +271,8 @@ void WebInspectorFrontendClient::attachWindow()
if (m_attached)
return;
- m_inspectedWebView->page()->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "true");
+ // FIXME: This flag can be saved to the flags storage directly.
+ m_inspectedWebView->page()->inspectorController()->setInspectorStartsAttached(true);
closeWindowWithoutNotifications();
showWindowWithoutNotifications();
@@ -284,7 +283,8 @@ void WebInspectorFrontendClient::detachWindow()
if (!m_attached)
return;
- m_inspectedWebView->page()->inspectorController()->setSetting(InspectorController::inspectorStartsAttachedSettingName(), "false");
+ // FIXME: This flag can be saved to the flags storage directly.
+ m_inspectedWebView->page()->inspectorController()->setInspectorStartsAttached(false);
closeWindowWithoutNotifications();
showWindowWithoutNotifications();
@@ -364,8 +364,8 @@ void WebInspectorFrontendClient::showWindowWithoutNotifications()
shouldAttach = true;
else {
// If no preference is set - default to an attached window. This is important for inspector LayoutTests.
- String shouldAttachPref = m_inspectedWebView->page()->inspectorController()->setting(InspectorController::inspectorStartsAttachedSettingName());
- shouldAttach = shouldAttachPref != "false";
+ // FIXME: This flag can be fetched directly from the flags storage.
+ shouldAttach = m_inspectedWebView->page()->inspectorController()->inspectorStartsAttached();
if (shouldAttach && !canAttachWindow())
shouldAttach = false;
@@ -419,12 +419,7 @@ void WebInspectorFrontendClient::destroyInspectorView(bool notifyInspectorContro
void WebInspectorFrontendClient::updateWindowTitle()
{
- // FIXME: The series of appends should be replaced with a call to String::format()
- // when it can be figured out how to get the unicode em-dash to show up.
- String title = "Web Inspector ";
- title.append((UChar)0x2014); // em-dash
- title.append(' ');
- title.append(m_inspectedURL);
+ String title = makeString("Web Inspector ", static_cast<UChar>(0x2014), ' ', m_inspectedURL);
::SetWindowText(m_frontendHwnd, title.charactersWithNullTermination());
}
diff --git a/WebKit/win/WebDatabaseManager.cpp b/WebKit/win/WebDatabaseManager.cpp
index 4c23d6c..bdcb549 100644
--- a/WebKit/win/WebDatabaseManager.cpp
+++ b/WebKit/win/WebDatabaseManager.cpp
@@ -38,6 +38,7 @@
#include "WebNotificationCenter.h"
#include "WebSecurityOrigin.h"
+#include <JavaScriptCore/MainThread.h>
#include <WebCore/BString.h>
#include <WebCore/COMPtr.h>
#include <WebCore/DatabaseTracker.h>
@@ -327,8 +328,40 @@ HRESULT STDMETHODCALLTYPE WebDatabaseManager::deleteDatabase(
return S_OK;
}
+class DidModifyOriginData : public Noncopyable {
+public:
+ static void dispatchToMainThread(WebDatabaseManager* databaseManager, SecurityOrigin* origin)
+ {
+ DidModifyOriginData* context = new DidModifyOriginData(databaseManager, origin->threadsafeCopy());
+ callOnMainThread(&DidModifyOriginData::dispatchDidModifyOriginOnMainThread, context);
+ }
+
+private:
+ DidModifyOriginData(WebDatabaseManager* databaseManager, PassRefPtr<SecurityOrigin> origin)
+ : databaseManager(databaseManager)
+ , origin(origin)
+ {
+ }
+
+ static void dispatchDidModifyOriginOnMainThread(void* context)
+ {
+ ASSERT(isMainThread());
+ DidModifyOriginData* info = static_cast<DidModifyOriginData*>(context);
+ info->databaseManager->dispatchDidModifyOrigin(info->origin.get());
+ delete info;
+ }
+
+ WebDatabaseManager* databaseManager;
+ RefPtr<SecurityOrigin> origin;
+};
+
void WebDatabaseManager::dispatchDidModifyOrigin(SecurityOrigin* origin)
{
+ if (!isMainThread()) {
+ DidModifyOriginData::dispatchToMainThread(this, origin);
+ return;
+ }
+
static BSTR databaseDidModifyOriginName = SysAllocString(WebDatabaseDidModifyOriginNotification);
IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
@@ -353,6 +386,11 @@ HRESULT STDMETHODCALLTYPE WebDatabaseManager::setQuota(
void WebDatabaseManager::dispatchDidModifyDatabase(SecurityOrigin* origin, const String& databaseName)
{
+ if (!isMainThread()) {
+ DidModifyOriginData::dispatchToMainThread(this, origin);
+ return;
+ }
+
static BSTR databaseDidModifyOriginName = SysAllocString(WebDatabaseDidModifyDatabaseNotification);
IWebNotificationCenter* notifyCenter = WebNotificationCenter::defaultCenterInternal();
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index 27da1f4..8dfe8bb 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -46,7 +46,6 @@
#include "WebFramePolicyListener.h"
#include "WebHistory.h"
#include "WebHistoryItem.h"
-#include "WebIconFetcher.h"
#include "WebKit.h"
#include "WebKitStatisticsPrivate.h"
#include "WebMutableURLRequest.h"
@@ -1015,27 +1014,9 @@ HRESULT STDMETHODCALLTYPE WebFrame::pendingFrameUnloadEventCount(
return S_OK;
}
-HRESULT STDMETHODCALLTYPE WebFrame::fetchApplicationIcon(
- /* [in] */ IWebIconFetcherDelegate *delegate,
- /* [retval][out] */ IWebIconFetcher **result)
+HRESULT STDMETHODCALLTYPE WebFrame::unused2()
{
- if (!result)
- return E_POINTER;
-
- *result = 0;
-
- if (!delegate)
- return E_FAIL;
-
- Frame* coreFrame = core(this);
- if (!coreFrame)
- return E_FAIL;
-
- *result = WebIconFetcher::fetchApplicationIcon(coreFrame, delegate);
- if (!*result)
- return E_FAIL;
-
- return S_OK;
+ return E_NOTIMPL;
}
// IWebDocumentText -----------------------------------------------------------
diff --git a/WebKit/win/WebFrame.h b/WebKit/win/WebFrame.h
index 21c3027..147daa8 100644
--- a/WebKit/win/WebFrame.h
+++ b/WebKit/win/WebFrame.h
@@ -187,9 +187,7 @@ public:
virtual HRESULT STDMETHODCALLTYPE pendingFrameUnloadEventCount(
/* [retval][out] */ UINT* result);
- virtual HRESULT STDMETHODCALLTYPE fetchApplicationIcon(
- /* [in] */ IWebIconFetcherDelegate *delegate,
- /* [retval][out] */ IWebIconFetcher **result);
+ virtual HRESULT STDMETHODCALLTYPE unused2();
virtual HRESULT STDMETHODCALLTYPE setInPrintingMode(
/* [in] */ BOOL value,
diff --git a/WebKit/win/WebIconFetcher.cpp b/WebKit/win/WebIconFetcher.cpp
deleted file mode 100644
index fbc46af..0000000
--- a/WebKit/win/WebIconFetcher.cpp
+++ /dev/null
@@ -1,129 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. 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. ``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
- * 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 "WebKitDLL.h"
-#include "WebIconFetcher.h"
-
-#include "MemoryStream.h"
-#include <WebCore/COMPtr.h>
-#include <WebCore/SharedBuffer.h>
-#include <wtf/PassRefPtr.h>
-
-using namespace WebCore;
-
-class WebIconFetcherClient : public IconFetcherClient {
-public:
- WebIconFetcherClient(IWebIconFetcherDelegate* delegate)
- : m_fetcher(0)
- , m_delegate(delegate)
- {
- }
-
- virtual void finishedFetchingIcon(PassRefPtr<SharedBuffer> iconData)
- {
- COMPtr<MemoryStream> memoryStream;
- if (iconData)
- memoryStream = MemoryStream::createInstance(iconData);
-
- m_delegate->finishedLoadingIcon(m_fetcher, memoryStream.get());
-
- delete this;
- }
-
- void setFetcher(WebIconFetcher *fetcher) { m_fetcher = fetcher; }
-
-private:
- WebIconFetcher* m_fetcher;
- COMPtr<IWebIconFetcherDelegate> m_delegate;
-};
-
-// WebIconFetcher -------------------------------------------------------------------
-
-WebIconFetcher* WebIconFetcher::fetchApplicationIcon(Frame* frame, IWebIconFetcherDelegate* delegate)
-{
- WebIconFetcherClient* client = new WebIconFetcherClient(delegate);
-
- RefPtr<IconFetcher> fetcher = IconFetcher::create(frame, client);
-
- if (!fetcher)
- return 0;
-
- COMPtr<WebIconFetcher> iconFetcher = new WebIconFetcher(fetcher.release());
- client->setFetcher(iconFetcher.get());
-
- return iconFetcher.releaseRef();
-}
-
-WebIconFetcher::WebIconFetcher(PassRefPtr<IconFetcher> iconFetcher)
- : m_refCount(0)
- , m_iconFetcher(iconFetcher)
-{
- gClassCount++;
-}
-
-WebIconFetcher::~WebIconFetcher()
-{
- gClassCount--;
-}
-
-// IUnknown -------------------------------------------------------------------
-
-HRESULT STDMETHODCALLTYPE WebIconFetcher::QueryInterface(REFIID riid, void** ppvObject)
-{
- *ppvObject = 0;
- if (IsEqualGUID(riid, IID_IUnknown))
- *ppvObject = static_cast<IUnknown*>(this);
- else if (IsEqualGUID(riid, IID_IWebIconFetcher))
- *ppvObject = static_cast<IWebIconFetcher*>(this);
- else
- return E_NOINTERFACE;
-
- AddRef();
- return S_OK;
-}
-
-ULONG STDMETHODCALLTYPE WebIconFetcher::AddRef()
-{
- return ++m_refCount;
-}
-
-ULONG STDMETHODCALLTYPE WebIconFetcher::Release()
-{
- ULONG newRef = --m_refCount;
- if (!newRef)
- delete this;
-
- return newRef;
-}
-
-// IUnknown -------------------------------------------------------------------
-
-HRESULT STDMETHODCALLTYPE WebIconFetcher::cancel()
-{
- m_iconFetcher->cancel();
-
- return S_OK;
-}
diff --git a/WebKit/win/WebIconFetcher.h b/WebKit/win/WebIconFetcher.h
deleted file mode 100644
index 694aebf..0000000
--- a/WebKit/win/WebIconFetcher.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2008 Apple Inc. 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. ``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
- * 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 WebIconFetcher_h
-#define WebIconFetcher_h
-
-#include "WebKit.h"
-#include <WebCore/IconFetcher.h>
-
-class WebIconFetcher : public IWebIconFetcher {
-public:
- static WebIconFetcher* fetchApplicationIcon(WebCore::Frame*, IWebIconFetcherDelegate*);
-
- // IUnknown
- virtual HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, void** ppvObject);
- virtual ULONG STDMETHODCALLTYPE AddRef();
- virtual ULONG STDMETHODCALLTYPE Release();
-
- // IWebIconFetcher
- virtual HRESULT STDMETHODCALLTYPE cancel();
-
-private:
- WebIconFetcher(PassRefPtr<WebCore::IconFetcher>);
- ~WebIconFetcher();
-
- ULONG m_refCount;
- RefPtr<WebCore::IconFetcher> m_iconFetcher;
-};
-
-#endif // WebIconFetcher_h
diff --git a/WebKit/win/WebKit.vcproj/Interfaces.vcproj b/WebKit/win/WebKit.vcproj/Interfaces.vcproj
index 0dab8a8..0f3b6a7 100644
--- a/WebKit/win/WebKit.vcproj/Interfaces.vcproj
+++ b/WebKit/win/WebKit.vcproj/Interfaces.vcproj
@@ -1004,26 +1004,6 @@
</FileConfiguration>
</File>
<File
- RelativePath="..\Interfaces\IWebIconFetcher.idl"
- >
- <FileConfiguration
- Name="Debug|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCMIDLTool"
- />
- </FileConfiguration>
- <FileConfiguration
- Name="Release|Win32"
- ExcludedFromBuild="true"
- >
- <Tool
- Name="VCMIDLTool"
- />
- </FileConfiguration>
- </File>
- <File
RelativePath="..\Interfaces\IWebInspector.idl"
>
<FileConfiguration
@@ -1484,6 +1464,46 @@
</FileConfiguration>
</File>
<File
+ RelativePath="..\Interfaces\IWebSerializedJSValue.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\Interfaces\IWebSerializedJSValuePrivate.idl"
+ >
+ <FileConfiguration
+ Name="Debug|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ <FileConfiguration
+ Name="Release|Win32"
+ ExcludedFromBuild="true"
+ >
+ <Tool
+ Name="VCMIDLTool"
+ />
+ </FileConfiguration>
+ </File>
+ <File
RelativePath="..\Interfaces\IWebTextRenderer.idl"
>
<FileConfiguration
diff --git a/WebKit/win/WebKit.vcproj/WebKit.sln b/WebKit/win/WebKit.vcproj/WebKit.sln
index 504bae3..787650f 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.sln
+++ b/WebKit/win/WebKit.vcproj/WebKit.sln
@@ -135,11 +135,22 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "WebKitTestRunner", "..\..\.
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "MiniBrowser", "..\..\..\WebKitTools\MiniBrowser\MiniBrowser.vcproj", "{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}"
ProjectSection(ProjectDependencies) = postProject
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28} = {3E48AB23-D249-488F-A1C4-43CDF52FBD28}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestWebKitAPI", "..\..\..\WebKitTools\TestWebKitAPI\win\TestWebKitAPI.vcproj", "{3E48AB23-D249-488F-A1C4-43CDF52FBD28}"
+ ProjectSection(ProjectDependencies) = postProject
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86} = {45C45411-7F0E-404D-919A-4EE9BB60BE86}
+ EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestWebKitAPIGenerated", "..\..\..\WebKitTools\TestWebKitAPI\win\TestWebKitAPIGenerated.vcproj", "{45C45411-7F0E-404D-919A-4EE9BB60BE86}"
+ ProjectSection(ProjectDependencies) = postProject
{3B99669B-1817-443B-BCBE-835580146668} = {3B99669B-1817-443B-BCBE-835580146668}
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ all|Win32 = all|Win32
Debug_All|Win32 = Debug_All|Win32
Debug_Cairo|Win32 = Debug_Cairo|Win32
Debug_Internal|Win32 = Debug_Internal|Win32
@@ -148,6 +159,8 @@ Global
Release|Win32 = Release|Win32
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5}.all|Win32.ActiveCfg = Debug_All|Win32
+ {011D10F1-B656-4A1B-A0C3-3842F02122C5}.all|Win32.Build.0 = Debug_All|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_All|Win32.Build.0 = Debug_All|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
@@ -160,6 +173,8 @@ Global
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.ActiveCfg = Release|Win32
{011D10F1-B656-4A1B-A0C3-3842F02122C5}.Release|Win32.Build.0 = Release|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.all|Win32.ActiveCfg = Debug_All|Win32
+ {1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.all|Win32.Build.0 = Debug_All|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_All|Win32.Build.0 = Debug_All|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
@@ -172,6 +187,8 @@ Global
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.ActiveCfg = Release|Win32
{1C16337B-ACF3-4D03-AA90-851C5B5EADA6}.Release|Win32.Build.0 = Release|Win32
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.all|Win32.ActiveCfg = Debug_All|Win32
+ {AA8A5A85-592B-4357-BC60-E0E91E026AF6}.all|Win32.Build.0 = Debug_All|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_All|Win32.Build.0 = Debug_All|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
@@ -184,6 +201,8 @@ Global
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release_Cairo|Win32.Build.0 = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.ActiveCfg = Release|Win32
{AA8A5A85-592B-4357-BC60-E0E91E026AF6}.Release|Win32.Build.0 = Release|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.all|Win32.ActiveCfg = Debug_All|Win32
+ {C59E5129-B453-49B7-A52B-1E104715F76E}.all|Win32.Build.0 = Debug_All|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_All|Win32.Build.0 = Debug_All|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
@@ -196,6 +215,8 @@ Global
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release_Cairo|Win32.Build.0 = Release|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.ActiveCfg = Release|Win32
{C59E5129-B453-49B7-A52B-1E104715F76E}.Release|Win32.Build.0 = Release|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.all|Win32.ActiveCfg = all|Win32
+ {4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.all|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_All|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Debug_Cairo|Win32.ActiveCfg = all|Win32
@@ -208,6 +229,8 @@ Global
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release_Cairo|Win32.Build.0 = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.ActiveCfg = all|Win32
{4FF5BA11-59EC-4C24-8F52-F235C2E7D43A}.Release|Win32.Build.0 = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.all|Win32.ActiveCfg = all|Win32
+ {0A324352-B3B6-496C-9E5B-4C7E923E628B}.all|Win32.Build.0 = all|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_All|Win32.ActiveCfg = cairo|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_All|Win32.Build.0 = cairo|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Debug_Cairo|Win32.ActiveCfg = cairo|Win32
@@ -220,6 +243,8 @@ Global
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release_Cairo|Win32.Build.0 = cairo|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.ActiveCfg = all|Win32
{0A324352-B3B6-496C-9E5B-4C7E923E628B}.Release|Win32.Build.0 = all|Win32
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.all|Win32.ActiveCfg = Debug_All|Win32
+ {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.all|Win32.Build.0 = Debug_All|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_All|Win32.Build.0 = Debug_All|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
@@ -228,9 +253,10 @@ Global
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug|Win32.ActiveCfg = Debug|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Debug|Win32.Build.0 = Debug|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release_Cairo|Win32.ActiveCfg = Release|Win32
- {E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release_Cairo|Win32.Build.0 = Release|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.ActiveCfg = Release|Win32
{E498CA9D-3BD2-4D52-8E37-C8DC76526325}.Release|Win32.Build.0 = Release|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.all|Win32.ActiveCfg = Debug_All|Win32
+ {1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.all|Win32.Build.0 = Debug_All|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_All|Win32.Build.0 = Debug_All|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
@@ -243,6 +269,8 @@ Global
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release|Win32.ActiveCfg = Release|Win32
{1AFD081F-1AC7-4A97-8EFA-6DF97761A3A2}.Release|Win32.Build.0 = Release|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.all|Win32.ActiveCfg = Debug_All|Win32
+ {2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.all|Win32.Build.0 = Debug_All|Win32
{2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Debug_All|Win32.Build.0 = Debug_All|Win32
{2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
@@ -255,6 +283,8 @@ Global
{2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Release|Win32.ActiveCfg = Release|Win32
{2E51ABE8-76CB-485B-A66C-46AEF4DF8ACD}.Release|Win32.Build.0 = Release|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.all|Win32.ActiveCfg = all|Win32
+ {2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.all|Win32.Build.0 = all|Win32
{2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Debug_All|Win32.ActiveCfg = all|Win32
{2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Debug_All|Win32.Build.0 = all|Win32
{2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Debug_Cairo|Win32.ActiveCfg = all|Win32
@@ -267,6 +297,8 @@ Global
{2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Release_Cairo|Win32.Build.0 = all|Win32
{2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Release|Win32.ActiveCfg = all|Win32
{2EDAD637-CBA8-4E55-97ED-7D2BBC336FDB}.Release|Win32.Build.0 = all|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.all|Win32.ActiveCfg = Debug_CFLite|Win32
+ {AAE88FEF-509E-4D49-870B-7357922C276F}.all|Win32.Build.0 = Debug_CFLite|Win32
{AAE88FEF-509E-4D49-870B-7357922C276F}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{AAE88FEF-509E-4D49-870B-7357922C276F}.Debug_All|Win32.Build.0 = Debug_All|Win32
{AAE88FEF-509E-4D49-870B-7357922C276F}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
@@ -279,6 +311,8 @@ Global
{AAE88FEF-509E-4D49-870B-7357922C276F}.Release_Cairo|Win32.Build.0 = Release|Win32
{AAE88FEF-509E-4D49-870B-7357922C276F}.Release|Win32.ActiveCfg = Release|Win32
{AAE88FEF-509E-4D49-870B-7357922C276F}.Release|Win32.Build.0 = Release|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.all|Win32.ActiveCfg = Release|Win32
+ {91762BE2-87EF-4F5A-A480-48B90EB3F406}.all|Win32.Build.0 = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_All|Win32.ActiveCfg = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_All|Win32.Build.0 = Debug|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
@@ -291,6 +325,8 @@ Global
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release_Cairo|Win32.Build.0 = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.ActiveCfg = Release|Win32
{91762BE2-87EF-4F5A-A480-48B90EB3F406}.Release|Win32.Build.0 = Release|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.all|Win32.ActiveCfg = Debug_All|Win32
+ {0662A8A9-82A3-4638-97D8-EC425D8D87C9}.all|Win32.Build.0 = Debug_All|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_All|Win32.Build.0 = Debug_All|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
@@ -303,6 +339,8 @@ Global
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.ActiveCfg = Release|Win32
{0662A8A9-82A3-4638-97D8-EC425D8D87C9}.Release|Win32.Build.0 = Release|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.all|Win32.ActiveCfg = Debug_All|Win32
+ {B8437A41-67BC-4769-9452-45203827F821}.all|Win32.Build.0 = Debug_All|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_All|Win32.Build.0 = Debug_All|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
@@ -315,6 +353,8 @@ Global
{B8437A41-67BC-4769-9452-45203827F821}.Release_Cairo|Win32.Build.0 = Release|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.ActiveCfg = Release|Win32
{B8437A41-67BC-4769-9452-45203827F821}.Release|Win32.Build.0 = Release|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.all|Win32.ActiveCfg = Debug_All|Win32
+ {6567DFD4-D6DE-4CD5-825D-17E353D160E1}.all|Win32.Build.0 = Debug_All|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_All|Win32.Build.0 = Debug_All|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
@@ -327,10 +367,12 @@ Global
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release_Cairo|Win32.Build.0 = Release_Cairo|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.ActiveCfg = Release|Win32
{6567DFD4-D6DE-4CD5-825D-17E353D160E1}.Release|Win32.Build.0 = Release|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.all|Win32.ActiveCfg = Debug_Cairo|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.all|Win32.Build.0 = Debug_Cairo|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_All|Win32.Build.0 = Debug_All|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.ActiveCfg = Debug|Win32
- {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.Build.0 = Debug|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
+ {59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Cairo|Win32.Build.0 = Debug_Cairo|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Debug|Win32.ActiveCfg = Debug|Win32
@@ -339,6 +381,8 @@ Global
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release_Cairo|Win32.Build.0 = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.ActiveCfg = Release|Win32
{59CC0547-70AC-499C-9B19-EC01C6F61137}.Release|Win32.Build.0 = Release|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.all|Win32.ActiveCfg = all|Win32
+ {DA31DA52-6675-48D4-89E0-333A7144397C}.all|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_All|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Debug_Cairo|Win32.ActiveCfg = all|Win32
@@ -351,6 +395,8 @@ Global
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release_Cairo|Win32.Build.0 = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.ActiveCfg = all|Win32
{DA31DA52-6675-48D4-89E0-333A7144397C}.Release|Win32.Build.0 = all|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.all|Win32.ActiveCfg = Release|Win32
+ {44B9C152-1870-4035-B94D-7B3285AA0C12}.all|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_All|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_All|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
@@ -363,6 +409,8 @@ Global
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release_Cairo|Win32.Build.0 = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release|Win32.ActiveCfg = Release|Win32
{44B9C152-1870-4035-B94D-7B3285AA0C12}.Release|Win32.Build.0 = Release|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.all|Win32.ActiveCfg = Debug_All|Win32
+ {C0737398-3565-439E-A2B8-AB2BE4D5430C}.all|Win32.Build.0 = Debug_All|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_All|Win32.Build.0 = Debug_All|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
@@ -375,6 +423,8 @@ Global
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release_Cairo|Win32.Build.0 = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.ActiveCfg = Release|Win32
{C0737398-3565-439E-A2B8-AB2BE4D5430C}.Release|Win32.Build.0 = Release|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.all|Win32.ActiveCfg = Debug_Cairo|Win32
+ {626089A3-25D3-4883-A96C-B8C66E036397}.all|Win32.Build.0 = Debug_Cairo|Win32
{626089A3-25D3-4883-A96C-B8C66E036397}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{626089A3-25D3-4883-A96C-B8C66E036397}.Debug_All|Win32.Build.0 = Debug_All|Win32
{626089A3-25D3-4883-A96C-B8C66E036397}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
@@ -387,6 +437,8 @@ Global
{626089A3-25D3-4883-A96C-B8C66E036397}.Release_Cairo|Win32.Build.0 = Debug_Cairo|Win32
{626089A3-25D3-4883-A96C-B8C66E036397}.Release|Win32.ActiveCfg = Debug|Win32
{626089A3-25D3-4883-A96C-B8C66E036397}.Release|Win32.Build.0 = Debug|Win32
+ {D09806DB-E58B-4646-8C9B-61101906C1E2}.all|Win32.ActiveCfg = Release|Win32
+ {D09806DB-E58B-4646-8C9B-61101906C1E2}.all|Win32.Build.0 = Release|Win32
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Debug_All|Win32.ActiveCfg = Release|Win32
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Debug_All|Win32.Build.0 = Release|Win32
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Debug_Cairo|Win32.ActiveCfg = Release|Win32
@@ -399,6 +451,8 @@ Global
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Release_Cairo|Win32.Build.0 = Release|Win32
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Release|Win32.ActiveCfg = Release|Win32
{D09806DB-E58B-4646-8C9B-61101906C1E2}.Release|Win32.Build.0 = Release|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.all|Win32.ActiveCfg = Debug_All|Win32
+ {114FCA11-216B-4C8C-957E-30A75AE80443}.all|Win32.Build.0 = Debug_All|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_All|Win32.Build.0 = Debug_All|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Debug_Cairo|Win32.ActiveCfg = Debug_Cairo|Win32
@@ -411,6 +465,8 @@ Global
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release_Cairo|Win32.Build.0 = Release|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.ActiveCfg = Release|Win32
{114FCA11-216B-4C8C-957E-30A75AE80443}.Release|Win32.Build.0 = Release|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.all|Win32.ActiveCfg = Release_CFLite|Win32
+ {CBC3391C-F060-4BF5-A66E-81404168816B}.all|Win32.Build.0 = Release_CFLite|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_All|Win32.Build.0 = Debug_All|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
@@ -423,6 +479,8 @@ Global
{CBC3391C-F060-4BF5-A66E-81404168816B}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.ActiveCfg = Release|Win32
{CBC3391C-F060-4BF5-A66E-81404168816B}.Release|Win32.Build.0 = Release|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.all|Win32.ActiveCfg = all|Win32
+ {4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.all|Win32.Build.0 = all|Win32
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_All|Win32.ActiveCfg = all|Win32
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_All|Win32.Build.0 = all|Win32
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Debug_Cairo|Win32.ActiveCfg = all|Win32
@@ -435,6 +493,8 @@ Global
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release_Cairo|Win32.Build.0 = all|Win32
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release|Win32.ActiveCfg = all|Win32
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD}.Release|Win32.Build.0 = all|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.all|Win32.ActiveCfg = Release_CFLite|Win32
+ {3B99669B-1817-443B-BCBE-835580146668}.all|Win32.Build.0 = Release_CFLite|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Debug_All|Win32.Build.0 = Debug_All|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
@@ -447,6 +507,8 @@ Global
{3B99669B-1817-443B-BCBE-835580146668}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.ActiveCfg = Release|Win32
{3B99669B-1817-443B-BCBE-835580146668}.Release|Win32.Build.0 = Release|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.all|Win32.ActiveCfg = Release_CFLite|Win32
+ {1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.all|Win32.Build.0 = Release_CFLite|Win32
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_All|Win32.Build.0 = Debug_All|Win32
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
@@ -459,6 +521,34 @@ Global
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Release|Win32.ActiveCfg = Release|Win32
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5}.Release|Win32.Build.0 = Release|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.all|Win32.ActiveCfg = Debug_All|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.all|Win32.Build.0 = Debug_All|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug_All|Win32.ActiveCfg = Debug_All|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug_All|Win32.Build.0 = Debug_All|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug_Cairo|Win32.ActiveCfg = Debug_CFLite|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug_Cairo|Win32.Build.0 = Debug_CFLite|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug_Internal|Win32.ActiveCfg = Debug_Internal|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug_Internal|Win32.Build.0 = Debug_Internal|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug|Win32.ActiveCfg = Debug|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Debug|Win32.Build.0 = Debug|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Release_Cairo|Win32.ActiveCfg = Release_CFLite|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Release_Cairo|Win32.Build.0 = Release_CFLite|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Release|Win32.ActiveCfg = Release|Win32
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28}.Release|Win32.Build.0 = Release|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.all|Win32.ActiveCfg = all|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.all|Win32.Build.0 = all|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug_All|Win32.ActiveCfg = all|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug_All|Win32.Build.0 = all|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug_Cairo|Win32.ActiveCfg = all|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug_Cairo|Win32.Build.0 = all|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug_Internal|Win32.ActiveCfg = all|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug_Internal|Win32.Build.0 = all|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug|Win32.ActiveCfg = all|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Debug|Win32.Build.0 = all|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Release_Cairo|Win32.ActiveCfg = all|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Release_Cairo|Win32.Build.0 = all|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Release|Win32.ActiveCfg = all|Win32
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86}.Release|Win32.Build.0 = all|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
@@ -490,5 +580,7 @@ Global
{4343BC0B-A2E0-4B48-8277-F33CFBFA83CD} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
{3B99669B-1817-443B-BCBE-835580146668} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
{1480CF5F-4160-47B5-A0E6-96AEC8258FB5} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ {3E48AB23-D249-488F-A1C4-43CDF52FBD28} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
+ {45C45411-7F0E-404D-919A-4EE9BB60BE86} = {62DCDFE4-EAD2-48E1-A2BD-BD54AD3C7459}
EndGlobalSection
EndGlobal
diff --git a/WebKit/win/WebKit.vcproj/WebKit.vcproj b/WebKit/win/WebKit.vcproj/WebKit.vcproj
index 822e13c..9740947 100644
--- a/WebKit/win/WebKit.vcproj/WebKit.vcproj
+++ b/WebKit/win/WebKit.vcproj/WebKit.vcproj
@@ -612,10 +612,6 @@
>
</File>
<File
- RelativePath="..\WebIconFetcher.h"
- >
- </File>
- <File
RelativePath="..\WebInspector.h"
>
</File>
@@ -1036,10 +1032,6 @@
>
</File>
<File
- RelativePath="..\WebIconFetcher.cpp"
- >
- </File>
- <File
RelativePath="..\WebInspector.cpp"
>
</File>
diff --git a/WebKit/win/WebKitGraphics.cpp b/WebKit/win/WebKitGraphics.cpp
index e9e25ab..5343608 100644
--- a/WebKit/win/WebKitGraphics.cpp
+++ b/WebKit/win/WebKitGraphics.cpp
@@ -112,7 +112,7 @@ void WebDrawText(WebTextRenderInfo* info)
// Set shadow setting
if (info->structSize == sizeof(WebTextRenderInfo) &&
(info->shadowOffset.cx || info->shadowOffset.cy || info->shadowBlur || info->shadowColor))
- context.setShadow(FloatSize(info->shadowOffset.cx, info->shadowOffset.cy), info->shadowBlur, info->shadowColor, DeviceColorSpace);
+ context.setShadow(FloatSize(info->shadowOffset.cx, info->shadowOffset.cy), info->shadowBlur, info->shadowColor, ColorSpaceDeviceRGB);
WebCoreDrawTextAtPoint(context, drawString, info->pt, makeFont(*(info->description)), info->color, info->underlinedIndex);
context.restore();
diff --git a/WebKit/win/WebSerializedJSValue.cpp b/WebKit/win/WebSerializedJSValue.cpp
index 307df90..7f6e3b0 100644
--- a/WebKit/win/WebSerializedJSValue.cpp
+++ b/WebKit/win/WebSerializedJSValue.cpp
@@ -69,10 +69,12 @@ HRESULT WebSerializedJSValue::QueryInterface(REFIID riid, void** ppvObject)
if (IsEqualIID(riid, __uuidof(WebSerializedJSValue)))
*ppvObject = this;
+ else if (IsEqualGUID(riid, IID_IUnknown))
+ *ppvObject = static_cast<IWebSerializedJSValue*>(this);
else if (IsEqualIID(riid, __uuidof(IWebSerializedJSValue)))
*ppvObject = static_cast<IWebSerializedJSValue*>(this);
- else if (IsEqualIID(riid, IID_IUnknown))
- *ppvObject = static_cast<IUnknown*>(this);
+ else if (IsEqualIID(riid, __uuidof(IWebSerializedJSValuePrivate)))
+ *ppvObject = static_cast<IWebSerializedJSValuePrivate*>(this);
else
return E_NOINTERFACE;
@@ -105,3 +107,23 @@ HRESULT WebSerializedJSValue::deserialize(JSContextRef destinationContext, JSVal
return S_OK;
}
+
+HRESULT WebSerializedJSValue::setInternalRepresentation(void* internalRepresentation)
+{
+ if (!internalRepresentation || m_value)
+ return E_POINTER;
+
+ m_value = reinterpret_cast<SerializedScriptValue*>(internalRepresentation);
+
+ return S_OK;
+}
+
+HRESULT WebSerializedJSValue::getInternalRepresentation(void** internalRepresentation)
+{
+ if (!m_value)
+ return E_POINTER;
+
+ *internalRepresentation = m_value.get();
+ return S_OK;
+}
+
diff --git a/WebKit/win/WebSerializedJSValue.h b/WebKit/win/WebSerializedJSValue.h
index d39323c..a2d6d56 100644
--- a/WebKit/win/WebSerializedJSValue.h
+++ b/WebKit/win/WebSerializedJSValue.h
@@ -34,7 +34,7 @@ namespace WebCore {
class SerializedScriptValue;
}
-class WebSerializedJSValue : public Noncopyable, public IWebSerializedJSValue {
+class WebSerializedJSValue : public Noncopyable, public IWebSerializedJSValue, public IWebSerializedJSValuePrivate {
public:
static COMPtr<WebSerializedJSValue> createInstance();
@@ -43,6 +43,8 @@ public:
virtual HRESULT STDMETHODCALLTYPE serialize(JSContextRef, JSValueRef value, JSValueRef* exception);
virtual HRESULT STDMETHODCALLTYPE deserialize(JSContextRef, JSValueRef* result);
+ virtual HRESULT STDMETHODCALLTYPE setInternalRepresentation(void* internalRepresentation);
+ virtual HRESULT STDMETHODCALLTYPE getInternalRepresentation(void** internalRepresentation);
private:
WebSerializedJSValue();
diff --git a/WebKit/win/WebURLProtectionSpace.cpp b/WebKit/win/WebURLProtectionSpace.cpp
index c3d78bb..6086abb 100644
--- a/WebKit/win/WebURLProtectionSpace.cpp
+++ b/WebKit/win/WebURLProtectionSpace.cpp
@@ -166,8 +166,6 @@ HRESULT STDMETHODCALLTYPE WebURLProtectionSpace::initWithHost(
serverType = ProtectionSpaceServerFTP;
else if (BString(protocol) == webURLProtectionSpaceFTPSBString)
serverType = ProtectionSpaceServerFTPS;
- else
- ASSERT_NOT_REACHED();
m_protectionSpace = ProtectionSpace(String(host, SysStringLen(host)), port, serverType,
String(realm, SysStringLen(realm)), coreScheme(authenticationMethod));
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index 547daf8..b57e06a 100755..100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -159,6 +159,7 @@
#include <windowsx.h>
#include <wtf/HashSet.h>
#include <wtf/text/CString.h>
+#include <wtf/text/StringConcatenate.h>
// Soft link functions for gestures and panning feedback
SOFT_LINK_LIBRARY(USER32);
@@ -1200,7 +1201,9 @@ bool WebView::canHandleRequest(const WebCore::ResourceRequest& request)
String WebView::standardUserAgentWithApplicationName(const String& applicationName)
{
- return String::format("Mozilla/5.0 (Windows; U; %s; %s) AppleWebKit/%s (KHTML, like Gecko)%s%s", osVersion().latin1().data(), defaultLanguage().latin1().data(), webKitVersion().latin1().data(), (applicationName.length() ? " " : ""), applicationName.latin1().data());
+ if (applicationName.isEmpty())
+ return makeString("Mozilla/5.0 (Windows; U; ", osVersion(), "; ", defaultLanguage(), ") AppleWebKit/", webKitVersion(), " (KHTML, like Gecko)");
+ return makeString("Mozilla/5.0 (Windows; U; ", osVersion(), "; ", defaultLanguage(), ") AppleWebKit/", webKitVersion(), " (KHTML, like Gecko) ", applicationName);
}
Page* WebView::page()
@@ -2310,11 +2313,10 @@ static String osVersion()
osVersion = "Windows 98; Win 9x 4.90";
}
} else if (versionInfo.dwPlatformId == VER_PLATFORM_WIN32_NT)
- osVersion = String::format("Windows NT %d.%d", versionInfo.dwMajorVersion, versionInfo.dwMinorVersion);
+ osVersion = makeString("Windows NT ", String::number(versionInfo.dwMajorVersion), '.', String::number(versionInfo.dwMinorVersion));
if (!osVersion.length())
- osVersion = String::format("Windows %d.%d", versionInfo.dwMajorVersion, versionInfo.dwMinorVersion);
-
+ osVersion = makeString("Windows ", String::number(versionInfo.dwMajorVersion), '.', String::number(versionInfo.dwMinorVersion));
return osVersion;
}
@@ -2348,7 +2350,7 @@ static String webKitVersion()
UINT productVersionLength;
if (!VerQueryValue(data, (LPTSTR)(LPCTSTR)key, (void**)&productVersion, &productVersionLength))
goto exit;
- versionStr = String(productVersion, productVersionLength);
+ versionStr = String(productVersion, productVersionLength - 1);
exit:
if (data)
diff --git a/WebKit/win/WebView.h b/WebKit/win/WebView.h
index 61eb946..61eb946 100755..100644
--- a/WebKit/win/WebView.h
+++ b/WebKit/win/WebView.h
diff --git a/WebKit/wince/ChangeLog b/WebKit/wince/ChangeLog
index c85f902..8d99b5c 100644
--- a/WebKit/wince/ChangeLog
+++ b/WebKit/wince/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-15 Nikolas Zimmermann <nzimmermann@rim.com>
+
+ Reviewed by Dirk Schulze.
+
+ Replace some String::format() usages by StringConcatenate in WebKit
+ https://bugs.webkit.org/show_bug.cgi?id=47714
+
+ * WebCoreSupport/PlatformStrategiesWinCE.cpp:
+ (PlatformStrategiesWinCE::imageTitle):
+ (PlatformStrategiesWinCE::multipleFileUploadText):
+
2010-09-28 Jenn Braithwaite <jennb@chromium.org>
Reviewed by Dmitry Titov.
diff --git a/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp b/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp
index 514fdf4..557d899 100644
--- a/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp
+++ b/WebKit/wince/WebCoreSupport/PlatformStrategiesWinCE.cpp
@@ -27,14 +27,16 @@
#include "PlatformStrategiesWinCE.h"
#include "IntSize.h"
-#include "MathExtras.h"
#include "Page.h"
#include "PageGroup.h"
#include "PluginDatabase.h"
+
+#include <wtf/MathExtras.h>
#include <wtf/text/CString.h>
+#include <wtf/text/StringConcatenate.h>
-#define UI_STRING(text, desciprion) text
-#define UI_STRING_KEY(text, key, desciprion) text
+#define UI_STRING(text, description) text
+#define UI_STRING_KEY(text, key, description) text
using namespace WebCore;
@@ -489,13 +491,13 @@ String PlatformStrategiesWinCE::crashedPluginText()
String PlatformStrategiesWinCE::imageTitle(const String& filename, const IntSize& size)
{
- CString filenameCString = filename.utf8();
- return String::format(UI_STRING("%s %d\xC3\x97%d pixels", "window title for a standalone image (uses multiplication symbol, not x)"), filenameCString.data(), size.width(), size.height());
+ return UI_STRING(makeString(filename, ' ', String::number(size.width()), "\xC3\x97", String::number(size.height()), " pixels"),
+ "window title for a standalone image (uses multiplication symbol, not x)");
}
String PlatformStrategiesWinCE::multipleFileUploadText(unsigned numberOfFiles)
{
- return String::format(UI_STRING("%d files", "Label to describe the number of files selected in a file upload control that allows multiple files"), numberOfFiles);
+ return UI_STRING(makeString(String::number(numberOfFiles), " files"), "Label to describe the number of files selected in a file upload control that allows multiple files");
}
String PlatformStrategiesWinCE::mediaElementLoadingStateText()
diff --git a/WebKit/wx/ChangeLog b/WebKit/wx/ChangeLog
index abbc87b..b7ec1f6 100644
--- a/WebKit/wx/ChangeLog
+++ b/WebKit/wx/ChangeLog
@@ -1,3 +1,14 @@
+2010-10-13 Gavin Barraclough <barraclough@apple.com>
+
+ Reviewed by Oliver Hunt.
+
+ https://bugs.webkit.org/show_bug.cgi?id=43987
+ Switch XMLHttpRequest, FileReader, and FileReaderSync to use a Stringbuilder
+ to construct their internal result string. Remove ScriptString (this is now
+ redundant).
+
+ * WebKitSupport/FrameLoaderClientWx.cpp:
+
2010-09-28 Jenn Braithwaite <jennb@chromium.org>
Reviewed by Dmitry Titov.
diff --git a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
index 93a62ca..7963ef9 100644
--- a/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
+++ b/WebKit/wx/WebKitSupport/FrameLoaderClientWx.cpp
@@ -49,7 +49,6 @@
#include "ResourceError.h"
#include "ResourceResponse.h"
#include "ScriptController.h"
-#include "ScriptString.h"
#include <wtf/PassRefPtr.h>
#include <wtf/RefPtr.h>