summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium
diff options
context:
space:
mode:
authorKristian Monsen <kristianm@google.com>2010-09-30 15:42:16 +0100
committerSteve Block <steveblock@google.com>2010-10-07 10:59:29 +0100
commitbec39347bb3bb5bf1187ccaf471d26247f28b585 (patch)
tree56bdc4c2978fbfd3d79d0d36d5d6c640ecc09cc8 /WebKit/chromium
parent90b7966e7815b262cd19ac25f03aaad9b21fdc06 (diff)
downloadexternal_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.zip
external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.gz
external_webkit-bec39347bb3bb5bf1187ccaf471d26247f28b585.tar.bz2
Merge WebKit at r68651 : Initial merge by git.
Change-Id: I3d6bff59f17eedd6722723354f386fec9be8ad12
Diffstat (limited to 'WebKit/chromium')
-rw-r--r--WebKit/chromium/ChangeLog817
-rw-r--r--WebKit/chromium/DEPS2
-rw-r--r--WebKit/chromium/WebKit.gyp19
-rw-r--r--WebKit/chromium/features.gypi12
-rw-r--r--WebKit/chromium/public/WebAccessibilityCache.h1
-rw-r--r--WebKit/chromium/public/WebBindings.h3
-rw-r--r--WebKit/chromium/public/WebCommonWorkerClient.h9
-rw-r--r--WebKit/chromium/public/WebFileInfo.h14
-rw-r--r--WebKit/chromium/public/WebFileWriterClient.h2
-rw-r--r--WebKit/chromium/public/WebFrame.h11
-rw-r--r--WebKit/chromium/public/WebFrameClient.h7
-rw-r--r--WebKit/chromium/public/WebGLES2Context.h71
-rw-r--r--WebKit/chromium/public/WebGraphicsContext3D.h5
-rw-r--r--WebKit/chromium/public/WebIDBCursor.h15
-rwxr-xr-xWebKit/chromium/public/WebIDBFactory.h13
-rw-r--r--WebKit/chromium/public/WebIDBIndex.h42
-rwxr-xr-xWebKit/chromium/public/WebIDBObjectStore.h42
-rw-r--r--WebKit/chromium/public/WebIDBTransaction.h14
-rw-r--r--WebKit/chromium/public/WebInputElement.h29
-rw-r--r--WebKit/chromium/public/WebInputEvent.h6
-rw-r--r--WebKit/chromium/public/WebKitClient.h7
-rw-r--r--WebKit/chromium/public/WebPerformance.h92
-rw-r--r--WebKit/chromium/public/WebScriptController.h2
-rw-r--r--WebKit/chromium/public/WebSettings.h2
-rw-r--r--WebKit/chromium/public/WebView.h29
-rw-r--r--WebKit/chromium/public/WebViewClient.h6
-rw-r--r--WebKit/chromium/public/gtk/WebScreenInfoFactory.h49
-rw-r--r--WebKit/chromium/src/AssertMatchingEnums.cpp28
-rw-r--r--WebKit/chromium/src/AsyncFileSystemChromium.cpp68
-rw-r--r--WebKit/chromium/src/AsyncFileSystemChromium.h1
-rw-r--r--WebKit/chromium/src/AsyncFileWriterChromium.cpp23
-rw-r--r--WebKit/chromium/src/AsyncFileWriterChromium.h30
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.cpp19
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.h2
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp4
-rw-r--r--WebKit/chromium/src/DeviceOrientationClientProxy.cpp5
-rw-r--r--WebKit/chromium/src/DeviceOrientationClientProxy.h1
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.cpp10
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.h6
-rw-r--r--WebKit/chromium/src/GLES2Context.cpp115
-rw-r--r--WebKit/chromium/src/GLES2ContextInternal.h55
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.h2
-rwxr-xr-xWebKit/chromium/src/IDBFactoryBackendProxy.cpp8
-rwxr-xr-xWebKit/chromium/src/IDBFactoryBackendProxy.h1
-rwxr-xr-xWebKit/chromium/src/IDBObjectStoreProxy.cpp9
-rwxr-xr-xWebKit/chromium/src/IDBObjectStoreProxy.h2
-rw-r--r--WebKit/chromium/src/IDBTransactionBackendProxy.cpp8
-rw-r--r--WebKit/chromium/src/IDBTransactionBackendProxy.h5
-rw-r--r--WebKit/chromium/src/LocalFileSystemChromium.cpp18
-rw-r--r--WebKit/chromium/src/LocalizedStrings.cpp10
-rw-r--r--WebKit/chromium/src/VideoFrameChromiumImpl.cpp26
-rw-r--r--WebKit/chromium/src/VideoFrameChromiumImpl.h1
-rw-r--r--WebKit/chromium/src/WebAccessibilityCache.cpp5
-rw-r--r--WebKit/chromium/src/WebBindings.cpp21
-rw-r--r--WebKit/chromium/src/WebFileSystemCallbacksImpl.h2
-rw-r--r--WebKit/chromium/src/WebFrameImpl.cpp53
-rw-r--r--WebKit/chromium/src/WebFrameImpl.h6
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp240
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h45
-rwxr-xr-x[-rw-r--r--]WebKit/chromium/src/WebIDBFactory.cpp (renamed from WebKit/chromium/src/GLES2ContextInternal.cpp)24
-rwxr-xr-xWebKit/chromium/src/WebIDBFactoryImpl.cpp9
-rwxr-xr-xWebKit/chromium/src/WebIDBFactoryImpl.h1
-rwxr-xr-xWebKit/chromium/src/WebIDBObjectStoreImpl.cpp5
-rwxr-xr-xWebKit/chromium/src/WebIDBObjectStoreImpl.h2
-rw-r--r--WebKit/chromium/src/WebIDBTransactionImpl.cpp10
-rw-r--r--WebKit/chromium/src/WebIDBTransactionImpl.h5
-rw-r--r--WebKit/chromium/src/WebInputElement.cpp5
-rw-r--r--WebKit/chromium/src/WebPerformance.cpp160
-rw-r--r--WebKit/chromium/src/WebScriptController.cpp2
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.cpp10
-rw-r--r--WebKit/chromium/src/WebSettingsImpl.h2
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp137
-rw-r--r--WebKit/chromium/src/WebViewImpl.h13
-rw-r--r--WebKit/chromium/src/WebWorkerBase.cpp16
-rw-r--r--WebKit/chromium/src/WebWorkerBase.h5
-rw-r--r--WebKit/chromium/src/WebWorkerClientImpl.h6
-rw-r--r--WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp190
-rw-r--r--WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h122
-rw-r--r--WebKit/chromium/src/gtk/WebInputEventFactory.cpp4
-rw-r--r--WebKit/chromium/src/gtk/WebScreenInfoFactory.cpp62
-rw-r--r--WebKit/chromium/src/js/DevTools.js2
-rw-r--r--WebKit/chromium/src/win/WebInputEventFactory.cpp14
82 files changed, 2232 insertions, 724 deletions
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index dd23f6f..a28517a 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,820 @@
+2010-09-28 Vangelis Kokkevis <vangelis@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ [chromium] Keep the accelerated compositor around even after a page is
+ done using it to avoid startup costs in pages that frequently switch
+ the compositor on and off.
+ https://bugs.webkit.org/show_bug.cgi?id=45845
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+
+2010-09-28 Nat Duca <nduca@chromium.org>
+
+ Reviewed by James Robinson.
+
+ [chromium] invalidateRootLayerRect needs to schedule compositor
+ https://bugs.webkit.org/show_bug.cgi?id=46219
+
+ Make sure setRootLayerNedsDisplay is called by root invalidation.
+ To avoid confusion about root-layer versus non-root-layer
+ behavior, move the root layer damage state to the WebView.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setRootLayerNeedsDisplay):
+ (WebKit::WebViewImpl::scrollRootLayerRect):
+ (WebKit::WebViewImpl::invalidateRootLayerRect):
+ (WebKit::WebViewImpl::doComposite):
+ * src/WebViewImpl.h:
+
+2010-09-28 Jenn Braithwaite <jennb@chromium.org>
+
+ Reviewed by Dmitry Titov.
+
+ Added oldPage param to FrameLoaderClient::didTransferChildFrameToNewDocument.
+ https://bugs.webkit.org/show_bug.cgi?id=46663
+
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::didTransferChildFrameToNewDocument):
+ * src/FrameLoaderClientImpl.h:
+
+2010-09-28 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ [Chromium] Linking error due to wrong guard in WebIDBTransaction.h
+ https://bugs.webkit.org/show_bug.cgi?id=46710
+
+ Remove the wrong guard.
+
+ * public/WebIDBTransaction.h:
+ (WebKit::WebIDBTransaction::getIDBTransactionBackendInterface):
+
+2010-09-27 Alpha Lam <hclam@chromium.org>
+
+ Build fix. Not reviewed.
+
+ Use if instead of switch to avoid compilation error.
+
+ * src/VideoFrameChromiumImpl.cpp:
+ (WebKit::VideoFrameChromiumImpl::requiredTextureSize):
+
+2010-09-27 Alpha Lam <hclam@chromium.org>
+
+ Build fix. Not reviewed.
+
+ Remove constant definitions from this file.
+
+ * src/VideoFrameChromiumImpl.cpp:
+
+2010-09-27 Alpha Lam <hclam@chromium.org>
+
+ Build fix. Not reviewed.
+
+ Fix warnings again.
+
+ * src/VideoFrameChromiumImpl.cpp:
+ (WebKit::VideoFrameChromiumImpl::requiredTextureSize):
+
+2010-09-27 Alpha Lam <hclam@chromium.org>
+
+ Build fix. Not reviewed.
+
+ Add a default for unhandled cases for switch statement.
+
+ * src/VideoFrameChromiumImpl.cpp:
+ (WebKit::VideoFrameChromiumImpl::requiredTextureSize):
+
+2010-09-27 Victoria Kirst <vrk@google.com>
+
+ Reviewed by James Robinson.
+
+ Fixing constants in VideoFrameChromiumImpl so that it overloads the
+ VideoFrameChromium const declarations. Also adding logic such that a
+ VideoFrameChromium understands what size its texture should be based
+ on frame format.
+ https://bugs.webkit.org/show_bug.cgi?id=45069
+
+ * src/VideoFrameChromiumImpl.cpp:
+
+2010-09-27 Vangelis Kokkevis <vangelis@chromium.org>
+
+ Reviewed by James Robinson.
+
+ [chromium] WebViewImpl now holds a ref counted pointer to the LayerRendererChromium
+ to ensure that the compositor does not get destroyed before the layers used
+ by it do. This was done to ensure that layers properly clean up their texture
+ resources on destruction.
+ https://bugs.webkit.org/show_bug.cgi?id=46139
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::setIsAcceleratedCompositingActive):
+ * src/WebViewImpl.h:
+
+2010-09-24 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ Hook up ANGLE with chromium --in-process-webgl port
+ https://bugs.webkit.org/show_bug.cgi?id=44309
+
+ * WebKit.gyp: Add angle dependency.
+ * src/WebGraphicsContext3DDefaultImpl.cpp: Using angle for shader validation and translation.
+ (WebKit::WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl):
+ (WebKit::WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl):
+ (WebKit::WebGraphicsContext3DDefaultImpl::initialize):
+ (WebKit::WebGraphicsContext3DDefaultImpl::compileShader):
+ (WebKit::WebGraphicsContext3DDefaultImpl::getIntegerv): Using defined const instead.
+ (WebKit::WebGraphicsContext3DDefaultImpl::getShaderiv):
+ (WebKit::WebGraphicsContext3DDefaultImpl::getShaderInfoLog):
+ (WebKit::WebGraphicsContext3DDefaultImpl::getShaderSource):
+ (WebKit::WebGraphicsContext3DDefaultImpl::shaderSource):
+ (WebKit::WebGraphicsContext3DDefaultImpl::createShader):
+ (WebKit::WebGraphicsContext3DDefaultImpl::deleteShader):
+ (WebKit::WebGraphicsContext3DDefaultImpl::angleCreateCompilers):
+ (WebKit::WebGraphicsContext3DDefaultImpl::angleDestroyCompilers):
+ (WebKit::WebGraphicsContext3DDefaultImpl::angleValidateShaderSource):
+ * src/WebGraphicsContext3DDefaultImpl.h: Add necessary data and functions for angle stuff.
+ (WebKit::WebGraphicsContext3DDefaultImpl::ShaderSourceEntry::ShaderSourceEntry):
+ (WebKit::WebGraphicsContext3DDefaultImpl::ShaderSourceEntry::~ShaderSourceEntry):
+
+2010-09-27 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [Cleanup] Add create method to FileSystemCallbacks to get rid of naked new's
+ https://bugs.webkit.org/show_bug.cgi?id=46561
+
+ Also cleanup the callbacks layering to pass AsyncFileSystemCallbacks
+ object to LocalFileSystem::requestFileSystem (rather than
+ FileSystemCallback and ErrorCallback) so that all the callbacks class
+ we pass from WebCore to WebKit/chromium/src will be
+ AsyncFileSystemCallbacks.
+
+ * src/LocalFileSystemChromium.cpp:
+ (WebCore::LocalFileSystem::requestFileSystem): Changed to take
+ AsyncFileSystemCallbacks as (a) callback argument(s).
+
+2010-09-24 Tony Chang <tony@chromium.org>
+
+ Reviewed by Kent Tamura.
+
+ [chromium] remove unused gtk WebScreenInfoFactory
+ https://bugs.webkit.org/show_bug.cgi?id=46526
+
+ AFAICT these files aren't referenced in code or by gyp.
+
+ * WebKit.gyp: Remove duplicate filename.
+ * public/gtk/WebScreenInfoFactory.h: Removed.
+ * src/gtk/WebScreenInfoFactory.cpp: Removed.
+
+2010-09-26 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ [Chromium] Remove no longer used WebView member functions
+ https://bugs.webkit.org/show_bug.cgi?id=46515
+
+ With http://crrev.com/60526 there's no longer any Chromium code calling
+ the non-static versions of addUserScript and addUserStyleSheet.
+
+ * public/WebView.h:
+
+2010-09-25 Nicolas Weber <thakis@chromium.org>
+
+ Reviewed by James Robinson.
+
+ [chromium] Fix clang warning/error.
+ https://bugs.webkit.org/show_bug.cgi?id=46552
+
+ * src/WorkerFileSystemCallbacksBridge.h:
+
+2010-09-24 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Unnecessary blob dependency in WebKit.gyp
+ https://bugs.webkit.org/show_bug.cgi?id=46488
+
+ r66322 shouldn't have added a blob dependency by hand to targets in
+ WebKit.gyp, instead blob should be a dependency of webkit_support.
+ http://crrev.com/59406 did that, so we can now remove these deps.
+
+ * WebKit.gyp:
+
+2010-09-24 Ryosuke Niwa <rniwa@webkit.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] Implement TextInputController::firstRectForCharacterRange
+ https://bugs.webkit.org/show_bug.cgi?id=38100
+
+ Implemented TextInputController::firstRectForCharacterRange for chromium platform.
+ Because the function needs to return an array of integers, added makeIntArray to WebBindings.
+ makeIntArray does not take Vector because WebBindings.h is included in plugin glue code
+ where it cannot find wtf/Vector.h.
+
+ No new tests are added since we need to implement the same feature in chromium side
+ in order to enable any tests that uses this function.
+
+ * public/WebBindings.h:
+ * public/WebFrame.h:
+ * src/WebBindings.cpp:
+ (WebKit::makeIntArrayImpl): Added.
+ (WebKit::WebBindings::makeIntArray): Added.
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::firstRectForCharacterRange): Added.
+ * src/WebFrameImpl.h:
+
+2010-09-24 Tony Chang <tony@chromium.org>
+
+ Unreviewed, fix chromium compile after r68276 which renamed
+ Render*::minPrefWidth to minPreferredLogicalWidth.
+
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::contentsPreferredWidth):
+
+2010-09-24 Eric Uhrhane <ericu@chromium.org>
+
+ Reviewed by David Levin.
+
+ Remove unnecessary parameter from AsyncFileWriterClient::didTruncate
+ https://bugs.webkit.org/show_bug.cgi?id=46390
+
+ * public/WebFileWriterClient.h:
+ * src/AsyncFileWriterChromium.cpp:
+ * src/AsyncFileWriterChromium.h:
+
+2010-09-24 Chris Guillory <chris.guillory@google.com>
+
+ Reviewed by Chris Fleizach.
+
+ Send webkit accessibility notifications to Chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=45156
+
+ * public/WebAccessibilityCache.h:
+ * public/WebViewClient.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::focusedNodeChanged):
+ (WebKit::ChromeClientImpl::getPopupMenuInfo):
+ * src/ChromeClientImpl.h:
+ * src/WebAccessibilityCache.cpp:
+ (WebKit::WebAccessibilityCache::accessibilityEnabled):
+
+2010-09-23 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [Chromium] Fix some IndexedDB tests for DRT
+ https://bugs.webkit.org/show_bug.cgi?id=46444
+
+ * DEPS: Roll Chromium revision to 60394, which added
+ WebKitClient::createIDBKeysFromSerializedValuesAndKeyPath() implementation.
+
+2010-09-23 Kinuko Yasuda <kinuko@chromium.org>
+
+ Unreviewed, another attempt to fix build. The code didn't have proper if-defs.
+
+ * src/WebWorkerBase.cpp:
+ (WebKit::WebWorkerBase::openFileSystem):
+ * src/WebWorkerBase.h:
+ * src/WorkerFileSystemCallbacksBridge.h:
+
+2010-09-23 Kinuko Yasuda <kinuko@chromium.org>
+
+ Unreviewed; build fix attempt.
+
+ * src/WebWorkerBase.cpp:
+ (WebKit::WebWorkerBase::openFileSystem):
+ * src/WorkerFileSystemCallbacksBridge.h:
+
+2010-09-23 Kinuko Yasuda <kinuko@chromium.org>
+
+ Reviewed by David Levin.
+
+ Add Worker support for FileSystem API
+ https://bugs.webkit.org/show_bug.cgi?id=45808
+
+ Added WebWorkerBase::openFileSystem and WebCommonWorkerClient::
+ openFileSystem to call in to the browser via Worker stub/proxy
+ in the chromium.
+
+ Also added WorkerFileSystemCallbacksBridge class that proxies
+ requests and callbacks between from/to worker thread to/from the
+ main thread.
+
+ * public/WebCommonWorkerClient.h:
+ (WebKit::WebCommonWorkerClient::openFileSystem): Added.
+ * src/LocalFileSystemChromium.cpp:
+ (WebCore::LocalFileSystem::localFileSystem): Added.
+ (WebCore::LocalFileSystem::requestFileSystem): Added implementation
+ for workers. In worker case this calls WebWorkerBase::openFileSystem.
+ * src/WebWorkerBase.cpp:
+ (WebKit::WebWorkerBase::openFileSystem): Added. This is called from
+ LocalFileSystem::requestFileSystem on the worker thread and creates
+ a bridge to call WebCommonWorkerClient::openFileSystem on the main
+ thread.
+ * src/WebWorkerBase.h:
+ * src/WebWorkerClientImpl.h:
+ (WebKit::WebWorkerClientImpl::openFileSystem): Added.
+ * src/WorkerFileSystemCallbacksBridge.cpp: Added.
+ * src/WorkerFileSystemCallbacksBridge.h: Added.
+
+2010-09-23 Tony Chang <tony@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [chromium] implement layoutTestController.sampleSVGAnimationForElementAtTime
+ https://bugs.webkit.org/show_bug.cgi?id=46426
+
+ * public/WebFrame.h:
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::pauseSVGAnimation):
+ * src/WebFrameImpl.h:
+
+2010-09-23 Tony Chang <tony@chromium.org>
+
+ Reviewed by David Levin.
+
+ [chromium] add caretBrowsingEnabled to WebSettings and DRT
+ https://bugs.webkit.org/show_bug.cgi?id=46388
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setCaretBrowsingEnabled):
+ * src/WebSettingsImpl.h:
+
+2010-09-23 Eric Uhrhane <ericu@chromium.org>
+
+ Reviewed by David Levin.
+
+ Rename FileWriterClient to AsyncFileWriterClient.
+ https://bugs.webkit.org/show_bug.cgi?id=46325
+
+ * src/AsyncFileSystemChromium.cpp:
+ * src/AsyncFileSystemChromium.h:
+ * src/AsyncFileWriterChromium.cpp:
+ * src/AsyncFileWriterChromium.h:
+
+2010-09-23 Nate Chapin <japhet@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add hyperlink auditing settings (i.e., <a ping>).
+ https://bugs.webkit.org/show_bug.cgi?id=30458
+
+ * public/WebSettings.h:
+ * src/WebSettingsImpl.cpp:
+ (WebKit::WebSettingsImpl::setHyperlinkAuditingEnabled):
+ * src/WebSettingsImpl.h:
+
+2010-09-23 Andrey Kosyakov <caseq@chromium.org>
+
+ Unreviewed build fix ("WTF/" -> "wtf/" in include, broke Arm build)
+
+ * src/AsyncFileWriterChromium.h:
+
+2010-09-08 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [chromium] Add chromium port API for accessing Web Timing information
+ https://bugs.webkit.org/show_bug.cgi?id=45428
+
+ * WebKit.gyp:
+ * public/WebFrame.h:
+ * public/WebPerformance.h: Added.
+ (WebKit::WebPerformance::WebPerformance):
+ * src/WebFrameImpl.cpp:
+ (WebKit::WebFrameImpl::performance):
+ * src/WebFrameImpl.h:
+ * src/WebPerformance.cpp: Added.
+ (WebKit::WebPerformance::WebPerformance):
+ (WebKit::WebPerformance::~WebPerformance):
+ (WebKit::WebPerformance::operator=):
+ (WebKit::WebPerformance::navigationType):
+ (WebKit::WebPerformance::navigationStart):
+ (WebKit::WebPerformance::unloadEventEnd):
+ (WebKit::WebPerformance::redirectStart):
+ (WebKit::WebPerformance::redirectEnd):
+ (WebKit::WebPerformance::redirectCount):
+ (WebKit::WebPerformance::fetchStart):
+ (WebKit::WebPerformance::domainLookupStart):
+ (WebKit::WebPerformance::domainLookupEnd):
+ (WebKit::WebPerformance::connectStart):
+ (WebKit::WebPerformance::connectEnd):
+ (WebKit::WebPerformance::requestStart):
+ (WebKit::WebPerformance::requestEnd):
+ (WebKit::WebPerformance::responseStart):
+ (WebKit::WebPerformance::responseEnd):
+ (WebKit::WebPerformance::loadEventStart):
+ (WebKit::WebPerformance::loadEventEnd):
+ (WebKit::WebPerformance::operator PassRefPtr<Performance>):
+
+2010-09-23 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ IDBObjectStore::get should run in a transaction.
+ https://bugs.webkit.org/show_bug.cgi?id=44700
+
+ * public/WebIDBFactory.h:
+ * public/WebIDBObjectStore.h:
+ * public/WebIDBTransaction.h:
+ (WebKit::WebIDBTransaction::didCompleteTaskEvents):
+ (WebKit::WebIDBTransaction::getIDBTransactionBackendInterface):
+ * src/IDBDatabaseProxy.h:
+ * src/IDBFactoryBackendProxy.cpp:
+ * src/IDBFactoryBackendProxy.h:
+ * src/IDBObjectStoreProxy.cpp:
+ (WebCore::IDBObjectStoreProxy::get):
+ * src/IDBObjectStoreProxy.h:
+ * src/IDBTransactionBackendProxy.cpp:
+ (WebCore::IDBTransactionBackendProxy::scheduleTask):
+ (WebCore::IDBTransactionBackendProxy::didCompleteTaskEvents):
+ * src/IDBTransactionBackendProxy.h:
+ (WebCore::IDBTransactionBackendProxy::getWebIDBTransaction):
+ * src/WebIDBFactoryImpl.cpp:
+ * src/WebIDBFactoryImpl.h:
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::get):
+ * src/WebIDBObjectStoreImpl.h:
+ * src/WebIDBTransactionImpl.cpp:
+ (WebKit::WebIDBTransactionImpl::didCompleteTaskEvents):
+ (WebKit::WebIDBTransactionImpl::getIDBTransactionBackendInterface):
+ * src/WebIDBTransactionImpl.h:
+
+2010-09-23 Jeremy Orlow <jorlow@chromium.org>
+
+ Unreviewed small fix for my last patch.
+
+ * public/WebIDBTransaction.h:
+ (WebKit::WebIDBTransaction::id):
+
+2010-09-22 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] User style layout tests don't pass on Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=46069
+
+ Expose UserStyleInjectionTime in WebView.
+
+ * public/WebView.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebView::addUserStyleSheet):
+
+2010-09-22 James Robinson <jamesr@chromium.org>
+
+ [chromium] Re-synchronizes features.gypi with upstream feature_overrides.gypi.
+
+ * features.gypi:
+
+2010-09-22 Ruben <chromium@hybridsource.org>
+
+ Reviewed by Tony Chang.
+
+ [chromium] added ifdefs for FreeBSD support
+ https://bugs.webkit.org/show_bug.cgi?id=46316
+
+ * WebKit.gyp:
+ * features.gypi:
+ * src/ChromiumBridge.cpp:
+ * src/WebFrameImpl.cpp:
+ (WebKit::ChromePrintContext::spoolPage):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::mouseDown):
+ (WebKit::WebViewImpl::mouseUp):
+ (WebKit::WebViewImpl::keyEvent):
+ (WebKit::WebViewImpl::setScrollbarColors):
+ (WebKit::WebViewImpl::setSelectionColors):
+
+2010-09-22 Eric Uhrhane <ericu@chromium.org>
+
+ Reviewed by Dumitru Daniliuc.
+
+ Add Chromium implementation for FileWriter
+ https://bugs.webkit.org/show_bug.cgi?id=44361
+
+ No new tests; the implementation's not yet far enough along for that.
+
+ This makes a chain of construction-and-linking-up for various sorts of
+ FileWriter interfaces to call through to Chromium, and for various
+ sorts of FileWriterClients to call back, with object ownership always
+ pointing towards the Chromium API. That is, the DOM object owns an
+ AsyncFileWriter, which owns its implementation object, and the reverse
+ (client) direction is raw pointers.
+
+ File metadata is looked up before the FileWriter is returned, so that
+ we know the file exists and can cache its length.
+
+ The WebKit/chromium interface here is modeled after that of the
+ FileSystem.
+
+ * public/WebFileInfo.h:
+ (WebKit::WebFileInfo::WebFileInfo):
+ * src/AsyncFileSystemChromium.cpp:
+ (WebCore::FileWriterHelperCallbacks::FileWriterHelperCallbacks):
+ (WebCore::FileWriterHelperCallbacks::didSucceed):
+ (WebCore::FileWriterHelperCallbacks::didReadMetadata):
+ (WebCore::FileWriterHelperCallbacks::didReadDirectory):
+ (WebCore::FileWriterHelperCallbacks::didOpenFileSystem):
+ (WebCore::FileWriterHelperCallbacks::didCreateFileWriter):
+ (WebCore::FileWriterHelperCallbacks::didFail):
+ (WebCore::AsyncFileSystemChromium::createWriter):
+ * src/AsyncFileSystemChromium.h:
+ * src/AsyncFileWriterChromium.cpp:
+ (WebCore::AsyncFileWriterChromium::setWebFileWriter):
+ (WebCore::AsyncFileWriterChromium::write):
+ (WebCore::AsyncFileWriterChromium::didFail):
+ * src/AsyncFileWriterChromium.h:
+ * src/WebFileSystemCallbacksImpl.h:
+
+2010-09-22 Kenneth Russell <kbr@google.com>
+
+ Unreviewed, Chromium build fix. Fix build when accelerated
+ compositing is not enabled at compile time.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::resize):
+
+2010-09-22 Matt Perry <mpcomplete@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Trying to reland a version of r67749:
+ Have V8DOMWindowShell ask the embedder whether to run a V8 extension
+ in a particular script context.
+ https://bugs.webkit.org/show_bug.cgi?id=45721
+
+ * public/WebFrameClient.h:
+ (WebKit::WebFrameClient::allowScriptExtension):
+ * public/WebScriptController.h:
+ * src/FrameLoaderClientImpl.cpp:
+ (WebKit::FrameLoaderClientImpl::allowScriptExtension):
+ * src/FrameLoaderClientImpl.h:
+ * src/WebScriptController.cpp:
+ (WebKit::WebScriptController::registerExtension):
+
+2010-09-22 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Chromium] Change WebKit API for IDBTransaciton to new style
+ https://bugs.webkit.org/show_bug.cgi?id=46263
+
+ * public/WebIDBIndex.h:
+ (WebKit::WebIDBIndex::openObjectCursor):
+ (WebKit::WebIDBIndex::openCursor):
+ (WebKit::WebIDBIndex::getObject):
+ (WebKit::WebIDBIndex::get):
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::get):
+ (WebKit::WebIDBObjectStore::put):
+ (WebKit::WebIDBObjectStore::remove):
+ (WebKit::WebIDBObjectStore::openCursor):
+ * src/WebIDBIndexImpl.cpp:
+ (WebKit::WebIDBIndexImpl::openCursor):
+ (WebKit::WebIDBIndexImpl::openObjectCursor):
+ (WebKit::WebIDBIndexImpl::getObject):
+ (WebKit::WebIDBIndexImpl::get):
+ * src/WebIDBIndexImpl.h:
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::get):
+ (WebKit::WebIDBObjectStoreImpl::put):
+ (WebKit::WebIDBObjectStoreImpl::remove):
+ (WebKit::WebIDBObjectStoreImpl::openCursor):
+ * src/WebIDBObjectStoreImpl.h:
+
+2010-09-22 Pavel Podivilov <podivilov@chromium.org>
+
+ Reviewed by Pavel Feldman.
+
+ Web Inspector: implement pausing on XHR
+ https://bugs.webkit.org/show_bug.cgi?id=46086
+
+ * src/js/DevTools.js:
+ ():
+
+2010-09-21 Brett Wilson <brettw@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ Add caps log and num lock toggle state to WebInputEvent.
+ https://bugs.webkit.org/show_bug.cgi?id=46229
+
+ * public/WebInputEvent.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::handleInputEvent):
+ * src/WebViewImpl.h:
+ * src/gtk/WebInputEventFactory.cpp:
+ (WebKit::gdkStateToWebEventModifiers):
+ * src/win/WebInputEventFactory.cpp:
+ (WebKit::SetToggleKeyState):
+ (WebKit::WebInputEventFactory::keyboardEvent):
+ (WebKit::WebInputEventFactory::mouseEvent):
+ (WebKit::WebInputEventFactory::mouseWheelEvent):
+
+2010-09-21 James Robinson <jamesr@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ [chromium] Check if the acceleratedCompositingEnabled setting is active in WebViewImpl::graphicsContext3D()
+ https://bugs.webkit.org/show_bug.cgi?id=46239
+
+ This adds a check for whether acceleratedCompositingEnabled is true on the Page's Settings
+ object before creating and vending a GraphicsContext3D object. This is needed because when
+ an offscreen WebGraphicsContext3DCommandBufferImpl is initialized it first asks the WebViewImpl
+ for the compositor context. WebGraphicsContext3DCommandBufferImpl::initialize checks if the
+ disable accelerated compositing command line switch is set, but this is insufficient as sometimes
+ the Setting object does not agree exactly with the command line switches. For example,
+ we explicitly toggle accelerated compositing for some chrome UI URLs regardless of what the
+ flag says.
+
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::graphicsContext3D):
+
+2010-09-21 Kent Tamura <tkent@chromium.org>
+
+ Reviewed by David Levin.
+
+ [Chromium] Remove WebInputElement::InputType and inputType()
+ https://bugs.webkit.org/show_bug.cgi?id=46238
+
+ * DEPS: Roll Chromium revision to 60132, which removed all usage of inputType().
+ * public/WebInputElement.h: Remove InputType and inputType().
+ * src/AssertMatchingEnums.cpp: Remove WebInputElement::InputType -
+ HTMLInputElement::InputType matching tests.
+ * src/WebInputElement.cpp: Remove inputType().
+
+2010-09-21 Andrew Wilson <atwilson@chromium.org>
+
+ Unreviewed, rolling out r67982.
+ http://trac.webkit.org/changeset/67982
+ https://bugs.webkit.org/show_bug.cgi?id=45156
+
+ Causes crashes on chromium testshell
+
+ * public/WebAccessibilityCache.h:
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::didChangeAccessibilityObjectState):
+ (WebKit::WebViewClient::didChangeAccessibilityObjectChildren):
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::focusedNodeChanged):
+ (WebKit::ChromeClientImpl::didChangeAccessibilityObjectState):
+ (WebKit::ChromeClientImpl::didChangeAccessibilityObjectChildren):
+ * src/ChromeClientImpl.h:
+ * src/WebAccessibilityCache.cpp:
+
+2010-09-21 Kenneth Russell <kbr@google.com>
+
+ Reviewed by James Robinson.
+
+ [chromium] Remove GLES2Context and WebGLES2Context
+ https://bugs.webkit.org/show_bug.cgi?id=46131
+
+ Removed now-obsolete GLES2Context and WebGLES2Context classes, and
+ dependency on command buffer client code from WebCore. Built and
+ tested 3D CSS and WebGL content on Mac OS X to test.
+
+ * WebKit.gyp:
+ * public/WebGLES2Context.h: Removed.
+ * public/WebGraphicsContext3D.h:
+ * public/WebKitClient.h:
+ * public/WebView.h:
+ * src/ChromeClientImpl.cpp:
+ * src/GLES2Context.cpp: Removed.
+ * src/GLES2ContextInternal.cpp: Removed.
+ * src/GLES2ContextInternal.h: Removed.
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ * src/WebGraphicsContext3DDefaultImpl.h:
+ * src/WebViewImpl.cpp:
+ * src/WebViewImpl.h:
+
+2010-09-21 Kenneth Russell <kbr@google.com>
+
+ Reviewed by James Robinson.
+
+ [chromium] Roll forward Chromium DEPS to pick up removal of WebGLES2Context dependencies
+ https://bugs.webkit.org/show_bug.cgi?id=46231
+
+ Ran build-webkit --chromium --debug on Mac OS X to test the roll-forward.
+
+ * DEPS:
+
+2010-09-21 Jeremy Orlow <jorlow@chromium.org>
+
+ Reviewed by Nate Chapin.
+
+ [Chromium] Plumb the IDBTransansaction's id
+ https://bugs.webkit.org/show_bug.cgi?id=46197
+
+ Next step, add the plumbing to Chromium. Then we add code to WebKit
+ that uses it (and take out the default IDBTransaction param).
+
+ * public/WebIDBCursor.h:
+ (WebKit::WebIDBCursor::key):
+ (WebKit::WebIDBCursor::value):
+ * public/WebIDBFactory.h:
+ (WebKit::WebIDBFactory::open):
+ * public/WebIDBIndex.h:
+ (WebKit::WebIDBIndex::openObjectCursor):
+ (WebKit::WebIDBIndex::openCursor):
+ (WebKit::WebIDBIndex::getObject):
+ (WebKit::WebIDBIndex::get):
+ * public/WebIDBObjectStore.h:
+ (WebKit::WebIDBObjectStore::get):
+ (WebKit::WebIDBObjectStore::put):
+ (WebKit::WebIDBObjectStore::remove):
+ (WebKit::WebIDBObjectStore::createIndex):
+ (WebKit::WebIDBObjectStore::removeIndex):
+ (WebKit::WebIDBObjectStore::openCursor):
+ * src/WebIDBIndexImpl.cpp:
+ (WebKit::WebIDBIndexImpl::openCursor):
+ (WebKit::WebIDBIndexImpl::openObjectCursor):
+ (WebKit::WebIDBIndexImpl::getObject):
+ (WebKit::WebIDBIndexImpl::get):
+ * src/WebIDBIndexImpl.h:
+ * src/WebIDBObjectStoreImpl.cpp:
+ (WebKit::WebIDBObjectStoreImpl::get):
+ (WebKit::WebIDBObjectStoreImpl::put):
+ (WebKit::WebIDBObjectStoreImpl::remove):
+ (WebKit::WebIDBObjectStoreImpl::openCursor):
+ * src/WebIDBObjectStoreImpl.h:
+
+2010-09-21 Chris Guillory <chris.guillory@google.com>
+
+ Reviewed by Chris Fleizach.
+
+ Send webkit accessibility notifications to Chromium.
+ https://bugs.webkit.org/show_bug.cgi?id=45156
+
+ * public/WebAccessibilityCache.h:
+ * public/WebViewClient.h:
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::focusedNodeChanged):
+ (WebKit::ChromeClientImpl::getPopupMenuInfo):
+ * src/ChromeClientImpl.h:
+ * src/WebAccessibilityCache.cpp:
+ (WebKit::WebAccessibilityCache::accessibilityEnabled):
+
+2010-09-21 Steve Block <steveblock@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ DeviceOrientationClient and DeviceMotionClient should have controllerDestroyed() methods
+ https://bugs.webkit.org/show_bug.cgi?id=45891
+
+ Implements DeviceOrientationClientProxy::deviceOrientationControllerDestroyed() as a no-op,
+ as the client's lifetime is determined by the WebViewImpl.
+
+ * src/DeviceOrientationClientProxy.cpp:
+ (WebKit::DeviceOrientationClientProxy::deviceOrientationControllerDestroyed):
+ * src/DeviceOrientationClientProxy.h:
+
+2010-09-21 Jochen Eisinger <jochen@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ [chromium] expose the filename used for a given indexed DB
+ https://bugs.webkit.org/show_bug.cgi?id=46090
+
+ * WebKit.gyp:
+ * public/WebIDBFactory.h:
+ * src/WebIDBFactory.cpp:
+ (WebKit::WebIDBFactory::databaseFileName):
+
+2010-09-20 Philippe Normand <pnormand@igalia.com>
+
+ Reviewed by Eric Carlson.
+
+ [GTK] enhanced context menu for media elements
+ https://bugs.webkit.org/show_bug.cgi?id=45021
+
+ New localized strings for the media element context-menu.
+
+ * src/LocalizedStrings.cpp:
+ (WebCore::contextMenuItemTagOpenVideoInNewWindow):
+ (WebCore::contextMenuItemTagOpenAudioInNewWindow):
+ (WebCore::contextMenuItemTagCopyVideoLinkToClipboard):
+ (WebCore::contextMenuItemTagCopyAudioLinkToClipboard):
+ (WebCore::contextMenuItemTagToggleMediaControls):
+ (WebCore::contextMenuItemTagToggleMediaLoop):
+ (WebCore::contextMenuItemTagEnterVideoFullscreen):
+ (WebCore::contextMenuItemTagMediaPlay):
+ (WebCore::contextMenuItemTagMediaPause):
+ (WebCore::contextMenuItemTagMediaMute):
+
+2010-09-20 Nico Weber <thakis@chromium.org>
+
+ Reviewed by James Robinson.
+
+ [chromium] Trivial clang warning fix
+ https://bugs.webkit.org/show_bug.cgi?id=46143
+
+ * src/WebFileSystemCallbacksImpl.h:
+
2010-09-20 Darin Adler <darin@apple.com>
Reviewed by James Robinson.
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index 17cf7b5..722dd94 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': '59961',
+ 'chromium_rev': '60394',
}
deps = {
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 3523f21..5b953e3 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -76,6 +76,7 @@
'<(chromium_src_dir)/app/app.gyp:app_base', # For GLContext
'<(chromium_src_dir)/skia/skia.gyp:skia',
'<(chromium_src_dir)/third_party/npapi/npapi.gyp:npapi',
+ '<(chromium_src_dir)/third_party/angle/src/build_angle.gyp:translator_glsl',
],
'export_dependent_settings': [
'<(chromium_src_dir)/skia/skia.gyp:skia',
@@ -84,6 +85,7 @@
'include_dirs': [
'public',
'src',
+ '<(chromium_src_dir)/third_party/angle/include',
],
'defines': [
'WEBKIT_IMPLEMENTATION=1',
@@ -170,7 +172,6 @@
'public/WebGeolocationServiceBridge.h',
'public/WebGeolocationServiceMock.h',
'public/WebGlyphCache.h',
- 'public/WebGLES2Context.h',
'public/WebGraphicsContext3D.h',
'public/WebHistoryItem.h',
'public/WebHTTPBody.h',
@@ -216,6 +217,7 @@
'public/WebPageSerializerClient.h',
'public/WebPasswordAutocompleteListener.h',
'public/WebPasswordFormData.h',
+ 'public/WebPerformance.h',
'public/WebPlugin.h',
'public/WebPluginContainer.h',
'public/WebPluginDocument.h',
@@ -277,7 +279,6 @@
'public/win/WebInputEventFactory.h',
'public/win/WebSandboxSupport.h',
'public/win/WebScreenInfoFactory.h',
- 'public/win/WebScreenInfoFactory.h',
'src/ApplicationCacheHost.cpp',
'src/ApplicationCacheHostInternal.h',
'src/AssertMatchingEnums.cpp',
@@ -323,9 +324,6 @@
'src/FrameLoaderClientImpl.cpp',
'src/FrameLoaderClientImpl.h',
'src/FrameNetworkingContextImpl.h',
- 'src/GLES2Context.cpp',
- 'src/GLES2ContextInternal.cpp',
- 'src/GLES2ContextInternal.h',
'src/GraphicsContext3D.cpp',
'src/GraphicsContext3DInternal.h',
'src/gtk/WebFontInfo.cpp',
@@ -447,6 +445,7 @@
'src/WebIDBDatabaseError.cpp',
'src/WebIDBDatabaseImpl.cpp',
'src/WebIDBDatabaseImpl.h',
+ 'src/WebIDBFactory.cpp',
'src/WebIDBFactoryImpl.cpp',
'src/WebIDBFactoryImpl.h',
'src/WebIDBIndexImpl.cpp',
@@ -484,6 +483,7 @@
'src/WebPasswordFormData.cpp',
'src/WebPasswordFormUtils.cpp',
'src/WebPasswordFormUtils.h',
+ 'src/WebPerformance.cpp',
'src/WebPluginContainerImpl.h',
'src/WebPluginContainerImpl.cpp',
'src/WebPluginDocument.cpp',
@@ -533,6 +533,8 @@
'src/WebWorkerClientImpl.h',
'src/WebWorkerImpl.cpp',
'src/WebWorkerImpl.h',
+ 'src/WorkerFileSystemCallbacksBridge.cpp',
+ 'src/WorkerFileSystemCallbacksBridge.h',
'src/WrappedResourceRequest.h',
'src/WrappedResourceResponse.h',
'src/win/WebInputEventFactory.cpp',
@@ -550,7 +552,6 @@
'dependencies': [
'../../WebCore/WebCore.gyp/WebCore.gyp:webcore_bindings',
'<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
- '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
'<(chromium_src_dir)/third_party/icu/icu.gyp:*',
'<(chromium_src_dir)/third_party/libjpeg/libjpeg.gyp:libjpeg',
'<(chromium_src_dir)/third_party/libpng/libpng.gyp:libpng',
@@ -730,8 +731,6 @@
'<(chromium_src_dir)/base/base.gyp:base',
'<(chromium_src_dir)/base/base.gyp:base_i18n',
'<(chromium_src_dir)/base/base.gyp:test_support_base',
- '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib',
- '<(chromium_src_dir)/webkit/support/webkit_support.gyp:blob',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
],
'include_dirs': [
@@ -769,7 +768,7 @@
'tests/DragImageTest.cpp',
],
}],
- ['OS=="linux"', {
+ ['OS=="linux" or OS=="freebsd"', {
'sources': [
'tests/WebInputEventFactoryTestGtk.cpp',
],
@@ -787,7 +786,6 @@
'dependencies': [
'webkit',
'../../JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
- '<(chromium_src_dir)/webkit/support/webkit_support.gyp:blob',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
],
'include_dirs': [
@@ -812,7 +810,6 @@
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:blob',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:copy_npapi_layout_test_plugin',
'<(chromium_src_dir)/webkit/support/webkit_support.gyp:webkit_support',
- '<(chromium_src_dir)/gpu/gpu.gyp:gles2_c_lib'
],
'include_dirs': [
'.',
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index df277d6..900bb7a 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -40,6 +40,8 @@
# features_override.gypi inline documentation for more details.
'feature_defines': [
'ENABLE_3D_CANVAS=1',
+ 'ENABLE_3D_RENDERING=1',
+ 'ENABLE_ACCELERATED_2D_CANVAS=1',
'ENABLE_BLOB=1',
'ENABLE_BLOB_SLICE=1',
'ENABLE_CHANNEL_MESSAGING=1',
@@ -84,15 +86,7 @@
'ENABLE_XHR_RESPONSE_BLOB=1',
'ENABLE_XPATH=1',
'ENABLE_XSLT=1',
- ],
-
- 'conditions': [
- ['OS=="win" or OS=="linux" or OS=="mac"', {
- 'feature_defines': [
- 'WTF_USE_ACCELERATED_COMPOSITING=1',
- 'ENABLE_3D_RENDERING=1',
- ],
- }],
+ 'WTF_USE_ACCELERATED_COMPOSITING=1',
],
'use_accelerated_compositing%': 1,
diff --git a/WebKit/chromium/public/WebAccessibilityCache.h b/WebKit/chromium/public/WebAccessibilityCache.h
index 52e438c..c9aec1f 100644
--- a/WebKit/chromium/public/WebAccessibilityCache.h
+++ b/WebKit/chromium/public/WebAccessibilityCache.h
@@ -45,6 +45,7 @@ public:
WEBKIT_API static WebAccessibilityCache* create();
WEBKIT_API static void enableAccessibility();
+ WEBKIT_API static bool accessibilityEnabled();
virtual void initialize(WebView* view) = 0;
virtual bool isInitialized() const = 0;
diff --git a/WebKit/chromium/public/WebBindings.h b/WebKit/chromium/public/WebBindings.h
index bca4095..147ce45 100644
--- a/WebKit/chromium/public/WebBindings.h
+++ b/WebKit/chromium/public/WebBindings.h
@@ -32,6 +32,7 @@
#define WebBindings_h
#include "WebCommon.h"
+#include "WebVector.h"
#include <bindings/npruntime.h>
namespace WebKit {
@@ -144,6 +145,8 @@ public:
// If so, return that element as a WebElement object.
WEBKIT_API static bool getElement(NPObject* element, WebElement*);
+ WEBKIT_API static NPObject* makeIntArray(const WebVector<int>&);
+
// Exceptions -------------------------------------------------------------
typedef void (ExceptionHandler)(void* data, const NPUTF8* message);
diff --git a/WebKit/chromium/public/WebCommonWorkerClient.h b/WebKit/chromium/public/WebCommonWorkerClient.h
index cea6471..39d8aa9 100644
--- a/WebKit/chromium/public/WebCommonWorkerClient.h
+++ b/WebKit/chromium/public/WebCommonWorkerClient.h
@@ -31,6 +31,9 @@
#ifndef WebCommonWorkerClient_h
#define WebCommonWorkerClient_h
+#include "WebCommon.h"
+#include "WebFileSystem.h"
+
namespace WebKit {
class WebApplicationCacheHost;
@@ -83,6 +86,12 @@ public:
// Called on the main webkit thread before opening a web database.
virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize) = 0;
+ // Called on the main webkit thread before opening a file system.
+ virtual void openFileSystem(WebFileSystem::Type, long long size, WebFileSystemCallbacks*)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ }
+
protected:
~WebCommonWorkerClient() { }
};
diff --git a/WebKit/chromium/public/WebFileInfo.h b/WebKit/chromium/public/WebFileInfo.h
index 4590a30..be0b3e4 100644
--- a/WebKit/chromium/public/WebFileInfo.h
+++ b/WebKit/chromium/public/WebFileInfo.h
@@ -38,7 +38,19 @@ struct WebFileInfo {
// The value 0.0 means that the time is not set.
double modificationTime;
- WebFileInfo() : modificationTime(0.0) { }
+ // The length of the file in bytes.
+ // The value -1 means that the length is not set.
+ long long length;
+
+ enum Type {
+ TypeUnknown = 0,
+ TypeFile,
+ TypeDirectory
+ };
+
+ Type type;
+
+ WebFileInfo() : modificationTime(0.0), length(-1), type(TypeUnknown) { }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebFileWriterClient.h b/WebKit/chromium/public/WebFileWriterClient.h
index d371582..46ff153 100644
--- a/WebKit/chromium/public/WebFileWriterClient.h
+++ b/WebKit/chromium/public/WebFileWriterClient.h
@@ -43,7 +43,7 @@ public:
virtual void didWrite(long long bytes, bool complete) = 0;
// Called once when the truncate completes successfully.
- virtual void didTruncate(long long length) = 0;
+ virtual void didTruncate() = 0;
// Called if the write or truncate fails, or if it is cancelled before the write or truncate completes. Completion of an operation will be signalled exactly once, either by didFail, didTruncate, or didWrite(..., true).
virtual void didFail(WebFileError) = 0;
diff --git a/WebKit/chromium/public/WebFrame.h b/WebKit/chromium/public/WebFrame.h
index 6725f58..5d41d10 100644
--- a/WebKit/chromium/public/WebFrame.h
+++ b/WebKit/chromium/public/WebFrame.h
@@ -56,6 +56,7 @@ class WebFormElement;
class WebHistoryItem;
class WebInputElement;
class WebPasswordAutocompleteListener;
+class WebPerformance;
class WebRange;
class WebSecurityOrigin;
class WebString;
@@ -193,6 +194,8 @@ public:
virtual WebAnimationController* animationController() = 0;
+ virtual WebPerformance performance() const = 0;
+
// Scripting ----------------------------------------------------------
@@ -352,6 +355,8 @@ public:
virtual WebRange markedRange() const = 0;
+ virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const = 0;
+
// Supports commands like Undo, Redo, Cut, Copy, Paste, SelectAll,
// Unselect, etc. See EditorCommand.cpp for the full list of supported
// commands.
@@ -536,6 +541,12 @@ public:
// Only for testing purpose:
// Returns true if selection.anchorNode has a marker on range from |from| with |length|.
virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const = 0;
+
+ // Pauses and samples an SVG animation. Returns false if there's no svg
+ // animation to pause. This is only for testing.
+ virtual bool pauseSVGAnimation(const WebString& animationId,
+ double time,
+ const WebString& elementId) = 0;
protected:
~WebFrame() { }
};
diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h
index 699325d..a72e2fd 100644
--- a/WebKit/chromium/public/WebFrameClient.h
+++ b/WebKit/chromium/public/WebFrameClient.h
@@ -301,6 +301,13 @@ public:
// scripts.
virtual void didCreateIsolatedScriptContext(WebFrame*) { }
+ // Controls whether the given script extension should run in a new script
+ // context in this frame. If extensionGroup is 0, the script context is the
+ // frame's main context. Otherwise, it is a context created by
+ // WebFrame::executeScriptInIsolatedWorld with that same extensionGroup
+ // value.
+ virtual bool allowScriptExtension(WebFrame*, const WebString& extensionName, int extensionGroup) { return true; }
+
// Geometry notifications ----------------------------------------------
diff --git a/WebKit/chromium/public/WebGLES2Context.h b/WebKit/chromium/public/WebGLES2Context.h
deleted file mode 100644
index 45184aa..0000000
--- a/WebKit/chromium/public/WebGLES2Context.h
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#ifndef WebGLES2Context_h
-#define WebGLES2Context_h
-
-#include "WebCommon.h"
-#include "WebNonCopyable.h"
-
-namespace WebKit {
-
-struct WebSize;
-class WebView;
-
-// This interface abstracts the creation and management of an
-// OpenGL ES 2.0 context.
-
-class WebGLES2Context : public WebNonCopyable {
-public:
- virtual ~WebGLES2Context() {}
-
- virtual bool initialize(WebView*, WebGLES2Context* parent) = 0;
- virtual bool makeCurrent() = 0;
- virtual bool destroy() = 0;
- virtual bool swapBuffers() = 0;
-
- // The follow two functions are for managing a context that renders offscreen.
-
- // Resizes the backing store used for offscreen rendering.
- virtual void resizeOffscreenContent(const WebSize&) = 0;
-
- // Returns the ID of the texture used for offscreen rendering in the context of the parent.
- virtual unsigned getOffscreenContentParentTextureId() = 0;
-
- // The following function is used only on Mac OS X and is needed
- // in order to report window size changes.
-#if defined(__APPLE__)
- virtual void resizeOnscreenContent(const WebSize&) = 0;
-#endif
-};
-
-} // namespace WebKit
-
-#endif
diff --git a/WebKit/chromium/public/WebGraphicsContext3D.h b/WebKit/chromium/public/WebGraphicsContext3D.h
index 9857174..15e6365 100644
--- a/WebKit/chromium/public/WebGraphicsContext3D.h
+++ b/WebKit/chromium/public/WebGraphicsContext3D.h
@@ -85,11 +85,6 @@ public:
// on newly-constructed instances. Returns true on success.
virtual bool initialize(Attributes, WebView*, bool renderDirectlyToWebView) = 0;
- // Initializes the graphics context; should be the first operation performed
- // on newly-constructed instances. Returns true on success.
- // FIXME: remove this entry point once the compositor is switched to use GraphicsContext3D.
- virtual bool initialize(Attributes, WebView*) = 0;
-
// Makes the OpenGL context current on the current thread. Returns true on
// success.
virtual bool makeContextCurrent() = 0;
diff --git a/WebKit/chromium/public/WebIDBCursor.h b/WebKit/chromium/public/WebIDBCursor.h
index f47a44c..05bd51a 100644
--- a/WebKit/chromium/public/WebIDBCursor.h
+++ b/WebKit/chromium/public/WebIDBCursor.h
@@ -49,21 +49,8 @@ public:
WEBKIT_ASSERT_NOT_REACHED();
return WebIDBKey::createInvalid();
}
- // FIXME: Remove the legacy version of value() (the first version) as soon as a WebKit roll happens.
- virtual WebSerializedScriptValue value() const
- {
- WebSerializedScriptValue serializedScriptValue;
- WebIDBKey idbKey;
- value(serializedScriptValue, idbKey);
- WEBKIT_ASSERT(!serializedScriptValue.isNull());
- WEBKIT_ASSERT(idbKey.type() == WebIDBKey::InvalidType);
- return serializedScriptValue;
- }
// One or the other will set, depending on what type of cursor this is.
- virtual void value(WebSerializedScriptValue& serializedScriptValue, WebIDBKey& idbKey) const
- {
- serializedScriptValue = value();
- }
+ virtual void value(WebSerializedScriptValue& serializedScriptValue, WebIDBKey& idbKey) const { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
diff --git a/WebKit/chromium/public/WebIDBFactory.h b/WebKit/chromium/public/WebIDBFactory.h
index ab05b06..cb5d369 100755
--- a/WebKit/chromium/public/WebIDBFactory.h
+++ b/WebKit/chromium/public/WebIDBFactory.h
@@ -52,17 +52,10 @@ public:
virtual ~WebIDBFactory() { }
// The WebKit implementation of open ignores the WebFrame* parameter.
- virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, const WebString& dataDir)
- {
- open(name, description, callbacks, origin, webFrame);
- }
- // FIXME: Delete soon. Compatability hack.
- virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame)
- {
- open(name, description, callbacks, origin, webFrame, "/tmp/temporary-indexed-db-files");
- }
+ virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, const WebString& dataDir) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void abortPendingTransactions(const WebVector<int>& pendingIDs) { WEBKIT_ASSERT_NOT_REACHED(); }
+ // The file name that would be used for persisting a given indexed database on the file system.
+ WEBKIT_API static WebString databaseFileName(const WebString& name, const WebSecurityOrigin&);
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebIDBIndex.h b/WebKit/chromium/public/WebIDBIndex.h
index e03fc58..b4ba1f4 100644
--- a/WebKit/chromium/public/WebIDBIndex.h
+++ b/WebKit/chromium/public/WebIDBIndex.h
@@ -26,6 +26,7 @@
#ifndef WebIDBIndex_h
#define WebIDBIndex_h
+#include "WebIDBTransaction.h"
#include "WebString.h"
namespace WebKit {
@@ -60,10 +61,43 @@ public:
return false;
}
- virtual void openObjectCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void openCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void getObject(const WebIDBKey&, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void get(const WebIDBKey&, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+ // FIXME: Remove the versions without transaction parameters.
+ virtual void openObjectCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
+ {
+ openObjectCursor(range, direction, callbacks);
+ }
+ virtual void openObjectCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks)
+ {
+ WebIDBTransaction transaction;
+ openObjectCursor(range, direction, callbacks, transaction);
+ }
+ virtual void openCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
+ {
+ openCursor(range, direction, callbacks);
+ }
+ virtual void openCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks)
+ {
+ WebIDBTransaction transaction;
+ openCursor(range, direction, callbacks, transaction);
+ }
+ virtual void getObject(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
+ {
+ getObject(key, callbacks);
+ }
+ virtual void getObject(const WebIDBKey& key, WebIDBCallbacks* callbacks)
+ {
+ WebIDBTransaction transaction;
+ getObject(key, callbacks, transaction);
+ }
+ virtual void get(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
+ {
+ get(key, callbacks);
+ }
+ virtual void get(const WebIDBKey& key, WebIDBCallbacks* callbacks)
+ {
+ WebIDBTransaction transaction;
+ get(key, callbacks, transaction);
+ }
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebIDBObjectStore.h b/WebKit/chromium/public/WebIDBObjectStore.h
index 7452be9..19efd48 100755
--- a/WebKit/chromium/public/WebIDBObjectStore.h
+++ b/WebKit/chromium/public/WebIDBObjectStore.h
@@ -29,11 +29,13 @@
#include "WebCommon.h"
#include "WebDOMStringList.h"
#include "WebIDBCallbacks.h"
+#include "WebIDBTransaction.h"
#include "WebString.h"
namespace WebKit {
class WebIDBKeyRange;
+class WebIDBTransaction;
// See comment in WebIndexedDatabase for a high level overview these classes.
class WebIDBObjectStore {
@@ -55,35 +57,51 @@ public:
WEBKIT_ASSERT_NOT_REACHED();
return WebDOMStringList();
}
- virtual void get(const WebIDBKey& key, WebIDBCallbacks*)
+
+ // FIXME: Remove the default parameters for transactionIds.
+ virtual void get(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
{
- WEBKIT_ASSERT_NOT_REACHED();
+ get(key, callbacks);
}
- virtual void put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks*)
+ virtual void get(const WebIDBKey& key, WebIDBCallbacks* callbacks)
{
- WEBKIT_ASSERT_NOT_REACHED();
+ WebIDBTransaction transaction;
+ get(key, callbacks, transaction);
}
- virtual void remove(const WebIDBKey& key, WebIDBCallbacks*)
+ virtual void put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
{
- WEBKIT_ASSERT_NOT_REACHED();
+ put(value, key, addOnly, callbacks);
}
- virtual void createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks*)
+ virtual void put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks* callbacks)
{
- WEBKIT_ASSERT_NOT_REACHED();
+ WebIDBTransaction transaction;
+ put(value, key, addOnly, callbacks, transaction);
}
+ virtual void remove(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
+ {
+ remove(key, callbacks);
+ }
+ virtual void remove(const WebIDBKey& key, WebIDBCallbacks* callbacks)
+ {
+ WebIDBTransaction transaction;
+ remove(key, callbacks, transaction);
+ }
+ virtual void createIndex(const WebString& name, const WebString& keyPath, bool unique, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
// Transfers ownership of the WebIDBIndex to the caller.
virtual WebIDBIndex* index(const WebString& name)
{
WEBKIT_ASSERT_NOT_REACHED();
return 0;
}
- virtual void removeIndex(const WebString& name, WebIDBCallbacks*)
+ virtual void removeIndex(const WebString& name, WebIDBCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void openCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks, const WebIDBTransaction&)
{
- WEBKIT_ASSERT_NOT_REACHED();
+ openCursor(range, direction, callbacks);
}
- virtual void openCursor(const WebIDBKeyRange&, unsigned short direction, WebIDBCallbacks*)
+ virtual void openCursor(const WebIDBKeyRange& range, unsigned short direction, WebIDBCallbacks* callbacks)
{
- WEBKIT_ASSERT_NOT_REACHED();
+ WebIDBTransaction transaction;
+ openCursor(range, direction, callbacks, transaction);
}
// FIXME: finish.
};
diff --git a/WebKit/chromium/public/WebIDBTransaction.h b/WebKit/chromium/public/WebIDBTransaction.h
index 0369b89..7b51b97 100644
--- a/WebKit/chromium/public/WebIDBTransaction.h
+++ b/WebKit/chromium/public/WebIDBTransaction.h
@@ -28,6 +28,8 @@
#include "WebString.h"
+namespace WebCore { class IDBTransactionBackendInterface; }
+
namespace WebKit {
class WebIDBObjectStore;
@@ -49,12 +51,22 @@ public:
return 0;
}
virtual void abort() { WEBKIT_ASSERT_NOT_REACHED(); }
+ virtual void didCompleteTaskEvents() { WEBKIT_ASSERT_NOT_REACHED(); }
virtual int id() const
{
- WEBKIT_ASSERT_NOT_REACHED();
+ // FIXME: Uncomment this after the next Chromium WebKit roll.
+ //WEBKIT_ASSERT_NOT_REACHED();
return 0;
}
virtual void setCallbacks(WebIDBTransactionCallbacks*) { WEBKIT_ASSERT_NOT_REACHED(); }
+
+ // FIXME: this is never called from WebCore. Find a cleaner solution.
+ virtual WebCore::IDBTransactionBackendInterface* getIDBTransactionBackendInterface() const
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ return 0;
+ }
+
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebInputElement.h b/WebKit/chromium/public/WebInputElement.h
index 3ef92de..8fea4fa 100644
--- a/WebKit/chromium/public/WebInputElement.h
+++ b/WebKit/chromium/public/WebInputElement.h
@@ -52,33 +52,6 @@ namespace WebKit {
}
WEBKIT_API void assign(const WebInputElement& e) { WebFormControlElement::assign(e); }
- enum InputType {
- Text = 0,
- Password,
- IsIndex,
- CheckBox,
- Radio,
- Submit,
- Reset,
- File,
- Hidden,
- Image,
- Button,
- Search,
- Range,
- Email,
- Number,
- Telephone,
- URL,
- Color,
- Date,
- DateTime,
- DateTimeLocal,
- Month,
- Time,
- Week
- };
-
// This returns true for all of textfield-looking types such as text,
// password, search, email, url, and number.
WEBKIT_API bool isTextField() const;
@@ -89,8 +62,6 @@ namespace WebKit {
WEBKIT_API bool autoComplete() const;
WEBKIT_API bool isReadOnly() const;
WEBKIT_API bool isEnabledFormControl() const;
- // Deperated.
- WEBKIT_API InputType inputType() const;
WEBKIT_API int maxLength() const;
WEBKIT_API bool isActivatedSubmit() const;
WEBKIT_API void setActivatedSubmit(bool);
diff --git a/WebKit/chromium/public/WebInputEvent.h b/WebKit/chromium/public/WebInputEvent.h
index f8b057b..26e41a4 100644
--- a/WebKit/chromium/public/WebInputEvent.h
+++ b/WebKit/chromium/public/WebInputEvent.h
@@ -122,6 +122,12 @@ public:
LeftButtonDown = 1 << 6,
MiddleButtonDown = 1 << 7,
RightButtonDown = 1 << 8,
+
+ // Toggle modifiers for all events. Danger: these are not reflected
+ // into WebCore, so round-tripping from WebInputEvent to a WebCore
+ // event and back will not preserve these flags.
+ CapsLockOn = 1 << 9,
+ NumLockOn = 1 << 10,
};
unsigned size; // The size of this structure, for serialization.
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index 0f282e0..09c79c5 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -53,7 +53,6 @@ class WebClipboard;
class WebCookieJar;
class WebFileSystem;
class WebFileUtilities;
-class WebGLES2Context;
class WebGraphicsContext3D;
class WebIDBFactory;
class WebIDBKey;
@@ -270,12 +269,6 @@ public:
// Returns newly allocated WebGraphicsContext3D instance.
virtual WebGraphicsContext3D* createGraphicsContext3D() { return 0; }
- // GLES2 --------------------------------------------------------------
-
- // Returns newly allocated WebGLES2Context instance.
- // May return null if it fails to create the context.
- virtual WebGLES2Context* createGLES2Context() { return 0; }
-
// FileSystem ----------------------------------------------------------
// Must return non-null.
diff --git a/WebKit/chromium/public/WebPerformance.h b/WebKit/chromium/public/WebPerformance.h
new file mode 100644
index 0000000..012f2fd
--- /dev/null
+++ b/WebKit/chromium/public/WebPerformance.h
@@ -0,0 +1,92 @@
+/*
+ * 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 WebPerformance_h
+#define WebPerformance_h
+
+#include "WebCommon.h"
+#include "WebNavigationType.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore { class Performance; }
+
+namespace WebKit {
+
+class WebPerformance {
+public:
+ ~WebPerformance() { reset(); }
+
+ WebPerformance() { }
+
+ WebPerformance(const WebPerformance& p) { assign(p); }
+
+ WebPerformance& operator=(const WebPerformance& p)
+ {
+ assign(p);
+ return *this;
+ }
+
+ WEBKIT_API void reset();
+ WEBKIT_API void assign(const WebPerformance&);
+
+ // This only returns one of {Other|Reload|BackForward}.
+ // Form submits and link clicks all fall under other.
+ WEBKIT_API WebNavigationType navigationType() const;
+
+ WEBKIT_API double navigationStart() const;
+ WEBKIT_API double unloadEventEnd() const;
+ WEBKIT_API double redirectStart() const;
+ WEBKIT_API double redirectEnd() const;
+ WEBKIT_API unsigned short redirectCount() const;
+ WEBKIT_API double fetchStart() const;
+ WEBKIT_API double domainLookupStart() const;
+ WEBKIT_API double domainLookupEnd() const;
+ WEBKIT_API double connectStart() const;
+ WEBKIT_API double connectEnd() const;
+ WEBKIT_API double requestStart() const;
+ WEBKIT_API double requestEnd() const;
+ WEBKIT_API double responseStart() const;
+ WEBKIT_API double responseEnd() const;
+ WEBKIT_API double loadEventStart() const;
+ WEBKIT_API double loadEventEnd() const;
+
+#if WEBKIT_IMPLEMENTATION
+ WebPerformance(const WTF::PassRefPtr<WebCore::Performance>&);
+ WebPerformance& operator=(const WTF::PassRefPtr<WebCore::Performance>&);
+ operator WTF::PassRefPtr<WebCore::Performance>() const;
+#endif
+
+private:
+ WebPrivatePtr<WebCore::Performance> m_private;
+};
+
+} // namespace WebKit
+
+#endif
diff --git a/WebKit/chromium/public/WebScriptController.h b/WebKit/chromium/public/WebScriptController.h
index 54bb08a..5c360b2 100644
--- a/WebKit/chromium/public/WebScriptController.h
+++ b/WebKit/chromium/public/WebScriptController.h
@@ -51,6 +51,8 @@ public:
// matching group.
// Will only affect v8 contexts initialized after this call. Takes ownership
// of the v8::Extension object passed.
+ // FIXME: remove the latter 2 versions in phase 3 of multipart checkin:
+ // https://bugs.webkit.org/show_bug.cgi?id=45721
WEBKIT_API static void registerExtension(v8::Extension*);
WEBKIT_API static void registerExtension(v8::Extension*,
const WebString& schemeRestriction);
diff --git a/WebKit/chromium/public/WebSettings.h b/WebKit/chromium/public/WebSettings.h
index 0bef045..6a37e08 100644
--- a/WebKit/chromium/public/WebSettings.h
+++ b/WebKit/chromium/public/WebSettings.h
@@ -93,6 +93,8 @@ public:
virtual void setAcceleratedCompositingEnabled(bool) = 0;
virtual void setAccelerated2dCanvasEnabled(bool) = 0;
virtual void setMemoryInfoEnabled(bool) = 0;
+ virtual void setHyperlinkAuditingEnabled(bool) = 0;
+ virtual void setCaretBrowsingEnabled(bool) = 0;
protected:
~WebSettings() { }
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index d162f26..7a8a4af 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -44,7 +44,6 @@ class WebDevToolsAgentClient;
class WebDragData;
class WebFrame;
class WebFrameClient;
-class WebGLES2Context;
class WebGraphicsContext3D;
class WebNode;
class WebSettings;
@@ -66,6 +65,13 @@ public:
UserContentInjectInAllFrames,
UserContentInjectInTopFrameOnly
};
+
+ // Controls which documents user styles are injected into.
+ enum UserStyleInjectionTime {
+ UserStyleInjectInExistingDocuments,
+ UserStyleInjectInSubsequentDocuments
+ };
+
// Initialization ------------------------------------------------------
@@ -311,25 +317,14 @@ public:
unsigned inactiveForegroundColor) = 0;
// User scripts --------------------------------------------------------
- // FIXME: These two methods are DEPRECATED. Remove once Chromium has been rolled.
- virtual void addUserScript(const WebString& sourceCode, bool runAtStart)
- {
- addUserScript(sourceCode, WebVector<WebString>(),
- runAtStart ? UserScriptInjectAtDocumentStart : UserScriptInjectAtDocumentEnd,
- UserContentInjectInAllFrames);
- }
- virtual void addUserStyleSheet(const WebString& sourceCode)
- {
- addUserStyleSheet(sourceCode, WebVector<WebString>(), UserContentInjectInAllFrames);
- }
-
WEBKIT_API static void addUserScript(const WebString& sourceCode,
const WebVector<WebString>& patterns,
UserScriptInjectAt injectAt,
UserContentInjectIn injectIn);
WEBKIT_API static void addUserStyleSheet(const WebString& sourceCode,
const WebVector<WebString>& patterns,
- UserContentInjectIn injectIn);
+ UserContentInjectIn injectIn,
+ UserStyleInjectionTime injectionTime = UserStyleInjectInSubsequentDocuments);
WEBKIT_API static void removeAllUserContent();
// Modal dialog support ------------------------------------------------
@@ -341,12 +336,6 @@ public:
// GPU acceleration support --------------------------------------------
- // Returns the GLES2Context associated with this WebView. One will be
- // created if it doesn't already exist.
- // FIXME: remove this method once the compositor is fully switched
- // over to GraphicsContext3D.
- virtual WebGLES2Context* gles2Context() = 0;
-
// Returns the (on-screen) WebGraphicsContext3D associated with
// this WebView. One will be created if it doesn't already exist.
// This is used to set up sharing between this context (which is
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index f686419..3b0e47a 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -276,12 +276,6 @@ public:
// accessibility object.
virtual void focusAccessibilityObject(const WebAccessibilityObject&) { }
- // Notifies embedder that the state of an accessibility object has changed.
- virtual void didChangeAccessibilityObjectState(const WebAccessibilityObject&) { }
-
- // Notifies embedder that the children of an accessibility object has changed.
- virtual void didChangeAccessibilityObjectChildren(const WebAccessibilityObject&) { }
-
// Notifies embedder about an accessibility notification.
virtual void postAccessibilityNotification(const WebAccessibilityObject&, WebAccessibilityNotification) { }
diff --git a/WebKit/chromium/public/gtk/WebScreenInfoFactory.h b/WebKit/chromium/public/gtk/WebScreenInfoFactory.h
deleted file mode 100644
index c964741..0000000
--- a/WebKit/chromium/public/gtk/WebScreenInfoFactory.h
+++ /dev/null
@@ -1,49 +0,0 @@
-/*
- * Copyright (C) 2009 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 WebScreenInfoFactory_h
-#define WebScreenInfoFactory_h
-
-#include "../WebCommon.h"
-
-typedef struct _GtkWidget GtkWidget;
-
-namespace WebKit {
-
-struct WebScreenInfo;
-
-class WebScreenInfoFactory {
-public:
- WEBKIT_API static WebScreenInfo screenInfo(GtkWidget*);
-};
-
-} // namespace WebKit
-
-#endif
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index ac3aad3..f3b8f5a 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -49,6 +49,7 @@
#include "TextAffinity.h"
#include "UserContentTypes.h"
#include "UserScriptTypes.h"
+#include "UserStyleSheetTypes.h"
#include "VideoFrameChromium.h"
#include "WebAccessibilityObject.h"
#include "WebApplicationCacheHost.h"
@@ -273,31 +274,6 @@ COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::Weight900, FontWeight900);
COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::WeightNormal, FontWeightNormal);
COMPILE_ASSERT_MATCHING_ENUM(WebFontDescription::WeightBold, FontWeightBold);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Text, HTMLInputElement::TEXT);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Password, HTMLInputElement::PASSWORD);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::IsIndex, HTMLInputElement::ISINDEX);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::CheckBox, HTMLInputElement::CHECKBOX);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Radio, HTMLInputElement::RADIO);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Submit, HTMLInputElement::SUBMIT);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Reset, HTMLInputElement::RESET);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::File, HTMLInputElement::FILE);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Hidden, HTMLInputElement::HIDDEN);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Image, HTMLInputElement::IMAGE);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Button, HTMLInputElement::BUTTON);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Search, HTMLInputElement::SEARCH);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Range, HTMLInputElement::RANGE);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Email, HTMLInputElement::EMAIL);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Number, HTMLInputElement::NUMBER);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Telephone, HTMLInputElement::TELEPHONE);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::URL, HTMLInputElement::URL);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Color, HTMLInputElement::COLOR);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Date, HTMLInputElement::DATE);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::DateTime, HTMLInputElement::DATETIME);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::DateTimeLocal, HTMLInputElement::DATETIMELOCAL);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Month, HTMLInputElement::MONTH);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Time, HTMLInputElement::TIME);
-COMPILE_ASSERT_MATCHING_ENUM(WebInputElement::Week, HTMLInputElement::WEEK);
-
COMPILE_ASSERT_MATCHING_ENUM(WebNode::ElementNode, Node::ELEMENT_NODE);
COMPILE_ASSERT_MATCHING_ENUM(WebNode::AttributeNode, Node::ATTRIBUTE_NODE);
COMPILE_ASSERT_MATCHING_ENUM(WebNode::TextNode, Node::TEXT_NODE);
@@ -378,6 +354,8 @@ COMPILE_ASSERT_MATCHING_ENUM(WebView::UserScriptInjectAtDocumentStart, InjectAtD
COMPILE_ASSERT_MATCHING_ENUM(WebView::UserScriptInjectAtDocumentEnd, InjectAtDocumentEnd);
COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInAllFrames, InjectInAllFrames);
COMPILE_ASSERT_MATCHING_ENUM(WebView::UserContentInjectInTopFrameOnly, InjectInTopFrameOnly);
+COMPILE_ASSERT_MATCHING_ENUM(WebView::UserStyleInjectInExistingDocuments, InjectInExistingDocuments);
+COMPILE_ASSERT_MATCHING_ENUM(WebView::UserStyleInjectInSubsequentDocuments, InjectInSubsequentDocuments);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NullType, IDBKey::NullType);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::StringType, IDBKey::StringType);
diff --git a/WebKit/chromium/src/AsyncFileSystemChromium.cpp b/WebKit/chromium/src/AsyncFileSystemChromium.cpp
index 08fcea6..db65bbd 100644
--- a/WebKit/chromium/src/AsyncFileSystemChromium.cpp
+++ b/WebKit/chromium/src/AsyncFileSystemChromium.cpp
@@ -33,9 +33,11 @@
#if ENABLE(FILE_SYSTEM)
#include "AsyncFileSystemCallbacks.h"
-#include "FileSystem.h"
+#include "AsyncFileWriterChromium.h"
+#include "WebFileInfo.h"
#include "WebFileSystem.h"
#include "WebFileSystemCallbacksImpl.h"
+#include "WebFileWriter.h"
#include "WebKit.h"
#include "WebKitClient.h"
@@ -43,6 +45,11 @@
namespace WebCore {
+bool AsyncFileSystem::isAvailable()
+{
+ return true;
+}
+
AsyncFileSystemChromium::AsyncFileSystemChromium(const String& rootPath)
: AsyncFileSystem(rootPath)
, m_webFileSystem(WebKit::webKitClient()->fileSystem())
@@ -99,6 +106,65 @@ void AsyncFileSystemChromium::readDirectory(const String& path, PassOwnPtr<Async
m_webFileSystem->readDirectory(path, new WebKit::WebFileSystemCallbacksImpl(callbacks));
}
+class FileWriterHelperCallbacks : public WebKit::WebFileSystemCallbacks {
+public:
+ FileWriterHelperCallbacks(AsyncFileWriterClient* client, const String& path, WebKit::WebFileSystem* webFileSystem, PassOwnPtr<WebCore::AsyncFileSystemCallbacks> callbacks)
+ : m_client(client)
+ , m_path(path)
+ , m_webFileSystem(webFileSystem)
+ , m_callbacks(callbacks)
+ {
+ }
+
+ virtual void didSucceed()
+ {
+ ASSERT_NOT_REACHED();
+ delete this;
+ }
+ virtual void didReadMetadata(const WebKit::WebFileInfo& info)
+ {
+ ASSERT(m_callbacks);
+ if (info.type != WebKit::WebFileInfo::TypeFile || info.length < 0)
+ m_callbacks->didFail(WebKit::WebFileErrorInvalidState);
+ else {
+ OwnPtr<AsyncFileWriterChromium> asyncFileWriterChromium = adoptPtr(new AsyncFileWriterChromium(m_client));
+ OwnPtr<WebKit::WebFileWriter> webFileWriter = adoptPtr(m_webFileSystem->createFileWriter(m_path, asyncFileWriterChromium.get()));
+ asyncFileWriterChromium->setWebFileWriter(webFileWriter.release());
+ m_callbacks->didCreateFileWriter(asyncFileWriterChromium.release(), info.length);
+ }
+ delete this;
+ }
+
+ virtual void didReadDirectory(const WebKit::WebVector<WebKit::WebFileSystemEntry>& entries, bool hasMore)
+ {
+ ASSERT_NOT_REACHED();
+ delete this;
+ }
+ virtual void didOpenFileSystem(const WebKit::WebString& name, const WebKit::WebString& rootPath)
+ {
+ ASSERT_NOT_REACHED();
+ delete this;
+ }
+
+ virtual void didFail(WebKit::WebFileError error)
+ {
+ ASSERT(m_callbacks);
+ m_callbacks->didFail(error);
+ delete this;
+ }
+
+private:
+ AsyncFileWriterClient* m_client;
+ String m_path;
+ WebKit::WebFileSystem* m_webFileSystem;
+ OwnPtr<WebCore::AsyncFileSystemCallbacks> m_callbacks;
+};
+
+void AsyncFileSystemChromium::createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
+{
+ m_webFileSystem->readMetadata(path, new FileWriterHelperCallbacks(client, path, m_webFileSystem, callbacks));
+}
+
} // namespace WebCore
#endif
diff --git a/WebKit/chromium/src/AsyncFileSystemChromium.h b/WebKit/chromium/src/AsyncFileSystemChromium.h
index f46f78c..d8698d5 100644
--- a/WebKit/chromium/src/AsyncFileSystemChromium.h
+++ b/WebKit/chromium/src/AsyncFileSystemChromium.h
@@ -58,6 +58,7 @@ public:
virtual void fileExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
virtual void directoryExists(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
virtual void readDirectory(const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
+ virtual void createWriter(AsyncFileWriterClient* client, const String& path, PassOwnPtr<AsyncFileSystemCallbacks>);
private:
WebKit::WebFileSystem* m_webFileSystem;
diff --git a/WebKit/chromium/src/AsyncFileWriterChromium.cpp b/WebKit/chromium/src/AsyncFileWriterChromium.cpp
index 4bfc988..8969094 100644
--- a/WebKit/chromium/src/AsyncFileWriterChromium.cpp
+++ b/WebKit/chromium/src/AsyncFileWriterChromium.cpp
@@ -33,30 +33,31 @@
#if ENABLE(FILE_SYSTEM)
+#include "AsyncFileWriterClient.h"
#include "Blob.h"
-#include "FileWriterClient.h"
#include "WebFileWriter.h"
#include "WebURL.h"
-using namespace WebCore;
+namespace WebCore {
-namespace WebKit {
-
-AsyncFileWriterChromium::AsyncFileWriterChromium(FileWriterClient* client)
+AsyncFileWriterChromium::AsyncFileWriterChromium(AsyncFileWriterClient* client)
: m_client(client)
{
}
-void AsyncFileWriterChromium::setWebFileWriter(WebFileWriter* writer)
+AsyncFileWriterChromium::~AsyncFileWriterChromium()
+{
+}
+
+void AsyncFileWriterChromium::setWebFileWriter(PassOwnPtr<WebKit::WebFileWriter> writer)
{
- ASSERT(!m_writer);
m_writer = writer;
}
void AsyncFileWriterChromium::write(long long position, Blob* data)
{
ASSERT(m_writer);
- m_writer->write(position, WebURL(data->url()));
+ m_writer->write(position, WebKit::WebURL(data->url()));
}
void AsyncFileWriterChromium::truncate(long long length)
@@ -77,12 +78,12 @@ void AsyncFileWriterChromium::didWrite(long long bytes, bool complete)
m_client->didWrite(bytes, complete);
}
-void AsyncFileWriterChromium::didTruncate(long long length)
+void AsyncFileWriterChromium::didTruncate()
{
- m_client->didTruncate(length);
+ m_client->didTruncate();
}
-void AsyncFileWriterChromium::didFail(WebFileError error)
+void AsyncFileWriterChromium::didFail(WebKit::WebFileError error)
{
m_client->didFail(error);
}
diff --git a/WebKit/chromium/src/AsyncFileWriterChromium.h b/WebKit/chromium/src/AsyncFileWriterChromium.h
index 92743ca..71a2f18 100644
--- a/WebKit/chromium/src/AsyncFileWriterChromium.h
+++ b/WebKit/chromium/src/AsyncFileWriterChromium.h
@@ -36,35 +36,37 @@
#include "AsyncFileWriter.h"
#include "WebFileError.h"
#include "WebFileWriterClient.h"
+#include <wtf/PassOwnPtr.h>
-namespace WebCore {
-class Blob;
-class FileWriterClient;
+namespace WebKit {
+class WebFileWriter;
}
-namespace WebKit {
+namespace WebCore {
-class WebFileWriter;
+class Blob;
+class AsyncFileWriterClient;
-class AsyncFileWriterChromium : public WebCore::AsyncFileWriter, public WebFileWriterClient {
+class AsyncFileWriterChromium : public AsyncFileWriter, public WebKit::WebFileWriterClient {
public:
- AsyncFileWriterChromium(WebCore::FileWriterClient* client);
-
- void setWebFileWriter(WebFileWriter* writer);
+ AsyncFileWriterChromium(AsyncFileWriterClient* client);
+ ~AsyncFileWriterChromium();
+
+ void setWebFileWriter(PassOwnPtr<WebKit::WebFileWriter> writer);
// FileWriter
- virtual void write(long long position, WebCore::Blob* data);
+ virtual void write(long long position, Blob* data);
virtual void truncate(long long length);
virtual void abort();
// WebFileWriterClient
virtual void didWrite(long long bytes, bool complete);
- virtual void didTruncate(long long length);
- virtual void didFail(WebFileError);
+ virtual void didTruncate();
+ virtual void didFail(WebKit::WebFileError);
private:
- OwnPtr<WebFileWriter> m_writer;
- WebCore::FileWriterClient* m_client;
+ OwnPtr<WebKit::WebFileWriter> m_writer;
+ AsyncFileWriterClient* m_client;
};
} // namespace
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index 8c13cbb..5f702e0 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -44,7 +44,6 @@
#include "FloatRect.h"
#include "FrameLoadRequest.h"
#include "FrameView.h"
-#include "GLES2Context.h"
#include "Geolocation.h"
#include "GeolocationService.h"
#include "GeolocationServiceChromium.h"
@@ -257,7 +256,9 @@ void ChromeClientImpl::focusedNodeChanged(Node* node)
if (!document) {
ASSERT_NOT_REACHED();
return;
- }
+ }
+
+ // TODO: Remove once the FocusedUIElementChanged notification is handled downstream.
if (document && document->axObjectCache()->accessibilityEnabled()) {
// Retrieve the focused AccessibilityObject.
AccessibilityObject* focusedAccObj =
@@ -760,20 +761,6 @@ void ChromeClientImpl::getPopupMenuInfo(PopupContainer* popupContainer,
info->rightAligned = popupContainer->menuStyle().textDirection() == RTL;
}
-void ChromeClientImpl::didChangeAccessibilityObjectState(AccessibilityObject* obj)
-{
- // Alert assistive technology about the accessibility object state change
- if (obj)
- m_webView->client()->didChangeAccessibilityObjectState(WebAccessibilityObject(obj));
-}
-
-void ChromeClientImpl::didChangeAccessibilityObjectChildren(WebCore::AccessibilityObject* obj)
-{
- // Alert assistive technology about the accessibility object children change
- if (obj)
- m_webView->client()->didChangeAccessibilityObjectChildren(WebAccessibilityObject(obj));
-}
-
void ChromeClientImpl::postAccessibilityNotification(AccessibilityObject* obj, AXObjectCache::AXNotification notification)
{
// Alert assistive technology about the accessibility object notification.
diff --git a/WebKit/chromium/src/ChromeClientImpl.h b/WebKit/chromium/src/ChromeClientImpl.h
index fbaac87..02f1de6 100644
--- a/WebKit/chromium/src/ChromeClientImpl.h
+++ b/WebKit/chromium/src/ChromeClientImpl.h
@@ -166,8 +166,6 @@ public:
const WebCore::IntRect& bounds,
bool handleExternally);
virtual void popupClosed(WebCore::PopupContainer* popupContainer);
- virtual void didChangeAccessibilityObjectState(WebCore::AccessibilityObject*);
- virtual void didChangeAccessibilityObjectChildren(WebCore::AccessibilityObject*);
virtual void postAccessibilityNotification(WebCore::AccessibilityObject*, WebCore::AXObjectCache::AXNotification);
// ChromeClientImpl:
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index 3ced7b8..b906575 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -66,7 +66,7 @@
#include "WebThemeEngine.h"
#endif
-#if OS(LINUX)
+#if OS(LINUX) || OS(FREEBSD)
#include "WebFontInfo.h"
#include "WebFontRenderStyle.h"
#endif
@@ -422,7 +422,7 @@ bool ChromiumBridge::ensureFontLoaded(HFONT font)
}
#endif
-#if OS(LINUX)
+#if OS(LINUX) || OS(FREEBSD)
String ChromiumBridge::getFontFamilyForCharacters(const UChar* characters, size_t numCharacters)
{
if (webKitClient()->sandboxSupport())
diff --git a/WebKit/chromium/src/DeviceOrientationClientProxy.cpp b/WebKit/chromium/src/DeviceOrientationClientProxy.cpp
index f4a0dd9..29b43ba 100644
--- a/WebKit/chromium/src/DeviceOrientationClientProxy.cpp
+++ b/WebKit/chromium/src/DeviceOrientationClientProxy.cpp
@@ -71,4 +71,9 @@ WebCore::DeviceOrientation* DeviceOrientationClientProxy::lastOrientation() cons
return m_lastOrientation.get();
}
+void DeviceOrientationClientProxy::deviceOrientationControllerDestroyed()
+{
+ // Our lifetime is bound to the WebViewImpl.
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/DeviceOrientationClientProxy.h b/WebKit/chromium/src/DeviceOrientationClientProxy.h
index 2d3a7dc..e90d77f 100644
--- a/WebKit/chromium/src/DeviceOrientationClientProxy.h
+++ b/WebKit/chromium/src/DeviceOrientationClientProxy.h
@@ -48,6 +48,7 @@ public:
void startUpdating();
void stopUpdating();
WebCore::DeviceOrientation* lastOrientation() const;
+ virtual void deviceOrientationControllerDestroyed();
private:
WebDeviceOrientationClient* m_client;
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 61d43df..ba9c8fd 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -147,6 +147,14 @@ void FrameLoaderClientImpl::didCreateIsolatedScriptContext()
m_webFrame->client()->didCreateIsolatedScriptContext(m_webFrame);
}
+bool FrameLoaderClientImpl::allowScriptExtension(const String& extensionName,
+ int extensionGroup)
+{
+ if (m_webFrame->client())
+ return m_webFrame->client()->allowScriptExtension(m_webFrame, extensionName, extensionGroup);
+ return false;
+}
+
void FrameLoaderClientImpl::didPerformFirstNavigation() const
{
}
@@ -1360,7 +1368,7 @@ PassRefPtr<Frame> FrameLoaderClientImpl::createFrame(
return m_webFrame->createChildFrame(frameRequest, ownerElement);
}
-void FrameLoaderClientImpl::didTransferChildFrameToNewDocument()
+void FrameLoaderClientImpl::didTransferChildFrameToNewDocument(Page*)
{
ASSERT(m_webFrame->frame()->ownerElement());
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.h b/WebKit/chromium/src/FrameLoaderClientImpl.h
index 57105de..0b15db6 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.h
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.h
@@ -69,6 +69,10 @@ public:
// in garbage collection.
virtual void didCreateIsolatedScriptContext();
+ // Returns true if we should allow the given V8 extension to be added to
+ // the script context at the currently loading page and given extension group.
+ virtual bool allowScriptExtension(const String& extensionName, int extensionGroup);
+
virtual bool hasWebView() const;
virtual bool hasFrameView() const;
virtual void makeRepresentation(WebCore::DocumentLoader*);
@@ -175,7 +179,7 @@ public:
WebCore::HTMLFrameOwnerElement* ownerElement,
const WTF::String& referrer, bool allowsScrolling,
int marginWidth, int marginHeight);
- virtual void didTransferChildFrameToNewDocument();
+ virtual void didTransferChildFrameToNewDocument(WebCore::Page*);
virtual PassRefPtr<WebCore::Widget> createPlugin(
const WebCore::IntSize&, WebCore::HTMLPlugInElement*, const WebCore::KURL&,
const Vector<WTF::String>&, const Vector<WTF::String>&,
diff --git a/WebKit/chromium/src/GLES2Context.cpp b/WebKit/chromium/src/GLES2Context.cpp
deleted file mode 100644
index b4b4bb2..0000000
--- a/WebKit/chromium/src/GLES2Context.cpp
+++ /dev/null
@@ -1,115 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-
-#include "GLES2Context.h"
-#include "GLES2ContextInternal.h"
-#include "IntSize.h"
-#include "WebGLES2Context.h"
-#include "WebKit.h"
-#include "WebKitClient.h"
-#include "WebViewImpl.h"
-#include <wtf/OwnPtr.h>
-
-// There are two levels of delegation in this file:
-//
-// 1. GLES2Context delegates to GLES2ContextInternal. This is done
-// so that we have some place to store data members common among
-// implementations.
-//
-// 2. GLES2ContextInternal delegates to an implementation of
-// WebGLES2Context. This is done so we have a place to inject an
-// implementation which creates the GL ES context.
-
-using namespace WebKit;
-
-namespace WebCore {
-
-PassOwnPtr<GLES2ContextInternal> GLES2ContextInternal::create(WebGLES2Context* impl, bool owns)
-{
- PassOwnPtr<GLES2ContextInternal> result = new GLES2ContextInternal(impl, owns);
- return result;
-}
-
-PassOwnPtr<GLES2Context> GLES2Context::create(PassOwnPtr<GLES2ContextInternal> internal)
-{
- PassOwnPtr<GLES2Context> result = new GLES2Context();
- result->m_internal = internal;
- return result;
-}
-
-GLES2Context::GLES2Context()
-{
-}
-
-GLES2Context::~GLES2Context()
-{
-}
-
-bool GLES2Context::makeCurrent()
-{
- WebGLES2Context* webContext = m_internal->getWebGLES2Context();
- if (!webContext)
- return false;
- return webContext->makeCurrent();
-}
-
-bool GLES2Context::destroy()
-{
- WebGLES2Context* webContext = m_internal->getWebGLES2Context();
- if (!webContext)
- return false;
- return webContext->destroy();
-}
-
-bool GLES2Context::swapBuffers()
-{
- WebGLES2Context* webContext = m_internal->getWebGLES2Context();
- if (!webContext)
- return false;
- return webContext->swapBuffers();
-}
-
-void GLES2Context::resizeOffscreenContent(const IntSize& size)
-{
- WebGLES2Context* webContext = m_internal->getWebGLES2Context();
- ASSERT(webContext);
- webContext->resizeOffscreenContent(size);
-}
-
-unsigned GLES2Context::getOffscreenContentParentTextureId()
-{
- WebGLES2Context* webContext = m_internal->getWebGLES2Context();
- ASSERT(webContext);
- return webContext->getOffscreenContentParentTextureId();
-}
-
-} // namespace WebCore
diff --git a/WebKit/chromium/src/GLES2ContextInternal.h b/WebKit/chromium/src/GLES2ContextInternal.h
deleted file mode 100644
index 4668311..0000000
--- a/WebKit/chromium/src/GLES2ContextInternal.h
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * Copyright (C) 2010 Google Inc. All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are
- * met:
- *
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above
- * copyright notice, this list of conditions and the following disclaimer
- * in the documentation and/or other materials provided with the
- * distribution.
- * * Neither the name of Google Inc. nor the names of its
- * contributors may be used to endorse or promote products derived from
- * this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include <wtf/PassOwnPtr.h>
-
-namespace WebKit {
-class WebGLES2Context;
-}
-
-namespace WebCore {
-
-class GLES2ContextInternal {
-public:
- // If 'owns' is set to true, this GLES2ContextInternal takes ownership of the passed in WebKit::WebGLES2Context.
- static PassOwnPtr<GLES2ContextInternal> create(WebKit::WebGLES2Context* impl, bool owns);
-
- WebKit::WebGLES2Context* getWebGLES2Context() { return m_impl; }
-
- ~GLES2ContextInternal();
-
-private:
- GLES2ContextInternal(WebKit::WebGLES2Context* impl, bool owns);
-
- WebKit::WebGLES2Context* m_impl;
- bool m_owns;
-};
-
-}
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.h b/WebKit/chromium/src/IDBDatabaseProxy.h
index 42a7d7e..fffd23e 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.h
+++ b/WebKit/chromium/src/IDBDatabaseProxy.h
@@ -47,7 +47,7 @@ public:
virtual String version() const;
virtual PassRefPtr<DOMStringList> objectStores() const;
- // FIXME: Add transaction and setVersion.
+ // FIXME: Add setVersion.
virtual void createObjectStore(const String& name, const String& keyPath, bool autoIncrement, PassRefPtr<IDBCallbacks>);
virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name, unsigned short mode);
diff --git a/WebKit/chromium/src/IDBFactoryBackendProxy.cpp b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp
index 18101e4..d43e787 100755
--- a/WebKit/chromium/src/IDBFactoryBackendProxy.cpp
+++ b/WebKit/chromium/src/IDBFactoryBackendProxy.cpp
@@ -65,14 +65,6 @@ void IDBFactoryBackendProxy::open(const String& name, const String& description,
m_webIDBFactory->open(name, description, new WebIDBCallbacksImpl(callbacks), origin, webFrame, dataDir);
}
-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 ac30cf2..6371686 100755
--- a/WebKit/chromium/src/IDBFactoryBackendProxy.h
+++ b/WebKit/chromium/src/IDBFactoryBackendProxy.h
@@ -46,7 +46,6 @@ public:
PassRefPtr<DOMStringList> databases(void) const;
virtual void open(const String& name, const String& description, PassRefPtr<IDBCallbacks>, PassRefPtr<SecurityOrigin>, Frame*, const String& dataDir);
- virtual void abortPendingTransactions(const Vector<int>& pendingIDs);
private:
IDBFactoryBackendProxy();
diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.cpp b/WebKit/chromium/src/IDBObjectStoreProxy.cpp
index ad27fa3..82ca5f6 100755
--- a/WebKit/chromium/src/IDBObjectStoreProxy.cpp
+++ b/WebKit/chromium/src/IDBObjectStoreProxy.cpp
@@ -30,11 +30,13 @@
#include "IDBCallbacks.h"
#include "IDBIndexBackendProxy.h"
#include "IDBKeyRange.h"
+#include "IDBTransactionBackendProxy.h"
#include "WebIDBCallbacksImpl.h"
#include "WebIDBKeyRange.h"
#include "WebIDBIndex.h"
#include "WebIDBKey.h"
#include "WebIDBObjectStore.h"
+#include "WebIDBTransactionImpl.h"
#include "WebSerializedScriptValue.h"
#if ENABLE(INDEXED_DATABASE)
@@ -70,9 +72,12 @@ PassRefPtr<DOMStringList> IDBObjectStoreProxy::indexNames() const
return m_webIDBObjectStore->indexNames();
}
-void IDBObjectStoreProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks)
+void IDBObjectStoreProxy::get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks> callbacks, IDBTransactionBackendInterface* transaction)
{
- m_webIDBObjectStore->get(key, new WebIDBCallbacksImpl(callbacks));
+ // The transaction pointer is guaranteed to be a pointer to a proxy object as, in the renderer,
+ // all implementations of IDB interfaces are proxy objects.
+ IDBTransactionBackendProxy* transactionProxy = static_cast<IDBTransactionBackendProxy*>(transaction);
+ m_webIDBObjectStore->get(key, new WebIDBCallbacksImpl(callbacks), *transactionProxy->getWebIDBTransaction());
}
void IDBObjectStoreProxy::put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, bool addOnly, PassRefPtr<IDBCallbacks> callbacks)
diff --git a/WebKit/chromium/src/IDBObjectStoreProxy.h b/WebKit/chromium/src/IDBObjectStoreProxy.h
index a334572..13dfe23 100755
--- a/WebKit/chromium/src/IDBObjectStoreProxy.h
+++ b/WebKit/chromium/src/IDBObjectStoreProxy.h
@@ -46,7 +46,7 @@ public:
String keyPath() const;
PassRefPtr<DOMStringList> indexNames() const;
- void get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks>);
+ void get(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks>, IDBTransactionBackendInterface*);
void put(PassRefPtr<SerializedScriptValue> value, PassRefPtr<IDBKey> key, bool addOnly, PassRefPtr<IDBCallbacks>);
void remove(PassRefPtr<IDBKey> key, PassRefPtr<IDBCallbacks>);
diff --git a/WebKit/chromium/src/IDBTransactionBackendProxy.cpp b/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
index be6b058..59e88d8 100644
--- a/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
+++ b/WebKit/chromium/src/IDBTransactionBackendProxy.cpp
@@ -69,11 +69,17 @@ void IDBTransactionBackendProxy::abort()
m_webIDBTransaction->abort();
}
-void IDBTransactionBackendProxy::scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>)
+bool 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();
+ return false;
+}
+
+void IDBTransactionBackendProxy::didCompleteTaskEvents()
+{
+ m_webIDBTransaction->didCompleteTaskEvents();
}
int IDBTransactionBackendProxy::id() const
diff --git a/WebKit/chromium/src/IDBTransactionBackendProxy.h b/WebKit/chromium/src/IDBTransactionBackendProxy.h
index d62b8ff..3daf73e 100644
--- a/WebKit/chromium/src/IDBTransactionBackendProxy.h
+++ b/WebKit/chromium/src/IDBTransactionBackendProxy.h
@@ -45,10 +45,13 @@ public:
virtual PassRefPtr<IDBObjectStoreBackendInterface> objectStore(const String& name);
virtual unsigned short mode() const;
virtual void abort();
- virtual void scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>);
+ virtual bool scheduleTask(PassOwnPtr<ScriptExecutionContext::Task>);
+ virtual void didCompleteTaskEvents();
virtual int id() const;
virtual void setCallbacks(IDBTransactionCallbacks*);
+ WebKit::WebIDBTransaction* getWebIDBTransaction() const { return m_webIDBTransaction.get(); }
+
private:
IDBTransactionBackendProxy(PassOwnPtr<WebKit::WebIDBTransaction>);
diff --git a/WebKit/chromium/src/LocalFileSystemChromium.cpp b/WebKit/chromium/src/LocalFileSystemChromium.cpp
index 45365ef..7bf4335 100644
--- a/WebKit/chromium/src/LocalFileSystemChromium.cpp
+++ b/WebKit/chromium/src/LocalFileSystemChromium.cpp
@@ -42,25 +42,33 @@
#include "WebFileSystemCallbacksImpl.h"
#include "WebFrameClient.h"
#include "WebFrameImpl.h"
+#include "WebWorkerImpl.h"
+#include "WorkerContext.h"
+#include "WorkerThread.h"
+#include <wtf/Threading.h>
using namespace WebKit;
namespace WebCore {
-PassRefPtr<LocalFileSystem> LocalFileSystem::create(const String& path)
+LocalFileSystem& LocalFileSystem::localFileSystem()
{
- return adoptRef(new LocalFileSystem(path));
+ AtomicallyInitializedStatic(LocalFileSystem*, localFileSystem = new LocalFileSystem(""));
+ return *localFileSystem;
}
-void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassRefPtr<FileSystemCallback> successCallback, PassRefPtr<ErrorCallback> errorCallback)
+void LocalFileSystem::requestFileSystem(ScriptExecutionContext* context, AsyncFileSystem::Type type, long long size, PassOwnPtr<AsyncFileSystemCallbacks> callbacks)
{
ASSERT(context);
if (context->isDocument()) {
Document* document = static_cast<Document*>(context);
WebFrameImpl* webFrame = WebFrameImpl::fromFrame(document->frame());
- webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(new FileSystemCallbacks(successCallback, errorCallback, context)));
+ webFrame->client()->openFileSystem(webFrame, static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(callbacks));
} else {
- // FIXME: Add implementation for workers.
+ WorkerContext* workerContext = static_cast<WorkerContext*>(context);
+ WorkerLoaderProxy* workerLoaderProxy = &workerContext->thread()->workerLoaderProxy();
+ WebWorkerBase* webWorker = static_cast<WebWorkerBase*>(workerLoaderProxy);
+ webWorker->openFileSystem(static_cast<WebFileSystem::Type>(type), size, new WebFileSystemCallbacksImpl(callbacks));
}
}
diff --git a/WebKit/chromium/src/LocalizedStrings.cpp b/WebKit/chromium/src/LocalizedStrings.cpp
index 74ff699..3354c30 100644
--- a/WebKit/chromium/src/LocalizedStrings.cpp
+++ b/WebKit/chromium/src/LocalizedStrings.cpp
@@ -265,6 +265,16 @@ String contextMenuItemTagInspectElement() { return String(); }
String contextMenuItemTagShowSpellingPanel(bool show) { return String(); }
String mediaElementLiveBroadcastStateText() { return String(); }
String mediaElementLoadingStateText() { return String(); }
+String contextMenuItemTagOpenVideoInNewWindow() { return String(); }
+String contextMenuItemTagOpenAudioInNewWindow() { return String(); }
+String contextMenuItemTagCopyVideoLinkToClipboard() { return String(); }
+String contextMenuItemTagCopyAudioLinkToClipboard() { return String(); }
+String contextMenuItemTagToggleMediaControls() { return String(); }
+String contextMenuItemTagToggleMediaLoop() { return String(); }
+String contextMenuItemTagEnterVideoFullscreen() { return String(); }
+String contextMenuItemTagMediaPlay() { return String(); }
+String contextMenuItemTagMediaPause() { return String(); }
+String contextMenuItemTagMediaMute() { return String(); }
String localizedMediaControlElementString(const String& /*name*/)
{
diff --git a/WebKit/chromium/src/VideoFrameChromiumImpl.cpp b/WebKit/chromium/src/VideoFrameChromiumImpl.cpp
index 2b98320..a60fe28 100644
--- a/WebKit/chromium/src/VideoFrameChromiumImpl.cpp
+++ b/WebKit/chromium/src/VideoFrameChromiumImpl.cpp
@@ -38,14 +38,6 @@ 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);
@@ -108,4 +100,22 @@ const void* VideoFrameChromiumImpl::data(unsigned plane) const
return 0;
}
+const IntSize VideoFrameChromiumImpl::requiredTextureSize(unsigned plane) const
+{
+ switch (format()) {
+ case RGBA:
+ return IntSize(stride(plane), height());
+ case YV12:
+ if (plane == static_cast<unsigned>(yPlane))
+ return IntSize(stride(plane), height());
+ else if (plane == static_cast<unsigned>(uPlane))
+ return IntSize(stride(plane), height() / 2);
+ else if (plane == static_cast<unsigned>(vPlane))
+ return IntSize(stride(plane), height() / 2);
+ default:
+ break;
+ }
+ return IntSize();
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/VideoFrameChromiumImpl.h b/WebKit/chromium/src/VideoFrameChromiumImpl.h
index 3ad424c..042cd7e 100644
--- a/WebKit/chromium/src/VideoFrameChromiumImpl.h
+++ b/WebKit/chromium/src/VideoFrameChromiumImpl.h
@@ -56,6 +56,7 @@ public:
virtual unsigned planes() const;
virtual int stride(unsigned plane) const;
virtual const void* data(unsigned plane) const;
+ virtual const IntSize requiredTextureSize(unsigned plane) const;
private:
WebVideoFrame* m_webVideoFrame;
diff --git a/WebKit/chromium/src/WebAccessibilityCache.cpp b/WebKit/chromium/src/WebAccessibilityCache.cpp
index 8a3f697..ab8f814 100644
--- a/WebKit/chromium/src/WebAccessibilityCache.cpp
+++ b/WebKit/chromium/src/WebAccessibilityCache.cpp
@@ -42,4 +42,9 @@ void WebAccessibilityCache::enableAccessibility()
AXObjectCache::enableAccessibility();
}
+bool WebAccessibilityCache::accessibilityEnabled()
+{
+ return AXObjectCache::accessibilityEnabled();
+}
+
}
diff --git a/WebKit/chromium/src/WebBindings.cpp b/WebKit/chromium/src/WebBindings.cpp
index 4bb9022..c25c31b 100644
--- a/WebKit/chromium/src/WebBindings.cpp
+++ b/WebKit/chromium/src/WebBindings.cpp
@@ -312,6 +312,17 @@ static bool getElementImpl(NPObject* npObj, WebElement* webElement)
return true;
}
+static NPObject* makeIntArrayImpl(const WebVector<int>& data)
+{
+ v8::HandleScope handleScope;
+ v8::Handle<v8::Array> result = v8::Array::New(data.size());
+ for (size_t i = 0; i < data.size(); i++)
+ result->Set(i, v8::Number::New(data[i]));
+
+ WebCore::DOMWindow* window = WebCore::V8Proxy::retrieveWindow(WebCore::V8Proxy::currentContext());
+ return npCreateV8ScriptObject(0, result, window);
+}
+
#endif
bool WebBindings::getDragData(NPObject* event, int* eventId, WebDragData* data)
@@ -350,6 +361,16 @@ bool WebBindings::getElement(NPObject* element, WebElement* webElement)
#endif
}
+NPObject* WebBindings::makeIntArray(const WebVector<int> & data)
+{
+#if USE(V8)
+ return makeIntArrayImpl(data);
+#else
+ // Not supported on other ports (JSC, etc.).
+ return 0;
+#endif
+}
+
void WebBindings::pushExceptionHandler(ExceptionHandler handler, void* data)
{
WebCore::pushExceptionHandler(handler, data);
diff --git a/WebKit/chromium/src/WebFileSystemCallbacksImpl.h b/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
index b9c825b..36ab9ff 100644
--- a/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
+++ b/WebKit/chromium/src/WebFileSystemCallbacksImpl.h
@@ -43,7 +43,7 @@ class AsyncFileSystemCallbacks;
namespace WebKit {
struct WebFileInfo;
-class WebFileSystemEntry;
+struct WebFileSystemEntry;
class WebString;
class WebFileSystemCallbacksImpl : public WebFileSystemCallbacks {
diff --git a/WebKit/chromium/src/WebFrameImpl.cpp b/WebKit/chromium/src/WebFrameImpl.cpp
index 2d42f4b..1b64e5a 100644
--- a/WebKit/chromium/src/WebFrameImpl.cpp
+++ b/WebKit/chromium/src/WebFrameImpl.cpp
@@ -99,6 +99,7 @@
#include "HistoryItem.h"
#include "InspectorController.h"
#include "Page.h"
+#include "Performance.h"
#include "PlatformContextSkia.h"
#include "PluginDocument.h"
#include "PrintContext.h"
@@ -109,6 +110,7 @@
#include "ReplaceSelectionCommand.h"
#include "ResourceHandle.h"
#include "ResourceRequest.h"
+#include "SVGSMILElement.h"
#include "ScriptController.h"
#include "ScriptSourceCode.h"
#include "ScriptValue.h"
@@ -130,6 +132,7 @@
#include "WebHistoryItem.h"
#include "WebInputElement.h"
#include "WebPasswordAutocompleteListener.h"
+#include "WebPerformance.h"
#include "WebPlugin.h"
#include "WebPluginContainerImpl.h"
#include "WebRange.h"
@@ -151,7 +154,7 @@
#include "LocalCurrentGraphicsContext.h"
#endif
-#if OS(LINUX)
+#if OS(LINUX) || OS(FREEBSD)
#include <gdk/gdk.h>
#endif
@@ -307,7 +310,7 @@ public:
float scale = m_printedPageWidth / pageRect.width();
ctx.save();
-#if OS(LINUX)
+#if OS(LINUX) || OS(FREEBSD)
ctx.scale(WebCore::FloatSize(scale, scale));
#endif
ctx.translate(static_cast<float>(-pageRect.x()),
@@ -550,7 +553,7 @@ WebSize WebFrameImpl::contentsSize() const
int WebFrameImpl::contentsPreferredWidth() const
{
if (m_frame->document() && m_frame->document()->renderView())
- return m_frame->document()->renderView()->minPrefWidth();
+ return m_frame->document()->renderView()->minPreferredLogicalWidth();
return 0;
}
@@ -692,6 +695,14 @@ WebAnimationController* WebFrameImpl::animationController()
return &m_animationController;
}
+WebPerformance WebFrameImpl::performance() const
+{
+ if (!m_frame || !m_frame->domWindow())
+ return WebPerformance();
+
+ return WebPerformance(m_frame->domWindow()->webkitPerformance());
+}
+
WebSecurityOrigin WebFrameImpl::securityOrigin() const
{
if (!m_frame || !m_frame->document())
@@ -1071,6 +1082,22 @@ WebRange WebFrameImpl::markedRange() const
return frame()->editor()->compositionRange();
}
+bool WebFrameImpl::firstRectForCharacterRange(unsigned location, unsigned length, WebRect& rect) const
+{
+ if ((location + length < location) && (location + length))
+ length = 0;
+
+ Element* selectionRoot = frame()->selection()->rootEditableElement();
+ Element* scope = selectionRoot ? selectionRoot : frame()->document()->documentElement();
+ RefPtr<Range> range = TextIterator::rangeFromLocationAndLength(scope, location, length);
+ if (!range)
+ return false;
+ IntRect intRect = frame()->editor()->firstRectForRange(range.get());
+ rect = WebRect(intRect.x(), intRect.y(), intRect.width(), intRect.height());
+
+ return true;
+}
+
bool WebFrameImpl::executeCommand(const WebString& name)
{
ASSERT(frame());
@@ -1712,6 +1739,26 @@ bool WebFrameImpl::selectionStartHasSpellingMarkerFor(int from, int length) cons
return m_frame->editor()->selectionStartHasSpellingMarkerFor(from, length);
}
+bool WebFrameImpl::pauseSVGAnimation(const WebString& animationId, double time, const WebString& elementId)
+{
+#if !ENABLE(SVG)
+ return false;
+#else
+ if (!m_frame)
+ return false;
+
+ Document* document = m_frame->document();
+ if (!document || !document->svgExtensions())
+ return false;
+
+ Node* coreNode = document->getElementById(animationId);
+ if (!coreNode || !SVGSMILElement::isSMILElement(coreNode))
+ return false;
+
+ return document->accessSVGExtensions()->sampleAnimationAtTime(elementId, static_cast<SVGSMILElement*>(coreNode), time);
+#endif
+}
+
// WebFrameImpl public ---------------------------------------------------------
PassRefPtr<WebFrameImpl> WebFrameImpl::create(WebFrameClient* client)
diff --git a/WebKit/chromium/src/WebFrameImpl.h b/WebKit/chromium/src/WebFrameImpl.h
index 25e7004..d93254b 100644
--- a/WebKit/chromium/src/WebFrameImpl.h
+++ b/WebKit/chromium/src/WebFrameImpl.h
@@ -56,6 +56,7 @@ class WebDataSourceImpl;
class WebInputElement;
class WebFrameClient;
class WebPasswordAutocompleteListener;
+class WebPerformance;
class WebPluginContainerImpl;
class WebView;
class WebViewImpl;
@@ -90,6 +91,7 @@ public:
virtual WebDocument document() const;
virtual void forms(WebVector<WebFormElement>&) const;
virtual WebAnimationController* animationController();
+ virtual WebPerformance performance() const;
virtual WebSecurityOrigin securityOrigin() const;
virtual void grantUniversalAccess();
virtual NPObject* windowObject() const;
@@ -135,6 +137,7 @@ public:
virtual void unmarkText();
virtual bool hasMarkedText() const;
virtual WebRange markedRange() const;
+ virtual bool firstRectForCharacterRange(unsigned location, unsigned length, WebRect&) const;
virtual bool executeCommand(const WebString&);
virtual bool executeCommand(const WebString&, const WebString& value);
virtual bool isCommandEnabled(const WebString&) const;
@@ -183,6 +186,9 @@ public:
virtual WebRect selectionBoundsRect() const;
virtual bool selectionStartHasSpellingMarkerFor(int from, int length) const;
+ virtual bool pauseSVGAnimation(const WebString& animationId,
+ double time,
+ const WebString& elementId);
static PassRefPtr<WebFrameImpl> create(WebFrameClient* client);
~WebFrameImpl();
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index 24dcf9a..45bc2ee 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -38,12 +38,21 @@
#include "app/gfx/gl/gl_context.h"
#include "NotImplemented.h"
#include <wtf/PassOwnPtr.h>
+#include <wtf/text/CString.h>
#include <stdio.h>
#include <string.h>
namespace WebKit {
+enum {
+ IMPLEMENTATION_COLOR_READ_FORMAT = 0x8B9B,
+ IMPLEMENTATION_COLOR_READ_TYPE = 0x8B9A,
+ MAX_VERTEX_UNIFORM_VECTORS = 0x8DFB,
+ MAX_VARYING_VECTORS = 0x8DFC,
+ MAX_FRAGMENT_UNIFORM_VECTORS = 0x8DFD
+};
+
WebGraphicsContext3DDefaultImpl::VertexAttribPointerState::VertexAttribPointerState()
: enabled(false)
, buffer(0)
@@ -69,6 +78,8 @@ WebGraphicsContext3DDefaultImpl::WebGraphicsContext3DDefaultImpl()
, m_scanline(0)
#endif
, m_boundArrayBuffer(0)
+ , m_fragmentCompiler(0)
+ , m_vertexCompiler(0)
{
}
@@ -94,6 +105,8 @@ WebGraphicsContext3DDefaultImpl::~WebGraphicsContext3DDefaultImpl()
glDeleteFramebuffersEXT(1, &m_fbo);
m_glContext->Destroy();
+
+ angleDestroyCompilers();
}
}
@@ -115,15 +128,16 @@ bool WebGraphicsContext3DDefaultImpl::initialize(WebGraphicsContext3D::Attribute
validateAttributes();
glEnable(GL_VERTEX_PROGRAM_POINT_SIZE);
+
+ if (!angleCreateCompilers()) {
+ angleDestroyCompilers();
+ return false;
+ }
+
m_initialized = true;
return true;
}
-bool WebGraphicsContext3DDefaultImpl::initialize(WebGraphicsContext3D::Attributes attributes, WebView* webView)
-{
- return initialize(attributes, webView, false);
-}
-
void WebGraphicsContext3DDefaultImpl::validateAttributes()
{
const char* extensions = reinterpret_cast<const char*>(glGetString(GL_EXTENSIONS));
@@ -657,7 +671,33 @@ DELEGATE_TO_GL_1(clearStencil, ClearStencil, long)
DELEGATE_TO_GL_4(colorMask, ColorMask, bool, bool, bool, bool)
-DELEGATE_TO_GL_1(compileShader, CompileShader, WebGLId)
+void WebGraphicsContext3DDefaultImpl::compileShader(WebGLId shader)
+{
+ makeContextCurrent();
+
+ ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
+ if (result == m_shaderSourceMap.end()) {
+ // Passing down to gl driver to generate the correct error; or the case
+ // where the shader deletion is delayed when it's attached to a program.
+ glCompileShader(shader);
+ return;
+ }
+ ShaderSourceEntry& entry = result->second;
+
+ if (!angleValidateShaderSource(entry))
+ return; // Shader didn't validate, don't move forward with compiling translated source
+
+ int shaderLength = entry.translatedSource ? strlen(entry.translatedSource) : 0;
+ glShaderSource(shader, 1, const_cast<const char**>(&entry.translatedSource), &shaderLength);
+ glCompileShader(shader);
+
+#ifndef NDEBUG
+ int compileStatus;
+ glGetShaderiv(shader, GL_COMPILE_STATUS, &compileStatus);
+ // ASSERT that ANGLE generated GLSL will be accepted by OpenGL
+ ASSERT(compileStatus == GL_TRUE);
+#endif
+}
void WebGraphicsContext3DDefaultImpl::copyTexImage2D(unsigned long target, long level, unsigned long internalformat,
long x, long y, unsigned long width, unsigned long height, long border)
@@ -871,21 +911,21 @@ void WebGraphicsContext3DDefaultImpl::getIntegerv(unsigned long pname, int* valu
// Therefore, the value returned by desktop GL needs to be divided by 4.
makeContextCurrent();
switch (pname) {
- case 0x8B9B: // IMPLEMENTATION_COLOR_READ_FORMAT
+ case IMPLEMENTATION_COLOR_READ_FORMAT:
*value = GL_RGB;
break;
- case 0x8B9A: // IMPLEMENTATION_COLOR_READ_TYPE
+ case IMPLEMENTATION_COLOR_READ_TYPE:
*value = GL_UNSIGNED_BYTE;
break;
- case 0x8DFD: // MAX_FRAGMENT_UNIFORM_VECTORS
+ case MAX_FRAGMENT_UNIFORM_VECTORS:
glGetIntegerv(GL_MAX_FRAGMENT_UNIFORM_COMPONENTS, value);
*value /= 4;
break;
- case 0x8DFB: // MAX_VERTEX_UNIFORM_VECTORS
+ case MAX_VERTEX_UNIFORM_VECTORS:
glGetIntegerv(GL_MAX_VERTEX_UNIFORM_COMPONENTS, value);
*value /= 4;
break;
- case 0x8DFC: // MAX_VARYING_VECTORS
+ case MAX_VARYING_VECTORS:
glGetIntegerv(GL_MAX_VARYING_FLOATS, value);
*value /= 4;
break;
@@ -916,14 +956,57 @@ WebString WebGraphicsContext3DDefaultImpl::getProgramInfoLog(WebGLId program)
DELEGATE_TO_GL_3(getRenderbufferParameteriv, GetRenderbufferParameterivEXT, unsigned long, unsigned long, int*)
-DELEGATE_TO_GL_3(getShaderiv, GetShaderiv, WebGLId, unsigned long, int*)
+void WebGraphicsContext3DDefaultImpl::getShaderiv(WebGLId shader, unsigned long pname, int* value)
+{
+ makeContextCurrent();
+
+ ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
+ if (result != m_shaderSourceMap.end()) {
+ ShaderSourceEntry& entry = result->second;
+ switch (pname) {
+ case GL_COMPILE_STATUS:
+ if (!entry.isValid) {
+ *value = 0;
+ return;
+ }
+ break;
+ case GL_INFO_LOG_LENGTH:
+ if (!entry.isValid) {
+ *value = entry.log ? strlen(entry.log) : 0;
+ if (*value)
+ (*value)++;
+ return;
+ }
+ break;
+ case GL_SHADER_SOURCE_LENGTH:
+ *value = entry.source ? strlen(entry.source) : 0;
+ if (*value)
+ (*value)++;
+ return;
+ }
+ }
+
+ glGetShaderiv(shader, pname, value);
+}
WebString WebGraphicsContext3DDefaultImpl::getShaderInfoLog(WebGLId shader)
{
makeContextCurrent();
- GLint logLength;
+
+ ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
+ if (result != m_shaderSourceMap.end()) {
+ ShaderSourceEntry& entry = result->second;
+ if (!entry.isValid) {
+ if (!entry.log)
+ return WebString();
+ WebString res = WebString::fromUTF8(entry.log, strlen(entry.log));
+ return res;
+ }
+ }
+
+ GLint logLength = 0;
glGetShaderiv(shader, GL_INFO_LOG_LENGTH, &logLength);
- if (!logLength)
+ if (logLength <= 1)
return WebString();
GLchar* log = 0;
if (!tryFastMalloc(logLength * sizeof(GLchar)).getValue(log))
@@ -939,9 +1022,19 @@ WebString WebGraphicsContext3DDefaultImpl::getShaderInfoLog(WebGLId shader)
WebString WebGraphicsContext3DDefaultImpl::getShaderSource(WebGLId shader)
{
makeContextCurrent();
- GLint logLength;
+
+ ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
+ if (result != m_shaderSourceMap.end()) {
+ ShaderSourceEntry& entry = result->second;
+ if (!entry.source)
+ return WebString();
+ WebString res = WebString::fromUTF8(entry.source, strlen(entry.source));
+ return res;
+ }
+
+ GLint logLength = 0;
glGetShaderiv(shader, GL_SHADER_SOURCE_LENGTH, &logLength);
- if (!logLength)
+ if (logLength <= 1)
return WebString();
GLchar* log = 0;
if (!tryFastMalloc(logLength * sizeof(GLchar)).getValue(log))
@@ -1061,8 +1154,19 @@ DELEGATE_TO_GL_4(scissor, Scissor, long, long, unsigned long, unsigned long)
void WebGraphicsContext3DDefaultImpl::shaderSource(WebGLId shader, const char* string)
{
makeContextCurrent();
- GLint length = strlen(string);
- glShaderSource(shader, 1, &string, &length);
+ GLint length = string ? strlen(string) : 0;
+ ShaderSourceMap::iterator result = m_shaderSourceMap.find(shader);
+ if (result != m_shaderSourceMap.end()) {
+ ShaderSourceEntry& entry = result->second;
+ if (entry.source) {
+ fastFree(entry.source);
+ entry.source = 0;
+ }
+ if (!tryFastMalloc((length + 1) * sizeof(char)).getValue(entry.source))
+ return; // FIXME: generate an error?
+ memcpy(entry.source, string, (length + 1) * sizeof(char));
+ } else
+ glShaderSource(shader, 1, &string, &length);
}
DELEGATE_TO_GL_3(stencilFunc, StencilFunc, unsigned long, long, unsigned long)
@@ -1201,7 +1305,18 @@ unsigned WebGraphicsContext3DDefaultImpl::createRenderbuffer()
return o;
}
-DELEGATE_TO_GL_1R(createShader, CreateShader, unsigned long, unsigned);
+unsigned WebGraphicsContext3DDefaultImpl::createShader(unsigned long shaderType)
+{
+ makeContextCurrent();
+ ASSERT(shaderType == GL_VERTEX_SHADER || shaderType == GL_FRAGMENT_SHADER);
+ unsigned shader = glCreateShader(shaderType);
+ if (shader) {
+ ShaderSourceEntry entry;
+ entry.type = shaderType;
+ m_shaderSourceMap.set(shader, entry);
+ }
+ return shader;
+}
unsigned WebGraphicsContext3DDefaultImpl::createTexture()
{
@@ -1239,6 +1354,7 @@ void WebGraphicsContext3DDefaultImpl::deleteShader(unsigned shader)
{
makeContextCurrent();
glDeleteShader(shader);
+ m_shaderSourceMap.remove(shader);
}
void WebGraphicsContext3DDefaultImpl::deleteTexture(unsigned texture)
@@ -1247,6 +1363,92 @@ void WebGraphicsContext3DDefaultImpl::deleteTexture(unsigned texture)
glDeleteTextures(1, &texture);
}
+bool WebGraphicsContext3DDefaultImpl::angleCreateCompilers()
+{
+ if (!ShInitialize())
+ return false;
+
+ TBuiltInResource resource;
+ resource.MaxVertexAttribs = 0;
+ getIntegerv(GL_MAX_VERTEX_ATTRIBS, &resource.MaxVertexAttribs);
+ resource.MaxVertexUniformVectors = 0;
+ getIntegerv(MAX_VERTEX_UNIFORM_VECTORS,
+ &resource.MaxVertexUniformVectors);
+ resource.MaxVaryingVectors = 0;
+ getIntegerv(MAX_VARYING_VECTORS,
+ &resource.MaxVaryingVectors);
+ resource.MaxVertexTextureImageUnits = 0;
+ getIntegerv(GL_MAX_VERTEX_TEXTURE_IMAGE_UNITS, &resource.MaxVertexTextureImageUnits);
+ resource.MaxCombinedTextureImageUnits = 0;
+ getIntegerv(GL_MAX_COMBINED_TEXTURE_IMAGE_UNITS, &resource.MaxCombinedTextureImageUnits);
+ resource.MaxTextureImageUnits = 0;
+ getIntegerv(GL_MAX_TEXTURE_IMAGE_UNITS, &resource.MaxTextureImageUnits);
+ resource.MaxFragmentUniformVectors = 0;
+ getIntegerv(MAX_FRAGMENT_UNIFORM_VECTORS,
+ &resource.MaxFragmentUniformVectors);
+ // Always set to 1 for OpenGL ES.
+ resource.MaxDrawBuffers = 1;
+
+ m_fragmentCompiler = ShConstructCompiler(EShLangFragment, EShSpecWebGL, &resource);
+ m_vertexCompiler = ShConstructCompiler(EShLangVertex, EShSpecWebGL, &resource);
+ return (m_fragmentCompiler && m_vertexCompiler);
+}
+
+void WebGraphicsContext3DDefaultImpl::angleDestroyCompilers()
+{
+ if (m_fragmentCompiler) {
+ ShDestruct(m_fragmentCompiler);
+ m_fragmentCompiler = 0;
+ }
+ if (m_vertexCompiler) {
+ ShDestruct(m_vertexCompiler);
+ m_vertexCompiler = 0;
+ }
+}
+
+bool WebGraphicsContext3DDefaultImpl::angleValidateShaderSource(ShaderSourceEntry& entry)
+{
+ entry.isValid = false;
+ if (entry.translatedSource) {
+ fastFree(entry.translatedSource);
+ entry.translatedSource = 0;
+ }
+ if (entry.log) {
+ fastFree(entry.log);
+ entry.log = 0;
+ }
+
+ ShHandle compiler = 0;
+ switch (entry.type) {
+ case GL_FRAGMENT_SHADER:
+ compiler = m_fragmentCompiler;
+ break;
+ case GL_VERTEX_SHADER:
+ compiler = m_vertexCompiler;
+ break;
+ }
+ if (!compiler)
+ return false;
+
+ if (!ShCompile(compiler, &entry.source, 1, EShOptObjectCode)) {
+ int logSize = 0;
+ ShGetInfo(compiler, SH_INFO_LOG_LENGTH, &logSize);
+ if (logSize > 1 && tryFastMalloc(logSize * sizeof(char)).getValue(entry.log))
+ ShGetInfoLog(compiler, entry.log);
+ return false;
+ }
+
+ int length = 0;
+ ShGetInfo(compiler, SH_OBJECT_CODE_LENGTH, &length);
+ if (length > 1) {
+ if (!tryFastMalloc(length * sizeof(char)).getValue(entry.translatedSource))
+ return false;
+ ShGetObjectCode(compiler, entry.translatedSource);
+ }
+ entry.isValid = true;
+ return true;
+}
+
} // namespace WebKit
#endif // ENABLE(3D_CANVAS)
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
index 5bf439a..319d9d8 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
@@ -33,8 +33,10 @@
#if ENABLE(3D_CANVAS)
+#include "GLSLANG/ShaderLang.h"
#include "WebGraphicsContext3D.h"
+#include <wtf/HashMap.h>
#include <wtf/ListHashSet.h>
#include <wtf/OwnPtr.h>
@@ -60,8 +62,6 @@ public:
//----------------------------------------------------------------------
// WebGraphicsContext3D methods
virtual bool initialize(WebGraphicsContext3D::Attributes attributes, WebView*, bool);
- // FIXME: remove once compositor is switched over to GraphicsContext3D.
- virtual bool initialize(WebGraphicsContext3D::Attributes attributes, WebView*);
virtual bool makeContextCurrent();
virtual int width();
@@ -302,8 +302,7 @@ private:
// need to in order to verify that all enabled vertex arrays have
// a valid buffer bound -- to avoid crashes on certain cards.
unsigned int m_boundArrayBuffer;
- class VertexAttribPointerState {
- public:
+ struct VertexAttribPointerState {
VertexAttribPointerState();
bool enabled;
@@ -325,6 +324,44 @@ private:
ListHashSet<unsigned long> m_syntheticErrors;
OwnPtr<gfx::GLContext> m_glContext;
+
+ // ANGLE related.
+ struct ShaderSourceEntry {
+ ShaderSourceEntry()
+ : type(0)
+ , source(0)
+ , log(0)
+ , translatedSource(0)
+ , isValid(false)
+ {
+ }
+
+ ~ShaderSourceEntry()
+ {
+ if (source)
+ fastFree(source);
+ if (log)
+ fastFree(log);
+ if (translatedSource)
+ fastFree(translatedSource);
+ }
+
+ unsigned long type;
+ char* source;
+ char* log;
+ char* translatedSource;
+ bool isValid;
+ };
+
+ bool angleCreateCompilers();
+ void angleDestroyCompilers();
+ bool angleValidateShaderSource(ShaderSourceEntry& entry);
+
+ typedef HashMap<WebGLId, ShaderSourceEntry> ShaderSourceMap;
+ ShaderSourceMap m_shaderSourceMap;
+
+ ShHandle m_fragmentCompiler;
+ ShHandle m_vertexCompiler;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/GLES2ContextInternal.cpp b/WebKit/chromium/src/WebIDBFactory.cpp
index 33eb602..b186b68 100644..100755
--- a/WebKit/chromium/src/GLES2ContextInternal.cpp
+++ b/WebKit/chromium/src/WebIDBFactory.cpp
@@ -29,24 +29,24 @@
*/
#include "config.h"
+#include "WebIDBFactory.h"
-#include "GLES2ContextInternal.h"
+#if ENABLE(INDEXED_DATABASE)
-#include "WebGLES2Context.h"
+#include "IDBFactoryBackendImpl.h"
+#include "SecurityOrigin.h"
-namespace WebCore {
+using namespace WebCore;
-GLES2ContextInternal::GLES2ContextInternal(WebKit::WebGLES2Context* impl, bool owns)
- : m_impl(impl)
- , m_owns(owns)
-{
-}
+namespace WebKit {
-GLES2ContextInternal::~GLES2ContextInternal()
+WebString WebIDBFactory::databaseFileName(const WebString& name, const WebSecurityOrigin& origin)
{
- if (m_owns)
- delete m_impl;
+ RefPtr<SecurityOrigin> securityOrigin;
+ securityOrigin = origin;
+ return IDBFactoryBackendImpl::databaseFileName(name, securityOrigin.get());
}
-} // namespace WebCore
+}
+#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/WebIDBFactoryImpl.cpp b/WebKit/chromium/src/WebIDBFactoryImpl.cpp
index 3c8d459..7147cf0 100755
--- a/WebKit/chromium/src/WebIDBFactoryImpl.cpp
+++ b/WebKit/chromium/src/WebIDBFactoryImpl.cpp
@@ -63,15 +63,6 @@ void WebIDBFactoryImpl::open(const WebString& name, const WebString& description
m_idbFactoryBackend->open(name, description, IDBCallbacksProxy::create(callbacks), origin, 0, dataDir);
}
-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 4dc0a10..a0a4d7d 100755
--- a/WebKit/chromium/src/WebIDBFactoryImpl.h
+++ b/WebKit/chromium/src/WebIDBFactoryImpl.h
@@ -43,7 +43,6 @@ public:
virtual ~WebIDBFactoryImpl();
virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks*, const WebSecurityOrigin&, WebFrame*, const WebString& dataDir);
- virtual void abortPendingTransactions(const WebVector<int>& pendingIDs);
private:
WTF::RefPtr<WebCore::IDBFactoryBackendInterface> m_idbFactoryBackend;
diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
index 1ad1d9f..36d8ace 100755
--- a/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
+++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.cpp
@@ -33,6 +33,7 @@
#include "WebIDBIndexImpl.h"
#include "WebIDBKey.h"
#include "WebIDBKeyRange.h"
+#include "WebIDBTransaction.h"
#include "WebSerializedScriptValue.h"
#if ENABLE(INDEXED_DATABASE)
@@ -65,9 +66,9 @@ WebDOMStringList WebIDBObjectStoreImpl::indexNames() const
return m_objectStore->indexNames();
}
-void WebIDBObjectStoreImpl::get(const WebIDBKey& key, WebIDBCallbacks* callbacks)
+void WebIDBObjectStoreImpl::get(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction)
{
- m_objectStore->get(key, IDBCallbacksProxy::create(callbacks));
+ m_objectStore->get(key, IDBCallbacksProxy::create(callbacks), transaction.getIDBTransactionBackendInterface());
}
void WebIDBObjectStoreImpl::put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks* callbacks)
diff --git a/WebKit/chromium/src/WebIDBObjectStoreImpl.h b/WebKit/chromium/src/WebIDBObjectStoreImpl.h
index 9f31369..a9f1200 100755
--- a/WebKit/chromium/src/WebIDBObjectStoreImpl.h
+++ b/WebKit/chromium/src/WebIDBObjectStoreImpl.h
@@ -47,7 +47,7 @@ public:
WebString keyPath() const;
WebDOMStringList indexNames() const;
- void get(const WebIDBKey& key, WebIDBCallbacks*);
+ void get(const WebIDBKey& key, WebIDBCallbacks*, const WebIDBTransaction&);
void put(const WebSerializedScriptValue& value, const WebIDBKey& key, bool addOnly, WebIDBCallbacks*);
void remove(const WebIDBKey& key, WebIDBCallbacks*);
diff --git a/WebKit/chromium/src/WebIDBTransactionImpl.cpp b/WebKit/chromium/src/WebIDBTransactionImpl.cpp
index 0dc9702..f5d8748 100644
--- a/WebKit/chromium/src/WebIDBTransactionImpl.cpp
+++ b/WebKit/chromium/src/WebIDBTransactionImpl.cpp
@@ -64,6 +64,11 @@ void WebIDBTransactionImpl::abort()
m_backend->abort();
}
+void WebIDBTransactionImpl::didCompleteTaskEvents()
+{
+ m_backend->didCompleteTaskEvents();
+}
+
int WebIDBTransactionImpl::id() const
{
return m_backend->id();
@@ -75,6 +80,11 @@ void WebIDBTransactionImpl::setCallbacks(WebIDBTransactionCallbacks* callbacks)
m_backend->setCallbacks(idbCallbacks.get());
}
+IDBTransactionBackendInterface* WebIDBTransactionImpl::getIDBTransactionBackendInterface() const
+{
+ return m_backend.get();
+}
+
} // namespace WebKit
#endif // ENABLE(INDEXED_DATABASE)
diff --git a/WebKit/chromium/src/WebIDBTransactionImpl.h b/WebKit/chromium/src/WebIDBTransactionImpl.h
index a9bde68..24bab91 100644
--- a/WebKit/chromium/src/WebIDBTransactionImpl.h
+++ b/WebKit/chromium/src/WebIDBTransactionImpl.h
@@ -33,8 +33,6 @@
#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.
@@ -46,9 +44,12 @@ public:
virtual int mode() const;
virtual WebIDBObjectStore* objectStore(const WebString& name);
virtual void abort();
+ virtual void didCompleteTaskEvents();
virtual int id() const;
virtual void setCallbacks(WebIDBTransactionCallbacks*);
+ virtual WebCore::IDBTransactionBackendInterface* getIDBTransactionBackendInterface() const;
+
private:
WTF::RefPtr<WebCore::IDBTransactionBackendInterface> m_backend;
};
diff --git a/WebKit/chromium/src/WebInputElement.cpp b/WebKit/chromium/src/WebInputElement.cpp
index 25d484c..7779dbc 100644
--- a/WebKit/chromium/src/WebInputElement.cpp
+++ b/WebKit/chromium/src/WebInputElement.cpp
@@ -75,11 +75,6 @@ bool WebInputElement::isEnabledFormControl() const
return constUnwrap<HTMLInputElement>()->isEnabledFormControl();
}
-WebInputElement::InputType WebInputElement::inputType() const
-{
- return static_cast<InputType>(constUnwrap<HTMLInputElement>()->deprecatedInputType());
-}
-
int WebInputElement::maxLength() const
{
return constUnwrap<HTMLInputElement>()->maxLength();
diff --git a/WebKit/chromium/src/WebPerformance.cpp b/WebKit/chromium/src/WebPerformance.cpp
new file mode 100644
index 0000000..f019793
--- /dev/null
+++ b/WebKit/chromium/src/WebPerformance.cpp
@@ -0,0 +1,160 @@
+/*
+ * 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 "WebPerformance.h"
+
+#include "Performance.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebPerformance::reset()
+{
+ m_private.reset();
+}
+
+void WebPerformance::assign(const WebPerformance& other)
+{
+ m_private = other.m_private;
+}
+
+WebNavigationType WebPerformance::navigationType() const
+{
+ switch (m_private->navigation()->type()) {
+ case Navigation::NAVIGATE:
+ return WebNavigationTypeOther;
+ case Navigation::RELOAD:
+ return WebNavigationTypeReload;
+ case Navigation::BACK_FORWARD:
+ return WebNavigationTypeBackForward;
+ }
+ ASSERT_NOT_REACHED();
+ return WebNavigationTypeOther;
+}
+
+double WebPerformance::navigationStart() const
+{
+ return static_cast<double>(m_private->timing()->navigationStart());
+}
+
+double WebPerformance::unloadEventEnd() const
+{
+ return static_cast<double>(m_private->timing()->unloadEventEnd());
+}
+
+double WebPerformance::redirectStart() const
+{
+ return static_cast<double>(m_private->timing()->redirectStart());
+}
+
+double WebPerformance::redirectEnd() const
+{
+ return static_cast<double>(m_private->timing()->redirectEnd());
+}
+
+unsigned short WebPerformance::redirectCount() const
+{
+ return m_private->navigation()->redirectCount();
+}
+
+double WebPerformance::fetchStart() const
+{
+ return static_cast<double>(m_private->timing()->fetchStart());
+}
+
+double WebPerformance::domainLookupStart() const
+{
+ return static_cast<double>(m_private->timing()->domainLookupStart());
+}
+
+double WebPerformance::domainLookupEnd() const
+{
+ return static_cast<double>(m_private->timing()->domainLookupEnd());
+}
+
+double WebPerformance::connectStart() const
+{
+ return static_cast<double>(m_private->timing()->connectStart());
+}
+
+double WebPerformance::connectEnd() const
+{
+ return static_cast<double>(m_private->timing()->connectEnd());
+}
+
+double WebPerformance::requestStart() const
+{
+ return static_cast<double>(m_private->timing()->requestStart());
+}
+
+double WebPerformance::requestEnd() const
+{
+ return static_cast<double>(m_private->timing()->requestEnd());
+}
+
+double WebPerformance::responseStart() const
+{
+ return static_cast<double>(m_private->timing()->responseStart());
+}
+
+double WebPerformance::responseEnd() const
+{
+ return static_cast<double>(m_private->timing()->responseEnd());
+}
+
+double WebPerformance::loadEventStart() const
+{
+ return static_cast<double>(m_private->timing()->loadEventStart());
+}
+
+double WebPerformance::loadEventEnd() const
+{
+ return static_cast<double>(m_private->timing()->loadEventEnd());
+}
+
+WebPerformance::WebPerformance(const PassRefPtr<Performance>& performance)
+ : m_private(performance)
+{
+}
+
+WebPerformance& WebPerformance::operator=(const PassRefPtr<Performance>& performance)
+{
+ m_private = performance;
+ return *this;
+}
+
+WebPerformance::operator PassRefPtr<Performance>() const
+{
+ return m_private.get();
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebScriptController.cpp b/WebKit/chromium/src/WebScriptController.cpp
index d2c168d..8877ba0 100644
--- a/WebKit/chromium/src/WebScriptController.cpp
+++ b/WebKit/chromium/src/WebScriptController.cpp
@@ -43,7 +43,7 @@ namespace WebKit {
void WebScriptController::registerExtension(v8::Extension* extension)
{
- V8Proxy::registerExtension(extension, WebString());
+ V8Proxy::registerExtension(extension);
}
void WebScriptController::registerExtension(v8::Extension* extension,
diff --git a/WebKit/chromium/src/WebSettingsImpl.cpp b/WebKit/chromium/src/WebSettingsImpl.cpp
index 329027c..9953b5c 100644
--- a/WebKit/chromium/src/WebSettingsImpl.cpp
+++ b/WebKit/chromium/src/WebSettingsImpl.cpp
@@ -289,4 +289,14 @@ void WebSettingsImpl::setMemoryInfoEnabled(bool enabled)
m_settings->setMemoryInfoEnabled(enabled);
}
+void WebSettingsImpl::setHyperlinkAuditingEnabled(bool enabled)
+{
+ m_settings->setHyperlinkAuditingEnabled(enabled);
+}
+
+void WebSettingsImpl::setCaretBrowsingEnabled(bool enabled)
+{
+ m_settings->setCaretBrowsingEnabled(enabled);
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebSettingsImpl.h b/WebKit/chromium/src/WebSettingsImpl.h
index 0120dbc..6d40b4f 100644
--- a/WebKit/chromium/src/WebSettingsImpl.h
+++ b/WebKit/chromium/src/WebSettingsImpl.h
@@ -89,6 +89,8 @@ public:
virtual void setAcceleratedCompositingEnabled(bool);
virtual void setAccelerated2dCanvasEnabled(bool);
virtual void setMemoryInfoEnabled(bool);
+ virtual void setHyperlinkAuditingEnabled(bool);
+ virtual void setCaretBrowsingEnabled(bool);
private:
WebCore::Settings* m_settings;
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index a1c6578..c3df0c7 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -125,7 +125,7 @@
#if OS(WINDOWS)
#include "RenderThemeChromiumWin.h"
#else
-#if OS(LINUX)
+#if OS(LINUX) || OS(FREEBSD)
#include "RenderThemeChromiumLinux.h"
#endif
#include "RenderTheme.h"
@@ -429,7 +429,7 @@ void WebViewImpl::mouseDown(const WebMouseEvent& event)
|| (event.button == WebMouseEvent::ButtonLeft
&& event.modifiers & WebMouseEvent::ControlKey))
mouseContextMenu(event);
-#elif OS(LINUX)
+#elif OS(LINUX) || OS(FREEBSD)
if (event.button == WebMouseEvent::ButtonRight)
mouseContextMenu(event);
#endif
@@ -468,7 +468,7 @@ void WebViewImpl::mouseUp(const WebMouseEvent& event)
if (!mainFrameImpl() || !mainFrameImpl()->frameView())
return;
-#if OS(LINUX)
+#if OS(LINUX) || OS(FREEBSD)
// If the event was a middle click, attempt to copy text into the focused
// frame. We execute this before we let the page have a go at the event
// because the page may change what is focused during in its event handler.
@@ -552,11 +552,11 @@ bool WebViewImpl::keyEvent(const WebKeyboardEvent& event)
if (!handler)
return keyEventDefault(event);
-#if OS(WINDOWS) || OS(LINUX)
+#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD)
const WebInputEvent::Type contextMenuTriggeringEventType =
#if OS(WINDOWS)
WebInputEvent::KeyUp;
-#elif OS(LINUX)
+#elif OS(LINUX) || OS(FREEBSD)
WebInputEvent::RawKeyDown;
#endif
@@ -700,7 +700,7 @@ bool WebViewImpl::touchEvent(const WebTouchEvent& event)
}
#endif
-#if OS(WINDOWS) || OS(LINUX)
+#if OS(WINDOWS) || OS(LINUX) || OS(FREEBSD)
// Mac has no way to open a context menu based on a keyboard event.
bool WebViewImpl::sendContextMenuEvent(const WebKeyboardEvent& event)
{
@@ -925,7 +925,7 @@ void WebViewImpl::resize(const WebSize& newSize)
m_client->didInvalidateRect(damagedRect);
}
-#if OS(DARWIN)
+#if USE(ACCELERATED_COMPOSITING) && OS(DARWIN)
if (m_layerRenderer) {
m_layerRenderer->resizeOnscreenContent(WebCore::IntSize(std::max(1, m_size.width),
std::max(1, m_size.height)));
@@ -1041,8 +1041,6 @@ void WebViewImpl::composite(bool finish)
#endif
}
-// FIXME: m_currentInputEvent should be removed once ChromeClient::show() can
-// get the current-event information from WebCore.
const WebInputEvent* WebViewImpl::m_currentInputEvent = 0;
bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
@@ -1057,6 +1055,8 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
if (m_ignoreInputEvents)
return true;
+ m_currentInputEvent = &inputEvent;
+
if (m_mouseCaptureNode.get() && WebInputEvent::isMouseEventType(inputEvent.type)) {
// Save m_mouseCaptureNode since mouseCaptureLost() will clear it.
RefPtr<Node> node = m_mouseCaptureNode;
@@ -1086,17 +1086,10 @@ bool WebViewImpl::handleInputEvent(const WebInputEvent& inputEvent)
node->dispatchMouseEvent(
PlatformMouseEventBuilder(mainFrameImpl()->frameView(), *static_cast<const WebMouseEvent*>(&inputEvent)),
eventType);
+ m_currentInputEvent = 0;
return true;
}
- // FIXME: Remove m_currentInputEvent.
- // This only exists to allow ChromeClient::show() to know which mouse button
- // triggered a window.open event.
- // Safari must perform a similar hack, ours is in our WebKit glue layer
- // theirs is in the application. This should go when WebCore can be fixed
- // to pass more event information to ChromeClient::show()
- m_currentInputEvent = &inputEvent;
-
bool handled = true;
// FIXME: WebKit seems to always return false on mouse events processing
@@ -1984,7 +1977,7 @@ void WebViewImpl::setDomainRelaxationForbidden(bool forbidden, const WebString&
void WebViewImpl::setScrollbarColors(unsigned inactiveColor,
unsigned activeColor,
unsigned trackColor) {
-#if OS(LINUX)
+#if OS(LINUX) || OS(FREEBSD)
PlatformThemeChromiumGtk::setScrollbarColors(inactiveColor,
activeColor,
trackColor);
@@ -1995,7 +1988,7 @@ void WebViewImpl::setSelectionColors(unsigned activeBackgroundColor,
unsigned activeForegroundColor,
unsigned inactiveBackgroundColor,
unsigned inactiveForegroundColor) {
-#if OS(LINUX)
+#if OS(LINUX) || OS(FREEBSD)
RenderThemeChromiumLinux::setSelectionColors(activeBackgroundColor,
activeForegroundColor,
inactiveBackgroundColor,
@@ -2022,7 +2015,8 @@ void WebView::addUserScript(const WebString& sourceCode,
void WebView::addUserStyleSheet(const WebString& sourceCode,
const WebVector<WebString>& patternsIn,
- WebView::UserContentInjectIn injectIn)
+ WebView::UserContentInjectIn injectIn,
+ WebView::UserStyleInjectionTime injectionTime)
{
OwnPtr<Vector<String> > patterns(new Vector<String>);
for (size_t i = 0; i < patternsIn.size(); ++i)
@@ -2037,7 +2031,8 @@ void WebView::addUserStyleSheet(const WebString& sourceCode,
// FIXME: It would be nice to populate the URL correctly, instead of passing an empty URL.
pageGroup->addUserStyleSheetToWorld(world.get(), sourceCode, WebURL(), patterns.release(), 0,
static_cast<UserContentInjectedFrames>(injectIn),
- UserStyleSheet::AuthorLevel);
+ UserStyleAuthorLevel,
+ static_cast<WebCore::UserStyleInjectionTime>(injectionTime));
}
void WebView::removeAllUserContent()
@@ -2206,8 +2201,6 @@ void WebViewImpl::setRootGraphicsLayer(WebCore::PlatformLayer* layer)
void WebViewImpl::setRootLayerNeedsDisplay()
{
- if (m_layerRenderer)
- m_layerRenderer->setNeedsDisplay();
m_client->scheduleComposite();
// FIXME: To avoid breaking the downstream Chrome render_widget while downstream
// changes land, we also have to pass a 1x1 invalidate up to the client
@@ -2247,7 +2240,7 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect&
// rects allows us to intermix invalidates with scrolls.
IntRect damagedContentsRect;
if (scrollDelta.width()) {
- float dx = static_cast<float>(scrollDelta.width());
+ int dx = scrollDelta.width();
damagedContentsRect.setY(contentRect.y());
damagedContentsRect.setHeight(contentRect.height());
if (dx > 0) {
@@ -2258,7 +2251,7 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect&
damagedContentsRect.setWidth(-dx);
}
} else {
- float dy = static_cast<float>(scrollDelta.height());
+ int dy = scrollDelta.height();
damagedContentsRect.setX(contentRect.x());
damagedContentsRect.setWidth(contentRect.width());
if (dy > 0) {
@@ -2270,7 +2263,7 @@ void WebViewImpl::scrollRootLayerRect(const IntSize& scrollDelta, const IntRect&
}
}
- m_scrollDamage.unite(damagedContentsRect);
+ m_rootLayerScrollDamage.unite(damagedContentsRect);
setRootLayerNeedsDisplay();
}
@@ -2289,10 +2282,12 @@ void WebViewImpl::invalidateRootLayerRect(const IntRect& rect)
// rect is in viewport space. Convert to content space
// so that invalidations and scroll invalidations play well with one-another.
- FloatRect contentRect = view->windowToContents(rect);
+ IntRect contentRect = view->windowToContents(rect);
- // FIXME: add a smarter damage aggregation logic? Right now, LayerChromium does simple union-ing.
- m_layerRenderer->rootLayer()->setNeedsDisplay(contentRect);
+ // FIXME: add a smarter damage aggregation logic and/or unify with
+ // LayerChromium's damage logic
+ m_rootLayerDirtyRect.unite(contentRect);
+ setRootLayerNeedsDisplay();
}
@@ -2301,23 +2296,29 @@ void WebViewImpl::setIsAcceleratedCompositingActive(bool active)
if (m_isAcceleratedCompositingActive == active)
return;
- if (active) {
- OwnPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release();
- if (!context) {
- context = GraphicsContext3D::create(GraphicsContext3D::Attributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
- if (context)
- context->reshape(std::max(1, m_size.width), std::max(1, m_size.height));
- }
- m_layerRenderer = LayerRendererChromium::create(context.release());
- if (m_layerRenderer) {
- m_isAcceleratedCompositingActive = true;
- } else {
- m_isAcceleratedCompositingActive = false;
- m_compositorCreationFailed = true;
- }
+ if (!active) {
+ m_isAcceleratedCompositingActive = false;
+ return;
+ }
+
+ if (m_layerRenderer) {
+ m_isAcceleratedCompositingActive = true;
+ return;
+ }
+
+ OwnPtr<GraphicsContext3D> context = m_temporaryOnscreenGraphicsContext3D.release();
+ if (!context) {
+ context = GraphicsContext3D::create(GraphicsContext3D::Attributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
+ if (context)
+ context->reshape(std::max(1, m_size.width), std::max(1, m_size.height));
+ }
+ m_layerRenderer = LayerRendererChromium::create(context.release());
+ if (m_layerRenderer) {
+ m_isAcceleratedCompositingActive = true;
+ m_compositorCreationFailed = false;
} else {
- m_layerRenderer = 0;
m_isAcceleratedCompositingActive = false;
+ m_compositorCreationFailed = true;
}
}
@@ -2391,14 +2392,14 @@ void WebViewImpl::doComposite()
m_layerRenderer->prepareToDrawLayers(visibleRect, contentRect, IntPoint(view->scrollX(), view->scrollY()));
// Draw the contents of the root layer.
- Vector<FloatRect> damageRects;
- damageRects.append(m_scrollDamage);
- damageRects.append(m_layerRenderer->rootLayer()->dirtyRect());
+ Vector<IntRect> damageRects;
+ damageRects.append(m_rootLayerScrollDamage);
+ damageRects.append(m_rootLayerDirtyRect);
for (size_t i = 0; i < damageRects.size(); ++i) {
// The damage rect for the root layer is in content space [e.g. unscrolled].
// Convert from content space to viewPort space.
- const FloatRect damagedContentRect = damageRects[i];
- IntRect damagedRect = view->contentsToWindow(IntRect(damagedContentRect));
+ const IntRect damagedContentRect = damageRects[i];
+ IntRect damagedRect = view->contentsToWindow(damagedContentRect);
// Intersect this rectangle with the viewPort.
damagedRect.intersect(viewPort);
@@ -2409,8 +2410,8 @@ void WebViewImpl::doComposite()
m_layerRenderer->updateRootLayerTextureRect(damagedRect);
}
}
- m_layerRenderer->rootLayer()->resetNeedsDisplay();
- m_scrollDamage = WebRect();
+ m_rootLayerDirtyRect = IntRect();
+ m_rootLayerScrollDamage = IntRect();
// Draw the actual layers...
m_layerRenderer->drawLayers(visibleRect, contentRect);
@@ -2431,32 +2432,28 @@ SharedGraphicsContext3D* WebViewImpl::getSharedGraphicsContext3D()
return m_sharedContext3D.get();
}
-WebGLES2Context* WebViewImpl::gles2Context()
-{
- return 0;
-}
-
WebGraphicsContext3D* WebViewImpl::graphicsContext3D()
{
#if USE(ACCELERATED_COMPOSITING)
- GraphicsContext3D* context = 0;
- if (m_layerRenderer)
- context = m_layerRenderer->context();
- else if (m_temporaryOnscreenGraphicsContext3D)
- context = m_temporaryOnscreenGraphicsContext3D.get();
- else {
- GraphicsContext3D::Attributes attributes;
- m_temporaryOnscreenGraphicsContext3D = GraphicsContext3D::create(GraphicsContext3D::Attributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
+ if (m_page->settings()->acceleratedCompositingEnabled() && allowsAcceleratedCompositing()) {
+ GraphicsContext3D* context = 0;
+ if (m_layerRenderer)
+ context = m_layerRenderer->context();
+ else if (m_temporaryOnscreenGraphicsContext3D)
+ context = m_temporaryOnscreenGraphicsContext3D.get();
+ else {
+ GraphicsContext3D::Attributes attributes;
+ m_temporaryOnscreenGraphicsContext3D = GraphicsContext3D::create(GraphicsContext3D::Attributes(), m_page->chrome(), GraphicsContext3D::RenderDirectlyToHostWindow);
#if OS(DARWIN)
- if (m_temporaryOnscreenGraphicsContext3D)
- m_temporaryOnscreenGraphicsContext3D->reshape(std::max(1, m_size.width), std::max(1, m_size.height));
+ if (m_temporaryOnscreenGraphicsContext3D)
+ m_temporaryOnscreenGraphicsContext3D->reshape(std::max(1, m_size.width), std::max(1, m_size.height));
#endif
- context = m_temporaryOnscreenGraphicsContext3D.get();
+ context = m_temporaryOnscreenGraphicsContext3D.get();
+ }
+ return GraphicsContext3DInternal::extractWebGraphicsContext3D(context);
}
- return GraphicsContext3DInternal::extractWebGraphicsContext3D(context);
-#else
- return 0;
#endif
+ return 0;
}
} // namespace WebKit
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index bbd25a2..9db914d 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -317,9 +317,8 @@ public:
void hideAutoFillPopup();
- // HACK: currentInputEvent() is for ChromeClientImpl::show(), until we can
- // fix WebKit to pass enough information up into ChromeClient::show() so we
- // can decide if the window.open event was caused by a middle-mouse click
+ // Returns the input event we're currently processing. This is used in some
+ // cases where the WebCore DOM event doesn't have the information we need.
static const WebInputEvent* currentInputEvent()
{
return m_currentInputEvent;
@@ -332,9 +331,6 @@ public:
void scrollRootLayerRect(const WebCore::IntSize& scrollDelta, const WebCore::IntRect& clipRect);
void invalidateRootLayerRect(const WebCore::IntRect&);
#endif
- // FIXME: remove this method once the compositor is fully switched
- // over to GraphicsContext3D.
- virtual WebGLES2Context* gles2Context();
// Returns the onscreen 3D context used by the compositor. This is
// used by the renderer's code to set up resource sharing between
@@ -526,8 +522,9 @@ private:
RefPtr<WebCore::Node> m_mouseCaptureNode;
#if USE(ACCELERATED_COMPOSITING)
- WebCore::IntRect m_scrollDamage;
- OwnPtr<WebCore::LayerRendererChromium> m_layerRenderer;
+ WebCore::IntRect m_rootLayerDirtyRect;
+ WebCore::IntRect m_rootLayerScrollDamage;
+ RefPtr<WebCore::LayerRendererChromium> m_layerRenderer;
bool m_isAcceleratedCompositingActive;
bool m_compositorCreationFailed;
#endif
diff --git a/WebKit/chromium/src/WebWorkerBase.cpp b/WebKit/chromium/src/WebWorkerBase.cpp
index 42f41d2..622f5c2 100644
--- a/WebKit/chromium/src/WebWorkerBase.cpp
+++ b/WebKit/chromium/src/WebWorkerBase.cpp
@@ -37,6 +37,7 @@
#include "PlatformMessagePortChannel.h"
#include "WebDataSourceImpl.h"
+#include "WebFileError.h"
#include "WebFrameClient.h"
#include "WebFrameImpl.h"
#include "WebMessagePortChannel.h"
@@ -45,6 +46,8 @@
#include "WebView.h"
#include "WebWorkerClient.h"
+#include "WorkerContext.h"
+#include "WorkerFileSystemCallbacksBridge.h"
#include "WorkerScriptController.h"
#include "WorkerThread.h"
#include <wtf/MainThread.h>
@@ -56,6 +59,7 @@ namespace WebKit {
#if ENABLE(WORKERS)
static const char allowDatabaseMode[] = "allowDatabaseMode";
+static const char openFileSystemMode[] = "openFileSystemMode";
namespace {
@@ -114,6 +118,7 @@ private:
WebWorkerBase* m_worker;
WTF::String m_mode;
};
+
}
// This function is called on the main thread to force to initialize some static
@@ -231,6 +236,17 @@ bool WebWorkerBase::allowDatabase(WebFrame*, const WebString& name, const WebStr
return bridge->result();
}
+#if ENABLE(FILE_SYSTEM)
+void WebWorkerBase::openFileSystem(WebFileSystem::Type type, long long size, WebFileSystemCallbacks* callbacks)
+{
+ WorkerScriptController* controller = WorkerScriptController::controllerForContext();
+ WorkerContext* workerContext = controller->workerContext();
+
+ RefPtr<WorkerFileSystemCallbacksBridge> bridge = WorkerFileSystemCallbacksBridge::create(this, workerContext, callbacks);
+ bridge->postOpenFileSystemToMainThread(commonClient(), type, size, openFileSystemMode);
+}
+#endif
+
// WorkerObjectProxy -----------------------------------------------------------
void WebWorkerBase::postMessageToWorkerObject(PassRefPtr<SerializedScriptValue> message,
diff --git a/WebKit/chromium/src/WebWorkerBase.h b/WebKit/chromium/src/WebWorkerBase.h
index 22711f9..1f4bc03 100644
--- a/WebKit/chromium/src/WebWorkerBase.h
+++ b/WebKit/chromium/src/WebWorkerBase.h
@@ -91,6 +91,11 @@ public:
// Controls whether access to Web Databases is allowed for this worker.
virtual bool allowDatabase(WebFrame*, const WebString& name, const WebString& displayName, unsigned long estimatedSize);
+#if ENABLE(FILE_SYSTEM)
+ // Requests to open a file system for this worker. (Note that this is not the implementation for WebFrameClient::openFileSystem.)
+ void openFileSystem(WebFileSystem::Type, long long size, WebFileSystemCallbacks*);
+#endif
+
// Executes the given task on the main thread.
static void dispatchTaskToMainThread(PassOwnPtr<WebCore::ScriptExecutionContext::Task>);
diff --git a/WebKit/chromium/src/WebWorkerClientImpl.h b/WebKit/chromium/src/WebWorkerClientImpl.h
index 741d606..0604823 100644
--- a/WebKit/chromium/src/WebWorkerClientImpl.h
+++ b/WebKit/chromium/src/WebWorkerClientImpl.h
@@ -33,8 +33,8 @@
#if ENABLE(WORKERS)
+#include "WebFileSystem.h"
#include "WebWorkerClient.h"
-
#include "WorkerContextProxy.h"
#include <wtf/PassOwnPtr.h>
#include <wtf/RefPtr.h>
@@ -99,6 +99,10 @@ public:
ASSERT_NOT_REACHED();
return true;
}
+ virtual void openFileSystem(WebFrame*, WebFileSystem::Type, long long size, WebFileSystemCallbacks*)
+ {
+ ASSERT_NOT_REACHED();
+ }
private:
virtual ~WebWorkerClientImpl();
diff --git a/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp
new file mode 100644
index 0000000..d112886
--- /dev/null
+++ b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.cpp
@@ -0,0 +1,190 @@
+/*
+ * 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 "WorkerFileSystemCallbacksBridge.h"
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "CrossThreadTask.h"
+#include "WebCommonWorkerClient.h"
+#include "WebFileSystemCallbacks.h"
+#include "WebString.h"
+#include "WebWorkerBase.h"
+#include "WorkerContext.h"
+#include "WorkerScriptController.h"
+#include "WorkerThread.h"
+#include <wtf/MainThread.h>
+#include <wtf/Threading.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+// FileSystemCallbacks that are to be dispatched on the main thread.
+class MainThreadFileSystemCallbacks : public WebFileSystemCallbacks {
+public:
+ static PassOwnPtr<MainThreadFileSystemCallbacks> create(PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, const String& mode)
+ {
+ return adoptPtr(new MainThreadFileSystemCallbacks(bridge, mode));
+ }
+
+ virtual ~MainThreadFileSystemCallbacks()
+ {
+ }
+
+ virtual void didOpenFileSystem(const WebString& name, const WebString& path)
+ {
+ m_bridge->didOpenFileSystemOnMainThread(name, path, m_mode);
+ delete this;
+ }
+
+ virtual void didFail(WebFileError error)
+ {
+ m_bridge->didFailOnMainThread(error, m_mode);
+ delete this;
+ }
+
+ virtual void didSucceed()
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ }
+
+ virtual void didReadMetadata(const WebFileInfo& info)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ }
+
+ virtual void didReadDirectory(const WebVector<WebFileSystemEntry>& entries, bool hasMore)
+ {
+ WEBKIT_ASSERT_NOT_REACHED();
+ }
+
+private:
+ MainThreadFileSystemCallbacks(PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, const String& mode)
+ : m_bridge(bridge)
+ , m_mode(mode)
+ {
+ ASSERT(m_bridge.get());
+ }
+
+ friend class WorkerFileSystemCallbacksBridge;
+ RefPtr<WorkerFileSystemCallbacksBridge> m_bridge;
+ const String m_mode;
+};
+
+void WorkerFileSystemCallbacksBridge::stop()
+{
+ ASSERT(m_workerContext->isContextThread());
+ MutexLocker locker(m_mutex);
+ m_worker = 0;
+
+ if (m_callbacksOnWorkerThread) {
+ m_callbacksOnWorkerThread->didFail(WebFileErrorAbort);
+ m_callbacksOnWorkerThread = 0;
+ }
+}
+
+void WorkerFileSystemCallbacksBridge::postOpenFileSystemToMainThread(WebCommonWorkerClient* commonClient, WebFileSystem::Type type, long long size, const String& mode)
+{
+ m_selfRef = this;
+ ASSERT(m_workerContext->isContextThread());
+ ASSERT(m_worker);
+ m_worker->dispatchTaskToMainThread(createCallbackTask(&openFileSystemOnMainThread, commonClient, type, size, this, mode));
+}
+
+void WorkerFileSystemCallbacksBridge::openFileSystemOnMainThread(ScriptExecutionContext*, WebCommonWorkerClient* commonClient, WebFileSystem::Type type, long long size, WorkerFileSystemCallbacksBridge* bridge, const String& mode)
+{
+ ASSERT(isMainThread());
+ if (!commonClient)
+ bridge->didFailOnMainThread(WebFileErrorAbort, mode);
+ else {
+ // MainThreadFileSystemCallbacks is self-destructed, so we leak ptr here.
+ commonClient->openFileSystem(type, size, MainThreadFileSystemCallbacks::create(bridge, mode).leakPtr());
+ }
+}
+
+void WorkerFileSystemCallbacksBridge::didFailOnMainThread(WebFileError error, const String& mode)
+{
+ ASSERT(isMainThread());
+ mayPostTaskToWorker(createCallbackTask(&didFailOnWorkerThread, m_selfRef, error), mode);
+}
+
+void WorkerFileSystemCallbacksBridge::didOpenFileSystemOnMainThread(const String& name, const String& rootPath, const String& mode)
+{
+ ASSERT(isMainThread());
+ mayPostTaskToWorker(createCallbackTask(&didOpenFileSystemOnWorkerThread, m_selfRef, name, rootPath), mode);
+}
+
+WorkerFileSystemCallbacksBridge::WorkerFileSystemCallbacksBridge(WebWorkerBase* worker, ScriptExecutionContext* scriptExecutionContext, WebFileSystemCallbacks* callbacks)
+ : WorkerContext::Observer(static_cast<WorkerContext*>(scriptExecutionContext))
+ , m_worker(worker)
+ , m_workerContext(scriptExecutionContext)
+ , m_callbacksOnWorkerThread(callbacks)
+{
+ ASSERT(m_workerContext->isContextThread());
+}
+
+WorkerFileSystemCallbacksBridge::~WorkerFileSystemCallbacksBridge()
+{
+ ASSERT(!m_callbacksOnWorkerThread);
+}
+
+void WorkerFileSystemCallbacksBridge::didFailOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, WebFileError error)
+{
+ if (bridge->m_callbacksOnWorkerThread) {
+ ASSERT(bridge->m_workerContext->isContextThread());
+ bridge->m_callbacksOnWorkerThread->didFail(error);
+ bridge->m_callbacksOnWorkerThread = 0;
+ }
+}
+
+void WorkerFileSystemCallbacksBridge::didOpenFileSystemOnWorkerThread(ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge> bridge, const String& name, const String& rootPath)
+{
+ if (bridge->m_callbacksOnWorkerThread) {
+ ASSERT(bridge->m_workerContext->isContextThread());
+ bridge->m_callbacksOnWorkerThread->didOpenFileSystem(name, rootPath);
+ bridge->m_callbacksOnWorkerThread = 0;
+ }
+}
+
+void WorkerFileSystemCallbacksBridge::mayPostTaskToWorker(PassOwnPtr<ScriptExecutionContext::Task> task, const String& mode)
+{
+ { // Let go of the mutex before possibly deleting this due to m_selfRef.clear().
+ MutexLocker locker(m_mutex);
+ if (m_worker)
+ m_worker->postTaskForModeToWorkerContext(task, mode);
+ }
+ m_selfRef.clear();
+}
+
+} // namespace WebCore
+
+#endif // ENABLE(FILE_SYSTEM)
diff --git a/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h
new file mode 100644
index 0000000..899127e
--- /dev/null
+++ b/WebKit/chromium/src/WorkerFileSystemCallbacksBridge.h
@@ -0,0 +1,122 @@
+/*
+ * 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 WorkerFileSystemCallbacksBridge_h
+#define WorkerFileSystemCallbacksBridge_h
+
+#if ENABLE(FILE_SYSTEM)
+
+#include "PlatformString.h"
+#include "ScriptExecutionContext.h"
+#include "WebFileError.h"
+#include "WebFileSystem.h"
+#include "WebVector.h"
+#include "WorkerContext.h"
+#include <wtf/PassOwnPtr.h>
+#include <wtf/PassRefPtr.h>
+#include <wtf/Threading.h>
+
+namespace WebKit {
+
+class AsyncFileSystem;
+class MainThreadFileSystemCallbacks;
+class ThreadableCallbacksBridgeWrapper;
+class WebCommonWorkerClient;
+class WebFileSystemCallbacks;
+class WebWorkerBase;
+struct WebFileInfo;
+struct WebFileSystemEntry;
+
+// This class is used to post a openFileSystem request to the main thread and get called back for the request. This must be destructed on the worker thread.
+//
+// A typical flow for openFileSystem would look like this:
+// Bridge::postOpenFileSystemToMainThread() on WorkerThread
+// --> Bridge::openFileSystemOnMainThread() is called on MainThread
+// This makes an IPC with a MainThreadFileSystemCallbacks instance
+// [actual operation is down in the browser]
+// --> MainThreadFileSystemCallbacks::didXxx is called on MainThread
+// --> Bridge::didXxxOnMainThread is called on MainThread
+// --> Bridge::didXxxOnWorkerThread is called on WorkerThread
+// This calls the original callbacks (m_callbacksOnWorkerThread) and
+// releases a self-reference to the bridge.
+class WorkerFileSystemCallbacksBridge : public ThreadSafeShared<WorkerFileSystemCallbacksBridge>, public WebCore::WorkerContext::Observer {
+public:
+ static PassRefPtr<WorkerFileSystemCallbacksBridge> create(WebWorkerBase* worker, WebCore::ScriptExecutionContext* workerContext, WebFileSystemCallbacks* callbacks)
+ {
+ return WTF::adoptRef(new WorkerFileSystemCallbacksBridge(worker, workerContext, callbacks));
+ }
+ ~WorkerFileSystemCallbacksBridge();
+
+ // WorkerContext::Observer method.
+ virtual void notifyStop()
+ {
+ stop();
+ }
+
+ void stop();
+
+ // Posts an initial request task to the main thread. It is supposed to be called immediately after the bridge is constructed. (It doesn't check if the context has been stopped or not.)
+ void postOpenFileSystemToMainThread(WebCommonWorkerClient*, WebFileSystem::Type, long long size, const String& mode);
+
+ // Callback methods that are called on the main thread.
+ void didFailOnMainThread(WebFileError, const String& mode);
+ void didOpenFileSystemOnMainThread(const String& name, const String& rootPath, const String& mode);
+
+private:
+ WorkerFileSystemCallbacksBridge(WebWorkerBase*, WebCore::ScriptExecutionContext*, WebFileSystemCallbacks*);
+
+ // Method that is to be called on the main thread.
+ static void openFileSystemOnMainThread(WebCore::ScriptExecutionContext*, WebCommonWorkerClient*, WebFileSystem::Type, long long size, WorkerFileSystemCallbacksBridge*, const String& mode);
+
+ friend class MainThreadFileSystemCallbacks;
+
+ // Methods that dispatch WebFileSystemCallbacks on the worker threads.
+ // They release a selfRef of the WorkerFileSystemCallbacksBridge.
+ static void didFailOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge>, WebFileError);
+ static void didOpenFileSystemOnWorkerThread(WebCore::ScriptExecutionContext*, PassRefPtr<WorkerFileSystemCallbacksBridge>, const String& name, const String& rootPath);
+
+ void mayPostTaskToWorker(PassOwnPtr<WebCore::ScriptExecutionContext::Task>, const String& mode);
+
+ // m_selfRef keeps a reference to itself until a task is created for the worker thread (at which point the task holds the reference).
+ RefPtr<WorkerFileSystemCallbacksBridge> m_selfRef;
+
+ Mutex m_mutex;
+ WebWorkerBase* m_worker;
+ WebCore::ScriptExecutionContext* m_workerContext;
+
+ // This is self-destructed and must be fired on the worker thread.
+ WebFileSystemCallbacks* m_callbacksOnWorkerThread;
+};
+
+} // namespace WebCore
+
+#endif
+
+#endif // WorkerFileSystemCallbacksBridge_h
diff --git a/WebKit/chromium/src/gtk/WebInputEventFactory.cpp b/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
index f8a1386..0d55c43 100644
--- a/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
+++ b/WebKit/chromium/src/gtk/WebInputEventFactory.cpp
@@ -85,6 +85,10 @@ static int gdkStateToWebEventModifiers(guint state)
modifiers |= WebInputEvent::MiddleButtonDown;
if (state & GDK_BUTTON3_MASK)
modifiers |= WebInputEvent::RightButtonDown;
+ if (state & GDK_LOCK_MASK)
+ modifiers |= WebInputEvent::CapsLockOn;
+ if (state & GDK_MOD2_MASK)
+ modifiers |= WebInputEvent::NumLockOn;
return modifiers;
}
diff --git a/WebKit/chromium/src/gtk/WebScreenInfoFactory.cpp b/WebKit/chromium/src/gtk/WebScreenInfoFactory.cpp
deleted file mode 100644
index 081daa2..0000000
--- a/WebKit/chromium/src/gtk/WebScreenInfoFactory.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-/*
- * Copyright (C) 2009 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 "WebScreenInfoFactory.h"
-
-#include "WebScreenInfo.h"
-#include <gtk/gtk.h>
-
-namespace WebKit {
-
-WebScreenInfo WebScreenInfoFactory::screenInfo(GtkWidget* widget)
-{
- WebScreenInfo results;
- results.depth = 32;
- results.depthPerComponent = 8;
- results.isMonochrome = false;
-
- if (!widget)
- return results;
-
- GdkScreen* screen = gtk_widget_get_screen(widget);
-
- results.rect = WebRect(
- 0, 0, gdk_screen_get_width(screen), gdk_screen_get_height(screen));
-
- // I don't know of a way to query the "maximize" size of the window (e.g.
- // screen size less sidebars etc) since this is something which only the
- // window manager knows.
- results.availableRect = results.rect;
-
- return results;
-}
-
-} // namespace WebKit
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index 0c7241d..a66e174 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -45,7 +45,7 @@ var context = {}; // Used by WebCore's inspector routines.
Preferences.profilerAlwaysEnabled = true;
Preferences.canEditScriptSource = true;
Preferences.onlineDetectionEnabled = false;
- Preferences.domBreakpointsEnabled = true;
+ Preferences.nativeInstrumentationEnabled = true;
})();
var devtools = devtools || {};
diff --git a/WebKit/chromium/src/win/WebInputEventFactory.cpp b/WebKit/chromium/src/win/WebInputEventFactory.cpp
index d1d5869..c71a3b6 100644
--- a/WebKit/chromium/src/win/WebInputEventFactory.cpp
+++ b/WebKit/chromium/src/win/WebInputEventFactory.cpp
@@ -86,6 +86,16 @@ static bool isKeyPad(WPARAM wparam, LPARAM lparam)
return keypad;
}
+// Loads the state for toggle keys into the event.
+static void SetToggleKeyState(WebInputEvent* event)
+{
+ // Low bit set from GetKeyState indicates "toggled".
+ if (::GetKeyState(VK_NUMLOCK) & 1)
+ event->modifiers |= WebInputEvent::NumLockOn;
+ if (::GetKeyState(VK_CAPITAL) & 1)
+ event->modifiers |= WebInputEvent::CapsLockOn;
+}
+
WebKeyboardEvent WebInputEventFactory::keyboardEvent(HWND hwnd, UINT message,
WPARAM wparam, LPARAM lparam)
{
@@ -144,6 +154,7 @@ WebKeyboardEvent WebInputEventFactory::keyboardEvent(HWND hwnd, UINT message,
if (isKeyPad(wparam, lparam))
result.modifiers |= WebInputEvent::IsKeyPad;
+ SetToggleKeyState(&result);
return result;
}
@@ -289,6 +300,7 @@ WebMouseEvent WebInputEventFactory::mouseEvent(HWND hwnd, UINT message,
if (wparam & MK_RBUTTON)
result.modifiers |= WebInputEvent::RightButtonDown;
+ SetToggleKeyState(&result);
return result;
}
@@ -386,6 +398,8 @@ WebMouseWheelEvent WebInputEventFactory::mouseWheelEvent(HWND hwnd, UINT message
if (keyState & MK_RBUTTON)
result.modifiers |= WebInputEvent::RightButtonDown;
+ SetToggleKeyState(&result);
+
// Set coordinates by translating event coordinates from screen to client.
POINT clientPoint = { result.globalX, result.globalY };
MapWindowPoints(0, hwnd, &clientPoint, 1);