summaryrefslogtreecommitdiffstats
path: root/WebKit/chromium
diff options
context:
space:
mode:
authorBen Murdoch <benm@google.com>2011-05-05 14:36:32 +0100
committerBen Murdoch <benm@google.com>2011-05-10 15:38:30 +0100
commitf05b935882198ccf7d81675736e3aeb089c5113a (patch)
tree4ea0ca838d9ef1b15cf17ddb3928efb427c7e5a1 /WebKit/chromium
parent60fbdcc62bced8db2cb1fd233cc4d1e4ea17db1b (diff)
downloadexternal_webkit-f05b935882198ccf7d81675736e3aeb089c5113a.zip
external_webkit-f05b935882198ccf7d81675736e3aeb089c5113a.tar.gz
external_webkit-f05b935882198ccf7d81675736e3aeb089c5113a.tar.bz2
Merge WebKit at r74534: Initial merge by git.
Change-Id: I6ccd1154fa1b19c2ec2a66878eb675738735f1eb
Diffstat (limited to 'WebKit/chromium')
-rw-r--r--WebKit/chromium/ChangeLog444
-rw-r--r--WebKit/chromium/DEPS15
-rw-r--r--WebKit/chromium/WebKit.gyp61
-rw-r--r--WebKit/chromium/features.gypi1
-rw-r--r--WebKit/chromium/public/WebAccessibilityObject.h2
-rw-r--r--WebKit/chromium/public/WebAudioBus.h18
-rw-r--r--WebKit/chromium/public/WebDevToolsAgent.h11
-rw-r--r--WebKit/chromium/public/WebFormControlElement.h2
-rw-r--r--WebKit/chromium/public/WebFrameClient.h2
-rw-r--r--WebKit/chromium/public/WebGeolocationClient.h54
-rw-r--r--WebKit/chromium/public/WebGeolocationClientMock.h76
-rw-r--r--WebKit/chromium/public/WebGeolocationController.h65
-rw-r--r--WebKit/chromium/public/WebGeolocationError.h3
-rw-r--r--WebKit/chromium/public/WebGeolocationPermissionRequest.h63
-rw-r--r--WebKit/chromium/public/WebGeolocationPermissionRequestManager.h63
-rw-r--r--WebKit/chromium/public/WebGeolocationPosition.h3
-rw-r--r--WebKit/chromium/public/WebGraphicsContext3D.h4
-rw-r--r--WebKit/chromium/public/WebIDBCursor.h4
-rw-r--r--WebKit/chromium/public/WebIDBDatabase.h14
-rwxr-xr-xWebKit/chromium/public/WebIDBFactory.h9
-rw-r--r--WebKit/chromium/public/WebIDBKey.h18
-rw-r--r--WebKit/chromium/public/WebIDBKeyRange.h7
-rwxr-xr-xWebKit/chromium/public/WebIDBObjectStore.h4
-rw-r--r--WebKit/chromium/public/WebKitClient.h8
-rw-r--r--WebKit/chromium/public/WebPerformance.h5
-rw-r--r--WebKit/chromium/public/WebView.h16
-rw-r--r--WebKit/chromium/public/WebViewClient.h5
-rw-r--r--WebKit/chromium/src/ApplicationCacheHost.cpp6
-rw-r--r--WebKit/chromium/src/AssertMatchingEnums.cpp1
-rw-r--r--WebKit/chromium/src/AssociatedURLLoader.cpp50
-rw-r--r--WebKit/chromium/src/AssociatedURLLoader.h15
-rw-r--r--WebKit/chromium/src/AutoFillPopupMenuClient.cpp45
-rw-r--r--WebKit/chromium/src/AutoFillPopupMenuClient.h8
-rw-r--r--WebKit/chromium/src/ChromeClientImpl.cpp12
-rw-r--r--WebKit/chromium/src/ChromiumBridge.cpp4
-rw-r--r--WebKit/chromium/src/ContextMenuClientImpl.cpp6
-rw-r--r--WebKit/chromium/src/EditorClientImpl.cpp3
-rw-r--r--WebKit/chromium/src/EditorClientImpl.h2
-rw-r--r--WebKit/chromium/src/Extensions3DChromium.cpp9
-rw-r--r--WebKit/chromium/src/FrameLoaderClientImpl.cpp6
-rw-r--r--WebKit/chromium/src/GeolocationClientProxy.cpp98
-rw-r--r--WebKit/chromium/src/GeolocationClientProxy.h61
-rw-r--r--WebKit/chromium/src/GraphicsContext3DChromium.cpp49
-rw-r--r--WebKit/chromium/src/GraphicsContext3DInternal.h6
-rw-r--r--WebKit/chromium/src/IDBCursorBackendProxy.cpp4
-rw-r--r--WebKit/chromium/src/IDBCursorBackendProxy.h2
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.cpp5
-rw-r--r--WebKit/chromium/src/IDBDatabaseProxy.h1
-rw-r--r--WebKit/chromium/src/LocalizedStrings.cpp32
-rw-r--r--WebKit/chromium/src/StorageAreaProxy.cpp4
-rw-r--r--WebKit/chromium/src/WebAccessibilityObject.cpp11
-rw-r--r--WebKit/chromium/src/WebAudioBus.cpp18
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentImpl.cpp11
-rw-r--r--WebKit/chromium/src/WebDevToolsAgentImpl.h1
-rw-r--r--WebKit/chromium/src/WebDevToolsFrontendImpl.cpp8
-rw-r--r--WebKit/chromium/src/WebFormElement.cpp9
-rw-r--r--WebKit/chromium/src/WebGeolocationClientMock.cpp146
-rw-r--r--WebKit/chromium/src/WebGeolocationController.cpp52
-rw-r--r--WebKit/chromium/src/WebGeolocationPermissionRequest.cpp49
-rw-r--r--WebKit/chromium/src/WebGeolocationPermissionRequestManager.cpp95
-rw-r--r--WebKit/chromium/src/WebGeolocationServiceMock.cpp35
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp72
-rw-r--r--WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h3
-rw-r--r--WebKit/chromium/src/WebIDBCursorImpl.cpp4
-rw-r--r--WebKit/chromium/src/WebIDBCursorImpl.h2
-rw-r--r--WebKit/chromium/src/WebIDBDatabaseError.cpp2
-rw-r--r--WebKit/chromium/src/WebIDBKey.cpp41
-rw-r--r--WebKit/chromium/src/WebIDBKeyRange.cpp36
-rw-r--r--WebKit/chromium/src/WebImageDecoder.cpp4
-rw-r--r--WebKit/chromium/src/WebPasswordFormUtils.cpp10
-rw-r--r--WebKit/chromium/src/WebPerformance.cpp33
-rw-r--r--WebKit/chromium/src/WebPluginContainerImpl.cpp4
-rw-r--r--WebKit/chromium/src/WebSearchableFormData.cpp12
-rw-r--r--WebKit/chromium/src/WebViewImpl.cpp46
-rw-r--r--WebKit/chromium/src/WebViewImpl.h17
-rw-r--r--WebKit/chromium/src/js/DevTools.js2
-rw-r--r--WebKit/chromium/src/js/Tests.js6
77 files changed, 1731 insertions, 404 deletions
diff --git a/WebKit/chromium/ChangeLog b/WebKit/chromium/ChangeLog
index 3d8a0e0..335732a 100644
--- a/WebKit/chromium/ChangeLog
+++ b/WebKit/chromium/ChangeLog
@@ -1,3 +1,447 @@
+2010-12-22 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r74503.
+ http://trac.webkit.org/changeset/74503
+ https://bugs.webkit.org/show_bug.cgi?id=51513
+
+ breaks chromium mac debug compile (Requested by tonyg-cr on
+ #webkit).
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
+
+2010-12-22 W. James MacLean <wjmaclean@chromium.org>
+
+ Reviewed by Kenneth Russell.
+
+ [chromium] Add asserts to test for contiguous-pixel Skia bitmaps.
+ https://bugs.webkit.org/show_bug.cgi?id=51186
+
+ Add asserts to detect if assumptions (about contiguous pixels in Skia bitmaps) are violated.
+
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3DInternal::paintRenderingResultsToCanvas):
+
+2010-12-21 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Kenneth Russell.
+
+ WebGLRenderingContext needs to zero textures and renderbuffers
+ https://bugs.webkit.org/show_bug.cgi?id=49355
+
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::texImage2D): Generate an INVALID_VALUE if pixels==null is passed in.
+
+2010-12-20 Andrei Popescu <andreip@google.com>
+
+ Reviewed by Jeremy Orlow.
+
+ IDBCursor::delete is not implemented.
+ https://bugs.webkit.org/show_bug.cgi?id=51110
+
+ * public/WebIDBCursor.h:
+ (WebKit::WebIDBCursor::remove):
+ (WebKit::WebIDBCursor::deleteFunction):
+ * src/IDBCursorBackendProxy.cpp:
+ (WebCore::IDBCursorBackendProxy::deleteFunction):
+ * src/IDBCursorBackendProxy.h:
+ * src/WebIDBCursorImpl.cpp:
+ (WebKit::WebIDBCursorImpl::deleteFunction):
+ * src/WebIDBCursorImpl.h:
+
+2010-12-18 Tony Gentilcore <tonyg@chromium.org>
+
+ Reviewed by Laszlo Gombos.
+
+ [Web Timing] Rename domContentLoaded{Start,End}->domContentLoadedEvent{Start,End}
+ https://bugs.webkit.org/show_bug.cgi?id=50943
+
+ Exposes all dom* times to the chromium port. I'm particularly interested in
+ domContentLoadedEventEnd as it compares to the FinishDoc metric.
+
+ * public/WebPerformance.h:
+ * src/WebPerformance.cpp:
+ (WebKit::WebPerformance::domLoading):
+ (WebKit::WebPerformance::domInteractive):
+ (WebKit::WebPerformance::domContentLoadedEventStart):
+ (WebKit::WebPerformance::domContentLoadedEventEnd):
+ (WebKit::WebPerformance::domComplete):
+
+2010-12-17 Tony Gentilcore <tonyg@chromium.org>
+
+ Unreviewed, build fix.
+
+ Add WebKitTools -> Tools rename that got missed.
+
+ * WebKit.gyp:
+
+2010-12-17 Dirk Pranke <dpranke@chromium.org>
+
+ Unreviewed, build fix.
+
+ Add WebKitTools -> Tools rename that got missed.
+
+ * WebKit.gyp:
+
+2010-12-17 John Knottenbelt <jknotten@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Fix test failures where NULL GeolocationClient is provided
+ https://bugs.webkit.org/show_bug.cgi?id=51256
+
+ * src/GeolocationClientProxy.cpp:
+ (WebKit::GeolocationClientProxy::geolocationDestroyed):
+
+2010-12-17 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ IndexedDB: Support Date objects as keys.
+ https://bugs.webkit.org/show_bug.cgi?id=51193
+
+ Update to match the underlying WebCore IDBKey class:
+ add the DateType, add create() functions for each type,
+ deprecate the public constructors (will be removed once
+ Chromium side is updated).
+
+ * public/WebIDBKey.h:
+ (WebKit::WebIDBKey::WebIDBKey):
+ * src/AssertMatchingEnums.cpp:
+ * src/WebIDBKey.cpp:
+ (WebKit::WebIDBKey::createString):
+ (WebKit::WebIDBKey::createDate):
+ (WebKit::WebIDBKey::createNumber):
+ (WebKit::WebIDBKey::assignNull):
+ (WebKit::WebIDBKey::assignString):
+ (WebKit::WebIDBKey::assignDate):
+ (WebKit::WebIDBKey::assignNumber):
+ (WebKit::WebIDBKey::date):
+
+2010-12-17 James Simonsen <simonjam@chromium.org>
+
+ Reviewed by Darin Fisher.
+
+ [Web Timing] Navigation type enums should begin with TYPE_
+ https://bugs.webkit.org/show_bug.cgi?id=51200
+
+ * src/WebPerformance.cpp:
+ (WebKit::WebPerformance::navigationType): Added TYPE_ to navigation types.
+
+2010-12-16 John Knottenbelt <jknotten@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ Enable client-based geolocation in Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=50562
+
+ * features.gypi:
+
+2010-12-16 Hans Wennborg <hans@chromium.org>
+
+ Reviewed by Jeremy Orlow.
+
+ IndexedDB: Fix IDBDatabaseError code offset bug
+ https://bugs.webkit.org/show_bug.cgi?id=51177
+
+ WebIDBDatabaseError must use the
+ IDBDatabaseError::createWithoutOffset() function.
+
+ * src/WebIDBDatabaseError.cpp:
+ (WebKit::WebIDBDatabaseError::assign):
+
+2010-12-15 Chris Guillory <chris.guillory@google.com>
+
+ Reviewed by Darin Fisher.
+
+ Expose AccessibilityObject::url() to Chromium
+ https://bugs.webkit.org/show_bug.cgi?id=51046
+
+ * public/WebAccessibilityObject.h:
+ * src/WebAccessibilityObject.cpp:
+ (WebKit::WebAccessibilityObject::url):
+
+2010-12-14 Darin Fisher <darin@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ [chromium] AssociatedURLLoader leaks m_realLoader to its WebURLLoaderClient.
+ https://bugs.webkit.org/show_bug.cgi?id=51062
+
+ * src/AssociatedURLLoader.cpp: Intercept WebURLLoaderClient methods and
+ forward |this| as the WebURLLoader parameter.
+ (WebKit::AssociatedURLLoader::AssociatedURLLoader):
+ (WebKit::AssociatedURLLoader::loadSynchronously):
+ (WebKit::AssociatedURLLoader::loadAsynchronously):
+ (WebKit::AssociatedURLLoader::willSendRequest):
+ (WebKit::AssociatedURLLoader::didSendData):
+ (WebKit::AssociatedURLLoader::didReceiveResponse):
+ (WebKit::AssociatedURLLoader::didDownloadData):
+ (WebKit::AssociatedURLLoader::didReceiveData):
+ (WebKit::AssociatedURLLoader::didReceiveCachedMetadata):
+ (WebKit::AssociatedURLLoader::didFinishLoading):
+ (WebKit::AssociatedURLLoader::didFail):
+ * src/AssociatedURLLoader.h:
+
+2010-12-14 Mihai Parparita <mihaip@chromium.org>
+
+ Reviewed by Dimitri Glazkov.
+
+ Move asynchronous event dispatching out of Document
+ https://bugs.webkit.org/show_bug.cgi?id=49785
+
+ Change enqueueEvent callsite.
+
+ * src/StorageAreaProxy.cpp:
+ (WebCore::StorageAreaProxy::storageEvent):
+
+2010-12-13 Mike Lawther <mikelawther@chromium.org>
+
+ Reviewed by James Robinson.
+
+ Update chromium DEPS to pull in latest Skia
+ https://bugs.webkit.org/show_bug.cgi?id=50984
+
+ Roll to revision that pulled in Skia r632 (http://src.chromium.org/viewvc/chrome?view=rev&revision=68558)
+
+ * DEPS:
+
+2010-12-13 David Holloway <dhollowa@chromium.org>
+
+ Reviewed by Eric Seidel.
+
+ [chromium] Removes deprecated logic following the consolidation of AutoFill and
+ Autocomplete popup menu handling (https://bugs.webkit.org/show_bug.cgi?id=41236).
+ Filling of the form fields is now handled completely on the Chromium side, for
+ both AutoFill and Autocomplete.
+
+ https://bugs.webkit.org/show_bug.cgi?id=41822
+
+ * public/WebView.h:
+ * src/AutoFillPopupMenuClient.cpp:
+ (WebKit::AutoFillPopupMenuClient::AutoFillPopupMenuClient):
+ (WebKit::AutoFillPopupMenuClient::valueChanged):
+ * src/AutoFillPopupMenuClient.h:
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::applyAutoFillSuggestions):
+ * src/WebViewImpl.h:
+
+2010-12-13 Yury Semikhatsky <yurys@chromium.org>
+
+ Unreviewed. Rollout 73914, 73915, 73917, 73920 and 73921.
+
+ REGRESSION(r73914): "Chromium page_cycler_morejs fails" (Requested by yurys on #webkit).
+ https://bugs.webkit.org/show_bug.cgi?id=50950
+
+ * src/WebWorkerClientImpl.cpp:
+ (WebKit::WebWorkerClientImpl::postExceptionToWorkerObject):
+ (WebKit::WebWorkerClientImpl::postConsoleMessageToWorkerObject):
+ (WebKit::WebWorkerClientImpl::postExceptionToWorkerObjectTask):
+ (WebKit::WebWorkerClientImpl::postConsoleMessageToWorkerObjectTask):
+
+2010-12-13 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
+
+ Debugger and Resources related notification functions of Inspector.idl were
+ marked as such with help of "domain" attribute. The other changes in js files
+ are reflecting this change. Some wrappers in WebInspector namespace were dropped,
+ the others were moved to DebuggerModel class.
+
+ https://bugs.webkit.org/show_bug.cgi?id=50906
+
+ * src/js/Tests.js:
+ (.TestSuite.prototype._waitForScriptPause):
+ (.TestSuite.prototype._waitUntilScriptsAreParsed.waitForAllScripts):
+ (.TestSuite.prototype._waitUntilScriptsAreParsed):
+
+2010-12-13 Yury Semikhatsky <yurys@chromium.org>
+
+ Reviewed by Adam Barth.
+
+ WebCore doesn't fire window.onerror event when uncaught JavaScript exceptions are thrown
+ https://bugs.webkit.org/show_bug.cgi?id=8519
+
+ Uncaught exceptions are propagated to window.onerror hander if one is present.
+ The handler is expected to be a function accepting three arguments: error message,
+ resource url and line number where the exception occured.
+
+ * src/WebWorkerClientImpl.cpp:
+ (WebKit::WebWorkerClientImpl::postExceptionToWorkerObject):
+ (WebKit::WebWorkerClientImpl::postExceptionToWorkerObjectTask):
+
+2010-12-13 Sheriff Bot <webkit.review.bot@gmail.com>
+
+ Unreviewed, rolling out r73898.
+ http://trac.webkit.org/changeset/73898
+ https://bugs.webkit.org/show_bug.cgi?id=50919
+
+ FileSystem and Database API's were broken (Requested by loislo
+ on #webkit).
+
+ * src/js/Tests.js:
+ (.TestSuite.prototype._waitForScriptPause):
+
+2010-12-13 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Reviewed by Yury Semikhatsky.
+
+ Web Inspector: Protocol cleanup task. Assign domain attribute to Resources and Debugger specific functions.
+
+ Debugger and Resources related notification functions of Inspector.idl were
+ marked as such with help of "domain" attribute. The other changes in js files
+ are reflecting this change. Some wrappers in WebInspector namespace were dropped,
+ the others were moved to DebuggerModel class.
+
+ https://bugs.webkit.org/show_bug.cgi?id=50906
+
+ * src/js/Tests.js:
+ (.TestSuite.prototype._waitForScriptPause):
+
+2010-10-28 MORITA Hajime <morrita@google.com>
+
+ Reviewed by Ojan Vafai.
+
+ spellcheck does not check pasted text
+ https://bugs.webkit.org/show_bug.cgi?id=40092
+
+ Added a stub implememntation.
+
+ * src/EditorClientImpl.h:
+ (WebKit::EditorClientImpl::requestCheckingOfString):
+
+2010-12-10 Chris Fleizach <cfleizach@apple.com>
+
+ Reviewed by Darin Adler.
+
+ AX: refactor AccessibilityRenderObject::doAccessibilityHitTest
+ https://bugs.webkit.org/show_bug.cgi?id=50574
+
+ * src/WebAccessibilityObject.cpp:
+ (WebKit::WebAccessibilityObject::hitTest):
+
+2010-12-10 Zhenyao Mo <zmo@google.com>
+
+ Reviewed by Adam Barth.
+
+ Use enums instead of booleans in ImageSource/ImageDecoder constructors
+ https://bugs.webkit.org/show_bug.cgi?id=50818
+
+ * src/WebImageDecoder.cpp:
+ (WebKit::WebImageDecoder::init): Use enums instead of boolean in ImageDecoder constructor.
+
+2010-12-10 Kenneth Russell <kbr@google.com>
+
+ Reviewed by James Robinson.
+
+ Implement extension entry points and remove EXTENSIONS enum
+ https://bugs.webkit.org/show_bug.cgi?id=40316
+
+ Added support for ensuring that a particular OpenGL extension is
+ enabled.
+
+ * public/WebGraphicsContext3D.h:
+ * src/Extensions3DChromium.cpp:
+ (WebCore::Extensions3DChromium::ensureEnabled):
+ * src/GraphicsContext3DChromium.cpp:
+ (WebCore::GraphicsContext3DInternal::initializeExtensions):
+ (WebCore::GraphicsContext3DInternal::supportsExtension):
+ (WebCore::GraphicsContext3DInternal::ensureExtensionEnabled):
+ * src/GraphicsContext3DInternal.h:
+ * src/WebGraphicsContext3DDefaultImpl.cpp:
+ (WebKit::WebGraphicsContext3DDefaultImpl::getRequestableExtensionsCHROMIUM):
+ (WebKit::WebGraphicsContext3DDefaultImpl::requestExtensionCHROMIUM):
+ * src/WebGraphicsContext3DDefaultImpl.h:
+
+2010-12-10 John Knottenbelt <jknotten@chromium.org>
+
+ Reviewed by Steve Block.
+
+ [Chromium] Implement mocks for client-based geolocation
+ https://bugs.webkit.org/show_bug.cgi?id=46895
+
+ * WebKit.gyp:
+ * public/WebGeolocationClientMock.h: Added.
+ (WebKit::WebGeolocationClientMock::~WebGeolocationClientMock):
+ (WebKit::WebGeolocationClientMock::WebGeolocationClientMock):
+ * src/WebGeolocationClientMock.cpp: Added.
+ (WebKit::WebGeolocationClientMock::create):
+ (WebKit::WebGeolocationClientMock::initialize):
+ (WebKit::WebGeolocationClientMock::reset):
+ (WebKit::WebGeolocationClientMock::setMockGeolocationPosition):
+ (WebKit::WebGeolocationClientMock::setMockGeolocationError):
+ (WebKit::WebGeolocationClientMock::setMockGeolocationPermission):
+ (WebKit::WebGeolocationClientMock::resetMock):
+ (WebKit::WebGeolocationClientMock::startUpdating):
+ (WebKit::WebGeolocationClientMock::stopUpdating):
+ (WebKit::WebGeolocationClientMock::setEnableHighAccuracy):
+ (WebKit::WebGeolocationClientMock::geolocationDestroyed):
+ (WebKit::WebGeolocationClientMock::setController):
+ (WebKit::WebGeolocationClientMock::lastPosition):
+ (WebKit::WebGeolocationClientMock::requestPermission):
+ (WebKit::WebGeolocationClientMock::cancelPermissionRequest):
+ * src/WebGeolocationServiceMock.cpp:
+
+2010-12-10 John Knottenbelt <jknotten@chromium.org>
+
+ Reviewed by Steve Block.
+
+ [chromium] Implement client based geolocation bindings
+ https://bugs.webkit.org/show_bug.cgi?id=45752
+
+ Implements the necessary plumbing to expose client-based geolocation in Chromium
+ webkit. The plan is to remove the non-client-based geolocation code (GeolocationService*)
+ in the future.
+
+ * WebKit.gyp:
+ * public/WebGeolocationClient.h: Added.
+ (WebKit::WebGeolocationClient::~WebGeolocationClient):
+ * public/WebGeolocationController.h: Added.
+ (WebKit::WebGeolocationController::WebGeolocationController):
+ (WebKit::WebGeolocationController::reset):
+ * public/WebGeolocationError.h:
+ * public/WebGeolocationPermissionRequest.h: Added.
+ (WebKit::WebGeolocationPermissionRequest::WebGeolocationPermissionRequest):
+ (WebKit::WebGeolocationPermissionRequest::geolocation):
+ * public/WebGeolocationPermissionRequestManager.h: Added.
+ (WebKit::WebGeolocationPermissionRequestManager::WebGeolocationPermissionRequestManager):
+ (WebKit::WebGeolocationPermissionRequestManager::~WebGeolocationPermissionRequestManager):
+ * public/WebGeolocationPosition.h:
+ * public/WebViewClient.h:
+ (WebKit::WebViewClient::geolocationClient):
+ * src/ChromeClientImpl.cpp:
+ (WebKit::ChromeClientImpl::requestGeolocationPermissionForFrame):
+ (WebKit::ChromeClientImpl::cancelGeolocationPermissionRequestForFrame):
+ * src/GeolocationClientProxy.cpp: Added.
+ (WebKit::GeolocationClientProxy::GeolocationClientProxy):
+ (WebKit::GeolocationClientProxy::~GeolocationClientProxy):
+ (WebKit::GeolocationClientProxy::setController):
+ (WebKit::GeolocationClientProxy::geolocationDestroyed):
+ (WebKit::GeolocationClientProxy::startUpdating):
+ (WebKit::GeolocationClientProxy::stopUpdating):
+ (WebKit::GeolocationClientProxy::setEnableHighAccuracy):
+ (WebKit::GeolocationClientProxy::lastPosition):
+ (WebKit::GeolocationClientProxy::requestPermission):
+ (WebKit::GeolocationClientProxy::cancelPermissionRequest):
+ * src/GeolocationClientProxy.h: Added.
+ * src/WebGeolocationController.cpp: Added.
+ (WebKit::WebGeolocationController::positionChanged):
+ (WebKit::WebGeolocationController::errorOccurred):
+ (WebKit::WebGeolocationController::controller):
+ * src/WebGeolocationPermissionRequest.cpp: Added.
+ (WebKit::WebGeolocationPermissionRequest::securityOrigin):
+ (WebKit::WebGeolocationPermissionRequest::setIsAllowed):
+ * src/WebGeolocationPermissionRequestManager.cpp: Added.
+ (WebGeolocationPermissionRequestManager::add):
+ (WebGeolocationPermissionRequestManager::remove):
+ (WebGeolocationPermissionRequestManager::init):
+ (WebGeolocationPermissionRequestManager::reset):
+ * src/WebViewImpl.cpp:
+ (WebKit::WebViewImpl::WebViewImpl):
+ * src/WebViewImpl.h:
+
2010-12-10 Hans Wennborg <hans@chromium.org>
Reviewed by Jeremy Orlow.
diff --git a/WebKit/chromium/DEPS b/WebKit/chromium/DEPS
index 32c01f0..0992f31 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': '67532'
+ 'chromium_rev': '68558'
}
deps = {
@@ -109,20 +109,20 @@ deps = {
Var('chromium_svn')+'/tools/generate_stubs@'+Var('chromium_rev'),
# other third party
- 'third_party':
- Var('chromium_svn')+'/third_party@'+Var('chromium_rev'),
'third_party/icu':
From('chromium_deps', 'src/third_party/icu'),
'third_party/ots':
From('chromium_deps', 'src/third_party/ots'),
+ 'third_party/yasm/source/patched-yasm':
+ From('chromium_deps', 'src/third_party/yasm/source/patched-yasm'),
+ 'third_party':
+ Var('chromium_svn')+'/third_party@'+Var('chromium_rev'),
}
deps_os = {
'win': {
'third_party/cygwin':
From('chromium_deps', 'src/third_party/cygwin'),
- 'third_party/python_24':
- From('chromium_deps', 'src/third_party/python_24'),
'third_party/ffmpeg/binaries/chromium/win/ia32':
From('chromium_deps', 'src/third_party/ffmpeg/binaries/chromium/win/ia32'),
'third_party/lighttpd':
@@ -131,9 +131,6 @@ deps_os = {
From('chromium_deps', 'src/third_party/nss'),
},
'mac': {
- # needed by ffmpeg
- 'third_party/yasm/source/patched-yasm':
- From('chromium_deps', 'src/third_party/yasm/source/patched-yasm'),
'third_party/nss':
From('chromium_deps', 'src/third_party/nss'),
},
@@ -141,8 +138,6 @@ deps_os = {
# Linux, actually.
'tools/xdisplaycheck':
Var('chromium_svn')+'/tools/xdisplaycheck@'+Var('chromium_rev'),
- 'third_party/yasm/source/patched-yasm':
- From('chromium_deps', 'src/third_party/yasm/source/patched-yasm'),
'third_party/openssl':
From('chromium_deps', 'src/third_party/openssl'),
},
diff --git a/WebKit/chromium/WebKit.gyp b/WebKit/chromium/WebKit.gyp
index 01bb092..3612a08 100644
--- a/WebKit/chromium/WebKit.gyp
+++ b/WebKit/chromium/WebKit.gyp
@@ -31,7 +31,7 @@
{
'includes': [
'../../WebCore/WebCore.gypi',
- '../../WebKitTools/DumpRenderTree/DumpRenderTree.gypi',
+ '../../Tools/DumpRenderTree/DumpRenderTree.gypi',
'WebKit.gypi',
'features.gypi',
],
@@ -62,7 +62,7 @@
],
}],
],
- 'ahem_path': '../../WebKitTools/DumpRenderTree/qt/fonts/AHEM____.TTF',
+ 'ahem_path': '../../Tools/DumpRenderTree/qt/fonts/AHEM____.TTF',
# If debug_devtools is set to 1, JavaScript files for DevTools are
# stored as is. Otherwise, a concatenated file is stored.
@@ -173,7 +173,12 @@
'public/WebFontCache.h',
'public/WebFormControlElement.h',
'public/WebFormElement.h',
+ 'public/WebGeolocationClient.h',
+ 'public/WebGeolocationClientMock.h',
+ 'public/WebGeolocationController.h',
'public/WebGeolocationError.h',
+ 'public/WebGeolocationPermissionRequest.h',
+ 'public/WebGeolocationPermissionRequestManager.h',
'public/WebGeolocationPosition.h',
'public/WebGeolocationService.h',
'public/WebGeolocationServiceBridge.h',
@@ -339,6 +344,8 @@
'src/FrameLoaderClientImpl.cpp',
'src/FrameLoaderClientImpl.h',
'src/FrameNetworkingContextImpl.h',
+ 'src/GeolocationClientProxy.cpp',
+ 'src/GeolocationClientProxy.h',
'src/GraphicsContext3DChromium.cpp',
'src/GraphicsContext3DInternal.h',
'src/gtk/WebFontInfo.cpp',
@@ -444,7 +451,11 @@
'src/WebFormElement.cpp',
'src/WebFrameImpl.cpp',
'src/WebFrameImpl.h',
+ 'src/WebGeolocationController.cpp',
+ 'src/WebGeolocationClientMock.cpp',
'src/WebGeolocationError.cpp',
+ 'src/WebGeolocationPermissionRequest.cpp',
+ 'src/WebGeolocationPermissionRequestManager.cpp',
'src/WebGeolocationPosition.cpp',
'src/WebGeolocationServiceBridgeImpl.cpp',
'src/WebGeolocationServiceBridgeImpl.h',
@@ -667,11 +678,14 @@
['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
'sources/': [
['exclude', 'WebGeolocationService.*$'],
- ['include', 'WebGeolocationServiceMock.*'],
],
}, {
'sources/': [
+ ['exclude', 'GeolocationClientProxy.*'],
+ ['exclude', 'WebGeolocationClient.*'],
+ ['exclude', 'WebGeolocationController.*'],
['exclude', 'WebGeolocationError.*'],
+ ['exclude', 'WebGeolocationPermissionRequest.*'],
['exclude', 'WebGeolocationPosition.*'],
],
}]
@@ -853,6 +867,11 @@
},
},
}],
+ ['"ENABLE_CLIENT_BASED_GEOLOCATION=1" in feature_defines', {
+ 'sources/': [
+ ['exclude', 'WebGeolocationService.*$'],
+ ],
+ }]
],
},
{
@@ -868,7 +887,7 @@
'<(DEPTH)',
],
'sources': [
- '../../WebKitTools/DumpRenderTree/chromium/ImageDiff.cpp',
+ '../../Tools/DumpRenderTree/chromium/ImageDiff.cpp',
],
},
{
@@ -976,15 +995,15 @@
],
'mac_bundle_resources': [
'<(ahem_path)',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher200.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher300.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher400.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher500.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher600.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher700.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher800.ttf',
- '../../WebKitTools/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf',
+ '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher100.ttf',
+ '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher200.ttf',
+ '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher300.ttf',
+ '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher400.ttf',
+ '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher500.ttf',
+ '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher600.ttf',
+ '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher700.ttf',
+ '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher800.ttf',
+ '../../Tools/DumpRenderTree/fonts/WebKitWeightWatcher900.ttf',
'<(SHARED_INTERMEDIATE_DIR)/webkit/textAreaResizeCorner.png',
],
},{ # OS!="mac"
@@ -1005,7 +1024,7 @@
'destination': '<(PRODUCT_DIR)',
'files': [
'<(ahem_path)',
- '../../WebKitTools/DumpRenderTree/chromium/fonts.conf',
+ '../../Tools/DumpRenderTree/chromium/fonts.conf',
'<(INTERMEDIATE_DIR)/repack/DumpRenderTree.pak',
]
}],
@@ -1034,8 +1053,8 @@
],
'include_dirs': [
'<(chromium_src_dir)',
- '../../WebKitTools/DumpRenderTree/TestNetscapePlugIn',
- '../../WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders',
+ '../../Tools/DumpRenderTree/TestNetscapePlugIn',
+ '../../Tools/DumpRenderTree/chromium/TestNetscapePlugIn/ForwardingHeaders',
],
'conditions': [
['OS=="mac"', {
@@ -1059,7 +1078,7 @@
# we get rid of our forked plugin in the
# chromium repo, we can share the same
# Info.plist.
- 'INFOPLIST_FILE': '../../WebKitTools/DumpRenderTree/chromium/TestNetscapePlugIn/Info.plist',
+ 'INFOPLIST_FILE': '../../Tools/DumpRenderTree/chromium/TestNetscapePlugIn/Info.plist',
},
}],
['OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris"', {
@@ -1073,8 +1092,8 @@
'snprintf=_snprintf',
],
'sources': [
- '../../WebKitTools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.def',
- '../../WebKitTools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc',
+ '../../Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.def',
+ '../../Tools/DumpRenderTree/TestNetscapePlugIn/win/TestNetscapePlugin.rc',
],
# The .rc file requires that the name of the dll is npTestNetscapePlugin.dll.
# This adds the 'np' to the dll name.
@@ -1115,7 +1134,7 @@
'targets': [{
'target_name': 'LayoutTestHelper',
'type': 'executable',
- 'sources': ['../../WebKitTools/DumpRenderTree/chromium/LayoutTestHelperWin.cpp'],
+ 'sources': ['../../Tools/DumpRenderTree/chromium/LayoutTestHelperWin.cpp'],
}],
}],
['OS=="mac"', {
@@ -1123,7 +1142,7 @@
{
'target_name': 'LayoutTestHelper',
'type': 'executable',
- 'sources': ['../../WebKitTools/DumpRenderTree/chromium/LayoutTestHelper.mm'],
+ 'sources': ['../../Tools/DumpRenderTree/chromium/LayoutTestHelper.mm'],
'link_settings': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/AppKit.framework',
diff --git a/WebKit/chromium/features.gypi b/WebKit/chromium/features.gypi
index 03e6ce4..372cc5c 100644
--- a/WebKit/chromium/features.gypi
+++ b/WebKit/chromium/features.gypi
@@ -45,6 +45,7 @@
'ENABLE_BLOB=1',
'ENABLE_BLOB_SLICE=1',
'ENABLE_CHANNEL_MESSAGING=1',
+ 'ENABLE_CLIENT_BASED_GEOLOCATION=1',
'ENABLE_DASHBOARD_SUPPORT=0',
'ENABLE_DATABASE=1',
'ENABLE_DATAGRID=0',
diff --git a/WebKit/chromium/public/WebAccessibilityObject.h b/WebKit/chromium/public/WebAccessibilityObject.h
index f7c93f2..182d124 100644
--- a/WebKit/chromium/public/WebAccessibilityObject.h
+++ b/WebKit/chromium/public/WebAccessibilityObject.h
@@ -45,6 +45,7 @@ class WebAccessibilityObjectPrivate;
class WebNode;
class WebDocument;
class WebString;
+class WebURL;
struct WebPoint;
struct WebRect;
@@ -110,6 +111,7 @@ public:
WEBKIT_API void setFocused(bool) const;
WEBKIT_API WebString stringValue() const;
WEBKIT_API WebString title() const;
+ WEBKIT_API WebURL url() const;
WEBKIT_API WebNode node() const;
WEBKIT_API WebDocument document() const;
diff --git a/WebKit/chromium/public/WebAudioBus.h b/WebKit/chromium/public/WebAudioBus.h
index 94ef74d..b7f8d74 100644
--- a/WebKit/chromium/public/WebAudioBus.h
+++ b/WebKit/chromium/public/WebAudioBus.h
@@ -27,8 +27,9 @@
#include "WebCommon.h"
-#if WEBKIT_IMPLEMENTATION
namespace WebCore { class AudioBus; }
+
+#if WEBKIT_IMPLEMENTATION
namespace WTF { template <typename T> class PassOwnPtr; }
#endif
@@ -43,11 +44,14 @@ class WebAudioBusPrivate;
class WebAudioBus {
public:
WebAudioBus() : m_private(0) { }
- ~WebAudioBus();
+ ~WebAudioBus() { reset(); }
// initialize() allocates memory of the given length for the given number of channels.
- void initialize(unsigned numberOfChannels, size_t length, double sampleRate);
+ WEBKIT_API void initialize(unsigned numberOfChannels, size_t length, double sampleRate);
+ // reset() releases the memory allocated from initialize().
+ WEBKIT_API void reset();
+
WEBKIT_API unsigned numberOfChannels() const;
WEBKIT_API size_t length() const;
WEBKIT_API double sampleRate() const;
@@ -59,9 +63,11 @@ public:
#endif
private:
- // Noncopyable
- WebAudioBus(const WebAudioBus& d) : m_private(0) { }
- WebAudioBusPrivate* m_private;
+ // Disallow copy and assign.
+ WebAudioBus(const WebAudioBus&);
+ void operator=(const WebAudioBus&);
+
+ WebCore::AudioBus* m_private;
};
} // namespace WebKit
diff --git a/WebKit/chromium/public/WebDevToolsAgent.h b/WebKit/chromium/public/WebDevToolsAgent.h
index 6b4d237..d6a7bcd 100644
--- a/WebKit/chromium/public/WebDevToolsAgent.h
+++ b/WebKit/chromium/public/WebDevToolsAgent.h
@@ -33,6 +33,13 @@
#include "WebCommon.h"
+#if WEBKIT_USING_V8
+namespace v8 {
+class Value;
+template <class T> class Handle;
+}
+#endif
+
namespace WebKit {
class WebDevToolsAgentClient;
class WebDevToolsMessageTransport;
@@ -58,7 +65,9 @@ public:
virtual void dispatchOnInspectorBackend(const WebString& message) = 0;
virtual void inspectElementAt(const WebPoint&) = 0;
-
+#if WEBKIT_USING_V8
+ virtual void inspectNode(v8::Handle<v8::Value>) = 0;
+#endif
virtual void setRuntimeProperty(const WebString& name, const WebString& value) = 0;
// Exposed for LayoutTestController.
diff --git a/WebKit/chromium/public/WebFormControlElement.h b/WebKit/chromium/public/WebFormControlElement.h
index ee0783d..56a02dd 100644
--- a/WebKit/chromium/public/WebFormControlElement.h
+++ b/WebKit/chromium/public/WebFormControlElement.h
@@ -51,7 +51,7 @@ public:
WebElement::assign(e);
return *this;
}
- WEBKIT_API void assign(const WebFormControlElement& e) { WebElement::assign(e); }
+ void assign(const WebFormControlElement& e) { WebElement::assign(e); }
WEBKIT_API bool isEnabled() const;
WEBKIT_API WebString formControlName() const;
diff --git a/WebKit/chromium/public/WebFrameClient.h b/WebKit/chromium/public/WebFrameClient.h
index 9063350..1c6fd04 100644
--- a/WebKit/chromium/public/WebFrameClient.h
+++ b/WebKit/chromium/public/WebFrameClient.h
@@ -86,7 +86,7 @@ public:
// A frame specific cookie jar. May return null, in which case
// WebKitClient::cookieJar() will be called to access cookies.
- virtual WebCookieJar* cookieJar() { return 0; }
+ virtual WebCookieJar* cookieJar(WebFrame*) { return 0; }
// General notifications -----------------------------------------------
diff --git a/WebKit/chromium/public/WebGeolocationClient.h b/WebKit/chromium/public/WebGeolocationClient.h
new file mode 100644
index 0000000..1dfb0cd
--- /dev/null
+++ b/WebKit/chromium/public/WebGeolocationClient.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebGeolocationClient_h
+#define WebGeolocationClient_h
+
+namespace WebKit {
+class WebGeolocationController;
+class WebGeolocationPermissionRequest;
+class WebGeolocationPosition;
+
+class WebGeolocationClient {
+public:
+ virtual ~WebGeolocationClient() {}
+
+ virtual void startUpdating() = 0;
+ virtual void stopUpdating() = 0;
+ virtual void setEnableHighAccuracy(bool) = 0;
+ virtual void geolocationDestroyed() = 0;
+ virtual bool lastPosition(WebGeolocationPosition&) = 0;
+
+ virtual void requestPermission(const WebGeolocationPermissionRequest&) = 0;
+ virtual void cancelPermissionRequest(const WebGeolocationPermissionRequest&) = 0;
+
+ // The controller is valid until geolocationDestroyed() is invoked.
+ // Ownership of the WebGeolocationController is transferred to the client.
+ virtual void setController(WebGeolocationController*) = 0;
+};
+
+} // namespace WebKit
+
+#endif // WebGeolocationClient_h
diff --git a/WebKit/chromium/public/WebGeolocationClientMock.h b/WebKit/chromium/public/WebGeolocationClientMock.h
new file mode 100644
index 0000000..08a85e2
--- /dev/null
+++ b/WebKit/chromium/public/WebGeolocationClientMock.h
@@ -0,0 +1,76 @@
+/*
+ * 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 WebGeolocationClientMock_h
+#define WebGeolocationClientMock_h
+
+#include "WebCommon.h"
+#include "WebGeolocationClient.h"
+#include "WebPrivateOwnPtr.h"
+
+namespace WebCore {
+class GeolocationClientMock;
+}
+
+namespace WebKit {
+class WebGeolocationPosition;
+class WebString;
+
+class WebGeolocationClientMock : public WebGeolocationClient {
+public:
+ WEBKIT_API static WebGeolocationClientMock* create();
+ ~WebGeolocationClientMock() { reset(); }
+
+ WEBKIT_API void setPosition(double latitude, double longitude, double accuracy);
+ WEBKIT_API void setError(int errorCode, const WebString& message);
+ WEBKIT_API void setPermission(bool);
+ WEBKIT_API void resetMock();
+
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual void setEnableHighAccuracy(bool);
+
+ virtual void geolocationDestroyed();
+ virtual void setController(WebGeolocationController*);
+
+ virtual void requestPermission(const WebGeolocationPermissionRequest&);
+ virtual void cancelPermissionRequest(const WebGeolocationPermissionRequest&);
+
+ virtual bool lastPosition(WebGeolocationPosition& webPosition);
+
+private:
+ WebGeolocationClientMock();
+ WEBKIT_API void reset();
+
+ WebPrivateOwnPtr<WebCore::GeolocationClientMock> m_clientMock;
+};
+}
+
+#endif // WebGeolocationClientMock_h
diff --git a/WebKit/chromium/public/WebGeolocationController.h b/WebKit/chromium/public/WebGeolocationController.h
new file mode 100644
index 0000000..3cddd0f
--- /dev/null
+++ b/WebKit/chromium/public/WebGeolocationController.h
@@ -0,0 +1,65 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebGeolocationController_h
+#define WebGeolocationController_h
+
+#include "WebCommon.h"
+#include "WebNonCopyable.h"
+
+namespace WebCore { class GeolocationController; }
+
+namespace WebKit {
+
+class WebGeolocationPosition;
+class WebGeolocationError;
+
+// Note that the WebGeolocationController is invalid after the
+// WebGeolocationClient::geolocationDestroyed() has been received.
+class WebGeolocationController : public WebNonCopyable {
+public:
+ WEBKIT_API void positionChanged(const WebGeolocationPosition&);
+ WEBKIT_API void errorOccurred(const WebGeolocationError&);
+
+#if WEBKIT_IMPLEMENTATION
+ WebGeolocationController(WebCore::GeolocationController* c)
+ : m_private(c)
+ {
+ }
+
+ WebCore::GeolocationController* controller() const { return m_private; }
+#endif
+
+private:
+ // No implementation for the default constructor. Declared private to ensure that no instances
+ // can be created by the consumers of Chromium WebKit.
+ WebGeolocationController();
+
+ WebCore::GeolocationController* m_private;
+};
+
+} // namespace WebKit
+
+#endif // WebGeolocationController_h
diff --git a/WebKit/chromium/public/WebGeolocationError.h b/WebKit/chromium/public/WebGeolocationError.h
index e9354d3..ecb758c 100644
--- a/WebKit/chromium/public/WebGeolocationError.h
+++ b/WebKit/chromium/public/WebGeolocationError.h
@@ -31,9 +31,10 @@
#if WEBKIT_IMPLEMENTATION
#include <wtf/PassRefPtr.h>
-namespace WebCore { class GeolocationError; }
#endif
+namespace WebCore { class GeolocationError; }
+
namespace WebKit {
class WebString;
diff --git a/WebKit/chromium/public/WebGeolocationPermissionRequest.h b/WebKit/chromium/public/WebGeolocationPermissionRequest.h
new file mode 100644
index 0000000..8b2f69e
--- /dev/null
+++ b/WebKit/chromium/public/WebGeolocationPermissionRequest.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebGeolocationPermissionRequest_h
+#define WebGeolocationPermissionRequest_h
+
+#include "WebCommon.h"
+#include "WebPrivatePtr.h"
+
+namespace WebCore {
+class Geolocation;
+}
+
+namespace WebKit {
+class WebSecurityOrigin;
+
+// WebGeolocationPermissionRequest encapsulates a WebCore Geolocation object and represents
+// a request from WebCore for permission to be determined for that Geolocation object.
+// The underlying Geolocation object is guaranteed to be valid until the invocation of
+// either WebGeolocationPermissionRequest::setIsAllowed (request complete) or
+// WebGeolocationClient::cancelPermissionRequest (request cancelled).
+class WebGeolocationPermissionRequest {
+public:
+ WEBKIT_API WebSecurityOrigin securityOrigin() const;
+ WEBKIT_API void setIsAllowed(bool);
+
+#if WEBKIT_IMPLEMENTATION
+ WebGeolocationPermissionRequest(WebCore::Geolocation* geolocation)
+ : m_private(geolocation)
+ {
+ }
+
+ WebCore::Geolocation* geolocation() const { return m_private; }
+#endif
+
+private:
+ WebCore::Geolocation* m_private;
+};
+}
+
+#endif // WebGeolocationPermissionRequest_h
diff --git a/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h b/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h
new file mode 100644
index 0000000..dfa1642
--- /dev/null
+++ b/WebKit/chromium/public/WebGeolocationPermissionRequestManager.h
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebGeolocationPermissionRequestManager_h
+#define WebGeolocationPermissionRequestManager_h
+
+#include "WebNonCopyable.h"
+#include "WebPrivateOwnPtr.h"
+
+namespace WebKit {
+
+class WebGeolocationPermissionRequest;
+class WebGeolocationPermissionRequestManagerPrivate;
+
+// This class is used to map between integer identifiers and WebGeolocationPermissionRequest
+// instances. The intended usage is that on WebGeolocationClient::requestPermission(),
+// the implementer can call add() to associate an id with the WebGeolocationPermissionRequest object.
+// Once the permission request has been decided, the second remove() method can be used to
+// find the request. On WebGeolocationClient::cancelPermissionRequest, the first remove() method will
+// remove the association with the id.
+class WebGeolocationPermissionRequestManager : public WebNonCopyable {
+public:
+ WebGeolocationPermissionRequestManager() { init(); }
+ ~WebGeolocationPermissionRequestManager() { reset(); }
+
+ WEBKIT_API int add(const WebKit::WebGeolocationPermissionRequest&);
+ WEBKIT_API bool remove(const WebKit::WebGeolocationPermissionRequest&, int&);
+ WEBKIT_API bool remove(int, WebKit::WebGeolocationPermissionRequest&);
+
+private:
+ WEBKIT_API void init();
+ WEBKIT_API void reset();
+
+ WebPrivateOwnPtr<WebGeolocationPermissionRequestManagerPrivate> m_private;
+ int m_lastId;
+};
+
+}
+
+#endif // WebGeolocationPermissionRequestManager_h
+
diff --git a/WebKit/chromium/public/WebGeolocationPosition.h b/WebKit/chromium/public/WebGeolocationPosition.h
index de73431..57ba314 100644
--- a/WebKit/chromium/public/WebGeolocationPosition.h
+++ b/WebKit/chromium/public/WebGeolocationPosition.h
@@ -31,9 +31,10 @@
#if WEBKIT_IMPLEMENTATION
#include <wtf/PassRefPtr.h>
-namespace WebCore { class GeolocationPosition; }
#endif
+namespace WebCore { class GeolocationPosition; }
+
namespace WebKit {
class WebGeolocationPosition {
diff --git a/WebKit/chromium/public/WebGraphicsContext3D.h b/WebKit/chromium/public/WebGraphicsContext3D.h
index 05c164a..035b140 100644
--- a/WebKit/chromium/public/WebGraphicsContext3D.h
+++ b/WebKit/chromium/public/WebGraphicsContext3D.h
@@ -140,6 +140,10 @@ public:
// GL_CHROMIUM_copy_texture_to_parent_texture
virtual void copyTextureToParentTextureCHROMIUM(unsigned texture, unsigned parentTexture) = 0;
+ // GL_CHROMIUM_request_extension
+ virtual WebString getRequestableExtensionsCHROMIUM() = 0;
+ virtual void requestExtensionCHROMIUM(const char*) = 0;
+
// The entry points below map directly to the OpenGL ES 2.0 API.
// See: http://www.khronos.org/registry/gles/
// and: http://www.khronos.org/opengles/sdk/docs/man/
diff --git a/WebKit/chromium/public/WebIDBCursor.h b/WebKit/chromium/public/WebIDBCursor.h
index 88b8b22..98b2b97 100644
--- a/WebKit/chromium/public/WebIDBCursor.h
+++ b/WebKit/chromium/public/WebIDBCursor.h
@@ -55,7 +55,9 @@ public:
virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
- virtual void remove(WebIDBCallbacks*, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
+ // FIXME: Remove after WK roll.
+ virtual void remove(WebIDBCallbacks* callbacks, WebExceptionCode& ec) { deleteFunction(callbacks, ec); }
+ virtual void deleteFunction(WebIDBCallbacks* callbacks, WebExceptionCode& ec) { remove(callbacks, ec); }
protected:
WebIDBCursor() { }
diff --git a/WebKit/chromium/public/WebIDBDatabase.h b/WebKit/chromium/public/WebIDBDatabase.h
index 1588e23..5ed8052 100644
--- a/WebKit/chromium/public/WebIDBDatabase.h
+++ b/WebKit/chromium/public/WebIDBDatabase.h
@@ -47,26 +47,22 @@ public:
WEBKIT_ASSERT_NOT_REACHED();
return WebString();
}
- // FIXME: remove after roll.
- virtual WebString description() const
+ virtual WebString version() const
{
+ WEBKIT_ASSERT_NOT_REACHED();
return WebString();
}
- virtual WebString version() const
+ virtual WebDOMStringList objectStoreNames() const
{
WEBKIT_ASSERT_NOT_REACHED();
- return WebString();
+ return WebDOMStringList();
}
- virtual WebDOMStringList objectStores() const { return objectStoreNames(); } // FIXME: Remove after roll.
- virtual WebDOMStringList objectStoreNames() const { return objectStores(); } // FIXME: Assert not reached after roll.
virtual WebIDBObjectStore* createObjectStore(const WebString& name, const WebString& keyPath, bool autoIncrement, const WebIDBTransaction&, WebExceptionCode&)
{
WEBKIT_ASSERT_NOT_REACHED();
return 0;
}
- virtual void deleteObjectStore(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec) { removeObjectStore(name, transaction, ec); }
- // FIXME: remove after roll.
- virtual void removeObjectStore(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec) { deleteObjectStore(name, transaction, ec); }
+ virtual void deleteObjectStore(const WebString& name, const WebIDBTransaction& transaction, WebExceptionCode& ec) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void setVersion(const WebString& version, WebIDBCallbacks* callbacks, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
// Transfers ownership of the WebIDBTransaction to the caller.
virtual WebIDBTransaction* transaction(const WebDOMStringList& names, unsigned short mode, unsigned long timeout, WebExceptionCode&)
diff --git a/WebKit/chromium/public/WebIDBFactory.h b/WebKit/chromium/public/WebIDBFactory.h
index 5e3337e..10a134a 100755
--- a/WebKit/chromium/public/WebIDBFactory.h
+++ b/WebKit/chromium/public/WebIDBFactory.h
@@ -51,17 +51,10 @@ public:
virtual ~WebIDBFactory() { }
- // FIXME: Remove after roll.
- virtual void open(const WebString& name, const WebString& description, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, const WebString& dataDir, unsigned long long maximumSize)
- {
- open(name, callbacks, origin, webFrame, dataDir, maximumSize);
- }
-
// The WebKit implementation of open ignores the WebFrame* parameter.
virtual void open(const WebString& name, WebIDBCallbacks* callbacks, const WebSecurityOrigin& origin, WebFrame* webFrame, const WebString& dataDir, unsigned long long maximumSize)
{
- // WEBKIT_ASSERT_NOT_REACHED();
- open(name, "", callbacks, origin, webFrame, dataDir, maximumSize);
+ WEBKIT_ASSERT_NOT_REACHED();
}
};
diff --git a/WebKit/chromium/public/WebIDBKey.h b/WebKit/chromium/public/WebIDBKey.h
index c77a5b7..561af2f 100644
--- a/WebKit/chromium/public/WebIDBKey.h
+++ b/WebKit/chromium/public/WebIDBKey.h
@@ -44,11 +44,16 @@ public:
~WebIDBKey() { reset(); }
WEBKIT_API static WebIDBKey createNull();
+ WEBKIT_API static WebIDBKey createString(const WebString&);
+ WEBKIT_API static WebIDBKey createDate(double);
+ WEBKIT_API static WebIDBKey createNumber(double);
WEBKIT_API static WebIDBKey createInvalid();
WEBKIT_API static WebIDBKey createFromValueAndKeyPath(const WebSerializedScriptValue&, const WebIDBKeyPath&);
- WebIDBKey(const WebString& string) { assign(string); }
- WebIDBKey(double number) { assign(number); }
+ // FIXME: Remove these two constructors after Chromium side is done.
+ WebIDBKey(const WebString& string) { assignString(string); }
+ WebIDBKey(double number) { assignNumber(number); }
+
WebIDBKey(const WebIDBKey& e) { assign(e); }
WebIDBKey& operator=(const WebIDBKey& e)
{
@@ -58,14 +63,16 @@ public:
WEBKIT_API void assign(const WebIDBKey&);
WEBKIT_API void assignNull();
- WEBKIT_API void assign(const WebString&);
- WEBKIT_API void assign(double);
+ WEBKIT_API void assignString(const WebString&);
+ WEBKIT_API void assignDate(double);
+ WEBKIT_API void assignNumber(double);
WEBKIT_API void assignInvalid();
WEBKIT_API void reset();
enum Type {
NullType = 0,
StringType,
+ DateType,
NumberType,
// Types not in WebCore::IDBKey:
InvalidType
@@ -73,7 +80,8 @@ public:
WEBKIT_API Type type() const;
WEBKIT_API WebString string() const; // Only valid for StringType.
- WEBKIT_API double number() const; // Only valid for numberType.
+ WEBKIT_API double date() const; // Only valid for DateType.
+ WEBKIT_API double number() const; // Only valid for NumberType.
#if WEBKIT_IMPLEMENTATION
WebIDBKey(const WTF::PassRefPtr<WebCore::IDBKey>&);
diff --git a/WebKit/chromium/public/WebIDBKeyRange.h b/WebKit/chromium/public/WebIDBKeyRange.h
index 6a9c6da..922d4ed 100644
--- a/WebKit/chromium/public/WebIDBKeyRange.h
+++ b/WebKit/chromium/public/WebIDBKeyRange.h
@@ -43,13 +43,6 @@ public:
WebIDBKeyRange(const WebIDBKeyRange& keyRange) { assign(keyRange); }
WebIDBKeyRange(const WebIDBKey& lower, const WebIDBKey& upper, bool lowerOpen, bool upperOpen) { assign(lower, upper, lowerOpen, upperOpen); }
- // FIXME: Remove next 3 methods after next roll.
- WebIDBKeyRange(const WebIDBKey& lower, const WebIDBKey& upper, unsigned short flags) { assign(lower, upper, flags); }
- WEBKIT_API void assign(const WebIDBKey& lower, const WebIDBKey& upper, unsigned short flags);
- WEBKIT_API unsigned short flags() const;
- WEBKIT_API WebIDBKey left() const;
- WEBKIT_API WebIDBKey right() const;
-
WEBKIT_API WebIDBKey lower() const;
WEBKIT_API WebIDBKey upper() const;
WEBKIT_API bool lowerOpen() const;
diff --git a/WebKit/chromium/public/WebIDBObjectStore.h b/WebKit/chromium/public/WebIDBObjectStore.h
index 17562ca..8f2247f 100755
--- a/WebKit/chromium/public/WebIDBObjectStore.h
+++ b/WebKit/chromium/public/WebIDBObjectStore.h
@@ -61,9 +61,7 @@ public:
virtual void get(const WebIDBKey&, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual void put(const WebSerializedScriptValue&, const WebIDBKey&, bool addOnly, WebIDBCallbacks*, const WebIDBTransaction&, WebExceptionCode&) { WEBKIT_ASSERT_NOT_REACHED(); }
- // FIXME: Remove after roll.
- virtual void remove(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) { deleteFunction(key, callbacks, transaction, ec); }
- virtual void deleteFunction(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) { remove(key, callbacks, transaction, ec); }
+ virtual void deleteFunction(const WebIDBKey& key, WebIDBCallbacks* callbacks, const WebIDBTransaction& transaction, WebExceptionCode& ec) { WEBKIT_ASSERT_NOT_REACHED(); }
virtual WebIDBIndex* createIndex(const WebString& name, const WebString& keyPath, bool unique, const WebIDBTransaction&, WebExceptionCode&)
{
WEBKIT_ASSERT_NOT_REACHED();
diff --git a/WebKit/chromium/public/WebKitClient.h b/WebKit/chromium/public/WebKitClient.h
index de801f5..bf9a97b 100644
--- a/WebKit/chromium/public/WebKitClient.h
+++ b/WebKit/chromium/public/WebKitClient.h
@@ -225,12 +225,12 @@ public:
// Decodes the in-memory audio file data and returns the linear PCM audio data in the destinationBus.
// A sample-rate conversion to sampleRate will occur if the file data is at a different sample-rate.
// Returns true on success.
- virtual bool decodeAudioFileData(WebAudioBus* destinationBus, const char* audioFileData, size_t dataSize, double sampleRate) { return false; }
+ virtual bool loadAudioResource(WebAudioBus* destinationBus, const char* audioFileData, size_t dataSize, double sampleRate) { return false; }
- // Returns a localized string resource (with an optional numeric
- // parameter value).
+ // Returns a localized string resource (with substitution parameters).
virtual WebString queryLocalizedString(WebLocalizedString::Name) { return WebString(); }
- virtual WebString queryLocalizedString(WebLocalizedString::Name, int numericValue) { return WebString(); }
+ virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebString& parameter) { return WebString(); }
+ virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebString& parameter1, const WebString& parameter2) { return WebString(); }
// Sandbox ------------------------------------------------------------
diff --git a/WebKit/chromium/public/WebPerformance.h b/WebKit/chromium/public/WebPerformance.h
index f096ac6..c7a728e 100644
--- a/WebKit/chromium/public/WebPerformance.h
+++ b/WebKit/chromium/public/WebPerformance.h
@@ -73,6 +73,11 @@ public:
WEBKIT_API double requestStart() const;
WEBKIT_API double responseStart() const;
WEBKIT_API double responseEnd() const;
+ WEBKIT_API double domLoading() const;
+ WEBKIT_API double domInteractive() const;
+ WEBKIT_API double domContentLoadedEventStart() const;
+ WEBKIT_API double domContentLoadedEventEnd() const;
+ WEBKIT_API double domComplete() const;
WEBKIT_API double loadEventStart() const;
WEBKIT_API double loadEventEnd() const;
diff --git a/WebKit/chromium/public/WebView.h b/WebKit/chromium/public/WebView.h
index d9d72c7..a18a64e 100644
--- a/WebKit/chromium/public/WebView.h
+++ b/WebKit/chromium/public/WebView.h
@@ -279,14 +279,6 @@ public:
// AutoFill -----------------------------------------------------------
- // DEPRECATED.
- virtual void applyAutoFillSuggestions(
- const WebNode&,
- const WebVector<WebString>& names,
- const WebVector<WebString>& labels,
- const WebVector<int>& uniqueIDs,
- int separatorIndex) = 0;
-
// Notifies the WebView that AutoFill suggestions are available for a node.
// |uniqueIDs| is a vector of IDs that represent the unique ID of each
// AutoFill profile in the suggestions popup. If a unique ID is 0, then the
@@ -302,14 +294,6 @@ public:
const WebVector<int>& uniqueIDs,
int separatorIndex) = 0;
- // Notifies the WebView that Autocomplete suggestions are available for a
- // node.
- // DEPRECATED: merging with applyAutoFillSuggestions.
- virtual void applyAutocompleteSuggestions(
- const WebNode&,
- const WebVector<WebString>& suggestions,
- int defaultSuggestionIndex) = 0;
-
// Hides any popup (suggestions, selects...) that might be showing.
virtual void hidePopups() = 0;
diff --git a/WebKit/chromium/public/WebViewClient.h b/WebKit/chromium/public/WebViewClient.h
index 7ce1483..033e120 100644
--- a/WebKit/chromium/public/WebViewClient.h
+++ b/WebKit/chromium/public/WebViewClient.h
@@ -52,6 +52,7 @@ class WebExternalPopupMenu;
class WebExternalPopupMenuClient;
class WebFileChooserCompletion;
class WebFrame;
+class WebGeolocationClient;
class WebGeolocationService;
class WebImage;
class WebInputElement;
@@ -340,7 +341,9 @@ public:
// Geolocation ---------------------------------------------------------
- // Access the embedder API for geolocation services.
+ // Access the embedder API for (client-based) geolocation client .
+ virtual WebGeolocationClient* geolocationClient() { return 0; }
+ // Access the embedder API for (non-client-based) geolocation services.
virtual WebGeolocationService* geolocationService() { return 0; }
// Speech --------------------------------------------------------------
diff --git a/WebKit/chromium/src/ApplicationCacheHost.cpp b/WebKit/chromium/src/ApplicationCacheHost.cpp
index a6e66c6..85dfd20 100644
--- a/WebKit/chromium/src/ApplicationCacheHost.cpp
+++ b/WebKit/chromium/src/ApplicationCacheHost.cpp
@@ -106,9 +106,9 @@ void ApplicationCacheHost::selectCacheWithManifest(const KURL& manifestURL)
// same resource being loaded, because "foreign" entries are never picked
// during navigation.
// see WebCore::ApplicationCacheGroup::selectCache()
- const KURL& docURL = m_documentLoader->frame()->document()->url();
- String referrer = m_documentLoader->frameLoader()->referrer();
- m_documentLoader->frame()->navigationScheduler()->scheduleLocationChange(docURL, referrer);
+ Frame* frame = m_documentLoader->frame();
+ frame->navigationScheduler()->scheduleLocationChange(frame->document()->securityOrigin(),
+ frame->document()->url(), frame->loader()->referrer());
}
}
}
diff --git a/WebKit/chromium/src/AssertMatchingEnums.cpp b/WebKit/chromium/src/AssertMatchingEnums.cpp
index ceeed8d..ba9b4e7 100644
--- a/WebKit/chromium/src/AssertMatchingEnums.cpp
+++ b/WebKit/chromium/src/AssertMatchingEnums.cpp
@@ -365,6 +365,7 @@ COMPILE_ASSERT_MATCHING_ENUM(WebView::UserStyleInjectInSubsequentDocuments, Inje
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NullType, IDBKey::NullType);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::StringType, IDBKey::StringType);
+COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::DateType, IDBKey::DateType);
COMPILE_ASSERT_MATCHING_ENUM(WebIDBKey::NumberType, IDBKey::NumberType);
#if ENABLE(FILE_SYSTEM)
diff --git a/WebKit/chromium/src/AssociatedURLLoader.cpp b/WebKit/chromium/src/AssociatedURLLoader.cpp
index f494a0e..34a4055 100644
--- a/WebKit/chromium/src/AssociatedURLLoader.cpp
+++ b/WebKit/chromium/src/AssociatedURLLoader.cpp
@@ -42,7 +42,8 @@ namespace WebKit {
AssociatedURLLoader::AssociatedURLLoader(PassRefPtr<WebFrameImpl> frameImpl)
: m_frameImpl(frameImpl),
- m_realLoader(webKitClient()->createURLLoader())
+ m_realLoader(webKitClient()->createURLLoader()),
+ m_realClient(0)
{
}
@@ -52,6 +53,8 @@ AssociatedURLLoader::~AssociatedURLLoader()
void AssociatedURLLoader::loadSynchronously(const WebURLRequest& request, WebURLResponse& response, WebURLError& error, WebData& data)
{
+ ASSERT(!m_realClient);
+
WebURLRequest requestCopy(request);
prepareRequest(requestCopy);
@@ -60,10 +63,13 @@ void AssociatedURLLoader::loadSynchronously(const WebURLRequest& request, WebURL
void AssociatedURLLoader::loadAsynchronously(const WebURLRequest& request, WebURLLoaderClient* client)
{
+ ASSERT(!m_realClient);
+
WebURLRequest requestCopy(request);
prepareRequest(requestCopy);
- m_realLoader->loadAsynchronously(requestCopy, client);
+ m_realClient = client;
+ m_realLoader->loadAsynchronously(requestCopy, this);
}
void AssociatedURLLoader::cancel()
@@ -84,4 +90,44 @@ void AssociatedURLLoader::prepareRequest(WebURLRequest& request)
m_frameImpl->dispatchWillSendRequest(request);
}
+void AssociatedURLLoader::willSendRequest(WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirectResponse)
+{
+ m_realClient->willSendRequest(this, newRequest, redirectResponse);
+}
+
+void AssociatedURLLoader::didSendData(WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent)
+{
+ m_realClient->didSendData(this, bytesSent, totalBytesToBeSent);
+}
+
+void AssociatedURLLoader::didReceiveResponse(WebURLLoader*, const WebURLResponse& response)
+{
+ m_realClient->didReceiveResponse(this, response);
+}
+
+void AssociatedURLLoader::didDownloadData(WebURLLoader*, int dataLength)
+{
+ m_realClient->didDownloadData(this, dataLength);
+}
+
+void AssociatedURLLoader::didReceiveData(WebURLLoader*, const char* data, int dataLength)
+{
+ m_realClient->didReceiveData(this, data, dataLength);
+}
+
+void AssociatedURLLoader::didReceiveCachedMetadata(WebURLLoader*, const char* data, int dataLength)
+{
+ m_realClient->didReceiveCachedMetadata(this, data, dataLength);
+}
+
+void AssociatedURLLoader::didFinishLoading(WebURLLoader*, double finishTime)
+{
+ m_realClient->didFinishLoading(this, finishTime);
+}
+
+void AssociatedURLLoader::didFail(WebURLLoader*, const WebURLError& error)
+{
+ m_realClient->didFail(this, error);
+}
+
} // namespace WebKit
diff --git a/WebKit/chromium/src/AssociatedURLLoader.h b/WebKit/chromium/src/AssociatedURLLoader.h
index 4c9f54e..91cb0bf 100644
--- a/WebKit/chromium/src/AssociatedURLLoader.h
+++ b/WebKit/chromium/src/AssociatedURLLoader.h
@@ -32,6 +32,7 @@
#define AssociatedURLLoader_h
#include "WebURLLoader.h"
+#include "WebURLLoaderClient.h"
#include <wtf/OwnPtr.h>
#include <wtf/RefPtr.h>
@@ -41,7 +42,8 @@ class WebFrameImpl;
// This class is used to implement WebFrame::createAssociatedURLLoader.
// FIXME: Implement in terms of WebCore::SubresourceLoader.
-class AssociatedURLLoader : public WebURLLoader {
+class AssociatedURLLoader : public WebURLLoader,
+ public WebURLLoaderClient {
public:
AssociatedURLLoader(PassRefPtr<WebFrameImpl>);
~AssociatedURLLoader();
@@ -52,11 +54,22 @@ public:
virtual void cancel();
virtual void setDefersLoading(bool);
+ // WebURLLoaderClient methods:
+ virtual void willSendRequest(WebURLLoader*, WebURLRequest& newRequest, const WebURLResponse& redirectResponse);
+ virtual void didSendData(WebURLLoader*, unsigned long long bytesSent, unsigned long long totalBytesToBeSent);
+ virtual void didReceiveResponse(WebURLLoader*, const WebURLResponse&);
+ virtual void didDownloadData(WebURLLoader*, int dataLength);
+ virtual void didReceiveData(WebURLLoader*, const char* data, int dataLength);
+ virtual void didReceiveCachedMetadata(WebURLLoader*, const char* data, int dataLength);
+ virtual void didFinishLoading(WebURLLoader*, double finishTime);
+ virtual void didFail(WebURLLoader*, const WebURLError&);
+
private:
void prepareRequest(WebURLRequest&);
RefPtr<WebFrameImpl> m_frameImpl;
OwnPtr<WebURLLoader> m_realLoader;
+ WebURLLoaderClient* m_realClient;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
index 32abd6f..704ba69 100644
--- a/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
+++ b/WebKit/chromium/src/AutoFillPopupMenuClient.cpp
@@ -51,7 +51,6 @@ AutoFillPopupMenuClient::AutoFillPopupMenuClient()
: m_separatorIndex(-1)
, m_selectedIndex(-1)
, m_textField(0)
- , m_AutocompleteModeEnabled(false)
{
}
@@ -123,36 +122,20 @@ bool AutoFillPopupMenuClient::canRemoveSuggestionAtIndex(unsigned listIndex)
void AutoFillPopupMenuClient::valueChanged(unsigned listIndex, bool fireEvents)
{
- // DEPRECATED: Will be removed once AutoFill and Autocomplete merge is
- // completed.
- if (m_AutocompleteModeEnabled) {
- m_textField->setValue(getSuggestion(listIndex));
-
- WebViewImpl* webView = getWebView();
- if (!webView)
- return;
-
- EditorClientImpl* editor =
- static_cast<EditorClientImpl*>(webView->page()->editorClient());
- ASSERT(editor);
- editor->onAutocompleteSuggestionAccepted(
- static_cast<HTMLInputElement*>(m_textField.get()));
- } else {
- WebViewImpl* webView = getWebView();
- if (!webView)
- return;
-
- if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
- --listIndex;
-
- ASSERT(listIndex < m_names.size());
-
- webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()),
- m_names[listIndex],
- m_labels[listIndex],
- m_uniqueIDs[listIndex],
- listIndex);
- }
+ WebViewImpl* webView = getWebView();
+ if (!webView)
+ return;
+
+ if (m_separatorIndex != -1 && listIndex > static_cast<unsigned>(m_separatorIndex))
+ --listIndex;
+
+ ASSERT(listIndex < m_names.size());
+
+ webView->client()->didAcceptAutoFillSuggestion(WebNode(getTextField()),
+ m_names[listIndex],
+ m_labels[listIndex],
+ m_uniqueIDs[listIndex],
+ listIndex);
}
void AutoFillPopupMenuClient::selectionChanged(unsigned listIndex, bool fireEvents)
diff --git a/WebKit/chromium/src/AutoFillPopupMenuClient.h b/WebKit/chromium/src/AutoFillPopupMenuClient.h
index e3edfd3..0129a81 100644
--- a/WebKit/chromium/src/AutoFillPopupMenuClient.h
+++ b/WebKit/chromium/src/AutoFillPopupMenuClient.h
@@ -114,10 +114,6 @@ public:
const WebVector<int>& uniqueIDs,
int separatorIndex);
- // DEPRECATED: Will be removed once Autocomplete and AutoFill merge is
- // complete.
- void setAutocompleteMode(bool enabled) { m_AutocompleteModeEnabled = enabled; }
-
private:
// Convert the specified index from an index into the visible list (which might
// include a separator entry) to an index to |m_names| and |m_labels|.
@@ -147,10 +143,6 @@ private:
RefPtr<WebCore::HTMLInputElement> m_textField;
OwnPtr<WebCore::PopupMenuStyle> m_regularStyle;
OwnPtr<WebCore::PopupMenuStyle> m_warningStyle;
-
- // DEPRECATED: Will be removed once Autocomplete and AutoFill merge is
- // complete.
- bool m_AutocompleteModeEnabled;
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/ChromeClientImpl.cpp b/WebKit/chromium/src/ChromeClientImpl.cpp
index 7b67ede..28d78d0 100644
--- a/WebKit/chromium/src/ChromeClientImpl.cpp
+++ b/WebKit/chromium/src/ChromeClientImpl.cpp
@@ -776,11 +776,13 @@ NotificationPresenter* ChromeClientImpl::notificationPresenter() const
}
#endif
+// FIXME: Remove ChromeClientImpl::requestGeolocationPermissionForFrame and ChromeClientImpl::cancelGeolocationPermissionRequestForFrame
+// once all ports have moved to client-based geolocation (see https://bugs.webkit.org/show_bug.cgi?id=40373 ).
+// For client-based geolocation, these methods are now implemented as WebGeolocationClient::requestPermission and WebGeolocationClient::cancelPermissionRequest.
+// (see https://bugs.webkit.org/show_bug.cgi?id=50061 ).
void ChromeClientImpl::requestGeolocationPermissionForFrame(Frame* frame, Geolocation* geolocation)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- // FIXME: Implement Client-based Geolocation Permissions
-#else
+#if !ENABLE(CLIENT_BASED_GEOLOCATION)
GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService());
geolocationService->geolocationServiceBridge()->attachBridgeIfNeeded();
m_webView->client()->geolocationService()->requestPermissionForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url());
@@ -789,9 +791,7 @@ void ChromeClientImpl::requestGeolocationPermissionForFrame(Frame* frame, Geoloc
void ChromeClientImpl::cancelGeolocationPermissionRequestForFrame(Frame* frame, Geolocation* geolocation)
{
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
- // FIXME: Implement Client-based Geolocation Permissions
-#else
+#if !ENABLE(CLIENT_BASED_GEOLOCATION)
GeolocationServiceChromium* geolocationService = static_cast<GeolocationServiceChromium*>(geolocation->getGeolocationService());
m_webView->client()->geolocationService()->cancelPermissionRequestForFrame(geolocationService->geolocationServiceBridge()->getBridgeId(), frame->document()->url());
#endif
diff --git a/WebKit/chromium/src/ChromiumBridge.cpp b/WebKit/chromium/src/ChromiumBridge.cpp
index e9d1da6..e94a04f 100644
--- a/WebKit/chromium/src/ChromiumBridge.cpp
+++ b/WebKit/chromium/src/ChromiumBridge.cpp
@@ -134,7 +134,7 @@ static WebCookieJar* getCookieJar(const Document* document)
WebFrameImpl* frameImpl = WebFrameImpl::fromFrame(document->frame());
if (!frameImpl || !frameImpl->client())
return 0;
- WebCookieJar* cookieJar = frameImpl->client()->cookieJar();
+ WebCookieJar* cookieJar = frameImpl->client()->cookieJar(frameImpl);
if (!cookieJar)
cookieJar = webKitClient()->cookieJar();
return cookieJar;
@@ -636,7 +636,7 @@ PassOwnPtr<AudioBus> ChromiumBridge::loadPlatformAudioResource(const char* name,
PassOwnPtr<AudioBus> ChromiumBridge::decodeAudioFileData(const char* data, size_t size, double sampleRate)
{
WebAudioBus webAudioBus;
- if (webKitClient()->decodeAudioFileData(&webAudioBus, data, size, sampleRate))
+ if (webKitClient()->loadAudioResource(&webAudioBus, data, size, sampleRate))
return webAudioBus.release();
return 0;
}
diff --git a/WebKit/chromium/src/ContextMenuClientImpl.cpp b/WebKit/chromium/src/ContextMenuClientImpl.cpp
index d33a06b..7bd1a2b 100644
--- a/WebKit/chromium/src/ContextMenuClientImpl.cpp
+++ b/WebKit/chromium/src/ContextMenuClientImpl.cpp
@@ -34,6 +34,7 @@
#include "CSSPropertyNames.h"
#include "CSSStyleDeclaration.h"
#include "ContextMenu.h"
+#include "ContextMenuController.h"
#include "Document.h"
#include "DocumentLoader.h"
#include "Editor.h"
@@ -45,6 +46,7 @@
#include "HTMLNames.h"
#include "KURL.h"
#include "MediaError.h"
+#include "Page.h"
#include "PlatformString.h"
#include "RenderWidget.h"
#include "TextBreakIterator.h"
@@ -110,7 +112,7 @@ static String selectMisspelledWord(const ContextMenu* defaultMenu, Frame* select
// Selection is empty, so change the selection to the word under the cursor.
HitTestResult hitTestResult = selectedFrame->eventHandler()->
- hitTestResultAtPoint(defaultMenu->hitTestResult().point(), true);
+ hitTestResultAtPoint(selectedFrame->page()->contextMenuController()->hitTestResult().point(), true);
Node* innerNode = hitTestResult.innerNode();
VisiblePosition pos(innerNode->renderer()->positionForPoint(
hitTestResult.localPoint()));
@@ -144,7 +146,7 @@ PlatformMenuDescription ContextMenuClientImpl::getCustomMenuFromDefaultItems(
if (!m_webView->contextMenuAllowed())
return 0;
- HitTestResult r = defaultMenu->hitTestResult();
+ HitTestResult r = m_webView->page()->contextMenuController()->hitTestResult();
Frame* selectedFrame = r.innerNonSharedNode()->document()->frame();
WebContextMenuData data;
diff --git a/WebKit/chromium/src/EditorClientImpl.cpp b/WebKit/chromium/src/EditorClientImpl.cpp
index bc1d206..6f1739f 100644
--- a/WebKit/chromium/src/EditorClientImpl.cpp
+++ b/WebKit/chromium/src/EditorClientImpl.cpp
@@ -929,7 +929,8 @@ bool EditorClientImpl::spellingUIIsShowing()
return false;
}
-void EditorClientImpl::getGuessesForWord(const String&,
+void EditorClientImpl::getGuessesForWord(const String& word,
+ const String& context,
WTF::Vector<String>& guesses)
{
notImplemented();
diff --git a/WebKit/chromium/src/EditorClientImpl.h b/WebKit/chromium/src/EditorClientImpl.h
index b05a592..9dbd6af 100644
--- a/WebKit/chromium/src/EditorClientImpl.h
+++ b/WebKit/chromium/src/EditorClientImpl.h
@@ -107,9 +107,11 @@ public:
virtual void showSpellingUI(bool show);
virtual bool spellingUIIsShowing();
virtual void getGuessesForWord(const WTF::String& word,
+ const WTF::String& context,
WTF::Vector<WTF::String>& guesses);
virtual void willSetInputMethodState();
virtual void setInputMethodState(bool enabled);
+ virtual void requestCheckingOfString(WebCore::SpellChecker*, int, const WTF::String&) {}
// Shows the form autofill popup for |node| if it is an HTMLInputElement and
// it is empty. This is called when you press the up or down arrow in a
diff --git a/WebKit/chromium/src/Extensions3DChromium.cpp b/WebKit/chromium/src/Extensions3DChromium.cpp
index fe04986..ca2215e 100644
--- a/WebKit/chromium/src/Extensions3DChromium.cpp
+++ b/WebKit/chromium/src/Extensions3DChromium.cpp
@@ -48,6 +48,15 @@ bool Extensions3DChromium::supports(const String& name)
return m_internal->supportsExtension(name);
}
+void Extensions3DChromium::ensureEnabled(const String& name)
+{
+#ifndef NDEBUG
+ bool result =
+#endif
+ m_internal->ensureExtensionEnabled(name);
+ ASSERT(result);
+}
+
int Extensions3DChromium::getGraphicsResetStatusARB()
{
return m_internal->isContextLost() ? static_cast<int>(Extensions3D::UNKNOWN_CONTEXT_RESET_ARB) : static_cast<int>(GraphicsContext3D::NO_ERROR);
diff --git a/WebKit/chromium/src/FrameLoaderClientImpl.cpp b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
index 9d79599..9beef26 100644
--- a/WebKit/chromium/src/FrameLoaderClientImpl.cpp
+++ b/WebKit/chromium/src/FrameLoaderClientImpl.cpp
@@ -817,7 +817,8 @@ Frame* FrameLoaderClientImpl::dispatchCreatePage(const NavigationAction& action)
{
struct WindowFeatures features;
Page* newPage = m_webFrame->frame()->page()->chrome()->createWindow(
- m_webFrame->frame(), FrameLoadRequest(), features, action);
+ m_webFrame->frame(), FrameLoadRequest(m_webFrame->frame()->document()->securityOrigin()),
+ features, action);
// Make sure that we have a valid disposition. This should have been set in
// the preceeding call to dispatchDecidePolicyForNewWindowAction.
@@ -1378,7 +1379,8 @@ PassRefPtr<Frame> FrameLoaderClientImpl::createFrame(
int marginWidth,
int marginHeight)
{
- FrameLoadRequest frameRequest(ResourceRequest(url, referrer), name);
+ FrameLoadRequest frameRequest(m_webFrame->frame()->document()->securityOrigin(),
+ ResourceRequest(url, referrer), name);
return m_webFrame->createChildFrame(frameRequest, ownerElement);
}
diff --git a/WebKit/chromium/src/GeolocationClientProxy.cpp b/WebKit/chromium/src/GeolocationClientProxy.cpp
new file mode 100644
index 0000000..b2536dd
--- /dev/null
+++ b/WebKit/chromium/src/GeolocationClientProxy.cpp
@@ -0,0 +1,98 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "GeolocationClientProxy.h"
+
+#include "Geolocation.h"
+#include "GeolocationPosition.h"
+#include "WebGeolocationClient.h"
+#include "WebGeolocationController.h"
+#include "WebGeolocationPermissionRequest.h"
+#include "WebGeolocationPosition.h"
+
+namespace WebKit {
+
+GeolocationClientProxy::GeolocationClientProxy(WebGeolocationClient* client)
+ : m_client(client)
+{
+}
+
+GeolocationClientProxy::~GeolocationClientProxy()
+{
+}
+
+void GeolocationClientProxy::setController(WebCore::GeolocationController* controller)
+{
+ // We support there not being a client, provided we don't do any Geolocation.
+ if (m_client) {
+ // Ownership of the WebGeolocationController is transferred to the client.
+ m_client->setController(new WebGeolocationController(controller));
+ }
+}
+
+void GeolocationClientProxy::geolocationDestroyed()
+{
+ if (m_client)
+ m_client->geolocationDestroyed();
+}
+
+void GeolocationClientProxy::startUpdating()
+{
+ m_client->startUpdating();
+}
+
+void GeolocationClientProxy::stopUpdating()
+{
+ m_client->stopUpdating();
+}
+
+void GeolocationClientProxy::setEnableHighAccuracy(bool highAccuracy)
+{
+ m_client->setEnableHighAccuracy(highAccuracy);
+}
+
+WebCore::GeolocationPosition* GeolocationClientProxy::lastPosition()
+{
+ WebGeolocationPosition webPosition;
+ if (m_client->lastPosition(webPosition))
+ m_lastPosition = webPosition;
+ else
+ m_lastPosition.clear();
+
+ return m_lastPosition.get();
+}
+
+void GeolocationClientProxy::requestPermission(WebCore::Geolocation* geolocation)
+{
+ m_client->requestPermission(WebGeolocationPermissionRequest(geolocation));
+}
+
+void GeolocationClientProxy::cancelPermissionRequest(WebCore::Geolocation* geolocation)
+{
+ m_client->cancelPermissionRequest(WebGeolocationPermissionRequest(geolocation));
+}
+
+}
diff --git a/WebKit/chromium/src/GeolocationClientProxy.h b/WebKit/chromium/src/GeolocationClientProxy.h
new file mode 100644
index 0000000..ee175dc
--- /dev/null
+++ b/WebKit/chromium/src/GeolocationClientProxy.h
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef GeolocationClientProxy_h
+#define GeolocationClientProxy_h
+
+#include "GeolocationClient.h"
+#include "WebGeolocationController.h"
+#include <wtf/RefPtr.h>
+
+namespace WebCore {
+class GeolocationPosition;
+}
+
+namespace WebKit {
+class WebGeolocationClient;
+
+class GeolocationClientProxy : public WebCore::GeolocationClient {
+public:
+ GeolocationClientProxy(WebGeolocationClient* client);
+ ~GeolocationClientProxy();
+ void setController(WebCore::GeolocationController *controller);
+ virtual void geolocationDestroyed();
+ virtual void startUpdating();
+ virtual void stopUpdating();
+ virtual void setEnableHighAccuracy(bool);
+ virtual WebCore::GeolocationPosition* lastPosition();
+
+ virtual void requestPermission(WebCore::Geolocation*);
+ virtual void cancelPermissionRequest(WebCore::Geolocation*);
+
+private:
+ WebGeolocationClient* m_client;
+ RefPtr<WebCore::GeolocationPosition> m_lastPosition;
+};
+
+} // namespace WebKit
+
+#endif // GeolocationClientProxy_h
diff --git a/WebKit/chromium/src/GraphicsContext3DChromium.cpp b/WebKit/chromium/src/GraphicsContext3DChromium.cpp
index cc0c5bc..2dff52b 100644
--- a/WebKit/chromium/src/GraphicsContext3DChromium.cpp
+++ b/WebKit/chromium/src/GraphicsContext3DChromium.cpp
@@ -681,17 +681,54 @@ Extensions3D* GraphicsContext3DInternal::getExtensions()
return m_extensions.get();
}
-bool GraphicsContext3DInternal::supportsExtension(const String& name)
+namespace {
+
+void splitStringHelper(const String& str, HashSet<String>& set)
+{
+ Vector<String> substrings;
+ str.split(" ", substrings);
+ for (size_t i = 0; i < substrings.size(); ++i)
+ set.add(substrings[i]);
+}
+
+} // anonymous namespace
+
+void GraphicsContext3DInternal::initializeExtensions()
{
if (!m_initializedAvailableExtensions) {
String extensionsString = getString(GraphicsContext3D::EXTENSIONS);
- Vector<String> availableExtensions;
- extensionsString.split(" ", availableExtensions);
- for (size_t i = 0; i < availableExtensions.size(); ++i)
- m_availableExtensions.add(availableExtensions[i]);
+ splitStringHelper(extensionsString, m_enabledExtensions);
+
+ String requestableExtensionsString = m_impl->getRequestableExtensionsCHROMIUM();
+ splitStringHelper(requestableExtensionsString, m_requestableExtensions);
+
m_initializedAvailableExtensions = true;
}
- return m_availableExtensions.contains(name);
+}
+
+
+bool GraphicsContext3DInternal::supportsExtension(const String& name)
+{
+ initializeExtensions();
+ return m_enabledExtensions.contains(name) || m_requestableExtensions.contains(name);
+}
+
+bool GraphicsContext3DInternal::ensureExtensionEnabled(const String& name)
+{
+ initializeExtensions();
+
+ if (m_enabledExtensions.contains(name))
+ return true;
+
+ if (m_requestableExtensions.contains(name)) {
+ m_impl->requestExtensionCHROMIUM(name.ascii().data());
+ m_enabledExtensions.clear();
+ m_requestableExtensions.clear();
+ m_initializedAvailableExtensions = false;
+ }
+
+ initializeExtensions();
+ return m_enabledExtensions.contains(name);
}
DELEGATE_TO_IMPL_4R(mapBufferSubDataCHROMIUM, unsigned, int, int, unsigned, void*)
diff --git a/WebKit/chromium/src/GraphicsContext3DInternal.h b/WebKit/chromium/src/GraphicsContext3DInternal.h
index 220cbb8..ad54a4f 100644
--- a/WebKit/chromium/src/GraphicsContext3DInternal.h
+++ b/WebKit/chromium/src/GraphicsContext3DInternal.h
@@ -265,6 +265,7 @@ public:
// Extensions3D support.
Extensions3D* getExtensions();
bool supportsExtension(const String& name);
+ bool ensureExtensionEnabled(const String& name);
// EXT_texture_format_BGRA8888
bool supportsBGRA();
@@ -285,7 +286,8 @@ private:
OwnPtr<Extensions3DChromium> m_extensions;
WebKit::WebViewImpl* m_webViewImpl;
bool m_initializedAvailableExtensions;
- HashSet<String> m_availableExtensions;
+ HashSet<String> m_enabledExtensions;
+ HashSet<String> m_requestableExtensions;
#if USE(ACCELERATED_COMPOSITING)
RefPtr<WebGLLayerChromium> m_compositingLayer;
#endif
@@ -301,6 +303,8 @@ private:
#if PLATFORM(CG)
unsigned char* m_renderOutput;
#endif
+
+ void initializeExtensions();
};
} // namespace WebCore
diff --git a/WebKit/chromium/src/IDBCursorBackendProxy.cpp b/WebKit/chromium/src/IDBCursorBackendProxy.cpp
index 94491f9..ec7bf63 100644
--- a/WebKit/chromium/src/IDBCursorBackendProxy.cpp
+++ b/WebKit/chromium/src/IDBCursorBackendProxy.cpp
@@ -85,9 +85,9 @@ void IDBCursorBackendProxy::continueFunction(PassRefPtr<IDBKey> key, PassRefPtr<
m_idbCursor->continueFunction(key, new WebIDBCallbacksImpl(callbacks), ec);
}
-void IDBCursorBackendProxy::remove(PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec)
+void IDBCursorBackendProxy::deleteFunction(PassRefPtr<IDBCallbacks> callbacks, ExceptionCode& ec)
{
- m_idbCursor->remove(new WebIDBCallbacksImpl(callbacks), ec);
+ m_idbCursor->deleteFunction(new WebIDBCallbacksImpl(callbacks), ec);
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/IDBCursorBackendProxy.h b/WebKit/chromium/src/IDBCursorBackendProxy.h
index 0a7a288..650dded 100644
--- a/WebKit/chromium/src/IDBCursorBackendProxy.h
+++ b/WebKit/chromium/src/IDBCursorBackendProxy.h
@@ -47,7 +47,7 @@ public:
virtual PassRefPtr<IDBAny> value() const;
virtual void update(PassRefPtr<SerializedScriptValue>, PassRefPtr<IDBCallbacks>, ExceptionCode&);
virtual void continueFunction(PassRefPtr<IDBKey>, PassRefPtr<IDBCallbacks>, ExceptionCode&);
- virtual void remove(PassRefPtr<IDBCallbacks>, ExceptionCode&);
+ virtual void deleteFunction(PassRefPtr<IDBCallbacks>, ExceptionCode&);
private:
IDBCursorBackendProxy(PassOwnPtr<WebKit::WebIDBCursor>);
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.cpp b/WebKit/chromium/src/IDBDatabaseProxy.cpp
index 685f53c..f070d64 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.cpp
+++ b/WebKit/chromium/src/IDBDatabaseProxy.cpp
@@ -61,11 +61,6 @@ String IDBDatabaseProxy::name() const
return m_webIDBDatabase->name();
}
-String IDBDatabaseProxy::description() const
-{
- return m_webIDBDatabase->description();
-}
-
String IDBDatabaseProxy::version() const
{
return m_webIDBDatabase->version();
diff --git a/WebKit/chromium/src/IDBDatabaseProxy.h b/WebKit/chromium/src/IDBDatabaseProxy.h
index 84693f2..c51a604 100644
--- a/WebKit/chromium/src/IDBDatabaseProxy.h
+++ b/WebKit/chromium/src/IDBDatabaseProxy.h
@@ -43,7 +43,6 @@ public:
virtual ~IDBDatabaseProxy();
virtual String name() const;
- virtual String description() const;
virtual String version() const;
virtual PassRefPtr<DOMStringList> objectStoreNames() const;
diff --git a/WebKit/chromium/src/LocalizedStrings.cpp b/WebKit/chromium/src/LocalizedStrings.cpp
index e7b39d5..ab14009 100644
--- a/WebKit/chromium/src/LocalizedStrings.cpp
+++ b/WebKit/chromium/src/LocalizedStrings.cpp
@@ -43,6 +43,7 @@
#include <wtf/text/WTFString.h>
using WebKit::WebLocalizedString;
+using WebKit::WebString;
namespace WebCore {
@@ -51,9 +52,14 @@ static String query(WebLocalizedString::Name name)
return WebKit::webKitClient()->queryLocalizedString(name);
}
-static String query(WebLocalizedString::Name name, int numericValue)
+static String query(WebLocalizedString::Name name, const WebString& parameter)
{
- return WebKit::webKitClient()->queryLocalizedString(name, numericValue);
+ return WebKit::webKitClient()->queryLocalizedString(name, parameter);
+}
+
+static String query(WebLocalizedString::Name name, const WebString& parameter1, const WebString& parameter2)
+{
+ return WebKit::webKitClient()->queryLocalizedString(name, parameter1, parameter2);
}
String searchableIndexIntroduction()
@@ -191,7 +197,7 @@ String crashedPluginText()
String multipleFileUploadText(unsigned numberOfFiles)
{
- return query(WebLocalizedString::MultipleFileUploadText, numberOfFiles);
+ return query(WebLocalizedString::MultipleFileUploadText, String::number(numberOfFiles));
}
// Used in FTPDirectoryDocument.cpp
@@ -350,28 +356,24 @@ String validationMessagePatternMismatchText()
return query(WebLocalizedString::ValidationPatternMismatch);
}
-String validationMessageTooLongText(int, int)
+String validationMessageTooLongText(int valueLength, int maxLength)
{
- // FIXME: pass the arguments.
- return query(WebLocalizedString::ValidationTooLong);
+ return query(WebLocalizedString::ValidationTooLong, String::number(valueLength), String::number(maxLength));
}
-String validationMessageRangeUnderflowText(const String&)
+String validationMessageRangeUnderflowText(const String& minimum)
{
- // FIXME: pass the arguments.
- return query(WebLocalizedString::ValidationRangeUnderflow);
+ return query(WebLocalizedString::ValidationRangeUnderflow, minimum);
}
-String validationMessageRangeOverflowText(const String&)
+String validationMessageRangeOverflowText(const String& maximum)
{
- // FIXME: pass the arguments.
- return query(WebLocalizedString::ValidationRangeOverflow);
+ return query(WebLocalizedString::ValidationRangeOverflow, maximum);
}
-String validationMessageStepMismatchText(const String&, const String&)
+String validationMessageStepMismatchText(const String& base, const String& step)
{
- // FIXME: pass the arguments.
- return query(WebLocalizedString::ValidationStepMismatch);
+ return query(WebLocalizedString::ValidationStepMismatch, base, step);
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/StorageAreaProxy.cpp b/WebKit/chromium/src/StorageAreaProxy.cpp
index 5311b65..ed89b2c 100644
--- a/WebKit/chromium/src/StorageAreaProxy.cpp
+++ b/WebKit/chromium/src/StorageAreaProxy.cpp
@@ -129,7 +129,7 @@ void StorageAreaProxy::storageEvent(const String& key, const String& oldValue, c
ExceptionCode ec = 0;
Storage* storage = frames[i]->domWindow()->sessionStorage(ec);
if (!ec)
- frames[i]->document()->enqueueEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), storage));
+ frames[i]->document()->enqueueWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), storage));
}
} else {
// Send events to every page.
@@ -146,7 +146,7 @@ void StorageAreaProxy::storageEvent(const String& key, const String& oldValue, c
ExceptionCode ec = 0;
Storage* storage = frames[i]->domWindow()->localStorage(ec);
if (!ec)
- frames[i]->document()->enqueueEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), storage));
+ frames[i]->document()->enqueueWindowEvent(StorageEvent::create(eventNames().storageEvent, key, oldValue, newValue, sourceFrame->document()->url(), storage));
}
}
}
diff --git a/WebKit/chromium/src/WebAccessibilityObject.cpp b/WebKit/chromium/src/WebAccessibilityObject.cpp
index 9df69cf..50baa27 100644
--- a/WebKit/chromium/src/WebAccessibilityObject.cpp
+++ b/WebKit/chromium/src/WebAccessibilityObject.cpp
@@ -44,6 +44,7 @@
#include "WebPoint.h"
#include "WebRect.h"
#include "WebString.h"
+#include "WebURL.h"
using namespace WebCore;
@@ -379,7 +380,7 @@ WebAccessibilityObject WebAccessibilityObject::hitTest(const WebPoint& point) co
m_private->updateBackingStore();
IntPoint contentsPoint = m_private->documentFrameView()->windowToContents(point);
- RefPtr<AccessibilityObject> hit = m_private->doAccessibilityHitTest(contentsPoint);
+ RefPtr<AccessibilityObject> hit = m_private->accessibilityHitTest(contentsPoint);
if (hit.get())
return WebAccessibilityObject(hit);
@@ -461,6 +462,14 @@ WebString WebAccessibilityObject::title() const
return m_private->title();
}
+WebURL WebAccessibilityObject::url() const
+{
+ if (!m_private)
+ return WebURL();
+
+ m_private->updateBackingStore();
+ return m_private->url();
+}
WebNode WebAccessibilityObject::node() const
{
diff --git a/WebKit/chromium/src/WebAudioBus.cpp b/WebKit/chromium/src/WebAudioBus.cpp
index ceccafc..9d4590e 100644
--- a/WebKit/chromium/src/WebAudioBus.cpp
+++ b/WebKit/chromium/src/WebAudioBus.cpp
@@ -44,14 +44,6 @@ namespace WebKit {
class WebAudioBusPrivate : public AudioBus {
};
-WebAudioBus::~WebAudioBus()
-{
-#if ENABLE(WEB_AUDIO)
- delete m_private;
- m_private = 0;
-#endif
-}
-
void WebAudioBus::initialize(unsigned numberOfChannels, size_t length, double sampleRate)
{
#if ENABLE(WEB_AUDIO)
@@ -66,6 +58,16 @@ void WebAudioBus::initialize(unsigned numberOfChannels, size_t length, double sa
#endif
}
+void WebAudioBus::reset()
+{
+#if ENABLE(WEB_AUDIO)
+ delete m_private;
+ m_private = 0;
+#else
+ ASSERT_NOT_REACHED();
+#endif
+}
+
unsigned WebAudioBus::numberOfChannels() const
{
#if ENABLE(WEB_AUDIO)
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
index 880adb4..9f4ce87 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.cpp
@@ -33,6 +33,7 @@
#include "DebuggerAgentImpl.h"
#include "DebuggerAgentManager.h"
+#include "ExceptionCode.h"
#include "InjectedScriptHost.h"
#include "InspectorBackendDispatcher.h"
#include "InspectorController.h"
@@ -44,6 +45,7 @@
#include "ResourceResponse.h"
#include "ScriptDebugServer.h"
#include "V8Binding.h"
+#include "V8Node.h"
#include "V8Proxy.h"
#include "V8Utilities.h"
#include "WebDataSource.h"
@@ -74,6 +76,7 @@ using WebCore::ResourceRequest;
using WebCore::ResourceResponse;
using WTF::String;
using WebCore::V8DOMWrapper;
+using WebCore::V8Node;
using WebCore::V8Proxy;
namespace WebKit {
@@ -243,6 +246,14 @@ void WebDevToolsAgentImpl::inspectElementAt(const WebPoint& point)
m_webViewImpl->inspectElementAt(point);
}
+void WebDevToolsAgentImpl::inspectNode(v8::Handle<v8::Value> node)
+{
+ if (!V8Node::HasInstance(node))
+ V8Proxy::setDOMException(WebCore::TYPE_MISMATCH_ERR);
+ else
+ inspectorController()->inspect(V8Node::toNative(v8::Handle<v8::Object>::Cast(node)));
+}
+
void WebDevToolsAgentImpl::setRuntimeProperty(const WebString& name, const WebString& value)
{
if (name == kApuAgentFeatureName)
diff --git a/WebKit/chromium/src/WebDevToolsAgentImpl.h b/WebKit/chromium/src/WebDevToolsAgentImpl.h
index feb4bdd..487cf0c 100644
--- a/WebKit/chromium/src/WebDevToolsAgentImpl.h
+++ b/WebKit/chromium/src/WebDevToolsAgentImpl.h
@@ -75,6 +75,7 @@ public:
virtual void didNavigate();
virtual void dispatchOnInspectorBackend(const WebString& message);
virtual void inspectElementAt(const WebPoint& point);
+ virtual void inspectNode(v8::Handle<v8::Value> node);
virtual void evaluateInWebInspector(long callId, const WebString& script);
virtual void setRuntimeProperty(const WebString& name, const WebString& value);
virtual void setTimelineProfilingEnabled(bool enable);
diff --git a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
index ea59ab6..345e43e 100644
--- a/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
+++ b/WebKit/chromium/src/WebDevToolsFrontendImpl.cpp
@@ -111,7 +111,11 @@ void WebDevToolsFrontendImpl::dispatchOnInspectorFrontend(const WebString& messa
v8::HandleScope scope;
v8::Handle<v8::Context> frameContext = V8Proxy::context(frame->frame());
v8::Context::Scope contextScope(frameContext);
- v8::Handle<v8::Value> dispatchFunction = frameContext->Global()->Get(v8::String::New("WebInspector_syncDispatch"));
+ v8::Handle<v8::Value> inspectorBackendValue = frameContext->Global()->Get(v8::String::New("InspectorBackend"));
+ if (!inspectorBackendValue->IsObject())
+ return;
+ v8::Handle<v8::Object> inspectorBackend = v8::Handle<v8::Object>::Cast(inspectorBackendValue);
+ v8::Handle<v8::Value> dispatchFunction = inspectorBackend->Get(v8::String::New("dispatch"));
// The frame might have navigated away from the front-end page (which is still weird).
if (!dispatchFunction->IsFunction())
return;
@@ -120,7 +124,7 @@ void WebDevToolsFrontendImpl::dispatchOnInspectorFrontend(const WebString& messa
args.append(ToV8String(message));
v8::TryCatch tryCatch;
tryCatch.SetVerbose(true);
- function->Call(frameContext->Global(), args.size(), args.data());
+ function->Call(inspectorBackend, args.size(), args.data());
}
void WebDevToolsFrontendImpl::frontendLoaded()
diff --git a/WebKit/chromium/src/WebFormElement.cpp b/WebKit/chromium/src/WebFormElement.cpp
index 7a01053..6b6e9be 100644
--- a/WebKit/chromium/src/WebFormElement.cpp
+++ b/WebKit/chromium/src/WebFormElement.cpp
@@ -92,9 +92,12 @@ void WebFormElement::getFormControlElements(WebVector<WebFormControlElement>& re
// re-evaluating size each time. Also, consider refactoring this code so that
// we don't call form->associatedElements() multiple times.
for (size_t i = 0; i < form->associatedElements().size(); i++) {
- if (form->associatedElements()[i]->hasLocalName(HTMLNames::inputTag)
- || form->associatedElements()[i]->hasLocalName(HTMLNames::selectTag))
- tempVector.append(form->associatedElements()[i]);
+ if (!form->associatedElements()[i]->isFormControlElement())
+ continue;
+ HTMLFormControlElement* element = static_cast<HTMLFormControlElement*>(form->associatedElements()[i]);
+ if (element->hasLocalName(HTMLNames::inputTag)
+ || element->hasLocalName(HTMLNames::selectTag))
+ tempVector.append(element);
}
result.assign(tempVector);
}
diff --git a/WebKit/chromium/src/WebGeolocationClientMock.cpp b/WebKit/chromium/src/WebGeolocationClientMock.cpp
new file mode 100644
index 0000000..1ec3dd1
--- /dev/null
+++ b/WebKit/chromium/src/WebGeolocationClientMock.cpp
@@ -0,0 +1,146 @@
+/*
+ * 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 "WebGeolocationClientMock.h"
+
+#include "CurrentTime.h"
+#include "Geolocation.h"
+#include "GeolocationClientMock.h"
+#include "GeolocationError.h"
+#include "GeolocationPosition.h"
+#include "PositionError.h"
+#include "WebGeolocationController.h"
+#include "WebGeolocationError.h"
+#include "WebGeolocationPermissionRequest.h"
+#include "WebGeolocationPosition.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebGeolocationClientMock* WebGeolocationClientMock::create()
+{
+ return new WebGeolocationClientMock();
+}
+
+void WebGeolocationClientMock::setPosition(double latitude, double longitude, double accuracy)
+{
+ WebGeolocationPosition webPosition(currentTime(), latitude, longitude, accuracy,
+ false, 0, false, 0, false, 0, false, 0);
+ m_clientMock->setPosition(webPosition);
+}
+
+void WebGeolocationClientMock::setError(int errorCode, const WebString& message)
+{
+ WebGeolocationError::Error code;
+ switch (errorCode) {
+ case PositionError::PERMISSION_DENIED:
+ code = WebGeolocationError::ErrorPermissionDenied;
+ break;
+ case PositionError::POSITION_UNAVAILABLE:
+ code = WebGeolocationError::ErrorPositionUnavailable;
+ break;
+ default:
+ ASSERT_NOT_REACHED();
+ return;
+ }
+
+ WebGeolocationError webError(code, message);
+ m_clientMock->setError(webError);
+}
+
+void WebGeolocationClientMock::setPermission(bool allowed)
+{
+ m_clientMock->setPermission(allowed);
+}
+
+void WebGeolocationClientMock::resetMock()
+{
+ m_clientMock->reset();
+}
+
+void WebGeolocationClientMock::startUpdating()
+{
+ m_clientMock->startUpdating();
+}
+
+void WebGeolocationClientMock::stopUpdating()
+{
+ m_clientMock->stopUpdating();
+}
+
+void WebGeolocationClientMock::setEnableHighAccuracy(bool accuracy)
+{
+ m_clientMock->setEnableHighAccuracy(accuracy);
+}
+
+void WebGeolocationClientMock::geolocationDestroyed()
+{
+ m_clientMock->geolocationDestroyed();
+}
+
+void WebGeolocationClientMock::setController(WebGeolocationController* controller)
+{
+ m_clientMock->setController(controller->controller());
+ delete controller;
+}
+
+void WebGeolocationClientMock::requestPermission(const WebGeolocationPermissionRequest& request)
+{
+ m_clientMock->requestPermission(request.geolocation());
+}
+
+void WebGeolocationClientMock::cancelPermissionRequest(const WebGeolocationPermissionRequest& request)
+{
+ m_clientMock->cancelPermissionRequest(request.geolocation());
+}
+
+bool WebGeolocationClientMock::lastPosition(WebGeolocationPosition& webPosition)
+{
+ RefPtr<GeolocationPosition> position = m_clientMock->lastPosition();
+ if (!position)
+ return false;
+
+ webPosition = position.release();
+ return true;
+}
+
+WebGeolocationClientMock::WebGeolocationClientMock()
+{
+ m_clientMock.reset(new GeolocationClientMock());
+}
+
+void WebGeolocationClientMock::reset()
+{
+ m_clientMock.reset(0);
+}
+
+} // WebKit
diff --git a/WebKit/chromium/src/WebGeolocationController.cpp b/WebKit/chromium/src/WebGeolocationController.cpp
new file mode 100644
index 0000000..12cbaa0
--- /dev/null
+++ b/WebKit/chromium/src/WebGeolocationController.cpp
@@ -0,0 +1,52 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebGeolocationController.h"
+
+#include "GeolocationController.h"
+#include "GeolocationError.h"
+#include "GeolocationPosition.h"
+#include "WebGeolocationError.h"
+#include "WebGeolocationPosition.h"
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefPtr.h>
+
+using namespace WebCore;
+
+namespace WebKit {
+
+void WebGeolocationController::positionChanged(const WebGeolocationPosition& webPosition)
+{
+ m_private->positionChanged(PassRefPtr<GeolocationPosition>(webPosition).get());
+}
+
+void WebGeolocationController::errorOccurred(const WebGeolocationError& webError)
+{
+ m_private->errorOccurred(PassRefPtr<GeolocationError>(webError).get());
+}
+
+} // namespace WebKit
diff --git a/WebKit/chromium/src/WebGeolocationPermissionRequest.cpp b/WebKit/chromium/src/WebGeolocationPermissionRequest.cpp
new file mode 100644
index 0000000..8d8c53e
--- /dev/null
+++ b/WebKit/chromium/src/WebGeolocationPermissionRequest.cpp
@@ -0,0 +1,49 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebGeolocationPermissionRequest.h"
+
+#include "Document.h"
+#include "Frame.h"
+#include "Geolocation.h"
+#include "WebSecurityOrigin.h"
+#include "WebURL.h"
+
+using namespace WebCore;
+
+namespace WebKit {
+
+WebSecurityOrigin WebGeolocationPermissionRequest::securityOrigin() const
+{
+ return WebSecurityOrigin::create(m_private->frame()->document()->url());
+}
+
+void WebGeolocationPermissionRequest::setIsAllowed(bool allowed)
+{
+ m_private->setIsAllowed(allowed);
+}
+
+}
diff --git a/WebKit/chromium/src/WebGeolocationPermissionRequestManager.cpp b/WebKit/chromium/src/WebGeolocationPermissionRequestManager.cpp
new file mode 100644
index 0000000..4c0ed9c
--- /dev/null
+++ b/WebKit/chromium/src/WebGeolocationPermissionRequestManager.cpp
@@ -0,0 +1,95 @@
+/*
+ * Copyright (C) 2010 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebGeolocationPermissionRequestManager.h"
+
+#include "WebGeolocationPermissionRequest.h"
+#include <wtf/HashMap.h>
+
+namespace WebCore {
+class Geolocation;
+}
+
+using namespace WebCore;
+
+typedef HashMap<Geolocation*, int> GeolocationIdMap;
+typedef HashMap<int, Geolocation*> IdGeolocationMap;
+
+namespace WebKit {
+class WebGeolocationPermissionRequestManagerPrivate {
+public:
+ GeolocationIdMap m_geolocationIdMap;
+ IdGeolocationMap m_idGeolocationMap;
+};
+}
+
+using namespace WebKit;
+
+int WebGeolocationPermissionRequestManager::add(const WebKit::WebGeolocationPermissionRequest& permissionRequest)
+{
+ Geolocation* geolocation = permissionRequest.geolocation();
+ ASSERT(!m_private->m_geolocationIdMap.contains(geolocation));
+ int id = ++m_lastId;
+ m_private->m_geolocationIdMap.add(geolocation, id);
+ m_private->m_idGeolocationMap.add(id, geolocation);
+ return id;
+}
+
+bool WebGeolocationPermissionRequestManager::remove(const WebKit::WebGeolocationPermissionRequest& permissionRequest, int& id)
+{
+ Geolocation* geolocation = permissionRequest.geolocation();
+ GeolocationIdMap::iterator it = m_private->m_geolocationIdMap.find(geolocation);
+ if (it == m_private->m_geolocationIdMap.end())
+ return false;
+ id = it->second;
+ m_private->m_geolocationIdMap.remove(it);
+ m_private->m_idGeolocationMap.remove(id);
+ return true;
+}
+
+bool WebGeolocationPermissionRequestManager::remove(int id, WebKit::WebGeolocationPermissionRequest& permissionRequest)
+{
+ IdGeolocationMap::iterator it = m_private->m_idGeolocationMap.find(id);
+ if (it == m_private->m_idGeolocationMap.end())
+ return false;
+ Geolocation* geolocation = it->second;
+ permissionRequest = WebGeolocationPermissionRequest(geolocation);
+ m_private->m_idGeolocationMap.remove(it);
+ m_private->m_geolocationIdMap.remove(geolocation);
+ return true;
+}
+
+void WebGeolocationPermissionRequestManager::init()
+{
+ m_lastId = 0;
+ m_private.reset(new WebGeolocationPermissionRequestManagerPrivate);
+}
+
+void WebGeolocationPermissionRequestManager::reset()
+{
+ m_private.reset(0);
+}
+
diff --git a/WebKit/chromium/src/WebGeolocationServiceMock.cpp b/WebKit/chromium/src/WebGeolocationServiceMock.cpp
index 07d3f44..667b8b1 100644
--- a/WebKit/chromium/src/WebGeolocationServiceMock.cpp
+++ b/WebKit/chromium/src/WebGeolocationServiceMock.cpp
@@ -41,39 +41,6 @@
#include <wtf/Vector.h>
#if ENABLE(GEOLOCATION)
-
-#if ENABLE(CLIENT_BASED_GEOLOCATION)
-// FIXME: Implement mock bindings for client-based geolocation. Ultimately
-// move to another class and remove WebGeolocationService*.
-
-namespace WebKit {
-
-class WebGeolocationServiceMockClientBasedImpl : public WebGeolocationServiceMock {
-};
-
-WebGeolocationServiceMock* WebGeolocationServiceMock::createWebGeolocationServiceMock()
-{
- return new WebGeolocationServiceMockClientBasedImpl;
-}
-
-void WebGeolocationServiceMock::setMockGeolocationPermission(bool allowed)
-{
- // FIXME: Implement mock binding
-}
-
-void WebGeolocationServiceMock::setMockGeolocationPosition(double latitude, double longitude, double accuracy)
-{
- // FIXME: Implement mock binding
-}
-
-void WebGeolocationServiceMock::setMockGeolocationError(int errorCode, const WebString& message)
-{
- // FIXME: Implement mock binding
-}
-
-} // namespace WebKit
-
-#else
using WebCore::Coordinates;
using WebCore::Frame;
using WebCore::Geolocation;
@@ -272,6 +239,4 @@ void WebGeolocationServiceMockImpl::notifyPendingPermissions()
}
} // namespace WebKit
-
-#endif // ENABLE(CLIENT_BASED_GEOLOCATION)
#endif // ENABLE(GEOLOCATION)
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
index 9a74601..9a4a362 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.cpp
@@ -624,6 +624,15 @@ void WebGraphicsContext3DDefaultImpl::copyTextureToParentTextureCHROMIUM(unsigne
glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, m_boundFBO);
}
+WebString WebGraphicsContext3DDefaultImpl::getRequestableExtensionsCHROMIUM()
+{
+ return WebString();
+}
+
+void WebGraphicsContext3DDefaultImpl::requestExtensionCHROMIUM(const char*)
+{
+}
+
// Helper macros to reduce the amount of code.
#define DELEGATE_TO_GL(name, glname) \
@@ -1260,68 +1269,13 @@ DELEGATE_TO_GL_2(sampleCoverage, SampleCoverage, double, bool)
DELEGATE_TO_GL_4(scissor, Scissor, long, long, unsigned long, unsigned long)
-unsigned bytesPerComponent(unsigned type)
-{
- switch (type) {
- case GL_BYTE:
- case GL_UNSIGNED_BYTE:
- return 1;
- case GL_SHORT:
- case GL_UNSIGNED_SHORT:
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- return 2;
- case GL_FLOAT:
- return 4;
- default:
- return 4;
- }
-}
-
-unsigned componentsPerPixel(unsigned format, unsigned type)
-{
- switch (type) {
- case GL_UNSIGNED_SHORT_5_6_5:
- case GL_UNSIGNED_SHORT_4_4_4_4:
- case GL_UNSIGNED_SHORT_5_5_5_1:
- return 1;
- default:
- break;
- }
- switch (format) {
- case GL_LUMINANCE:
- return 1;
- case GL_LUMINANCE_ALPHA:
- return 2;
- case GL_RGB:
- return 3;
- case GL_RGBA:
- case GL_BGRA_EXT:
- return 4;
- default:
- return 4;
- }
-}
-
-// N.B.: This code does not protect against integer overflow (as the command
-// buffer implementation does), so it should not be considered robust enough
-// for use in the browser. Since this implementation is only used for layout
-// tests, this should be ok for now.
-size_t imageSizeInBytes(unsigned width, unsigned height, unsigned format, unsigned type)
-{
- return width * height * bytesPerComponent(type) * componentsPerPixel(format, type);
-}
-
void WebGraphicsContext3DDefaultImpl::texImage2D(unsigned target, unsigned level, unsigned internalFormat, unsigned width, unsigned height, unsigned border, unsigned format, unsigned type, const void* pixels)
{
- OwnArrayPtr<uint8> zero;
- if (!pixels) {
- size_t size = imageSizeInBytes(width, height, format, type);
- zero.set(new uint8[size]);
- memset(zero.get(), 0, size);
- pixels = zero.get();
+ if (width && height && !pixels) {
+ synthesizeGLError(GL_INVALID_VALUE);
+ return;
}
+ makeContextCurrent();
glTexImage2D(target, level, internalFormat, width, height, border, format, type, pixels);
}
diff --git a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
index 32e3671..b656d0c 100644
--- a/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
+++ b/WebKit/chromium/src/WebGraphicsContext3DDefaultImpl.h
@@ -85,6 +85,9 @@ public:
virtual void unmapTexSubImage2DCHROMIUM(const void*);
virtual void copyTextureToParentTextureCHROMIUM(unsigned texture, unsigned parentTexture);
+ virtual WebString getRequestableExtensionsCHROMIUM();
+ virtual void requestExtensionCHROMIUM(const char*);
+
virtual void activeTexture(unsigned long texture);
virtual void attachShader(WebGLId program, WebGLId shader);
virtual void bindAttribLocation(WebGLId program, unsigned long index, const char* name);
diff --git a/WebKit/chromium/src/WebIDBCursorImpl.cpp b/WebKit/chromium/src/WebIDBCursorImpl.cpp
index eca5d42..5165574 100644
--- a/WebKit/chromium/src/WebIDBCursorImpl.cpp
+++ b/WebKit/chromium/src/WebIDBCursorImpl.cpp
@@ -80,9 +80,9 @@ void WebIDBCursorImpl::continueFunction(const WebIDBKey& key, WebIDBCallbacks* c
m_idbCursorBackend->continueFunction(key, IDBCallbacksProxy::create(callbacks), ec);
}
-void WebIDBCursorImpl::remove(WebIDBCallbacks* callbacks, WebExceptionCode& ec)
+void WebIDBCursorImpl::deleteFunction(WebIDBCallbacks* callbacks, WebExceptionCode& ec)
{
- m_idbCursorBackend->remove(IDBCallbacksProxy::create(callbacks), ec);
+ m_idbCursorBackend->deleteFunction(IDBCallbacksProxy::create(callbacks), ec);
}
} // namespace WebCore
diff --git a/WebKit/chromium/src/WebIDBCursorImpl.h b/WebKit/chromium/src/WebIDBCursorImpl.h
index 39fa44b..7f8ebd7 100644
--- a/WebKit/chromium/src/WebIDBCursorImpl.h
+++ b/WebKit/chromium/src/WebIDBCursorImpl.h
@@ -47,7 +47,7 @@ public:
virtual void value(WebSerializedScriptValue&, WebIDBKey&) const;
virtual void update(const WebSerializedScriptValue&, WebIDBCallbacks*, WebExceptionCode&);
virtual void continueFunction(const WebIDBKey&, WebIDBCallbacks*, WebExceptionCode&);
- virtual void remove(WebIDBCallbacks*, WebExceptionCode&);
+ virtual void deleteFunction(WebIDBCallbacks*, WebExceptionCode&);
private:
WTF::RefPtr<WebCore::IDBCursorBackendInterface> m_idbCursorBackend;
diff --git a/WebKit/chromium/src/WebIDBDatabaseError.cpp b/WebKit/chromium/src/WebIDBDatabaseError.cpp
index cbbe14a..7413ae6 100644
--- a/WebKit/chromium/src/WebIDBDatabaseError.cpp
+++ b/WebKit/chromium/src/WebIDBDatabaseError.cpp
@@ -47,7 +47,7 @@ void WebIDBDatabaseError::assign(const WebIDBDatabaseError& value)
void WebIDBDatabaseError::assign(unsigned short code, const WebString& message)
{
- m_private = IDBDatabaseError::create(code, message);
+ m_private = IDBDatabaseError::createWithoutOffset(code, message);
}
void WebIDBDatabaseError::reset()
diff --git a/WebKit/chromium/src/WebIDBKey.cpp b/WebKit/chromium/src/WebIDBKey.cpp
index b7a7db8..7e84df1 100644
--- a/WebKit/chromium/src/WebIDBKey.cpp
+++ b/WebKit/chromium/src/WebIDBKey.cpp
@@ -48,6 +48,27 @@ WebIDBKey WebIDBKey::createNull()
return key;
}
+WebIDBKey WebIDBKey::createString(const WebString& string)
+{
+ WebIDBKey key;
+ key.assignString(string);
+ return key;
+}
+
+WebIDBKey WebIDBKey::createDate(double date)
+{
+ WebIDBKey key;
+ key.assignDate(date);
+ return key;
+}
+
+WebIDBKey WebIDBKey::createNumber(double number)
+{
+ WebIDBKey key;
+ key.assignNumber(number);
+ return key;
+}
+
WebIDBKey WebIDBKey::createInvalid()
{
WebIDBKey key;
@@ -69,17 +90,22 @@ void WebIDBKey::assign(const WebIDBKey& value)
void WebIDBKey::assignNull()
{
- m_private = IDBKey::create();
+ m_private = IDBKey::createNull();
+}
+
+void WebIDBKey::assignString(const WebString& string)
+{
+ m_private = IDBKey::createString(string);
}
-void WebIDBKey::assign(const WebString& string)
+void WebIDBKey::assignDate(double date)
{
- m_private = IDBKey::create(string);
+ m_private = IDBKey::createDate(date);
}
-void WebIDBKey::assign(double number)
+void WebIDBKey::assignNumber(double number)
{
- m_private = IDBKey::create(number);
+ m_private = IDBKey::createNumber(number);
}
void WebIDBKey::assignInvalid()
@@ -104,6 +130,11 @@ WebString WebIDBKey::string() const
return m_private->string();
}
+double WebIDBKey::date() const
+{
+ return m_private->date();
+}
+
double WebIDBKey::number() const
{
return m_private->number();
diff --git a/WebKit/chromium/src/WebIDBKeyRange.cpp b/WebKit/chromium/src/WebIDBKeyRange.cpp
index ec5b7c2..517ff00 100644
--- a/WebKit/chromium/src/WebIDBKeyRange.cpp
+++ b/WebKit/chromium/src/WebIDBKeyRange.cpp
@@ -47,33 +47,11 @@ void WebIDBKeyRange::assign(const WebIDBKey& lower, const WebIDBKey& upper, bool
m_private = IDBKeyRange::create(lower, upper, lowerOpen, upperOpen);
}
-// FIXME: Remove this after next roll.
-void WebIDBKeyRange::assign(const WebIDBKey& lower, const WebIDBKey& upper, unsigned short flags)
-{
- bool lowerOpen = !!(flags & 1);
- bool upperOpen = !!(flags & 2);
-
- if (lower.type() == WebIDBKey::InvalidType && upper.type() == WebIDBKey::InvalidType)
- m_private = 0;
- else
- m_private = IDBKeyRange::create(lower, upper, lowerOpen, upperOpen);
-}
-
void WebIDBKeyRange::reset()
{
m_private.reset();
}
-WebIDBKey WebIDBKeyRange::left() const
-{
- return lower();
-}
-
-WebIDBKey WebIDBKeyRange::right() const
-{
- return upper();
-}
-
WebIDBKey WebIDBKeyRange::lower() const
{
if (!m_private.get())
@@ -98,20 +76,6 @@ bool WebIDBKeyRange::upperOpen() const
return m_private.get() && m_private->upperOpen();
}
-// FIXME: Remove this after next roll.
-unsigned short WebIDBKeyRange::flags() const
-{
- if (!m_private.get())
- return 0;
-
- unsigned short flags = 0;
- if (m_private->lowerOpen())
- flags |= 1;
- if (m_private->upperOpen())
- flags |= 2;
- return flags;
-}
-
WebIDBKeyRange::WebIDBKeyRange(const PassRefPtr<IDBKeyRange>& value)
: m_private(value)
{
diff --git a/WebKit/chromium/src/WebImageDecoder.cpp b/WebKit/chromium/src/WebImageDecoder.cpp
index 0cfd458..a17897c 100644
--- a/WebKit/chromium/src/WebImageDecoder.cpp
+++ b/WebKit/chromium/src/WebImageDecoder.cpp
@@ -56,10 +56,10 @@ void WebImageDecoder::init(Type type)
{
switch (type) {
case TypeBMP:
- m_private = new BMPImageDecoder(true, false);
+ m_private = new BMPImageDecoder(ImageSource::AlphaPremultiplied, ImageSource::GammaAndColorProfileApplied);
break;
case TypeICO:
- m_private = new ICOImageDecoder(true, false);
+ m_private = new ICOImageDecoder(ImageSource::AlphaPremultiplied, ImageSource::GammaAndColorProfileApplied);
break;
}
}
diff --git a/WebKit/chromium/src/WebPasswordFormUtils.cpp b/WebKit/chromium/src/WebPasswordFormUtils.cpp
index b4997e5..5f8a1ec 100644
--- a/WebKit/chromium/src/WebPasswordFormUtils.cpp
+++ b/WebKit/chromium/src/WebPasswordFormUtils.cpp
@@ -65,9 +65,11 @@ void findPasswordFormFields(HTMLFormElement* form, PasswordFormFields* fields)
int firstPasswordIndex = 0;
// First, find the password fields and activated submit button
- const Vector<HTMLFormControlElement*>& formElements = form->associatedElements();
+ const Vector<FormAssociatedElement*>& formElements = form->associatedElements();
for (size_t i = 0; i < formElements.size(); i++) {
- HTMLFormControlElement* formElement = formElements[i];
+ if (!formElements[i]->isFormControlElement())
+ continue;
+ HTMLFormControlElement* formElement = static_cast<HTMLFormControlElement*>(formElements[i]);
if (formElement->isActivatedSubmit())
fields->submit = formElement;
@@ -90,7 +92,9 @@ void findPasswordFormFields(HTMLFormElement* form, PasswordFormFields* fields)
if (!fields->passwords.isEmpty()) {
// Then, search backwards for the username field
for (int i = firstPasswordIndex - 1; i >= 0; i--) {
- HTMLFormControlElement* formElement = formElements[i];
+ if (!formElements[i]->isFormControlElement())
+ continue;
+ HTMLFormControlElement* formElement = static_cast<HTMLFormControlElement*>(formElements[i]);
if (!formElement->hasLocalName(HTMLNames::inputTag))
continue;
diff --git a/WebKit/chromium/src/WebPerformance.cpp b/WebKit/chromium/src/WebPerformance.cpp
index de9c1f6..8c377db 100644
--- a/WebKit/chromium/src/WebPerformance.cpp
+++ b/WebKit/chromium/src/WebPerformance.cpp
@@ -55,12 +55,14 @@ void WebPerformance::assign(const WebPerformance& other)
WebNavigationType WebPerformance::navigationType() const
{
switch (m_private->navigation()->type()) {
- case PerformanceNavigation::NAVIGATE:
+ case PerformanceNavigation::TYPE_NAVIGATE:
return WebNavigationTypeOther;
- case PerformanceNavigation::RELOAD:
+ case PerformanceNavigation::TYPE_RELOAD:
return WebNavigationTypeReload;
- case PerformanceNavigation::BACK_FORWARD:
+ case PerformanceNavigation::TYPE_BACK_FORWARD:
return WebNavigationTypeBackForward;
+ case PerformanceNavigation::TYPE_RESERVED:
+ return WebNavigationTypeOther;
}
ASSERT_NOT_REACHED();
return WebNavigationTypeOther;
@@ -131,6 +133,31 @@ double WebPerformance::responseEnd() const
return millisecondsToSeconds(m_private->timing()->responseEnd());
}
+double WebPerformance::domLoading() const
+{
+ return millisecondsToSeconds(m_private->timing()->domLoading());
+}
+
+double WebPerformance::domInteractive() const
+{
+ return millisecondsToSeconds(m_private->timing()->domInteractive());
+}
+
+double WebPerformance::domContentLoadedEventStart() const
+{
+ return millisecondsToSeconds(m_private->timing()->domContentLoadedEventStart());
+}
+
+double WebPerformance::domContentLoadedEventEnd() const
+{
+ return millisecondsToSeconds(m_private->timing()->domContentLoadedEventEnd());
+}
+
+double WebPerformance::domComplete() const
+{
+ return millisecondsToSeconds(m_private->timing()->domComplete());
+}
+
double WebPerformance::loadEventStart() const
{
return millisecondsToSeconds(m_private->timing()->loadEventStart());
diff --git a/WebKit/chromium/src/WebPluginContainerImpl.cpp b/WebKit/chromium/src/WebPluginContainerImpl.cpp
index 43d9757..90c7f65 100644
--- a/WebKit/chromium/src/WebPluginContainerImpl.cpp
+++ b/WebKit/chromium/src/WebPluginContainerImpl.cpp
@@ -365,8 +365,8 @@ void WebPluginContainerImpl::loadFrameRequest(
WebDataSourceImpl::setNextPluginLoadObserver(observer);
}
- FrameLoadRequest frameRequest(request.toResourceRequest());
- frameRequest.setFrameName(target);
+ FrameLoadRequest frameRequest(frame->document()->securityOrigin(),
+ request.toResourceRequest(), target);
frame->loader()->loadFrameRequest(
frameRequest,
diff --git a/WebKit/chromium/src/WebSearchableFormData.cpp b/WebKit/chromium/src/WebSearchableFormData.cpp
index 50192eb..178e4db 100644
--- a/WebKit/chromium/src/WebSearchableFormData.cpp
+++ b/WebKit/chromium/src/WebSearchableFormData.cpp
@@ -78,8 +78,10 @@ HTMLFormControlElement* GetButtonToActivate(HTMLFormElement* form)
{
HTMLFormControlElement* firstSubmitButton = 0;
// FIXME: Consider refactoring this code so that we don't call form->associatedElements() twice.
- for (Vector<HTMLFormControlElement*>::const_iterator i(form->associatedElements().begin()); i != form->associatedElements().end(); ++i) {
- HTMLFormControlElement* formElement = *i;
+ for (Vector<FormAssociatedElement*>::const_iterator i(form->associatedElements().begin()); i != form->associatedElements().end(); ++i) {
+ if (!(*i)->isFormControlElement())
+ continue;
+ HTMLFormControlElement* formElement = static_cast<HTMLFormControlElement*>(*i);
if (formElement->isActivatedSubmit())
// There's a button that is already activated for submit, return 0.
return 0;
@@ -156,8 +158,10 @@ bool HasSuitableTextElement(const HTMLFormElement* form, Vector<char>* encodedSt
HTMLInputElement* textElement = 0;
// FIXME: Consider refactoring this code so that we don't call form->associatedElements() twice.
- for (Vector<HTMLFormControlElement*>::const_iterator i(form->associatedElements().begin()); i != form->associatedElements().end(); ++i) {
- HTMLFormControlElement* formElement = *i;
+ for (Vector<FormAssociatedElement*>::const_iterator i(form->associatedElements().begin()); i != form->associatedElements().end(); ++i) {
+ if (!(*i)->isFormControlElement())
+ continue;
+ HTMLFormControlElement* formElement = static_cast<HTMLFormControlElement*>(*i);
if (formElement->disabled() || formElement->name().isNull())
continue;
diff --git a/WebKit/chromium/src/WebViewImpl.cpp b/WebKit/chromium/src/WebViewImpl.cpp
index 7bec254..ac05dd2 100644
--- a/WebKit/chromium/src/WebViewImpl.cpp
+++ b/WebKit/chromium/src/WebViewImpl.cpp
@@ -59,6 +59,7 @@
#include "FrameLoader.h"
#include "FrameTree.h"
#include "FrameView.h"
+#include "GeolocationClientProxy.h"
#include "GraphicsContext.h"
#include "GraphicsContext3D.h"
#include "GraphicsContext3DInternal.h"
@@ -310,6 +311,9 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devTools
, m_speechInputClient(SpeechInputClientImpl::create(client))
#endif
, m_deviceOrientationClientProxy(new DeviceOrientationClientProxy(client ? client->deviceOrientationClient() : 0))
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ , m_geolocationClientProxy(new GeolocationClientProxy(client ? client->geolocationClient() : 0))
+#endif
{
// WebKit/win/WebView.cpp does the same thing, except they call the
// KJS specific wrapper around this method. We need to have threading
@@ -333,9 +337,16 @@ WebViewImpl::WebViewImpl(WebViewClient* client, WebDevToolsAgentClient* devTools
pageClients.speechInputClient = m_speechInputClient.get();
#endif
pageClients.deviceOrientationClient = m_deviceOrientationClientProxy.get();
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ pageClients.geolocationClient = m_geolocationClientProxy.get();
+#endif
m_page.set(new Page(pageClients));
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ m_geolocationClientProxy->setController(m_page->geolocationController());
+#endif
+
static_cast<BackForwardListImpl*>(m_page->backForwardList())->setClient(&m_backForwardListClientImpl);
m_page->setGroupName(pageGroupName);
@@ -1910,17 +1921,6 @@ void WebViewImpl::applyAutoFillSuggestions(
const WebNode& node,
const WebVector<WebString>& names,
const WebVector<WebString>& labels,
- const WebVector<int>& uniqueIDs,
- int separatorIndex)
-{
- WebVector<WebString> icons(names.size());
- applyAutoFillSuggestions(node, names, labels, icons, uniqueIDs, separatorIndex);
-}
-
-void WebViewImpl::applyAutoFillSuggestions(
- const WebNode& node,
- const WebVector<WebString>& names,
- const WebVector<WebString>& labels,
const WebVector<WebString>& icons,
const WebVector<int>& uniqueIDs,
int separatorIndex)
@@ -1966,30 +1966,6 @@ void WebViewImpl::applyAutoFillSuggestions(
m_autoFillPopup->show(focusedNode->getRect(), focusedNode->ownerDocument()->view(), 0);
m_autoFillPopupShowing = true;
}
-
- // DEPRECATED: This special mode will go away once AutoFill and Autocomplete
- // merge is complete.
- if (m_autoFillPopupClient)
- m_autoFillPopupClient->setAutocompleteMode(false);
-}
-
-// DEPRECATED: replacing with applyAutoFillSuggestions.
-void WebViewImpl::applyAutocompleteSuggestions(
- const WebNode& node,
- const WebVector<WebString>& suggestions,
- int defaultSuggestionIndex)
-{
- WebVector<WebString> names(suggestions.size());
- WebVector<WebString> labels(suggestions.size());
- WebVector<WebString> icons(suggestions.size());
- WebVector<int> uniqueIDs(suggestions.size());
-
- for (size_t i = 0; i < suggestions.size(); ++i)
- names[i] = suggestions[i];
-
- applyAutoFillSuggestions(node, names, labels, icons, uniqueIDs, -1);
- if (m_autoFillPopupClient)
- m_autoFillPopupClient->setAutocompleteMode(true);
}
void WebViewImpl::hidePopups()
diff --git a/WebKit/chromium/src/WebViewImpl.h b/WebKit/chromium/src/WebViewImpl.h
index 0388770..6e8dcac 100644
--- a/WebKit/chromium/src/WebViewImpl.h
+++ b/WebKit/chromium/src/WebViewImpl.h
@@ -73,6 +73,7 @@ class AutoFillPopupMenuClient;
class ContextMenuClientImpl;
class DeviceOrientationClientProxy;
class DragScrollTimer;
+class GeolocationClientProxy;
class SpeechInputClientImpl;
class WebAccessibilityObject;
class WebDevToolsAgentClient;
@@ -179,13 +180,6 @@ public:
const WebString& value);
virtual WebDevToolsAgent* devToolsAgent();
virtual WebAccessibilityObject accessibilityObject();
- // DEPRECATED.
- virtual void applyAutoFillSuggestions(
- const WebNode&,
- const WebVector<WebString>& names,
- const WebVector<WebString>& labels,
- const WebVector<int>& uniqueIDs,
- int separatorIndex);
virtual void applyAutoFillSuggestions(
const WebNode&,
const WebVector<WebString>& names,
@@ -193,11 +187,6 @@ public:
const WebVector<WebString>& icons,
const WebVector<int>& uniqueIDs,
int separatorIndex);
- // DEPRECATED: replacing with applyAutoFillSuggestions.
- virtual void applyAutocompleteSuggestions(
- const WebNode&,
- const WebVector<WebString>& suggestions,
- int defaultSuggestionIndex);
virtual void hidePopups();
virtual void setScrollbarColors(unsigned inactiveColor,
unsigned activeColor,
@@ -555,6 +544,10 @@ private:
// early. This member holds on to the GC3D in this case.
RefPtr<WebCore::GraphicsContext3D> m_temporaryOnscreenGraphicsContext3D;
OwnPtr<DeviceOrientationClientProxy> m_deviceOrientationClientProxy;
+
+#if ENABLE(CLIENT_BASED_GEOLOCATION)
+ OwnPtr<GeolocationClientProxy> m_geolocationClientProxy;
+#endif
};
} // namespace WebKit
diff --git a/WebKit/chromium/src/js/DevTools.js b/WebKit/chromium/src/js/DevTools.js
index 11ebc1f..d6536bc 100644
--- a/WebKit/chromium/src/js/DevTools.js
+++ b/WebKit/chromium/src/js/DevTools.js
@@ -47,7 +47,9 @@ var context = {}; // Used by WebCore's inspector routines.
Preferences.onlineDetectionEnabled = false;
Preferences.nativeInstrumentationEnabled = true;
Preferences.fileSystemEnabled = false;
+ Preferences.resourceExportEnabled = true;
Preferences.showTimingTab = true;
+ Preferences.showCookiesTab = true;
})();
var devtools = devtools || {};
diff --git a/WebKit/chromium/src/js/Tests.js b/WebKit/chromium/src/js/Tests.js
index 2b264ee..55b24ea 100644
--- a/WebKit/chromium/src/js/Tests.js
+++ b/WebKit/chromium/src/js/Tests.js
@@ -730,7 +730,7 @@ TestSuite.prototype._waitForScriptPause = function(expectations, callback)
var test = this;
// Wait until script is paused.
test.addSniffer(
- WebInspector,
+ WebInspector.debuggerModel,
"pausedScript",
function(details) {
var callFrames = details.callFrames;
@@ -805,7 +805,7 @@ TestSuite.prototype._waitUntilScriptsAreParsed = function(expectedScripts, callb
if (test._scriptsAreParsed(expectedScripts))
callback();
else
- test.addSniffer(WebInspector, "parsedScriptSource", waitForAllScripts);
+ test.addSniffer(WebInspector.debuggerModel, "parsedScriptSource", waitForAllScripts);
}
waitForAllScripts();
@@ -852,7 +852,7 @@ TestSuite.prototype.testPauseInEval = function()
devtools.tools.evaluateJavaScript("fib(10)");
- this.addSniffer(WebInspector, "pausedScript",
+ this.addSniffer(WebInspector.debuggerModel, "pausedScript",
function() {
test.releaseControl();
});