summaryrefslogtreecommitdiffstats
path: root/WebKit
diff options
context:
space:
mode:
authorSteve Block <steveblock@google.com>2010-08-27 11:02:25 +0100
committerSteve Block <steveblock@google.com>2010-09-02 17:17:20 +0100
commite8b154fd68f9b33be40a3590e58347f353835f5c (patch)
tree0733ce26384183245aaa5656af26c653636fe6c1 /WebKit
parentda56157816334089526a7a115a85fd85a6e9a1dc (diff)
downloadexternal_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.zip
external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.gz
external_webkit-e8b154fd68f9b33be40a3590e58347f353835f5c.tar.bz2
Merge WebKit at r66079 : Initial merge by git
Change-Id: Ie2e1440fb9d487d24e52c247342c076fecaecac7
Diffstat (limited to 'WebKit')
-rw-r--r--WebKit/CMakeLists.txt6
-rw-r--r--WebKit/ChangeLog11
-rw-r--r--WebKit/chromium/ChangeLog696
-rw-r--r--WebKit/chromium/DEPS2
-rw-r--r--WebKit/chromium/WebKit.gyp54
-rw-r--r--WebKit/chromium/features.gypi2
-rw-r--r--WebKit/chromium/public/WebBlobData.h102
-rw-r--r--WebKit/chromium/public/WebBlobRegistry.h58
-rw-r--r--WebKit/chromium/public/WebBlobStorageData.h83
-rw-r--r--WebKit/chromium/public/WebDOMEvent.h (renamed from WebKit/chromium/public/WebEvent.h)36
-rw-r--r--WebKit/chromium/public/WebDOMEventListener.h (renamed from WebKit/chromium/public/WebEventListener.h)18
-rw-r--r--WebKit/chromium/public/WebDOMMouseEvent.h62
-rw-r--r--WebKit/chromium/public/WebDOMMutationEvent.h (renamed from WebKit/chromium/public/WebMutationEvent.h)8
-rw-r--r--WebKit/chromium/public/WebDevToolsAgent.h1
-rw-r--r--WebKit/chromium/public/WebDevToolsAgentClient.h1
-rw-r--r--WebKit/chromium/public/WebFileError.h50
-rw-r--r--WebKit/chromium/public/WebFileSystem.h71
-rw-r--r--WebKit/chromium/public/WebFileSystemCallbacks.h73
-rw-r--r--WebKit/chromium/public/WebFileSystemEntry.h50
-rw-r--r--WebKit/chromium/public/WebFrameClient.h14
-rw-r--r--WebKit/chromium/public/WebGraphicsContext3D.h5
-rw-r--r--WebKit/chromium/public/WebHTTPBody.h5
-rw-r--r--WebKit/chromium/public/WebIDBDatabase.h8
-rwxr-xr-xWebKit/chromium/public/WebIDBFactory.h4
-rw-r--r--WebKit/chromium/public/WebIDBKey.h3
-rw-r--r--WebKit/chromium/public/WebIDBKeyPath.h2
-rw-r--r--WebKit/chromium/public/WebIDBTransaction.h62
-rw-r--r--WebKit/chromium/public/WebIDBTransactionCallbacks.h46
-rw-r--r--WebKit/chromium/public/WebKitClient.h24
-rw-r--r--WebKit/chromium/public/WebMediaPlayer.h13
-rw-r--r--WebKit/chromium/public/WebNode.h8
-rw-r--r--WebKit/chromium/public/WebSettings.h1
-rw-r--r--WebKit/chromium/public/WebSpeechInputController.h16
-rw-r--r--WebKit/chromium/public/WebSpeechInputListener.h15
-rw-r--r--WebKit/chromium/public/WebVideoFrame.h73
-rw-r--r--WebKit/chromium/src/AssertMatchingEnums.cpp22
-rw-r--r--WebKit/chromium/src/BlobRegistryProxy.cpp87
-rw-r--r--WebKit/chromium/src/BlobRegistryProxy.h63
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp14
-rw-r--r--WebKit/chromium/src/EventListenerWrapper.cpp144
-rw-r--r--WebKit/chromium/src/EventListenerWrapper.h126
-rw-r--r--WebKit/chromium/src/GraphicsContext3D.cpp56
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.cpp10
-rwxr-xr-xWebKit/chromium/src/IDBFactoryBackendProxy.cpp9
-rwxr-xr-xWebKit/chromium/src/IDBFactoryBackendProxy.h1
-rw-r--r--WebKit/chromium/src/IDBTransactionBackendProxy.cpp91
-rw-r--r--WebKit/chromium/src/IDBTransactionBackendProxy.h62
-rw-r--r--WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp65
-rw-r--r--WebKit/chromium/src/IDBTransactionCallbacksProxy.h63
-rw-r--r--WebKit/chromium/src/SpeechInputClientImpl.cpp4
-rw-r--r--WebKit/chromium/src/SpeechInputClientImpl.h2
-rw-r--r--WebKit/chromium/src/VideoFrameChromiumImpl.cpp111
-rw-r--r--WebKit/chromium/src/VideoFrameChromiumImpl.h66
-rw-r--r--WebKit/chromium/src/WebBlobData.cpp166
-rw-r--r--WebKit/chromium/src/WebBlobStorageData.cpp113
-rw-r--r--WebKit/chromium/src/WebDOMEvent.cpp (renamed from WebKit/chromium/src/WebEvent.cpp)68
-rw-r--r--WebKit/chromium/src/WebDOMEventListener.cpp (renamed from WebKit/chromium/src/WebEventListener.cpp)128
-rw-r--r--WebKit/chromium/src/WebDOMEventListenerPrivate.cpp (renamed from WebKit/chromium/src/WebEventListenerPrivate.cpp)174
-rw-r--r--WebKit/chromium/src/WebDOMEventListenerPrivate.h (renamed from WebKit/chromium/src/WebEventListenerPrivate.h)190
-rw-r--r--WebKit/chromium/src/WebDOMMouseEvent.cpp110
-rw-r--r--WebKit/chromium/src/WebDOMMutationEvent.cpp65
-rw-r--r--WebKit/chromium/src/WebDOMStringList.cpp2
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentImpl.cpp25
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentImpl.h1
-rw-r--r--WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp94
-rw-r--r--WebKit/chromium/src/WebFileSystemCallbacksImpl.h66
-rw-r--r--WebKit/chromium/src/WebFrameImpl.cpp19
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp17
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h2
-rw-r--r--WebKit/chromium/src/WebHTTPBody.cpp32
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseImpl.cpp11
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseImpl.h2
-rwxr-xr-xWebKit/chromium/src/WebIDBFactoryImpl.cpp9
-rwxr-xr-xWebKit/chromium/src/WebIDBFactoryImpl.h1
-rw-r--r--WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp56
-rw-r--r--WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h55
-rw-r--r--WebKit/chromium/src/WebIDBTransactionImpl.cpp80
-rw-r--r--WebKit/chromium/src/WebIDBTransactionImpl.h60
-rw-r--r--WebKit/chromium/src/WebImageDecoder.cpp4
-rw-r--r--WebKit/chromium/src/WebInputEventConversion.cpp5
-rw-r--r--WebKit/chromium/src/WebKit.cpp7
-rw-r--r--WebKit/chromium/src/WebMediaPlayerClientImpl.cpp26
-rw-r--r--WebKit/chromium/src/WebMediaPlayerClientImpl.h12
-rw-r--r--WebKit/chromium/src/WebNode.cpp10
-rw-r--r--WebKit/chromium/src/WebPageSerializerImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.h1
-rw-r--r--WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp5
-rw-r--r--WebKit/chromium/src/WebSpeechInputControllerMockImpl.h4
-rw-r--r--WebKit/chromium/src/WebURLRequest.cpp2
-rw-r--r--WebKit/chromium/src/WebURLResponse.cpp1
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp3
-rw-r--r--WebKit/chromium/src/js/DebuggerScript.js12
-rw-r--r--WebKit/chromium/src/js/DevTools.js1
-rw-r--r--WebKit/chromium/tests/RunAllTests.cpp17
-rwxr-xr-xWebKit/chromium/tests/TilingDataTest.cpp113
-rw-r--r--WebKit/chromium/tests/WebFrameTest.cpp112
-rw-r--r--WebKit/chromium/tests/data/iframes_test.html9
-rw-r--r--WebKit/chromium/tests/data/invisible_iframe.html5
-rw-r--r--WebKit/chromium/tests/data/visible_iframe.html5
-rw-r--r--WebKit/chromium/tests/data/zero_sized_iframe.html5
-rw-r--r--WebKit/efl/CMakeListsEfl.txt6
-rw-r--r--WebKit/efl/ChangeLog80
-rw-r--r--WebKit/efl/DefaultTheme/default.edc1
-rw-r--r--WebKit/efl/ewk/ewk_frame.cpp2
-rw-r--r--WebKit/efl/ewk/ewk_main.cpp1
-rw-r--r--WebKit/efl/ewk/ewk_view.cpp37
-rw-r--r--WebKit/efl/ewk/ewk_view.h3
-rw-r--r--WebKit/gtk/ChangeLog207
-rw-r--r--WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp27
-rw-r--r--WebKit/gtk/WebCoreSupport/ChromeClientGtk.h5
-rw-r--r--WebKit/gtk/WebCoreSupport/DragClientGtk.cpp2
-rw-r--r--WebKit/gtk/WebCoreSupport/EditorClientGtk.h2
-rw-r--r--WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp10
-rw-r--r--WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp575
-rw-r--r--WebKit/gtk/WebCoreSupport/FullscreenVideoController.h103
-rw-r--r--WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp51
-rw-r--r--WebKit/gtk/WebCoreSupport/InspectorClientGtk.h3
-rw-r--r--WebKit/gtk/docs/webkitgtk-sections.txt3
-rw-r--r--WebKit/gtk/po/ChangeLog9
-rw-r--r--WebKit/gtk/po/POTFILES1
-rw-r--r--WebKit/gtk/tests/testcopyandpaste.c26
-rw-r--r--WebKit/gtk/tests/testhittestresult.c10
-rw-r--r--WebKit/gtk/webkit/webkitdownload.cpp2
-rw-r--r--WebKit/gtk/webkit/webkitnetworkrequest.cpp2
-rw-r--r--WebKit/gtk/webkit/webkitnetworkresponse.cpp2
-rw-r--r--WebKit/gtk/webkit/webkitprivate.cpp42
-rw-r--r--WebKit/gtk/webkit/webkitprivate.h7
-rw-r--r--WebKit/gtk/webkit/webkitwebview.cpp115
-rw-r--r--WebKit/gtk/webkit/webkitwebview.h16
-rw-r--r--WebKit/mac/ChangeLog97
-rw-r--r--WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm4
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm4
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm4
-rw-r--r--WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm4
-rw-r--r--WebKit/mac/Plugins/Hosted/ProxyInstance.mm4
-rw-r--r--WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm5
-rw-r--r--WebKit/mac/Plugins/WebBaseNetscapePluginView.mm4
-rw-r--r--WebKit/mac/WebCoreSupport/WebChromeClient.mm4
-rw-r--r--WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm8
-rw-r--r--WebKit/mac/WebView/WebFrame.mm4
-rw-r--r--WebKit/mac/WebView/WebHTMLView.mm8
-rw-r--r--WebKit/mac/WebView/WebPDFView.mm1
-rw-r--r--WebKit/mac/WebView/WebPreferenceKeysPrivate.h2
-rw-r--r--WebKit/mac/WebView/WebPreferences.mm22
-rw-r--r--WebKit/mac/WebView/WebPreferencesPrivate.h7
-rw-r--r--WebKit/mac/WebView/WebView.mm14
-rw-r--r--WebKit/qt/Api/DerivedSources.pro5
-rw-r--r--WebKit/qt/Api/qwebelement.cpp6
-rw-r--r--WebKit/qt/Api/qwebframe.cpp6
-rw-r--r--WebKit/qt/Api/qwebframe_p.h4
-rw-r--r--WebKit/qt/Api/qwebhistory.cpp2
-rw-r--r--WebKit/qt/Api/qwebhistory_p.h2
-rw-r--r--WebKit/qt/Api/qwebpage.cpp2
-rw-r--r--WebKit/qt/Api/qwebpage_p.h2
-rw-r--r--WebKit/qt/Api/qwebview.cpp2
-rw-r--r--WebKit/qt/ChangeLog119
-rw-r--r--WebKit/qt/WebCoreSupport/ChromeClientQt.cpp11
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp24
-rw-r--r--WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h1
-rw-r--r--WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp1
-rw-r--r--WebKit/win/ChangeLog44
-rw-r--r--WebKit/win/WebFrame.cpp4
-rw-r--r--WebKit/win/WebView.cpp8
164 files changed, 5605 insertions, 778 deletions
diff --git a/WebKit/CMakeLists.txt b/WebKit/CMakeLists.txt
index 379c8e4..6bc5100 100644
--- a/WebKit/CMakeLists.txt
+++ b/WebKit/CMakeLists.txt
@@ -71,7 +71,5 @@ IF (WebKit_LINK_FLAGS)
ADD_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} LINK_FLAGS "${WebKit_LINK_FLAGS}")
ENDIF ()
-IF (SHARED_CORE)
- SET_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
- INSTALL(TARGETS ${WebKit_LIBRARY_NAME} DESTINATION lib)
-ENDIF ()
+SET_TARGET_PROPERTIES(${WebKit_LIBRARY_NAME} PROPERTIES VERSION ${PROJECT_VERSION} SOVERSION ${PROJECT_VERSION_MAJOR})
+INSTALL(TARGETS ${WebKit_LIBRARY_NAME} DESTINATION lib)
diff --git a/WebKit/ChangeLog b/WebKit/ChangeLog
index c7858fb..9747ffa 100644
--- a/WebKit/ChangeLog
+++ b/WebKit/ChangeLog
@@ -1,3 +1,14 @@
+2010-08-20 Lucas De Marchi <lucas.demarchi@profusion.mobi>
+
+ Unreviewed build fix.
+
+ As opposed to WebCore, JavascriptCore and wtf, webkit is always a
+ shared library. After r65366, libewebkit.so was not being installed
+ anymore when building with SHARED_CORE=0 (which is the default). This
+ partially reverts that revision in order to fix this issue.
+
+ * CMakeLists.txt: always install webkit library.
+
2010-08-17 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed by Darin Adler.
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 0a07733..6b0b3fa 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,699 @@
+2010-08-25 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r66074.
+ http://trac.webkit.org/changeset/66074
+ https://bugs.webkit.org/show_bug.cgi?id=44660
+
+ Chromium canary turned red (Requested by yuzo on #webkit).
+
+ * features.gypi:
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+
+2010-08-25 Michael Nordman <michaeln@google.com>
+
+ Reviewed by David Levin.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44133
+ WebKitAPI to allow runtime enablement of XmlHttpRequest.responseBlob.
+
+ * features.gypi: Define ENABLE_XHR_RESPONSE_BLOB.
+ * public/WebRuntimeFeatures.h:
+ * src/WebRuntimeFeatures.cpp:
+ (WebKit::WebRuntimeFeatures::enableXHRResponseBlob):
+ (WebKit::WebRuntimeFeatures::isXHRResponseBlobEnabled):
+
+2010-08-24 Victoria Kirst <vrk@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Adding a way to communicate video frames between Chromium and WebKit.
+ The WebKit side acts as a middleman between Chromium and WebCore.
+ The VideoFrameChromiumImpl is not being used by WebCore yet, as there
+ still needs to be an implementation of WebVideoFrame in Chromium
+ -- coming soon in a subsequent patch.
+
+ API changes for Video Frame sharing between WebKit and Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=44539
+
+ * WebKit.gyp:
+ * public/WebMediaPlayer.h:
+ (WebKit::WebMediaPlayer::getCurrentFrame):
+ (WebKit::WebMediaPlayer::putCurrentFrame):
+ * public/WebVideoFrame.h: Added.
+ * src/VideoFrameChromiumImpl.cpp: Added.
+ (WebKit::VideoFrameChromiumImpl::toWebVideoFrame):
+ (WebKit::VideoFrameChromiumImpl::VideoFrameChromiumImpl):
+ (WebKit::VideoFrameChromiumImpl::type):
+ (WebKit::VideoFrameChromiumImpl::format):
+ (WebKit::VideoFrameChromiumImpl::width):
+ (WebKit::VideoFrameChromiumImpl::height):
+ (WebKit::VideoFrameChromiumImpl::planes):
+ (WebKit::VideoFrameChromiumImpl::stride):
+ (WebKit::VideoFrameChromiumImpl::data):
+ * src/VideoFrameChromiumImpl.h: Added.
+ * src/WebMediaPlayerClientImpl.cpp:
+ (WebKit::WebMediaPlayerClientImpl::getCurrentFrame):
+ (WebKit::WebMediaPlayerClientImpl::putCurrentFrame):
+ (WebKit::WebMediaPlayerClientImpl::create):
+ * src/WebMediaPlayerClientImpl.h:
+
+2010-08-25 Eric Seidel <eric@webkit.org>
+
+ Unreviewed. Build fix.
+
+ Make Chromiums Broken WebPageSerializerImpl compile again
+ https://bugs.webkit.org/show_bug.cgi?id=44652
+
+ Make it compile again. This code is still horribly wrong.
+
+ * src/WebPageSerializerImpl.cpp:
+ (WebKit::WebPageSerializerImpl::endTagToString):
+
+2010-08-20 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ WebGL must enforce restrictions even if running on OpenGL ES 2.0
+ https://bugs.webkit.org/show_bug.cgi?id=42908
+
+ * public/WebGraphicsContext3D.h: Add two new flags.
+ * src/GraphicsContext3D.cpp: Ditto.
+ (WebCore::GraphicsContext3DInternal::isGLES2NPOTStrict):
+ (WebCore::GraphicsContext3DInternal::isErrorGeneratedOnOutOfBoundsAccesses):
+ (WebCore::GraphicsContext3D::isGLES2NPOTStrict):
+ (WebCore::GraphicsContext3D::isErrorGeneratedOnOutOfBoundsAccesses):
+ * src/WebGraphicsContext3DDefaultImpl.cpp: Ditto.
+ (WebKit::WebGraphicsContext3DDefaultImpl::isGLES2NPOTStrict):
+ (WebKit::WebGraphicsContext3DDefaultImpl::isErrorGeneratedOnOutOfBoundsAccesses):
+ * src/WebGraphicsContext3DDefaultImpl.h: Ditto.
+
+2010-08-24 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Passing premultiplyAlpha=false to tex{Sub}Image2D loses information (skia)
+ https://bugs.webkit.org/show_bug.cgi?id=38282
+
+ * src/WebImageDecoder.cpp:
+ (WebKit::WebImageDecoder::init): Add premultiplyAlpha flag.
+
+2010-08-25 Satish Sampath <satish@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Pass the element's bounds to embedder during speech recognition.
+ https://bugs.webkit.org/show_bug.cgi?id=44427
+
+ * public/WebSpeechInputController.h:
+ (WebKit::WebSpeechInputController::startRecognition):
+ (WebKit::WebSpeechInputController::cancelRecognition):
+ (WebKit::WebSpeechInputController::stopRecording):
+ * src/SpeechInputClientImpl.cpp:
+ (WebKit::SpeechInputClientImpl::startRecognition):
+ * src/SpeechInputClientImpl.h:
+ * src/WebSpeechInputControllerMockImpl.cpp:
+ (WebKit::WebSpeechInputControllerMockImpl::startRecognition):
+ * src/WebSpeechInputControllerMockImpl.h:
+
+2010-08-25 Pawel Hajdan <phajdan.jr@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add an assertion to prevent re-initializing WebKit.
+ https://bugs.webkit.org/show_bug.cgi?id=44545
+
+ This will help prevent crashes like:
+ - http://code.google.com/p/chromium/issues/detail?id=52731
+ - http://code.google.com/p/chromium/issues/detail?id=52643
+
+ * src/WebKit.cpp:
+ (WebKit::initialize):
+
+2010-08-25 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Adding missing test files and reenabling the WebFrame unit-test.
+ https://bugs.webkit.org/show_bug.cgi?id=44492
+
+ * tests/WebFrameTest.cpp:
+ (WebKit::TEST_F):
+ * tests/data/iframes_test.html: Added.
+ * tests/data/invisible_iframe.html: Added.
+ * tests/data/visible_iframe.html: Added.
+ * tests/data/zero_sized_iframe.html: Added.
+
+2010-08-25 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed, build fix.
+
+ * DEPS: Roll Chromium revision to 57298 to fix upstream build.
+
+2010-08-24 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ Build fix: Remove setHTML5ParserEnabled(), it's no longer used.
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ * src/WebSettingsImpl.h:
+
+2010-08-24 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] WebBlobRegistry cleanup.
+ https://bugs.webkit.org/show_bug.cgi?id=44571
+
+ Remove unneeded method from WebBlobRegistry interface.
+ Also remove unneeded WebBlobRegistryImpl.* files. They're already
+ excluded from gyp files.
+
+ * public/WebBlobRegistry.h:
+ * src/WebBlobRegistryImpl.cpp: Removed.
+ * src/WebBlobRegistryImpl.h: Removed.
+
+2010-08-24 Adam Barth <abarth@webkit.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Hulu popups are blocked
+ https://bugs.webkit.org/show_bug.cgi?id=44572
+
+ We were blocking popups created by Flash Player because we were never
+ setting the UserGestureIndicator for events. Most WebKit ports handle
+ events through EventHandler, but Chromium is special (for some unknown
+ reason) and dispatches events directly. That means Chromium misses out
+ on some of the work done by EventHandler, including setting the
+ UserGestureIndicator.
+
+ I suspect this is covered by an existing LayoutTest, but I don't have
+ the ability to run the Chromium LayoutTests on this machine. :(
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::handleInputEvent):
+
+2010-08-24 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Update WebBlobData.
+ https://bugs.webkit.org/show_bug.cgi?id=44481
+
+ Some changes to WebBlobData to match with chromium implementation.
+ 1) Change to use WebCString for data, instead of WebData.
+ 2) Separate path from URL.
+
+ * public/WebBlobData.h:
+ * src/WebBlobData.cpp:
+ (WebKit::WebBlobData::itemAt):
+ (WebKit::WebBlobData::appendData):
+ (WebKit::WebBlobData::appendBlob):
+ * src/WebBlobStorageData.cpp:
+ (WebKit::WebBlobStorageData::itemAt):
+
+2010-08-24 Marcus Bulach <bulach@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Hooks IDBKeyPath with IDBObjectStorage::put.
+ https://bugs.webkit.org/show_bug.cgi?id=44275
+
+ Adds a mechanism to extract an IDBKey from SerializedScriptValue using IDBKeyPath
+ during IDBObjectStorage::put.
+
+ * public/WebIDBKey.h:
+ (WebKit::WebIDBKey::WebIDBKey):
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::createIDBKeysFromSerializedValuesAndKeyPath):
+ * src/ChromiumBridge.cpp:
+ (WebCore::ChromiumBridge::createIDBKeysFromSerializedValuesAndKeyPath):
+
+2010-08-24 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ [DRT/Chromium] Support for IndexedDB tests
+ https://bugs.webkit.org/show_bug.cgi?id=44490
+
+ * DEPS: Roll Chromium to r57145 to have a webkit_support change.
+
+2010-08-24 Roland Steiner <rolandsteiner@chromium.org>
+
+ Unreviewed build fix.
+
+ put the "DISABLED_" in front of the right identifier.
+
+ * tests/WebFrameTest.cpp:
+ (WebKit::TEST_F):
+
+2010-08-23 Roland Steiner <rolandsteiner@chromium.org>
+
+ Reviewed by Tamura Kent.
+
+ Disable failing test
+ https://bugs.webkit.org/show_bug.cgi?id=44492
+
+ * tests/WebFrameTest.cpp:
+ (WebKit::TEST_F):
+
+2010-08-23 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Made WebFrame not report the text from hidden frames.
+ (some pages contain hidden frames with garbage text that
+ should not be indexed or used to detect the page's language).
+ https://bugs.webkit.org/show_bug.cgi?id=39456
+
+ * WebKit.gyp:
+ * public/WebCString.h:
+ (WebKit::operator<):
+ * public/WebURL.h:
+ (WebKit::operator<):
+ * src/WebCString.cpp:
+ (WebKit::WebCString::compare):
+ * src/WebFrameImpl.cpp:
+ (WebKit::frameContentAsPlainText):
+ * tests/RunAllTests.cpp:
+ (main):
+ * tests/WebFrameTest.cpp: Added.
+
+2010-08-23 Kent Tamura <tkent@chromium.org>
+
+ Unreviewed, build fix for r65852.
+
+ * src/WebNode.cpp:
+ (WebKit::WebNode::parentNode):
+
+2010-08-23 Kenneth Russell <kbr@google.com>
+
+ Reviewed by Dimitri Glazkov.
+
+ Remove references to ArrayBuffer and ArrayBufferView from GraphicsContext3D
+ https://bugs.webkit.org/show_bug.cgi?id=44455
+
+ Updated Safari, Qt and Chromium WebGL ports to avoid referencing
+ ArrayBuffer and ArrayBufferView types from GraphicsContext3D.
+
+ Ran all WebGL layout tests; no new regressions. Built and tested
+ WebKit on Mac OS X; built Chromium on Mac OS X and Linux.
+
+ * src/GraphicsContext3D.cpp:
+ (WebCore::GraphicsContext3DInternal::bufferData):
+ (WebCore::GraphicsContext3DInternal::bufferSubData):
+
+2010-08-23 Jian Li <jianli@chromium.org>
+
+ Reviewed by David Levin.
+
+ Remove unneeded BlobRegistryImpl.* and WebBlobRegistryImpl.* from
+ chromium project files.
+ https://bugs.webkit.org/show_bug.cgi?id=44442
+
+ * WebKit.gyp:
+
+2010-08-23 Satish Sampath <satish@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Remove obsolete public/API methods in chromium port
+ https://bugs.webkit.org/show_bug.cgi?id=44421
+
+ * public/WebSpeechInputController.h:
+ (WebKit::WebSpeechInputController::startRecognition):
+ (WebKit::WebSpeechInputController::cancelRecognition):
+ (WebKit::WebSpeechInputController::stopRecording):
+ * public/WebSpeechInputListener.h:
+
+2010-08-22 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ Encapsulate document marker management into DocumentMarkerController
+ https://bugs.webkit.org/show_bug.cgi?id=44383
+
+ Modify call sites in the Chromium port to use DocumentMarkerController.
+
+ No functionality was changed, so no new tests.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::stopFinding):
+ (WebKit::WebFrameImpl::addMarker):
+ (WebKit::WebFrameImpl::setMarkerActive):
+
+2010-08-22 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add the blob URL member to FormData.
+ https://bugs.webkit.org/show_bug.cgi?id=44387
+
+ As the result of adding the blob URL member to the FormData, we need
+ to update the corresponding WebKit API for chromium.
+
+ * public/WebHTTPBody.h:
+ (WebKit::WebHTTPBody::Element::):
+ * src/WebHTTPBody.cpp:
+ (WebKit::WebHTTPBody::elementAt):
+ (WebKit::WebHTTPBody::appendBlob):
+
+2010-08-20 Kinuko Yasuda <kinuko@chromium.org>
+
+ Unreviewed; build fix for chromium (and remove duplicated ChangeLog entry).
+
+2010-08-20 James Robinson <jamesr@chromium.org>
+
+ Synchronize default of use_accelerated_compositing gyp variable with downstream. Unreviewed.
+
+ * features.gypi:
+
+2010-08-20 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add chromium-side callback implementation for FileSystem API
+ https://bugs.webkit.org/show_bug.cgi?id=44350
+
+ Add WebFileSystemCallbacks that calls back the WebCore's implementation.
+
+ * WebKit.gyp:
+ * src/WebFileSystemCallbacksImpl.cpp: Added.
+ * src/WebFileSystemCallbacksImpl.h: Added.
+
+2010-08-20 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] fix a null pointer crash when dispatching JS keyboard events
+ https://bugs.webkit.org/show_bug.cgi?id=44313
+
+ * src/WebInputEventConversion.cpp:
+ (WebKit::WebKeyboardEventBuilder::WebKeyboardEventBuilder):
+
+2010-08-20 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Removing the deprecated class WebEvent and friends.
+ https://bugs.webkit.org/show_bug.cgi?id=44296
+
+ * WebKit.gyp:
+ * public/WebEvent.h: Removed.
+ * public/WebEventListener.h: Removed.
+ * public/WebMutationEvent.h: Removed.
+ * public/WebNode.h:
+ * src/EventListenerWrapper.cpp:
+ (WebKit::EventListenerWrapper::webDOMEventListenerDeleted):
+ * src/EventListenerWrapper.h:
+ * src/WebEvent.cpp: Removed.
+ * src/WebEventListener.cpp: Removed.
+ * src/WebEventListenerPrivate.cpp: Removed.
+ * src/WebEventListenerPrivate.h: Removed.
+ * src/WebNode.cpp:
+ (WebKit::WebNode::removeEventListener):
+
+2010-08-19 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Fix failing WebGL tests in Chromium in-process-webgl port
+ https://bugs.webkit.org/show_bug.cgi?id=44305
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::getVertexAttribOffset): Add implementation.
+
+2010-08-19 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: enable DOM breakpoints for chromium
+ https://bugs.webkit.org/show_bug.cgi?id=42886
+
+ * src/js/DevTools.js:
+ (WebInspector.loaded):
+
+2010-08-19 Vincent Scheib <scheib@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] TilingData::tilePositionY has typo of X where Y should be used
+ https://bugs.webkit.org/show_bug.cgi?id=44195
+
+ Unit tests added for tileSize and tilePosition.
+
+ * tests/TilingDataTest.cpp:
+ (WebCore::TEST):
+
+2010-08-19 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add WebKit API for FileSystem API
+ https://bugs.webkit.org/show_bug.cgi?id=43151
+
+ Add asynchronous FileSystem interface to WebKit API for
+ FileSystem API.
+ http://dev.w3.org/2009/dap/file-system/file-dir-sys.html
+
+ * WebKit.gyp:
+ * public/WebFileError.h: Added.
+ * public/WebFileSystem.h: Added.
+ * public/WebFileSystemEntry.h: Added.
+ * public/WebFileSystemCallbacks.h: Added.
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::fileSystem):
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::openFileSystem):
+
+2010-08-19 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Jian Li.
+
+ [Chromium] Rolls Chromium DEPS forward to 56564
+ https://bugs.webkit.org/show_bug.cgi?id=44281
+
+ Roll Chromium DEPS forward to 56564 to include WebFileSystem
+ implementation changes.
+
+ * DEPS:
+
+2010-08-19 Vincent Scheib <scheib@chromium.org>
+
+ Reviewed by David Levin.
+
+ Fixing previous Mac only build breakage with TilingDataTest.cpp
+ https://bugs.webkit.org/show_bug.cgi?id=44223
+
+ TilingDataTest.cpp included the wrong header, which had a compile
+ option around the definition of the WebCore namespace. Without the
+ namespace defined, error. Fixed by correctly including TilingData.h,
+ which has no conditional compilation.
+
+ * WebKit.gyp:
+ * tests/TilingDataTest.cpp:
+
+2010-08-19 Jochen Eisinger <jochen@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ concatenated_devtools_js should depend on inspector_protocol_sources
+ https://bugs.webkit.org/show_bug.cgi?id=44255
+
+ * WebKit.gyp:
+
+2010-08-19 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: activate/deactivate breakpoints using v8 debugger flag.
+ https://bugs.webkit.org/show_bug.cgi?id=44112
+
+ * src/js/DebuggerScript.js:
+ ():
+
+2010-08-19 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ [IndexedDB] Abort idle IDBTransactions when the JS context they were created in finishes execution.
+ https://bugs.webkit.org/show_bug.cgi?id=44101
+
+ * WebKit.gyp:
+ * public/WebIDBDatabase.h:
+ (WebKit::WebIDBDatabase::transaction):
+ * public/WebIDBFactory.h:
+ (WebKit::WebIDBFactory::abortPendingTransactions):
+ * public/WebIDBTransaction.h: Added.
+ (WebKit::WebIDBTransaction::~WebIDBTransaction):
+ (WebKit::WebIDBTransaction::mode):
+ (WebKit::WebIDBTransaction::objectStore):
+ (WebKit::WebIDBTransaction::abort):
+ (WebKit::WebIDBTransaction::id):
+ (WebKit::WebIDBTransaction::setCallbacks):
+ * public/WebIDBTransactionCallbacks.h: Added.
+ (WebKit::WebIDBTransactionCallbacks::~WebIDBTransactionCallbacks):
+ (WebKit::WebIDBTransactionCallbacks::onAbort):
+ (WebKit::WebIDBTransactionCallbacks::id):
+ * src/IDBDatabaseProxy.cpp:
+ (WebCore::IDBDatabaseProxy::transaction):
+ * src/IDBFactoryBackendProxy.cpp:
+ (WebCore::IDBFactoryBackendProxy::abortPendingTransactions):
+ * src/IDBFactoryBackendProxy.h:
+ * src/IDBTransactionBackendProxy.cpp: Added.
+ (WebCore::IDBTransactionBackendProxy::create):
+ (WebCore::IDBTransactionBackendProxy::IDBTransactionBackendProxy):
+ (WebCore::IDBTransactionBackendProxy::~IDBTransactionBackendProxy):
+ (WebCore::IDBTransactionBackendProxy::objectStore):
+ (WebCore::IDBTransactionBackendProxy::mode):
+ (WebCore::IDBTransactionBackendProxy::abort):
+ (WebCore::IDBTransactionBackendProxy::scheduleTask):
+ (WebCore::IDBTransactionBackendProxy::sqliteDatabase):
+ (WebCore::IDBTransactionBackendProxy::id):
+ (WebCore::IDBTransactionBackendProxy::setCallbacks):
+ * src/IDBTransactionBackendProxy.h: Added.
+ * src/IDBTransactionCallbacksProxy.cpp: Added.
+ (WebCore::IDBTransactionCallbacksProxy::create):
+ (WebCore::IDBTransactionCallbacksProxy::IDBTransactionCallbacksProxy):
+ (WebCore::IDBTransactionCallbacksProxy::~IDBTransactionCallbacksProxy):
+ (WebCore::IDBTransactionCallbacksProxy::onAbort):
+ (WebCore::IDBTransactionCallbacksProxy::id):
+ * src/IDBTransactionCallbacksProxy.h: Added.
+ * src/WebDOMStringList.cpp:
+ (WebKit::WebDOMStringList::length):
+ * src/WebIDBDatabaseImpl.cpp:
+ (WebKit::WebIDBDatabaseImpl::transaction):
+ * src/WebIDBDatabaseImpl.h:
+ * src/WebIDBFactoryImpl.cpp:
+ (WebKit::WebIDBFactoryImpl::abortPendingTransactions):
+ * src/WebIDBFactoryImpl.h:
+ * src/WebIDBTransactionCallbacksImpl.cpp: Added.
+ (WebCore::WebIDBTransactionCallbacksImpl::WebIDBTransactionCallbacksImpl):
+ (WebCore::WebIDBTransactionCallbacksImpl::~WebIDBTransactionCallbacksImpl):
+ (WebCore::WebIDBTransactionCallbacksImpl::onAbort):
+ (WebCore::WebIDBTransactionCallbacksImpl::id):
+ * src/WebIDBTransactionCallbacksImpl.h: Added.
+ * src/WebIDBTransactionImpl.cpp: Added.
+ (WebKit::WebIDBTransactionImpl::WebIDBTransactionImpl):
+ (WebKit::WebIDBTransactionImpl::~WebIDBTransactionImpl):
+ (WebKit::WebIDBTransactionImpl::mode):
+ (WebKit::WebIDBTransactionImpl::objectStore):
+ (WebKit::WebIDBTransactionImpl::abort):
+ (WebKit::WebIDBTransactionImpl::id):
+ (WebKit::WebIDBTransactionImpl::setCallbacks):
+ * src/WebIDBTransactionImpl.h: Added.
+ (WebKit::):
+
+2010-08-19 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Chromium DevTools: There is no need in resource-based InjectedScript.js source.
+ Now that we populate front-end after its onload handler, I don't think we need
+ to install injected script early.
+ https://bugs.webkit.org/show_bug.cgi?id=44029
+
+ * public/WebDevToolsAgentClient.h:
+ * src/WebDevToolsAgentImpl.cpp:
+ (WebKit::):
+ (WebKit::WebDevToolsAgentImpl::attach):
+ (WebKit::WebDevToolsAgentImpl::frontendLoaded):
+
+2010-08-19 Pavel Feldman <pfeldman@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Chromium DevTools: remove setRuntimeFeatureEnabled API method that
+ is no longer used.
+ https://bugs.webkit.org/show_bug.cgi?id=44237
+
+ * public/WebDevToolsAgent.h:
+ * src/WebDevToolsAgentImpl.cpp:
+ * src/WebDevToolsAgentImpl.h:
+
+2010-08-18 Jian Li <jianli@chromium.org>
+
+ Fix layout test crashes in chromium.
+
+ * src/BlobRegistryProxy.cpp:
+ (WebCore::BlobRegistryProxy::registerBlobURL):
+ (WebCore::BlobRegistryProxy::unregisterBlobURL):
+
+2010-08-18 Jian Li <jianli@chromium.org>
+
+ Fix chromium build break.
+
+ * src/WebBlobStorageData.cpp:
+ (WebKit::WebBlobStorageData::itemAt):
+
+2010-08-18 Jian Li <jianli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Chromium side implementation of blob data and blob registry.
+ https://bugs.webkit.org/show_bug.cgi?id=43871
+
+ * WebKit.gyp:
+ * public/WebBlobData.h: Added.
+ * public/WebBlobRegistry.h: Added.
+ * public/WebBlobStorageData.h: Added.
+ * public/WebKitClient.h:
+ (WebKit::WebKitClient::blobRegistry):
+ * src/BlobRegistryProxy.cpp: Added.
+ * src/BlobRegistryProxy.h: Added.
+ * src/WebBlobData.cpp: Added.
+ * src/WebBlobRegistryImpl.cpp: Added.
+ * src/WebBlobRegistryImpl.h: Added.
+ * src/WebBlobStorageData.cpp: Added.
+
+2010-08-18 Dumitru Daniliuc <dumi@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Propagate the m_downloadFilePath correctly.
+ https://bugs.webkit.org/show_bug.cgi?id=44198
+
+ * src/WebURLRequest.cpp:
+ (WebKit::WebURLRequestPrivateImpl::WebURLRequestPrivateImpl):
+ * src/WebURLResponse.cpp:
+ (WebKit::WebURLResponsePrivateImpl::WebURLResponsePrivateImpl):
+
+2010-08-18 Victor Wang <victorw@chromium.org>
+
+ Unreviewed. Fix chromium multi dll build.
+
+ * public/WebIDBKeyPath.h:
+
+2010-08-18 Jay Civelli <jcivelli@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Renaming the WebEvent to WebDOMEvent and adding a new event class
+ for mouse events so that the event listener API can be used to listen
+ to them. The renaming is needed as there already is a WebMouseEvent class.
+ https://bugs.webkit.org/show_bug.cgi?id=43453
+
+ * WebKit.gyp:
+ * public/WebDOMEvent.h: Added.
+ * public/WebDOMEventListener.h: Added.
+ * public/WebDOMMouseEvent.h: Added.
+ * public/WebDOMMutationEvent.h: Added.
+ * public/WebNode.h:
+ * src/EventListenerWrapper.cpp:
+ * src/EventListenerWrapper.h:
+ * src/WebDOMEvent.cpp: Added.
+ * src/WebDOMEventListener.cpp: Added.
+ * src/WebDOMEventListenerPrivate.cpp: Added.
+ * src/WebDOMEventListenerPrivate.h: Added.
+ * src/WebDOMMouseEvent.cpp: Added.
+ * src/WebDOMMutationEvent.cpp: Added.
+ * src/WebNode.cpp:
+ (WebKit::WebNode::isElementNode):
+ (WebKit::WebNode::addDOMEventListener):
+ (WebKit::WebNode::removeDOMEventListener):
+
2010-08-17 Ilya Tikhonovsky <loislo@chromium.org>
Reviewed by Yury Semikhatsky.
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index b517e28..c189f59 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': '55695',
+ 'chromium_rev': '57298',
}
deps = {
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index d12bee7..9443d8e 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -119,6 +119,9 @@
'public/WebApplicationCacheHostClient.h',
'public/WebAttribute.h',
'public/WebBindings.h',
+ 'public/WebBlobData.h',
+ 'public/WebBlobRegistry.h',
+ 'public/WebBlobStorageData.h',
'public/WebCache.h',
'public/WebCanvas.h',
'public/WebClipboard.h',
@@ -134,6 +137,10 @@
'public/WebCrossOriginPreflightResultCache.h',
'public/WebCString.h',
'public/WebCursorInfo.h',
+ 'public/WebDOMEvent.h',
+ 'public/WebDOMEventListener.h',
+ 'public/WebDOMMouseEvent.h',
+ 'public/WebDOMMutationEvent.h',
'public/WebDOMStringList.h',
'public/WebData.h',
'public/WebDatabase.h',
@@ -152,12 +159,13 @@
'public/WebDragData.h',
'public/WebEditingAction.h',
'public/WebElement.h',
- 'public/WebEvent.h',
- 'public/WebEventListener.h',
'public/WebFileChooserCompletion.h',
'public/WebFileChooserParams.h',
+ 'public/WebFileError.h',
'public/WebFileInfo.h',
'public/WebFileSystem.h',
+ 'public/WebFileSystemCallbacks.h',
+ 'public/WebFileSystemEntry.h',
'public/WebFileUtilities.h',
'public/WebFindOptions.h',
'public/WebFloatPoint.h',
@@ -189,6 +197,8 @@
'public/WebIDBKey.h',
'public/WebIDBKeyPath.h',
'public/WebIDBObjectStore.h',
+ 'public/WebIDBTransaction.h',
+ 'public/WebIDBTransactionCallbacks.h',
'public/WebInputElement.h',
'public/WebInputEvent.h',
'public/WebKit.h',
@@ -203,7 +213,6 @@
'public/WebMessagePortChannel.h',
'public/WebMessagePortChannelClient.h',
'public/WebMimeRegistry.h',
- 'public/WebMutationEvent.h',
'public/WebNamedNodeMap.h',
'public/WebNavigationType.h',
'public/WebNode.h',
@@ -287,6 +296,8 @@
'src/AutoFillPopupMenuClient.h',
'src/BackForwardListClientImpl.cpp',
'src/BackForwardListClientImpl.h',
+ 'src/BlobRegistryProxy.cpp',
+ 'src/BlobRegistryProxy.h',
'src/BoundObject.cpp',
'src/BoundObject.h',
'src/ChromeClientImpl.cpp',
@@ -338,6 +349,10 @@
'src/IDBIndexBackendProxy.h',
'src/IDBObjectStoreProxy.cpp',
'src/IDBObjectStoreProxy.h',
+ 'src/IDBTransactionBackendProxy.cpp',
+ 'src/IDBTransactionBackendProxy.h',
+ 'src/IDBTransactionCallbacksProxy.cpp',
+ 'src/IDBTransactionCallbacksProxy.h',
'src/InspectorClientImpl.cpp',
'src/InspectorClientImpl.h',
'src/InspectorFrontendClientImpl.cpp',
@@ -367,6 +382,8 @@
'src/StorageNamespaceProxy.cpp',
'src/StorageNamespaceProxy.h',
'src/TemporaryGlue.h',
+ 'src/VideoFrameChromiumImpl.cpp',
+ 'src/VideoFrameChromiumImpl.h',
'src/WebAccessibilityCache.cpp',
'src/WebAccessibilityCacheImpl.cpp',
'src/WebAccessibilityCacheImpl.h',
@@ -375,12 +392,20 @@
'src/WebAnimationControllerImpl.h',
'src/WebAttribute.cpp',
'src/WebBindings.cpp',
+ 'src/WebBlobData.cpp',
+ 'src/WebBlobStorageData.cpp',
'src/WebCache.cpp',
'src/WebColor.cpp',
'src/WebCommon.cpp',
'src/WebCrossOriginPreflightResultCache.cpp',
'src/WebCString.cpp',
'src/WebCursorInfo.cpp',
+ 'src/WebDOMEvent.cpp',
+ 'src/WebDOMEventListener.cpp',
+ 'src/WebDOMEventListenerPrivate.cpp',
+ 'src/WebDOMEventListenerPrivate.h',
+ 'src/WebDOMMouseEvent.cpp',
+ 'src/WebDOMMutationEvent.cpp',
'src/WebDOMStringList.cpp',
'src/WebData.cpp',
'src/WebDatabase.cpp',
@@ -399,12 +424,10 @@
'src/WebElement.cpp',
'src/WebEntities.cpp',
'src/WebEntities.h',
- 'src/WebEvent.cpp',
- 'src/WebEventListener.cpp',
- 'src/WebEventListenerPrivate.cpp',
- 'src/WebEventListenerPrivate.h',
'src/WebFileChooserCompletionImpl.cpp',
'src/WebFileChooserCompletionImpl.h',
+ 'src/WebFileSystemCallbacksImpl.cpp',
+ 'src/WebFileSystemCallbacksImpl.h',
'src/WebFontCache.cpp',
'src/WebFontDescription.cpp',
'src/WebFontImpl.cpp',
@@ -438,6 +461,10 @@
'src/WebIDBKeyRange.cpp',
'src/WebIDBObjectStoreImpl.cpp',
'src/WebIDBObjectStoreImpl.h',
+ 'src/WebIDBTransactionImpl.cpp',
+ 'src/WebIDBTransactionImpl.h',
+ 'src/WebIDBTransactionCallbacksImpl.cpp',
+ 'src/WebIDBTransactionCallbacksImpl.h',
'src/WebImageCG.cpp',
'src/WebImageDecoder.cpp',
'src/WebImageSkia.cpp',
@@ -450,7 +477,6 @@
'src/WebMediaElement.cpp',
'src/WebMediaPlayerClientImpl.cpp',
'src/WebMediaPlayerClientImpl.h',
- 'src/WebMutationEvent.cpp',
'src/WebNamedNodeMap.cpp',
'src/WebNode.cpp',
'src/WebNodeCollection.cpp',
@@ -666,7 +692,10 @@
{
'target_name': 'concatenated_devtools_js',
'type': 'none',
- 'dependencies': ['devtools_html'],
+ 'dependencies': [
+ 'devtools_html',
+ '../../WebCore/WebCore.gyp/WebCore.gyp:inspector_protocol_sources'
+ ],
'sources': ['<(PRODUCT_DIR)/resources/inspector/DevTools.js'],
'actions': [{
'action_name': 'concatenate_devtools_js',
@@ -707,6 +736,7 @@
'<(chromium_src_dir)/base/base.gyp:base_i18n',
'<(chromium_src_dir)/base/base.gyp:test_support_base',
'<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
+ '<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
],
'include_dirs': [
'public',
@@ -719,16 +749,16 @@
'tests/KeyboardTest.cpp',
'tests/KURLTest.cpp',
'tests/RunAllTests.cpp',
- # FIXME: This test is compile failing on mac.
- # 'tests/TilingDataTest.cpp',
+ 'tests/TilingDataTest.cpp',
],
'conditions': [
['OS=="win"', {
'sources': [
- # FIXME: Port PopupMenuTest to Linux and Mac.
+ # FIXME: Port PopupMenuTest and WebFrameTest to Linux and Mac.
'tests/PopupMenuTest.cpp',
'tests/TransparencyWinTest.cpp',
'tests/UniscribeHelperTest.cpp',
+ 'tests/WebFrameTest.cpp',
],
}],
['OS=="mac"', {
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index e3092b3..61e5806 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -94,7 +94,7 @@
}],
],
- 'use_accelerated_compositing%': 0,
+ 'use_accelerated_compositing%': 1,
'enable_svg%': 1,
},
diff --git a/WebKit/chromium/public/WebBlobData.h b/WebKit/chromium/public/WebBlobData.h
new file mode 100644
index 0000000..8c0e1aa
--- /dev/null
+++ b/WebKit/chromium/public/WebBlobData.h
@@ -0,0 +1,102 @@
+/*
+ * 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 WebBlobData_h
+#define WebBlobData_h
+
+#include "WebCString.h"
+#include "WebString.h"
+#include "WebURL.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class BlobData; }
+namespace WTF { template <typename T> class PassOwnPtr; }
+#endif
+
+namespace WebKit {
+
+class WebBlobDataPrivate;
+
+class WebBlobData {
+public:
+ struct Item {
+ enum { TypeData, TypeFile, TypeBlob } type;
+ WebCString data;
+ WebString filePath;
+ WebURL blobURL;
+ long long offset;
+ long long length; // -1 means go to the end of the file/blob.
+ double expectedModificationTime; // 0.0 means that the time is not set.
+ };
+
+ ~WebBlobData() { reset(); }
+
+ WebBlobData() : m_private(0) { }
+
+ WEBKIT_API void initialize();
+ WEBKIT_API void reset();
+
+ bool isNull() const { return !m_private; }
+
+ // Returns the number of items.
+ WEBKIT_API size_t itemCount() 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, 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>&);
+ WebBlobData& operator=(const WTF::PassOwnPtr<WebCore::BlobData>&);
+ operator WTF::PassOwnPtr<WebCore::BlobData>();
+#endif
+
+private:
+#if WEBKIT_IMPLEMENTATION
+ void assign(const WTF::PassOwnPtr<WebCore::BlobData>&);
+#endif
+ WebBlobDataPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebBlobData_h
diff --git a/WebKit/chromium/public/WebBlobRegistry.h b/WebKit/chromium/public/WebBlobRegistry.h
new file mode 100644
index 0000000..cbd9a99
--- /dev/null
+++ b/WebKit/chromium/public/WebBlobRegistry.h
@@ -0,0 +1,58 @@
+/*
+ * 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 WebBlobRegistry_h
+#define WebBlobRegistry_h
+
+#include "WebBlobStorageData.h"
+
+namespace WebKit {
+
+class WebBlobData;
+class WebURL;
+
+class WebBlobRegistry {
+public:
+ WEBKIT_API static WebBlobRegistry* create();
+
+ virtual ~WebBlobRegistry() { }
+
+ // Registers a blob URL referring to the specified blob data.
+ virtual void registerBlobURL(const WebURL&, WebBlobData&) = 0;
+
+ // Registers a blob URL referring to the blob data identified by the specified srcURL.
+ virtual void registerBlobURL(const WebURL&, const WebURL& srcURL) = 0;
+
+ virtual void unregisterBlobURL(const WebURL&) = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebBlobRegistry_h
diff --git a/WebKit/chromium/public/WebBlobStorageData.h b/WebKit/chromium/public/WebBlobStorageData.h
new file mode 100644
index 0000000..a9c0c8b
--- /dev/null
+++ b/WebKit/chromium/public/WebBlobStorageData.h
@@ -0,0 +1,83 @@
+/*
+ * 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 WebBlobStorageData_h
+#define WebBlobStorageData_h
+
+#include "WebBlobData.h"
+#include "WebData.h"
+#include "WebFileInfo.h"
+#include "WebString.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class BlobStorageData; }
+namespace WTF { template <typename T> class PassRefPtr; }
+#endif
+
+namespace WebKit {
+
+class WebBlobStorageDataPrivate;
+
+class WebBlobStorageData {
+public:
+ ~WebBlobStorageData() { reset(); }
+
+ WebBlobStorageData() : m_private(0) { }
+
+ WEBKIT_API void reset();
+
+ bool isNull() const { return !m_private; }
+
+ // Returns the number of items.
+ WEBKIT_API size_t itemCount() 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;
+
+#if WEBKIT_IMPLEMENTATION
+ WebBlobStorageData(const WTF::PassRefPtr<WebCore::BlobStorageData>&);
+ WebBlobStorageData& operator=(const WTF::PassRefPtr<WebCore::BlobStorageData>&);
+ operator WTF::PassRefPtr<WebCore::BlobStorageData>() const;
+#endif
+
+private:
+#if WEBKIT_IMPLEMENTATION
+ void assign(const WTF::PassRefPtr<WebCore::BlobStorageData>&);
+#endif
+ WebBlobStorageDataPrivate* m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebBlobStorageData_h
diff --git a/WebKit/chromium/public/WebEvent.h b/WebKit/chromium/public/WebDOMEvent.h
index b0964d1..d34c8d4 100644
--- a/WebKit/chromium/public/WebEvent.h
+++ b/WebKit/chromium/public/WebDOMEvent.h
@@ -28,8 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebEvent_h
-#define WebEvent_h
+#ifndef WebDOMEvent_h
+#define WebDOMEvent_h
#include "WebCommon.h"
#include "WebNode.h"
@@ -42,7 +42,7 @@ namespace WTF { template <typename T> class PassRefPtr; }
namespace WebKit {
-class WebEvent {
+class WebDOMEvent {
public:
enum PhaseType {
CapturingPhase = 1,
@@ -50,16 +50,16 @@ public:
BubblingPhase = 3
};
- WebEvent() : m_private(0) { }
- WebEvent(const WebEvent& e) : m_private(0) { assign(e); }
- WebEvent& operator=(const WebEvent& e)
+ WebDOMEvent() : m_private(0) { }
+ WebDOMEvent(const WebDOMEvent& e) : m_private(0) { assign(e); }
+ WebDOMEvent& operator=(const WebDOMEvent& e)
{
assign(e);
return *this;
}
WEBKIT_API void reset();
- WEBKIT_API void assign(const WebEvent&);
+ WEBKIT_API void assign(const WebDOMEvent&);
bool isNull() const { return !m_private; }
@@ -92,13 +92,27 @@ public:
WEBKIT_API bool isBeforeLoadEvent() const;
#if WEBKIT_IMPLEMENTATION
- WebEvent(const WTF::PassRefPtr<WebCore::Event>&);
+ WebDOMEvent(const WTF::PassRefPtr<WebCore::Event>&);
#endif
+ template<typename T> T to()
+ {
+ T res;
+ res.WebDOMEvent::assign(*this);
+ return res;
+ }
+
+ template<typename T> const T toConst() const
+ {
+ T res;
+ res.WebDOMEvent::assign(*this);
+ return res;
+ }
+
protected:
- typedef WebCore::Event WebEventPrivate;
- void assign(WebEventPrivate*);
- WebEventPrivate* m_private;
+ typedef WebCore::Event WebDOMEventPrivate;
+ void assign(WebDOMEventPrivate*);
+ WebDOMEventPrivate* m_private;
template<typename T> T* unwrap()
{
diff --git a/WebKit/chromium/public/WebEventListener.h b/WebKit/chromium/public/WebDOMEventListener.h
index 62ca0de..4b32b93 100644
--- a/WebKit/chromium/public/WebEventListener.h
+++ b/WebKit/chromium/public/WebDOMEventListener.h
@@ -28,8 +28,8 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef WebEventListener_h
-#define WebEventListener_h
+#ifndef WebDOMEventListener_h
+#define WebDOMEventListener_h
#include "WebCommon.h"
@@ -40,18 +40,18 @@ namespace WebCore { class Node; }
namespace WebKit {
class EventListenerWrapper;
-class WebEvent;
-class WebEventListenerPrivate;
+class WebDOMEvent;
+class WebDOMEventListenerPrivate;
class WebNode;
class WebString;
-class WebEventListener {
+class WebDOMEventListener {
public:
- WEBKIT_API WebEventListener();
- WEBKIT_API virtual ~WebEventListener();
+ WEBKIT_API WebDOMEventListener();
+ WEBKIT_API virtual ~WebDOMEventListener();
// Called when an event is received.
- virtual void handleEvent(const WebEvent&) = 0;
+ virtual void handleEvent(const WebDOMEvent&) = 0;
#if WEBKIT_IMPLEMENTATION
void notifyEventListenerDeleted(EventListenerWrapper*);
@@ -60,7 +60,7 @@ public:
#endif
private:
- WebEventListenerPrivate* m_private;
+ WebDOMEventListenerPrivate* m_private;
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebDOMMouseEvent.h b/WebKit/chromium/public/WebDOMMouseEvent.h
new file mode 100644
index 0000000..4c38b56
--- /dev/null
+++ b/WebKit/chromium/public/WebDOMMouseEvent.h
@@ -0,0 +1,62 @@
+/*
+ * 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 WebDOMMouseEvent_h
+#define WebDOMMouseEvent_h
+
+#include "WebDOMEvent.h"
+
+#if WEBKIT_IMPLEMENTATION
+namespace WebCore { class Event; }
+#endif
+
+namespace WebKit {
+
+class WebDOMMouseEvent : public WebDOMEvent {
+public:
+ WEBKIT_API int screenX() const;
+ WEBKIT_API int screenY() const;
+ WEBKIT_API int clientX() const;
+ WEBKIT_API int clientY() const;
+ WEBKIT_API int layerX() const;
+ WEBKIT_API int layerY() const;
+ WEBKIT_API int offsetX() const;
+ WEBKIT_API int offsetY() const;
+ WEBKIT_API int pageX() const;
+ WEBKIT_API int pageY() const;
+ WEBKIT_API int x() const;
+ WEBKIT_API int y() const;
+
+ WEBKIT_API int button() const;
+ WEBKIT_API bool buttonDown() const;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebMutationEvent.h b/WebKit/chromium/public/WebDOMMutationEvent.h
index 75eb9c4..471331f 100644
--- a/WebKit/chromium/public/WebMutationEvent.h
+++ b/WebKit/chromium/public/WebDOMMutationEvent.h
@@ -27,10 +27,10 @@
* (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 WebMutationEvent_h
-#define WebMutationEvent_h
+#ifndef WebDOMMutationEvent_h
+#define WebDOMMutationEvent_h
-#include "WebEvent.h"
+#include "WebDOMEvent.h"
#if WEBKIT_IMPLEMENTATION
namespace WebCore { class Event; }
@@ -38,7 +38,7 @@ namespace WebCore { class Event; }
namespace WebKit {
-class WebMutationEvent : public WebEvent {
+class WebDOMMutationEvent : public WebDOMEvent {
public:
enum AttrChangeType {
Modification = 1,
diff --git a/WebKit/chromium/public/WebDevToolsAgent.h b/WebKit/chromium/public/WebDevToolsAgent.h
index a355a0f..6b4d237 100644
--- a/WebKit/chromium/public/WebDevToolsAgent.h
+++ b/WebKit/chromium/public/WebDevToolsAgent.h
@@ -59,7 +59,6 @@ public:
virtual void inspectElementAt(const WebPoint&) = 0;
- virtual void setRuntimeFeatureEnabled(const WebString& feature, bool enabled) = 0;
virtual void setRuntimeProperty(const WebString& name, const WebString& value) = 0;
// Exposed for LayoutTestController.
diff --git a/WebKit/chromium/public/WebDevToolsAgentClient.h b/WebKit/chromium/public/WebDevToolsAgentClient.h
index 386bd08..087ac0b 100644
--- a/WebKit/chromium/public/WebDevToolsAgentClient.h
+++ b/WebKit/chromium/public/WebDevToolsAgentClient.h
@@ -53,7 +53,6 @@ public:
// Notifies host upon runtime feature being enabled/disabled.
virtual void runtimePropertyChanged(const WebString& name, const WebString& value) { }
- virtual WebCString injectedScriptSource() { return WebCString(); }
virtual WebCString debuggerScriptSource() { return WebCString(); }
class WebKitClientMessageLoop {
diff --git a/WebKit/chromium/public/WebFileError.h b/WebKit/chromium/public/WebFileError.h
new file mode 100644
index 0000000..cfe8882
--- /dev/null
+++ b/WebKit/chromium/public/WebFileError.h
@@ -0,0 +1,50 @@
+/*
+ * 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 WebFileError_h
+#define WebFileError_h
+
+namespace WebKit {
+
+// File-related error code defined in HTML5 File API.
+enum WebFileError {
+ WebFileErrorNoModificationAllowed = 7,
+ WebFileErrorNotFound = 8,
+ WebFileErrorInvalidState = 11,
+ WebFileErrorInvalidModification = 13,
+ WebFileErrorSecurity = 18,
+ WebFileErrorAbort = 20,
+ WebFileErrorQuotaExceeded = 22,
+ WebFileErrorNotReadable = 24,
+ WebFileErrorEncoding = 26,
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFileSystem.h b/WebKit/chromium/public/WebFileSystem.h
index a91106e..641c169 100644
--- a/WebKit/chromium/public/WebFileSystem.h
+++ b/WebKit/chromium/public/WebFileSystem.h
@@ -31,12 +31,77 @@
#ifndef WebFileSystem_h
#define WebFileSystem_h
-#include "WebFileUtilities.h"
+#include "WebCommon.h"
+#include "WebString.h"
namespace WebKit {
-// FIXME: Clean up this class once the renaming to WebFileUtilities is done.
-class WebFileSystem : public WebFileUtilities {
+class WebFileSystemCallbacks;
+
+class WebFileSystem {
+public:
+ enum Type {
+ TypeTemporary,
+ TypePersistent,
+ };
+
+ // Moves a file or directory at |srcPath| to |destPath|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void move(const WebString& srcPath, const WebString& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Copies a file or directory at |srcPath| to |destPath|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void copy(const WebString& srcPath, const WebString& destPath, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Deletes a file or directory at a given |path|.
+ // 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(); }
+
+ // 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.
+ virtual void readMetadata(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Creates a file at given |path|.
+ // If the |path| doesn't exist, it creates a new file at |path|.
+ // If |exclusive| is true, it fails if the |path| already exists.
+ // If |exclusive| is false, it succeeds if the |path| already exists or
+ // it has successfully created a new file at |path|.
+ //
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void createFile(const WebString& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Creates a directory at a given |path|.
+ // If the |path| doesn't exist, it creates a new directory at |path|.
+ // If |exclusive| is true, it fails if the |path| already exists.
+ // If |exclusive| is false, it succeeds if the |path| already exists or it has successfully created a new directory at |path|.
+ //
+ // WebFileSystemCallbacks::didSucceed() must be called when
+ // the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void createDirectory(const WebString& path, bool exclusive, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Checks if a file exists at a given |path|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void fileExists(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Checks if a directory exists at a given |path|.
+ // WebFileSystemCallbacks::didSucceed() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void directoryExists(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // Reads directory entries of a given directory at |path|.
+ // WebFileSystemCallbacks::didReadDirectory() must be called when the operation is completed successfully.
+ // WebFileSystemCallbacks::didFail() must be called otherwise.
+ virtual void readDirectory(const WebString& path, WebFileSystemCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+protected:
+ virtual ~WebFileSystem() { }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebFileSystemCallbacks.h b/WebKit/chromium/public/WebFileSystemCallbacks.h
new file mode 100644
index 0000000..fa7ebbe
--- /dev/null
+++ b/WebKit/chromium/public/WebFileSystemCallbacks.h
@@ -0,0 +1,73 @@
+/*
+ * 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 WebFileSystemCallbacks_h
+#define WebFileSystemCallbacks_h
+
+#include "WebFileError.h"
+#include "WebFileSystemEntry.h"
+#include "WebVector.h"
+
+namespace WebKit {
+
+class WebString;
+struct WebFileInfo;
+
+class WebFileSystemCallbacks {
+public:
+ // Callback for WebFileSystem's various operations that don't require
+ // return values.
+ virtual void didSucceed() = 0;
+
+ // Callback for WebFileSystem::readMetadata. Called with the file metadata
+ // for the requested path.
+ virtual void didReadMetadata(const WebFileInfo&) = 0;
+
+ // Callback for WebFileSystem::readDirectory. Called with a vector of
+ // file entries in the requested directory. This callback might be called
+ // multiple times if the directory has many entries. |hasMore| must be
+ // true when there are more entries.
+ virtual void didReadDirectory(const WebVector<WebFileSystemEntry>&, bool hasMore) = 0;
+
+ // Callback for WebFrameClient::openFileSystem. Called with a name and
+ // root path for the FileSystem when the request is accepted.
+ virtual void didOpenFileSystem(const WebString& name, const WebString& rootPath) = 0;
+
+ // Called with an error code when a requested operation hasn't been
+ // completed.
+ virtual void didFail(WebFileError) = 0;
+
+protected:
+ virtual ~WebFileSystemCallbacks() {}
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebFileSystemEntry.h b/WebKit/chromium/public/WebFileSystemEntry.h
new file mode 100644
index 0000000..00a5e38
--- /dev/null
+++ b/WebKit/chromium/public/WebFileSystemEntry.h
@@ -0,0 +1,50 @@
+/*
+ * 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 WebFileSystemEntry_h
+#define WebFileSystemEntry_h
+
+#include "WebString.h"
+
+namespace WebKit {
+
+struct WebFileSystemEntry {
+ WebFileSystemEntry() : isDirectory(false) { }
+
+ // The name of the entry.
+ WebString name;
+
+ // This flag indicates if the entry is directory or not.
+ bool isDirectory;
+};
+
+} // namespace WebKit
+
+#endif // WebFileSystemEntry_h
diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h
index 91f0e38..699325d 100644
--- a/WebKit/chromium/public/WebFrameClient.h
+++ b/WebKit/chromium/public/WebFrameClient.h
@@ -32,6 +32,7 @@
#define WebFrameClient_h
#include "WebCommon.h"
+#include "WebFileSystem.h"
#include "WebNavigationPolicy.h"
#include "WebNavigationType.h"
#include "WebURLError.h"
@@ -333,6 +334,19 @@ public:
virtual void reportFindInPageSelection(
int identifier, int activeMatchOrdinal, const WebRect& selection) { }
+ // FileSystem ----------------------------------------------------
+
+ // Requests to open a FileSystem.
+ // |size| indicates how much storage space (in bytes) the caller expects
+ // to need.
+ // 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.
+ virtual void openFileSystem(
+ WebFrame*, WebFileSystem::Type, long long size,
+ WebFileSystemCallbacks*) { }
+
protected:
~WebFrameClient() { }
};
diff --git a/WebKit/chromium/public/WebGraphicsContext3D.h b/WebKit/chromium/public/WebGraphicsContext3D.h
index 4c18076..44a0498 100644
--- a/WebKit/chromium/public/WebGraphicsContext3D.h
+++ b/WebKit/chromium/public/WebGraphicsContext3D.h
@@ -103,6 +103,11 @@ public:
// Query whether it is built on top of compliant GLES2 implementation.
virtual bool isGLES2Compliant() = 0;
+ // Query whether it is built on top of GLES2 NPOT strict implementation.
+ virtual bool isGLES2NPOTStrict() = 0;
+ // Query whether it is built on top of implementation that generates errors
+ // on out-of-bounds buffer accesses.
+ virtual bool isErrorGeneratedOnOutOfBoundsAccesses() = 0;
// Helper for software compositing path. Reads back the frame buffer into
// the memory region pointed to by "pixels" with size "bufferSize". It is
diff --git a/WebKit/chromium/public/WebHTTPBody.h b/WebKit/chromium/public/WebHTTPBody.h
index a7dc7c9..a2bb5cd 100644
--- a/WebKit/chromium/public/WebHTTPBody.h
+++ b/WebKit/chromium/public/WebHTTPBody.h
@@ -35,6 +35,7 @@
#include "WebFileInfo.h"
#include "WebNonCopyable.h"
#include "WebString.h"
+#include "WebURL.h"
#if WEBKIT_IMPLEMENTATION
namespace WebCore { class FormData; }
@@ -48,12 +49,13 @@ class WebHTTPBodyPrivate;
class WebHTTPBody {
public:
struct Element {
- enum { TypeData, TypeFile } type;
+ enum { TypeData, TypeFile, TypeBlob } type;
WebData data;
WebString filePath;
long long fileStart;
long long fileLength; // -1 means to the end of the file.
WebFileInfo fileInfo;
+ WebURL blobURL;
};
~WebHTTPBody() { reset(); }
@@ -84,6 +86,7 @@ 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, const WebFileInfo&);
+ WEBKIT_API void appendBlob(const WebURL&);
// Identifies a particular form submission instance. A value of 0 is
// used to indicate an unspecified identifier.
diff --git a/WebKit/chromium/public/WebIDBDatabase.h b/WebKit/chromium/public/WebIDBDatabase.h
index b0d6086..6e494ce 100644
--- a/WebKit/chromium/public/WebIDBDatabase.h
+++ b/WebKit/chromium/public/WebIDBDatabase.h
@@ -34,6 +34,7 @@ namespace WebKit {
class WebFrame;
class WebIDBCallbacks;
class WebIDBObjectStore;
+class WebIDBTransaction;
// See comment in WebIndexedDatabase for a high level overview of these classes.
class WebIDBDatabase {
@@ -74,6 +75,13 @@ public:
{
WEBKIT_ASSERT_NOT_REACHED();
}
+ // Transfers ownership of the WebIDBTransaction to the caller.
+ virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebIDBFactory.h b/WebKit/chromium/public/WebIDBFactory.h
index 5eb6f58..7c070a2 100755
--- a/WebKit/chromium/public/WebIDBFactory.h
+++ b/WebKit/chromium/public/WebIDBFactory.h
@@ -34,12 +34,12 @@
#include "WebIDBCallbacks.h"
#include "WebSecurityOrigin.h"
#include "WebString.h"
+#include "WebVector.h"
namespace WebKit {
class WebFrame;
class WebIDBDatabase;
-class WebString;
class WebSecurityOrigin;
// The entry point into the IndexedDatabase API. These classes match their Foo and
@@ -63,6 +63,8 @@ public:
{
open(name, description, callbacks, origin, webFrame);
}
+
+ virtual void abortPendingTransactions(const WebVector<int>& pendingIDs) { WEBKIT_ASSERT_NOT_REACHED(); }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebIDBKey.h b/WebKit/chromium/public/WebIDBKey.h
index 32caa10..6aef332 100644
--- a/WebKit/chromium/public/WebIDBKey.h
+++ b/WebKit/chromium/public/WebIDBKey.h
@@ -39,6 +39,8 @@ class WebSerializedScriptValue;
class WebIDBKey {
public:
+ // Please use one of the factory methods. This is public only to allow WebVector.
+ WebIDBKey() { }
~WebIDBKey() { reset(); }
WEBKIT_API static WebIDBKey createNull();
@@ -80,7 +82,6 @@ public:
#endif
private:
- WebIDBKey() { }
WebPrivatePtr<WebCore::IDBKey> m_private;
};
diff --git a/WebKit/chromium/public/WebIDBKeyPath.h b/WebKit/chromium/public/WebIDBKeyPath.h
index d08ec63..db6c363 100644
--- a/WebKit/chromium/public/WebIDBKeyPath.h
+++ b/WebKit/chromium/public/WebIDBKeyPath.h
@@ -40,7 +40,7 @@ class WebString;
class WebIDBKeyPath {
public:
- static WebIDBKeyPath create(const WebString&);
+ WEBKIT_API static WebIDBKeyPath create(const WebString&);
WebIDBKeyPath(const WebIDBKeyPath& keyPath) { assign(keyPath); }
~WebIDBKeyPath() { reset(); }
diff --git a/WebKit/chromium/public/WebIDBTransaction.h b/WebKit/chromium/public/WebIDBTransaction.h
new file mode 100644
index 0000000..0369b89
--- /dev/null
+++ b/WebKit/chromium/public/WebIDBTransaction.h
@@ -0,0 +1,62 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebIDBTransaction_h
+#define WebIDBTransaction_h
+
+#include "WebString.h"
+
+namespace WebKit {
+
+class WebIDBObjectStore;
+class WebIDBTransactionCallbacks;
+
+// See comment in WebIndexedDatabase for a high level overview of these classes.
+class WebIDBTransaction {
+public:
+ virtual ~WebIDBTransaction() { }
+
+ virtual int mode() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+ virtual WebIDBObjectStore* objectStore(const WebString& name)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+ virtual void abort() { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual int id() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+ virtual void setCallbacks(WebIDBTransactionCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+};
+
+} // namespace WebKit
+
+#endif // WebIDBTransaction_h
diff --git a/WebKit/chromium/public/WebIDBTransactionCallbacks.h b/WebKit/chromium/public/WebIDBTransactionCallbacks.h
new file mode 100644
index 0000000..4b92217
--- /dev/null
+++ b/WebKit/chromium/public/WebIDBTransactionCallbacks.h
@@ -0,0 +1,46 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebIDBTransactionCallbacks_h
+#define WebIDBTransactionCallbacks_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+class WebIDBTransactionCallbacks {
+public:
+ virtual ~WebIDBTransactionCallbacks() { }
+
+ virtual void onAbort() { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual int id() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+};
+
+} // namespace WebKit
+
+#endif // WebIDBTransactionCallbacks_h
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index 4104175..9c0b4c2 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -33,9 +33,9 @@
#include "WebCommon.h"
#include "WebData.h"
-#include "WebFileSystem.h"
#include "WebLocalizedString.h"
#include "WebString.h"
+#include "WebVector.h"
#include "WebURL.h"
#include <time.h>
@@ -48,16 +48,20 @@ namespace WebKit {
class WebApplicationCacheHost;
class WebApplicationCacheHostClient;
+class WebBlobRegistry;
class WebClipboard;
class WebCookieJar;
+class WebFileSystem;
class WebFileUtilities;
class WebGLES2Context;
class WebGraphicsContext3D;
class WebIDBFactory;
+class WebIDBKey;
class WebMessagePortChannel;
class WebMimeRegistry;
class WebPluginListBuilder;
class WebSandboxSupport;
+class WebSerializedScriptValue;
class WebSharedWorkerRepository;
class WebSocketStreamHandle;
class WebStorageNamespace;
@@ -73,12 +77,7 @@ public:
virtual WebMimeRegistry* mimeRegistry() { return 0; }
// Must return non-null.
- // FIXME: Clean up this one once the renaming to WebFileUtilities is done.
- virtual WebFileSystem* fileSystem() { return 0; }
-
- // Must return non-null.
- // FIXME: Clean up this one once the renaming from WebFileSystem is done.
- virtual WebFileUtilities* fileUtilities() { return fileSystem(); }
+ virtual WebFileUtilities* fileUtilities() { return 0; }
// May return null if sandbox support is not necessary
virtual WebSandboxSupport* sandboxSupport() { return 0; }
@@ -89,6 +88,11 @@ public:
// May return null.
virtual WebCookieJar* cookieJar() { return 0; }
+ // Blob ----------------------------------------------------------------
+
+ // Must return non-null.
+ virtual WebBlobRegistry* blobRegistry() { return 0; }
+
// DOM Storage --------------------------------------------------
// Return a LocalStorage namespace that corresponds to the following path.
@@ -138,6 +142,7 @@ public:
// Indexed Database ----------------------------------------------------
virtual WebIDBFactory* idbFactory() { return 0; }
+ virtual void createIDBKeysFromSerializedValuesAndKeyPath(const WebVector<WebSerializedScriptValue>& values, const WebString& keyPath, WebVector<WebIDBKey>& keys) { }
// Keygen --------------------------------------------------------------
@@ -268,6 +273,11 @@ public:
// May return null if it fails to create the context.
virtual WebGLES2Context* createGLES2Context() { return 0; }
+ // FileSystem ----------------------------------------------------------
+
+ // Must return non-null.
+ virtual WebFileSystem* fileSystem() { return 0; }
+
protected:
~WebKitClient() { }
};
diff --git a/WebKit/chromium/public/WebMediaPlayer.h b/WebKit/chromium/public/WebMediaPlayer.h
index 6f51345..6cec0f5 100644
--- a/WebKit/chromium/public/WebMediaPlayer.h
+++ b/WebKit/chromium/public/WebMediaPlayer.h
@@ -33,6 +33,7 @@
#include "WebCanvas.h"
#include "WebVector.h"
+#include "WebVideoFrame.h"
namespace WebKit {
@@ -127,6 +128,18 @@ public:
virtual bool hasSingleSecurityOrigin() const = 0;
virtual MovieLoadType movieLoadType() const = 0;
+
+ // This function returns a pointer to a WebVideoFrame, which is
+ // a WebKit wrapper for a video frame in chromium. This places a lock
+ // on the frame in chromium, and calls to this method should always be
+ // followed with a call to putCurrentFrame(). The ownership of this object
+ // is not transferred to the caller, and the caller should not free the
+ // returned object.
+ virtual WebVideoFrame* getCurrentFrame() { return 0; }
+ // This function releases the lock on the current video frame in Chromium.
+ // It should always be called after getCurrentFrame(). Frame passed to this
+ // method should no longer be referenced after the call is made.
+ virtual void putCurrentFrame(WebVideoFrame*) { }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebNode.h b/WebKit/chromium/public/WebNode.h
index fb0a99e..f54ff04 100644
--- a/WebKit/chromium/public/WebNode.h
+++ b/WebKit/chromium/public/WebNode.h
@@ -38,9 +38,9 @@
namespace WebCore { class Node; }
namespace WebKit {
+class WebDOMEventListener;
+class WebDOMEventListenerPrivate;
class WebDocument;
-class WebEventListener;
-class WebEventListenerPrivate;
class WebFrame;
class WebNodeList;
@@ -97,8 +97,8 @@ public:
WEBKIT_API WebString createMarkup() const;
WEBKIT_API bool isTextNode() const;
WEBKIT_API bool isElementNode() const;
- WEBKIT_API void addEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture);
- WEBKIT_API void removeEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture);
+ WEBKIT_API void addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture);
+ WEBKIT_API void removeEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture);
WEBKIT_API void simulateClick();
WEBKIT_API WebNodeList getElementsByTagName(const WebString&) const;
diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h
index 90b8553..0bef045 100644
--- a/WebKit/chromium/public/WebSettings.h
+++ b/WebKit/chromium/public/WebSettings.h
@@ -92,7 +92,6 @@ public:
virtual void setEditingBehavior(EditingBehavior) = 0;
virtual void setAcceleratedCompositingEnabled(bool) = 0;
virtual void setAccelerated2dCanvasEnabled(bool) = 0;
- virtual void setHTML5ParserEnabled(bool) = 0;
virtual void setMemoryInfoEnabled(bool) = 0;
protected:
diff --git a/WebKit/chromium/public/WebSpeechInputController.h b/WebKit/chromium/public/WebSpeechInputController.h
index b85fde6..0315722 100644
--- a/WebKit/chromium/public/WebSpeechInputController.h
+++ b/WebKit/chromium/public/WebSpeechInputController.h
@@ -35,18 +35,20 @@
namespace WebKit {
+struct WebRect;
+
// Provides an embedder API called by WebKit.
class WebSpeechInputController {
public:
// Starts speech recognition. Speech will get recorded until the endpointer detects silence,
// runs to the limit or stopRecording is called. Progress indications and the recognized
// text are returned via the listener interface.
- virtual bool startRecognition(int)
+ virtual bool startRecognition(int requestId, const WebRect&)
{
- return startRecognition();
+ return startRecognition(requestId);
}
// FIXME: Remove this once chromium has picked up this change.
- virtual bool startRecognition()
+ virtual bool startRecognition(int)
{
WEBKIT_ASSERT_NOT_REACHED();
return false;
@@ -54,18 +56,14 @@ public:
// Cancels an ongoing recognition and discards any audio recorded so far. No partial
// recognition results are returned to the listener.
- virtual void cancelRecognition(int) { cancelRecognition(); }
- // FIXME: Remove this once chromium has picked up this change.
- virtual void cancelRecognition() { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void cancelRecognition(int) { WEBKIT_ASSERT_NOT_REACHED(); }
// Stops audio recording and performs recognition with the audio recorded until now
// (does not discard audio). This is an optional call and is typically invoked if the user
// wants to stop recording audio as soon as they finished speaking. Otherwise, the speech
// recording 'endpointer' should detect silence in the input and stop recording automatically.
// Call startRecognition() to record audio and recognize speech again.
- virtual void stopRecording(int) { stopRecording(); }
- // FIXME: Remove this once chromium has picked up this change.
- virtual void stopRecording() { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void stopRecording(int) { WEBKIT_ASSERT_NOT_REACHED(); }
protected:
virtual ~WebSpeechInputController() { }
diff --git a/WebKit/chromium/public/WebSpeechInputListener.h b/WebKit/chromium/public/WebSpeechInputListener.h
index e779c3a..6dc3d49 100644
--- a/WebKit/chromium/public/WebSpeechInputListener.h
+++ b/WebKit/chromium/public/WebSpeechInputListener.h
@@ -48,33 +48,18 @@ public:
// Typically after this call the listener would update the UI to reflect that recognition is
// in progress.
virtual void didCompleteRecording(int) = 0;
- // FIXME: Remove this once chromium has picked up this change.
- virtual void didCompleteRecording()
- {
- didCompleteRecording(1);
- }
// Gives results from speech recognition, either partial or the final results.
// This method can potentially get called multiple times if there are partial results
// available as the user keeps speaking. If the speech could not be recognized properly
// or if there was any other errors in the process, this method may never be called.
virtual void setRecognitionResult(int, const WebString&) = 0;
- // FIXME: Remove this once chromium has picked up this change.
- virtual void setRecognitionResult(const WebString& result)
- {
- setRecognitionResult(1, result);
- }
// Informs that speech recognition has completed. This gets invoked irrespective of whether
// recognition was succesful or not, whether setRecognitionResult() was invoked or not. The
// handler typically frees up any temporary resources allocated and waits for the next speech
// recognition request.
virtual void didCompleteRecognition(int) = 0;
- // FIXME: Remove this once chromium has picked up this change.
- virtual void didCompleteRecognition()
- {
- didCompleteRecognition(1);
- }
protected:
~WebSpeechInputListener() { }
diff --git a/WebKit/chromium/public/WebVideoFrame.h b/WebKit/chromium/public/WebVideoFrame.h
new file mode 100644
index 0000000..5e34f2a
--- /dev/null
+++ b/WebKit/chromium/public/WebVideoFrame.h
@@ -0,0 +1,73 @@
+/*
+ * 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 WebVideoFrame_h
+#define WebVideoFrame_h
+
+namespace WebKit {
+
+// A proxy video frame interface to communicate frame data between chromium
+// and WebKit.
+class WebVideoFrame {
+public:
+ enum Format {
+ FormatInvalid,
+ FormatRGB555,
+ FormatRGB565,
+ FormatRGB24,
+ FormatRGB32,
+ FormatRGBA,
+ FormatYV12,
+ FormatYV16,
+ FormatNV12,
+ FormatEmpty,
+ FormatASCII,
+ };
+
+ enum SurfaceType {
+ SurfaceTypeSystemMemory,
+ SurfaceTypeOMXBufferHead,
+ SurfaceTypeEGLImage,
+ SurfaceTypeMFBuffer,
+ SurfaceTypeDirect3DSurface
+ };
+
+ virtual SurfaceType surfaceType() const = 0;
+ virtual Format format() const = 0;
+ virtual unsigned width() const = 0;
+ virtual unsigned height() const = 0;
+ virtual unsigned planes() const = 0;
+ virtual int stride(unsigned plane) const = 0;
+ virtual const void* data(unsigned plane) const = 0;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index b93d4bb..a117fc2 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -48,6 +48,7 @@
#include "TextAffinity.h"
#include "UserContentTypes.h"
#include "UserScriptTypes.h"
+#include "VideoFrameChromium.h"
#include "WebAccessibilityObject.h"
#include "WebApplicationCacheHost.h"
#include "WebClipboard.h"
@@ -62,6 +63,7 @@
#include "WebSettings.h"
#include "WebTextAffinity.h"
#include "WebTextCaseSensitivity.h"
+#include "WebVideoFrame.h"
#include "WebView.h"
#include <wtf/Assertions.h>
#include <wtf/text/StringImpl.h>
@@ -327,6 +329,24 @@ COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Unknown, MediaPlayer::Unknown);
COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::Download, MediaPlayer::Download);
COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::StoredStream, MediaPlayer::StoredStream);
COMPILE_ASSERT_MATCHING_ENUM(WebMediaPlayer::LiveStream, MediaPlayer::LiveStream);
+
+COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatInvalid, VideoFrameChromium::Invalid);
+COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGB555, VideoFrameChromium::RGB555);
+COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGB565, VideoFrameChromium::RGB565);
+COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGB24, VideoFrameChromium::RGB24);
+COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGB32, VideoFrameChromium::RGB32);
+COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatRGBA, VideoFrameChromium::RGBA);
+COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatYV12, VideoFrameChromium::YV12);
+COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatYV16, VideoFrameChromium::YV16);
+COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatNV12, VideoFrameChromium::NV12);
+COMPILE_ASSERT_MATCHING_ENUM(WebVideoFrame::FormatEmpty, VideoFrameChromium::Empty);
+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);
#endif
#if ENABLE(NOTIFICATIONS)
@@ -360,5 +380,3 @@ COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInTopFrameOnly, InjectInT
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NullType, IDBKey::NullType);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::StringType, IDBKey::StringType);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NumberType, IDBKey::NumberType);
-
-
diff --git a/WebKit/chromium/src/BlobRegistryProxy.cpp b/WebKit/chromium/src/BlobRegistryProxy.cpp
new file mode 100644
index 0000000..84fcb4d
--- /dev/null
+++ b/WebKit/chromium/src/BlobRegistryProxy.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"
+
+#if ENABLE(BLOB)
+
+#include "BlobRegistryProxy.h"
+
+#include "BlobData.h"
+#include "KURL.h"
+#include "ResourceHandle.h"
+#include "WebBlobData.h"
+#include "WebBlobRegistry.h"
+#include "WebKit.h"
+#include "WebKitClient.h"
+#include "WebURL.h"
+#include <wtf/MainThread.h>
+#include <wtf/StdLibExtras.h>
+
+// We are part of the WebKit implementation.
+using namespace WebKit;
+
+namespace WebCore {
+
+BlobRegistry& blobRegistry()
+{
+ ASSERT(isMainThread());
+ DEFINE_STATIC_LOCAL(BlobRegistryProxy, instance, ());
+ return instance;
+}
+
+BlobRegistryProxy::BlobRegistryProxy()
+ : m_webBlobRegistry(WebKit::webKitClient()->blobRegistry())
+{
+}
+
+void BlobRegistryProxy::registerBlobURL(const KURL& url, PassOwnPtr<BlobData> blobData)
+{
+ if (m_webBlobRegistry) {
+ WebBlobData webBlobData(blobData);
+ m_webBlobRegistry->registerBlobURL(url, webBlobData);
+ }
+}
+
+void BlobRegistryProxy::registerBlobURL(const KURL& url, const KURL& srcURL)
+{
+ if (m_webBlobRegistry)
+ m_webBlobRegistry->registerBlobURL(url, srcURL);
+}
+
+void BlobRegistryProxy::unregisterBlobURL(const KURL& url)
+{
+ if (m_webBlobRegistry)
+ m_webBlobRegistry->unregisterBlobURL(url);
+}
+
+} // namespace WebCore
+
+#endif
diff --git a/WebKit/chromium/src/BlobRegistryProxy.h b/WebKit/chromium/src/BlobRegistryProxy.h
new file mode 100644
index 0000000..6f2ebb2
--- /dev/null
+++ b/WebKit/chromium/src/BlobRegistryProxy.h
@@ -0,0 +1,63 @@
+/*
+ * 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 BlobRegistryProxy_h
+#define BlobRegistryProxy_h
+
+#if ENABLE(BLOB)
+
+#include "BlobRegistry.h"
+
+namespace WebKit { class WebBlobRegistry; }
+
+namespace WebCore {
+
+class BlobRegistryProxy : public BlobRegistry {
+public:
+ BlobRegistryProxy();
+
+ virtual void registerBlobURL(const KURL&, PassOwnPtr<BlobData>);
+ virtual void registerBlobURL(const KURL&, const KURL& srcURL);
+ virtual void unregisterBlobURL(const KURL&);
+
+ virtual PassRefPtr<ResourceHandle> createResourceHandle(const ResourceRequest&, ResourceHandleClient*) { return 0; }
+ virtual bool loadResourceSynchronously(const ResourceRequest&, ResourceError&, ResourceResponse&, Vector<char>& data) { return false; }
+
+private:
+ virtual ~BlobRegistryProxy() { }
+
+ WebKit::WebBlobRegistry* m_webBlobRegistry;
+};
+
+} // namespace WebCore
+
+#endif // ENABLE(BLOB)
+
+#endif // BlobRegistryProxy_h
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index 5b18e82..33f405d 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -44,6 +44,7 @@
#include "WebFileUtilities.h"
#include "WebFrameClient.h"
#include "WebFrameImpl.h"
+#include "WebIDBKey.h"
#include "WebImage.h"
#include "WebKit.h"
#include "WebKitClient.h"
@@ -51,6 +52,7 @@
#include "WebPluginContainerImpl.h"
#include "WebPluginListBuilderImpl.h"
#include "WebSandboxSupport.h"
+#include "WebSerializedScriptValue.h"
#include "WebScreenInfo.h"
#include "WebString.h"
#include "WebURL.h"
@@ -500,6 +502,18 @@ PassRefPtr<IDBFactoryBackendInterface> ChromiumBridge::idbFactory()
return IDBFactoryBackendProxy::create();
}
+void ChromiumBridge::createIDBKeysFromSerializedValuesAndKeyPath(const Vector<RefPtr<SerializedScriptValue> >& values, const String& keyPath, Vector<RefPtr<IDBKey> >& keys)
+{
+ WebVector<WebSerializedScriptValue> webValues = values;
+ WebVector<WebIDBKey> webKeys;
+ webKitClient()->createIDBKeysFromSerializedValuesAndKeyPath(webValues, WebString(keyPath), webKeys);
+
+ size_t webKeysSize = webKeys.size();
+ keys.reserveCapacity(webKeysSize);
+ for (size_t i = 0; i < webKeysSize; ++i)
+ keys.append(PassRefPtr<IDBKey>(webKeys[i]));
+}
+
// Keygen ---------------------------------------------------------------------
String ChromiumBridge::signedPublicKeyAndChallengeString(
diff --git a/WebKit/chromium/src/EventListenerWrapper.cpp b/WebKit/chromium/src/EventListenerWrapper.cpp
index f2d2979..706ba21 100644
--- a/WebKit/chromium/src/EventListenerWrapper.cpp
+++ b/WebKit/chromium/src/EventListenerWrapper.cpp
@@ -1,72 +1,72 @@
-/*
- * 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 "EventListenerWrapper.h"
-
-#include "Event.h"
-#include "EventListener.h"
-
-#include "WebEvent.h"
-#include "WebEventListener.h"
-
-namespace WebKit {
-
-EventListenerWrapper::EventListenerWrapper(WebEventListener* webEventListener)
- : EventListener(EventListener::JSEventListenerType)
- , m_webEventListener(webEventListener)
-{
-}
-
-EventListenerWrapper::~EventListenerWrapper()
-{
- if (m_webEventListener)
- m_webEventListener->notifyEventListenerDeleted(this);
-}
-
-bool EventListenerWrapper::operator==(const EventListener& listener)
-{
- return this == &listener;
-}
-
-void EventListenerWrapper::handleEvent(ScriptExecutionContext* context, Event* event)
-{
- if (!m_webEventListener)
- return;
- WebEvent webEvent(event);
- m_webEventListener->handleEvent(webEvent);
-}
-
-void EventListenerWrapper::webEventListenerDeleted()
-{
- m_webEventListener = 0;
-}
-
-} // namespace WebKit
+/*
+ * 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 "EventListenerWrapper.h"
+
+#include "Event.h"
+#include "EventListener.h"
+
+#include "WebDOMEvent.h"
+#include "WebDOMEventListener.h"
+
+namespace WebKit {
+
+EventListenerWrapper::EventListenerWrapper(WebDOMEventListener* webDOMEventListener)
+ : EventListener(EventListener::JSEventListenerType)
+ , m_webDOMEventListener(webDOMEventListener)
+{
+}
+
+EventListenerWrapper::~EventListenerWrapper()
+{
+ if (m_webDOMEventListener)
+ m_webDOMEventListener->notifyEventListenerDeleted(this);
+}
+
+bool EventListenerWrapper::operator==(const EventListener& listener)
+{
+ return this == &listener;
+}
+
+void EventListenerWrapper::handleEvent(ScriptExecutionContext* context, Event* event)
+{
+ if (!m_webDOMEventListener)
+ return;
+ WebDOMEvent webDOMEvent(event);
+ m_webDOMEventListener->handleEvent(webDOMEvent);
+}
+
+void EventListenerWrapper::webDOMEventListenerDeleted()
+{
+ m_webDOMEventListener = 0;
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/EventListenerWrapper.h b/WebKit/chromium/src/EventListenerWrapper.h
index 2a0cbbb..75b6a95 100644
--- a/WebKit/chromium/src/EventListenerWrapper.h
+++ b/WebKit/chromium/src/EventListenerWrapper.h
@@ -1,62 +1,64 @@
-/*
- * 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 EventListenerWrapper_h
-#define EventListenerWrapper_h
-
-#include "EventListener.h"
-
-namespace WebCore {
-class ScriptExecutionContext;
-}
-
-using namespace WebCore;
-
-namespace WebKit {
-
-class WebEventListener;
-
-class EventListenerWrapper : public EventListener {
-public:
- EventListenerWrapper(WebEventListener*);
- ~EventListenerWrapper();
-
- virtual bool operator==(const EventListener&);
- virtual void handleEvent(ScriptExecutionContext*, Event*);
-
- void webEventListenerDeleted();
-
-private:
- WebEventListener* m_webEventListener;
-};
-
-} // namespace WebKit
-
-#endif
+/*
+ * 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 EventListenerWrapper_h
+#define EventListenerWrapper_h
+
+#include "EventListener.h"
+
+namespace WebCore {
+class ScriptExecutionContext;
+}
+
+using namespace WebCore;
+
+namespace WebKit {
+
+class WebDOMEventListener;
+
+// FIXME: Remove the DeprecatedEventListenerWrapper class below once Chromium
+// switched to using WebDOMEvent.
+class EventListenerWrapper : public EventListener {
+public:
+ EventListenerWrapper(WebDOMEventListener*);
+ ~EventListenerWrapper();
+
+ virtual bool operator==(const EventListener&);
+ virtual void handleEvent(ScriptExecutionContext*, Event*);
+
+ void webDOMEventListenerDeleted();
+
+private:
+ WebDOMEventListener* m_webDOMEventListener;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/GraphicsContext3D.cpp b/WebKit/chromium/src/GraphicsContext3D.cpp
index 0f672a3..6bc5ffe 100644
--- a/WebKit/chromium/src/GraphicsContext3D.cpp
+++ b/WebKit/chromium/src/GraphicsContext3D.cpp
@@ -39,14 +39,10 @@
#include "CanvasRenderingContext.h"
#include "Chrome.h"
#include "ChromeClientImpl.h"
-#include "Float32Array.h"
#include "HTMLCanvasElement.h"
#include "HTMLImageElement.h"
#include "ImageBuffer.h"
#include "ImageData.h"
-#include "Int32Array.h"
-#include "Int8Array.h"
-#include "Uint8Array.h"
#include "WebGraphicsContext3D.h"
#include "WebGraphicsContext3DDefaultImpl.h"
#include "WebKit.h"
@@ -110,6 +106,8 @@ public:
CanvasLayerChromium* platformLayer() const;
#endif
bool isGLES2Compliant() const;
+ bool isGLES2NPOTStrict() const;
+ bool isErrorGeneratedOnOutOfBoundsAccesses() const;
//----------------------------------------------------------------------
// Entry points for WebGL.
@@ -128,10 +126,8 @@ public:
void blendFuncSeparate(unsigned long srcRGB, unsigned long dstRGB, unsigned long srcAlpha, unsigned long dstAlpha);
void bufferData(unsigned long target, int size, unsigned long usage);
- void bufferData(unsigned long target, ArrayBuffer* data, unsigned long usage);
- void bufferData(unsigned long target, ArrayBufferView* data, unsigned long usage);
- void bufferSubData(unsigned long target, long offset, ArrayBuffer* data);
- void bufferSubData(unsigned long target, long offset, ArrayBufferView* data);
+ void bufferData(unsigned long target, int size, const void* data, unsigned long usage);
+ void bufferSubData(unsigned long target, long offset, int size, const void* data);
unsigned long checkFramebufferStatus(unsigned long target);
void clear(unsigned long mask);
@@ -587,6 +583,16 @@ bool GraphicsContext3DInternal::isGLES2Compliant() const
return m_impl->isGLES2Compliant();
}
+bool GraphicsContext3DInternal::isGLES2NPOTStrict() const
+{
+ return m_impl->isGLES2NPOTStrict();
+}
+
+bool GraphicsContext3DInternal::isErrorGeneratedOnOutOfBoundsAccesses() const
+{
+ return m_impl->isErrorGeneratedOnOutOfBoundsAccesses();
+}
+
DELEGATE_TO_IMPL_1(activeTexture, unsigned long)
DELEGATE_TO_IMPL_2(attachShader, Platform3DObject, Platform3DObject)
@@ -610,24 +616,14 @@ void GraphicsContext3DInternal::bufferData(unsigned long target, int size, unsig
m_impl->bufferData(target, size, 0, usage);
}
-void GraphicsContext3DInternal::bufferData(unsigned long target, ArrayBuffer* array, unsigned long usage)
-{
- m_impl->bufferData(target, array->byteLength(), array->data(), usage);
-}
-
-void GraphicsContext3DInternal::bufferData(unsigned long target, ArrayBufferView* array, unsigned long usage)
+void GraphicsContext3DInternal::bufferData(unsigned long target, int size, const void* data, unsigned long usage)
{
- m_impl->bufferData(target, array->byteLength(), array->baseAddress(), usage);
+ m_impl->bufferData(target, size, data, usage);
}
-void GraphicsContext3DInternal::bufferSubData(unsigned long target, long offset, ArrayBuffer* array)
+void GraphicsContext3DInternal::bufferSubData(unsigned long target, long offset, int size, const void* data)
{
- m_impl->bufferSubData(target, offset, array->byteLength(), array->data());
-}
-
-void GraphicsContext3DInternal::bufferSubData(unsigned long target, long offset, ArrayBufferView* array)
-{
- m_impl->bufferSubData(target, offset, array->byteLength(), array->baseAddress());
+ m_impl->bufferSubData(target, offset, size, data);
}
DELEGATE_TO_IMPL_1R(checkFramebufferStatus, unsigned long, unsigned long)
@@ -1068,10 +1064,8 @@ DELEGATE_TO_INTERNAL_2(blendFunc, unsigned long, unsigned long)
DELEGATE_TO_INTERNAL_4(blendFuncSeparate, unsigned long, unsigned long, unsigned long, unsigned long)
DELEGATE_TO_INTERNAL_3(bufferData, unsigned long, int, unsigned long)
-DELEGATE_TO_INTERNAL_3(bufferData, unsigned long, ArrayBuffer*, unsigned long)
-DELEGATE_TO_INTERNAL_3(bufferData, unsigned long, ArrayBufferView*, unsigned long)
-DELEGATE_TO_INTERNAL_3(bufferSubData, unsigned long, long, ArrayBuffer*)
-DELEGATE_TO_INTERNAL_3(bufferSubData, unsigned long, long, ArrayBufferView*)
+DELEGATE_TO_INTERNAL_4(bufferData, unsigned long, int, const void*, unsigned long)
+DELEGATE_TO_INTERNAL_4(bufferSubData, unsigned long, long, int, const void*)
DELEGATE_TO_INTERNAL_1R(checkFramebufferStatus, unsigned long, unsigned long)
DELEGATE_TO_INTERNAL_1(clear, unsigned long)
@@ -1245,6 +1239,16 @@ bool GraphicsContext3D::isGLES2Compliant() const
return m_internal->isGLES2Compliant();
}
+bool GraphicsContext3D::isGLES2NPOTStrict() const
+{
+ return m_internal->isGLES2NPOTStrict();
+}
+
+bool GraphicsContext3D::isErrorGeneratedOnOutOfBoundsAccesses() const
+{
+ return m_internal->isErrorGeneratedOnOutOfBoundsAccesses();
+}
+
} // namespace WebCore
#endif // ENABLE(3D_CANVAS)
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.cpp b/WebKit/chromium/src/IDBDatabaseProxy.cpp
index d11d182..9aa2977 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.cpp
+++ b/WebKit/chromium/src/IDBDatabaseProxy.cpp
@@ -29,12 +29,14 @@
#include "DOMStringList.h"
#include "IDBCallbacks.h"
#include "IDBObjectStoreProxy.h"
-#include "IDBTransactionBackendInterface.h"
+#include "IDBTransactionBackendProxy.h"
+#include "WebDOMStringList.h"
#include "WebFrameImpl.h"
#include "WebIDBCallbacksImpl.h"
#include "WebIDBDatabase.h"
#include "WebIDBDatabaseError.h"
#include "WebIDBObjectStore.h"
+#include "WebIDBTransaction.h"
#if ENABLE(INDEXED_DATABASE)
@@ -94,9 +96,9 @@ void IDBDatabaseProxy::removeObjectStore(const String& name, PassRefPtr<IDBCallb
PassRefPtr<IDBTransactionBackendInterface> IDBDatabaseProxy::transaction(DOMStringList* storeNames, unsigned short mode, unsigned long timeout)
{
- // FIXME: plumb to the browser process, etc etc.
- ASSERT_NOT_REACHED();
- return 0;
+ WebKit::WebDOMStringList names(storeNames);
+ WebKit::WebIDBTransaction* transaction = m_webIDBDatabase->transaction(names, mode, timeout);
+ return IDBTransactionBackendProxy::create(transaction);
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/IDBFactoryBackendProxy.cpp b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp
index 44cbb40..114e7e1 100755
--- a/WebKit/chromium/src/IDBFactoryBackendProxy.cpp
+++ b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp
@@ -39,6 +39,7 @@
#include "WebIDBFactory.h"
#include "WebKit.h"
#include "WebKitClient.h"
+#include "WebVector.h"
#if ENABLE(INDEXED_DATABASE)
@@ -64,6 +65,14 @@ void IDBFactoryBackendProxy::open(const String& name, const String& description,
m_webIDBFactory->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame);
}
+void IDBFactoryBackendProxy::abortPendingTransactions(const Vector<int>& pendingIDs)
+{
+ ASSERT(pendingIDs.size());
+ WebKit::WebVector<int> ids = pendingIDs;
+
+ m_webIDBFactory->abortPendingTransactions(ids);
+}
+
} // namespace WebCore
#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/IDBFactoryBackendProxy.h b/WebKit/chromium/src/IDBFactoryBackendProxy.h
index 969a9d7..9efc7af 100755
--- a/WebKit/chromium/src/IDBFactoryBackendProxy.h
+++ b/WebKit/chromium/src/IDBFactoryBackendProxy.h
@@ -46,6 +46,7 @@ public:
PassRefPtr<DOMStringList> databases(void) const;
virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*);
+ virtual void abortPendingTransactions(const Vector<int>& pendingIDs);
private:
IDBFactoryBackendProxy();
diff --git a/WebKit/chromium/src/IDBTransactionBackendProxy.cpp b/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
new file mode 100644
index 0000000..be6b058
--- /dev/null
+++ b/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
@@ -0,0 +1,91 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "IDBTransactionBackendProxy.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBObjectStoreProxy.h"
+#include "IDBTransactionCallbacks.h"
+#include "WebIDBDatabaseError.h"
+#include "WebIDBObjectStore.h"
+#include "WebIDBTransaction.h"
+#include "WebIDBTransactionCallbacksImpl.h"
+
+namespace WebCore {
+
+PassRefPtr<IDBTransactionBackendInterface> IDBTransactionBackendProxy::create(PassOwnPtr<WebKit::WebIDBTransaction> transaction)
+{
+ return adoptRef(new IDBTransactionBackendProxy(transaction));
+}
+
+IDBTransactionBackendProxy::IDBTransactionBackendProxy(PassOwnPtr<WebKit::WebIDBTransaction> transaction)
+ : m_webIDBTransaction(transaction)
+{
+}
+
+IDBTransactionBackendProxy::~IDBTransactionBackendProxy()
+{
+}
+
+PassRefPtr<IDBObjectStoreBackendInterface> IDBTransactionBackendProxy::objectStore(const String& name)
+{
+ WebKit::WebIDBObjectStore* objectStore = m_webIDBTransaction->objectStore(name);
+ if (!objectStore)
+ return 0;
+ return IDBObjectStoreProxy::create(objectStore);
+}
+
+unsigned short IDBTransactionBackendProxy::mode() const
+{
+ return m_webIDBTransaction->mode();
+}
+
+void IDBTransactionBackendProxy::abort()
+{
+ m_webIDBTransaction->abort();
+}
+
+void IDBTransactionBackendProxy::scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>)
+{
+ // This should never be reached as it's the impl objects who get to
+ // execute tasks in the browser process.
+ ASSERT_NOT_REACHED();
+}
+
+int IDBTransactionBackendProxy::id() const
+{
+ return m_webIDBTransaction->id();
+}
+
+void IDBTransactionBackendProxy::setCallbacks(IDBTransactionCallbacks* callbacks)
+{
+ m_webIDBTransaction->setCallbacks(new WebIDBTransactionCallbacksImpl(callbacks));
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/IDBTransactionBackendProxy.h b/WebKit/chromium/src/IDBTransactionBackendProxy.h
new file mode 100644
index 0000000..d62b8ff
--- /dev/null
+++ b/WebKit/chromium/src/IDBTransactionBackendProxy.h
@@ -0,0 +1,62 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef IDBTransactionBackendProxy_h
+#define IDBTransactionBackendProxy_h
+
+#include "IDBTransactionBackendInterface.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace WebKit { class WebIDBTransaction; }
+
+namespace WebCore {
+
+class IDBTransactionBackendProxy : public IDBTransactionBackendInterface {
+public:
+ static PassRefPtr<IDBTransactionBackendInterface> create(PassOwnPtr<WebKit::WebIDBTransaction>);
+ virtual ~IDBTransactionBackendProxy();
+
+ virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name);
+ virtual unsigned short mode() const;
+ virtual void abort();
+ virtual void scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>);
+ virtual int id() const;
+ virtual void setCallbacks(IDBTransactionCallbacks*);
+
+private:
+ IDBTransactionBackendProxy(PassOwnPtr<WebKit::WebIDBTransaction>);
+
+ OwnPtr<WebKit::WebIDBTransaction> m_webIDBTransaction;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBTransactionBackendProxy_h
diff --git a/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp b/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp
new file mode 100644
index 0000000..be7d44f
--- /dev/null
+++ b/WebKit/chromium/src/IDBTransactionCallbacksProxy.cpp
@@ -0,0 +1,65 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "IDBTransactionCallbacksProxy.h"
+
+#include "WebIDBTransactionCallbacks.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+namespace WebCore {
+
+PassRefPtr<IDBTransactionCallbacksProxy> IDBTransactionCallbacksProxy::create(PassOwnPtr<WebKit::WebIDBTransactionCallbacks> callbacks)
+{
+ return adoptRef(new IDBTransactionCallbacksProxy(callbacks));
+}
+
+IDBTransactionCallbacksProxy::IDBTransactionCallbacksProxy(PassOwnPtr<WebKit::WebIDBTransactionCallbacks> callbacks)
+ : m_callbacks(callbacks)
+{
+}
+
+IDBTransactionCallbacksProxy::~IDBTransactionCallbacksProxy()
+{
+}
+
+void IDBTransactionCallbacksProxy::onAbort()
+{
+ m_callbacks->onAbort();
+ m_callbacks.clear();
+}
+
+int IDBTransactionCallbacksProxy::id() const
+{
+ return m_callbacks->id();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/IDBTransactionCallbacksProxy.h b/WebKit/chromium/src/IDBTransactionCallbacksProxy.h
new file mode 100644
index 0000000..821eff4
--- /dev/null
+++ b/WebKit/chromium/src/IDBTransactionCallbacksProxy.h
@@ -0,0 +1,63 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ * 3. Neither the name of Apple Computer, Inc. ("Apple") nor the names of
+ * its contributors may be used to endorse or promote products derived
+ * from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef IDBTransactionCallbacksProxy_h
+#define IDBTransactionCallbacksProxy_h
+
+#include "IDBTransactionCallbacks.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include <wtf/PassOwnPtr.h>
+#include <wtf/PassRefPtr.h>
+
+namespace WebKit { class WebIDBTransactionCallbacks; }
+
+namespace WebCore {
+
+class IDBTransactionCallbacksProxy : public IDBTransactionCallbacks {
+public:
+ static PassRefPtr<IDBTransactionCallbacksProxy> create(PassOwnPtr<WebKit::WebIDBTransactionCallbacks>);
+ virtual ~IDBTransactionCallbacksProxy();
+
+ virtual void onAbort();
+ virtual int id() const;
+ // FIXME: implement onComplete().
+
+private:
+ IDBTransactionCallbacksProxy(PassOwnPtr<WebKit::WebIDBTransactionCallbacks>);
+
+ OwnPtr<WebKit::WebIDBTransactionCallbacks> m_callbacks;
+};
+
+
+} // namespace WebCore
+
+#endif
+
+#endif // IDBTransactionCallbacksProxy_h
diff --git a/WebKit/chromium/src/SpeechInputClientImpl.cpp b/WebKit/chromium/src/SpeechInputClientImpl.cpp
index 9c59bae..963d440 100644
--- a/WebKit/chromium/src/SpeechInputClientImpl.cpp
+++ b/WebKit/chromium/src/SpeechInputClientImpl.cpp
@@ -56,10 +56,10 @@ void SpeechInputClientImpl::setListener(WebCore::SpeechInputListener* listener)
m_listener = listener;
}
-bool SpeechInputClientImpl::startRecognition(int requestId)
+bool SpeechInputClientImpl::startRecognition(int requestId, const WebCore::IntRect& elementRect)
{
ASSERT(m_listener);
- return m_controller->startRecognition(requestId);
+ return m_controller->startRecognition(requestId, elementRect);
}
void SpeechInputClientImpl::stopRecording(int requestId)
diff --git a/WebKit/chromium/src/SpeechInputClientImpl.h b/WebKit/chromium/src/SpeechInputClientImpl.h
index 0ab54c1..817b32b 100644
--- a/WebKit/chromium/src/SpeechInputClientImpl.h
+++ b/WebKit/chromium/src/SpeechInputClientImpl.h
@@ -54,7 +54,7 @@ public:
// SpeechInputClient methods.
void setListener(WebCore::SpeechInputListener*);
- bool startRecognition(int);
+ bool startRecognition(int, const WebCore::IntRect&);
void stopRecording(int);
void cancelRecognition(int);
diff --git a/WebKit/chromium/src/VideoFrameChromiumImpl.cpp b/WebKit/chromium/src/VideoFrameChromiumImpl.cpp
new file mode 100644
index 0000000..2b98320
--- /dev/null
+++ b/WebKit/chromium/src/VideoFrameChromiumImpl.cpp
@@ -0,0 +1,111 @@
+/*
+ * 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 "VideoFrameChromiumImpl.h"
+
+#include "VideoFrameChromium.h"
+#include "WebVideoFrame.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+const unsigned cMaxPlanes = 3;
+const unsigned cNumRGBPlanes = 1;
+const unsigned cRGBPlane = 0;
+const unsigned cNumYUVPlanes = 3;
+const unsigned cYPlane = 0;
+const unsigned cUPlane = 1;
+const unsigned cVPlane = 2;
+
+WebVideoFrame* VideoFrameChromiumImpl::toWebVideoFrame(VideoFrameChromium* videoFrame)
+{
+ VideoFrameChromiumImpl* wrappedFrame = static_cast<VideoFrameChromiumImpl*>(videoFrame);
+ if (wrappedFrame)
+ return wrappedFrame->m_webVideoFrame;
+ return 0;
+}
+
+VideoFrameChromiumImpl::VideoFrameChromiumImpl(WebVideoFrame* webVideoFrame)
+ : m_webVideoFrame(webVideoFrame)
+{
+}
+
+VideoFrameChromium::SurfaceType VideoFrameChromiumImpl::surfaceType() const
+{
+ if (m_webVideoFrame)
+ return static_cast<VideoFrameChromium::SurfaceType>(m_webVideoFrame->surfaceType());
+ return TypeSystemMemory;
+}
+
+VideoFrameChromium::Format VideoFrameChromiumImpl::format() const
+{
+ if (m_webVideoFrame)
+ return static_cast<VideoFrameChromium::Format>(m_webVideoFrame->format());
+ return Invalid;
+}
+
+unsigned VideoFrameChromiumImpl::width() const
+{
+ if (m_webVideoFrame)
+ return m_webVideoFrame->width();
+ return 0;
+}
+
+unsigned VideoFrameChromiumImpl::height() const
+{
+ if (m_webVideoFrame)
+ return m_webVideoFrame->height();
+ return 0;
+}
+
+unsigned VideoFrameChromiumImpl::planes() const
+{
+ if (m_webVideoFrame)
+ return m_webVideoFrame->planes();
+ return 0;
+}
+
+int VideoFrameChromiumImpl::stride(unsigned plane) const
+{
+ if (m_webVideoFrame)
+ return m_webVideoFrame->stride(plane);
+ return 0;
+}
+
+const void* VideoFrameChromiumImpl::data(unsigned plane) const
+{
+ if (m_webVideoFrame)
+ return m_webVideoFrame->data(plane);
+ return 0;
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/VideoFrameChromiumImpl.h b/WebKit/chromium/src/VideoFrameChromiumImpl.h
new file mode 100644
index 0000000..3ad424c
--- /dev/null
+++ b/WebKit/chromium/src/VideoFrameChromiumImpl.h
@@ -0,0 +1,66 @@
+/*
+ * 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 VideoFrameChromiumImpl_h
+#define VideoFrameChromiumImpl_h
+
+#include "VideoFrameChromium.h"
+#include "WebVideoFrame.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+// A wrapper class for WebKit::WebVideoFrame. Objects can be created in WebKit
+// and used in WebCore because of the VideoFrameChromium interface.
+class VideoFrameChromiumImpl : public VideoFrameChromium {
+public:
+ // Converts a WebCore::VideoFrameChromium to a WebKit::WebVideoFrame.
+ static WebVideoFrame* toWebVideoFrame(VideoFrameChromium*);
+
+ // Creates a VideoFrameChromiumImpl object to wrap the given WebVideoFrame.
+ // The VideoFrameChromiumImpl does not take ownership of the WebVideoFrame
+ // and should not free the frame's memory.
+ VideoFrameChromiumImpl(WebVideoFrame*);
+ virtual SurfaceType surfaceType() const;
+ virtual Format format() const;
+ virtual unsigned width() const;
+ virtual unsigned height() const;
+ virtual unsigned planes() const;
+ virtual int stride(unsigned plane) const;
+ virtual const void* data(unsigned plane) const;
+
+private:
+ WebVideoFrame* m_webVideoFrame;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/WebBlobData.cpp b/WebKit/chromium/src/WebBlobData.cpp
new file mode 100644
index 0000000..4cd1d67
--- /dev/null
+++ b/WebKit/chromium/src/WebBlobData.cpp
@@ -0,0 +1,166 @@
+/*
+ * 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 "WebBlobData.h"
+
+#include "BlobData.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+class WebBlobDataPrivate : public BlobData {
+};
+
+void WebBlobData::initialize()
+{
+ assign(BlobData::create());
+}
+
+void WebBlobData::reset()
+{
+ assign(0);
+}
+
+size_t WebBlobData::itemCount() const
+{
+ ASSERT(!isNull());
+ return m_private->items().size();
+}
+
+bool WebBlobData::itemAt(size_t index, Item& result) const
+{
+ ASSERT(!isNull());
+
+ if (index >= m_private->items().size())
+ return false;
+
+ const BlobDataItem& item = m_private->items()[index];
+ result.data.reset();
+ result.filePath.reset();
+ result.blobURL = KURL();
+ result.offset = item.offset;
+ result.length = item.length;
+ result.expectedModificationTime = item.expectedModificationTime;
+
+ switch (item.type) {
+ case BlobDataItem::Data:
+ result.type = Item::TypeData;
+ result.data = item.data;
+ return true;
+ case BlobDataItem::File:
+ result.type = Item::TypeFile;
+ result.filePath = item.path;
+ return true;
+ case BlobDataItem::Blob:
+ result.type = Item::TypeBlob;
+ result.blobURL = item.url;
+ return true;
+ }
+ ASSERT_NOT_REACHED();
+ 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)
+{
+ assign(data);
+}
+
+WebBlobData& WebBlobData::operator=(const PassOwnPtr<BlobData>& data)
+{
+ assign(data);
+ return *this;
+}
+
+WebBlobData::operator PassOwnPtr<BlobData>()
+{
+ WebBlobDataPrivate* temp = m_private;
+ m_private = 0;
+ return adoptPtr(temp);
+}
+
+void WebBlobData::assign(const PassOwnPtr<BlobData>& data)
+{
+ if (m_private)
+ delete m_private;
+ m_private = static_cast<WebBlobDataPrivate*>(data.leakPtr());
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebBlobStorageData.cpp b/WebKit/chromium/src/WebBlobStorageData.cpp
new file mode 100644
index 0000000..38a25fe
--- /dev/null
+++ b/WebKit/chromium/src/WebBlobStorageData.cpp
@@ -0,0 +1,113 @@
+/*
+ * 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/WebEvent.cpp b/WebKit/chromium/src/WebDOMEvent.cpp
index 8c68959..48e5268 100644
--- a/WebKit/chromium/src/WebEvent.cpp
+++ b/WebKit/chromium/src/WebDOMEvent.cpp
@@ -29,7 +29,7 @@
*/
#include "config.h"
-#include "WebEvent.h"
+#include "WebDOMEvent.h"
#include "Event.h"
#include "Node.h"
@@ -37,23 +37,23 @@
namespace WebKit {
-class WebEventPrivate : public WebCore::Event {
+class WebDOMEventPrivate : public WebCore::Event {
};
-void WebEvent::reset()
+void WebDOMEvent::reset()
{
assign(0);
}
-void WebEvent::assign(const WebEvent& other)
+void WebDOMEvent::assign(const WebDOMEvent& other)
{
- WebEventPrivate* p = const_cast<WebEventPrivate*>(other.m_private);
+ WebDOMEventPrivate* p = const_cast<WebDOMEventPrivate*>(other.m_private);
if (p)
p->ref();
assign(p);
}
-void WebEvent::assign(WebEventPrivate* p)
+void WebDOMEvent::assign(WebDOMEventPrivate* p)
{
// p is already ref'd for us by the caller
if (m_private)
@@ -61,156 +61,156 @@ void WebEvent::assign(WebEventPrivate* p)
m_private = p;
}
-WebEvent::WebEvent(const WTF::PassRefPtr<WebCore::Event>& event)
- : m_private(static_cast<WebEventPrivate*>(event.releaseRef()))
+WebDOMEvent::WebDOMEvent(const WTF::PassRefPtr<WebCore::Event>& event)
+ : m_private(static_cast<WebDOMEventPrivate*>(event.releaseRef()))
{
}
-WebString WebEvent::type() const
+WebString WebDOMEvent::type() const
{
ASSERT(m_private);
return m_private->type();
}
-WebNode WebEvent::target() const
+WebNode WebDOMEvent::target() const
{
ASSERT(m_private);
return WebNode(m_private->target()->toNode());
}
-WebNode WebEvent::currentTarget() const
+WebNode WebDOMEvent::currentTarget() const
{
ASSERT(m_private);
return WebNode(m_private->currentTarget()->toNode());
}
-WebEvent::PhaseType WebEvent::eventPhase() const
+WebDOMEvent::PhaseType WebDOMEvent::eventPhase() const
{
ASSERT(m_private);
- return static_cast<WebEvent::PhaseType>(m_private->eventPhase());
+ return static_cast<WebDOMEvent::PhaseType>(m_private->eventPhase());
}
-bool WebEvent::bubbles() const
+bool WebDOMEvent::bubbles() const
{
ASSERT(m_private);
return m_private->bubbles();
}
-bool WebEvent::cancelable() const
+bool WebDOMEvent::cancelable() const
{
ASSERT(m_private);
return m_private->cancelable();
}
-bool WebEvent::isUIEvent() const
+bool WebDOMEvent::isUIEvent() const
{
ASSERT(m_private);
return m_private->isUIEvent();
}
-bool WebEvent::isMouseEvent() const
+bool WebDOMEvent::isMouseEvent() const
{
ASSERT(m_private);
return m_private->isMouseEvent();
}
-bool WebEvent::isMutationEvent() const
+bool WebDOMEvent::isMutationEvent() const
{
ASSERT(m_private);
return m_private->isMutationEvent();
}
-bool WebEvent::isKeyboardEvent() const
+bool WebDOMEvent::isKeyboardEvent() const
{
ASSERT(m_private);
return m_private->isKeyboardEvent();
}
-bool WebEvent::isTextEvent() const
+bool WebDOMEvent::isTextEvent() const
{
ASSERT(m_private);
return m_private->isTextEvent();
}
-bool WebEvent::isCompositionEvent() const
+bool WebDOMEvent::isCompositionEvent() const
{
ASSERT(m_private);
return m_private->isCompositionEvent();
}
-bool WebEvent::isDragEvent() const
+bool WebDOMEvent::isDragEvent() const
{
ASSERT(m_private);
return m_private->isDragEvent();
}
-bool WebEvent::isClipboardEvent() const
+bool WebDOMEvent::isClipboardEvent() const
{
ASSERT(m_private);
return m_private->isClipboardEvent();
}
-bool WebEvent::isMessageEvent() const
+bool WebDOMEvent::isMessageEvent() const
{
ASSERT(m_private);
return m_private->isMessageEvent();
}
-bool WebEvent::isWheelEvent() const
+bool WebDOMEvent::isWheelEvent() const
{
ASSERT(m_private);
return m_private->isWheelEvent();
}
-bool WebEvent::isBeforeTextInsertedEvent() const
+bool WebDOMEvent::isBeforeTextInsertedEvent() const
{
ASSERT(m_private);
return m_private->isBeforeTextInsertedEvent();
}
-bool WebEvent::isOverflowEvent() const
+bool WebDOMEvent::isOverflowEvent() const
{
ASSERT(m_private);
return m_private->isOverflowEvent();
}
-bool WebEvent::isPageTransitionEvent() const
+bool WebDOMEvent::isPageTransitionEvent() const
{
ASSERT(m_private);
return m_private->isPageTransitionEvent();
}
-bool WebEvent::isPopStateEvent() const
+bool WebDOMEvent::isPopStateEvent() const
{
ASSERT(m_private);
return m_private->isPopStateEvent();
}
-bool WebEvent::isProgressEvent() const
+bool WebDOMEvent::isProgressEvent() const
{
ASSERT(m_private);
return m_private->isProgressEvent();
}
-bool WebEvent::isXMLHttpRequestProgressEvent() const
+bool WebDOMEvent::isXMLHttpRequestProgressEvent() const
{
ASSERT(m_private);
return m_private->isXMLHttpRequestProgressEvent();
}
-bool WebEvent::isWebKitAnimationEvent() const
+bool WebDOMEvent::isWebKitAnimationEvent() const
{
ASSERT(m_private);
return m_private->isWebKitAnimationEvent();
}
-bool WebEvent::isWebKitTransitionEvent() const
+bool WebDOMEvent::isWebKitTransitionEvent() const
{
ASSERT(m_private);
return m_private->isWebKitTransitionEvent();
}
-bool WebEvent::isBeforeLoadEvent() const
+bool WebDOMEvent::isBeforeLoadEvent() const
{
ASSERT(m_private);
return m_private->isBeforeLoadEvent();
diff --git a/WebKit/chromium/src/WebEventListener.cpp b/WebKit/chromium/src/WebDOMEventListener.cpp
index 8d9a887..93c1640 100644
--- a/WebKit/chromium/src/WebEventListener.cpp
+++ b/WebKit/chromium/src/WebDOMEventListener.cpp
@@ -1,64 +1,64 @@
-/*
- * 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 "WebEventListener.h"
-
-#include "WebEventListenerPrivate.h"
-
-namespace WebKit {
-
-WebEventListener::WebEventListener()
- : m_private(new WebEventListenerPrivate(this))
-{
-}
-
-WebEventListener::~WebEventListener()
-{
- m_private->webEventListenerDeleted();
- delete m_private;
-}
-
-void WebEventListener::notifyEventListenerDeleted(EventListenerWrapper* wrapper)
-{
- m_private->eventListenerDeleted(wrapper);
-}
-
-EventListenerWrapper* WebEventListener::createEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
-{
- return m_private->createEventListenerWrapper(eventType, useCapture, node);
-}
-
-EventListenerWrapper* WebEventListener::getEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
-{
- return m_private->getEventListenerWrapper(eventType, useCapture, node);
-}
-
-} // namespace WebKit
+/*
+ * 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 "WebDOMEventListener.h"
+
+#include "WebDOMEventListenerPrivate.h"
+
+namespace WebKit {
+
+WebDOMEventListener::WebDOMEventListener()
+ : m_private(new WebDOMEventListenerPrivate(this))
+{
+}
+
+WebDOMEventListener::~WebDOMEventListener()
+{
+ m_private->webDOMEventListenerDeleted();
+ delete m_private;
+}
+
+void WebDOMEventListener::notifyEventListenerDeleted(EventListenerWrapper* wrapper)
+{
+ m_private->eventListenerDeleted(wrapper);
+}
+
+EventListenerWrapper* WebDOMEventListener::createEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
+{
+ return m_private->createEventListenerWrapper(eventType, useCapture, node);
+}
+
+EventListenerWrapper* WebDOMEventListener::getEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
+{
+ return m_private->getEventListenerWrapper(eventType, useCapture, node);
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebEventListenerPrivate.cpp b/WebKit/chromium/src/WebDOMEventListenerPrivate.cpp
index bd14baf..4edbeef 100644
--- a/WebKit/chromium/src/WebEventListenerPrivate.cpp
+++ b/WebKit/chromium/src/WebDOMEventListenerPrivate.cpp
@@ -1,87 +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 "WebEventListenerPrivate.h"
-
-#include "EventListenerWrapper.h"
-#include "WebEventListener.h"
-
-namespace WebKit {
-
-WebEventListenerPrivate::WebEventListenerPrivate(WebEventListener* webEventListener)
- : m_webEventListener(webEventListener)
-{
-}
-
-WebEventListenerPrivate::~WebEventListenerPrivate()
-{
-}
-
-EventListenerWrapper* WebEventListenerPrivate::createEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
-{
- EventListenerWrapper* listenerWrapper = new EventListenerWrapper(m_webEventListener);
- WebEventListenerPrivate::ListenerInfo listenerInfo(eventType, useCapture, listenerWrapper, node);
- m_listenerWrappers.append(listenerInfo);
- return listenerWrapper;
-}
-
-EventListenerWrapper* WebEventListenerPrivate::getEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
-{
- Vector<WebEventListenerPrivate::ListenerInfo>::const_iterator iter;
- for (iter = m_listenerWrappers.begin(); iter != m_listenerWrappers.end(); ++iter) {
- if (iter->node == node)
- return iter->eventListenerWrapper;
- }
- ASSERT_NOT_REACHED();
- return 0;
-}
-
-void WebEventListenerPrivate::webEventListenerDeleted()
-{
- // Notifies all WebEventListenerWrappers that we are going away so they can
- // invalidate their pointer to us.
- Vector<WebEventListenerPrivate::ListenerInfo>::const_iterator iter;
- for (iter = m_listenerWrappers.begin(); iter != m_listenerWrappers.end(); ++iter)
- iter->eventListenerWrapper->webEventListenerDeleted();
-}
-
-void WebEventListenerPrivate::eventListenerDeleted(EventListenerWrapper* eventListener)
-{
- for (size_t i = 0; i < m_listenerWrappers.size(); ++i) {
- if (m_listenerWrappers[i].eventListenerWrapper == eventListener) {
- m_listenerWrappers.remove(i);
- return;
- }
- }
- ASSERT_NOT_REACHED();
-}
-
-} // namespace WebKit
+/*
+ * 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 "WebDOMEventListenerPrivate.h"
+
+#include "EventListenerWrapper.h"
+#include "WebDOMEventListener.h"
+
+namespace WebKit {
+
+WebDOMEventListenerPrivate::WebDOMEventListenerPrivate(WebDOMEventListener* webDOMEventListener)
+ : m_webDOMEventListener(webDOMEventListener)
+{
+}
+
+WebDOMEventListenerPrivate::~WebDOMEventListenerPrivate()
+{
+}
+
+EventListenerWrapper* WebDOMEventListenerPrivate::createEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
+{
+ EventListenerWrapper* listenerWrapper = new EventListenerWrapper(m_webDOMEventListener);
+ WebDOMEventListenerPrivate::ListenerInfo listenerInfo(eventType, useCapture, listenerWrapper, node);
+ m_listenerWrappers.append(listenerInfo);
+ return listenerWrapper;
+}
+
+EventListenerWrapper* WebDOMEventListenerPrivate::getEventListenerWrapper(const WebString& eventType, bool useCapture, Node* node)
+{
+ Vector<WebDOMEventListenerPrivate::ListenerInfo>::const_iterator iter;
+ for (iter = m_listenerWrappers.begin(); iter != m_listenerWrappers.end(); ++iter) {
+ if (iter->node == node)
+ return iter->eventListenerWrapper;
+ }
+ ASSERT_NOT_REACHED();
+ return 0;
+}
+
+void WebDOMEventListenerPrivate::webDOMEventListenerDeleted()
+{
+ // Notifies all WebDOMEventListenerWrappers that we are going away so they can
+ // invalidate their pointer to us.
+ Vector<WebDOMEventListenerPrivate::ListenerInfo>::const_iterator iter;
+ for (iter = m_listenerWrappers.begin(); iter != m_listenerWrappers.end(); ++iter)
+ iter->eventListenerWrapper->webDOMEventListenerDeleted();
+}
+
+void WebDOMEventListenerPrivate::eventListenerDeleted(EventListenerWrapper* eventListener)
+{
+ for (size_t i = 0; i < m_listenerWrappers.size(); ++i) {
+ if (m_listenerWrappers[i].eventListenerWrapper == eventListener) {
+ m_listenerWrappers.remove(i);
+ return;
+ }
+ }
+ ASSERT_NOT_REACHED();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebEventListenerPrivate.h b/WebKit/chromium/src/WebDOMEventListenerPrivate.h
index 0ba2b5d..c86f427 100644
--- a/WebKit/chromium/src/WebEventListenerPrivate.h
+++ b/WebKit/chromium/src/WebDOMEventListenerPrivate.h
@@ -1,95 +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 WebEventListenerPrivate_h
-#define WebEventListenerPrivate_h
-
-#include "WebString.h"
-
-#include <wtf/Vector.h>
-
-namespace WebCore {
-class Node;
-}
-
-using namespace WebCore;
-
-namespace WebKit {
-
-class EventListenerWrapper;
-class WebEventListener;
-
-class WebEventListenerPrivate {
-public:
- WebEventListenerPrivate(WebEventListener* webEventListener);
- ~WebEventListenerPrivate();
-
- EventListenerWrapper* createEventListenerWrapper(
- const WebString& eventType, bool useCapture, Node* node);
-
- // Gets the ListenerEventWrapper for a specific node.
- // Used by WebNode::removeEventListener().
- EventListenerWrapper* getEventListenerWrapper(
- const WebString& eventType, bool useCapture, Node* node);
-
- // Called by the WebEventListener when it is about to be deleted.
- void webEventListenerDeleted();
-
- // Called by the EventListenerWrapper when it is about to be deleted.
- void eventListenerDeleted(EventListenerWrapper* eventListener);
-
- struct ListenerInfo {
- ListenerInfo(const WebString& eventType, bool useCapture,
- EventListenerWrapper* eventListenerWrapper,
- Node* node)
- : eventType(eventType)
- , useCapture(useCapture)
- , eventListenerWrapper(eventListenerWrapper)
- , node(node)
- {
- }
-
- WebString eventType;
- bool useCapture;
- EventListenerWrapper* eventListenerWrapper;
- Node* node;
- };
-
-private:
- WebEventListener* m_webEventListener;
-
- // We keep a list of the wrapper for the WebKit EventListener, it is needed
- // to implement WebNode::removeEventListener().
- Vector<ListenerInfo> m_listenerWrappers;
-};
-
-} // namespace WebKit
-
-#endif
+/*
+ * 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 WebDOMEventListenerPrivate_h
+#define WebDOMEventListenerPrivate_h
+
+#include "WebString.h"
+
+#include <wtf/Vector.h>
+
+namespace WebCore {
+class Node;
+}
+
+using namespace WebCore;
+
+namespace WebKit {
+
+class EventListenerWrapper;
+class WebDOMEventListener;
+
+class WebDOMEventListenerPrivate {
+public:
+ WebDOMEventListenerPrivate(WebDOMEventListener* webDOMEventListener);
+ ~WebDOMEventListenerPrivate();
+
+ EventListenerWrapper* createEventListenerWrapper(
+ const WebString& eventType, bool useCapture, Node* node);
+
+ // Gets the ListenerEventWrapper for a specific node.
+ // Used by WebNode::removeDOMEventListener().
+ EventListenerWrapper* getEventListenerWrapper(
+ const WebString& eventType, bool useCapture, Node* node);
+
+ // Called by the WebDOMEventListener when it is about to be deleted.
+ void webDOMEventListenerDeleted();
+
+ // Called by the EventListenerWrapper when it is about to be deleted.
+ void eventListenerDeleted(EventListenerWrapper* eventListener);
+
+ struct ListenerInfo {
+ ListenerInfo(const WebString& eventType, bool useCapture,
+ EventListenerWrapper* eventListenerWrapper,
+ Node* node)
+ : eventType(eventType)
+ , useCapture(useCapture)
+ , eventListenerWrapper(eventListenerWrapper)
+ , node(node)
+ {
+ }
+
+ WebString eventType;
+ bool useCapture;
+ EventListenerWrapper* eventListenerWrapper;
+ Node* node;
+ };
+
+private:
+ WebDOMEventListener* m_webDOMEventListener;
+
+ // We keep a list of the wrapper for the WebKit EventListener, it is needed
+ // to implement WebNode::removeEventListener().
+ Vector<ListenerInfo> m_listenerWrappers;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/src/WebDOMMouseEvent.cpp b/WebKit/chromium/src/WebDOMMouseEvent.cpp
new file mode 100644
index 0000000..bfeae37
--- /dev/null
+++ b/WebKit/chromium/src/WebDOMMouseEvent.cpp
@@ -0,0 +1,110 @@
+/*
+ * 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 "WebDOMMouseEvent.h"
+
+#include "MouseEvent.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+int WebDOMMouseEvent::screenX() const
+{
+ return constUnwrap<MouseEvent>()->screenX();
+}
+
+int WebDOMMouseEvent::screenY() const
+{
+ return constUnwrap<MouseEvent>()->screenY();
+}
+
+int WebDOMMouseEvent::clientX() const
+{
+ return constUnwrap<MouseEvent>()->clientX();
+}
+
+int WebDOMMouseEvent::clientY() const
+{
+ return constUnwrap<MouseEvent>()->clientY();
+}
+
+int WebDOMMouseEvent::layerX() const
+{
+ return constUnwrap<MouseEvent>()->layerX();
+}
+
+int WebDOMMouseEvent::layerY() const
+{
+ return constUnwrap<MouseEvent>()->layerY();
+}
+
+int WebDOMMouseEvent::offsetX() const
+{
+ return constUnwrap<MouseEvent>()->offsetX();
+}
+
+int WebDOMMouseEvent::offsetY() const
+{
+ return constUnwrap<MouseEvent>()->offsetY();
+}
+
+int WebDOMMouseEvent::pageX() const
+{
+ return constUnwrap<MouseEvent>()->pageX();
+}
+
+int WebDOMMouseEvent::pageY() const
+{
+ return constUnwrap<MouseEvent>()->pageY();
+}
+
+int WebDOMMouseEvent::x() const
+{
+ return constUnwrap<MouseEvent>()->x();
+}
+
+int WebDOMMouseEvent::y() const
+{
+ return constUnwrap<MouseEvent>()->y();
+}
+
+int WebDOMMouseEvent::button() const
+{
+ return constUnwrap<MouseEvent>()->button();
+}
+
+bool WebDOMMouseEvent::buttonDown() const
+{
+ return constUnwrap<MouseEvent>()->buttonDown();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebDOMMutationEvent.cpp b/WebKit/chromium/src/WebDOMMutationEvent.cpp
new file mode 100644
index 0000000..8a6e592
--- /dev/null
+++ b/WebKit/chromium/src/WebDOMMutationEvent.cpp
@@ -0,0 +1,65 @@
+/*
+ * 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 "WebDOMMutationEvent.h"
+
+#include "MutationEvent.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebNode WebDOMMutationEvent::relatedNode() const
+{
+ return WebNode(constUnwrap<MutationEvent>()->relatedNode());
+}
+
+WebString WebDOMMutationEvent::prevValue() const
+{
+ return WebString(constUnwrap<MutationEvent>()->prevValue());
+}
+
+WebString WebDOMMutationEvent::newValue() const
+{
+ return WebString(constUnwrap<MutationEvent>()->newValue());
+}
+
+WebString WebDOMMutationEvent::attrName() const
+{
+ return WebString(constUnwrap<MutationEvent>()->attrName());
+}
+
+WebDOMMutationEvent::AttrChangeType WebDOMMutationEvent::attrChange() const
+{
+ return static_cast<AttrChangeType>(constUnwrap<MutationEvent>()->attrChange());
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebDOMStringList.cpp b/WebKit/chromium/src/WebDOMStringList.cpp
index 4be7fab..dc82331 100644
--- a/WebKit/chromium/src/WebDOMStringList.cpp
+++ b/WebKit/chromium/src/WebDOMStringList.cpp
@@ -60,6 +60,8 @@ void WebDOMStringList::append(const WebString& string)
unsigned WebDOMStringList::length() const
{
+ if (m_private.isNull())
+ return 0;
return m_private->length();
}
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index f4b1a86..fbb06f8 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -206,19 +206,6 @@ void WebDevToolsAgentImpl::attach()
WebCString debuggerScriptJs = m_client->debuggerScriptSource();
WebCore::ScriptDebugServer::shared().setDebuggerScriptSource(
WTF::String(debuggerScriptJs.data(), debuggerScriptJs.length()));
-
- // TODO(yurys): the source should have already been pushed by the frontend.
- WebCString injectedScriptJs = m_client->injectedScriptSource();
- String injectedScriptSource = String::fromUTF8(injectedScriptJs.data(), injectedScriptJs.length());
- const char* varDefinition = "var injectedScriptConstructor = ";
- int pos = injectedScriptSource.find(varDefinition);
- if (pos == -1) {
- ASSERT_NOT_REACHED();
- return;
- }
- pos += String(varDefinition).length();
- injectedScriptSource = injectedScriptSource.substring(pos);
- inspectorController()->injectedScriptHost()->setInjectedScriptSource(injectedScriptSource);
m_attached = true;
}
@@ -237,7 +224,8 @@ void WebDevToolsAgentImpl::detach()
void WebDevToolsAgentImpl::frontendLoaded()
{
inspectorController()->connectFrontend();
- m_client->runtimePropertyChanged(kFrontendConnectedFeatureName, "true");
+ // We know that by this time injected script has already been pushed to the backend.
+ m_client->runtimePropertyChanged(kFrontendConnectedFeatureName, inspectorController()->injectedScriptHost()->injectedScriptSource());
}
void WebDevToolsAgentImpl::didNavigate()
@@ -266,11 +254,6 @@ void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& point)
m_webViewImpl->inspectElementAt(point);
}
-void WebDevToolsAgentImpl::setRuntimeFeatureEnabled(const WebString& feature, bool enabled)
-{
- setRuntimeProperty(feature, enabled ? String("true") : String("false"));
-}
-
void WebDevToolsAgentImpl::setRuntimeProperty(const WebString& name, const WebString& value)
{
if (name == kApuAgentFeatureName)
@@ -283,8 +266,10 @@ void WebDevToolsAgentImpl::setRuntimeProperty(const WebString& name, const WebSt
ic->enableResourceTracking(false /* not sticky */, false /* no reload */);
else
ic->disableResourceTracking(false /* not sticky */);
- } else if (name == kFrontendConnectedFeatureName && value == "true" && !inspectorController()->hasFrontend())
+ } else if (name == kFrontendConnectedFeatureName && !inspectorController()->hasFrontend()) {
+ inspectorController()->injectedScriptHost()->setInjectedScriptSource(value);
frontendLoaded();
+ }
}
void WebDevToolsAgentImpl::setApuAgentEnabled(bool enabled)
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.h b/WebKit/chromium/src/WebDevToolsAgentImpl.h
index 73b8a1e..da584fb 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.h
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.h
@@ -76,7 +76,6 @@ public:
virtual void dispatchOnInspectorBackend(const WebString& message);
virtual void inspectElementAt(const WebPoint& point);
virtual void evaluateInWebInspector(long callId, const WebString& script);
- virtual void setRuntimeFeatureEnabled(const WebString& feature, bool enabled);
virtual void setRuntimeProperty(const WebString& name, const WebString& value);
virtual void setTimelineProfilingEnabled(bool enable);
diff --git a/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp b/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
new file mode 100644
index 0000000..d29f86d
--- /dev/null
+++ b/WebKit/chromium/src/WebFileSystemCallbacksImpl.cpp
@@ -0,0 +1,94 @@
+/*
+ * 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 "WebFileSystemCallbacksImpl.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "ExceptionCode.h"
+#include "FileSystemCallbacks.h"
+#include "WebFileSystemEntry.h"
+#include "WebFileInfo.h"
+#include "WebString.h"
+#include <wtf/Vector.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebFileSystemCallbacksImpl::WebFileSystemCallbacksImpl(PassOwnPtr<FileSystemCallbacksBase> callbacks)
+ : m_callbacks(callbacks)
+{
+}
+
+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->didReadDirectoryChunkDone(hasMore);
+ if (!hasMore)
+ delete this;
+}
+
+void WebFileSystemCallbacksImpl::didOpenFileSystem(const WebString& name, const WebString& path)
+{
+ m_callbacks->didOpenFileSystem(name, path);
+ delete this;
+}
+
+void WebFileSystemCallbacksImpl::didFail(WebFileError error)
+{
+ ASSERT(m_callbacks);
+ m_callbacks->didFail(error);
+ delete this;
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebKit/chromium/src/WebFileSystemCallbacksImpl.h b/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
new file mode 100644
index 0000000..f3c6bc3
--- /dev/null
+++ b/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
@@ -0,0 +1,66 @@
+/*
+ * 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 WebFileSystemCallbacksImpl_h
+#define WebFileSystemCallbacksImpl_h
+
+#include "WebFileSystemCallbacks.h"
+#include "WebVector.h"
+#include <wtf/OwnPtr.h>
+#include <wtf/PassOwnPtr.h>
+
+namespace WebCore {
+class FileSystemCallbacksBase;
+}
+
+namespace WebKit {
+
+struct WebFileInfo;
+class WebFileSystemEntry;
+class WebString;
+
+class WebFileSystemCallbacksImpl : public WebFileSystemCallbacks {
+public:
+ WebFileSystemCallbacksImpl(PassOwnPtr<WebCore::FileSystemCallbacksBase>);
+ virtual ~WebFileSystemCallbacksImpl();
+
+ virtual void didSucceed();
+ virtual void didReadMetadata(const WebFileInfo& info);
+ virtual void didReadDirectory(const WebVector<WebFileSystemEntry>& entries, bool hasMore);
+ virtual void didOpenFileSystem(const WebString& name, const WebString& rootPath);
+ virtual void didFail(WebFileError error);
+
+private:
+ OwnPtr<WebCore::FileSystemCallbacksBase> m_callbacks;
+};
+
+} // namespace WebKit
+
+#endif // WebFileSystemCallbacksImpl_h
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index f1c30e2..4375e73 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -234,6 +234,15 @@ static void frameContentAsPlainText(size_t maxChars, Frame* frame,
// Recursively walk the children.
FrameTree* frameTree = frame->tree();
for (Frame* curChild = frameTree->firstChild(); curChild; curChild = curChild->tree()->nextSibling()) {
+ // Ignore the text of non-visible frames.
+ RenderView* contentRenderer = curChild->contentRenderer();
+ RenderPart* ownerRenderer = curChild->ownerRenderer();
+ if (!contentRenderer || !contentRenderer->width() || !contentRenderer->height()
+ || (contentRenderer->x() + contentRenderer->width() <= 0) || (contentRenderer->y() + contentRenderer->height() <= 0)
+ || (ownerRenderer && ownerRenderer->style() && ownerRenderer->style()->visibility() != VISIBLE)) {
+ continue;
+ }
+
// Make sure the frame separator won't fill up the buffer, and give up if
// it will. The danger is if the separator will make the buffer longer than
// maxChars. This will cause the computation above:
@@ -1429,7 +1438,7 @@ void WebFrameImpl::stopFinding(bool clearSelection)
cancelPendingScopingEffort();
// Remove all markers for matches found and turn off the highlighting.
- frame()->document()->removeMarkers(DocumentMarker::TextMatch);
+ frame()->document()->markers()->removeMarkers(DocumentMarker::TextMatch);
frame()->setMarkedTextMatchesAreHighlighted(false);
// Let the frame know that we don't want tickmarks or highlighting anymore.
@@ -2060,14 +2069,14 @@ void WebFrameImpl::addMarker(Range* range, bool activeMatch)
if (marker.endOffset > marker.startOffset) {
// Find the node to add a marker to and add it.
Node* node = textPiece->startContainer(exception);
- frame()->document()->addMarker(node, marker);
+ frame()->document()->markers()->addMarker(node, marker);
// Rendered rects for markers in WebKit are not populated until each time
// the markers are painted. However, we need it to happen sooner, because
// the whole purpose of tickmarks on the scrollbar is to show where
// matches off-screen are (that haven't been painted yet).
- Vector<DocumentMarker> markers = frame()->document()->markersForNode(node);
- frame()->document()->setRenderedRectForMarker(
+ Vector<DocumentMarker> markers = frame()->document()->markers()->markersForNode(node);
+ frame()->document()->markers()->setRenderedRectForMarker(
textPiece->startContainer(exception),
markers[markers.size() - 1],
range->boundingBox());
@@ -2081,7 +2090,7 @@ void WebFrameImpl::setMarkerActive(Range* range, bool active)
if (!range || range->collapsed(ec))
return;
- frame()->document()->setMarkersActive(range, active);
+ frame()->document()->markers()->setMarkersActive(range, active);
}
int WebFrameImpl::ordinalOfFirstMatchForFrame(WebFrameImpl* frame) const
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index a863862..6e1adca 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -182,6 +182,16 @@ bool WebGraphicsContext3DDefaultImpl::isGLES2Compliant()
return false;
}
+bool WebGraphicsContext3DDefaultImpl::isGLES2NPOTStrict()
+{
+ return false;
+}
+
+bool WebGraphicsContext3DDefaultImpl::isErrorGeneratedOnOutOfBoundsAccesses()
+{
+ return false;
+}
+
unsigned int WebGraphicsContext3DDefaultImpl::getPlatformTextureId()
{
ASSERT_NOT_REACHED();
@@ -922,9 +932,10 @@ DELEGATE_TO_GL_3(getVertexAttribiv, GetVertexAttribiv, unsigned long, unsigned l
long WebGraphicsContext3DDefaultImpl::getVertexAttribOffset(unsigned long index, unsigned long pname)
{
- // FIXME: implement.
- notImplemented();
- return 0;
+ makeContextCurrent();
+ void* pointer;
+ glGetVertexAttribPointerv(index, pname, &pointer);
+ return reinterpret_cast<long>(pointer);
}
DELEGATE_TO_GL_2(hint, Hint, unsigned long, unsigned long)
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
index cf5f5b4..a4c5b4b 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
@@ -68,6 +68,8 @@ public:
virtual int sizeInBytes(int type);
virtual bool isGLES2Compliant();
+ virtual bool isGLES2NPOTStrict();
+ virtual bool isErrorGeneratedOnOutOfBoundsAccesses();
virtual void reshape(int width, int height);
diff --git a/WebKit/chromium/src/WebHTTPBody.cpp b/WebKit/chromium/src/WebHTTPBody.cpp
index fa75387..e54b4e5 100644
--- a/WebKit/chromium/src/WebHTTPBody.cpp
+++ b/WebKit/chromium/src/WebHTTPBody.cpp
@@ -74,31 +74,33 @@ bool WebHTTPBody::elementAt(size_t index, Element& result) const
const FormDataElement& element = m_private->elements()[index];
+ result.data.reset();
+ result.filePath.reset();
+ result.fileStart = 0;
+ result.fileLength = 0;
+ result.fileInfo.modificationTime = 0.0;
+ result.blobURL = KURL();
+
switch (element.m_type) {
case FormDataElement::data:
result.type = Element::TypeData;
result.data.assign(element.m_data.data(), element.m_data.size());
- result.filePath.reset();
-#if ENABLE(BLOB)
- result.fileStart = 0;
- result.fileLength = 0;
- result.fileInfo.modificationTime = 0.0;
-#endif
break;
case FormDataElement::encodedFile:
result.type = Element::TypeFile;
- result.data.reset();
result.filePath = element.m_filename;
#if ENABLE(BLOB)
result.fileStart = element.m_fileStart;
result.fileLength = element.m_fileLength;
result.fileInfo.modificationTime = element.m_expectedFileModificationTime;
-#else
- result.fileStart = 0;
- result.fileLength = -1;
- result.fileInfo.modificationTime = 0.0;
#endif
break;
+#if ENABLE(BLOB)
+ case FormDataElement::encodedBlob:
+ result.type = Element::TypeBlob;
+ result.blobURL = element.m_blobURL;
+ break;
+#endif
default:
ASSERT_NOT_REACHED();
return false;
@@ -129,6 +131,14 @@ void WebHTTPBody::appendFileRange(const WebString& filePath, long long fileStart
#endif
}
+void WebHTTPBody::appendBlob(const WebURL& blobURL)
+{
+#if ENABLE(BLOB)
+ ensureMutable();
+ m_private->appendBlob(blobURL);
+#endif
+}
+
long long WebHTTPBody::identifier() const
{
ASSERT(!isNull());
diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
index 8c8e30a..bd3600f 100644
--- a/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
+++ b/WebKit/chromium/src/WebIDBDatabaseImpl.cpp
@@ -29,8 +29,10 @@
#include "DOMStringList.h"
#include "IDBCallbacksProxy.h"
#include "IDBDatabaseBackendInterface.h"
+#include "IDBTransactionBackendInterface.h"
#include "WebIDBCallbacks.h"
#include "WebIDBObjectStoreImpl.h"
+#include "WebIDBTransactionImpl.h"
#if ENABLE(INDEXED_DATABASE)
@@ -85,6 +87,15 @@ void WebIDBDatabaseImpl::removeObjectStore(const WebString& name, WebIDBCallback
m_databaseBackend->removeObjectStore(name, IDBCallbacksProxy::create(callbacks));
}
+WebIDBTransaction* WebIDBDatabaseImpl::transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout)
+{
+ RefPtr<DOMStringList> nameList = PassRefPtr<DOMStringList>(names);
+ RefPtr<IDBTransactionBackendInterface> transaction = m_databaseBackend->transaction(nameList.get(), mode, timeout);
+ if (!transaction)
+ return 0;
+ return new WebIDBTransactionImpl(transaction);
+}
+
} // namespace WebCore
#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/WebIDBDatabaseImpl.h b/WebKit/chromium/src/WebIDBDatabaseImpl.h
index 46a6609..9ae74e0 100644
--- a/WebKit/chromium/src/WebIDBDatabaseImpl.h
+++ b/WebKit/chromium/src/WebIDBDatabaseImpl.h
@@ -36,6 +36,7 @@ namespace WebCore { class IDBDatabaseBackendInterface; }
namespace WebKit {
class WebIDBObjectStore;
+class WebIDBTransaction;
// See comment in WebIndexedDatabase for a high level overview these classes.
class WebIDBDatabaseImpl : public WebIDBDatabase {
@@ -51,6 +52,7 @@ public:
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 WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout);
private:
WTF::RefPtr<WebCore::IDBDatabaseBackendInterface> m_databaseBackend;
diff --git a/WebKit/chromium/src/WebIDBFactoryImpl.cpp b/WebKit/chromium/src/WebIDBFactoryImpl.cpp
index 5ac89f4..564be36 100755
--- a/WebKit/chromium/src/WebIDBFactoryImpl.cpp
+++ b/WebKit/chromium/src/WebIDBFactoryImpl.cpp
@@ -63,6 +63,15 @@ void WebIDBFactoryImpl::open(const WebString& name, const WebString& description
m_idbFactoryBackend->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0);
}
+void WebIDBFactoryImpl::abortPendingTransactions(const WebVector<int>& pendingIDs)
+{
+ WTF::Vector<int> ids(pendingIDs.size());
+ for (size_t i = 0; i < pendingIDs.size(); ++i)
+ ids[i] = pendingIDs[i];
+
+ m_idbFactoryBackend->abortPendingTransactions(ids);
+}
+
} // namespace WebKit
#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/WebIDBFactoryImpl.h b/WebKit/chromium/src/WebIDBFactoryImpl.h
index c9ec9a3..aeab478 100755
--- a/WebKit/chromium/src/WebIDBFactoryImpl.h
+++ b/WebKit/chromium/src/WebIDBFactoryImpl.h
@@ -43,6 +43,7 @@ public:
virtual ~WebIDBFactoryImpl();
virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*);
+ virtual void abortPendingTransactions(const WebVector<int>& pendingIDs);
private:
WTF::RefPtr<WebCore::IDBFactoryBackendInterface> m_idbFactoryBackend;
diff --git a/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp b/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp
new file mode 100644
index 0000000..264ddc5
--- /dev/null
+++ b/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.cpp
@@ -0,0 +1,56 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebIDBTransactionCallbacksImpl.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBTransactionCallbacks.h"
+
+namespace WebCore {
+
+WebIDBTransactionCallbacksImpl::WebIDBTransactionCallbacksImpl(PassRefPtr<IDBTransactionCallbacks> callbacks)
+ : m_callbacks(callbacks)
+{
+}
+
+WebIDBTransactionCallbacksImpl::~WebIDBTransactionCallbacksImpl()
+{
+}
+
+void WebIDBTransactionCallbacksImpl::onAbort()
+{
+ m_callbacks->onAbort();
+}
+
+int WebIDBTransactionCallbacksImpl::id() const
+{
+ return m_callbacks->id();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h b/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h
new file mode 100644
index 0000000..398a679a
--- /dev/null
+++ b/WebKit/chromium/src/WebIDBTransactionCallbacksImpl.h
@@ -0,0 +1,55 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebIDBTransactionCallbacksImpl_h
+#define WebIDBTransactionCallbacksImpl_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "WebIDBTransactionCallbacks.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+
+class IDBTransactionCallbacks;
+
+class WebIDBTransactionCallbacksImpl : public WebKit::WebIDBTransactionCallbacks {
+public:
+ WebIDBTransactionCallbacksImpl(PassRefPtr<IDBTransactionCallbacks>);
+ virtual ~WebIDBTransactionCallbacksImpl();
+
+ virtual void onAbort();
+ virtual int id() const;
+
+private:
+ RefPtr<IDBTransactionCallbacks> m_callbacks;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // WebIDBTransactionCallbacksImpl_h
diff --git a/WebKit/chromium/src/WebIDBTransactionImpl.cpp b/WebKit/chromium/src/WebIDBTransactionImpl.cpp
new file mode 100644
index 0000000..0dc9702
--- /dev/null
+++ b/WebKit/chromium/src/WebIDBTransactionImpl.cpp
@@ -0,0 +1,80 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebIDBTransactionImpl.h"
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "IDBTransaction.h"
+#include "IDBTransactionCallbacksProxy.h"
+#include "WebIDBObjectStoreImpl.h"
+#include "WebIDBTransactionCallbacks.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebIDBTransactionImpl::WebIDBTransactionImpl(PassRefPtr<IDBTransactionBackendInterface> backend)
+ : m_backend(backend)
+{
+}
+
+WebIDBTransactionImpl::~WebIDBTransactionImpl()
+{
+}
+
+int WebIDBTransactionImpl::mode() const
+{
+ return m_backend->mode();
+}
+
+WebIDBObjectStore* WebIDBTransactionImpl::objectStore(const WebString& name)
+{
+ RefPtr<IDBObjectStoreBackendInterface> objectStore = m_backend->objectStore(name);
+ if (!objectStore)
+ return 0;
+ return new WebIDBObjectStoreImpl(objectStore);
+}
+
+void WebIDBTransactionImpl::abort()
+{
+ m_backend->abort();
+}
+
+int WebIDBTransactionImpl::id() const
+{
+ return m_backend->id();
+}
+
+void WebIDBTransactionImpl::setCallbacks(WebIDBTransactionCallbacks* callbacks)
+{
+ RefPtr<IDBTransactionCallbacks> idbCallbacks = IDBTransactionCallbacksProxy::create(callbacks);
+ m_backend->setCallbacks(idbCallbacks.get());
+}
+
+} // namespace WebKit
+
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/WebIDBTransactionImpl.h b/WebKit/chromium/src/WebIDBTransactionImpl.h
new file mode 100644
index 0000000..a9bde68
--- /dev/null
+++ b/WebKit/chromium/src/WebIDBTransactionImpl.h
@@ -0,0 +1,60 @@
+/*
+ * 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:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebIDBTransactionImpl_h
+#define WebIDBTransactionImpl_h
+
+#if ENABLE(INDEXED_DATABASE)
+
+#include "WebCommon.h"
+#include "WebIDBTransaction.h"
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+namespace WebCore { class IDBTransactionBackendInterface; }
+
+namespace WebKit {
+
+// See comment in WebIndexedDatabase for a high level overview these classes.
+class WebIDBTransactionImpl: public WebIDBTransaction {
+public:
+ WebIDBTransactionImpl(WTF::PassRefPtr<WebCore::IDBTransactionBackendInterface>);
+ virtual ~WebIDBTransactionImpl();
+
+ virtual int mode() const;
+ virtual WebIDBObjectStore* objectStore(const WebString& name);
+ virtual void abort();
+ virtual int id() const;
+ virtual void setCallbacks(WebIDBTransactionCallbacks*);
+
+private:
+ WTF::RefPtr<WebCore::IDBTransactionBackendInterface> m_backend;
+};
+
+} // namespace WebKit
+
+#endif // ENABLE(INDEXED_DATABASE)
+
+#endif // WebIDBTransactionImpl_h
diff --git a/WebKit/chromium/src/WebImageDecoder.cpp b/WebKit/chromium/src/WebImageDecoder.cpp
index 9e1d1f4..160deee 100644
--- a/WebKit/chromium/src/WebImageDecoder.cpp
+++ b/WebKit/chromium/src/WebImageDecoder.cpp
@@ -56,10 +56,10 @@ void WebImageDecoder::init(Type type)
{
switch (type) {
case TypeBMP:
- m_private = new BMPImageDecoder();
+ m_private = new BMPImageDecoder(true);
break;
case TypeICO:
- m_private = new ICOImageDecoder();
+ m_private = new ICOImageDecoder(true);
break;
}
}
diff --git a/WebKit/chromium/src/WebInputEventConversion.cpp b/WebKit/chromium/src/WebInputEventConversion.cpp
index f47a4e8..24eb372 100644
--- a/WebKit/chromium/src/WebInputEventConversion.cpp
+++ b/WebKit/chromium/src/WebInputEventConversion.cpp
@@ -332,6 +332,11 @@ WebKeyboardEventBuilder::WebKeyboardEventBuilder(const KeyboardEvent& event)
modifiers = getWebInputModifiers(event);
timeStampSeconds = event.timeStamp() * 1.0e-3;
windowsKeyCode = event.keyCode();
+
+ // The platform keyevent does not exist if the event was created using
+ // initKeyboardEvent.
+ if (!event.keyEvent())
+ return;
nativeKeyCode = event.keyEvent()->nativeVirtualKeyCode();
unsigned int numChars = std::min(event.keyEvent()->text().length(),
static_cast<unsigned int>(WebKeyboardEvent::textLengthCap));
diff --git a/WebKit/chromium/src/WebKit.cpp b/WebKit/chromium/src/WebKit.cpp
index 786d573..cadcb6c 100644
--- a/WebKit/chromium/src/WebKit.cpp
+++ b/WebKit/chromium/src/WebKit.cpp
@@ -46,11 +46,18 @@
namespace WebKit {
+// Make sure we are not re-initialized in the same address space.
+// Doing so may cause hard to reproduce crashes.
+static bool s_webKitInitialized = false;
+
static WebKitClient* s_webKitClient = 0;
static bool s_layoutTestMode = false;
void initialize(WebKitClient* webKitClient)
{
+ ASSERT(!s_webKitInitialized);
+ s_webKitInitialized = true;
+
ASSERT(webKitClient);
ASSERT(!s_webKitClient);
s_webKitClient = webKitClient;
diff --git a/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp b/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
index 8f210a0..f0ece0d 100644
--- a/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
+++ b/WebKit/chromium/src/WebMediaPlayerClientImpl.cpp
@@ -22,6 +22,8 @@
#include "RenderLayerCompositor.h"
#endif
+#include "VideoFrameChromium.h"
+#include "VideoFrameChromiumImpl.h"
#include "WebCanvas.h"
#include "WebCString.h"
#include "WebFrameClient.h"
@@ -416,6 +418,28 @@ MediaPlayer::MovieLoadType WebMediaPlayerClientImpl::movieLoadType() const
return MediaPlayer::Unknown;
}
+VideoFrameChromium* WebMediaPlayerClientImpl::getCurrentFrame()
+{
+ VideoFrameChromium* videoFrame = 0;
+ if (m_webMediaPlayer.get()) {
+ WebVideoFrame* webkitVideoFrame = m_webMediaPlayer->getCurrentFrame();
+ if (webkitVideoFrame)
+ videoFrame = new VideoFrameChromiumImpl(webkitVideoFrame);
+ }
+ return videoFrame;
+}
+
+void WebMediaPlayerClientImpl::putCurrentFrame(VideoFrameChromium* videoFrame)
+{
+ if (videoFrame) {
+ if (m_webMediaPlayer.get()) {
+ m_webMediaPlayer->putCurrentFrame(
+ VideoFrameChromiumImpl::toWebVideoFrame(videoFrame));
+ }
+ delete videoFrame;
+ }
+}
+
MediaPlayerPrivateInterface* WebMediaPlayerClientImpl::create(MediaPlayer* player)
{
WebMediaPlayerClientImpl* client = new WebMediaPlayerClientImpl();
@@ -433,7 +457,7 @@ MediaPlayerPrivateInterface* WebMediaPlayerClientImpl::create(MediaPlayer* playe
frame->contentRenderer()->compositor()->hasAcceleratedCompositing();
if (client->m_supportsAcceleratedCompositing)
- client->m_videoLayer = VideoLayerChromium::create(0);
+ 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 df179a8..e014871 100644
--- a/WebKit/chromium/src/WebMediaPlayerClientImpl.h
+++ b/WebKit/chromium/src/WebMediaPlayerClientImpl.h
@@ -34,6 +34,8 @@
#if ENABLE(VIDEO)
#include "MediaPlayerPrivate.h"
+#include "VideoFrameChromium.h"
+#include "VideoFrameProvider.h"
#include "WebMediaPlayerClient.h"
#include <wtf/OwnPtr.h>
@@ -44,8 +46,10 @@ class WebMediaPlayer;
// This class serves as a bridge between WebCore::MediaPlayer and
// WebKit::WebMediaPlayer.
-class WebMediaPlayerClientImpl : public WebMediaPlayerClient
- , public WebCore::MediaPlayerPrivateInterface {
+class WebMediaPlayerClientImpl : public WebCore::MediaPlayerPrivateInterface
+ , public WebCore::VideoFrameProvider
+ , public WebMediaPlayerClient {
+
public:
static bool isEnabled();
static void setIsEnabled(bool);
@@ -110,6 +114,10 @@ public:
virtual WebCore::MediaPlayer::MovieLoadType movieLoadType() const;
+ // VideoFrameProvider methods:
+ virtual WebCore::VideoFrameChromium* getCurrentFrame();
+ virtual void putCurrentFrame(WebCore::VideoFrameChromium*);
+
private:
WebMediaPlayerClientImpl();
diff --git a/WebKit/chromium/src/WebNode.cpp b/WebKit/chromium/src/WebNode.cpp
index 69c35e7..caea589 100644
--- a/WebKit/chromium/src/WebNode.cpp
+++ b/WebKit/chromium/src/WebNode.cpp
@@ -38,9 +38,9 @@
#include "NodeList.h"
#include "EventListenerWrapper.h"
+#include "WebDOMEvent.h"
+#include "WebDOMEventListener.h"
#include "WebDocument.h"
-#include "WebEvent.h"
-#include "WebEventListener.h"
#include "WebFrameImpl.h"
#include "WebNodeList.h"
#include "WebString.h"
@@ -79,7 +79,7 @@ WebNode::NodeType WebNode::nodeType() const
WebNode WebNode::parentNode() const
{
- return WebNode(const_cast<Node*>(m_private->parentNode()));
+ return WebNode(const_cast<ContainerNode*>(m_private->parentNode()));
}
WebString WebNode::nodeName() const
@@ -149,7 +149,7 @@ bool WebNode::isElementNode() const
return m_private->isElementNode();
}
-void WebNode::addEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture)
+void WebNode::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture)
{
EventListenerWrapper* listenerWrapper =
listener->createEventListenerWrapper(eventType, useCapture, m_private.get());
@@ -159,7 +159,7 @@ void WebNode::addEventListener(const WebString& eventType, WebEventListener* lis
m_private->addEventListener(eventType, adoptRef(listenerWrapper), useCapture);
}
-void WebNode::removeEventListener(const WebString& eventType, WebEventListener* listener, bool useCapture)
+void WebNode::removeEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture)
{
EventListenerWrapper* listenerWrapper =
listener->getEventListenerWrapper(eventType, useCapture, m_private.get());
diff --git a/WebKit/chromium/src/WebPageSerializerImpl.cpp b/WebKit/chromium/src/WebPageSerializerImpl.cpp
index e65af85..885ee25 100644
--- a/WebKit/chromium/src/WebPageSerializerImpl.cpp
+++ b/WebKit/chromium/src/WebPageSerializerImpl.cpp
@@ -380,9 +380,8 @@ void WebPageSerializerImpl::endTagToString(const Element* element,
// Check whether we have to write end tag for empty element.
if (param->isHTMLDocument) {
result += ">";
- const HTMLElement* htmlElement =
- static_cast<const HTMLElement*>(element);
- if (htmlElement->endTagRequirement() == TagStatusRequired) {
+ // FIXME: This code is horribly wrong. WebPageSerializerImpl must die.
+ if (!static_cast<const HTMLElement*>(element)->ieForbidsInsertHTML()) {
// We need to write end tag when it is required.
result += "</";
result += element->nodeName().lower();
diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp
index 6569e2e..329027c 100644
--- a/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -284,11 +284,6 @@ void WebSettingsImpl::setAccelerated2dCanvasEnabled(bool enabled)
m_settings->setAccelerated2dCanvasEnabled(enabled);
}
-void WebSettingsImpl::setHTML5ParserEnabled(bool enabled)
-{
- m_settings->setHTML5ParserEnabled(enabled);
-}
-
void WebSettingsImpl::setMemoryInfoEnabled(bool enabled)
{
m_settings->setMemoryInfoEnabled(enabled);
diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h
index 9eedba8..0120dbc 100644
--- a/WebKit/chromium/src/WebSettingsImpl.h
+++ b/WebKit/chromium/src/WebSettingsImpl.h
@@ -88,7 +88,6 @@ public:
virtual void setEditingBehavior(EditingBehavior);
virtual void setAcceleratedCompositingEnabled(bool);
virtual void setAccelerated2dCanvasEnabled(bool);
- virtual void setHTML5ParserEnabled(bool);
virtual void setMemoryInfoEnabled(bool);
private:
diff --git a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
index 57e3635..60c4fed 100644
--- a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
+++ b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.cpp
@@ -33,6 +33,7 @@
#include "PlatformString.h"
#include "SpeechInputClientMock.h"
+#include "WebRect.h"
namespace WebKit {
@@ -74,9 +75,9 @@ void WebSpeechInputControllerMockImpl::setRecognitionResult(int requestId, const
m_listener->setRecognitionResult(requestId, result);
}
-bool WebSpeechInputControllerMockImpl::startRecognition(int requestId)
+bool WebSpeechInputControllerMockImpl::startRecognition(int requestId, const WebRect& elementRect)
{
- return m_webcoreMock->startRecognition(requestId);
+ return m_webcoreMock->startRecognition(requestId, elementRect);
}
void WebSpeechInputControllerMockImpl::cancelRecognition(int requestId)
diff --git a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
index 38a15df..edbfca3 100644
--- a/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
+++ b/WebKit/chromium/src/WebSpeechInputControllerMockImpl.h
@@ -43,6 +43,8 @@ class SpeechInputClientMock;
namespace WebKit {
+struct WebRect;
+
class WebSpeechInputControllerMockImpl : public WebCore::SpeechInputListener
, public WebSpeechInputControllerMock {
public:
@@ -55,7 +57,7 @@ public:
void setRecognitionResult(int requestId, const WTF::String& result);
// WebSpeechInputController methods.
- bool startRecognition(int requestId);
+ bool startRecognition(int requestId, const WebRect& elementRect);
void cancelRecognition(int requestId);
void stopRecording(int requestId);
diff --git a/WebKit/chromium/src/WebURLRequest.cpp b/WebKit/chromium/src/WebURLRequest.cpp
index 69dfac4..2950076 100644
--- a/WebKit/chromium/src/WebURLRequest.cpp
+++ b/WebKit/chromium/src/WebURLRequest.cpp
@@ -55,6 +55,8 @@ public:
: m_resourceRequestAllocation(*p->m_resourceRequest)
{
m_resourceRequest = &m_resourceRequestAllocation;
+ m_allowStoredCredentials = p->m_allowStoredCredentials;
+ m_downloadToFile = p->m_downloadToFile;
}
virtual void dispose() { delete this; }
diff --git a/WebKit/chromium/src/WebURLResponse.cpp b/WebKit/chromium/src/WebURLResponse.cpp
index 0511f8d..aae413c 100644
--- a/WebKit/chromium/src/WebURLResponse.cpp
+++ b/WebKit/chromium/src/WebURLResponse.cpp
@@ -59,6 +59,7 @@ public:
: m_resourceResponseAllocation(*p->m_resourceResponse)
{
m_resourceResponse = &m_resourceResponseAllocation;
+ m_downloadFilePath = p->m_downloadFilePath;
}
virtual void dispose() { delete this; }
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 62b20d5..383b716 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -88,6 +88,7 @@
#include "Settings.h"
#include "Timer.h"
#include "TypingCommand.h"
+#include "UserGestureIndicator.h"
#include "Vector.h"
#include "WebAccessibilityObject.h"
#include "WebDevToolsAgentPrivate.h"
@@ -980,6 +981,8 @@ const WebInputEvent* WebViewImpl::m_currentInputEvent = 0;
bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
{
+ UserGestureIndicator gestureIndicator(DefinitelyProcessingUserGesture);
+
// If we've started a drag and drop operation, ignore input events until
// we're done.
if (m_doingDragAndDrop)
diff --git a/WebKit/chromium/src/js/DebuggerScript.js b/WebKit/chromium/src/js/DebuggerScript.js
index 51787f6..5a8a7bf 100644
--- a/WebKit/chromium/src/js/DebuggerScript.js
+++ b/WebKit/chromium/src/js/DebuggerScript.js
@@ -32,7 +32,6 @@
var DebuggerScript = {};
DebuggerScript._breakpoints = {};
-DebuggerScript._breakpointsActivated = true;
DebuggerScript.PauseOnExceptionsState = {
DontPauseOnExceptions : 0,
@@ -95,7 +94,7 @@ DebuggerScript.setBreakpoint = function(execState, args)
{
args.lineNumber = DebuggerScript._webkitToV8LineNumber(args.lineNumber);
var breakId = Debug.setScriptBreakPointById(args.scriptId, args.lineNumber, 0 /* column */, args.condition);
- if (!args.enabled || !DebuggerScript._breakpointsActivated)
+ if (!args.enabled)
Debug.disableScriptBreakPoint(breakId);
var locations = Debug.findBreakPointActualLocations(breakId);
@@ -198,14 +197,7 @@ DebuggerScript.clearBreakpoints = function(execState, args)
DebuggerScript.setBreakpointsActivated = function(execState, args)
{
- for (var key in DebuggerScript._breakpoints) {
- var breakId = DebuggerScript._breakpoints[key];
- if (args.enabled)
- Debug.enableScriptBreakPoint(breakId);
- else
- Debug.disableScriptBreakPoint(breakId);
- }
- DebuggerScript._breakpointsActivated = args.enabled;
+ Debug.debuggerFlags().breakPointsActive.setValue(args.enabled);
}
DebuggerScript._frameMirrorToJSCallFrame = function(frameMirror, callerFrame)
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index 0fd66c9..e3e0204 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -74,6 +74,7 @@ WebInspector.loaded = function()
Preferences.profilerAlwaysEnabled = true;
Preferences.canEditScriptSource = true;
Preferences.onlineDetectionEnabled = false;
+ Preferences.domBreakpointsEnabled = true;
oldLoaded.call(WebInspector);
}
diff --git a/WebKit/chromium/tests/RunAllTests.cpp b/WebKit/chromium/tests/RunAllTests.cpp
index 0f3f82f..cfcfbee 100644
--- a/WebKit/chromium/tests/RunAllTests.cpp
+++ b/WebKit/chromium/tests/RunAllTests.cpp
@@ -33,18 +33,15 @@
#include "WebKit.h"
#include "WebKitClient.h"
-
-// WebKitClient has a protected destructor, so we need to subclass.
-class DummyWebKitClient : public WebKit::WebKitClient {
-};
+#include <webkit/support/webkit_support.h>
int main(int argc, char** argv)
{
- DummyWebKitClient dummyClient;
- WebKit::initialize(&dummyClient);
-
- int result = TestSuite(argc, argv).Run();
-
- WebKit::shutdown();
+ TestSuite testSuite(argc, argv);
+ // TestSuite must be created before SetUpTestEnvironment so it performs
+ // initializations needed by WebKit support.
+ webkit_support::SetUpTestEnvironmentForUnitTests();
+ int result = testSuite.Run();
+ webkit_support::TearDownTestEnvironment();
return result;
}
diff --git a/WebKit/chromium/tests/TilingDataTest.cpp b/WebKit/chromium/tests/TilingDataTest.cpp
index 463542b..ec18f01 100755
--- a/WebKit/chromium/tests/TilingDataTest.cpp
+++ b/WebKit/chromium/tests/TilingDataTest.cpp
@@ -30,7 +30,8 @@
#include "config.h"
-#include "GLES2Texture.h"
+#include "TilingData.h"
+
#include <gtest/gtest.h>
using namespace WebCore;
@@ -220,4 +221,114 @@ TEST(TilingDataTest, tileSizeY)
EXPECT_EQ(3, TilingData(5, 12, 12, true).tileSizeY(2));
}
+TEST(TilingDataTest, tileSizeX_and_tilePositionX)
+{
+ // Single tile cases:
+ EXPECT_EQ(1, TilingData(3, 1, 1, false).tileSizeX(0));
+ EXPECT_EQ(0, TilingData(3, 1, 1, false).tilePositionX(0));
+ EXPECT_EQ(1, TilingData(3, 1, 100, false).tileSizeX(0));
+ EXPECT_EQ(0, TilingData(3, 1, 100, false).tilePositionX(0));
+ EXPECT_EQ(3, TilingData(3, 3, 1, false).tileSizeX(0));
+ EXPECT_EQ(0, TilingData(3, 3, 1, false).tilePositionX(0));
+ EXPECT_EQ(3, TilingData(3, 3, 100, false).tileSizeX(0));
+ EXPECT_EQ(0, TilingData(3, 3, 100, false).tilePositionX(0));
+ EXPECT_EQ(1, TilingData(3, 1, 1, true).tileSizeX(0));
+ EXPECT_EQ(0, TilingData(3, 1, 1, true).tilePositionX(0));
+ EXPECT_EQ(1, TilingData(3, 1, 100, true).tileSizeX(0));
+ EXPECT_EQ(0, TilingData(3, 1, 100, true).tilePositionX(0));
+ EXPECT_EQ(3, TilingData(3, 3, 1, true).tileSizeX(0));
+ EXPECT_EQ(0, TilingData(3, 3, 1, true).tilePositionX(0));
+ EXPECT_EQ(3, TilingData(3, 3, 100, true).tileSizeX(0));
+ EXPECT_EQ(0, TilingData(3, 3, 100, true).tilePositionX(0));
+
+ // Multiple tiles:
+ // no border
+ // positions 0, 3
+ EXPECT_EQ(2, TilingData(3, 6, 1, false).numTiles());
+ EXPECT_EQ(3, TilingData(3, 6, 1, false).tileSizeX(0));
+ EXPECT_EQ(3, TilingData(3, 6, 1, false).tileSizeX(1));
+ EXPECT_EQ(0, TilingData(3, 6, 1, false).tilePositionX(0));
+ EXPECT_EQ(3, TilingData(3, 6, 1, false).tilePositionX(1));
+ EXPECT_EQ(3, TilingData(3, 6, 100, false).tileSizeX(0));
+ EXPECT_EQ(3, TilingData(3, 6, 100, false).tileSizeX(1));
+ EXPECT_EQ(0, TilingData(3, 6, 100, false).tilePositionX(0));
+ EXPECT_EQ(3, TilingData(3, 6, 100, false).tilePositionX(1));
+
+ // Multiple tiles:
+ // with border
+ // positions 0, 2, 3, 4
+ EXPECT_EQ(4, TilingData(3, 6, 1, true).numTiles());
+ EXPECT_EQ(2, TilingData(3, 6, 1, true).tileSizeX(0));
+ EXPECT_EQ(1, TilingData(3, 6, 1, true).tileSizeX(1));
+ EXPECT_EQ(1, TilingData(3, 6, 1, true).tileSizeX(2));
+ EXPECT_EQ(2, TilingData(3, 6, 1, true).tileSizeX(3));
+ EXPECT_EQ(0, TilingData(3, 6, 1, true).tilePositionX(0));
+ EXPECT_EQ(2, TilingData(3, 6, 1, true).tilePositionX(1));
+ EXPECT_EQ(3, TilingData(3, 6, 1, true).tilePositionX(2));
+ EXPECT_EQ(4, TilingData(3, 6, 1, true).tilePositionX(3));
+ EXPECT_EQ(2, TilingData(3, 6, 100, true).tileSizeX(0));
+ EXPECT_EQ(1, TilingData(3, 6, 100, true).tileSizeX(1));
+ EXPECT_EQ(1, TilingData(3, 6, 100, true).tileSizeX(2));
+ EXPECT_EQ(2, TilingData(3, 6, 100, true).tileSizeX(3));
+ EXPECT_EQ(0, TilingData(3, 6, 100, true).tilePositionX(0));
+ EXPECT_EQ(2, TilingData(3, 6, 100, true).tilePositionX(1));
+ EXPECT_EQ(3, TilingData(3, 6, 100, true).tilePositionX(2));
+ EXPECT_EQ(4, TilingData(3, 6, 100, true).tilePositionX(3));
+}
+
+TEST(TilingDataTest, tileSizeY_and_tilePositionY)
+{
+ // Single tile cases:
+ EXPECT_EQ(1, TilingData(3, 1, 1, false).tileSizeY(0));
+ EXPECT_EQ(0, TilingData(3, 1, 1, false).tilePositionY(0));
+ EXPECT_EQ(1, TilingData(3, 100, 1, false).tileSizeY(0));
+ EXPECT_EQ(0, TilingData(3, 100, 1, false).tilePositionY(0));
+ EXPECT_EQ(3, TilingData(3, 1, 3, false).tileSizeY(0));
+ EXPECT_EQ(0, TilingData(3, 1, 3, false).tilePositionY(0));
+ EXPECT_EQ(3, TilingData(3, 100, 3, false).tileSizeY(0));
+ EXPECT_EQ(0, TilingData(3, 100, 3, false).tilePositionY(0));
+ EXPECT_EQ(1, TilingData(3, 1, 1, true).tileSizeY(0));
+ EXPECT_EQ(0, TilingData(3, 1, 1, true).tilePositionY(0));
+ EXPECT_EQ(1, TilingData(3, 100, 1, true).tileSizeY(0));
+ EXPECT_EQ(0, TilingData(3, 100, 1, true).tilePositionY(0));
+ EXPECT_EQ(3, TilingData(3, 1, 3, true).tileSizeY(0));
+ EXPECT_EQ(0, TilingData(3, 1, 3, true).tilePositionY(0));
+ EXPECT_EQ(3, TilingData(3, 100, 3, true).tileSizeY(0));
+ EXPECT_EQ(0, TilingData(3, 100, 3, true).tilePositionY(0));
+
+ // Multiple tiles:
+ // no border
+ // positions 0, 3
+ EXPECT_EQ(2, TilingData(3, 1, 6, false).numTiles());
+ EXPECT_EQ(3, TilingData(3, 1, 6, false).tileSizeY(0));
+ EXPECT_EQ(3, TilingData(3, 1, 6, false).tileSizeY(1));
+ EXPECT_EQ(0, TilingData(3, 1, 6, false).tilePositionY(0));
+ EXPECT_EQ(3, TilingData(3, 1, 6, false).tilePositionY(1));
+ EXPECT_EQ(3, TilingData(3, 100, 6, false).tileSizeY(0));
+ EXPECT_EQ(3, TilingData(3, 100, 6, false).tileSizeY(1));
+ EXPECT_EQ(0, TilingData(3, 100, 6, false).tilePositionY(0));
+ EXPECT_EQ(3, TilingData(3, 100, 6, false).tilePositionY(1));
+
+ // Multiple tiles:
+ // with border
+ // positions 0, 2, 3, 4
+ EXPECT_EQ(4, TilingData(3, 1, 6, true).numTiles());
+ EXPECT_EQ(2, TilingData(3, 1, 6, true).tileSizeY(0));
+ EXPECT_EQ(1, TilingData(3, 1, 6, true).tileSizeY(1));
+ EXPECT_EQ(1, TilingData(3, 1, 6, true).tileSizeY(2));
+ EXPECT_EQ(2, TilingData(3, 1, 6, true).tileSizeY(3));
+ EXPECT_EQ(0, TilingData(3, 1, 6, true).tilePositionY(0));
+ EXPECT_EQ(2, TilingData(3, 1, 6, true).tilePositionY(1));
+ EXPECT_EQ(3, TilingData(3, 1, 6, true).tilePositionY(2));
+ EXPECT_EQ(4, TilingData(3, 1, 6, true).tilePositionY(3));
+ EXPECT_EQ(2, TilingData(3, 100, 6, true).tileSizeY(0));
+ EXPECT_EQ(1, TilingData(3, 100, 6, true).tileSizeY(1));
+ EXPECT_EQ(1, TilingData(3, 100, 6, true).tileSizeY(2));
+ EXPECT_EQ(2, TilingData(3, 100, 6, true).tileSizeY(3));
+ EXPECT_EQ(0, TilingData(3, 100, 6, true).tilePositionY(0));
+ EXPECT_EQ(2, TilingData(3, 100, 6, true).tilePositionY(1));
+ EXPECT_EQ(3, TilingData(3, 100, 6, true).tilePositionY(2));
+ EXPECT_EQ(4, TilingData(3, 100, 6, true).tilePositionY(3));
+}
+
} // namespace
diff --git a/WebKit/chromium/tests/WebFrameTest.cpp b/WebKit/chromium/tests/WebFrameTest.cpp
new file mode 100644
index 0000000..cf91cb4
--- /dev/null
+++ b/WebKit/chromium/tests/WebFrameTest.cpp
@@ -0,0 +1,112 @@
+/*
+ * 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 <googleurl/src/gurl.h>
+#include <gtest/gtest.h>
+#include <webkit/support/webkit_support.h>
+#include "WebFrame.h"
+#include "WebFrameClient.h"
+#include "WebString.h"
+#include "WebURL.h"
+#include "WebURLRequest.h"
+#include "WebURLResponse.h"
+#include "WebView.h"
+
+using namespace WebKit;
+
+namespace {
+
+class WebFrameTest : public testing::Test {
+public:
+ WebFrameTest() {}
+
+ virtual void TearDown()
+ {
+ webkit_support::UnregisterAllMockedURLs();
+ }
+
+ void registerMockedURLLoad(const WebURL& url, const WebURLResponse& response, const WebString& fileName)
+ {
+ std::string filePath = webkit_support::GetWebKitRootDir().utf8();
+ filePath.append("/WebKit/chromium/tests/data/");
+ filePath.append(fileName.utf8());
+ webkit_support::RegisterMockedURL(url, response, WebString::fromUTF8(filePath));
+ }
+
+ void serveRequests()
+ {
+ webkit_support::ServeAsynchronousMockedRequests();
+ }
+};
+
+class TestWebFrameClient : public WebFrameClient {
+};
+
+TEST_F(WebFrameTest, ContentText)
+{
+ // Register our resources.
+ WebURLResponse response;
+ response.initialize();
+ response.setMIMEType("text/html");
+ std::string rootURL = "http://www.test.com/";
+ const char* files[] = { "iframes_test.html", "visible_iframe.html",
+ "invisible_iframe.html", "zero_sized_iframe.html" };
+ for (int i = 0; i < (sizeof(files) / sizeof(char*)); ++i) {
+ WebURL webURL = GURL(rootURL + files[i]);
+ registerMockedURLLoad(webURL, response, WebString::fromUTF8(files[i]));
+ }
+
+ // Create and initialize the WebView.
+ TestWebFrameClient webFrameClient;
+ WebView* webView = WebView::create(0, 0);
+ webView->initializeMainFrame(&webFrameClient);
+
+ // Load the main frame URL.
+ WebURL testURL(GURL(rootURL + files[0]));
+ WebURLRequest urlRequest;
+ urlRequest.initialize();
+ urlRequest.setURL(testURL);
+ webView->mainFrame()->loadRequest(urlRequest);
+
+ // Load all pending asynchronous requests.
+ serveRequests();
+
+ // Now retrieve the frames text and test it only includes visible elements.
+ std::string content = webView->mainFrame()->contentAsText(1024).utf8();
+ EXPECT_NE(std::string::npos, content.find(" visible paragraph"));
+ EXPECT_NE(std::string::npos, content.find(" visible iframe"));
+ EXPECT_EQ(std::string::npos, content.find(" invisible pararaph"));
+ EXPECT_EQ(std::string::npos, content.find(" invisible iframe"));
+ EXPECT_EQ(std::string::npos, content.find("iframe with zero size"));
+
+ webView->close();
+}
+
+}
diff --git a/WebKit/chromium/tests/data/iframes_test.html b/WebKit/chromium/tests/data/iframes_test.html
new file mode 100644
index 0000000..425709b
--- /dev/null
+++ b/WebKit/chromium/tests/data/iframes_test.html
@@ -0,0 +1,9 @@
+<html>
+ <body>
+ <iframe src="visible_iframe.html"></iframe>
+ <iframe width=0 height=0 src="zero_sized_iframe.html"></iframe>
+ <iframe style="visibility:hidden;" src="invisible_iframe.html"></iframe>
+ <p>This is a visible paragraph.</p>
+ <p style="visibility:hidden;">This is an invisible paragraph.</p>
+ </body>
+</html>
diff --git a/WebKit/chromium/tests/data/invisible_iframe.html b/WebKit/chromium/tests/data/invisible_iframe.html
new file mode 100644
index 0000000..e5686c7
--- /dev/null
+++ b/WebKit/chromium/tests/data/invisible_iframe.html
@@ -0,0 +1,5 @@
+<html>
+ <body>
+ This is an invisible frame.
+ </body>
+</html>
diff --git a/WebKit/chromium/tests/data/visible_iframe.html b/WebKit/chromium/tests/data/visible_iframe.html
new file mode 100644
index 0000000..291af3d
--- /dev/null
+++ b/WebKit/chromium/tests/data/visible_iframe.html
@@ -0,0 +1,5 @@
+<html>
+ <body>
+ This is a visible iframe.
+ </body>
+</html>
diff --git a/WebKit/chromium/tests/data/zero_sized_iframe.html b/WebKit/chromium/tests/data/zero_sized_iframe.html
new file mode 100644
index 0000000..6728cab
--- /dev/null
+++ b/WebKit/chromium/tests/data/zero_sized_iframe.html
@@ -0,0 +1,5 @@
+<html>
+ <body>
+ This is an iframe with zero size.
+ </body>
+</html>
diff --git a/WebKit/efl/CMakeListsEfl.txt b/WebKit/efl/CMakeListsEfl.txt
index e5fb9ef..cdb24ff 100644
--- a/WebKit/efl/CMakeListsEfl.txt
+++ b/WebKit/efl/CMakeListsEfl.txt
@@ -49,6 +49,10 @@ LIST(APPEND WebKit_LIBRARIES
${LIBXML2_LIBRARIES}
${Pango_LIBRARIES}
${SQLITE_LIBRARIES}
+ ${FONTCONFIG_LIBRARIES}
+ ${PNG_LIBRARY}
+ ${JPEG_LIBRARY}
+ ${CMAKE_DL_LIBS}
)
IF (ENABLE_GLIB_SUPPORT)
@@ -173,7 +177,7 @@ IF (ENABLE_GLIB_SUPPORT)
LIST(APPEND EWebLauncher_LIBRARIES
${Gdk_LIBRARIES}
${Glib_LIBRARIES}
- ${GTHREAD_LIBRARIES}
+ ${Gthread_LIBRARIES}
)
ENDIF ()
diff --git a/WebKit/efl/ChangeLog b/WebKit/efl/ChangeLog
index de65885..e1ce89a 100644
--- a/WebKit/efl/ChangeLog
+++ b/WebKit/efl/ChangeLog
@@ -1,3 +1,83 @@
+2010-08-25 Jaehun Lim <ljaehun.lim@samsung.com>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] enable libsoup's content decode feature
+ https://bugs.webkit.org/show_bug.cgi?id=44147
+
+ libsoup's content decode feature is enabled during initializaton.
+
+ * ewk/ewk_main.cpp:
+ (ewk_init):
+
+2010-08-25 Rafael Antognolli <antognolli@profusion.mobi>
+
+ Unreviewed build fix.
+
+ [EFL] Build fix for revision 65332
+ https://bugs.webkit.org/show_bug.cgi?id=44543
+
+ Use Gthread_LIBRARIES instead of GTHREAD_LIBRARIES. This fix
+ the build when using ENABLE_GLIB_SUPPORT=ON and NETWORK_BACKEND=curl.
+
+ * CMakeListsEfl.txt:
+
+2010-08-24 Lukasz Slachciak <l.slachciak@samsung.com>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Extended EFL WebView API to allow enable/disable Frame Flattening
+ https://bugs.webkit.org/show_bug.cgi?id=44253
+
+ * ewk/ewk_view.cpp:
+ (ewk_view_setting_enable_frame_flattening_get):
+ (ewk_view_setting_enable_frame_flattening_set):
+ * ewk/ewk_view.h:
+
+2010-08-23 Leandro Pereira <leandro@profusion.mobi>
+
+ [EFL] Build fix for platforms that do not require linking with "dl".
+ CMake includes the variable CMAKE_DL_LIBS that evaluates to the
+ platform-specific libraries.
+
+ * CMakeListsEfl.txt: Use ${CMAKE_DL_LIBS} instead of dl.
+
+2010-08-22 Rafael Antognolli <antognolli@profusion.mobi>
+
+ Reviewed by Antonio Gomes.
+
+ [EFL] Remove duplicated include entry from default theme.
+ https://bugs.webkit.org/show_bug.cgi?id=44345
+
+ This used to create the group webkit/widget/entry twice in
+ the theme. It's leading to a bug with the newer versions of
+ EFL.
+
+ * DefaultTheme/default.edc:
+
+2010-08-22 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ Encapsulate document marker management into DocumentMarkerController
+ https://bugs.webkit.org/show_bug.cgi?id=44383
+
+ Modify call sites in the EFL port to use DocumentMarkerController.
+
+ No functionality was changed, so no new tests.
+
+ * ewk/ewk_frame.cpp:
+ (ewk_frame_text_matches_unmark_all):
+
+2010-08-20 Leandro Pereira <leandro@profusion.mobi>
+
+ [EFL] Unreviewed. Fix build when using GNU gold.
+ When linking with GNU gold, some symbols are not found: explicitly
+ link with the required libraries.
+
+ * CMakeListsEfl.txt: Depend on Fontconfig, PNG, JPEG and dl
+ libraries.
+
2010-08-15 Gyuyoung Kim <gyuyoung.kim@samsung.com>
Reviewed by Antonio Gomes.
diff --git a/WebKit/efl/DefaultTheme/default.edc b/WebKit/efl/DefaultTheme/default.edc
index e9f55f0..0496a24 100644
--- a/WebKit/efl/DefaultTheme/default.edc
+++ b/WebKit/efl/DefaultTheme/default.edc
@@ -63,7 +63,6 @@ collections {
}
#include "widget/button/button.edc"
-#include "widget/entry/entry.edc"
#include "widget/scrollbar/scrollbar.edc"
#include "widget/radio/radio.edc"
#include "widget/check/check.edc"
diff --git a/WebKit/efl/ewk/ewk_frame.cpp b/WebKit/efl/ewk/ewk_frame.cpp
index 296c261..7a2af5a 100644
--- a/WebKit/efl/ewk/ewk_frame.cpp
+++ b/WebKit/efl/ewk/ewk_frame.cpp
@@ -786,7 +786,7 @@ Eina_Bool ewk_frame_text_matches_unmark_all(Evas_Object* o)
EWK_FRAME_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
EINA_SAFETY_ON_NULL_RETURN_VAL(sd->frame, EINA_FALSE);
- sd->frame->document()->removeMarkers(WebCore::DocumentMarker::TextMatch);
+ sd->frame->document()->markers()->removeMarkers(WebCore::DocumentMarker::TextMatch);
return EINA_TRUE;
}
diff --git a/WebKit/efl/ewk/ewk_main.cpp b/WebKit/efl/ewk/ewk_main.cpp
index 5742766..1cd5e42 100644
--- a/WebKit/efl/ewk/ewk_main.cpp
+++ b/WebKit/efl/ewk/ewk_main.cpp
@@ -125,6 +125,7 @@ int ewk_init(void)
if (1) {
SoupSession* session = WebCore::ResourceHandle::defaultSession();
soup_session_add_feature_by_type(session, SOUP_TYPE_CONTENT_SNIFFER);
+ soup_session_add_feature_by_type(session, SOUP_TYPE_CONTENT_DECODER);
}
#endif
diff --git a/WebKit/efl/ewk/ewk_view.cpp b/WebKit/efl/ewk/ewk_view.cpp
index 7a98bac..4a100d7 100644
--- a/WebKit/efl/ewk/ewk_view.cpp
+++ b/WebKit/efl/ewk/ewk_view.cpp
@@ -102,6 +102,7 @@ struct _Ewk_View_Private_Data {
Eina_Bool auto_shrink_images:1;
Eina_Bool enable_scripts:1;
Eina_Bool enable_plugins:1;
+ Eina_Bool enable_frame_flattening:1;
Eina_Bool scripts_window_open:1;
Eina_Bool resizable_textareas:1;
Eina_Bool private_browsing:1;
@@ -589,6 +590,7 @@ static Ewk_View_Private_Data* _ewk_view_priv_new(Ewk_View_Smart_Data* sd)
priv->settings.auto_shrink_images = priv->page_settings->shrinksStandaloneImagesToFit();
priv->settings.enable_scripts = priv->page_settings->isJavaScriptEnabled();
priv->settings.enable_plugins = priv->page_settings->arePluginsEnabled();
+ priv->settings.enable_frame_flattening = priv->page_settings->frameFlatteningEnabled();
priv->settings.scripts_window_open = priv->page_settings->allowScriptsToCloseWindows();
priv->settings.resizable_textareas = priv->page_settings->textAreasAreResizable();
priv->settings.private_browsing = priv->page_settings->privateBrowsingEnabled();
@@ -2291,6 +2293,41 @@ Eina_Bool ewk_view_setting_enable_plugins_set(Evas_Object* o, Eina_Bool enable)
return EINA_TRUE;
}
+/**
+ * Get status of frame flattening.
+ *
+ * @param o view to check status
+ *
+ * @return EINA_TRUE if flattening is enabled, EINA_FALSE
+ * otherwise (errors, flattening disabled).
+ */
+Eina_Bool ewk_view_setting_enable_frame_flattening_get(const Evas_Object* o)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ return priv->settings.enable_frame_flattening;
+}
+
+/**
+ * Set frame flattening.
+ *
+ * @param o view to set flattening
+ *
+ * @return EINA_TRUE if flattening status set, EINA_FALSE
+ * otherwise (errors).
+ */
+Eina_Bool ewk_view_setting_enable_frame_flattening_set(Evas_Object* o, Eina_Bool enable)
+{
+ EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
+ EWK_VIEW_PRIV_GET_OR_RETURN(sd, priv, EINA_FALSE);
+ enable = !!enable;
+ if (priv->settings.enable_frame_flattening != enable) {
+ priv->page_settings->setFrameFlatteningEnabled(enable);
+ priv->settings.enable_frame_flattening = enable;
+ }
+ return EINA_TRUE;
+}
+
Eina_Bool ewk_view_setting_scripts_window_open_get(const Evas_Object* o)
{
EWK_VIEW_SD_GET_OR_RETURN(o, sd, EINA_FALSE);
diff --git a/WebKit/efl/ewk/ewk_view.h b/WebKit/efl/ewk/ewk_view.h
index 8dd6178..9d5997c 100644
--- a/WebKit/efl/ewk/ewk_view.h
+++ b/WebKit/efl/ewk/ewk_view.h
@@ -389,6 +389,9 @@ EAPI Eina_Bool ewk_view_setting_enable_scripts_set(Evas_Object *o, Eina_Bool
EAPI Eina_Bool ewk_view_setting_enable_plugins_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_enable_plugins_set(Evas_Object *o, Eina_Bool enable);
+EAPI Eina_Bool ewk_view_setting_enable_frame_flattening_get(const Evas_Object* o);
+EAPI Eina_Bool ewk_view_setting_enable_frame_flattening_set(Evas_Object* o, Eina_Bool enable);
+
EAPI Eina_Bool ewk_view_setting_scripts_window_open_get(const Evas_Object *o);
EAPI Eina_Bool ewk_view_setting_scripts_window_open_set(Evas_Object *o, Eina_Bool allow);
diff --git a/WebKit/gtk/ChangeLog b/WebKit/gtk/ChangeLog
index 79e4a0b..4073840 100644
--- a/WebKit/gtk/ChangeLog
+++ b/WebKit/gtk/ChangeLog
@@ -1,3 +1,210 @@
+2010-08-25 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ confirm dialog should show OK/Cancel instead of Yes/No for consistency
+ https://bugs.webkit.org/show_bug.cgi?id=32877
+
+ Change the button labels for the fallback confirmation dialog to be
+ OK and Cancel.
+
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_script_dialog):
+
+2010-08-25 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ Cairo and EFL port shouldn't depend on glib.
+ https://bugs.webkit.org/show_bug.cgi?id=44354
+
+ Replace occurrences of GRefPtr and adoptGRef with PlatformRefPtr and
+ adoptPlatformRef.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::requestGeolocationPermissionForFrame):
+ * WebCoreSupport/DragClientGtk.cpp:
+ (WebKit::DragClient::startDrag):
+ * WebCoreSupport/EditorClientGtk.h:
+ * WebCoreSupport/FrameLoaderClientGtk.cpp:
+ (WebKit::FrameLoaderClient::dispatchWillSendRequest):
+ (WebKit::FrameLoaderClient::dispatchDecidePolicyForMIMEType):
+ (WebKit::FrameLoaderClient::createPlugin):
+ * WebCoreSupport/FullscreenVideoController.h:
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::InspectorClient::populateSetting):
+ (WebKit::InspectorClient::storeSetting):
+ * webkit/webkitdownload.cpp:
+ (webkit_download_error):
+ * webkit/webkitnetworkrequest.cpp:
+ (webkit_network_request_new_with_core_request):
+ * webkit/webkitnetworkresponse.cpp:
+ (webkit_network_response_new_with_core_response):
+
+2010-08-24 Xan Lopez <xlopez@igalia.com>
+
+ Reviewed by Martin Robinson.
+
+ Set a device to the event struct when building with GTK+ 3.x, it's
+ mandatory.
+
+ * tests/testcopyandpaste.c:
+ (runPasteTestCallback):
+
+2010-08-24 Martin Robinson <mrobinson@igalia.com>
+
+ Build fix for GTK+.
+
+ * tests/testkeyevents.c:
+ (key_press_event_cb):
+ (key_release_event_cb):
+
+2010-08-24 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] GTK3: EventSender and API tests should use gdk_event_new when synthesizing events
+ https://bugs.webkit.org/show_bug.cgi?id=44534
+
+ Fix an issue where a GdkEvent* is treated like a GdkEvent.
+
+ * tests/testkeyevents.c:
+ (key_press_event_cb):
+ (key_release_event_cb):
+
+2010-08-24 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Xan Lopez.
+
+ [GTK] GTK3: EventSender and API tests should use gdk_event_new when synthesizing events
+ https://bugs.webkit.org/show_bug.cgi?id=44534
+
+ * tests/testcopyandpaste.c:
+ (runPasteTestCallback): Switch to using gdk_event_new and also reference the GdkWindow.
+ when setting it on the event. It is dereferenced by gdk_event_free(...).
+ * tests/testhittestresult.c:
+ (load_status_cb): Switch to using gdk_event_new.
+
+2010-08-24 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Rubber-stamped by Xan Lopez.
+
+ Do not initialize the GSettings object in webkit_init - the other
+ call sites are always called in the main thread so this is
+ unnecessary.
+
+ * webkit/webkitprivate.cpp:
+ (webkit_init):
+
+2010-08-20 Martin Robinson <mrobinson@igalia.com>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: Inspector tests were disabled for GTK.
+ https://bugs.webkit.org/show_bug.cgi?id=43977
+
+ Allow setting the inspector resources path via an environment variables
+ and add a method, inspectorFilesPath, to the WebKit InspectorClient that
+ encapsulates this logic.
+
+ * WebCoreSupport/InspectorClientGtk.cpp:
+ (WebKit::InspectorClient::openInspectorFrontend): Use the new inspectorFilesPath method to
+ get the path to the resource.
+ (WebKit::InspectorClient::inspectorFilesPath): Added.
+ (WebKit::InspectorFrontendClient::localizedStringsURL): Use inspectorFilesPath method.
+ * WebCoreSupport/InspectorClientGtk.h: Add method and member variables for caching the result.
+
+2010-08-19 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
+
+ Reviewed by Kenneth Rohde Christiansen.
+
+ [Gtk] Enable view mode media feature layout test
+ https://bugs.webkit.org/show_bug.cgi?id=43278
+
+ Add the view-mode property, to control the WebCore page's viewMode.
+
+ * docs/webkitgtk-sections.txt:
+ * webkit/webkitwebview.cpp:
+ (webkit_web_view_get_property):
+ (webkit_web_view_set_property):
+ (webkit_web_view_class_init):
+ (webkit_web_view_set_view_mode):
+ (webkit_web_view_get_view_mode):
+ * webkit/webkitwebview.h:
+
+2010-08-19 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GStreamer] GTK XOverlay support in GStreamerGWorld
+ https://bugs.webkit.org/show_bug.cgi?id=39474
+
+ New FullscreenVideoController object, private in the webview. It
+ is created when the user presses the fullscreen button of the
+ video controls. Video is displayed in fullscreen, controls are
+ displayed when the user moves the mouse and when the video is
+ paused. There's also basic keyboard shortcuts support: F/f to
+ leave fullscreen, space to toggle play/pause and up/down to
+ control volume.
+
+ * WebCoreSupport/ChromeClientGtk.cpp:
+ (WebKit::ChromeClient::supportsFullscreenForNode):
+ (WebKit::ChromeClient::enterFullscreenForNode):
+ (WebKit::ChromeClient::exitFullscreenForNode):
+ * WebCoreSupport/ChromeClientGtk.h:
+ * WebCoreSupport/FullscreenVideoController.cpp: Added.
+ (hideHudCallback):
+ (onFullscreenGtkMotionNotifyEvent):
+ (onFullscreenGtkActiveNotification):
+ (onFullscreenGtkConfigureEvent):
+ (onFullscreenGtkDestroy):
+ (togglePlayPauseActivated):
+ (exitFullscreenActivated):
+ (progressBarUpdateCallback):
+ (timeScaleButtonPressed):
+ (timeScaleButtonReleased):
+ (timeScaleValueChanged):
+ (volumeValueChanged):
+ (playerVolumeChangedCallback):
+ (playerMuteChangedCallback):
+ (FullscreenVideoController::FullscreenVideoController):
+ (FullscreenVideoController::~FullscreenVideoController):
+ (FullscreenVideoController::setMediaElement):
+ (FullscreenVideoController::gtkConfigure):
+ (FullscreenVideoController::showHud):
+ (FullscreenVideoController::hideHud):
+ (onFullscreenGtkKeyPressEvent):
+ (FullscreenVideoController::enterFullscreen):
+ (FullscreenVideoController::updateHudPosition):
+ (FullscreenVideoController::exitOnUserRequest):
+ (FullscreenVideoController::exitFullscreen):
+ (FullscreenVideoController::canPlay):
+ (FullscreenVideoController::play):
+ (FullscreenVideoController::pause):
+ (FullscreenVideoController::playStateChanged):
+ (FullscreenVideoController::togglePlay):
+ (FullscreenVideoController::volume):
+ (FullscreenVideoController::muted):
+ (FullscreenVideoController::setVolume):
+ (FullscreenVideoController::volumeChanged):
+ (FullscreenVideoController::muteChanged):
+ (FullscreenVideoController::currentTime):
+ (FullscreenVideoController::setCurrentTime):
+ (FullscreenVideoController::duration):
+ (FullscreenVideoController::percentLoaded):
+ (FullscreenVideoController::beginSeek):
+ (FullscreenVideoController::doSeek):
+ (FullscreenVideoController::endSeek):
+ (timeToString):
+ (FullscreenVideoController::updateHudProgressBar):
+ (FullscreenVideoController::createHud):
+ * WebCoreSupport/FullscreenVideoController.h: Added.
+ (FullscreenVideoController::mediaElement):
+ * webkit/webkitprivate.cpp:
+ (webkit_web_view_enter_fullscreen):
+ (webkit_web_view_exit_fullscreen):
+ * webkit/webkitprivate.h:
+
2010-08-18 Gustavo Noronha Silva <gustavo.noronha@collabora.co.uk>
Reviewed by Martin Robinson.
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
index 185ac16..7e4090b 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
@@ -30,6 +30,7 @@
#include "FloatRect.h"
#include "FrameLoadRequest.h"
#include "GtkVersioning.h"
+#include "HTMLNames.h"
#include "IntRect.h"
#include "HitTestResult.h"
#include "Icon.h"
@@ -611,7 +612,7 @@ void ChromeClient::requestGeolocationPermissionForFrame(Frame* frame, Geolocatio
WebKitWebFrame* webFrame = kit(frame);
WebKitWebView* webView = getViewFromFrame(webFrame);
- GRefPtr<WebKitGeolocationPolicyDecision> policyDecision(adoptGRef(webkit_geolocation_policy_decision_new(webFrame, geolocation)));
+ PlatformRefPtr<WebKitGeolocationPolicyDecision> policyDecision(adoptPlatformRef(webkit_geolocation_policy_decision_new(webFrame, geolocation)));
gboolean isHandled = FALSE;
g_signal_emit_by_name(webView, "geolocation-policy-decision-requested", webFrame, policyDecision.get(), &isHandled);
@@ -641,4 +642,28 @@ PassRefPtr<WebCore::SearchPopupMenu> ChromeClient::createSearchPopupMenu(WebCore
return adoptRef(new SearchPopupMenuGtk(client));
}
+#if ENABLE(VIDEO)
+
+bool ChromeClient::supportsFullscreenForNode(const Node* node)
+{
+ return node->hasTagName(HTMLNames::videoTag);
+}
+
+void ChromeClient::enterFullscreenForNode(Node* node)
+{
+ WebCore::Frame* frame = node->document()->frame();
+ WebKitWebFrame* webFrame = kit(frame);
+ WebKitWebView* webView = getViewFromFrame(webFrame);
+ webkitWebViewEnterFullscreen(webView, node);
+}
+
+void ChromeClient::exitFullscreenForNode(Node* node)
+{
+ WebCore::Frame* frame = node->document()->frame();
+ WebKitWebFrame* webFrame = kit(frame);
+ WebKitWebView* webView = getViewFromFrame(webFrame);
+ webkitWebViewExitFullscreen(webView);
+}
+#endif
+
}
diff --git a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
index e3be1c2..21c4677 100644
--- a/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/ChromeClientGtk.h
@@ -133,6 +133,11 @@ namespace WebKit {
virtual bool selectItemWritingDirectionIsNatural();
virtual PassRefPtr<WebCore::PopupMenu> createPopupMenu(WebCore::PopupMenuClient*) const;
virtual PassRefPtr<WebCore::SearchPopupMenu> createSearchPopupMenu(WebCore::PopupMenuClient*) const;
+#if ENABLE(VIDEO)
+ virtual bool supportsFullscreenForNode(const WebCore::Node*);
+ virtual void enterFullscreenForNode(WebCore::Node*);
+ virtual void exitFullscreenForNode(WebCore::Node*);
+#endif
private:
WebKitWebView* m_webView;
diff --git a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
index efce3dc..b6075b6 100644
--- a/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/DragClientGtk.cpp
@@ -73,7 +73,7 @@ void DragClient::startDrag(DragImageRef image, const IntPoint& dragImageOrigin,
WebKitWebView* webView = webkit_web_frame_get_web_view(kit(frame));
RefPtr<DataObjectGtk> dataObject = clipboardGtk->dataObject();
- GRefPtr<GtkTargetList> targetList(clipboardGtk->helper()->targetListForDataObject(dataObject.get()));
+ PlatformRefPtr<GtkTargetList> targetList(clipboardGtk->helper()->targetListForDataObject(dataObject.get()));
GOwnPtr<GdkEvent> currentEvent(gtk_get_current_event());
GdkDragContext* context = gtk_drag_begin(GTK_WIDGET(m_webView), targetList.get(), dragOperationToGdkDragActions(clipboard->sourceOperation()), 1, currentEvent.get());
diff --git a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
index 3e881fa..efb734f 100644
--- a/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/EditorClientGtk.h
@@ -141,7 +141,7 @@ namespace WebKit {
bool m_treatContextCommitAsKeyEvent;
GOwnPtr<gchar> m_pendingComposition;
Vector<const char*> m_pendingEditorCommands;
- GRefPtr<GtkWidget> m_nativeWidget;
+ PlatformRefPtr<GtkWidget> m_nativeWidget;
};
}
diff --git a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
index 98ac4a1..2cf4f36 100644
--- a/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/FrameLoaderClientGtk.cpp
@@ -201,19 +201,19 @@ static char* toString(unsigned long identifier)
void FrameLoaderClient::dispatchWillSendRequest(WebCore::DocumentLoader* loader, unsigned long identifier, ResourceRequest& request, const ResourceResponse& redirectResponse)
{
- GRefPtr<WebKitNetworkResponse> networkResponse(0);
+ PlatformRefPtr<WebKitNetworkResponse> networkResponse(0);
// We are adding one more resource to the load, or maybe we are
// just redirecting a load.
if (redirectResponse.isNull())
static_cast<WebKit::DocumentLoader*>(loader)->increaseLoadCount(identifier);
else
- networkResponse = adoptGRef(webkit_network_response_new_with_core_response(redirectResponse));
+ networkResponse = adoptPlatformRef(webkit_network_response_new_with_core_response(redirectResponse));
WebKitWebView* webView = getViewFromFrame(m_frame);
GOwnPtr<gchar> identifierString(toString(identifier));
WebKitWebResource* webResource = webkit_web_view_get_resource(webView, identifierString.get());
- GRefPtr<WebKitNetworkRequest> networkRequest(adoptGRef(webkit_network_request_new_with_core_request(request)));
+ PlatformRefPtr<WebKitNetworkRequest> networkRequest(adoptPlatformRef(webkit_network_request_new_with_core_request(request)));
if (!redirectResponse.isNull()) {
// This is a redirect, so we need to update the WebResource's knowledge
@@ -314,7 +314,7 @@ void FrameLoaderClient::dispatchDecidePolicyForMIMEType(FramePolicyFunction poli
if (isHandled)
return;
- GRefPtr<WebKitNetworkResponse> networkResponse(adoptGRef(webkit_web_frame_get_network_response(m_frame)));
+ PlatformRefPtr<WebKitNetworkResponse> networkResponse(adoptPlatformRef(webkit_web_frame_get_network_response(m_frame)));
if (networkResponse) {
ResourceResponse response = core(networkResponse.get());
if (response.isAttachment()) {
@@ -449,7 +449,7 @@ PassRefPtr<Widget> FrameLoaderClient::createPlugin(const IntSize& pluginSize, HT
CString mimeTypeString = mimeType.utf8();
ASSERT(paramNames.size() == paramValues.size());
- GRefPtr<GHashTable> hash = adoptGRef(g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free));
+ PlatformRefPtr<GHashTable> hash = adoptPlatformRef(g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free));
for (unsigned i = 0; i < paramNames.size(); ++i) {
g_hash_table_insert(hash.get(),
g_strdup(paramNames[i].utf8().data()),
diff --git a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
new file mode 100644
index 0000000..c95dcff
--- /dev/null
+++ b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
@@ -0,0 +1,575 @@
+/*
+ * Copyright (C) 2010 Igalia S.L
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#include "config.h"
+
+#if ENABLE(VIDEO)
+
+#include "FullscreenVideoController.h"
+
+#include "MediaPlayer.h"
+
+#include <gdk/gdk.h>
+#include <gdk/gdkkeysyms.h>
+#include <glib/gi18n-lib.h>
+#include <gst/gst.h>
+#include <gtk/gtk.h>
+
+using namespace std;
+using namespace WebCore;
+
+#define HUD_AUTO_HIDE_INTERVAL 3000 // 3 seconds
+#define PROGRESS_BAR_UPDATE_INTERVAL 150 // 150ms
+#define VOLUME_UP_OFFSET 0.05 // 5%
+#define VOLUME_DOWN_OFFSET 0.05 // 5%
+
+// Use symbolic icons only if we build with GTK+-3 support. They could
+// be enabled for the GTK+2 build but we'd need to bump the required
+// version to at least 2.22.
+#if GTK_MAJOR_VERSION < 3
+#define PLAY_ICON_NAME "media-playback-start"
+#define PAUSE_ICON_NAME "media-playback-pause"
+#define EXIT_FULLSCREEN_ICON_NAME "view-restore"
+#else
+#define PLAY_ICON_NAME "media-playback-start-symbolic"
+#define PAUSE_ICON_NAME "media-playback-pause-symbolic"
+#define EXIT_FULLSCREEN_ICON_NAME "view-restore-symbolic"
+#endif
+
+static gboolean hideHudCallback(FullscreenVideoController* controller)
+{
+ controller->hideHud();
+ return FALSE;
+}
+
+static gboolean onFullscreenGtkMotionNotifyEvent(GtkWidget* widget, GdkEventMotion* event, FullscreenVideoController* controller)
+{
+ controller->showHud(true);
+ return TRUE;
+}
+
+static void onFullscreenGtkActiveNotification(GtkWidget* widget, GParamSpec* property, FullscreenVideoController* controller)
+{
+ if (!gtk_window_is_active(GTK_WINDOW(widget)))
+ controller->hideHud();
+}
+
+static gboolean onFullscreenGtkConfigureEvent(GtkWidget* widget, GdkEventConfigure* event, FullscreenVideoController* controller)
+{
+ controller->gtkConfigure(event);
+ return TRUE;
+}
+
+static void onFullscreenGtkDestroy(GtkWidget* widget, FullscreenVideoController* controller)
+{
+ controller->exitFullscreen();
+}
+
+static void togglePlayPauseActivated(GtkAction* action, FullscreenVideoController* controller)
+{
+ controller->togglePlay();
+}
+
+static void exitFullscreenActivated(GtkAction* action, FullscreenVideoController* controller)
+{
+ controller->exitOnUserRequest();
+}
+
+static gboolean progressBarUpdateCallback(FullscreenVideoController* controller)
+{
+ return controller->updateHudProgressBar();
+}
+
+static gboolean timeScaleButtonPressed(GtkWidget* widget, GdkEventButton* event, FullscreenVideoController* controller)
+{
+ if (event->type != GDK_BUTTON_PRESS)
+ return FALSE;
+
+ controller->beginSeek();
+ return FALSE;
+}
+
+static gboolean timeScaleButtonReleased(GtkWidget* widget, GdkEventButton* event, FullscreenVideoController* controller)
+{
+ controller->endSeek();
+ return FALSE;
+}
+
+static void timeScaleValueChanged(GtkWidget* widget, FullscreenVideoController* controller)
+{
+ controller->doSeek();
+}
+
+static void volumeValueChanged(GtkScaleButton *button, gdouble value, FullscreenVideoController* controller)
+{
+ controller->setVolume(static_cast<float>(value));
+}
+
+void playerVolumeChangedCallback(GObject *element, GParamSpec *pspec, FullscreenVideoController* controller)
+{
+ controller->volumeChanged();
+}
+
+void playerMuteChangedCallback(GObject *element, GParamSpec *pspec, FullscreenVideoController* controller)
+{
+ controller->muteChanged();
+}
+
+FullscreenVideoController::FullscreenVideoController()
+ : m_hudTimeoutId(0)
+ , m_progressBarUpdateId(0)
+ , m_seekLock(false)
+ , m_window(0)
+ , m_hudWindow(0)
+{
+}
+
+FullscreenVideoController::~FullscreenVideoController()
+{
+ exitFullscreen();
+}
+
+void FullscreenVideoController::setMediaElement(HTMLMediaElement* mediaElement)
+{
+ if (mediaElement == m_mediaElement)
+ return;
+
+ m_mediaElement = mediaElement;
+ if (!m_mediaElement) {
+ // Can't do full-screen, just get out
+ exitFullscreen();
+ }
+}
+
+void FullscreenVideoController::gtkConfigure(GdkEventConfigure* event)
+{
+ updateHudPosition();
+}
+
+void FullscreenVideoController::showHud(bool autoHide)
+{
+ if (!m_hudWindow)
+ return;
+
+ if (m_hudTimeoutId) {
+ g_source_remove(m_hudTimeoutId);
+ m_hudTimeoutId = 0;
+ }
+
+ // Show the cursor.
+ GdkWindow* window = gtk_widget_get_window(m_window);
+ gdk_window_set_cursor(window, m_cursor.get());
+
+ // Update the progress bar immediately before showing the window.
+ updateHudProgressBar();
+ gtk_widget_show_all(m_hudWindow);
+ updateHudPosition();
+
+ // Start periodic updates of the progress bar.
+ if (!m_progressBarUpdateId)
+ m_progressBarUpdateId = g_timeout_add(PROGRESS_BAR_UPDATE_INTERVAL, reinterpret_cast<GSourceFunc>(progressBarUpdateCallback), this);
+
+ // Hide the hud in few seconds, if requested.
+ if (autoHide)
+ m_hudTimeoutId = g_timeout_add(HUD_AUTO_HIDE_INTERVAL, reinterpret_cast<GSourceFunc>(hideHudCallback), this);
+}
+
+void FullscreenVideoController::hideHud()
+{
+ if (m_hudTimeoutId) {
+ g_source_remove(m_hudTimeoutId);
+ m_hudTimeoutId = 0;
+ }
+
+ if (!m_hudWindow)
+ return;
+
+ // Keep the hud visible if a seek is in progress or if the volume
+ // popup is visible.
+ GtkWidget* volumePopup = gtk_scale_button_get_popup(GTK_SCALE_BUTTON(m_volumeButton));
+ if (m_seekLock || gtk_widget_get_visible(volumePopup)) {
+ showHud(true);
+ return;
+ }
+
+ GdkWindow* window = gtk_widget_get_window(m_window);
+ GdkCursor* cursor = gdk_cursor_new(GDK_BLANK_CURSOR);
+ gdk_window_set_cursor(window, cursor);
+
+ gtk_widget_hide_all(m_hudWindow);
+
+ if (m_progressBarUpdateId) {
+ g_source_remove(m_progressBarUpdateId);
+ m_progressBarUpdateId = 0;
+ }
+}
+
+static gboolean onFullscreenGtkKeyPressEvent(GtkWidget* widget, GdkEventKey* event, FullscreenVideoController* controller)
+{
+ switch (event->keyval) {
+ case GDK_Escape:
+ case 'f':
+ case 'F':
+ controller->exitOnUserRequest();
+ break;
+ case GDK_space:
+ case GDK_Return:
+ controller->togglePlay();
+ break;
+ case GDK_Up:
+ // volume up
+ controller->setVolume(controller->volume() + VOLUME_UP_OFFSET);
+ break;
+ case GDK_Down:
+ // volume down
+ controller->setVolume(controller->volume() - VOLUME_DOWN_OFFSET);
+ break;
+ default:
+ break;
+ }
+
+ return TRUE;
+}
+
+
+void FullscreenVideoController::enterFullscreen()
+{
+ if (!m_mediaElement)
+ return;
+
+ if (m_mediaElement->platformMedia().type != WebCore::PlatformMedia::GStreamerGWorldType)
+ return;
+
+ m_gstreamerGWorld = m_mediaElement->platformMedia().media.gstreamerGWorld;
+ if (!m_gstreamerGWorld->enterFullscreen())
+ return;
+
+ m_window = reinterpret_cast<GtkWidget*>(m_gstreamerGWorld->platformVideoWindow()->window());
+
+ GstElement* pipeline = m_gstreamerGWorld->pipeline();
+ g_signal_connect(pipeline, "notify::volume", G_CALLBACK(playerVolumeChangedCallback), this);
+ g_signal_connect(pipeline, "notify::mute", G_CALLBACK(playerMuteChangedCallback), this);
+
+ if (!m_hudWindow)
+ createHud();
+
+ // Ensure black background.
+ GdkColor color;
+ gdk_color_parse("black", &color);
+ gtk_widget_modify_bg(m_window, GTK_STATE_NORMAL, &color);
+ gtk_widget_set_double_buffered(m_window, FALSE);
+
+ g_signal_connect(m_window, "key-press-event", G_CALLBACK(onFullscreenGtkKeyPressEvent), this);
+ g_signal_connect(m_window, "destroy", G_CALLBACK(onFullscreenGtkDestroy), this);
+ g_signal_connect(m_window, "notify::is-active", G_CALLBACK(onFullscreenGtkActiveNotification), this);
+
+ gtk_widget_show_all(m_window);
+
+ GdkWindow* window = gtk_widget_get_window(m_window);
+ GdkCursor* cursor = gdk_cursor_new(GDK_BLANK_CURSOR);
+ m_cursor = gdk_window_get_cursor(window);
+ gdk_window_set_cursor(window, cursor);
+ gdk_cursor_unref(cursor);
+
+ g_signal_connect(m_window, "motion-notify-event", G_CALLBACK(onFullscreenGtkMotionNotifyEvent), this);
+ g_signal_connect(m_window, "configure-event", G_CALLBACK(onFullscreenGtkConfigureEvent), this);
+
+ gtk_window_fullscreen(GTK_WINDOW(m_window));
+ showHud(true);
+}
+
+void FullscreenVideoController::updateHudPosition()
+{
+ if (!m_hudWindow)
+ return;
+
+ // Get the screen rectangle.
+ GdkScreen* screen = gtk_window_get_screen(GTK_WINDOW(m_window));
+ GdkWindow* window = gtk_widget_get_window(m_window);
+ GdkRectangle fullscreenRectangle;
+ gdk_screen_get_monitor_geometry(screen, gdk_screen_get_monitor_at_window(screen, window),
+ &fullscreenRectangle);
+
+ // Get the popup window size.
+ int hudWidth, hudHeight;
+ gtk_window_get_size(GTK_WINDOW(m_hudWindow), &hudWidth, &hudHeight);
+
+ // Resize the hud to the full width of the screen.
+ gtk_window_resize(GTK_WINDOW(m_hudWindow), fullscreenRectangle.width, hudHeight);
+
+ // Move the hud to the bottom of the screen.
+ gtk_window_move(GTK_WINDOW(m_hudWindow), fullscreenRectangle.x,
+ fullscreenRectangle.height + fullscreenRectangle.y - hudHeight);
+}
+
+void FullscreenVideoController::exitOnUserRequest()
+{
+ m_mediaElement->exitFullscreen();
+}
+
+void FullscreenVideoController::exitFullscreen()
+{
+ if (!m_hudWindow)
+ return;
+
+ g_signal_handlers_disconnect_by_func(m_window, reinterpret_cast<void*>(onFullscreenGtkKeyPressEvent), this);
+ g_signal_handlers_disconnect_by_func(m_window, reinterpret_cast<void*>(onFullscreenGtkDestroy), this);
+ g_signal_handlers_disconnect_by_func(m_window, reinterpret_cast<void*>(onFullscreenGtkMotionNotifyEvent), this);
+ g_signal_handlers_disconnect_by_func(m_window, reinterpret_cast<void*>(onFullscreenGtkConfigureEvent), this);
+
+ GstElement* pipeline = m_mediaElement->platformMedia().media.gstreamerGWorld->pipeline();
+ g_signal_handlers_disconnect_by_func(pipeline, reinterpret_cast<void*>(playerVolumeChangedCallback), this);
+ g_signal_handlers_disconnect_by_func(pipeline, reinterpret_cast<void*>(playerMuteChangedCallback), this);
+
+ if (m_hudTimeoutId) {
+ g_source_remove(m_hudTimeoutId);
+ m_hudTimeoutId = 0;
+ }
+
+ if (m_progressBarUpdateId) {
+ g_source_remove(m_progressBarUpdateId);
+ m_progressBarUpdateId = 0;
+ }
+
+ if (m_mediaElement->platformMedia().type == WebCore::PlatformMedia::GStreamerGWorldType)
+ m_mediaElement->platformMedia().media.gstreamerGWorld->exitFullscreen();
+
+ gtk_widget_hide_all(m_window);
+
+ gtk_widget_destroy(m_hudWindow);
+ m_hudWindow = 0;
+}
+
+bool FullscreenVideoController::canPlay() const
+{
+ return m_mediaElement && m_mediaElement->canPlay();
+}
+
+void FullscreenVideoController::play()
+{
+ if (m_mediaElement)
+ m_mediaElement->play(m_mediaElement->processingUserGesture());
+
+ playStateChanged();
+ showHud(true);
+}
+
+void FullscreenVideoController::pause()
+{
+ if (m_mediaElement)
+ m_mediaElement->pause(m_mediaElement->processingUserGesture());
+
+ playStateChanged();
+ showHud(false);
+}
+
+void FullscreenVideoController::playStateChanged()
+{
+ if (canPlay())
+ g_object_set(m_playPauseAction, "tooltip", _("Play"), "icon-name", PLAY_ICON_NAME, NULL);
+ else
+ g_object_set(m_playPauseAction, "tooltip", _("Pause"), "icon-name", PAUSE_ICON_NAME, NULL);
+}
+
+void FullscreenVideoController::togglePlay()
+{
+ if (canPlay())
+ play();
+ else
+ pause();
+}
+
+float FullscreenVideoController::volume() const
+{
+ return m_mediaElement ? m_mediaElement->volume() : 0;
+}
+
+bool FullscreenVideoController::muted() const
+{
+ return m_mediaElement ? m_mediaElement->muted() : false;
+}
+
+void FullscreenVideoController::setVolume(float volume)
+{
+ if (volume < 0.0 || volume > 1.0)
+ return;
+
+ if (m_mediaElement) {
+ ExceptionCode ec;
+ m_mediaElement->setVolume(volume, ec);
+ }
+}
+
+void FullscreenVideoController::volumeChanged()
+{
+ g_signal_handler_block(m_volumeButton, m_volumeUpdateId);
+ gtk_scale_button_set_value(GTK_SCALE_BUTTON(m_volumeButton), volume());
+ g_signal_handler_unblock(m_volumeButton, m_volumeUpdateId);
+}
+
+void FullscreenVideoController::muteChanged()
+{
+ g_signal_handler_block(m_volumeButton, m_volumeUpdateId);
+ gtk_scale_button_set_value(GTK_SCALE_BUTTON(m_volumeButton), muted() ? 0 : volume());
+ g_signal_handler_unblock(m_volumeButton, m_volumeUpdateId);
+}
+
+float FullscreenVideoController::currentTime() const
+{
+ return m_mediaElement ? m_mediaElement->currentTime() : 0;
+}
+
+void FullscreenVideoController::setCurrentTime(float value)
+{
+ if (m_mediaElement) {
+ ExceptionCode ec;
+ m_mediaElement->setCurrentTime(value, ec);
+ }
+}
+
+float FullscreenVideoController::duration() const
+{
+ return m_mediaElement ? m_mediaElement->duration() : 0;
+}
+
+float FullscreenVideoController::percentLoaded() const
+{
+ return m_mediaElement ? m_mediaElement->percentLoaded() : 0;
+}
+
+void FullscreenVideoController::beginSeek()
+{
+ m_seekLock = true;
+
+ if (m_mediaElement)
+ m_mediaElement->beginScrubbing();
+}
+
+void FullscreenVideoController::doSeek()
+{
+ if (!m_seekLock)
+ return;
+
+ setCurrentTime(gtk_range_get_value(GTK_RANGE(m_timeHScale))*duration() / 100);
+}
+
+void FullscreenVideoController::endSeek()
+{
+ if (m_mediaElement)
+ m_mediaElement->endScrubbing();
+
+ m_seekLock = false;
+}
+
+static String timeToString(float time)
+{
+ if (!isfinite(time))
+ time = 0;
+ int seconds = fabsf(time);
+ int hours = seconds / (60 * 60);
+ int minutes = (seconds / 60) % 60;
+ seconds %= 60;
+
+ if (hours) {
+ if (hours > 9)
+ return String::format("%s%02d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds);
+ return String::format("%s%01d:%02d:%02d", (time < 0 ? "-" : ""), hours, minutes, seconds);
+ }
+
+ return String::format("%s%02d:%02d", (time < 0 ? "-" : ""), minutes, seconds);
+}
+
+gboolean FullscreenVideoController::updateHudProgressBar()
+{
+ float mediaDuration(duration());
+ float mediaPosition(currentTime());
+
+ if (!m_seekLock) {
+ gdouble value = 0.0;
+
+ if (mediaPosition && mediaDuration)
+ value = (mediaPosition * 100.0) / mediaDuration;
+
+ GtkAdjustment* adjustment = gtk_range_get_adjustment(GTK_RANGE(m_timeHScale));
+ gtk_adjustment_set_value(adjustment, value);
+ }
+
+ gtk_range_set_fill_level(GTK_RANGE(m_timeHScale), percentLoaded()* 100);
+
+ gchar* label = g_strdup_printf("%s / %s", timeToString(mediaPosition).utf8().data(),
+ timeToString(mediaDuration).utf8().data());
+ gtk_label_set_text(GTK_LABEL(m_timeLabel), label);
+ g_free(label);
+ return TRUE;
+}
+
+void FullscreenVideoController::createHud()
+{
+ m_hudWindow = gtk_window_new(GTK_WINDOW_POPUP);
+ gtk_window_set_gravity(GTK_WINDOW(m_hudWindow), GDK_GRAVITY_SOUTH_WEST);
+ gtk_window_set_type_hint(GTK_WINDOW(m_hudWindow), GDK_WINDOW_TYPE_HINT_NORMAL);
+
+ g_signal_connect(m_hudWindow, "motion-notify-event", G_CALLBACK(onFullscreenGtkMotionNotifyEvent), this);
+
+ GtkWidget* hbox = gtk_hbox_new(FALSE, 4);
+ gtk_container_add(GTK_CONTAINER(m_hudWindow), hbox);
+
+ m_playPauseAction = gtk_action_new("play", _("Play / Pause"), _("Play or pause the media"), PAUSE_ICON_NAME);
+ g_signal_connect(m_playPauseAction, "activate", G_CALLBACK(togglePlayPauseActivated), this);
+
+ playStateChanged();
+
+ GtkWidget* item = gtk_action_create_tool_item(m_playPauseAction);
+ gtk_box_pack_start(GTK_BOX(hbox), item, FALSE, TRUE, 0);
+
+ GtkWidget* label = gtk_label_new(_("Time:"));
+ gtk_box_pack_start(GTK_BOX(hbox), label, FALSE, TRUE, 0);
+
+ GtkObject* adjustment = gtk_adjustment_new(0.0, 0.0, 100.0, 0.1, 1.0, 1.0);
+ m_timeHScale = gtk_hscale_new(GTK_ADJUSTMENT(adjustment));
+ gtk_scale_set_draw_value(GTK_SCALE(m_timeHScale), FALSE);
+ gtk_range_set_show_fill_level(GTK_RANGE(m_timeHScale), TRUE);
+ gtk_range_set_update_policy(GTK_RANGE(m_timeHScale), GTK_UPDATE_CONTINUOUS);
+ g_signal_connect(m_timeHScale, "button-press-event", G_CALLBACK(timeScaleButtonPressed), this);
+ g_signal_connect(m_timeHScale, "button-release-event", G_CALLBACK(timeScaleButtonReleased), this);
+ m_hscaleUpdateId = g_signal_connect(m_timeHScale, "value-changed", G_CALLBACK(timeScaleValueChanged), this);
+
+ gtk_box_pack_start(GTK_BOX(hbox), m_timeHScale, TRUE, TRUE, 0);
+
+ m_timeLabel = gtk_label_new("");
+ gtk_box_pack_start(GTK_BOX(hbox), m_timeLabel, FALSE, TRUE, 0);
+
+ // Volume button.
+ m_volumeButton = gtk_volume_button_new();
+ gtk_box_pack_start(GTK_BOX(hbox), m_volumeButton, FALSE, TRUE, 0);
+ gtk_scale_button_set_value(GTK_SCALE_BUTTON(m_volumeButton), volume());
+ m_volumeUpdateId = g_signal_connect(m_volumeButton, "value-changed", G_CALLBACK(volumeValueChanged), this);
+
+
+ m_exitFullscreenAction = gtk_action_new("exit", _("Exit Fullscreen"), _("Exit from fullscreen mode"), EXIT_FULLSCREEN_ICON_NAME);
+ g_signal_connect(m_exitFullscreenAction, "activate", G_CALLBACK(exitFullscreenActivated), this);
+ g_object_set(m_exitFullscreenAction, "icon-name", EXIT_FULLSCREEN_ICON_NAME, NULL);
+ item = gtk_action_create_tool_item(m_exitFullscreenAction);
+ gtk_box_pack_start(GTK_BOX(hbox), item, FALSE, TRUE, 0);
+
+
+ m_progressBarUpdateId = g_timeout_add(PROGRESS_BAR_UPDATE_INTERVAL, reinterpret_cast<GSourceFunc>(progressBarUpdateCallback), this);
+}
+
+#endif
diff --git a/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
new file mode 100644
index 0000000..1567d9b
--- /dev/null
+++ b/WebKit/gtk/WebCoreSupport/FullscreenVideoController.h
@@ -0,0 +1,103 @@
+/*
+ * Copyright (C) 2010 Igalia S.L
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public License
+ * along with this library; see the file COPYING.LIB. If not, write to
+ * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+ * Boston, MA 02110-1301, USA.
+ */
+
+#ifndef FullscreenVideoController_h
+#define FullscreenVideoController_h
+
+#if ENABLE(VIDEO)
+
+#include "GRefPtr.h"
+#include "GStreamerGWorld.h"
+#include "HTMLMediaElement.h"
+#include <wtf/RefPtr.h>
+
+typedef struct _GtkObject GtkObject;
+typedef struct _GtkWidget GtkWidget;
+typedef struct _GtkAction GtkAction;
+typedef struct _GdkCursor GdkCursor;
+typedef struct _GdkEventConfigure GdkEventConfigure;
+
+
+class FullscreenVideoController : public Noncopyable {
+public:
+ FullscreenVideoController();
+ virtual ~FullscreenVideoController();
+
+ void setMediaElement(WebCore::HTMLMediaElement*);
+ WebCore::HTMLMediaElement* mediaElement() const { return m_mediaElement.get(); }
+
+ void gtkConfigure(GdkEventConfigure* event);
+
+ void enterFullscreen();
+ void exitFullscreen();
+
+ void exitOnUserRequest();
+ void togglePlay();
+ void beginSeek();
+ void doSeek();
+ void endSeek();
+
+ void hideHud();
+ void showHud(bool);
+ gboolean updateHudProgressBar();
+
+ float volume() const;
+ void setVolume(float);
+ void volumeChanged();
+ void muteChanged();
+
+private:
+ bool canPlay() const;
+ void play();
+ void pause();
+ void playStateChanged();
+
+ bool muted() const;
+
+ float currentTime() const;
+ void setCurrentTime(float);
+
+ float duration() const;
+ float percentLoaded() const;
+
+ void createHud();
+ void updateHudPosition();
+
+ RefPtr<WebCore::HTMLMediaElement> m_mediaElement;
+ RefPtr<WebCore::GStreamerGWorld> m_gstreamerGWorld;
+
+ guint m_hudTimeoutId;
+ guint m_progressBarUpdateId;
+ guint m_progressBarFillUpdateId;
+ guint m_hscaleUpdateId;
+ guint m_volumeUpdateId;
+ bool m_seekLock;
+ GtkWidget* m_window;
+ PlatformRefPtr<GdkCursor> m_cursor;
+ GtkWidget* m_hudWindow;
+ GtkAction* m_playPauseAction;
+ GtkAction* m_exitFullscreenAction;
+ GtkWidget* m_timeHScale;
+ GtkWidget* m_timeLabel;
+ GtkWidget* m_volumeButton;
+};
+
+#endif
+
+#endif // FullscreenVideoController_h
diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
index b0dd40e..aedf21f 100644
--- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
+++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.cpp
@@ -79,18 +79,8 @@ void InspectorClient::openInspectorFrontend(InspectorController* controller)
webkit_web_inspector_set_web_view(webInspector, inspectorWebView);
- GOwnPtr<gchar> inspectorURI;
-
- // Make the Web Inspector work when running tests
- // FixMe: it is not working. It should be not the subdirectory of the current directory, but a subdirectory of $(WEBKITOUTPUTDIR).
- if (g_file_test("resources/inspector/inspector.html", G_FILE_TEST_EXISTS)) {
- GOwnPtr<gchar> currentDirectory(g_get_current_dir());
- GOwnPtr<gchar> fullPath(g_strdup_printf("%s/resources/inspector/inspector.html", currentDirectory.get()));
- inspectorURI.set(g_filename_to_uri(fullPath.get(), NULL, NULL));
- } else {
- inspectorURI.set(g_filename_to_uri(DATA_DIR"/webkitgtk-"WEBKITGTK_API_VERSION_STRING"/webinspector/inspector.html", NULL, NULL));
- }
-
+ GOwnPtr<gchar> inspectorPath(g_build_filename(inspectorFilesPath(), "inspector.html", NULL));
+ GOwnPtr<gchar> inspectorURI(g_filename_to_uri(inspectorPath.get(), 0, 0));
webkit_web_view_load_uri(inspectorWebView, inspectorURI.get());
gtk_widget_show(GTK_WIDGET(inspectorWebView));
@@ -185,7 +175,7 @@ void InspectorClient::populateSetting(const String& key, String* value)
if (!settings)
return;
- GRefPtr<GVariant> variant = adoptGRef(g_settings_get_value(settings, toGSettingName(key).utf8().data()));
+ PlatformRefPtr<GVariant> variant = adoptPlatformRef(g_settings_get_value(settings, toGSettingName(key).utf8().data()));
if (key == "resourceTrackingEnabled" || key == "xhrMonitor"
|| key == "debuggerEnabled" || key == "profilerEnabled")
@@ -203,15 +193,15 @@ void InspectorClient::storeSetting(const String& key, const String& value)
if (!settings)
return;
- GRefPtr<GVariant> variant(0);
+ PlatformRefPtr<GVariant> variant(0);
// Set the key with the appropriate type, and also avoid setting
// unknown keys to avoid aborting the execution.
if (key == "resourceTrackingEnabled" || key == "xhrMonitor"
|| key == "debuggerEnabled" || key == "profilerEnabled")
- variant = adoptGRef(variantFromTruthString(value));
+ variant = adoptPlatformRef(variantFromTruthString(value));
else if (key == "frontendSettings")
- variant = adoptGRef(g_variant_new_string(value.utf8().data()));
+ variant = adoptPlatformRef(g_variant_new_string(value.utf8().data()));
if (!variant)
return;
@@ -250,7 +240,19 @@ bool InspectorClient::sendMessageToFrontend(const String& message)
return true;
}
-bool destroyed = TRUE;
+const char* InspectorClient::inspectorFilesPath()
+{
+ if (m_inspectorFilesPath)
+ m_inspectorFilesPath.get();
+
+ const char* environmentPath = getenv("WEBKIT_INSPECTOR_PATH");
+ if (environmentPath && g_file_test(environmentPath, G_FILE_TEST_IS_DIR))
+ m_inspectorFilesPath.set(g_strdup(environmentPath));
+ else
+ m_inspectorFilesPath.set(g_build_filename(DATA_DIR, "webkitgtk-"WEBKITGTK_API_VERSION_STRING, "webinspector", NULL));
+
+ return m_inspectorFilesPath.get();
+}
InspectorFrontendClient::InspectorFrontendClient(WebKitWebView* inspectedWebView, WebKitWebView* inspectorWebView, WebKitWebInspector* webInspector, Page* inspectorPage, InspectorClient* inspectorClient)
: InspectorFrontendClientLocal(core(inspectedWebView)->inspectorController(), inspectorPage)
@@ -300,20 +302,11 @@ void InspectorFrontendClient::destroyInspectorWindow()
String InspectorFrontendClient::localizedStringsURL()
{
- GOwnPtr<gchar> URL;
-
- // Make the Web Inspector work when running tests
- if (g_file_test("WebCore/English.lproj/localizedStrings.js", G_FILE_TEST_EXISTS)) {
- GOwnPtr<gchar> currentDirectory(g_get_current_dir());
- GOwnPtr<gchar> fullPath(g_strdup_printf("%s/WebCore/English.lproj/localizedStrings.js", currentDirectory.get()));
- URL.set(g_filename_to_uri(fullPath.get(), NULL, NULL));
- } else {
- GOwnPtr<gchar> localizedStringsPath(g_strdup_printf(DATA_DIR"/webkitgtk-%.1f/webinspector/localizedStrings.js", WEBKITGTK_API_VERSION));
- URL.set(g_filename_to_uri(localizedStringsPath.get(), NULL, NULL));
- }
+ GOwnPtr<gchar> stringsPath(g_build_filename(m_inspectorClient->inspectorFilesPath(), "localizedStrings.js", NULL));
+ GOwnPtr<gchar> stringsURI(g_filename_to_uri(stringsPath.get(), 0, 0));
// FIXME: support l10n of localizedStrings.js
- return String::fromUTF8(URL.get());
+ return String::fromUTF8(stringsURI.get());
}
String InspectorFrontendClient::hiddenPanels()
diff --git a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
index b72bc82..8b68405 100644
--- a/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
+++ b/WebKit/gtk/WebCoreSupport/InspectorClientGtk.h
@@ -29,6 +29,7 @@
#ifndef InspectorClientGtk_h
#define InspectorClientGtk_h
+#include "GOwnPtr.h"
#include "InspectorClient.h"
#include "InspectorFrontendClientLocal.h"
#include "webkitwebview.h"
@@ -64,11 +65,13 @@ namespace WebKit {
virtual bool sendMessageToFrontend(const WTF::String&);
void releaseFrontendPage();
+ const char* inspectorFilesPath();
private:
WebKitWebView* m_inspectedWebView;
WebCore::Page* m_frontendPage;
InspectorFrontendClient* m_frontendClient;
+ GOwnPtr<gchar> m_inspectorFilesPath;
};
class InspectorFrontendClient : public WebCore::InspectorFrontendClientLocal {
diff --git a/WebKit/gtk/docs/webkitgtk-sections.txt b/WebKit/gtk/docs/webkitgtk-sections.txt
index 0083146..35f9b40 100644
--- a/WebKit/gtk/docs/webkitgtk-sections.txt
+++ b/WebKit/gtk/docs/webkitgtk-sections.txt
@@ -419,6 +419,7 @@ WebKitNetworkResponseClass
<FILE>webkitwebview</FILE>
WebKitNavigationResponse
WebKitWebViewTargetInfo
+WebKitWebViewViewMode
<TITLE>WebKitWebView</TITLE>
WebKitWebView
webkit_web_view_can_copy_clipboard
@@ -453,6 +454,7 @@ webkit_web_view_get_settings
webkit_web_view_get_title
webkit_web_view_get_transparent
webkit_web_view_get_uri
+webkit_web_view_get_view_mode
webkit_web_view_get_view_source_mode
webkit_web_view_get_zoom_level
webkit_web_view_go_back
@@ -481,6 +483,7 @@ webkit_web_view_set_highlight_text_matches
webkit_web_view_set_maintains_back_forward_list
webkit_web_view_set_settings
webkit_web_view_set_transparent
+webkit_web_view_set_view_mode
webkit_web_view_set_view_source_mode
webkit_web_view_set_zoom_level
webkit_web_view_stop_loading
diff --git a/WebKit/gtk/po/ChangeLog b/WebKit/gtk/po/ChangeLog
index f088275..309ba09 100644
--- a/WebKit/gtk/po/ChangeLog
+++ b/WebKit/gtk/po/ChangeLog
@@ -1,3 +1,12 @@
+2010-08-19 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Gustavo Noronha Silva.
+
+ [GStreamer] GTK XOverlay support in GStreamerGWorld
+ https://bugs.webkit.org/show_bug.cgi?id=39474
+
+ * POTFILES: Added new file that contains strings to extract.
+
2010-08-03 Jorge González <aloriel@gmail.com>
Reviewed by Gustavo Noronha.
diff --git a/WebKit/gtk/po/POTFILES b/WebKit/gtk/po/POTFILES
index 05ba138..ffd0015 100644
--- a/WebKit/gtk/po/POTFILES
+++ b/WebKit/gtk/po/POTFILES
@@ -1,6 +1,7 @@
# List of source files which contain translatable strings.
WebKit/gtk/WebCoreSupport/ChromeClientGtk.cpp
WebKit/gtk/WebCoreSupport/ContextMenuClientGtk.cpp
+WebKit/gtk/WebCoreSupport/FullscreenVideoController.cpp
WebKit/gtk/webkit/webkitdownload.cpp
WebKit/gtk/webkit/webkitsoupauthdialog.c
WebKit/gtk/webkit/webkitwebframe.cpp
diff --git a/WebKit/gtk/tests/testcopyandpaste.c b/WebKit/gtk/tests/testcopyandpaste.c
index 0ef91d1..58fb764 100644
--- a/WebKit/gtk/tests/testcopyandpaste.c
+++ b/WebKit/gtk/tests/testcopyandpaste.c
@@ -128,21 +128,25 @@ static CopyAndPasteFixture* currentFixture;
static JSValueRef runPasteTestCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
{
// Simulate a paste keyboard sequence.
- GdkEvent event;
- memset(&event, 0, sizeof(event));
- event.key.keyval = gdk_unicode_to_keyval('v');
- event.key.state = GDK_CONTROL_MASK;
- event.key.window = gtk_widget_get_window(GTK_WIDGET(currentFixture->webView));
+ GdkEvent* event = gdk_event_new(GDK_KEY_PRESS);
+ event->key.keyval = gdk_unicode_to_keyval('v');
+ event->key.state = GDK_CONTROL_MASK;
+ event->key.window = gtk_widget_get_window(GTK_WIDGET(currentFixture->webView));
+ g_object_ref(event->key.window);
+#ifndef GTK_API_VERSION_2
+ gdk_event_set_device(event, gdk_device_get_associated_device(gdk_display_get_core_pointer(gdk_drawable_get_display(event->key.window))));
+#endif
GdkKeymapKey* keys;
gint n_keys;
- if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), event.key.keyval, &keys, &n_keys)) {
- event.key.hardware_keycode = keys[0].keycode;
+ if (gdk_keymap_get_entries_for_keyval(gdk_keymap_get_default(), event->key.keyval, &keys, &n_keys)) {
+ event->key.hardware_keycode = keys[0].keycode;
g_free(keys);
}
- event.key.type = GDK_KEY_PRESS;
- gtk_main_do_event(&event);
- event.key.type = GDK_KEY_RELEASE;
- gtk_main_do_event(&event);
+
+ gtk_main_do_event(event);
+ event->key.type = GDK_KEY_RELEASE;
+ gtk_main_do_event(event);
+ gdk_event_free(event);
JSStringRef scriptString = JSStringCreateWithUTF8CString("document.body.innerHTML;");
JSValueRef value = JSEvaluateScript(context, scriptString, 0, 0, 0, 0);
diff --git a/WebKit/gtk/tests/testhittestresult.c b/WebKit/gtk/tests/testhittestresult.c
index 89fe95c..0d7fb05 100644
--- a/WebKit/gtk/tests/testhittestresult.c
+++ b/WebKit/gtk/tests/testhittestresult.c
@@ -81,15 +81,15 @@ load_status_cb(WebKitWebView* webView,
if (status == WEBKIT_LOAD_FINISHED) {
WebKitHitTestResult* result;
guint context;
- GdkEventButton event;
+ GdkEvent* event = gdk_event_new(GDK_BUTTON_PRESS);
WebKitDOMNode* node;
- event.type = GDK_BUTTON_PRESS;
/* Close enough to 0,0 */
- event.x = 5;
- event.y = 5;
+ event->button.x = 5;
+ event->button.y = 5;
- result = webkit_web_view_get_hit_test_result(webView, &event);
+ result = webkit_web_view_get_hit_test_result(webView, (GdkEventButton*) event);
+ gdk_event_free(event);
g_assert(result);
g_object_get(result, "context", &context, NULL);
diff --git a/WebKit/gtk/webkit/webkitdownload.cpp b/WebKit/gtk/webkit/webkitdownload.cpp
index 0717e7c..9bcb739 100644
--- a/WebKit/gtk/webkit/webkitdownload.cpp
+++ b/WebKit/gtk/webkit/webkitdownload.cpp
@@ -905,7 +905,7 @@ static void webkit_download_error(WebKitDownload* download, const ResourceError&
webkit_download_close_stream(download);
WebKitDownloadPrivate* priv = download->priv;
- GRefPtr<WebKitDownload> protect(download);
+ PlatformRefPtr<WebKitDownload> protect(download);
g_timer_stop(priv->timer);
webkit_download_set_status(download, WEBKIT_DOWNLOAD_STATUS_ERROR);
diff --git a/WebKit/gtk/webkit/webkitnetworkrequest.cpp b/WebKit/gtk/webkit/webkitnetworkrequest.cpp
index c72abbd..8b50948 100644
--- a/WebKit/gtk/webkit/webkitnetworkrequest.cpp
+++ b/WebKit/gtk/webkit/webkitnetworkrequest.cpp
@@ -164,7 +164,7 @@ static void webkit_network_request_init(WebKitNetworkRequest* request)
// for internal use only
WebKitNetworkRequest* webkit_network_request_new_with_core_request(const WebCore::ResourceRequest& resourceRequest)
{
- GRefPtr<SoupMessage> soupMessage(adoptGRef(resourceRequest.toSoupMessage()));
+ PlatformRefPtr<SoupMessage> soupMessage(adoptPlatformRef(resourceRequest.toSoupMessage()));
if (soupMessage)
return WEBKIT_NETWORK_REQUEST(g_object_new(WEBKIT_TYPE_NETWORK_REQUEST, "message", soupMessage.get(), NULL));
diff --git a/WebKit/gtk/webkit/webkitnetworkresponse.cpp b/WebKit/gtk/webkit/webkitnetworkresponse.cpp
index 6745b94..d4dd562 100644
--- a/WebKit/gtk/webkit/webkitnetworkresponse.cpp
+++ b/WebKit/gtk/webkit/webkitnetworkresponse.cpp
@@ -161,7 +161,7 @@ static void webkit_network_response_init(WebKitNetworkResponse* response)
// for internal use only
WebKitNetworkResponse* webkit_network_response_new_with_core_response(const WebCore::ResourceResponse& resourceResponse)
{
- GRefPtr<SoupMessage> soupMessage(adoptGRef(resourceResponse.toSoupMessage()));
+ PlatformRefPtr<SoupMessage> soupMessage(adoptPlatformRef(resourceResponse.toSoupMessage()));
if (soupMessage)
return WEBKIT_NETWORK_RESPONSE(g_object_new(WEBKIT_TYPE_NETWORK_RESPONSE, "message", soupMessage.get(), NULL));
diff --git a/WebKit/gtk/webkit/webkitprivate.cpp b/WebKit/gtk/webkit/webkitprivate.cpp
index 91b2904..1b7f7a3 100644
--- a/WebKit/gtk/webkit/webkitprivate.cpp
+++ b/WebKit/gtk/webkit/webkitprivate.cpp
@@ -28,6 +28,8 @@
#include "FrameLoader.h"
#include "FrameLoaderClientGtk.h"
#include "GtkVersioning.h"
+#include "HTMLMediaElement.h"
+#include "HTMLNames.h"
#include "HitTestResult.h"
#include "IconDatabase.h"
#include "Logging.h"
@@ -50,6 +52,10 @@
#include <stdlib.h>
#include <wtf/Threading.h>
+#if ENABLE(VIDEO)
+#include "FullscreenVideoController.h"
+#endif
+
#if ENABLE(DATABASE)
#include "DatabaseTracker.h"
#endif
@@ -278,12 +284,6 @@ void webkit_init()
// FIXME: Expose this with an API and/or calculate based on available resources
webkit_set_cache_model(WEBKIT_CACHE_MODEL_WEB_BROWSER);
-#ifdef HAVE_GSETTINGS
- // Initialize settings variables here to make sure this happens in
- // the main thread.
- inspectorGSettings();
-#endif
-
#if ENABLE(DATABASE)
gchar* databaseDirectory = g_build_filename(g_get_user_data_dir(), "webkit", "databases", NULL);
webkit_set_web_database_directory_path(databaseDirectory);
@@ -327,3 +327,33 @@ void webkit_reset_origin_access_white_lists()
{
SecurityOrigin::resetOriginAccessWhitelists();
}
+
+
+void webkitWebViewEnterFullscreen(WebKitWebView* webView, Node* node)
+{
+ if (!node->hasTagName(HTMLNames::videoTag))
+ return;
+
+#if ENABLE(VIDEO)
+ HTMLMediaElement* videoElement = static_cast<HTMLMediaElement*>(node);
+ WebKitWebViewPrivate* priv = webView->priv;
+
+ // First exit Fullscreen for the old mediaElement.
+ if (priv->fullscreenVideoController)
+ priv->fullscreenVideoController->exitFullscreen();
+
+ priv->fullscreenVideoController = new FullscreenVideoController;
+ priv->fullscreenVideoController->setMediaElement(videoElement);
+ priv->fullscreenVideoController->enterFullscreen();
+#endif
+}
+
+void webkitWebViewExitFullscreen(WebKitWebView* webView)
+{
+#if ENABLE(VIDEO)
+ WebKitWebViewPrivate* priv = webView->priv;
+ if (priv->fullscreenVideoController)
+ priv->fullscreenVideoController->exitFullscreen();
+#endif
+}
+
diff --git a/WebKit/gtk/webkit/webkitprivate.h b/WebKit/gtk/webkit/webkitprivate.h
index a5508a4..92bb27d 100644
--- a/WebKit/gtk/webkit/webkitprivate.h
+++ b/WebKit/gtk/webkit/webkitprivate.h
@@ -56,6 +56,8 @@
#include "InspectorClientGtk.h"
#include "IntPoint.h"
#include "FrameLoaderClient.h"
+#include "FullscreenVideoController.h"
+#include "Node.h"
#include "Page.h"
#include "ResourceHandle.h"
#include "ResourceRequest.h"
@@ -161,6 +163,8 @@ extern "C" {
gboolean disposing;
gboolean usePrimaryForPaste;
+ FullscreenVideoController* fullscreenVideoController;
+
// These are hosted here because the DataSource object is
// created too late in the frame loading process.
WebKitWebResource* mainResource;
@@ -410,6 +414,9 @@ extern "C" {
WEBKIT_API void
webkit_web_frame_layout(WebKitWebFrame* frame);
+
+ void webkitWebViewEnterFullscreen(WebKitWebView* webView, WebCore::Node* node);
+ void webkitWebViewExitFullscreen(WebKitWebView* webView);
}
#endif
diff --git a/WebKit/gtk/webkit/webkitwebview.cpp b/WebKit/gtk/webkit/webkitwebview.cpp
index 64b7dcc..76fe6cb 100644
--- a/WebKit/gtk/webkit/webkitwebview.cpp
+++ b/WebKit/gtk/webkit/webkitwebview.cpp
@@ -195,7 +195,8 @@ enum {
PROP_ENCODING,
PROP_CUSTOM_ENCODING,
PROP_ICON_URI,
- PROP_IM_CONTEXT
+ PROP_IM_CONTEXT,
+ PROP_VIEW_MODE
};
static guint webkit_web_view_signals[LAST_SIGNAL] = { 0, };
@@ -449,6 +450,9 @@ static void webkit_web_view_get_property(GObject* object, guint prop_id, GValue*
case PROP_IM_CONTEXT:
g_value_set_object(value, webkit_web_view_get_im_context(webView));
break;
+ case PROP_VIEW_MODE:
+ g_value_set_enum(value, webkit_web_view_get_view_mode(webView));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
}
@@ -480,6 +484,9 @@ static void webkit_web_view_set_property(GObject* object, guint prop_id, const G
case PROP_CUSTOM_ENCODING:
webkit_web_view_set_custom_encoding(webView, g_value_get_string(value));
break;
+ case PROP_VIEW_MODE:
+ webkit_web_view_set_view_mode(webView, static_cast<WebKitWebViewViewMode>(g_value_get_enum(value)));
+ break;
default:
G_OBJECT_WARN_INVALID_PROPERTY_ID(object, prop_id, pspec);
}
@@ -985,8 +992,8 @@ static gboolean webkit_web_view_script_dialog(WebKitWebView* webView, WebKitWebF
break;
case WEBKIT_SCRIPT_DIALOG_CONFIRM:
messageType = GTK_MESSAGE_QUESTION;
- buttons = GTK_BUTTONS_YES_NO;
- defaultResponse = GTK_RESPONSE_YES;
+ buttons = GTK_BUTTONS_OK_CANCEL;
+ defaultResponse = GTK_RESPONSE_OK;
break;
case WEBKIT_SCRIPT_DIALOG_PROMPT:
messageType = GTK_MESSAGE_QUESTION;
@@ -1016,17 +1023,11 @@ static gboolean webkit_web_view_script_dialog(WebKitWebView* webView, WebKitWebF
gint response = gtk_dialog_run(GTK_DIALOG(dialog));
switch (response) {
- case GTK_RESPONSE_YES:
- didConfirm = TRUE;
- break;
case GTK_RESPONSE_OK:
didConfirm = TRUE;
if (entry)
*value = g_strdup(gtk_entry_get_text(GTK_ENTRY(entry)));
- else
- *value = 0;
break;
- case GTK_RESPONSE_NO:
case GTK_RESPONSE_CANCEL:
didConfirm = FALSE;
break;
@@ -2859,6 +2860,32 @@ static void webkit_web_view_class_init(WebKitWebViewClass* webViewClass)
GTK_TYPE_IM_CONTEXT,
WEBKIT_PARAM_READABLE));
+ /**
+ * WebKitWebView:view-mode:
+ *
+ * The "view-mode" media feature for the #WebKitWebView.
+ *
+ * The "view-mode" media feature is additional information for web
+ * applications about how the application is running, when it comes
+ * to user experience. Whether the application is running inside a
+ * regular browser window, in a dedicated window, fullscreen, for
+ * instance.
+ *
+ * This property stores a %WebKitWebViewViewMode value that matches
+ * the "view-mode" media feature the web application will see.
+ *
+ * See http://www.w3.org/TR/view-mode/ for more information.
+ *
+ * Since: 1.3.4
+ */
+ g_object_class_install_property(objectClass, PROP_VIEW_MODE,
+ g_param_spec_enum("view-mode",
+ "View Mode",
+ "The view-mode media feature for the #WebKitWebView.",
+ WEBKIT_TYPE_WEB_VIEW_VIEW_MODE,
+ WEBKIT_WEB_VIEW_VIEW_MODE_WINDOWED,
+ WEBKIT_PARAM_READWRITE));
+
g_type_class_add_private(webViewClass, sizeof(WebKitWebViewPrivate));
}
@@ -4252,6 +4279,76 @@ const char* webkit_web_view_get_custom_encoding(WebKitWebView* webView)
}
/**
+ * webkit_web_view_set_view_mode:
+ * @web_view: the #WebKitWebView that will have its view mode set
+ * @mode: the %WebKitWebViewViewMode to be set
+ *
+ * Sets the view-mode property of the #WebKitWebView. Check the
+ * property's documentation for more information.
+ *
+ * Since: 1.3.4
+ */
+void webkit_web_view_set_view_mode(WebKitWebView* webView, WebKitWebViewViewMode mode)
+{
+ g_return_if_fail(WEBKIT_IS_WEB_VIEW(webView));
+
+ Page* page = core(webView);
+
+ switch (mode) {
+ case WEBKIT_WEB_VIEW_VIEW_MODE_FLOATING:
+ page->setViewMode(Page::ViewModeFloating);
+ break;
+ case WEBKIT_WEB_VIEW_VIEW_MODE_FULLSCREEN:
+ page->setViewMode(Page::ViewModeFullscreen);
+ break;
+ case WEBKIT_WEB_VIEW_VIEW_MODE_MAXIMIZED:
+ page->setViewMode(Page::ViewModeMaximized);
+ break;
+ case WEBKIT_WEB_VIEW_VIEW_MODE_MINIMIZED:
+ page->setViewMode(Page::ViewModeMinimized);
+ break;
+ default:
+ page->setViewMode(Page::ViewModeWindowed);
+ break;
+ }
+}
+
+/**
+ * webkit_web_view_get_view_mode:
+ * @web_view: the #WebKitWebView to obtain the view mode from
+ *
+ * Gets the value of the view-mode property of the
+ * #WebKitWebView. Check the property's documentation for more
+ * information.
+ *
+ * Return value: the %WebKitWebViewViewMode currently set for the
+ * #WebKitWebView.
+ *
+ * Since: 1.3.4
+ */
+WebKitWebViewViewMode webkit_web_view_get_view_mode(WebKitWebView* webView)
+{
+ g_return_val_if_fail(WEBKIT_IS_WEB_VIEW(webView), WEBKIT_WEB_VIEW_VIEW_MODE_WINDOWED);
+
+ Page* page = core(webView);
+ Page::ViewMode mode = page->viewMode();
+
+ if (mode == Page::ViewModeFloating)
+ return WEBKIT_WEB_VIEW_VIEW_MODE_FLOATING;
+
+ if (mode == Page::ViewModeFullscreen)
+ return WEBKIT_WEB_VIEW_VIEW_MODE_FULLSCREEN;
+
+ if (mode == Page::ViewModeMaximized)
+ return WEBKIT_WEB_VIEW_VIEW_MODE_MAXIMIZED;
+
+ if (mode == Page::ViewModeMinimized)
+ return WEBKIT_WEB_VIEW_VIEW_MODE_MINIMIZED;
+
+ return WEBKIT_WEB_VIEW_VIEW_MODE_WINDOWED;
+}
+
+/**
* webkit_web_view_move_cursor:
* @web_view: a #WebKitWebView
* @step: a #GtkMovementStep
diff --git a/WebKit/gtk/webkit/webkitwebview.h b/WebKit/gtk/webkit/webkitwebview.h
index 865ae9d..a320131 100644
--- a/WebKit/gtk/webkit/webkitwebview.h
+++ b/WebKit/gtk/webkit/webkitwebview.h
@@ -64,6 +64,15 @@ typedef enum
WEBKIT_WEB_VIEW_TARGET_INFO_NETSCAPE_URL
} WebKitWebViewTargetInfo;
+typedef enum
+{
+ WEBKIT_WEB_VIEW_VIEW_MODE_WINDOWED,
+ WEBKIT_WEB_VIEW_VIEW_MODE_FLOATING,
+ WEBKIT_WEB_VIEW_VIEW_MODE_FULLSCREEN,
+ WEBKIT_WEB_VIEW_VIEW_MODE_MAXIMIZED,
+ WEBKIT_WEB_VIEW_VIEW_MODE_MINIMIZED
+} WebKitWebViewViewMode;
+
struct _WebKitWebView {
GtkContainer parent_instance;
@@ -340,6 +349,13 @@ WEBKIT_API const char*
webkit_web_view_get_custom_encoding (WebKitWebView * webView);
WEBKIT_API void
+webkit_web_view_set_view_mode (WebKitWebView *web_view,
+ WebKitWebViewViewMode mode);
+
+WEBKIT_API WebKitWebViewViewMode
+webkit_web_view_get_view_mode (WebKitWebView *web_view);
+
+WEBKIT_API void
webkit_web_view_move_cursor (WebKitWebView * webView,
GtkMovementStep step,
gint count);
diff --git a/WebKit/mac/ChangeLog b/WebKit/mac/ChangeLog
index 1381fee..565b1b0 100644
--- a/WebKit/mac/ChangeLog
+++ b/WebKit/mac/ChangeLog
@@ -1,3 +1,100 @@
+2010-08-24 Eric Seidel <eric@webkit.org>
+
+ Reviewed by Adam Barth.
+
+ Remove HTML5 parser testing infrastructure now that we don't need it
+ https://bugs.webkit.org/show_bug.cgi?id=44581
+
+ * WebView/WebPreferenceKeysPrivate.h:
+ * WebView/WebPreferences.mm:
+ (+[WebPreferences initialize]):
+ * WebView/WebPreferencesPrivate.h:
+ * WebView/WebView.mm:
+ (-[WebView _preferencesChangedNotification:]):
+
+2010-08-24 Sam Weinig <sam@webkit.org>
+
+ Reviewed by Oliver Hunt.
+
+ Paste event fires twice for mac WebKit
+ <rdar://problem/8094611>
+ https://bugs.webkit.org/show_bug.cgi?id=44535
+
+ The mac implementation of paste in WebKit was accidentally calling
+ Editor::tryDHTMLPaste twice, once in -[WebHTMLView paste:] and once
+ in Editor::pasteAsPlainText (which is called -[WebHTMLView paste:]).
+ Use the new pasteAsPlainTextBypassingDHTML function to bypass the
+ second call.
+
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView paste:]):
+
+2010-08-24 Daniel Cheng <dcheng@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] Generate drag images for HTML elements and selections.
+ https://bugs.webkit.org/show_bug.cgi?id=43449
+
+ Fix up calls to Frame::nodeImage, which has a new signature.
+
+ * Plugins/WebBaseNetscapePluginView.mm:
+ (-[WebBaseNetscapePluginView halt]):
+
+2010-08-23 Mike Thole <mthole@apple.com>
+
+ Reviewed by Dan Bernstein.
+
+ WebPDFView should remove itself as the delegate of its PDFView before being dealloced
+ https://bugs.webkit.org/show_bug.cgi?id=44441
+
+ * WebView/WebPDFView.mm:
+ (-[WebPDFView dealloc]): Set the PDFView's delegate to nil.
+
+2010-08-22 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ Encapsulate document marker management into DocumentMarkerController
+ https://bugs.webkit.org/show_bug.cgi?id=44383
+
+ Modify call sites in the Apple Mac port to use DocumentMarkerController.
+
+ No functionality was changed, so no new tests.
+
+ * WebView/WebFrame.mm:
+ (-[WebFrame _unmarkAllBadGrammar]):
+ (-[WebFrame _unmarkAllMisspellings]):
+ * WebView/WebHTMLView.mm:
+ (-[WebHTMLView unmarkAllTextMatches]):
+ (-[WebHTMLView rectsForTextMatches]):
+
+2010-08-19 David Kilzer <ddkilzer@apple.com>
+
+ <http://webkit.org/b/44285> Fix compilation with NETSCAPE_PLUGIN_API disabled
+
+ Reviewed by Joseph Pecoraro.
+
+ * Plugins/Hosted/HostedNetscapePluginStream.mm: Changed
+ USE(PLUGIN_HOST_PROCESS) to
+ USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API).
+ * Plugins/Hosted/NetscapePluginHostManager.mm: Ditto.
+ * Plugins/Hosted/NetscapePluginHostProxy.mm: Ditto.
+ * Plugins/Hosted/NetscapePluginInstanceProxy.mm: Ditto.
+ * Plugins/Hosted/ProxyInstance.mm: Ditto.
+ * Plugins/Hosted/WebHostedNetscapePluginView.mm: Ditto.
+ * WebCoreSupport/WebChromeClient.mm: Ditto.
+ (WebChromeClient::createWindow):
+ * WebCoreSupport/WebFrameLoaderClient.mm: Ditto.
+ (WebFrameLoaderClient::dispatchCreatePage):
+ * WebView/WebHTMLView.mm:
+ (needsCursorRectsSupportAtPoint): Added #if
+ ENABLE(NETSCAPE_PLUGIN_API) and #endif macros as needed.
+ * WebView/WebView.mm:
+ (+[WebView _isNodeHaltedPlugin:]): Ditto.
+ (+[WebView _hasPluginForNodeBeenHalted:]): Ditto.
+ (+[WebView _restartHaltedPluginForNode:]): Ditto.
+
2010-08-17 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed by Darin Adler.
diff --git a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
index 25e5462..876a556 100644
--- a/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
+++ b/WebKit/mac/Plugins/Hosted/HostedNetscapePluginStream.mm
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "HostedNetscapePluginStream.h"
@@ -275,5 +275,5 @@ NSError *HostedNetscapePluginStream::errorForReason(NPReason reason) const
} // namespace WebKit
-#endif // USE(PLUGIN_HOST_PROCESS)
+#endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
index 22874df..322e0e8 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostManager.mm
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "NetscapePluginHostManager.h"
@@ -323,4 +323,4 @@ void NetscapePluginHostManager::didCreateWindow()
} // namespace WebKit
-#endif // USE(PLUGIN_HOST_PROCESS)
+#endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
index 8e1c2df..207f062 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginHostProxy.mm
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "NetscapePluginHostProxy.h"
@@ -1185,4 +1185,4 @@ kern_return_t WKPCSetException(mach_port_t clientPort, data_t message, mach_msg_
return KERN_SUCCESS;
}
-#endif // USE(PLUGIN_HOST_PROCESS)
+#endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
index cb1d958..a8dd09b 100644
--- a/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
+++ b/WebKit/mac/Plugins/Hosted/NetscapePluginInstanceProxy.mm
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "NetscapePluginInstanceProxy.h"
@@ -1677,4 +1677,4 @@ void NetscapePluginInstanceProxy::moveGlobalExceptionToExecState(ExecState* exec
} // namespace WebKit
-#endif // USE(PLUGIN_HOST_PROCESS)
+#endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
index 306d2e5..11ade8c 100644
--- a/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
+++ b/WebKit/mac/Plugins/Hosted/ProxyInstance.mm
@@ -23,7 +23,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "ProxyInstance.h"
@@ -454,5 +454,5 @@ void ProxyInstance::invalidate()
} // namespace WebKit
-#endif // USE(PLUGIN_HOST_PROCESS)
+#endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
index e743722..63a7b6a 100644
--- a/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/Hosted/WebHostedNetscapePluginView.mm
@@ -22,7 +22,8 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#if USE(PLUGIN_HOST_PROCESS)
+
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "WebHostedNetscapePluginView.h"
@@ -505,4 +506,4 @@ extern "C" {
@end
-#endif
+#endif // USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
diff --git a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
index 6ae7334..4966716 100644
--- a/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
+++ b/WebKit/mac/Plugins/WebBaseNetscapePluginView.mm
@@ -510,9 +510,9 @@ String WebHaltablePlugin::pluginName() const
ASSERT(_isStarted);
Element *element = [self element];
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
- CGImageRef cgImage = CGImageRetain([core([self webFrame])->nodeImage(element) CGImageForProposedRect:nil context:nil hints:nil]);
+ CGImageRef cgImage = CGImageRetain([core([self webFrame])->nodeImage(element).get() CGImageForProposedRect:nil context:nil hints:nil]);
#else
- RetainPtr<CGImageSourceRef> imageRef(AdoptCF, CGImageSourceCreateWithData((CFDataRef)[core([self webFrame])->nodeImage(element) TIFFRepresentation], 0));
+ RetainPtr<CGImageSourceRef> imageRef(AdoptCF, CGImageSourceCreateWithData((CFDataRef)[core([self webFrame])->nodeImage(element).get() TIFFRepresentation], 0));
CGImageRef cgImage = CGImageSourceCreateImageAtIndex(imageRef.get(), 0, 0);
#endif
ASSERT(cgImage);
diff --git a/WebKit/mac/WebCoreSupport/WebChromeClient.mm b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
index c80721f..2c2616d 100644
--- a/WebKit/mac/WebCoreSupport/WebChromeClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebChromeClient.mm
@@ -77,7 +77,7 @@
#import <WebCore/GraphicsLayer.h>
#endif
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "NetscapePluginHostManager.h"
#endif
@@ -250,7 +250,7 @@ Page* WebChromeClient::createWindow(Frame* frame, const FrameLoadRequest& reques
newWebView = CallUIDelegate(m_webView, @selector(webView:createWebViewWithRequest:), URLRequest);
}
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
if (newWebView)
WebKit::NetscapePluginHostManager::shared().didCreateWindow();
#endif
diff --git a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
index 1021ad9..8bdeca0 100644
--- a/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
+++ b/WebKit/mac/WebCoreSupport/WebFrameLoaderClient.mm
@@ -127,7 +127,7 @@
#import "WebJavaPlugIn.h"
#endif
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
#import "NetscapePluginHostManager.h"
#import "WebHostedNetscapePluginView.h"
#endif
@@ -706,7 +706,7 @@ Frame* WebFrameLoaderClient::dispatchCreatePage()
windowFeatures:features];
[features release];
-#if USE(PLUGIN_HOST_PROCESS)
+#if USE(PLUGIN_HOST_PROCESS) && ENABLE(NETSCAPE_PLUGIN_API)
if (newWebView)
WebKit::NetscapePluginHostManager::shared().didCreateWindow();
#endif
@@ -1552,14 +1552,14 @@ public:
};
-#endif // ENABLE(NETSCAPE_PLUGIN_API)
-
#if USE(PLUGIN_HOST_PROCESS)
#define NETSCAPE_PLUGIN_VIEW WebHostedNetscapePluginView
#else
#define NETSCAPE_PLUGIN_VIEW WebNetscapePluginView
#endif
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+
PassRefPtr<Widget> WebFrameLoaderClient::createPlugin(const IntSize& size, HTMLPlugInElement* element, const KURL& url,
const Vector<String>& paramNames, const Vector<String>& paramValues, const String& mimeType, bool loadManually)
{
diff --git a/WebKit/mac/WebView/WebFrame.mm b/WebKit/mac/WebView/WebFrame.mm
index 82df7bc..dff9ff7 100644
--- a/WebKit/mac/WebView/WebFrame.mm
+++ b/WebKit/mac/WebView/WebFrame.mm
@@ -395,7 +395,7 @@ WebView *getWebView(WebFrame *webFrame)
Frame* coreFrame = _private->coreFrame;
for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
if (Document* document = frame->document())
- document->removeMarkers(DocumentMarker::Grammar);
+ document->markers()->removeMarkers(DocumentMarker::Grammar);
}
}
#endif
@@ -405,7 +405,7 @@ WebView *getWebView(WebFrame *webFrame)
Frame* coreFrame = _private->coreFrame;
for (Frame* frame = coreFrame; frame; frame = frame->tree()->traverseNext(coreFrame)) {
if (Document* document = frame->document())
- document->removeMarkers(DocumentMarker::Spelling);
+ document->markers()->removeMarkers(DocumentMarker::Spelling);
}
}
diff --git a/WebKit/mac/WebView/WebHTMLView.mm b/WebKit/mac/WebView/WebHTMLView.mm
index 77df9d1..a619f18 100644
--- a/WebKit/mac/WebView/WebHTMLView.mm
+++ b/WebKit/mac/WebView/WebHTMLView.mm
@@ -167,9 +167,11 @@ static bool needsCursorRectsSupportAtPoint(NSWindow* window, NSPoint point)
if ([view isKindOfClass:[WebHTMLView class]])
return false;
+#if ENABLE(NETSCAPE_PLUGIN_API)
// Neither do NPAPI plug-ins.
if ([view isKindOfClass:[WebBaseNetscapePluginView class]])
return false;
+#endif
// Non-Web content, WebPDFView, and WebKit plug-ins use normal cursor handling.
return true;
@@ -5174,7 +5176,7 @@ static BOOL writingDirectionKeyBindingsEnabled()
if (coreFrame->selection()->isContentRichlyEditable())
[self _pasteWithPasteboard:[NSPasteboard generalPasteboard] allowPlainText:YES];
else
- coreFrame->editor()->pasteAsPlainText();
+ coreFrame->editor()->pasteAsPlainTextBypassingDHTML();
}
- (void)closeIfNotCurrentView
@@ -6228,7 +6230,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
Document* document = coreFrame->document();
if (!document)
return;
- document->removeMarkers(DocumentMarker::TextMatch);
+ document->markers()->removeMarkers(DocumentMarker::TextMatch);
}
- (NSArray *)rectsForTextMatches
@@ -6240,7 +6242,7 @@ static void extractUnderlines(NSAttributedString *string, Vector<CompositionUnde
if (!document)
return [NSArray array];
- Vector<IntRect> rects = document->renderedRectsForMarkers(DocumentMarker::TextMatch);
+ Vector<IntRect> rects = document->markers()->renderedRectsForMarkers(DocumentMarker::TextMatch);
unsigned count = rects.size();
NSMutableArray *result = [NSMutableArray arrayWithCapacity:count];
for (unsigned index = 0; index < count; ++index)
diff --git a/WebKit/mac/WebView/WebPDFView.mm b/WebKit/mac/WebView/WebPDFView.mm
index 1be3033..5e7b73c 100644
--- a/WebKit/mac/WebView/WebPDFView.mm
+++ b/WebKit/mac/WebView/WebPDFView.mm
@@ -193,6 +193,7 @@ static BOOL _PDFSelectionsAreEqual(PDFSelection *selectionA, PDFSelection *selec
{
[dataSource release];
[previewView release];
+ [PDFSubview setDelegate:nil];
[PDFSubview release];
[path release];
[PDFSubviewProxy release];
diff --git a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
index a8ebdca..86f6d85 100644
--- a/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
+++ b/WebKit/mac/WebView/WebPreferenceKeysPrivate.h
@@ -95,8 +95,6 @@
#define WebKitUsesProxiedOpenPanelPreferenceKey @"WebKitUsesProxiedOpenPanel"
#define WebKitPluginAllowedRunTimePreferenceKey @"WebKitPluginAllowedRunTime"
#define WebKitFrameFlatteningEnabledPreferenceKey @"WebKitFrameFlatteningEnabled"
-#define WebKitHTML5ParserEnabledPreferenceKey @"WebKitHTML5ParserEnabled"
-#define WebKitHTML5TreeBuilderEnabledPreferenceKey @"WebKitHTML5TreeBuilderEnabled" // Temporary, do not use.
#define WebKitPaginateDuringLayoutEnabledPreferenceKey @"WebKitPaginateDuringLayoutEnabled"
#define WebKitDNSPrefetchingEnabledPreferenceKey @"WebKitDNSPrefetchingEnabled"
#define WebKitMemoryInfoEnabledPreferenceKey @"WebKitMemoryInfoEnabled"
diff --git a/WebKit/mac/WebView/WebPreferences.mm b/WebKit/mac/WebView/WebPreferences.mm
index c46dca7..eae2d8d 100644
--- a/WebKit/mac/WebView/WebPreferences.mm
+++ b/WebKit/mac/WebView/WebPreferences.mm
@@ -364,8 +364,6 @@ static WebCacheModel cacheModelForMainBundle(void)
[NSNumber numberWithBool:NO], WebKitUsesProxiedOpenPanelPreferenceKey,
[NSNumber numberWithUnsignedInt:4], WebKitPluginAllowedRunTimePreferenceKey,
[NSNumber numberWithBool:NO], WebKitFrameFlatteningEnabledPreferenceKey,
- [NSNumber numberWithBool:YES], WebKitHTML5ParserEnabledPreferenceKey,
- [NSNumber numberWithBool:NO], WebKitHTML5TreeBuilderEnabledPreferenceKey,
[NSNumber numberWithBool:YES], WebKitDNSPrefetchingEnabledPreferenceKey,
[NSNumber numberWithBool:NO], WebKitMemoryInfoEnabledPreferenceKey,
[NSNumber numberWithLongLong:WebCore::ApplicationCacheStorage::noQuota()], WebKitApplicationCacheTotalQuota,
@@ -1298,26 +1296,6 @@ static NSString *classIBCreatorID = nil;
[self _setBoolValue:flag forKey:WebKitFrameFlatteningEnabledPreferenceKey];
}
-- (BOOL)html5ParserEnabled
-{
- return [self _boolValueForKey:WebKitHTML5ParserEnabledPreferenceKey];
-}
-
-- (void)setHTML5ParserEnabled:(BOOL)flag
-{
- [self _setBoolValue:flag forKey:WebKitHTML5ParserEnabledPreferenceKey];
-}
-
-- (BOOL)html5TreeBuilderEnabled
-{
- return [self _boolValueForKey:WebKitHTML5TreeBuilderEnabledPreferenceKey];
-}
-
-- (void)setHTML5TreeBuilderEnabled:(BOOL)flag
-{
- [self _setBoolValue:flag forKey:WebKitHTML5TreeBuilderEnabledPreferenceKey];
-}
-
- (BOOL)paginateDuringLayoutEnabled
{
return [self _boolValueForKey:WebKitPaginateDuringLayoutEnabledPreferenceKey];
diff --git a/WebKit/mac/WebView/WebPreferencesPrivate.h b/WebKit/mac/WebView/WebPreferencesPrivate.h
index 01f2aa8..45c2a24 100644
--- a/WebKit/mac/WebView/WebPreferencesPrivate.h
+++ b/WebKit/mac/WebView/WebPreferencesPrivate.h
@@ -184,13 +184,6 @@ extern NSString *WebPreferencesRemovedNotification;
- (BOOL)webGLEnabled;
- (void)setWebGLEnabled:(BOOL)enabled;
-- (BOOL)html5ParserEnabled;
-- (void)setHTML5ParserEnabled:(BOOL)flag;
-
-// Will be deleted soon, do not use.
-- (BOOL)html5TreeBuilderEnabled;
-- (void)setHTML5TreeBuilderEnabled:(BOOL)flag;
-
- (BOOL)paginateDuringLayoutEnabled;
- (void)setPaginateDuringLayoutEnabled:(BOOL)flag;
diff --git a/WebKit/mac/WebView/WebView.mm b/WebKit/mac/WebView/WebView.mm
index d6faeca..2d3dbfa 100644
--- a/WebKit/mac/WebView/WebView.mm
+++ b/WebKit/mac/WebView/WebView.mm
@@ -1437,8 +1437,6 @@ static bool fastDocumentTeardownEnabled()
settings->setWebGLEnabled([preferences webGLEnabled]);
settings->setLoadDeferringEnabled(shouldEnableLoadDeferring());
settings->setFrameFlatteningEnabled([preferences isFrameFlatteningEnabled]);
- settings->setHTML5ParserEnabled([preferences html5ParserEnabled]);
- settings->setHTML5TreeBuilderEnabled_DO_NOT_USE([preferences html5TreeBuilderEnabled]);
settings->setPaginateDuringLayoutEnabled([preferences paginateDuringLayoutEnabled]);
settings->setMemoryInfoEnabled([preferences memoryInfoEnabled]);
@@ -2291,6 +2289,7 @@ static inline IMP getMethod(id o, SEL s)
return _private->includesFlattenedCompositingLayersWhenDrawingToBitmap;
}
+#if ENABLE(NETSCAPE_PLUGIN_API)
static WebBaseNetscapePluginView *_pluginViewForNode(DOMNode *node)
{
if (!node)
@@ -2314,22 +2313,33 @@ static WebBaseNetscapePluginView *_pluginViewForNode(DOMNode *node)
return (WebBaseNetscapePluginView *)view;
}
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
+ (BOOL)_isNodeHaltedPlugin:(DOMNode *)node
{
+#if ENABLE(NETSCAPE_PLUGIN_API)
return [_pluginViewForNode(node) isHalted];
+#else
+ return YES;
+#endif
}
+ (BOOL)_hasPluginForNodeBeenHalted:(DOMNode *)node
{
+#if ENABLE(NETSCAPE_PLUGIN_API)
return [_pluginViewForNode(node) hasBeenHalted];
+#else
+ return YES;
+#endif
}
+ (void)_restartHaltedPluginForNode:(DOMNode *)node
{
+#if ENABLE(NETSCAPE_PLUGIN_API)
if (!node)
return;
[_pluginViewForNode(node) resumeFromHalt];
+#endif
}
- (NSPasteboard *)_insertionPasteboard
diff --git a/WebKit/qt/Api/DerivedSources.pro b/WebKit/qt/Api/DerivedSources.pro
index 62546f6..86d5dac 100644
--- a/WebKit/qt/Api/DerivedSources.pro
+++ b/WebKit/qt/Api/DerivedSources.pro
@@ -10,15 +10,14 @@ DESTDIR = ../../../include/QtWebKit
QUOTE = ""
DOUBLE_ESCAPED_QUOTE = ""
ESCAPE = ""
-win32-msvc*|symbian {
- ESCAPE = "^"
-} else:win32-g++*:isEmpty(QMAKE_SH) {
+contains(QMAKE_HOST.os, "Windows"):isEmpty(QMAKE_SH) {
# MinGW's make will run makefile commands using sh, even if make
# was run from the Windows shell, if it finds sh in the path.
ESCAPE = "^"
} else {
QUOTE = "\'"
DOUBLE_ESCAPED_QUOTE = "\\\'"
+ ESCAPE = "\\"
}
qtheader_module.target = $${DESTDIR}/QtWebKit
diff --git a/WebKit/qt/Api/qwebelement.cpp b/WebKit/qt/Api/qwebelement.cpp
index ce2f283..83ee451 100644
--- a/WebKit/qt/Api/qwebelement.cpp
+++ b/WebKit/qt/Api/qwebelement.cpp
@@ -739,7 +739,7 @@ QVariant QWebElement::evaluateJavaScript(const QString& scriptSource)
return QVariant();
JSC::ScopeChain& scopeChain = state->dynamicGlobalObject()->globalScopeChain();
- JSC::UString script((const UChar*)scriptSource.data(), scriptSource.length());
+ JSC::UString script(reinterpret_cast_ptr<const UChar*>(scriptSource.data()), scriptSource.length());
JSC::Completion completion = JSC::evaluate(state, scopeChain, JSC::makeSource(script), thisValue);
if ((completion.complType() != JSC::ReturnValue) && (completion.complType() != JSC::Normal))
return QVariant();
@@ -1190,6 +1190,8 @@ void QWebElement::removeAllChildren()
m_element->removeAllChildren();
}
+// FIXME: This code, and all callers are wrong, and have no place in a
+// WebKit implementation. These should be replaced with WebCore implementations.
static RefPtr<Node> findInsertionPoint(PassRefPtr<Node> root)
{
RefPtr<Node> node = root;
@@ -1205,7 +1207,7 @@ static RefPtr<Node> findInsertionPoint(PassRefPtr<Node> root)
// The insert point could be a non-enclosable tag and it can thus
// never have children, so go one up. Get the parent element, and not
// note as a root note will always exist.
- if (element->endTagRequirement() == TagStatusForbidden)
+ if (element->ieForbidsInsertHTML())
node = node->parentElement();
}
diff --git a/WebKit/qt/Api/qwebframe.cpp b/WebKit/qt/Api/qwebframe.cpp
index 0bb6922..1b0c2df 100644
--- a/WebKit/qt/Api/qwebframe.cpp
+++ b/WebKit/qt/Api/qwebframe.cpp
@@ -496,7 +496,7 @@ void QWebFrame::addToJavaScriptWindowObject(const QString &name, QObject *object
JSC::Bindings::QtInstance::getQtInstance(object, root, ownership)->createRuntimeObject(exec);
JSC::PutPropertySlot slot;
- window->put(exec, JSC::Identifier(exec, (const UChar *) name.constData(), name.length()), runtimeObject, slot);
+ window->put(exec, JSC::Identifier(exec, reinterpret_cast_ptr<const UChar*>(name.constData()), name.length()), runtimeObject, slot);
}
/*!
@@ -1407,12 +1407,12 @@ QWebSecurityOrigin QWebFrame::securityOrigin() const
return QWebSecurityOrigin(priv);
}
-WebCore::Frame* QWebFramePrivate::core(QWebFrame* webFrame)
+WebCore::Frame* QWebFramePrivate::core(const QWebFrame* webFrame)
{
return webFrame->d->frame;
}
-QWebFrame* QWebFramePrivate::kit(WebCore::Frame* coreFrame)
+QWebFrame* QWebFramePrivate::kit(const WebCore::Frame* coreFrame)
{
return static_cast<FrameLoaderClientQt*>(coreFrame->loader()->client())->webFrame();
}
diff --git a/WebKit/qt/Api/qwebframe_p.h b/WebKit/qt/Api/qwebframe_p.h
index 15b0549..b5dda62 100644
--- a/WebKit/qt/Api/qwebframe_p.h
+++ b/WebKit/qt/Api/qwebframe_p.h
@@ -81,8 +81,8 @@ public:
WebCore::Scrollbar* horizontalScrollBar() const;
WebCore::Scrollbar* verticalScrollBar() const;
- static WebCore::Frame* core(QWebFrame*);
- static QWebFrame* kit(WebCore::Frame*);
+ static WebCore::Frame* core(const QWebFrame*);
+ static QWebFrame* kit(const WebCore::Frame*);
void renderRelativeCoords(WebCore::GraphicsContext*, QWebFrame::RenderLayer, const QRegion& clip);
#if ENABLE(TILED_BACKING_STORE)
diff --git a/WebKit/qt/Api/qwebhistory.cpp b/WebKit/qt/Api/qwebhistory.cpp
index 55305c9..1d9935d 100644
--- a/WebKit/qt/Api/qwebhistory.cpp
+++ b/WebKit/qt/Api/qwebhistory.cpp
@@ -554,7 +554,7 @@ QWebPagePrivate* QWebHistoryPrivate::page()
return QWebFramePrivate::kit(static_cast<WebCore::BackForwardListImpl*>(lst)->page()->mainFrame())->page()->handle();
}
-WebCore::HistoryItem* QWebHistoryItemPrivate::core(QWebHistoryItem* q)
+WebCore::HistoryItem* QWebHistoryItemPrivate::core(const QWebHistoryItem* q)
{
return q->d->item;
}
diff --git a/WebKit/qt/Api/qwebhistory_p.h b/WebKit/qt/Api/qwebhistory_p.h
index c9ff91b..1df2349 100644
--- a/WebKit/qt/Api/qwebhistory_p.h
+++ b/WebKit/qt/Api/qwebhistory_p.h
@@ -45,7 +45,7 @@ public:
item->deref();
}
- static WebCore::HistoryItem* core(QWebHistoryItem* q);
+ static WebCore::HistoryItem* core(const QWebHistoryItem* q);
WebCore::HistoryItem* item;
};
diff --git a/WebKit/qt/Api/qwebpage.cpp b/WebKit/qt/Api/qwebpage.cpp
index 516ebc9..5eee21c 100644
--- a/WebKit/qt/Api/qwebpage.cpp
+++ b/WebKit/qt/Api/qwebpage.cpp
@@ -322,7 +322,7 @@ QWebPagePrivate::~QWebPagePrivate()
#endif
}
-WebCore::Page* QWebPagePrivate::core(QWebPage* page)
+WebCore::Page* QWebPagePrivate::core(const QWebPage* page)
{
return page->d->page;
}
diff --git a/WebKit/qt/Api/qwebpage_p.h b/WebKit/qt/Api/qwebpage_p.h
index cf4ab88..6310eaf 100644
--- a/WebKit/qt/Api/qwebpage_p.h
+++ b/WebKit/qt/Api/qwebpage_p.h
@@ -72,7 +72,7 @@ public:
QWebPagePrivate(QWebPage*);
~QWebPagePrivate();
- static WebCore::Page* core(QWebPage*);
+ static WebCore::Page* core(const QWebPage*);
static QWebPagePrivate* priv(QWebPage*);
void createMainFrame();
diff --git a/WebKit/qt/Api/qwebview.cpp b/WebKit/qt/Api/qwebview.cpp
index 5e7265f..10cf60c 100644
--- a/WebKit/qt/Api/qwebview.cpp
+++ b/WebKit/qt/Api/qwebview.cpp
@@ -415,6 +415,8 @@ void QWebView::setPage(QWebPage* page)
this, SIGNAL(statusBarMessage(QString)));
connect(d->page, SIGNAL(linkClicked(QUrl)),
this, SIGNAL(linkClicked(QUrl)));
+ connect(d->page, SIGNAL(selectionChanged()),
+ this, SIGNAL(selectionChanged()));
connect(d->page, SIGNAL(microFocusChanged()),
this, SLOT(updateMicroFocus()));
diff --git a/WebKit/qt/ChangeLog b/WebKit/qt/ChangeLog
index 25e8fb3..9969ebd 100644
--- a/WebKit/qt/ChangeLog
+++ b/WebKit/qt/ChangeLog
@@ -1,3 +1,122 @@
+2010-08-25 Leo Yang <leo.yang@torchmobile.com.cn>
+
+ Reviewed by Simon Hausmann.
+
+ In FrameLoaderClientQt::createFrame we should call loadURLIntoChildFrame
+ with parent frame's loader instead of child frame's loader.
+ https://bugs.webkit.org/show_bug.cgi?id=43930
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createFrame):
+
+2010-08-25 Gabor Loki <loki@webkit.org>
+
+ Reviewed by Gavin Barraclough.
+
+ Avoid increasing required alignment of target type warning
+ https://bugs.webkit.org/show_bug.cgi?id=43963
+
+ Fix alignment warnings on Qt.
+
+ * Api/qwebelement.cpp:
+ (QWebElement::evaluateJavaScript):
+ * Api/qwebframe.cpp:
+ (QWebFrame::addToJavaScriptWindowObject):
+
+2010-08-24 Andras Becsi <abecsi@inf.u-szeged.hu>
+
+ Reviewed by Simon Hausmann.
+
+ [Qt] Fix predeclared variables for Symbian to be able to build QtWebKit for Symbian on Linux.
+
+ * Api/DerivedSources.pro:
+
+2010-08-20 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] Allow wmode=transparent in QWebView on Maemo5 after r65775.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44043
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createPlugin):
+
+2010-08-22 Marc Mutz <marc.mutz@kdab.com>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Actually emit the QWebView::selectionChanged() signal
+
+ https://bugs.webkit.org/show_bug.cgi?id=44252
+
+ * Api/qwebview.cpp:
+ (QWebView::setPage): Connect QWebPage::selectionChanged() to QWebView::selectionChanged()
+
+2010-08-20 Ademar de Souza Reis Jr <ademar.reis@openbossa.org>
+
+ Reviewed by Ariya Hidayat.
+
+ [Qt] constify core() and kit() parameters
+ https://bugs.webkit.org/show_bug.cgi?id=44347
+
+ * Api/qwebframe.cpp:
+ (QWebFrame::evaluateJavaScript):
+ * Api/qwebframe_p.h:
+ * Api/qwebhistory.cpp:
+ (QWebHistoryItemPrivate::core):
+ * Api/qwebhistory_p.h:
+ * Api/qwebpage.cpp:
+ (QWebPagePrivate::core):
+ * Api/qwebpage_p.h:
+
+2010-08-19 Balazs Kelemen <kb@inf.u-szeged.hu>
+
+ Reviewed by Antonio Gomes.
+
+ [Qt] Fix cursor change propagation
+ https://bugs.webkit.org/show_bug.cgi?id=44250
+
+ * WebCoreSupport/ChromeClientQt.cpp:
+ (WebCore::ChromeClientQt::setCursor): Implemented. Propagete the callback forward to the PageClient.
+
+2010-08-19 David Kilzer <ddkilzer@apple.com>
+
+ BUILD FIX #3: <http://webkit.org/b/44285> Fix compilation with NETSCAPE_PLUGIN_API disabled
+
+ Still trying to make Qt Linux Release minimal buildbot happy.
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createPlugin): Wrap code that
+ handles Netscape plugins in #if ENABLE(NETSCAPE_PLUGIN_API)
+ and #endif.
+
+2010-08-19 David Kilzer <ddkilzer@apple.com>
+
+ BUILD FIX: FrameLoaderClientQt.h should include ResourceError.h
+
+ * WebCoreSupport/FrameLoaderClientQt.h: Include ResourceError.h.
+
+2010-08-19 Girish Ramakrishnan <girish@forwardbias.in>
+
+ Reviewed by Kenneth Christiansen.
+
+ [Qt] Inject wmode=opaque for both QWebView and QGraphicsWebView on Maemo5
+ as Flash XEmbed support is flaky.
+
+ https://bugs.webkit.org/show_bug.cgi?id=44043
+
+ * WebCoreSupport/FrameLoaderClientQt.cpp:
+ (WebCore::FrameLoaderClientQt::createPlugin):
+
+2010-08-18 Laszlo Gombos <laszlo.1.gombos@nokia.com>
+
+ Unreviewed, trivial Symbian build fix.
+
+ [Qt] Remove unnecessary QtGui include from NotificationPresenterClientQt.cpp
+
+ * WebCoreSupport/NotificationPresenterClientQt.cpp:
+
2010-08-17 Laszlo Gombos <laszlo.1.gombos@nokia.com>
Reviewed by Ariya Hidayat.
diff --git a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
index 87ed19d..bfce824 100644
--- a/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/ChromeClientQt.cpp
@@ -554,9 +554,16 @@ void ChromeClientQt::chooseIconForFiles(const Vector<String>& filenames, FileCho
chooser->iconLoaded(Icon::createIconForFiles(filenames));
}
-void ChromeClientQt::setCursor(const Cursor&)
+void ChromeClientQt::setCursor(const Cursor& cursor)
{
- notImplemented();
+#ifndef QT_NO_CURSOR
+ QWebPageClient* pageClient = platformPageClient();
+ if (!pageClient)
+ return;
+ pageClient->setCursor(*cursor.platformCursor());
+#else
+ UNUSED_PARAM(cursor)
+#endif
}
void ChromeClientQt::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
index 1dd9f21..59f6ac6 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.cpp
@@ -4,7 +4,7 @@
* Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies)
* Copyright (C) 2008 Collabora Ltd. All rights reserved.
* Coypright (C) 2008 Holger Hans Peter Freyther
- * Coypright (C) 2009 Girish Ramakrishnan <girish@forwardbias.in>
+ * Coypright (C) 2009, 2010 Girish Ramakrishnan <girish@forwardbias.in>
*
* All rights reserved.
*
@@ -1190,7 +1190,7 @@ PassRefPtr<Frame> FrameLoaderClientQt::createFrame(const KURL& url, const String
// ### set override encoding if we have one
- frameData.frame->loader()->loadURLIntoChildFrame(frameData.url, frameData.referrer, frameData.frame.get());
+ m_frame->loader()->loadURLIntoChildFrame(frameData.url, frameData.referrer, frameData.frame.get());
// The frame's onload handler may have removed it from the document.
if (!frameData.frame->tree()->parent())
@@ -1456,12 +1456,26 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
#endif
// FIXME: make things work for widgetless plugins as well
delete object;
- } else { // NPAPI Plugins
+ }
+#if ENABLE(NETSCAPE_PLUGIN_API)
+ else { // NPAPI Plugins
Vector<String> params = paramNames;
Vector<String> values = paramValues;
if (mimeType == "application/x-shockwave-flash") {
QWebPageClient* client = m_webFrame->page()->d->client;
- if (!client || !qobject_cast<QWidget*>(client->pluginParent())) {
+ const bool isQWebView = client && qobject_cast<QWidget*>(client->pluginParent());
+#if defined(MOZ_PLATFORM_MAEMO) && (MOZ_PLATFORM_MAEMO == 5)
+ size_t wmodeIndex = params.find("wmode");
+ if (wmodeIndex == -1) {
+ // Disable XEmbed mode and force it to opaque mode
+ params.append("wmode");
+ values.append("opaque");
+ } else if (!isQWebView) {
+ // Disable transparency if client is not a QWebView
+ values[wmodeIndex] = "opaque";
+ }
+#else
+ if (!isQWebView) {
// inject wmode=opaque when there is no client or the client is not a QWebView
size_t wmodeIndex = params.find("wmode");
if (wmodeIndex == -1) {
@@ -1470,12 +1484,14 @@ PassRefPtr<Widget> FrameLoaderClientQt::createPlugin(const IntSize& pluginSize,
} else
values[wmodeIndex] = "opaque";
}
+#endif
}
RefPtr<PluginView> pluginView = PluginView::create(m_frame, pluginSize, element, url,
params, values, mimeType, loadManually);
return pluginView;
}
+#endif // ENABLE(NETSCAPE_PLUGIN_API)
return 0;
}
diff --git a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
index 00a073f..c72b82f 100644
--- a/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
+++ b/WebKit/qt/WebCoreSupport/FrameLoaderClientQt.h
@@ -37,6 +37,7 @@
#include "KURL.h"
#include "PluginView.h"
#include "RefCounted.h"
+#include "ResourceError.h"
#include "ResourceResponse.h"
#include <QUrl>
#include <qobject.h>
diff --git a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
index 477e205..c24c4d5 100644
--- a/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
+++ b/WebKit/qt/WebCoreSupport/NotificationPresenterClientQt.cpp
@@ -44,7 +44,6 @@
#include "qwebframe_p.h"
#include "qwebkitglobal.h"
#include "qwebpage.h"
-#include <QtGui>
namespace WebCore {
diff --git a/WebKit/win/ChangeLog b/WebKit/win/ChangeLog
index cd0f234..9a20e51 100644
--- a/WebKit/win/ChangeLog
+++ b/WebKit/win/ChangeLog
@@ -1,3 +1,47 @@
+2010-08-24 Ada Chan <adachan@apple.com>
+
+ Reviewed by Steve Falkenburg.
+
+ <rdar://problem/8185379> Possible null dereference in WebView::canShowMIMEType.
+ https://bugs.webkit.org/show_bug.cgi?id=44564
+
+ * WebView.cpp:
+ (WebView::canShowMIMEType): Null check m_page->pluginData() since that can return NULL
+ if plugins are disabled.
+
+2010-08-22 Daniel Bates <dbates@rim.com>
+
+ Reviewed by Eric Seidel.
+
+ Encapsulate document marker management into DocumentMarkerController
+ https://bugs.webkit.org/show_bug.cgi?id=44383
+
+ Modify call sites in the Apple Windows port to use DocumentMarkerController.
+
+ No functionality was changed, so no new tests.
+
+ * WebFrame.cpp:
+ (WebFrame::unmarkAllMisspellings):
+ (WebFrame::unmarkAllBadGrammar):
+ * WebView.cpp:
+ (WebView::rectsForTextMatches):
+
+2010-08-18 Jessie Berlin <jberlin@apple.com>
+
+ Reviewed by Adam Roben.
+
+ Bug 44180 - WebView::paint fails to paint a child WebView of a Layered Window.
+ https://bugs.webkit.org/show_bug.cgi?id=44180
+
+ Decide to end painting if the m_backingStoreBitmap is null after the call to
+ ensureBackingStore() instead of when the rcPaint rect filled by BeginPaint is empty.
+ The rcPaint rect filled by BeginPaint is always empty for a child WebView of a Layered
+ Window, even if GetUpdateRect and GetUpdateRgn report a non-empty region that needs
+ painting.
+
+ * WebView.cpp:
+ (WebView::paint):
+
2010-08-17 Jesus Sanchez-Palencia <jesus.palencia@openbossa.org>
Reviewed by Darin Adler.
diff --git a/WebKit/win/WebFrame.cpp b/WebKit/win/WebFrame.cpp
index 500a643..d0cd1e8 100644
--- a/WebKit/win/WebFrame.cpp
+++ b/WebKit/win/WebFrame.cpp
@@ -2564,7 +2564,7 @@ void WebFrame::unmarkAllMisspellings()
if (!doc)
return;
- doc->removeMarkers(DocumentMarker::Spelling);
+ doc->markers()->removeMarkers(DocumentMarker::Spelling);
}
}
@@ -2576,7 +2576,7 @@ void WebFrame::unmarkAllBadGrammar()
if (!doc)
return;
- doc->removeMarkers(DocumentMarker::Grammar);
+ doc->markers()->removeMarkers(DocumentMarker::Grammar);
}
}
diff --git a/WebKit/win/WebView.cpp b/WebKit/win/WebView.cpp
index 6d610a1..c682e91 100644
--- a/WebKit/win/WebView.cpp
+++ b/WebKit/win/WebView.cpp
@@ -977,7 +977,8 @@ void WebView::paint(HDC dc, LPARAM options)
windowsToPaint = PaintWebViewAndChildren;
}
- if (::IsRectEmpty(&rcPaint)) {
+ bool backingStoreCompletelyDirty = ensureBackingStore();
+ if (!m_backingStoreBitmap) {
if (!dc)
EndPaint(m_viewWindow, &ps);
return;
@@ -986,7 +987,6 @@ void WebView::paint(HDC dc, LPARAM options)
m_paintCount++;
HDC bitmapDC = ::CreateCompatibleDC(hdc);
- bool backingStoreCompletelyDirty = ensureBackingStore();
::SelectObject(bitmapDC, m_backingStoreBitmap->handle());
// Update our backing store if needed.
@@ -2432,7 +2432,7 @@ HRESULT STDMETHODCALLTYPE WebView::canShowMIMEType(
*canShow = MIMETypeRegistry::isSupportedImageMIMEType(mimeTypeStr) ||
MIMETypeRegistry::isSupportedNonImageMIMEType(mimeTypeStr) ||
- (m_page && m_page->pluginData()->supportsMimeType(mimeTypeStr)) ||
+ (m_page && m_page->pluginData() && m_page->pluginData()->supportsMimeType(mimeTypeStr)) ||
shouldUseEmbeddedView(mimeTypeStr);
return S_OK;
@@ -3362,7 +3362,7 @@ HRESULT STDMETHODCALLTYPE WebView::rectsForTextMatches(
do {
if (Document* document = frame->document()) {
IntRect visibleRect = frame->view()->visibleContentRect();
- Vector<IntRect> frameRects = document->renderedRectsForMarkers(DocumentMarker::TextMatch);
+ Vector<IntRect> frameRects = document->markers()->renderedRectsForMarkers(DocumentMarker::TextMatch);
IntPoint frameOffset(-frame->view()->scrollOffset().width(), -frame->view()->scrollOffset().height());
frameOffset = frame->view()->convertToContainingWindow(frameOffset);