summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium
diff options
context:
space:
mode:
Diffstat (limited to 'WebKit/chromium')
-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
140 files changed, 4225 insertions, 1089 deletions
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